Digital Signal Processing Reference
In-Depth Information
EXAMPLE 7.7
a. Design a lowpass FIR filter with 25 taps using the MATLAB program listed in the “MATLAB Programs” section
at the end of this chapter. The cutoff frequency of the filter is 2,000 Hz, assuming a sampling frequency of
8,000 Hz. The rectangular window and Hamming window functions are used for each design.
b. Plot the frequency responses along with those obtained using the rectangular window and Hamming window for
comparison.
c. List the FIR filter coefficients for each window design method.
Solution:
a. With a given sampling rate of 8,000 Hz, the normalized cutoff frequency can be found as
U c ¼ 2; 000 2p
8; 000
¼ 0:5p radians
Now we are ready to design FIR filters via the MATLAB program. The function firwd(N, Ftype, WnL, WnH, Wtype)
listed in the “MATLAB Programs” section at the end of this chapter, has five input parameters, which are described
as follows:
“N” is the number of specified filter coefficients (the number of filter taps).
“Ftype” denotes the filter type, that is, input “1” for the lowpass filter design, input “2” for the highpass filter
design, input “3” for the bandpass filter design, and input “4” for the band reject filter design.
0
-50
-100
0
500
1000
1500
2000
2500
3000
3500
4000
Frequency (Hz)
0
-500
-1000
-1500
-2000
0
500
1000
1500
2000
2500
3000
3500
4000
Frequency (Hz)
FIGURE 7.12
Frequency responses using the rectangular and Hamming windows.
 
Search WWH ::




Custom Search