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.

Difference Equations 49<br />

Solution<br />

From the given difference equation the coefficient arrays are<br />

b = [1]; a=[1, -1, 0.9];<br />

a. MATLAB script:<br />

>> b = [1]; a = [1, -1, 0.9]; n = [-20:120];<br />

>> h = impz(b,a,n);<br />

>> subplot(2,1,1); stem(n,h);<br />

>> title(’Impulse Response’); xlabel(’n’); ylabel(’h(n)’)<br />

The plot of the impulse response is shown in Figure 2.9.<br />

b. MATLAB script:<br />

>> x = stepseq(0,-20,120); s = filter(b,a,x);<br />

>> subplot(2,1,2); stem(n,s)<br />

>> title(’Step Response’); xlabel(’n’); ylabel(’s(n)’)<br />

The plot of the unit step response is shown in Figure 2.9.<br />

c. To determine the stability of the system, we have to determine h(n) for all n.<br />

Although we have not described a method to solve the difference equation,<br />

1<br />

Impulse Response<br />

0.5<br />

h(n)<br />

0<br />

−0.5<br />

−1<br />

−20 0 20 40 60 80 100 120<br />

n<br />

Step Response<br />

2<br />

1.5<br />

s(n)<br />

1<br />

0.5<br />

0<br />

−0.5<br />

−20 0 20 40 60 80 100 120<br />

n<br />

FIGURE 2.9 Impulse response and step response plots in Example 2.11<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!