FFT Windowing and Spectral Leakage Experiment

The FFT treats a finite time record as periodic. When a signal does not fall exactly on a spectral line, energy leaks into neighbouring lines and the peak reads low. The window function controls this effect.

All windows on the same signal

WindowError · ENBW
Rectangular (uniform)— · —
Hann (Hanning)— · —
Hamming— · —
Blackman— · —
Flat-top— · —
Peak amplitude error —
Resolution (Δf)
—
Line position (f/Δf)
—
Measured peak amplitude
—
Frequency of the peak line
—
ENBW
—
Coherent gain
—
Sample rate · N
— · —
Record length
—

Spectrum around the peak (dB re true amplitude)

Time record and window shape

These tools are intended for preliminary assessment and training. Decisions on critical equipment should be based on on-site measurement and expert evaluation.

How to use

  1. Enter the signal frequency and analyser settings (Fmax, number of lines).

  2. Pick a window; the table shows the amplitude error of every window for the same signal.

  3. Move the frequency between lines (e.g. 24.6 → 24.75 Hz) to see how the error changes; "snap" shows the best case.

Theory & formulas

fs = 2.56·Fmax, N = 2.56·lines, Δf = Fmax/lines, record length T = N/fs = 1/Δf.

Worst-case amplitude (picket fence) error: rectangular ≈ −36%, Hann ≈ −15%, Hamming ≈ −18%, flat-top < 0.1%. Hann is the general-purpose standard in vibration analysis.

ENBW (equivalent noise bandwidth) N·Σw²/(Σw)² in lines; a wide ENBW raises the noise floor and makes close frequencies harder to separate.

Impact tests use no window or a force/exponential window; continuous signals use Hann, and flat-top is preferred for calibration and accurate amplitude.

Frequently asked questions

Which window should I use?

Hann for routine machine vibration. Flat-top for calibration and tolerance checks where amplitude must be exact. To separate two close frequencies, increase resolution; flat-top makes peak separation harder.

Why does the peak look wide in the spectrum?

The main-lobe width of the window and a signal falling between lines spread the peak over several lines. More lines or a lower Fmax make it narrower.