INVERSION OF THE z-TRANSFORM

4.3 INVERSION OF THE z-TRANSFORM

From equation (4.3), the inverse z-transform computation requires an evaluation of a complex contour integral that, in general, is a complicated procedure. The most practical approach is to use the partial fraction ex- pansion method. It makes use of the z-transform Table 4.1 (or similar tables available in many textbooks). The z-transform, however, must be

a rational function. This requirement is generally satisfied in digital signal processing.

Central Idea

• When X(z) is a rational function of z − 1 , it can be expressed as a sum of simple factors using the partial fraction expansion. The individual sequences corresponding to these factors can then be written down using the z-transform table. The inverse z-transform procedure can be summarized as follows:

Method • Given

b − 0 +b 1 z 1 +···+b −M

X(z) =

− 1 −N ,R x − < |z| < R x + (4.12)

1+a 1 z +···+a N z

• express it as

X(z) = −k

1+a 1 z − 1 +···+a N z −N

k =0

Proper rational part

polynomial part if M ≥N

where the first term on the right-hand side is the proper rational part, and the second term is the polynomial (finite-length) part. This can

be obtained by performing polynomial division if M ≥ N using the deconv function. • Perform a partial fraction expansion on the proper rational part of

X(z) to obtain

X(z) = !

M ! −N R

−k

1−p k z − 1

k =1

k =0

M ≥N

Inversion of the z -Transform 113

where p k is the kth pole of X(z) and R k is the residue at p k . It is assumed that the poles are distinct for which the residues are given by

1 z 1 +···+a N z

% z =p k

For repeated poles the expansion (4.13) has a more general form. If a pole p k has multiplicity r, then its expansion is given by

k,ℓ z − (ℓ−1)

R k, 1 R z − k, 2 1 R z − k,r (r−1)

(1 − p k z ) (4.14)

where the residues R k,ℓ are computed using a more general formula, which is available in reference [23].

• assuming distinct poles as in (4.13), write x(n) as

0 1 M ! −N

R k Z − 1 1 x(n) = ! − 1 + C k δ (n − k)

• finally, use the relation from Table 4.1

p n k u(n)

|z k |≤R x −

(4.15) k u(−n − 1) |z k |≥R x +

z−p k

to complete x(n).

A similar procedure is used for repeated poles.

EXAMPLE 4.7

Find the inverse z-transform of x(z) =

X(z) =

X(z) =

2 1−z − 1 − 2 1− 1 z − 1 3

Now, X(z) has two poles: z 1 = 1 and z 2 = 1 3 ; and since the ROC is not specified,

there are three possible ROCs as shown in Figure 4.5.

Chapter 4

THE z -TRANSFORM

Im{z}

Im{z}

Im{z}

Re{z}

Re{z}

Re{z} 0 1/3 1 1/3 1 1/3 1

ROC 1 ROC 2 ROC 3

FIGURE 4.5 The ROCs in Example 4.7

a. ROC 1 : 1 < |z| < ∞. Here both poles are on the interior side of the ROC 1 ;

that is, |z 1 |≤R x− = 1 and |z 2 | ≤ 1. Hence from (4.15)

x 1 (n) = u(n) −

u(n)

2 2 3 which is a right-sided sequence.

b. ROC 2 : 0 < |z| < 1 3 . Here both poles are on the exterior side of the ROC 2 ;

that is, |z 1 |≥R x+ = 1 3 and |z 2 |≥ 1 3 . Hence from (4.15)

2 (n) =

{−u(−n − 1)} − 2 − 2 1 3 u(−n − 1)

2 3 u(−n − 1) − 2 u(−n − 1)

which is a left-sided sequence.

c. ROC 3 : 1 3 < |z| < 1. Here pole z 1 is on the exterior side of the ROC 3 —that is, |z 1 |≥R x+ = 1—while pole z 2 is on the interior side—that is, |z 2 |≤ 1 3 .

Hence from (4.15)

x 3 (n) = − u(−n − 1) −

u(n)

which is a two-sided sequence.

4.3.1 MATLAB IMPLEMENTATION

A MATLAB function residuez is available to compute the residue part and the direct (or polynomial) terms of a rational function in z − 1 . Let

0 −M +b 1 z 1 +···+b M z

B(z)

X(z) =

a 0 +a 1 z − 1 +···+a N z −N

A(z)

M ! −N R

C k z −k

k =1 1−p k z

k =0

M ≥N

Inversion of the z -Transform 115

be a rational function in which the numerator and the denominator poly- nomials are in ascending powers of z − 1 . Then [R,p,C]=residuez(b,a) computes the residues, poles, and direct terms of X(z) in which two poly- nomials B(z) and A(z) are given in two vectors b and a, respectively. The returned column vector R contains the residues, column vector p contains the pole locations, and row vector C contains the direct terms. If p(k)=...=p(k+r-1) is a pole of multiplicity r, then the expansion in- cludes the term of the form

R k +1

R k +r−1

which is different from (4.14).

Similarly, [b,a]=residuez(R,p,C), with three input arguments and two output arguments, converts the partial fraction expansion back to polynomials with coefficients in row vectors b and a.

EXAMPLE 4.8 To check our residue calculations, let us consider the rational function

z X(z) = 3z 2 − 4z + 1

given in Example 4.7.

Solution First rearrange X(z) so that it is a function in ascending powers of z − 1 .

X(z) =

Now using the MATLAB script

>> b = [0,1]; a = [3,-4,1]; [R,p,C] = residuez(b,a) R=

0.5000 -0.5000 p= 1.0000 0.3333

c= []

we obtain

X(z) =

2 2 1−z − 1 − 1− 1 z − 3 1

as before. Similarly, to convert back to the rational function form,

>> [b,a] = residuez(R,p,C) b=

Chapter 4

THE z -TRANSFORM

a= 1.0000 -1.3333 0.3333

so that

0+ 1 3 z − 1 z − 1 z

X(z) =

1− 3 3 − 4z − 1 +z − 2 3z 2 − 4z + 1

as before.

EXAMPLE 4.9

Compute the inverse z-transform of

X(z) =

2 , |z| > 0.9 (1 − 0.9z − 1 ) (1 + 0.9z − 1 )

Solution We will evaluate the denominator polynomial as well as the residues using the MATLAB script:

>> b = 1; a = poly([0.9,0.9,-0.9]) a=

>> [R,p,C]=residuez(b,a) R=

Note that the denominator polynomial is computed using MATLAB’s polyno- mial function poly, which computes the polynomial coefficients, given its roots. We could have used the conv function, but the use of the poly function is more convenient for this purpose. From the residue calculations and using the order

of residues given in (4.16), we have 0.25 0.5 0.25

X(z) =

|z| > 0.9

1 − 0.9z

(1 − 0.9z )

1 + 0.9z − 1

0.25 0.5 = 0.9z

, |z| > 0.9

1 − 0.9z − 1

0.9 (1 − 0.9z − 1 2

1 + 0.9z − 1

Inversion of the z -Transform 117

Hence from Table 4.1 and using the z-transform property of time-shift,

x(n) = 0.25(0.9) n

5 u(n) + (n + 1)(0.9) n+1

9 u(n + 1) + 0.25 (−0.9) u(n)

which, upon simplification, becomes

x(n) = 0.75(0.9) n u(n) + 0.5n(0.9) n

u(n) + 0.25 (−0.9) n u(n)

MATLAB verification:

>> [delta,n] = impseq(0,0,7); x = filter(b,a,delta) % check sequence x=

Columns 1 through 4 1.00000000000000

1.45800000000000 Columns 5 through 8 1.96830000000000

>> x = (0.75)*(0.9).^n + (0.5)*n.*(0.9).^n + (0.25)*(-0.9).^n % answer sequence x=

Columns 1 through 4 1.00000000000000

1.45800000000000 Columns 5 through 8 1.96830000000000

1.91318760000000 ! ! EXAMPLE 4.10 Determine the inverse z-transform of

X(z) =

1 − 0.8 2z − 1 + 0.64z − 2

so that the resulting sequence is causal and contains no complex numbers. Solution

We will have to find the poles of X(z) in the polar form to determine the ROC of the causal sequence.

MATLAB script: >> b = [1,0.4*sqrt(2)]; a=[1,-0.8*sqrt(2),0.64];

>> [R,p,C] = residuez(b,a) R=

0.5000 - 1.0000i 0.5000 + 1.0000i

p= 0.5657 + 0.5657i 0.5657 - 0.5657i

C= [] >> Mp=(abs(p))’

% pole magnitudes

>> Ap=(angle(p))’/pi

% pole angles in pi units

Ap =

Chapter 4

THE z -TRANSFORM

From these calculations

X(z) =

1 − 0.8e 4 z − 1

and from Table 4.1, we have

e π +j π 4 n u(n) + (0.5 + j) 0.8 x(n) = (0.5 − j) 0.8 n e − j 4 n u(n)

= 0.8 π n [0.5{e +j π

+e π − j 4 n +j n − j n } − j{e 4 −e 4 }]u(n)

= 0.8 n , # π cos n $

n $- u(n) 4 4

+ 2 sin

MATLAB verification:

>> [delta, n] = impseq(0,0,6); x = filter(b,a,delta) % check sequence x= Columns 1 through 4 1.00000000000000

0.36203867196751 Columns 5 through 8 -0.40960000000000 -0.69511425017762 -0.52428800000000 -0.14829104003789

>> x = ((0.8).^n).*(cos(pi*n/4)+2*sin(pi*n/4)) x=

Columns 1 through 4 1.00000000000000

0.36203867196751 Columns 5 through 8 -0.40960000000000 -0.69511425017762 -0.52428800000000 -0.14829104003789