The z-Transform The representation for a sampled function was shown to be xs (t ) x[n] (t nT ). n Taking the Laplace transform of this function we have X s (s) x[n]e n snT . If we let z=esT, we have X s ( s) x[n]z n X ( z ). n The samples in the sum are multiplied by z-n. Each factor z-n corresponds to a factor of e-snT in Laplace domain. Multiplying by e-snT in Laplace domain corresponds to a delay in time domain: e snT X ( s ) e snT e st x(t ) dt 0 e s (t nT ) x(t ) dt e su x(u nT ) du Lx(t nT ). Here, the bilateral Laplace tranformation is used. Example: Find the z-transform of the discrete-time step function 1 (n 0), x[n] u[n] 0 (n 0). u[n] n 1 2 3 4 5 By simply inserting this discrete-time function into the definition of the z-transform, X ( z) x[n]z n . n we have X ( z) u[n]z n z . n 0 n n To evaluate this sum, we use the formula for an infinite geometric series: 1 a . 1 a n 0 n This summation converges to the above expression if |a|<1. A derivation of this expression is on the following slide. N SN a . n n 0 S N 1 S N a N 1 S N [1 a ] 1 a N 1 1 aS N . N 1 1 a SN . 1 a 1 0 1 S . 1 a 1 a . Using the formula for the infinite geometric series the z-transform of the unit step function is X ( z) z n n 0 1 . 1 1 z The convergence criterion is | z 1 | 1, or, | z | 1. Since z is a complex number, this last statement is equivalent to those values of z whose magnitude is greater than one: z r zi 1 , 2 2 or, zr zi 1. 2 2 The region zr zi 1 2 2 corresponds to a circle in the complex plane. (zr is like x and zi is like y.) Thus, the region zr zi 1 2 2 is the region exterior to the unit circle. Im{z} zr zi 1 2 2 Re{z} Im{z} zr zi 1 2 2 Re{z} Example: Find the z-transform of 1 ( n 0). x[n] u[n 1] 0 (n 0). -u[-n-1] -3 -2 -1 n 1 2 3 4 5 In this case, we have an anticausal function. Strictly speaking, it is impossible to generate this function, but it may arise as a solution to a design. Such functions correspond to nonrealizable systems. The z-transform of this function will be a sum like the z-transform for the step function, but the index will be negative: 1 X ( z) z n n z n 1 n 1 1 1 z 1 1 z 1 z z 1 z z z 1 1 . 1 1 z We see that the z-transform of the anticausal step function is the same as that of the ordinary step function. This z-transform converges for |z|<1 (look at the last summation before the geometric series formula is applied). The region |z|<1 corresponds to zr zi 1. 2 2 Im{z} zr zi 1 2 2 Re{z} Example: Find the z-transform of a discrete-time exponential function n a n x[n] a u[n] 0 (n 0), (n 0), where |a| < 1. anu[n] n 1 2 3 4 5 To find the z-transform, we proceed in much the same fashion as we did before: X ( z) a z n n n 0 az 1 n n 0 1 . 1 1 az The region of convergence is |az-1 | < 1, or |z|>a. Notice that the regions of convergence do not contain any of the poles of the z-transform. The poles are where the denominator is zero. For the unit step function z-transform, the pole was at z=1. For anun, the pole is at z=a. Poles are marked with an ‘x’. Im{z} zr zi a 2 2 zr zi a 2 2 2 2 Re{z} zr zi 1 2 2 Example: Find the z-transform of a discrete-time ramp function n (n 0), x[n] r[n] nu[n] 0 (n 0). r[n] n 1 2 3 4 5 The first step in finding this z-transform is the same as with other z-transforms: X ( z ) nz . n n 0 To proceed from here, we need to use a small trick: d 1 z 1 dz n n z 1 n 1 nz n 1 . The last expression is the term inside the sum of the z-transform of the ramp multiplied by z. So if we multiply the transform by z-1z, we have X ( z) z 1 nz n 1 n 0 d 1 z 1 z n 0 dz 1 n d 1 1 z z 1 dz n 0 1 1 d z 1 1 dz 1 z 1 1 z . 2 1 1 z n The region of convergence is the same as that for the unit step function: |z|>1. Example: Find the z-transform of a discrete-time impulse function 1 (n 0), x[n] [n] 0 (n 0). [n] n -2 -1 1 2 3 When evaluating the z-transform for this function, we see that only the n=0 term is non-zero X ( z) z 0 1. A summary of the z-transforms of the causal signals is shown in the table on the following slide. x[n ] X (z ) [n] 1 u[n ] n a u[n] r[n] 1 1 z 1 1 1 az 1 z 1 1 z 1 2 There are certain general characteristics that apply to all z-transforms. For example, if we multiply a ztransform by z-1, we achieve a delay in time-domain: 1 z X ( z) z 1 x[n]z n n ( n 1) x [ n ] z n n x [ n 1 ] z . n (In the last step, we substituted n-1 for n.) So, Z{x[n 1]} z 1 X ( z ). This property is perhaps the most important property of z-transforms. In (continuous-time) linear system theory, we described the input/output relationship of a system by the following diagram: x(t ) * h (t ) L X (s ) y (t ) L H (s ) Y (s ) -1 We can find the output y(t) from the input x(t) by either using convolution with the impulse response or by multiplication by the transfer function in Laplace domain. Does a similar diagram exist for discrete-time functions? x[n ] * h[n] Z y[n] Z X (z ) H (z ) Y (z ) -1 To see if such relationships exist, let’s look at the bottom half of this diagram where we multiply X(z) by H(z) to get Y(z). Y ( z ) H ( z ) X ( z ). By applying the definition of the z-transform, we can see what the equivalent (discrete-) time relationship would be. Y ( z) H ( z) X ( z) h[n]z x[m]z n n m m h[n]x[m]z ( n m ) n m h[n m]x[m]z n n m In the last step, we substituted n with n-m. Since Y ( z) y[n]z n , n we must necessarily have y[n] x[m]h[n m]. m This last expression is that of a discrete-time convolution: y[n] x[n] * h[n] x[m]h[n m]. m Example: Find the discrete-time convolution of the following two functions: x[n] 2 1 n -2 -1 h[n] 1 2 3 4 1 n -2 -1 1 2 3 4 We start by evaluating the terms in the summation: x[m] and h[n-m] for various values of n. x[m] 2 1 m -2 -1 h[-m] 1 2 3 4 n=0 1 m -2 -1 1 2 3 4 h[1-m] n=1 1 m -2 -1 h[2-m] 1 2 3 4 n=2 1 m -2 -1 h[3-m] 1 2 3 4 n=3 1 m -2 -1 1 2 3 4 We then find the sum of the products of the two functions. x[m] 2 1 m -2 -1 h[-m] 1 2 3 4 n=0 1 m -2 -1 1 2 3 4 The values marked in red indicate values in both functions whose product is not zero. Non-red values will have a zero product. So from the red values we have y[0] x[m]h[m] (1)(1) 1. Proceeding for n=1,2,…, we have n=1 x[m] 2 1 m -2 -1 h[1-m] 1 2 3 4 1 m -2 -1 1 2 3 4 y[1] x[m]h[1 m] (1)(1) (2)(1) 3. n=2 x[m] 2 1 m -2 -1 h[2-m] 1 2 3 4 1 m -2 -1 1 2 3 4 y[2] x[m]h[2 m] (2)(1) (1)(1) 3. n=3 x[m] 2 1 m -2 -1 h[3-m] 1 2 3 4 1 m -2 -1 1 2 3 4 y[3] x[m]h[3 m] (1)(1) 1. So we have the following values for y[n]: 1 3 y[n] 3 1 (n 0), (n 1), (n 2), (n 3). The values for y[n] are zero for other values of n (n<0, n>3). y[n] 3 2 1 n -2 -1 1 2 3 4 The same result could have been achieved using ztransforms: 1 2 X ( z) 1 2z z . 1 H ( z) 1 z . Y ( z) X ( z)H ( z) 1 1 2z z 1 2 1 z 2 1 3 1 3z 3z z . Taking the inverse z-transform, we have y[n] [n] 3 [n 1] 3 [n 2] [n 3]. In MATLAB, we carry out the calculations for the previous example using the conv and filt functions: >> x = [1 2 1]; >> h = [1 1]; >> y = conv(x,h) y = 1 3 3 1 >>X = filt(x,1) Transfer function: 1 + 2 z^-1 + z^-2 >>H = filt(h,1) Transfer function: 1 + z^-1 >>Y = X*H Transfer function: 1 + 3 z^-1 + 3 z^-2 + z^-3 We can also plot the functions as follows: >> plot(0:2,x,'or') >> axis([-1 4 -1 4]) >> plot(0:1,h,'ob') >> axis([-1 4 -1 4]) >> plot(0:3,y,'om') >> axis([-1 4 -1 4]) The plots are shown on the following pages. Input 4 3 xn 2 1 0 -1 -1 0 1 2 n 3 4 Impulse Response 4 3 hn 2 1 0 -1 -1 0 1 2 n 3 4 Output 4 3 yn 2 1 0 -1 -1 0 1 2 n 3 4