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.

Window Design Techniques 339<br />

The ideal bandstop impulse response can also be determined from the ideal<br />

lowpass impulse response using a method similar to Figure 7.19. We can now<br />

implement the Kaiser window design and check for the minimum stopband<br />

attenuation. This is shown in the following MATLAB script.<br />

>> M = 45; As = 60; n=[0:1:M-1];<br />

>> beta = 0.1102*(As-8.7)<br />

beta = 5.6533<br />

>> w_kai = (kaiser(M,beta))’; wc1 = pi/3; wc2 = 2*pi/3;<br />

>> hd = ideal_lp(wc1,M) + ideal_lp(pi,M) - ideal_lp(wc2,M);<br />

>> h = hd .* w_kai; [db,mag,pha,grd,w] = freqz_m(h,[1]);<br />

>> subplot(2,2,1); stem(n,hd); title(’Ideal Impulse Response’)<br />

>> axis([-1 M -0.2 0.8]); xlabel(’n’); ylabel(’hd(n)’)<br />

>> subplot(2,2,2); stem(n,w_kai);title(’Kaiser Window’)<br />

>> axis([-1 M 0 1.1]); xlabel(’n’); ylabel(’w(n)’)<br />

>> subplot(2,2,3); stem(n,h);title(’Actual Impulse Response’)<br />

>> axis([-1 M -0.2 0.8]); xlabel(’n’); ylabel(’h(n)’)<br />

>> subplot(2,2,4);plot(w/pi,db); axis([0 1 -80 10]);<br />

>> title(’Magnitude Response in dB’);grid;<br />

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

The β parameter is equal to 5.6533, and, from the magnitude plot in Figure 7.21,<br />

we observe that the minimum stopband attenuation is smaller than 60 dB.<br />

Clearly, we have to increase β to increase the attenuation to 60 dB. The required<br />

value was found to be β =5.9533.<br />

0<br />

Magnitude Response in dB<br />

Decibels<br />

60<br />

0 1/3 2/3 1<br />

frequency in π units<br />

FIGURE 7.21 Bandstop filter magnitude response in Example 7.11 for β =<br />

5.6533<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!