<< 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
$20{log}_{10}\left|W\left({e}^{j\omega}\right)\right|$ ). 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 $h\left(n\right)$ with a cutoff frequency of ${\omega}_{c}=2.0$ 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 $N$ , and a parameter $\beta $ which controls the shape of the window. Large values of $\beta $ 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 $N$ is given by
where ${I}_{0}(\xb7)$ is the zero'th order modified Bessel function of the first kind, $N$ is the length of the window, and $\beta $ is the shape parameter.
Kaiser found that values of $\beta $ and $N$ could be chosen to meet any set of design parameters, $(\delta ,{\omega}_{p},{\omega}_{s})$ , by defining $A=-20{log}_{10}\delta $ and using the following two equations:
where $\lceil \xb7\rceil $ is the ceiling function, i.e. $\lceil x\rceil $ is the smallest integer which is greater than or equal to $x$ .
Notification Switch
Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?