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). Demonstrative tool.
FFT / window explorer tool
1 · Signal and analysis
Reproducible test signal (deterministic seeded noise). The spectrum is single-sided and calibrated in peak amplitude (coherent-gain corrected). Demonstrative tool.
Analysis
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: resolution is bought with 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.
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: 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 multiplies the signal by a function that tapers smoothly to zero at the edges, removing the discontinuity. The price: the spectral line widens (the main lobe) but the side-lobes collapse. The rectangular 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.
A window multiplies the signal by a function that tapers smoothly to zero at the edges, removing the discontinuity. 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. The scalloping loss is instead the worst-case amplitude error, when a line falls halfway between two bins. The flat-top window minimises it (≈ 0 dB).
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 precisely to minimise it (scalloping ≈ 0 dB), at the cost of the widest main lobe of all — ideal for amplitude measurement, poor for resolving close lines.
Which window should you use?
The rectangular window gives maximum resolution but the worst side-lobes, only for signals with an integer number of cycles. Hann and Hamming are the general compromise for generic analysis. Blackman and Blackman-Harris have very low side-lobes (down to −92 dB) to find weak lines next to strong ones. The flat-top is for precise amplitude measurement.
- Rectangular — maximum resolution, worst side-lobes. 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.