The FFT implicitly assumes that its input is periodic. In reality this is almost never the case – we cut a finite section out of a continuous signal. This cut creates a jump at the frame edges, which shows up as the leakage effect: sharp frequency lines become broad, smeared mountains.

Leakage in concrete terms

Example: pure 1 kHz sinusoid sampled at fs = 51.2 kHz, N = 8,192. Resolution Δf = 6.25 Hz. If the 1 kHz line falls exactly on a bin, you see a clean peak. If it falls between bins (e.g. 1,003 Hz), the energy smears over 5–10 bins. A weaker nearby line drowns in leakage noise.

The cure: smooth roll-off

xw(n) = x(n) · w(n)

The window function smoothly tapers the frame to zero at both ends so no jump remains. Price: signal weighted more in the middle, frequency resolution broadens.

The most important windows

Rectangle: no window. Narrowest main lobe, strong side lobes (−13 dB). Only useful for naturally periodic signals.

Hann: w(n) = 0.5 · (1 − cos(2π n / (N−1))). Classic for general spectral analysis. Main lobe 1.5× wider, side lobes −31 dB.

Hamming: w(n) = 0.54 − 0.46 · cos(2π n / (N−1)). Side lobes −43 dB.

Blackman-Harris: very strong side lobe attenuation (< −90 dB), main lobe 4× wider.

Flat-Top: optimised for amplitude measurement. Main lobe 5× wider, amplitude error < 0.01 dB.

Comparison matrix

WindowMain lobeHighest side lobeAmplitude errorUse
Rectangle1.0−13 dB3.9 dB maxperiodic signals
Hann1.5−31 dB1.5 dB maxNVH default
Hamming1.4−43 dB1.7 dB maxcommunications
Blackman-Harris4.0−92 dB0.8 dB maxweak next to strong
Flat-Top5.0−70 dB< 0.01 dBamplitude measurement

Decision guide

  • Resonance detection: Hann or Blackman-Harris.
  • Order analysis on motors: Hann (default).
  • Calibration / level measurement: Flat-Top.
  • Triggered hammer excitation: Rectangle (signal naturally decays).