The z-transform We introduced the z-transform before as ∞ X H(z) = h[k]z −k k=−∞ where z is a complex number. When H(z) exists (the sum converges), it can be interpreted as the “response” of an LSI system with impulse response h[n] to the input of z n . The z-transform is useful mostly due to its ability to simplify system analysis via the following result. Theorem 1. If y = h ∗ x, then Y (z) = H(z)X(z). Proof. First observe that ∞ X ∞ X ∞ X n=−∞ k=−∞ y[n]z −n = n=−∞ ∞ X = x[k] ! h[n − k]z −n n=−∞ = z −m · z −k . Thus we have ! ∞ ∞ X X −m = x[k] h[m]z z −k Let m = n − k, and note that z y[n]z −n x[k]h[n − k] z −n ∞ X k=−∞ ∞ X ! n=−∞ = −n n=−∞ k=−∞ ∞ X x[k]H(z)z −k k=−∞ ∞ X = H(z) ! x[k]z −k k=−∞ = H(z)X(z) This yields the “transfer function” H(z) = Y (z) . X(z) The discrete-time Fourier transform The (non-normalized) DTFT is simply a special case of the z-transform for the case |z| = 1, i.e., z = ejω for some value ω ∈ [−π, π] jω X(e ) = ∞ X x[n]e−jωn . n=−∞ 1 The picture you should have in mind is the complex plane. The z-transform is defined on the whole plane, and the DTFT is simply the value of the z-transform on the unit circle, as illustrated below. Im[z] ejω ω Re[z] This picture should make it clear why the DTFT is defined only for ω ∈ [−π, π] (or why it is periodic). Using the normalization above, we also have the inverse DTFT formula: Z π 1 x[n] = X(ejω )ejωn dω. 2π −π z-transform examples • Consider the z-transform given by H(z) = z, as illustrated below. |z| Im[z] Re[z] The corresponding DTFT has magnitude and phase given below. 2 |H(ejω )| π ω −π H(ejω ) π π ω −π −π What could the system H be doing? It is a perfect all-pass, linear-phase system. But what does this mean? Suppose h[n] = δ[n − n0 ]. Then ∞ X H(z) = = h[n]z −n n=−∞ ∞ X δ[n − n0 ]z −n n=−∞ −n0 =z . Thus, H(z) = z −n0 is the z-transform of a system that simply delays the input by n0 . H(z) = z −1 is the z-transform of a unit-delay. 3 • Now consider x[n] = αn u[n] x[n] n X(z) = = ∞ X x[n]z −n = n=−∞ ∞ X ∞ X αn z −n n=0 α n n=0 z 1 1 − αz z = z−α (if |α/z| < 1) (Geometric Series) = ∞ P n What if az ≥ 1? Then (α n ) does not converge! Therefore, whenever n=0 we compute a z-transform, we must also specify the set of z’s for which the z-transform exists. This is called the region of convergence (ROC). In the above example, the ROC={z : |z| > |α|}. Im[z] ROC αα Re[z] 4 • What about the “evil twin” x[n] = −αn u[−1 − n]? X(z) = ∞ X − αn u[−1 − n]z −n = n=−∞ −1 X − αn z −n n=−∞ −1 −n X z =− α n=−∞ =− ∞ n X z α n=1 ∞ X =1− n=0 =1− 1 1− z n α z α = (converges if |z/α| < 1) α−z−α z = α−z z−α We get the exact same result but with ROC={z : |z| < |α|}. z-transform analysis of discrete-time filters The z-transform might seem slightly ugly. We have to worry about the region of convergence, and we haven’t even talked about how to invert it yet (it isn’t pretty). However, in the end it is worth it because it is extremely useful in analyzing digital filters with feedback. For example, consider the system illustrated below b0 x[n] Delay v[n] b1 y[n] a1 y[n − 1] x[n − 1] Delay Delay b2 a2 Delay y[n − 2] x[n − 2] We can analyze this system via the equations v[n] = b0 x[n] + b1 x[n − 1] + b2 x[n − 2] and y[n] = v[n] + a1 y[n − 1] + a2 y[n − 2]. 5 More generally, N X v[n] = bk x[n − k] k=0 and y[n] = M X ak y[n − k] + v[n] k=1 or equivalently N X bk x[n − k] = y[n] − k=0 M X ak y[n − k]. k=1 In general, many LSI systems satisfy linear difference equations of the form: M X ak y[n − k] = N X bk x[n − k]. k=0 k=0 What does the z-transform of this relationship look like? (M ) (M ) X X Z ak y[n − k] = Z bk x[n − k] k=0 M X k=0 ak Z{y[n − k]} = N X bk Z{x[n − k]}. k=0 k=0 Note that ∞ X Z {y[n − k]} = = y[n − k]z −n n=−∞ ∞ X y[m]z −m · z −k m=−∞ = Y (z)z −k . Thus the relationship above reduces to M X ak Y (z)z −k = k=0 Y (z) M X N X bk X(z)z −k k=0 ! ak z −k = X(z) k=0 N X ! bk z k=0 N P bk z −k Y (z) = k=0 M P X(z) ak z −k k=0 6 −k Hence, given a system like the one above, we can pretty much immediately write down the system’s transfer function, and we end up with a rational function, i.e., a ratio of two polynomials in z. Similarly, given a rational function, it is easy to realize this function in a simple hardware architecture. We will focus exclusively on such rational functions in this course. 7