Understanding the Hanning Window
The Hanning window (more formally the Hann window, named after Julius von Hann) is a smooth, bell-shaped weighting function applied to a block of time-waveform data before it is passed to a Fast Fourier Transform (FFT). It is by far the most widely used of all the windowing functions in vibration analysis, and its single purpose is to suppress a measurement artefact called spectral leakage. When the window is multiplied with the captured signal, it forces the amplitude smoothly to zero at the start and end of the time block while leaving the centre of the signal essentially unchanged.
1. Definition: What is a Hanning Window?
Mathematically, the Hanning window is a raised half-cosine: each time sample is multiplied by a coefficient that rises from zero at the first sample, reaches unity at the middle of the block, and falls back to zero at the last sample. The curve follows the form w(n) = 0.5 − 0.5·cos(2πn/N), where n is the sample index and N the block length. The shape matters because it tapers the data gently rather than chopping it off abruptly. By driving the endpoints to zero, the windowed block can be repeated end-to-end without any sudden step — exactly the condition the FFT silently assumes.
2. Why a Window is Necessary: Spectral Leakage
The FFT treats the finite block of samples it receives as one perfect, endlessly repeating cycle of the signal. That assumption only holds if a whole number of cycles of every frequency component fits exactly into the block. For a real machine — where shaft speed drifts slightly and many unrelated frequencies are present at once — this is almost never true.
When a non-integer number of cycles is captured, the end of the block does not line up with the beginning. The FFT interprets the resulting mismatch as a sharp jump, or discontinuity, at the block boundary. That artificial step carries energy which is not part of the real signal, and the energy “leaks” across the surrounding frequency bins of the spectrum. The consequences are:
- Smearing: a single sharp frequency peak spreads into a broad, skirted hump, making the exact frequency hard to pinpoint.
- Masking: the raised noise floor around a strong peak can completely bury a small, nearby peak — for example a low-level bearing tone sitting close to a dominant running-speed (1×) component.
3. How the Hanning Window Solves the Problem
Because the window forces the signal to zero at both boundaries, the artificial discontinuity disappears. The FFT now sees a smoothly transitioning, genuinely periodic block and processes it far more faithfully. Leakage collapses dramatically, which delivers two practical benefits:
- Better frequency definition: the smearing is contained, so peaks become narrow and clearly separated. Closely spaced features — such as running-speed harmonics sitting near bearing fault frequencies — stay distinct.
- Better amplitude accuracy: tapering the data does reduce the apparent peak height, but every analyser applies a fixed amplitude-correction factor (≈1.63, or +2.27 dB) to restore the true level. Because less energy has bled into neighbouring bins, the amplitude reported at the correct bin is more trustworthy.
The one cost is a modest widening of the main lobe — a Hanning-windowed tone is about four bins wide. If two frequencies sit closer together than that, you need finer resolution rather than a different window; a quick way to size your settings is the FFT Resolution Calculator, which relates block length, sampling rate and line spacing.
4. When to Use a Hanning Window
The Hanning window is the default, general-purpose choice for virtually all steady-state machinery vibration measurement. It strikes an excellent compromise between frequency resolution (separating close peaks) and amplitude accuracy (reading the right level). For routine FFT spectra on motors, pumps, fans and compressors it is the correct setting in the overwhelming majority of cases — and it is the window the portable two-channel Balanset-1A applies when it computes a diagnostic spectrum out in the field, where shaft speed is never perfectly constant and leakage would otherwise corrupt the result.
5. Hanning Compared with Other Windows
The Hanning window is not the only option, and choosing the right one depends on what you are trying to extract:
- Flattop: deliberately sacrifices frequency resolution for very high amplitude accuracy. It is the window of choice when calibrating a sensor or reading the precise level of a single dominant tone.
- Uniform (rectangular / “no window”): applies no tapering at all. It is reserved for transient and impact events — such as a bump test — that already begin and end at zero within the block, so no window is needed.
- Hanning: the balanced middle ground, and therefore the standard for everyday diagnostics.
In short, reach for Flattop when amplitude must be exact, Uniform when capturing a self-contained transient, and Hanning for everything else — which is most of the time.