Blackman-Harris window

What a window does to an FFT: leakage, sidelobes, resolution and noise, with Blackman-Harris compared against the other common windows.

–Highest sidelobe
–Noise bandwidth
–Scalloping loss
1

The window

An FFT of N samples assumes the record repeats forever. If a tone doesn't fit a whole number of cycles, the ends don't meet and the jump spreads energy across every bin. A window tapers the ends to zero so they meet smoothly. The cosine-sum windows below differ only in their coefficients.

Window shapes

2

Frequency response of the window

Every tone in the spectrum takes the shape of the window's own transform. The main lobe sets how close two tones can be and still be told apart. The sidelobes set how far below a strong tone a weak one can be and still show up.

Window transform, dB

Normalized to 0 dB at DC. The shaded band is the focus window's main lobe (null to null), and the dashed line is its highest sidelobe.

WindowMain lobe, null to null3 dB width6 dB widthHighest sidelobeSidelobe falloffCoherent gainNoise bandwidthScalloping lossWorst-case processing loss

Widths and noise bandwidth are in FFT bins. Falloff is dB per octave, measured two octaves apart well away from the main lobe. Worst-case processing loss is scalloping loss plus the noise-bandwidth penalty (10 log₁₀ ENBW): the most a tone's signal-to-noise ratio can drop through windowing and landing between bins. Select a row to make it the focus window.

3

Test signal

Build a signal of up to four tones plus noise in the side panel. Tone frequencies are in FFT bins, so a whole number sits exactly on a bin and a fraction sits between bins.

Time domain N samples

SignalSignal × focus window

Spectrum

Spectra are amplitude-calibrated: a tone of amplitude A on a bin centre reads 20 log₁₀ A dB with every window.

4

Leakage

Move the first tone from exactly on a bin to halfway between bins. On a bin, every window shows a clean line. Halfway, the rectangular window leaks energy into every other bin and its peak drops by up to 3.9 dB. Press Run to sweep it automatically.

Around the first tone ±16 bins

Rectangular (no window)Focus window
5

Masking

A strong tone next to a much weaker one. The weak tone is only visible where the strong tone's leakage has fallen below it. Rectangular sidelobes hide it. Blackman-Harris sidelobes are low enough to reveal it.

Strong and weak tone

6

Resolution

Two equal tones moving closer together. Wider main lobes merge sooner. Here a pair counts as resolved when the dip between the two peaks is at least 3 dB.

Two equal tones noise off

RectangularFocus window
WindowDip between peaksResolved?
7

FFT size and zero padding

A longer record (bigger N) narrows every bin, which is real resolution. Zero padding appends zeros before the FFT: it computes more points on the same underlying curve, so peaks look smoother and are easier to locate, but two tones the unpadded FFT can't separate stay merged. Set N and the padding in the side panel.

Same spectrum, padded and unpadded

Zero-padded FFTUnpadded FFT bins (the same values, fewer points)
8

Welch averaging

A single FFT of noise is ragged. Welch's method averages the spectra of many overlapping windowed segments, which smooths the noise floor. The window decides what the floor measures: with low sidelobes it's the true noise, with high sidelobes it's leakage from the tones. Overlap recovers data the window tapered away.

Averaged power spectrum

WindowFloor estimateFloor spreadSegments averaged