Digital Signal Processing the Z-Transform
Total Page:16
File Type:pdf, Size:1020Kb
2065-23 Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis 26 October - 20 November, 2009 Digital Signal Processing The z-transform Massimiliano Nolich DEEI Facolta' di Ingegneria Universita' degli Studi di Trieste via Valerio, 10, 34127 Trieste Italy The z-transform See Oppenheim and Schafer, Second Edition pages 94–139, or First Edition pages 149–201. 1 Introduction The z-transform of a sequence xŒn is 1 X.z/ D xŒnzn: nD1 X The z-transform can also be thought of as an operator Zfg that transforms a sequence to a function: 1 ZfxŒngD xŒnzn D X.z/: nD1 X In both cases z is a continuous complex variable. We may obtain the Fourier transform from the z-transform by making the substitution z D ej!. This corresponds to restricting jzjD 1. Also, with z D rej! , 1 1 X.rej! / D xŒn.rej! /n D .xŒnr n/ ej!n: nD1 nD1 X X That is, the z-transform is the Fourier transform of the sequence xŒnr n. For r D 1 this becomes the Fourier transform of xŒn. The Fourier transform therefore corresponds to the z-transform evaluated on the unit circle: 1 z−plane Im z D ej! ! Re Unit circle The inherent periodicity in frequency of the Fourier transform is captured naturally under this interpretation. The Fourier transform does not converge for all sequences — the infinite sum may not always be finite. Similarly, the z-transform does not converge for all sequences or for all values of z. The set of values of z for which the z-transform converges is called the region of convergence (ROC). 1 The Fourier transform of xŒn exists if the sum nD1 jxŒnj converges. However, the z-transform of xŒn is just the Fourier transform of the sequence P xŒnr n. The z-transform therefore exists (or converges) if 1 X.z/ D jxŒnr nj < 1: nD1 X This leads to the condition 1 jxŒnjjzjn < 1 nD1 X for the existence of the z-transform. The ROC therefore consists of a ring in the z-plane: 2 z−plane Im Region of convergence Re In specific cases the inner radius of this ring may include the origin, and the outer radius may extend to infinity. If the ROC includes the unit circle jzjD 1, then the Fourier transform will converge. Most useful z-transforms can be expressed in the form P.z/ X.z/ D ; Q.z/ where P.z/ and Q.z/ are polynomials in z. The values of z for which P.z/ D 0 are called the zeros of X.z/, and the values with Q.z/ D 0 are called the poles. The zeros and poles completely specify X.z/ to within a multiplicative constant. Example: right-sided exponential sequence Consider the signal xŒn D anuŒn. This has the z-transform 1 1 X.z/ D anuŒnzn D .az1/n: nD1 nD0 X X Convergence requires that 1 jaz1jn < 1; nD0 X which is only the case if jaz1j <1, or equivalently jzj > jaj. In the ROC, the 3 series converges to 1 1 z X.z/ D .az1/n D D ; jzj > jaj; 1 az1 z a nD0 X since it is just a geometric series. The z-transform has a region of convergence for any finite value of a. z−plane Im unit circle a Re 1 The Fourier transform of xŒn only exists if the ROC includes the unit circle, which requires that jaj <1. On the other hand, if jaj >1 then the ROC does not include the unit circle, and the Fourier transform does not exist. This is consistent with the fact that for these values of a the sequence anuŒn is exponentially growing, and the sum therefore does not converge. Example: left-sided exponential sequence Now consider the sequence xŒn DanuŒn 1. This sequence is left-sided because it is nonzero only for n 1. The z-transform is 1 1 X.z/ D anuŒn 1zn D anzn nD1 nD1 X1 1 X D anzn D 1 .a1z/n: nD1 nD0 X X 4 For ja1zj <1, or jzj < jaj, the series converges to 1 1 z X.z/ D 1 D D ; jzj < jaj: 1 a1z 1 az1 z a z−plane Im unit circle a Re 1 Note that the expression for the z-transform (and the pole zero plot) is exactly the same as for the right-handed exponential sequence — only the region of convergence is different. Specifying the ROC is therefore critical when dealing with the z-transform. Example: sum of two exponentials 1 n 1 n The signal xŒn D 2 uŒn C 3 uŒn is the sum of two real exponentials. The z-transform is 1 1 n 1 n X.z/ D uŒn C uŒn zn 2 3 nD1 X 1 1 n 1 1 n D uŒnzn C uŒnzn 2 3 nD1 nD1 X X 1 1 n 1 1 n D z1 C z1 : 2 3 nD0 nD0 X X From the example for the right-handed exponential sequence, the first term in this sum converges for jzj > 1=2, and the second for jzj > 1=3. The combined transform X.z/ therefore converges in the intersection of these regions, namely 5 when jzj > 1=2. In this case 1 1 2z.z 1 / X.z/ D C D 12 : 1 1 1 1 1 1 1 2 z 1 C 3 z .z 2 /.z C 3 / The pole-zero plot and region of convergence of the signal is z−plane Im unit circle 1 Re 1 1 1 3 12 2 Example: finite length sequence The signal an 0 n N 1 xŒn D 80 otherwise < has z-transform : N 1 N 1 X.z/ D anzn D .az1/n nD0 nD0 X X 1 .az1/N 1 zN aN D D : 1 az1 zN 1 z a Since there are only a finite number of nonzero terms the sum always converges when az1 is finite. There are no restrictions on a (jaj < 1), and the ROC is the entire z-plane with the exception of the origin z D 0 (where the terms in the sum are infinite). The N roots of the numerator polynomial are at j.2k=N / zk D ae ; k D 0;1;:::;N 1; 6 since these values satisfy the equation zN D aN . The zero at k D 0 cancels the pole at z D a, so there are no poles except at the origin, and the zeros are at j.2k=N / zk D ae ; k D 1;:::;N 1: 2 Properties of the region of convergence The properties of the ROC depend on the nature of the signal. Assuming that the signal has a finite amplitude and that the z-transform is a rational function: The ROC is a ring or disk in the z-plane, centered on the origin (0 rR < jzj < rL 1). The Fourier transform of xŒn converges absolutely if and only if the ROC of the z-transform includes the unit circle. The ROC cannot contain any poles. If xŒn is finite duration (ie. zero except on finite interval 1 < N1 n N2 < 1), then the ROC is the entire z-plane except perhaps at z D 0 or z D 1. If xŒn is a right-sided sequence then the ROC extends outward from the outermost finite pole to infinity. If xŒn is left-sided then the ROC extends inward from the innermost nonzero pole to z D 0. A two-sided sequence (neither left nor right-sided) has a ROC consisting of a ring in the z-plane, bounded on the interior and exterior by a pole (and not containing any poles). The ROC is a connected region. 7 3 The inverse z-transform Formally, the inverse z-transform can be performed by evaluating a Cauchy integral. However, for discrete LTI systems simpler methods are often sufficient. 3.1 Inspection method If one is familiar with (or has a table of) common z-transform pairs, the inverse can be found by inspection. For example, one can invert the z-transform 1 1 X.z/ D ; jzj > ; 1 1 1 2 z ! 2 using the z-transform pair Z 1 anuŒn ! ; for jzj > jaj: 1 az1 By inspection we recognise that 1 n xŒn D uŒn: 2 Also, if X.z/ is a sum of terms then one may be able to do a term-by-term inversion by inspection, yielding xŒn as a sum of terms. 3.2 Partial fraction expansion For any rational function we can obtain a partial fraction expansion, and identify the z-transform of each term. Assume that X.z/ is expressed as a ratio of polynomials in z1: M b zk X.z/ D kD0 k : N k PkD0 akz P 8 It is always possible to factor X.z/ as b M .1 c z1/ X.z/ D 0 kD1 k ; a N 1 0 QkD1.1 dkz / where the ck’s and dk’s are the nonzeroQ zeros and poles of X.z/. If M < N and the poles are all first order, then X.z/ can be expressed as N Ak X.z/ D 1 : 1 dkz kXD1 In this case the coefficients Ak are given by A D .1 d z1/X.z/ k k zDdk : ˇ If M N and the poles are all first order, thenˇ an expansion of the form M N N A X.z/ D B zr C k r 1 d z1 rD0 k X kXD1 can be used, and the Br ’s be obtained by long division of the numerator by the denominator.