June 2, 2021
Back to: Fundamentals of Signal Processing
A window sequence is a finite impulse response (FIR) filter in structure but essentially the opposite in a typical application. A window sequence is used for multiplication with a data sequence (windowing the data), whereas an FIR sequence is used for convolution with a data sequence (filtering the data).
Here is an example:
A window function provides a weighted selection of a portion of a time waveform for fast Fourier transform (FFT) analysis. It is generated by multiplying the original time waveform by a user-defined window function of some width. In this case, width equals two times the number of analysis lines.
Heisenberg Uncertainty Principle
This multiplication in time results in a distortion in frequency. While the FFT of the windowed waveform will be similar to that of the original waveform, it will have been altered. In general, the larger the window in time, the less distortion in frequency.
The Heisenberg uncertainty principle sums up this conflict. Increased resolution in time results in decreased resolution in frequency (more distortion); decreased resolution in time results in increased resolution in frequency (less distortion).
Characteristics of Window Functions
For each window size, a window function will result in different distortion characteristics. All window functions are well defined in both time and frequency. The exact characteristics of the resulting distortion are dependent on the definition of the selected window function.
Cropping the data is not an escape from the window dilemma—cropping is the exact equivalent of multiplying by a rectangular window. Rectangular windows have poor windowing properties, hence the motivation to identify alternate windows.
If you are searching for the exact amplitude of the signal you are analyzing, then the optimal choice is the Flat Top window, as it exhibits the best amplitude resolution. If you are searching for the exact frequency of the peaks of a signal—and it has the length needed to avoid discontinuities—then the Rectangular window is ideal.
Otherwise, the Blackman, Hamming, or Hanning windows perform well. Each has certain advantages and disadvantages when compared to the other two.
For example, the Hamming has a superior side lobe height to the Hanning but a worse side lobe roll-off rate. The Blackman is a combination of the other two windows with a better side lobe roll-off rate to the Hanning and a superior side lobe height to both windows. Consequently, the Blackman has a wider main lobe width.
All windows compromise these metrics, and it is up to the user to decide which metrics are important and which can be sacrificed.
Two signals are close in the frequency domain: one is at 50Hz and the other at 51Hz.
The user wants to choose a window function with a narrow main lobe width because they have better selectivity for finding closely spaced signals. In this case, a lower side lobe height is more important than a superior side lobe roll-off rate.
Between the Blackman, the Hanning, and the Hamming, the user rules out the Blackman because it has a wider main lobe width. They also prefer the Hamming over the Hanning, as it has a lower side lobe height.
If the two signals are far apart (500Hz and 1,000Hz), then the main lobe width is less important, and the side lobe roll-off rate is more important than the side lobe height. In this case, the side lobe roll-off rate has the space for a greater effect.
Yet, this doesn’t mean that the main lobe width or side lobe height is unimportant, and it is wise to optimize both. When attenuation (side lobe roll-off rate and side lobe height) is more important than selectivity (main lobe width), the user chooses the Blackman because it prioritizes selectivity over attenuation.
- The rectangular window is the optimal choice if the user can choose a window length with no signal discontinuities. This window does not distort the spectral representation of the signal when there are no discontinuities.
- The industry standard minimum side lobe height is approximately -45dB.
- The equivalent noise bandwidth (ENBW) represents the width of a rectangle in bins. Its area is equivalent to the energy of the respective window. A lower ENBW is ideal because less noise is inserted into the spectral representation of the signal.
- Karras, Thomas J. “Equivalent Noise Bandwidth Analysis from Transfer Functions.” Goddard Space Flight Center, Greenbelt, Maryland, November 1965.
- Samad, Md Abdus., “A Novel Window Function Yielding Suppressed Mainlobe Width and Minimum Sidelobe Peak.” AIRCC (International Journal of Computer Science, Engineering and Information Technology (IJCSEIT) 2, no. 2 (2012).