<< Chapter < Page | Chapter >> Page > |
The outputs of the command are
n = filter length - 1
,
and the vectors
fo
,
mo
, and
w
which are
intermediate filter parameters.
Once the filter length,
n
, is obtained,
the Matlab command for designing a Parks-McClellan filteris
b = firpm(n,fo,mo,w)
.
The inputs
n
,
fo
,
mo
, and
w
are the
corresponding outputs of
firpmord
,
and the output
b
is a vector of FIR filter coefficients
such that
(What is the impulse response of this filter?)
For further information, read the help document on using Matlab to implement the Parks-McClellan algorithm.
Now design a symmetric FIR filter using
firpmord
and
firpm
in Matlab to meet the design specifications
given in the
"Filter Design Using the Kaiser Window" section.
Compute the DTFT of the filter's response for at least 512 points,and use this result to
compute the passband and stopband ripple of the filter that was designed.Adjust the filter length until the minimum order which
meets the design constraints is found.Plot the magnitude of the DTFT in dB of the final filter design.
firpmord
?
How does the length of this filter compare to the filterdesigned using a Kaiser window?Use the filter you have designed to remove the noise
from the signal
nspeech2.mat
.
Play the noisy and filtered speech signals back using
sound
and listen to them carefully.
Compute theDTFT of 400 samples of the filtered signal starting
at time
$n=20,001$ (i.e. 20001:20400
).Plot the magnitude of the DTFT in decibels versus frequency
in radians for
$\left|\omega \right|<\pi $ .
Compare this with the spectrum of the noisy speech signal shownin
[link] , and also with
the magnitude of the DTFT of the Kaiser filtered signal.
In this section, we consider the design of discrete-time IIR filters through the direct search of filter parametersthat will minimize a specific design criterion. Such “brute force” approaches to filter design have becomeincreasingly more popular due to the wide availability of high speed computers and robust numerical optimization methods.
Typically, numerical approaches to filter design have two parts.
First, they design a
cost , or
error criterion.
This criterion is a measure of the difference betweenthe ideal filter response and the response of the
computed or “approximate” filter. The goal is to findthe approximate filter with the lowest cost (error). Mean square error isa popular cost criterion. The second part is to minimize
the cost with respect to the filter parameters.We will perform the required numerical optimization with the
fminsearch
function in Matlab's
Optimization Toolbox .
Notification Switch
Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?