Calculating The Inverse Z-Transform

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10
At a glance
Powered by AI
The key takeaways are the three methods to calculate the inverse z-transform which are the direct method using contour integration, expansion into a series of terms z/z-1, and partial fraction expansion. The Cauchy-Residue Theorem is also introduced which uses residues of functions to calculate integrals around closed paths in the complex plane. Lastly, the power series expansion method is described which uses long division to find the inverse z-transform.

The three methods to calculate the inverse z-transform are: 1) Direct Method by contour integration 2) Expansion into a series of terms z/z-1 3) Partial Fraction expansion and look-up table.

The Cauchy-Residue Theorem states that if a function f(z) has no poles inside a closed contour C, then the integral of f(z) around C is equal to the sum of the residues of the poles inside C. It can be used to calculate the inverse z-transform by finding the residues of functions at their poles.

21

Lecture 5
Calculating the Inverse Z-Transform

x(n ) =

1 n 1 X ( z ) z dz Three methods to calculate it: 2j

1) Direct Method by contour integration 2) Expansion into a series of terms z/z-1 3) Partial Fraction expansion and look-up table.

Cauchy-Residue Theorem Let f(z) be a function of the complex variable z and C be a closed path in the z-plane. If the derivative

d f ( z ) exists on and inside the contour C and if f(z) has no poles at z = z0, then dz

f ( z 0 ) if z 0 is inside C 1 f (z ) (z z )dz = 0 else 2j c 0 More generally:


1 1 f (z ) (z z )k dz = (k 1)! 2j c 0 0 d k 1 f ( z ) dz k 1
z = z0

if z0 inside C

else

RHS of the above equation is called residue of the pole zo. Now suppose the function can be written as f (z ) where f(z) has no poles inside C and g(z) is a g (z )

polynomial with simple roots z1, z2, , zn inside C. Then,


n n f (z ) 1 1 n Ai ( z ) 1 Ai ( z ) dz = dz = Ai ( zi ) , dz = z zi 2j g ( z ) 2j i =1 z zi i =1 2j i =1 c c

where Ai ( z ) = ( z zi )

f (z ) . g (z )
z = zi

N 1 n 1 n 1 x(n ) = x(z )z dz = (z zi )X (z )z 2j i =1

= sum at residue of x(z)zn-1 at z = zi and N =

number of poles.
Example: Problem 3.56 (C)

22

X (z ) =
x(n ) = z=r>

za 1 az

z >

1 a

1 1 1 za z a n1 n 1 1 az z dz = 2j a z 1 a z dz 2j c c 1 This is the contour C. a

Three cases: 1) For n 1 then f ( z ) =

1 (z a )z n1 and the only pole inside c is 1 . Therefore, for n 1 a a


1 a

1 (z a )z n1 x(n ) = a

z=

1 1 1 = a a a a 1 = a
n 1

n 1

1 a

n +1

2) For n = o x(n ) = then, f ( z ) =


x(n ) =

1 za z (1 az ) dz 2j

1 ( z a ) and two poles (0 and 1 ) inside C. Therefore, a a


z =o

1 (z a ) a z 1a

1 (z a ) a z

z=

1 a

1 a

3) For n < 0, x(n ) =

1 1 z a 1 a z 1 a z (n1) dz 2j c

Therefore, it has a pole at zero with order of (n1) and a pole at 1/a. Since ROC z >

1 x(n ) is right-sided and therefore, it is enough to find where it reaches the zero a

on the left side. x( 1) = 1 1 z a 1 z a dz = 2 2j a z ( z 1 a ) a z2


1 z= a

d za dz z 1 a

z =o

= 0

With the same method, we can prove that x(-2)=x(-3)==0 .

23

The Inverse z-Transform by Power Series Expansion

The method is to use long division. How to divide. Example:


X (z ) =

1 1 z2 = = 2 1 z 1 1 2 z 1 1 3 z 1 + 2 z 2 z 3 z + 2

)(

It has two poles: z = 1 and z = 2. Therefore, if the signal is casual, then ROC: |z| > 2 and if the signal is non-casual, ROC: |z| < 1. Case 1: ROC: |z| > 2 signal is casual and therefore X ( z ) = x(n ) z n has terms with negative power
n =o

for z. Therefore, we divide as: 1 + 3z 1 + 7 z 2 + 15 z 3 + 317 4 + ... 1 1 3z 1 + 2 z 2 1 3z 1 + 2 z 2 0 + 3z 1 2 z 2 3z 1 9 z 2 + 6 z 3 0 7 z 2 6 z 3 7 z 2 21z 3 + 14 z 4 0 + 15 z 3 14 z 4 15 z 3 45 z 4 + 30 z 5 + 32 z 4 30 z 5

x(n) = {1, 3, 7, 15, 31,}

Case 2: ROC: |z| < 1 signal is non-casual X ( z ) = x(n ) z n has terms with positive

powers of z. Therefore, we divide in a way to get z with positive powers.

24

1 2 3 3 7 4 z + z + z + ... 2 4 8 1 2 z 2 3 1 1 2 z + z 2 2 3 z 1 + 1 3 1 2 0+ z z 2 2 3 9 3 z z2 + z3 2 4 4 7 2 3 3 0+ z z 4 4 1

7 3 1 x(n ) = ..., , , , 0, 0 8 4 2

Question: How would you use this method for a case like ROC: 1 < |z| < 2?

The Inverse z-Transform by Partial- Fraction Expansion

X (z ) =

N (z ) The goal is to write it in the form D( z ) X (z ) = A3 AN A1 A2 + + + ... + 1 1 1 (1 p1 z ) (1 p2 z ) (1 p3 z ) (1 p N z 1 )

Let X ( z ) =

b0 + b1 z 1 + .... + bM z M . If it is an improper rational function (M > N) then the 1 + a1 z 1 + a2 z 2 + ... + a N z N N1 ( z ) , where now the degree of N1(z) is less than N. D( z )

first step is to write it as: X ( z ) = c0 + c1 z 1 + ..... + cM N z ( M N ) +

The inverse z-transformation of c0 + c1z-1 + . is very straight-forward. Next step is to write N1 ( z ) N (z ) or in general a proper function , where M < N, in terms of positive powers of z, D( z ) D( z ) factorize denominator and then write X (z ) in terms of partial fractions. In general, lets assume z

an X(z) has N simple poles and L multiple poles at k = j. Then:


A j1 Aj 2 A jl X (z ) A1 A2 AN = + + .... + + + .... + + ... 2 l z z p1 z p2 z p j (z p j ) (z p j ) (z PN )

25

Then Ak =

( z pk ) X ( z )
z

z = pk

k = 1, 2, ., n excluding k = j and

k d l k ( z pi ) X ( z ) A jk = l k , k = 1, 2, ..,l d z z

Then
n ( pk ) u (n ) ROC : z > pk 1 Z = N 1 1 pk z ( pk ) u ( n 1) ROC : z < pk 1

Example

X (z ) =

1 1 1.5 z 1 + 0.5 z 2

( z 1) (z 12 )
A1 A2 + z 1 z 1 = 1 =2 1 2
2 = 1 1 2 1

z2

X (z ) z = z (z 1) z 1

A1 = ( z 1)

X (z ) z

z =1

A2 = z 1

) X z(z ) 2

z= 1

=
2

2 1 2 1 = X (z ) = z 1 z 1 z 1 1 z 1 1 z 1 2 2

Now depending on ROC, we get different x(n).

1) ROC: |z| > 1 casual


n x(n ) = 2(1) u (n ) 1

( 2 ) u(n) = (2 0.5 )u(n)


n n

2) ROC: |z| < non-casual and left-sided


x(n ) = 2(1) u ( n 1) + 0.5n u ( n 1)
n

= 2 + 0.5n u ( n 1)

3)

1 < z < 1 non-casual and two-sided 2

26

x(n ) = 2(1) u ( n 1) (0.5) u (n )


n n

One-Sided Z Transform

One-sided Z Transform is defined as X + ( z ) = x(n ) z n = x(n ) u (n )z n . It does not contain


n =o

information about x(n) for n < 0. It is unique only for the causal signals that are zero for n < 0. It is useful to solve difference equations of the systems that are not relaxed initially, but the input is not necessarily zero before applying to the system. Properties
k Z+ Z+ If x(n ) X + ( z ) then x(n k ) z k X + ( z ) + x( n )z n , k > o n =1

Proof: Z + {x(n k )} = x(n k ) z n . Let n k = l then n = 0 l = -k and also -n = -l k.


n =o

= x(l ) z l z K
l=K

1 l K = z K x l z + x(l )z l = z K x( n ) z n + X + ( z ) { o l =4 4 n =1 l = K n 1 2 3 x (z )
+

k 1 Z+ Time Advance: x(n + k ) z k X + ( z ) x(n ) z n , k > 0 n =o

Final Value Theorem: lim x(n ) = lim ( z 1) X + ( z )


n z 1

This limit exists if the ROC of (z-1)X+(z) includes the unit circle. This can be proved by the following analogy. If the limit lim n x ( n ) exists, then the function x(n) can be written as x(n) = c + f (n), where lim x(n) = c and lim f (n) = 0 . Then take the one
n n

sided Z-Transform from both sides and prove the theorem.


Analysis of the Systems in Z-Domain

Without too much restriction, lets assume x( z ) = N (z ) B( z ) and H ( z ) = Q( z ) A( z )

27

Y (z ) =

B( z ) N ( z ) . If the system is relaxed, the initial condition = o Q( z ) A( z )


N k N (z ) where N 0 ( z ) = ak z k y ( n ) z n Y + (z ) = H (z ) x(z ) + o 1 24 4 3 A( z ) k =1 n =1 Y zs ( z ) 13 2
+ Y zi ( z )

If the system is not relaxed, then

H(z) has p1, ., pN poles and X(z) has q1,., qL poles.

First lets assume that the poles are distinct and not common. Then
Y (z ) =
N L Ak Qk + k k k =1 1 q k z k =1 1 P z k N

y (n ) = Ak Pk u (n ) + Qk (qk ) u (n ) k =1 k =1 14 244 4 3 14 244 4 3


n n natural response force response

( )

Note that natural response zero-input response. It is in fact the no-input response.
Example

y (n ) =

1 n y (n 1) + x(n ) Find the output when x(n ) = 10 cos u (n ) 2 4

Solution

Y (z ) =

1 1 z Y (z ) + X (z ) 2
1 1 1 z 1 2
P=1 1

H (z ) =

101 1 z 1 2 q = e j / 4 However, X ( z ) = 1 1 2 1 2z + z

* q2 = q1 = e j / 4

6.3 6.78e j 28.7 6.78e j 28.7 Y ( z ) = H ( z ) x( z ) = + + 1 1 124 1 1 e j / 4 z 4 1 e j / 4 41 14 / 2 z3 14444 24444z3


o o

natrual response

force response

1 ynr (n ) = 6.3 u (n ) 2 y fr (n ) = 13.5 cos n 28.7 o u (n ) 4

28

Testing it with MATLAB:

Y (z ) = 1

101 1 z 1 2 2 2 1 3 z z 2 + 1 z 1 + 1 2 2 2

2 1 , ; b = 10,10 / 2 ; a = 1, 2 + 1 , 1 + 2 2 2 [R, P, K] = residuez (b, a)


5.9537 3.2562i R = 5.9537 + 3.2562i 1.9074 0.7071 + 0.7071i P = poles 0.7071 0.7071i K = [ ] 0 .5

norm (R (1)) = 6.78 angle (R (1)) = -0.5005 rad = - 28.7o zplane (b, a) % plots the zero-poles

Example of a Non-Relaxed System

y (n )

3 1 y (n 1) + y (n 2 ) = x(n ) 2 2
n

n0

1 x(n ) = u (n ) find y(n) if y (-1) = 4 and y (-2) = 10 4


Solution

Taking Z+ from both sides:


Y + (z ) 3 1 1 y ( 1) + z 1Y + ( z ) + y ( 2 ) + z 1 y ( 1) + z 2Y + (z ) z 2 = X ( z ) = 2 2 1 1 z 1 4

] [

1 1 3 Y + ( z )1 z 1 + z 2 = + 1 2 z 1 1 2 1 1 z 2 4
2 2 9 z 1 + 1 z 2 4 2 . z Finally: Y ( z ) = 1 3 z 1 + 1 z 2 1 1 4 z 1 2 2 +

or Y + ( z ) =

2 1 3 + + 1 z 1 1 z 1 1 1 2

3 1 z 1 4

29

1 n 2 1 + y (n ) = + 3 2 43 123 4 natural response

1 u (n ) 43 2 1 force response
n

Note that natural response is due to system poles and force response is due to the input poles. Transient response is due to the poles inside the unit circle and steady-state response is due to poles on the unit circle. In this case, 1 1 n 1 n Transient Response + u (n) 3 4 2 and Steady-State Response 2 u ( n) . 3

Zero-Input (or Initial condition) Response is: YZI ( z ) = H ( z ). X IC ( z ) and Zero-State Response is: YZS ( z ) = H ( z ). X ( z ) . In this case,
n 1 1 n 1 8 y zs (n) = 2 + u (n) 3 2 3 4

1 n and y zi (n) = 3 2u (n) . 2 Note that complete response is either Transient Response+Steady-State Response, or Natural Response + Force Response, or Zero-Input Response + Zero-State Response. Each response emphasizes a different aspect of system analysis.

Checking with MatLab: n = [0: 7]; % just checking the first 8 samples

1 x = n; xic = [1, -2] % terms due to initial conditions (1 2z-1) 4


b = [1, 0]; a = 1 3

1 ; 2

y1 = filter (b, a, x, xic); 2 y = 1 * 1 n + 1 n + * ones(1,8) ; 3 4 2 3

( )( )

30

Since y and y1 are the same, then our solution is correct! However, for large order difference equations, it is tedious to determine xic(n) analytically. MatLab command filtic does find xic as well. Xic = filtic (b, a, Y, x) where Y and x are initial conditions. Y = [y(-1), y(-2), , y(-N)] x = [x(-1), x(-2), , x(-M)] If x(n) = 0 for n < -1, then x need not to be defined. In our example: Y = [4, 10]; Xic = 1, -2

Causality and Stability

If h(n) = 0, for n < 0, then the system is causal. Then its ROC is the exterior of a circle. The stability of a system is quarantined by the condition that the ROC includes the unit circle. Because the necessary and sufficient condition for a BIBO system is that follows that H ( z ) = circle, H ( z )

n =

h( n) < .

It

n =

h ( n) z n

n =

h ( n) z n =

n =

h( n ) z

. When evaluated on the unit

n =

h(n) . Note that causality and stability are independent of each other. One

doesn't imply the other. However, a causal LTI system is BIBO if and only if all the poles of H(z) are inside the unit circle.

Pole-Zero Cancellation

Example: y(n) = 2.5 y(n - 1) y(n - 2) +x(n) 5x(n 1) + 6 x(n 2) H (z ) =


H (z ) =

1 5 z 1 + 6 z 2 1 2.5 z 1 + z 2
1 1 1 1

(1 2 z )(1 3z ) (1 12 z )(1 2 z )

P1 = 1 , P2 = 2 2 z1 = 3, z 2 = 2

It seems that the pole at 2 is cancelled by zero at 2. So, the system is theoretically stable but not practically. Do problems: 3,6,7,9,15,22 and 43 of Chapter 3.

You might also like