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.

Optimal Equiripple Design Technique 373<br />

h(n)<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

Actual Impulse Response<br />

−0.1<br />

0 48<br />

n<br />

1<br />

Amplitude Response<br />

Decibels<br />

0<br />

60<br />

Magnitude Response in dB<br />

0 0.3 0.4 0.7 0.8 1<br />

frequency in π units<br />

×<br />

Weighted Error<br />

10−3<br />

1<br />

Hr(w)<br />

0.5<br />

Hr(w)<br />

0<br />

0<br />

0 0.3 0.4 0.7 0.8 1<br />

frequency in π units<br />

−1<br />

0 0.3 0.4 0.7 0.8 1<br />

frequency in π units<br />

FIGURE 7.38 Plots for equiripple staircase FIR filter in Example 7.26<br />

Band-1: 0 ≤ f ≤ 0.1, Slope = 1 sam/cycle ⇒ 0.0 ≤|H| ≤0.1<br />

Band-2: 0.2 ≤ f ≤ 0.3, Slope = 2 sam/cycle ⇒ 0.4 ≤|H| ≤0.6<br />

Band-3: 0.4 ≤ f ≤ 0.5, Slope = 3 sam/cycle ⇒ 1.2 ≤|H| ≤1.5<br />

Let the weights be equal in all bands. The MATLAB script is:<br />

>> f = [0 0.2 0.4 0.6 0.8 1]; % in w/pi unis<br />

>> m = [0,0.1,0.4,0.6,1.2,1.5]; % magnitude values<br />

>> h = firpm(25,f,m,’differentiator’);<br />

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

>> subplot(2,1,1); stem([0:25],h); title(’Impulse Response’);<br />

>> xlabel(’n’); ylabel(’h(n)’); axis([0,25,-0.6,0.6])<br />

>> set(gca,’XTickMode’,’manual’,’XTick’,[0,25])<br />

>> set(gca,’YTickMode’,’manual’,’YTick’,[-0.6:0.2:0.6]);<br />

>> subplot(2,1,2); plot(w/(2*pi),mag); title(’Magnitude Response’)<br />

>> xlabel(’Normalized frequency f’); ylabel(’|H|’)<br />

>> set(gca,’XTickMode’,’manual’,’XTick’,f/2)<br />

>> set(gca,’YTickMode’,’manual’,’YTick’,[0,0.1,0.4,0.6,1.2,1.5]); grid<br />

The frequency-domain response is shown in Figure 7.39.<br />

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