This is the eighth post in the blinkdagger signal processing series.

Matlab Logo In this post, we’re going to discuss the proper window to choose based on the application and the situation. For the most part (95% of the time) you’ll be best off using the Hanning (Hann) Window because of its versatility and overall effectiveness across the board. Of course, there are exceptions, so read on to learn more about windows and their characteristics.

Contents

The Fantastic Four

When it comes to windowing, there are four main things to consider: signal type, spectral resolution, spectral leakage, amplitude accuracy. Below is a nice table that is lifted from this document that shows which window to use in a particular situation:
Window Chart

Spectral Resolution and Spectral Leakage

When two peaks are very close to each other, it can be difficult to differentiate between the two peaks. In this case it is desirable to increase the spectral resolution so that you can more easily differentiate between these two peaks. The main characteristic of the window that drives spectral resolution is the width of the main lobe. The shorter the width, the better the resolution.

Window Frequency Response

We discussed what spectral leakage is in an earlier post. Basically, spectral leakage is energy within a frequency bin that shouldn’t be there. The amount of spectral leakage is also dependent on the main lobe width. The shorter the width of the main lobe, the MORE spectral leakage. Thus, there is a trade off between mitigating spectral leakage and obtaining better spectral resolution.

Amplitude Accuracy

Amplitude accuracy at a particular frequency can be of extreme importance. If you want to most accurately indicate the level of a peak, then the Flat Top Window (shown below) is the window to use. The maximum sidelobe level is the main factor in determining your amplitude accuracy. The lower your maximum sidelobe level relative to the main lobe, the better the amplitude accuracy will be.

Examples of Three Different Windows

Below are figures for the Flat Top, Blackman, and Hanning Windows. Notice that for the Flat Top Window, the maximum sidelobe level is much lower than other windows. Also note the width of of the main lobe for each window. The Hanning window has the narrowest main lobe of the three and has the best frequency resolution among the three. The Flat Top and Blackman window have wider main lobe and offer better mitigation of spectral leakage.

Flat Top Window

Blackman Window

Hanning Window

Other Considerations

If there is a lot of interference far away from the frequency of interest, then you want to choose a window with a high sidelobe roll-off rate. Similary, if there is a lot of interference near the frequency of
interest, then you should choose a window with a low sidelobe roll-off rate.

Impact measurements are an interesting class of signals. In these cases, an exponential decaying window should be used. This window forces the response to zero at the end of the signal (which incidentally will cause your damping estimates to be higher!).

This will be the end of my mini-series on windowing. For more information, please visit the references that are listed below. They go into much more depth and offer plenty of examples that are extremely useful.

References

Bores Signal Processing

Understanding FFT Windows

FFT Fundamentals