<< Chapter < Page | Chapter >> Page > |
Plot the rectangular, Hamming, Hanning, and Blackman window functions
of length 21 on a single figure using the
subplot
command.
You may use the Matlab commands
hamming
,
hann
, and
blackman
.
Then compute and plot the DTFT magnitude of each of the four windows.Plot the magnitudes on a decibel scale
(i.e., plot
). Download and use the function
DTFT.m to compute the DTFT.
DTFT(window,512)
. Type help DTFT for
further information on this function.Measure the null-to-null mainlobe width (in rad/sample)
and the peak-to-sidelobe amplitude (in dB)from the logarithmic magnitude response plot
for each window type. The Matlab command
zoom
is helpful for this.
Make a table with these values
and the theoretical ones.
Now use a Hamming window to design a lowpass filter with a cutoff frequency of and length 21. Note: You need to use [link] and [link] for this design. In the same figure, plot the filter's impulse response, and the magnitude of the filter's DTFT in decibels.
Download nspeech2.mat for the following section.
The standard windows of the "Filter Design Using Standard Windows" section are an improvement over simple truncation,but these windows still do not allow for arbitrary choices of transition bandwidth and ripple.In 1964, James Kaiser derived a family of near-optimal windows that can be used to design filters which meet or exceed any filter specification.The Kaiser window depends on two parameters: the window length , and a parameter which controls the shape of the window. Large values of reduce the window sidelobes and therefore result in reduced passband and stopband ripple.The only restriction in the Kaiser filter design method is that the passband and stopband ripple must be equal in magnitude.Therefore, the Kaiser filter must be designed to meet the smaller of the two ripple constraints:
The Kaiser window function of length is given by
where is the zero'th order modified Bessel function of the first kind, is the length of the window, and is the shape parameter.
Kaiser found that values of and could be chosen to meet any set of design parameters, , by defining and using the following two equations:
where is the ceiling function, i.e. is the smallest integer which is greater than or equal to .
Notification Switch
Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?