FFT Window Explorer
See how the analysis window reshapes a signal's spectrum. Compose a test signal (sinusoids + noise), choose Fs, FFT length and window, then read the FFT spectrum in dB and the window metrics (ENBW, scalloping, main lobe, side-lobe). Demonstration tool.
FFT / window explorer tool
1 · Signal and analysis
Analysis
Reproducible test signal (deterministic seeded noise). The spectrum is single-sided and calibrated in peak amplitude (coherent-gain corrected). Demonstration tool.
Window metrics
How it works
The FFT and frequency resolution
The FFT (Fast Fourier Transform) computes the Discrete Fourier Transform of N samples: it decomposes the signal into N/2+1 equally spaced frequency bins between 0 and Fs/2 (Nyquist). The spacing between two bins — the frequency resolution — depends only on Fs and N:
More samples (large N) at a given Fs give finer bins, so closer spectral lines can be resolved. But more samples mean a longer time window: finer resolution requires a longer observation time.
What is spectral leakage?
The FFT implicitly assumes the N samples repeat periodically. If a sinusoid does not complete an integer number of cycles in the window, a discontinuity appears at the edges and the energy of that line spills onto neighbouring bins: this is spectral leakage. A strong line can then bury a weak nearby one, even when their frequencies would be resolvable.
Why use windows?
A window weights samples and changes leakage from periodic extension. Endpoints need not be zero: this depends on the window. The price: the spectral line widens (the main lobe) but the side-lobes — the spilled energy — collapse. The rectangular window (no window) has the narrowest lobe but high side-lobes (−13 dB); Hann, Hamming, Blackman and Blackman-Harris trade a wider lobe for ever lower side-lobes.
What are ENBW and scalloping?
The Equivalent Noise Bandwidth (ENBW) is the width, in bins, of the ideal rectangular filter that passes the same noise power as the window. It measures how much noise each bin "collects": a window with high ENBW worsens the signal-to-noise ratio of a line. It is computed from the coefficients alone:
The scalloping loss is the worst-case amplitude error: a line falling exactly halfway between two bins is read attenuated. The flat-top window is designed to minimise it (scalloping ≈ 0 dB), at the cost of the widest main lobe of all: suited to amplitude measurement, not to resolving close lines.
Which window should you use?
- Rectangular — maximum resolution, high side-lobes (−13 dB). Only for signals with an integer number of cycles in the window (transients, synchronous sinusoids).
- Hann / Hamming — the general compromise: low side-lobes, moderate lobe. The default choice for generic analysis.
- Blackman / Blackman-Harris — very low side-lobes (down to −92 dB), to find weak lines next to strong ones, accepting a wider lobe.
- Flat-top — minimal scalloping: precise amplitude measurement, not for resolving close lines.