02.10.2019 Views

UploadFile_6417

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Solutions of the Difference Equations 131<br />

while the second part as<br />

Y ZI (z) =H(z)X IC (z)<br />

where X IC (z) can be thought of as an equivalent initial-condition input<br />

that generates the same output Y ZI as generated by the initial<br />

conditions. In this example x IC (n) is<br />

x IC (n) ={1, −2}<br />

↑<br />

Now taking the inverse z-transform of each part of (4.27), we write the<br />

complete response as<br />

[ ( ) n ( ) n 1 1 1<br />

y(n) = − 2 + 8 [ ( ) n 1<br />

u(n) + 3 − 2]<br />

u(n)<br />

3 4 2 3]<br />

2<br />

} {{ } } {{ }<br />

Zero-state response<br />

Zero-input response<br />

From this example, it is clear that each part of the complete solution<br />

is, in general, a different function and emphasizes a different aspect of<br />

system analysis.<br />

4.5.1 MATLAB IMPLEMENTATION<br />

In Chapter 2 we used the filter function to solve the difference equation,<br />

given its coefficients and an input. This function can also be used to find<br />

the complete response when initial conditions are given. In this form the<br />

filter function is invoked by<br />

y = filter(b,a,x,xic)<br />

where xic is an equivalent initial-condition input array. To find the complete<br />

response in Example 4.14, we will use the MATLAB script<br />

>> n = [0:7]; x = (1/4).^n; xic = [1, -2];<br />

>> format long; y1 = filter(b,a,x,xic)<br />

y1 =<br />

Columns 1 through 4<br />

2.00000000000000 1.25000000000000 0.93750000000000 0.79687500000000<br />

Columns 5 through 8<br />

0.73046875000000 0.69824218750000 0.68237304687500 0.67449951171875<br />

>> y2 = (1/3)*(1/4).^n+(1/2).^n+(2/3)*ones(1,8) % MATLAB Check<br />

y2 =<br />

Columns 1 through 4<br />

2.00000000000000 1.25000000000000 0.93750000000000 0.79687500000000<br />

Columns 5 through 8<br />

0.73046875000000 0.69824218750000 0.68237304687500 0.67449951171875<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!