<< Chapter < Page Chapter >> Page >

Effects of windowing

Applying the DTFT multiplication property X ω k n x n w n ω k n 1 2 X ω k W ω k we find that the DFT of the windowed (truncated) signal produces samples not of the true (desired) DTFT spectrum X ω , but of a smoothed verson X ω W ω . We want this to resemble X ω as closely as possible, so W ω should be as close to an impulse as possible. The window w n need not be a simple truncation (or rectangle , or boxcar ) window; other shapes can also be used as long as they limit the sequence to at most N consecutive nonzero samples. All good windows are impulse-like, and represent various tradeoffsbetween three criteria:

  • main lobe width: (limits resolution of closely-spaced peaks of equal height)
  • height of first sidelobe: (limits ability to see a small peak near a big peak)
  • slope of sidelobe drop-off: (limits ability to see small peaks further away from a big peak)

Many different window functions have been developed for truncating and shaping a length- N signal segment for spectral analysis.The simple truncation window has a periodic sinc DTFT, as shown in . It has the narrowest main-lobe width, 2 N at the -3 dB level and 4 N between the two zeros surrounding the main lobe, of the common window functions, but also the largest side-lobe peak, at about -13 dB.The side-lobes also taper off relatively slowly.

Rectangular window

Magnitude of boxcar window spectrum

Length-64 truncation (boxcar) window and its magnitude DFT spectrum

The Hann window (sometimes also called the hanning window), illustrated in , takes the form w n 0.5 0.5 2 n N 1 for n between 0 and N 1 . It has a main-lobe width (about 3 N at the -3 dB level and 8 N between the two zeros surrounding the main lobe) considerably larger than the rectangular window,but the largest side-lobe peak is much lower, at about -31.5 dB. The side-lobes also taper off much faster.For a given length, this window is worse than the boxcar window at separating closely-spaced spectral components of similar magnitude, but better for identifyingsmaller-magnitude components at a greater distance from the larger components.

Hann window

Magnitude of hann window spectrum

Length-64 Hann window and its magnitude DFT spectrum

The Hamming window , illustrated in , has a form similar to the Hann window but with slightly different constants: w n 0.538 0.462 2 n N 1 for n between 0 and N 1 . Since it is composed of the same Fourier series harmonics as the Hann window,it has a similar main-lobe width (a bit less than 3 N at the -3 dB level and 8 N between the two zeros surrounding the main lobe), but the largest side-lobe peak is much lower, at about -42.5 dB.However, the side-lobes also taper off much more slowly than with the Hann window. For a given length, the Hamming window is better than the Hann (and of coursethe boxcar) windows at separating a small component relatively near to a large component, but worse than the Hann for identifying very small components atconsiderable frequency separation. Due to their shape and form, the Hann and Hamming windows are also known as raised-cosine windows .

Hamming window

Magnitude of hamming window spectrum

Length-64 Hamming window and its magnitude DFT spectrum
Standard even-length windows are symmetric around a point halfway between the window samples N 2 1 and N 2 . For some applications such as time-frequency analysis , it may be important to align the window perfectly to a sample.In such cases, a DFT-symmetric window that is symmetric around the N 2 -th sample can be used.For example, the DFT-symmetric Hamming window is w n 0.538 0.462 2 n N . A DFT-symmetric window has a purely real-valued DFT and DTFT.DFT-symmetric versions of windows, such as the Hamming and Hann windows, composed of few discrete Fourier series termsof period N , have few non-zero DFT terms (only when not zero-padded) and can be used efficiently in running FFTs .

The main-lobe width of a window is an inverse function of the window-length N ; for any type of window, a longer window will always provide better resolution.

Many other windows exist that make various other tradeoffs between main-lobe width, height of largest side-lobe, and side-lobe rolloff rate.The Kaiser window family, based on a modified Bessel function, has an adjustable parameter that allows the user to tune the tradeoff over a continuous range.The Kaiser window has near-optimal time-frequency resolution and is widely used. A list of many different windows can be found here .

shows 64 samples of a real-valued signal composed of several sinusoids of various frequencies and amplitudes.

64 samples of an unknown signal
shows the magnitude (in dB) of the positive frequencies of a length-1024 zero-padded DFT of this signal(that is, using a simple truncation, or rectangular, window).

Magnitude (in dB) of the zero-padded DFT spectrum of the signal in using a simple length-64 rectangular window
From this spectrum, it is clear that the signal has two large, nearby frequency components with frequencies near 1 radian of essentially the same magnitude.

shows the spectral estimate produced using a length-64 Hamming window applied to the same signal shown in .

Magnitude (in dB) of the zero-padded DFT spectrum of the signal in using a length-64 Hamming window
The two large spectral peaks can no longer be resolved; they blur into asingle broad peak due to the reduced spectral resolution of the broader main lobe of the Hamming window.However, the lower side-lobes reveal a third component at a frequency of about 0.7 radians at about 35 dB lower magnitude than the larger components.This component was entirely buried under the side-lobes when the rectangular window was used, but now stands out well above the much lowernearby side-lobes of the Hamming window.

shows the spectral estimate produced using a length-64 Hann window applied to the same signal shown in .

Magnitude (in dB) of the zero-padded DFT spectrum of the signal in using a length-64 Hann window
The two large components again merge into a single peak, and the smaller component observed with the Hamming window is largely lost under the highernearby side-lobes of the Hann window. However, due to the much faster side-lobe rolloff of the Hann window's spectrum,a fourth component at a frequency of about 2.5 radians with a magnitude about 65 dB below that of the main peaks is now clearly visible.

This example illustrates that no single window is best for all spectrum analyses. The best window depends on the nature of the signal, and different windows maybe better for different components of the same signal. A skilled spectrum analysist may apply several different windows to a signal togain a fuller understanding of the data.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, The dft, fft, and practical spectral analysis. OpenStax CNX. Feb 22, 2007 Download for free at http://cnx.org/content/col10281/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'The dft, fft, and practical spectral analysis' conversation and receive update notifications?

Ask