and Windowing
Why finite observation windows cause spectral leakage, and how window functions trade resolution for leakage suppression.
Truncate Signals
Recording N samples is equivalent to multiplying by a rectangular window. In the frequency domain this is convolution — even a pure tone gets smeared across many bins.
Across Bins
The rectangular window's frequency response (Dirichlet kernel) has sidelobes at −13 dB. When a sinusoid falls between bins, these sidelobes spread its energy into neighboring bins.
Taper the signal smoothly to zero at both ends before computing the DFT. Lower sidelobes at the cost of a wider main lobe.
A raised-cosine taper — smoothly reaches zero at both ends, eliminating the abrupt cut-off that causes the rect window's severe sidelobes.
Leakage
You cannot minimize both simultaneously. Better sidelobe suppression comes with a wider main lobe — meaning you need the tones to be further apart to distinguish them.
- Rect — coherent sampling only (tones aligned to bins)
- Hann — general-purpose default; good balance
- Blackman — detecting weak signals next to strong ones
- Kaiser(β) — tune the trade-off continuously
- More data = better resolution; zero-padding only smooths the plot
- Divide by Σw[n] to correct amplitude after windowing
- Finite observation → implicit rect window → convolution with Dirichlet kernel in frequency
- Spectral leakage: energy from one tone spreads into adjacent bins
- Coherent sampling (f = k·f_s/N) eliminates leakage
- Window functions taper to zero — trade wider main lobe for lower sidelobes
- Hann (−31 dB) is the standard default; Blackman (−58 dB) for high dynamic range
- Effective resolution Δfeff = α·f_s/N where α ≥ 1 depends on window
- More data improves resolution; zero-padding only makes the plot look smoother