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.

318 Chapter 7 FIR FILTER DESIGN<br />

Solution<br />

This is a Type-2 linear-phase FIR filter since M =12and since h (n) issymmetric<br />

with respect to α = (12 − 1) /2 =5.5. From (7.10) we have<br />

b(1) =2h ( 12<br />

2 − 1) =12, b(2) = 2h ( 12<br />

2 − 2) =10,b(3) = 2h ( 12<br />

2 − 3) = −4<br />

b(4) =2h ( 12<br />

2 − 4) = −2, b(5) = 2h ( 12<br />

2 − 5) =2, b(6) = 2h ( 12<br />

2 − 6) = −8<br />

Hence from (7.11) we obtain<br />

H r(ω) =b(1) cos [ ω ( [ ( )] [ ( )]<br />

1 − 2)] 1 + b(2) cos ω 2 −<br />

1<br />

2 + b(3) cos ω 3 −<br />

1<br />

2<br />

)] [ ( + b(6) cos ω 6 −<br />

1<br />

+ b(4) cos [ ω ( [ (<br />

4 − 2)] 1 + b(5) cos ω 5 −<br />

1<br />

2<br />

( ) ( ) ( ω 3ω 5ω<br />

=12cos +10cos − 4 cos<br />

2 2<br />

2<br />

( ) ( )<br />

9ω 11ω<br />

+2cos − 8 cos<br />

2<br />

2<br />

MATLAB script:<br />

)<br />

− 2 cos<br />

( 7ω<br />

2<br />

)<br />

2<br />

)]<br />

>> h = [-4,1,-1,-2,5,6,6,5,-2,-1,1,-4];<br />

>> M = length(h); n = 0:M-1; [Hr,w,a,L] = Hr_Type2(h);<br />

>> b,L<br />

b = 12 10 -4 -2 2 -8<br />

L = 6<br />

>> bmax = max(b)+1; bmin = min(b)-1;<br />

>> subplot(2,2,1); stem(n,h); axis([-1 2*L+1 bmin bmax])<br />

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

>> subplot(2,2,3); stem(1:L,b); axis([-1 2*L+1 bmin bmax])<br />

>> xlabel(’n’); ylabel(’b(n)’); title(’b(n) coefficients’)<br />

>> subplot(2,2,2); plot(w/pi,Hr);grid<br />

>> xlabel(’frequency in pi units’); ylabel(’Hr’)<br />

>> title(’Type-1 Amplitude Response’)<br />

>> subplot(2,2,4); pzplotz(h,1)<br />

The plots and the zero locations are shown in Figure 7.5. From these plots, we<br />

observe that H r (ω) iszero at ω = π. There is one zero-quadruplet constellation,<br />

three zero pairs, and one zero at ω = π as expected.<br />

□<br />

□ EXAMPLE 7.6 Let h(n) = {−4, 1, −1, −2, 5, 0, −5, 2, 1, −1, 4}. Determine the amplitude response<br />

↑<br />

H r (ω) and the locations of the zeros of H<br />

(z).<br />

Solution Since M = 11, which is odd, and since h(n) is antisymmetric about α =<br />

(11 − 1)/2 =5, this is a Type-3 linear-phase FIR filter. From (7.13) we have<br />

c(0) = h (α) =h(5) =0,c(1) = 2h(5 − 1) = 10, c(2) =2h(2 − 2) = −4<br />

c (3) =2h (5 − 3) = −2, c(4) =2h (5 − 4) = 2, c(5) = 2h (5 − 5) = −8<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!