065-3 Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis 6 October - 0 November, 009 Digital Signal Processing The z-transform Massimiliano Nolich DEEI Facolta' di Ingegneria Universita' degli Studi di Trieste via Valerio, 0, 347 Trieste Italy
The z-transform See Oppenheim and Schafer, Second Edition pages 94 39, or First Edition pages 49 0. Introduction The z-transform of a sequence xœn is X nd xœnz n : The z-transform can also be thought of as an operatorfg that transforms a sequence to a function: fxœng D X nd xœnz n D X.z/: 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 e j!. This corresponds to restricting jzj D. Also, with z D re j!, X.re j! / D X nd xœn.re j! / n D X nd.xœnr n / e j!n : That is, the z-transform is the Fourier transform of the sequence xœnr n. For r D this becomes the Fourier transform of xœn. The Fourier transform therefore corresponds to the z-transform evaluated on the unit circle:
z plane Im z D e j!! 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). The Fourier transform of xœn exists if the sum P nd jxœnj converges. However, the z-transform of xœn is just the Fourier transform of the sequence xœnr n. The z-transform therefore exists (or converges) if This leads to the condition X nd X nd jxœnr n j < : jxœnjjzj n < for the existence of the z-transform. The ROC therefore consists of a ring in the z-plane:
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 jzj D, then the Fourier transform will converge. Most useful z-transforms can be expressed in the form P.z/ 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 a n uœn. This has the z-transform Convergence requires that X nd a n uœnz n D X jaz j n < ; nd0 X.az / n : which is only the case if jaz j <, or equivalently jzj > jaj. In the ROC, the nd0 3
series converges to X.az / n D nd0 az D z ; jzj > jaj; z a 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 The Fourier transform of xœn only exists if the ROC includes the unit circle, which requires that jaj <. On the other hand, if jaj > 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 a n uœn is exponentially growing, and the sum therefore does not converge. Example: left-sided exponential sequence Now consider the sequence xœn D a n uœ n. This sequence is left-sided because it is nonzero only for n. The z-transform is X a n uœ n D nd X a n z n D nd z n D X X.a z/ n : nd0 nd a n z n 4
For ja zj <, or jzj < jaj, the series converges to a z D az D z ; jzj < jaj: z a z plane Im unit circle a Re 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 The signal xœn D n uœn C n 3 uœn is the sum of two real exponentials. The z-transform is X n n uœn C uœn z n 3 nd X n X n D uœnz n C uœnz n 3 nd nd X n X n D z C 3 z : nd0 nd0 From the example for the right-handed exponential sequence, the first term in this sum converges for jzj > =, and the second for jzj > =3. The combined transform X.z/ therefore converges in the intersection of these regions, namely 5
when jzj > =. In this case z C C 3 z D z.z /.z /.z C 3 /: The pole-zero plot and region of convergence of the signal is z plane Im unit circle 3 Re Example: finite length sequence The signal 8 < a n 0 n N xœn D : 0 otherwise has z-transform D NX nd0 NX a n z n D.az / n nd0.az / N az D z N z N a N z a : Since there are only a finite number of nonzero terms the sum always converges when az is finite. There are no restrictions on a (jaj < ), 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 z k D ae j.k=n / ; k D 0; ; : : : ; N ; 6
since these values satisfy the equation z N D a N. 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 z k D ae j.k=n / ; k D ; : : : ; N : 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 r R < jzj < r L ). 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 < N n N < ), then the ROC is the entire z-plane except perhaps at z D 0 or z D. 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. 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! ; jzj > ; using the z-transform pair a n uœn By inspection we recognise that! az xœn D z ; for jzj > jaj: n uœn: 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. 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 z : P M kd0 b kz k P N kd0 a kz : k 8
It is always possible to factor X.z/ as b 0 a 0 Q M kd. c kz / Q N kd. d kz / ; where the c k s and d k s are the nonzero zeros and poles of X.z/. If M < N and the poles are all first order, then X.z/ can be expressed as NX kd In this case the coefficients A k are given by A k d k z : A k D. d k z /X.z/ˇˇzDdk : If M N and the poles are all first order, then an expansion of the form X M N rd0 B r z r C NX kd A k d k z can be used, and the B r s be obtained by long division of the numerator by the denominator. The A k s can be obtained using the same equation as for M < N. The most general form for the partial fraction expansion, which can also deal with multiple-order poles, is X M N rd0 B r z r C NX kd;k i A k sx d k z C md C m. d i z / m : Ways of finding the C m s can be found in most standard DSP texts. The terms B r z r correspond to shifted and scaled impulse sequences, and invert to terms of the form B r ıœn r. The fractional terms A k d k z 9
correspond to exponential sequences. For these terms the ROC properties must be used to decide whether the sequences are left-sided or right-sided. Example: inverse by partial fractions Consider the sequence xœn with z-transform C z C z 3 z C z D. C z /. z ; jzj > : /. z / Since M D N D this can be expressed as B 0 C A The value B 0 can be found by long division: z C A z : z 3 z C z Cz C z 3z C 5z so C 5z C. z /. z / : The coefficients A and A can be found using A k D. d k z /X.z/ˇˇzDdk ; so and Therefore A D C z C z z ˇ A D C z C z ˇ z ˇz D ˇz D D C 4 C 4 D C C = 9 z C 8 z : D 9 D 8: 0
Using the fact that the ROC is jzj >, the terms can be inverted one at a time by inspection to give xœn D ıœn 9.=/ n uœn C 8uŒn: 3.3 Power series expansion If the z-transform is given as a power series in the form X nd xœnz n D : : : C xœ z C xœ z C xœ0 C xœz C xœz C : : : ; then any value in the sequence can be found by identifying the coefficient of the appropriate power of z. Example: finite-length sequence The z-transform z. can be multiplied out to give z /. C z /. z / z z C z : By inspection, the corresponding sequence is therefore 8 n D xœn D ˆ< n D n D 0 n D ˆ: 0 otherwise
or equivalently xœn D ıœn C Example: power series expansion Consider the z-transform ıœn C ıœn C ıœn : log. C az /; jzj > jaj: Using the power series expansion for log. C x/, with jxj <, gives X. / nc a n z n : n nd The corresponding sequence is therefore 8 <. / nc an n n xœn D : 0 n 0: Example: power series expansion by long division Consider the transform az ; jzj > jaj: Since the ROC is the exterior of a circle, the sequence is right-sided. We therefore divide to get a power series in powers of z : or az az Caz Ca z C az az a z a z C az D C az C a z C :
Therefore xœn D a n uœn. Example: power series expansion for left-sided sequence Consider instead the z-transform ; jzj < jaj: az Because of the ROC, the sequence is now a left-sided one. Thus we divide to obtain a series in powers of z: a C z z z a z a z a z az Thus xœn D a n uœ n. 4 Properties of the z-transform In this section, if X.z/ denotes the z-transform of a sequence xœn and the ROC of X.z/ is indicated by R x, then this relationship is indicated as xœn!x.z/; ROC D Rx : Furthermore, with regard to nomenclature, we have two sequences such that x Œn!X.z/; ROC D R x x Œn!X.z/; ROC D R x : 4. Linearity The linearity property is as follows: ax Œn C bx Œn!aX.z/ C bx.z/; ROC containsr x \ R x : 3
4. Time shifting The time-shifting property is as follows: xœn n 0!z n 0 X.z/; ROC D R x : (The ROC may change by the possible addition or deletion of z D 0 or z D.) This is easily shown: Y.z/ D X nd D z n 0 xœn X md n 0 z n D Example: shifted exponential sequence Consider the z-transform z X md xœmz m D z n 0 X.z/: ; jzj > 4 : 4 xœmz.mcn 0/ From the ROC, this is a right-sided sequence. Rewriting,! z 4 z D z 4 z ; jzj > 4 : The term in brackets corresponds to an exponential sequence.=4/ n uœn. The factor z shifts this sequence one sample to the right. The inverse z-transform is therefore xœn D.=4/ n uœn : Note that this result could also have been easily obtained using a partial fraction expansion. 4
4.3 Multiplication by an exponential sequence The exponential multiplication property is z n 0 xœn!x.z=z0 /; ROC D jz 0 jr x ; where the notation jz 0 jr x indicates that the ROC is scaled by jz 0 j (that is, inner and outer radii of the ROC scale by jz 0 j). All pole-zero locations are similarly scaled by a factor z 0 : if X.z/ had a pole at z D z, then X.z=z 0 / will have a pole at z D z 0 z. If z 0 is positive and real, this operation can be interpreted as a shrinking or expanding of the z-plane poles and zeros change along radial lines in the z-plane. If z 0 is complex with unit magnitude (z 0 D e j! 0) then the scaling operation corresponds to a rotation in the z-plane by and angle! 0. That is, the poles and zeros rotate along circles centered on the origin. This can be interpreted as a shift in the frequency domain, associated with modulation in the time domain by e j! 0n. If the Fourier transform exists, this becomes e j! 0n xœn F!X.e j.!! 0 / /: Example: exponential multiplication The z-transform pair uœn! z ; jzj > can be used to determine the z-transform of xœn D r n cos.! 0 n/uœn. Since cos.! 0 n/ D =e j! 0n C =e j! 0n, the signal can be rewritten as xœn D.rej! 0 / n uœn C.re j! 0 / n uœn: 5
From the exponential multiplication property, so.rej! 0 / n uœn.re j! 0 / n uœn D 4.4 Differentiation The differentiation property states that! = re j! 0 z ; jzj > r =! ; jzj > r; re j! 0 z = re C = j! 0 z re ; jzj > r j! 0 z r cos! 0 z ; jzj > r: r cos! 0 z C r z nxœn! This can be seen as follows: since we have z dx.z/ dz D z X nd Example: second order pole The z-transform of the sequence z dx.z/ dz ; ROC D R x: X nd. n/xœnz n D xœnz n ; xœn D na n uœn X nd nxœnz n DfnxŒng: can be found using a n uœn! az ; jzj > a; 6
to be z d dz D az az ; jzj > a:. az / 4.5 Conjugation This property is x Œn!X.z /; ROC D R x : 4.6 Time reversal Here x Œ n!x.=z /; ROC D R x : The notation =R x means that the ROC is inverted, so if R x is the set of values such that r R < jzj < r L, then the ROC is the set of values of z such that =r l < jzj < =r R. Example: time-reversed exponential sequence The signal xœn D a n uœ n is a time-reversed version of a n uœn. The z-transform is therefore az D a z a z ; jzj < ja j: 4.7 Convolution This property states that x Œn x Œn!X.z/X.z/; ROC containsr x \ R x : 7
Example: evaluating a convolution using the z-transform The z-transforms of the signals x Œn D a n uœn and x Œn D uœn are and X.z/ D X.z/ D X a n z n D nd0 X z n D nd0 az z ; jzj > jaj ; jzj > : For jaj <, the z-transform of the convolution yœn D x Œn x Œn is Y.z/ D. az /. z / D z ; jzj > :.z a/.z / Using a partial fraction expansion, Y.z/ D a so 4.8 Initial value theorem If xœn is zero for n < 0, then a z az yœn D a.uœn anc uœn/: xœ0 D lim z! X.z/: ; jzj > ; 8
Some common z-transform pairs are: Sequence Transform ROC ıœn All z uœn jzj > z uœ n jzj < z ıœn m z m All z except 0 or a n uœn a n uœ n na n uœn na n uœ n 8 < a n 0 n N ; : 0 otherwise cos.! 0 n/uœn r n cos.! 0 n/uœn az jzj > jaj az jzj < jaj az. az / jzj > jaj az. az / jzj < jaj a N z N az jzj > 0 cos.! 0 /z cos.! 0 /z Cz jzj > r cos.! 0 /z r cos.! 0 /z Cr z jzj > r 4.9 Relationship with the Laplace transform Continuous-time systems and signals are usually described by the Laplace transform. Letting z D e st, where s is the complex Laplace variable s D d C j!; we have Therefore z D e.dcj!/t D e dt e j!t : jzj D e dt and ^z D!T D f=f s D!=! s ; 9
where! s is the sampling frequency. As! varies from to, the s-plane is mapped to the z-plane: The j! axis in the s-plane is mapped to the unit circle in the z-plane. The left-hand s-plane is mapped to the inside of the unit circle. The right-hand s-plane maps to the outside of the unit circle. 0