“JUST THE MATHS” UNIT NUMBER 16.8 Z-TRANSFORMS 1 (Definition and rules) by A.J.Hobson 16.8.1 16.8.2 16.8.3 16.8.4 16.8.5 Introduction Standard Z-Transform definition and results Properties of Z-Transforms Exercises Answers to exercises UNIT 16.8 - Z TRANSFORMS 1 - DEFINITION AND RULES 16.8.1 INTRODUCTION - Linear Difference Equations Closely linked with the concept of a linear differential equation with constant coefficients is that of a “linear difference equation with constant coefficients”. Two particular types of difference equation to be discussed in the present section may be defined as follows: DEFINITION 1 A first-order linear difference equation with constant coefficients has the general form, a1 un+1 + a0 un = f (n), where a0 , a1 are constants, n is a positive integer, f (n) is a given function of n (possibly zero) and un is the general term of an infinite sequence of numbers, {un } ≡ u0 , u1 , u2 , u3 , . . . . DEFINITION 2 A second-order linear difference equation with constant coefficients has the general form, a2 un+2 + a1 un+1 + a0 un = f (n), where a0 , a1 , a2 are constants, n is an integer, f (n) is a given function of n (possibly zero) and un is the general term of an infinite sequence of numbers, {un } ≡ u0 , u1 , u2 , u3 , . . . . Notes: (i) We shall assume that the sequences under discussion are such that un = 0 whenever n < 0. (ii) Difference equations are usually associated with given “boundary conditions”, such as the value of u0 for a first-order equation or the values of u0 and u1 for a second-order equation. ILLUSTRATION Certain simple difference equations may be solved by very elementary methods. 1 For example, suppose that we wish to solve the difference equation, un+1 − (n + 1)un = 0, subject to the boundary condition that u0 = 1. We may rewrite the difference equation as un+1 = (n + 1)un and, by using this formula repeatedly, we obtain u1 = u0 = 1, u2 = 2u1 = 2, u3 = 3u2 = 3 × 2, u4 = 4u3 = 4 × 3 × 2, . . . . In general, for this illustration, un = n!. However, not all difference equations can be solved as easily as this and we shall now discuss the Z-Transform method of solving more advanced types. 16.8.2 STANDARD DEFINITION AND RESULTS THE DEFINITION OF A Z-TRANSFORM (WITH EXAMPLES) The Z-Transform of the sequence of numbers, {un } ≡ u0 , u1 , u2 , u3 , . . . ., is defined by the formula, Z{un } = ∞ X ur z −r , r=0 provided that the series converges (allowing for z to be a complex number if necessary). EXAMPLES 1. Determine the Z-Transform of the sequence, {un } ≡ {an }, where a is a non-zero constant. 2 Solution Z{an } = ∞ X ar z −r . r=0 That is, Z{an } = 1 + a a2 a3 1 + 2+ 3+ .... = z z z 1− = a z z , z−a by properties of infinite geometric series. Thus, Z{an } = z . z−a 2. Determine the Z-Transform of the sequence, {un } = {n}. Solution Z{n} = ∞ X rz −r . r=0 That is, Z{n} = 1 2 3 4 + 2+ 3+ 4+ ...., z z z z which may be rearranged as 1 1 1 1 1 1 1 1 Z{n} = + 2+ 3+ .... + 2+ 3+ 4+ .... + 3+ 4+ .... , z z z z z z z z giving Z{n} = 1 z 1− 1 z + 1 z2 1− 1 z + 1 z3 1− 1 z 1 + ....= 1− by properties of infinite geometric series. Thus, Z{n} = z z = . 2 (1 − z) (z − 1)2 3 " 1 z 1 z 1− # 1 z , Note: Other Z-Transforms may be obtained, in the same way as in the above examples, from the definition. We list, here, for reference, a short table of standard Z-Transforms, including those already proven: A SHORT TABLE OF Z-TRANSFORMS {un } Z{un } Region of Existence {1} z z−1 |z| > 1 {an } (a constant) z z−a |z| > |a| {n} z (z−1)2 |z| > 1 z z−e−T |z| > e−T sin nT (T constant) z sin T z 2 −2z cos T +1 |z| > 1 cos nT (T constant) z(z−cos T ) z 2 −2z cos T +1 |z| > 1 1 for n = 0 0 for n > 0 (Unit pulse sequence) 1 All z 0 for n = 0 {an−1 } for n > 0 1 z−a |z| > |a| n e−nT o (T constant) 4 16.8.3 PROPERTIES OF Z-TRANSFORMS (a) Linearity If {un } and {vn } are sequences of numbers, while A and B are constants, then Z{Aun + Bvn } ≡ A.Z{un } + B.Z{vn }. Proof: The left-hand side of the above identity is equivalent to ∞ X (Aur + Bvr )z −r ≡ A r=0 ∞ X ur z −r + B r=0 ∞ X vr z −r , r=0 which, in turn, is equivalent to the right-hand side. EXAMPLE Z{5.2n − 3n} = 3z 5z − . z − 2 (z − 1)2 (b) The First Shifting Theorem 1 Z{un−1 } ≡ .Z{un }, z where {un−1 } denotes the sequence whose first term, corresponding to n = 0, is taken as zero and whose subsequent terms, corresponding to n = 1, 2, 3, 4, . . . ., are the terms u0 , u1 , u3 , u4 , . . . of the original sequence. Proof: The left-hand side of the above identity is equivalent to ∞ X r=0 ur−1 z −r ≡ u0 u 1 u 2 u3 + 2 + 3 + 4 + . . . ., z z z z 5 since it is assumed that un = 0 whenever n < 0. Thus, 1 u1 u 2 u 3 Z{un−1 } ≡ . u0 + + 2+ 3+ .... , z z z z which is equivalent to the right-hand side. Note: A more general form of the first shifting theorem states that Z{un−k } ≡ 1 .Z{un }, zk where {un−k } denotes the sequence whose first k terms, corresponding to n = 0, 1, 2, . . . . , k − 1, are taken as zero and whose subsequent terms, corresponding to n = k, k + 1, k + 2, . . . . are the terms u0 , u1 , u2 , . . . . of the original sequence. ILLUSTRATION Given that {un } ≡ {4n }, we may say that Z{un−2 } ≡ 1 1 z 1 .Z{u } ≡ . ≡ . n z2 z2 z − 4 z(z − 4) Note: In this illustration, the sequence, {un−2 } has terms 0, 0, 1, 4, 42 , 43 , . . . and, by applying the definition of a Z-Transform directly, we would obtain Z{un−2 } = 1 4 42 43 + + + . . . ., z2 z3 z4 z5 which gives Z{un } ≡ 1 1 . 2 z 1− by properties of infinite geometric series. 6 4 z ≡ 1 , z(z − 4) (c) The Second Shifting Theorem Z{un+1 } ≡ z.Z{un } − z.u0 Proof: The left-hand side of the above identity is equivalent to ∞ X r=0 ur+1 z −r ≡ u1 + u2 u3 u 4 + 2+ 4+ .... z z z This may be rearranged as u1 u2 u3 u 4 z. u0 + + 2 + 3 + 4 + . . . . − z.u0 z z z z which, in turn, is equivalent to the right-hand side. Note: This “recursive relationship” may be applied repeatedly. For example, we may deduce that Z{un+2 } ≡ z.Z{un+1 } − z.u1 ≡ z 2 .Z{un } − z 2 .u0 − z.u1 16.8.4 EXERCISES 1. Determine, from first principles, the Z-Transforms of the following sequences, {un }: (a) {un } ≡ {e−n }; (b) {un } ≡ {cos πn}. 7 2. Determine the Z-Transform of the following sequences: (a) {un } ≡ {7.(3)n − 4.(−1)n } ; (b) n o {un } ≡ 6n + 2e−5n ; (c) {un } ≡ {13 + sin 2n − cos 2n} . 3. Determine the Z-Transform of {un−1 } and {un−2 } for the sequences in question 1. 4. Determine the Z-Transform of {un+1 } and {un+2 } for the sequences in question 1. 16.8.5 ANSWERS TO EXERCISES 1. (a) ez ; ez − 1 (b) z . z+1 2. (a) 7z 4z − ; z−3 z+1 (b) 6z 2z + ; 2 (z − 1) z − e−5 (c) 13z z(sin 2 + cos 2 − z) + 2 . z−1 z − 2z cos 2 + 1 8 3. (a) Z{un−1 } ≡ e (n > 0), ez − 1 Z{un−2 } ≡ e (n > 1); z(ez − 1) 1 (n > 0), z+1 Z{un−2 } ≡ 1 (n > 1). z(z + 1) z , ez − 1 Z{un+2 } ≡ z ; e(ez − 1) (b) Z{un−1 } ≡ Note: u−2 = 0 and u−1 = 0. 4. (a) Z{un+1 } ≡ (b) Z{un+1 } ≡ − z z , Z{un+2 } ≡ . z+1 z+1 9