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.

220 Chapter 6 IMPLEMENTATION OF DISCRETE-TIME FILTERS<br />

Solution<br />

MATLAB script:<br />

>> b=[1 -3 11 -27 18]; a=[16 12 2 -4 -1];<br />

>> [b0,B,A]=dir2cas(b,a)<br />

b0 = 0.0625<br />

B =<br />

1.0000 -0.0000 9.0000<br />

1.0000 -3.0000 2.0000<br />

A =<br />

1.0000 1.0000 0.5000<br />

1.0000 -0.2500 -0.1250<br />

The resulting structure is shown in Figure 6.6. To check that our cascade structure<br />

is correct, let us compute the first 8 samples of the impulse response using<br />

both forms.<br />

>> delta = impseq(0,0,7)<br />

delta =<br />

1 0 0 0 0 0 0 0<br />

>> format long<br />

>> hcas=casfiltr(b0,B,A,delta)<br />

hcas =<br />

Columns 1 through 4<br />

0.06250000000000 -0.23437500000000 0.85546875000000 -2.28417968750000<br />

Columns 5 through 8<br />

2.67651367187500 -1.52264404296875 0.28984069824219 0.49931716918945<br />

>> hdir=filter(b,a,delta)<br />

hdir =<br />

Columns 1 through 4<br />

0.06250000000000 -0.23437500000000 0.85546875000000 -2.28417968750000<br />

Columns 5 through 8<br />

2.67651367187500 -1.52264404296875 0.28984069824219 0.49931716918945<br />

□<br />

FIGURE 6.6 Cascade structure in Example 6.1<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!