Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
98 views

Finite Impulse Response Filter Design: DSP Labs

The document describes the firwd MATLAB function for designing finite impulse response (FIR) filters using the window method. It takes parameters such as the number of filter taps, filter type (lowpass, highpass, etc.), cutoff frequencies, and window type. Examples are given to design lowpass, highpass, bandpass, and band reject FIR filters using different window functions. Exercises are provided to design filters at specified frequencies using various window types and list the coefficients.

Uploaded by

melki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views

Finite Impulse Response Filter Design: DSP Labs

The document describes the firwd MATLAB function for designing finite impulse response (FIR) filters using the window method. It takes parameters such as the number of filter taps, filter type (lowpass, highpass, etc.), cutoff frequencies, and window type. Examples are given to design lowpass, highpass, bandpass, and band reject FIR filters using different window functions. Exercises are provided to design filters at specified frequencies using various window types and list the coefficients.

Uploaded by

melki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Finite Impulse Response

Filter Design
DSP Labs
Window Method
• The MATLAB function firwd(N,Ftype,WnL,WnH,Wtype)
The program, firwd(N,Ftype,WnL,WnH,Wtype), listed in the
‘‘MATLAB Programs’’ section in Program 7.14, has five input
parameters:
– ‘‘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.
– ‘‘WnL’’ and ‘‘WnH’’ are the lower and upper cutoff frequency inputs,
respectively.
• Note that WnH = 0 when specifying WnL for the lowpass filter design, while WnL
= 0 when specifying WnH for the highpass filter design.
– ‘‘Wtype’’ specifies the window data sequence to be used in the
design, that is, input ‘‘1’’ for the rectangular window, input ‘‘2’’ for
the triangular window, input ‘‘3’’ for the Hanning window, input ‘‘4’’
for the Hamming window, and input ‘‘5’’ for the Blackman window.
Example-1
a. Design a lowpass FIR filter with 25 taps using the MATLAB program. 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 FIR filter coefficients for each window design method.


a. With a given sampling rate of 8,000 Hz, the normalized cutoff
frequency can be found as

2000  2
c = = 0.5 radians
8000
• Program 7.14. MATLAB function for FIR filter design using the window
method.
b. Program 7.2 is used to generate FIR filter coefficients using the
rectangular window.
– Its frequency responses will be plotted together with that obtained using the Hamming
window for comparison, as shown in Program 7.3.

Program 7.2
– Results of the FIR filter design using the Hamming window are illustrated in Program 7.3.

Program 7.3
– As a comparison, the frequency responses achieved from the rectangular window and
the Hamming window
• The FIR filter coefficients for both methods are listed in table below:
Exercise-1
Design a 41-tap lowpass FIR filter whose cutoff frequency is 1,600 Hz using
the following window functions. Assume that the sampling frequency is 8,000
Hz.

a. rectangular window function


b. triangular window function
c. Hanning window function
d. Hamming window function
e. Blackman window function.

List the FIR filter coefficients and plot the frequency responses for each case.
Exercise-2
Design a 31-tap highpass FIR filter whose cutoff frequency is 2,500 Hz using
the following window functions. Assume that the sampling frequency is 8,000
Hz.

a. Hanning window function


b. Hamming window function
c. Blackman window function.

List the FIR filter coefficients and plot the frequency responses for each
design.
Exercise-3
Design a 41-tap bandpass FIR filter with the lower and upper cutoff
frequencies being 2,500 Hz and 3,000 Hz, respectively, using the following
window functions. Assume a sampling frequency of 8,000 Hz.

• Hanning window function


• Blackman window function.

List the FIR filter coefficients and plot the frequency responses for each
design.
Exercise-4
Design a 41-tap band reject FIR filter with frequencies 2,500 Hz and 3,000 Hz,
respectively, using the Hamming window function. Assume a sampling
frequency of 8,000 Hz.

List the FIR filter coefficients and plot the frequency responses for each
design.

You might also like