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.

FIR Filter Designs for Sampling Rate Conversion 501<br />

Amplitude Response: alpha = 1<br />

Amplitude Response: alpha = 0.75<br />

4<br />

4<br />

Amplitude<br />

Amplitude<br />

0<br />

0<br />

0 0.25 1<br />

Frequency in π units<br />

Log–mag Response: alpha = 1<br />

0 0.25 1<br />

Frequency in π units<br />

Log–mag Response: alpha = 0.75<br />

0<br />

0<br />

Decibels<br />

−22<br />

Decibels<br />

−40<br />

−50<br />

0 0.25 1<br />

−50<br />

0 0.25 1<br />

Frequency in π units<br />

Frequency in π units<br />

FIGURE 9.19 FIR interpolation filter design plots for I = 4 and L = 5<br />

that has 0.1 dBripple in the passband and is down by at least 30 dB in the<br />

stopband. Choose reasonable values for band-edge frequencies.<br />

Solution<br />

The passband cutoff frequency should be ω p = π/I =0.2π. Toget a reasonable<br />

value for the filter length we choose the transition width of 0.12π, which gives<br />

stopband cutoff frequency of ω s =0.32π. Note that the nominal gain of the<br />

filter in the passband should be equal to I =5,which means that the ripple<br />

values computed using the decibel values are scaled by 5. A filter of length<br />

M =31achieves the design specifications given above. The details are given in<br />

the following MATLAB script.<br />

I = 5; Rp = 0.1; As = 30; wp = pi/I; ws = wp+pi*0.12;<br />

[delta1,delta2] = db2delta(Rp,As); weights = [delta2/delta1,1];<br />

F = [0,wp,ws,pi]/pi; A = [I,I,0,0];<br />

h = firpm(30,F,A,weights); n = [0:length(h)-1];<br />

[Hr,w,a,L] = Hr_Type1(h); Hr_min = min(Hr); w_min = find(Hr == Hr_min);<br />

H = abs(freqz(h,1,w)); Hdb = 20*log10(H/max(H)); min_attn = Hdb(w_min);<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!