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 505<br />

delay = (M-1)/2; % Delay imparted by the filter<br />

m = delay+1:1:50*I+delay+1; y = y(m); m = 1:81; y = y(81:161);<br />

subplot(2,2,3); Hs3 = stem(m,y,’filled’); set(Hs3,’markersize’,2,’color’,’m’);<br />

axis([-5,85,-1.2,1.2]); set(gca,’xtick’,[0:4:16]*I,’ytick’,[-1,0,1]);<br />

title(’Output y(n): Filter length=51’,’fontsize’,TF);<br />

xlabel(’n’,’vertical’,’middle’); ylabel(’Amplitude’);<br />

% Interpolation with Filter Design: Length M = 81<br />

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

h = firpm(M-1,F,A,weights); y = upfirdn(x,h,I);<br />

delay = (M-1)/2; % Delay imparted by the filter<br />

m = delay+1:1:50*I+delay+1; y = y(m); m = 1:81; y = y(81:161);<br />

subplot(2,2,4); Hs3 = stem(m,y,’filled’); set(Hs3,’markersize’,2,’color’,’m’);<br />

axis([-5,85,-1.2,1.2]); set(gca,’xtick’,[0:4:16]*I,’ytick’,[-1,0,1]);<br />

title(’Output y(n): Filter length=81’,’fontsize’,TF);<br />

xlabel(’n’,’vertical’,’middle’); ylabel(’Amplitude’);<br />

The resulting signals are also shown in lower plots in Figure 9.21. Clearly, for<br />

large orders, the filter has better lowpass characteristics. The signal peak value<br />

approaches 1, and its shape approaches the cosine waveform. Thus, a good filter<br />

design is critical even in a simple signal case.<br />

□<br />

9.5.2 DESIGN SPECIFICATIONS<br />

When we replace H I (ω) byafinite-order FIR filter H(ω), we must allow<br />

for a transition band; thus, the filter cannot have a passband edge up to<br />

π/I. Towards this, we define<br />

• ω x,p as the highest frequency of the signal x(n) that we want to preserve<br />

• ω x,s as the full signal bandwidth of x(n),—i.e., there is no energy in<br />

x(n) above the frequency ω x,s .<br />

Thus, we have 0 < ω x,p < ω x,s < π. Note that the parameters ω x,p<br />

and ω x,s ,asdefined are signal parameters, not filter parameters; they are<br />

shown in Figure 9.22a. The filter parameters will be defined based on ω x,p<br />

and ω x,s .<br />

From equation (9.48), these signal parameter frequencies for v(m)<br />

become ω x,p /I and ω x,s /I, respectively, because the frequency scale is<br />

compressed by the factor I. This is shown in Figure 9.22b. A linear-phase<br />

FIR filter can now be designed to pass frequencies up to ω x,p /I and to<br />

suppress frequencies starting at (2π − ω x,s )/I. Let<br />

ω p =<br />

( ωx,p<br />

I<br />

)<br />

( ) 2π − ωx,s<br />

and ω s =<br />

I<br />

(9.50)<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!