02.10.2019 Views

UploadFile_6417

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

132 Chapter 4 THE z-TRANSFORM<br />

which agrees with the response given in (4.29). In Example 4.14 we computed<br />

x IC (n) analytically. However, in practice, and especially for largeorder<br />

difference equations, it is tedious to determine x IC (n) analytically.<br />

MATLAB provides a function called filtic, which is available only in<br />

the Signal Processing toolbox. It is invoked by<br />

xic = filtic(b,a,Y,X)<br />

in which b and a are the filter coefficient arrays and Y and X are the initialcondition<br />

arrays from the initial conditions on y(n) and x(n), respectively,<br />

in the form<br />

Y =[y(−1), y(−2),..., y(−N)]<br />

X =[x(−1), x(−2),..., x(−M)]<br />

If x(n) =0, n ≤−1 then X need not be specified in the filtic function.<br />

In Example 4.14 we could have used<br />

>> Y = [4, 10]; xic = filtic(b,a,Y)<br />

xic =<br />

1 -2<br />

to determine x IC (n).<br />

□ EXAMPLE 4.15 Solve the difference equation<br />

y(n) = 1 [x(n)+x(n − 1) + x(n − 2)]+0.95y(n − 1) − 0.9025y(n − 2),<br />

3<br />

n ≥ 0<br />

where x(n) =cos(πn/3)u(n) and<br />

y(−1) = −2, y(−2) = −3; x(−1) = 1, x(−2) = 1<br />

First determine the solution analytically and then by using MATLAB.<br />

Solution<br />

Taking a one-sided z-transform of the difference equation<br />

Y + (z) = 1 3 [X+ (z)+x(−1) + z −1 X + (z)+x(−2) + z −1 x(−1) + z −2 X + (z)]<br />

+0.95[y(−1) + z −1 Y + (z)] − 0.9025[y(−2) + z −1 y(−1) + z −2 Y + (z)]<br />

and substituting the initial conditions, we obtain<br />

1<br />

Y + 3<br />

(z) =<br />

+ 1 3 z−1 + 1 3 z−2<br />

1.4742 +<br />

1 − 0.95z −1 +0.9025z −2 X+ 2.1383z−1<br />

(z)+<br />

1 − 0.95z −1 +0.9025z −2<br />

Clearly, x IC(n) =[1.4742, 2.1383]. Now substituting X + (z) =<br />

1 − 0.5z−1<br />

1 − z −1 + z −2<br />

and simplifying, we will obtain Y + (z) asarational function. This simplification<br />

and further partial fraction expansion can be done using MATLAB.<br />

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).<br />

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!