Understanding Windowing in FFT Analysis
Definition: What is a Windowing Function?
A windowing function, or “window,” is a mathematical function that is applied to a block of time waveform data before it is processed by the Fast Fourier Transform (FFT) algorithm. The window’s shape is designed to smoothly taper the amplitude of the signal down to zero at the beginning and end of the time block. This process is a crucial signal processing step that minimizes a specific type of error known as spectral leakage, thereby improving the accuracy of the resulting frequency spectrum.
The Problem: Spectral Leakage
The FFT algorithm has an inherent assumption: it assumes that the finite block of time data it is analyzing is a single, perfectly repeating cycle of a periodic signal. In reality, this is almost never the case. When the data acquisition starts and stops, it creates sharp, artificial discontinuities at the boundaries of the time block because the end of the signal does not match up perfectly with the beginning.
The FFT interprets these sharp “jumps” as high-frequency components that don’t actually exist in the real signal. This causes the energy from a single, true frequency peak to “leak” out into adjacent frequency bins in the spectrum. The effects of spectral leakage are:
- Reduced Amplitude Accuracy: The measured amplitude of the peak will be lower than its true value because its energy has been spread out.
- Broadened Peaks: The peak will appear wider and less defined than it should be.
- Loss of Resolution: The leakage can raise the noise floor around a large peak, making it impossible to see smaller, nearby frequency peaks.
The Solution: Applying a Window
A windowing function solves this problem by smoothly forcing the signal to be periodic within the time block. By multiplying the raw time waveform by the window function, the amplitudes at the very beginning and end of the block are tapered to zero. This eliminates the sharp discontinuities, effectively “tricking” the FFT into seeing a smooth, continuous signal.
The result is a much cleaner spectrum with:
- Significantly improved amplitude accuracy.
- Sharper, more well-defined frequency peaks.
- A lower noise floor, allowing small signals to be seen next to large ones.
Common Types of Windows
There are many different windowing functions, each with slightly different characteristics. For general-purpose machinery vibration analysis, one window is used almost universally:
Hanning Window
The Hanning window provides a very good compromise between frequency resolution and amplitude accuracy, and it is the recommended and default window for virtually all standard machinery vibration measurements. Unless you have a very specific reason to do otherwise, the Hanning window should always be used.
Other Windows
- Rectangular Window (or Uniform/None): This is equivalent to applying no window. It has the best frequency resolution but the worst spectral leakage. It is only suitable when the signal is known to be perfectly periodic within the time block or for analyzing very sharp, transient events.
– Flattop Window: This window provides the most accurate amplitude measurements, but it has very poor frequency resolution (very wide peaks). It is used for calibration purposes or when the exact amplitude of a peak is more important than its exact frequency.
– Hamming Window: Very similar to the Hanning window, with minor trade-offs.
When to Use a Window
The simple rule for machinery condition monitoring is: always use a Hanning window for general spectral analysis. Disabling the window will lead to inaccurate and potentially misleading data. Modern vibration analyzers apply the Hanning window by default because it is essential for producing a reliable and accurate frequency spectrum.