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.

344 Chapter 7 FIR FILTER DESIGN<br />

then fir1 returns a bandpass filter with passband cutoffs wc1 and wc2.<br />

If wc is a multi-element (more than two) vector, then fir1 returns a<br />

multiband filter with cutoffs given in wc.<br />

• h = fir1(N,wc,’ftype’) specifies a filter type, where ’ftype’ is:<br />

a. ’high’ for a highpass filter with cutoff frequency Wn.<br />

b. ’stop’ for a bandstop filter, if Wc = [wc1 wc2]. The stopband frequency<br />

range is specified by this interval.<br />

c. ’DC-1’ to make the first band of a multiband filter a passband.<br />

d. ’DC-0’ to make the first band of a multiband filter a stopband.<br />

• h = fir1(N,wc,’ftype’,window) or h = fir1(N,wc,window) uses<br />

the vector window of length N+1 obtained from one of the specified<br />

MATLAB window function. The default window function used is the<br />

Hamming window.<br />

To design FIR filters using the Kaiser window, the SP toolbox provides<br />

the function kaiserord, which estimates window parameters that<br />

can be used in the fir1 function. The basic syntax is<br />

[N,wc,beta,ftype] = kaiserord(f,m,ripple);<br />

The function computes the window order N, the cutoff frequency vector<br />

wc, parameter β in beta, and the filter type ftype as discussed. The<br />

vector f is a vector of normalized band edges and m is a vector specifying<br />

the desired amplitude on the bands defined by f. The length of f is twice<br />

the length of m, minus 2; i.e., f does not contain 0 or 1. The vector ripple<br />

specifies tolerances in each band (not in decibels). Using the estimated<br />

parameters, Kaiser window array can be computed and used in the fir1<br />

function.<br />

To design FIR filters using window technique with arbitrary shaped<br />

magnitude response, the SP toolbox provides the function fir2, which<br />

also incorporates the frequency sampling technique. It is explained in the<br />

following section.<br />

7.4 FREQUENCY SAMPLING DESIGN TECHNIQUES<br />

In this design approach we use the fact that the system function H (z)<br />

can be obtained from the samples H(k) ofthe frequency response H(e jω ).<br />

Furthermore, this design technique fits nicely with the frequency sampling<br />

structure that we discussed in Chapter 6. Let h(n)bethe impulse response<br />

of an M-point FIR filter, H(k) beitsM-point DFT, and H(z) beits<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!