<< 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 | W ( e j ω ) | ). Download and use the function DTFT.m to compute the DTFT.

Use at least 512 sample points in computing the DTFT by typing the command 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 ( n ) with a cutoff frequency of ω 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.

Inlab report

  1. Submit the figure containing the time domain plots of the four windows.
  2. Submit the figure containing the DTFT (in decibels) of the four windows.
  3. Submit the table of the measured and theoretical window spectrum parameters.Comment on how close the experimental results matched the ideal values. Also commenton the relation between the width of the mainlobe and the peak-to-sidelobe amplitude.
  4. Submit the plots of your designed filter's impulse response and the magnitude of the filter's DTFT.

Filter design using the kaiser window

Download nspeech2.mat for the following section.

Tolerance specifications for the frequency response of a filter.

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 β 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:

δ = min { δ p , δ s }

The Kaiser window function of length N is given by

w ( n ) = I 0 β n ( N - 1 - n ) N - 1 I 0 ( β ) n = 0 , 1 , ... , N - 1 0 otherwise

where I 0 ( · ) is the zero'th order modified Bessel function of the first kind, N is the length of the window, and β is the shape parameter.

Kaiser found that values of β and N could be chosen to meet any set of design parameters, ( δ , ω p , ω s ) , by defining A = - 20 log 10 δ and using the following two equations:

β = 0 . 1102 ( A - 8 . 7 ) A > 50 0 . 5842 ( A - 21 ) 0 . 4 + 0 . 07886 ( A - 21 ) 21 A 50 0 . 0 A < 21
N = 1 + A - 8 2 . 285 ( ω s - ω p )

where · is the ceiling function, i.e. x is the smallest integer which is greater than or equal to x .

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Purdue digital signal processing labs (ece 438). OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10593/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?

Ask