# Spectral leakage

Zoomed view of spectral leakage.

In Fourier analysis, spectral leakage refers to the misrepresentation of the Fourier components of a signal that are not harmonic to the fundamental frequency.

The Fourier transform of a function of time, s(t), is a complex-valued function of frequency, S(f), often referred to as an amplitude spectrum. Any linear time-invariant operation on s(t) produces a new spectrum of the form H(f)•S(f), which changes the relative magnitudes and/or angles (phase) of the non-zero values of S(f). Any other type of operation creates new frequency components that may be referred to as spectral leakage in the broadest sense. Sampling, for instance, produces leakage, but we call it aliasing. For Fourier transform purposes, sampling is modeled as a product between s(t) and a Dirac comb function. The spectrum of a product is the convolution between S(f) and another function, which inevitably creates the new frequency components. But the term 'leakage' usually refers to the effect of windowing, which is the product of s(t) with a different kind of function, the window function. Window functions happen to have finite duration, but that is not necessary to create leakage. Multiplication by a time-variant function is sufficient.

Comparison of two window functions in terms of their effects on equal-strength sinusoids with additive noise. The sinusoid at bin -20 suffers no scalloping and the one at bin +20.5 exhibits worst-case scalloping. The rectangular window produces the most scalloping but also narrower peaks and lower noise-floor. A third sinusoid with amplitude -16 dB would be noticeable in the upper spectrum, but not in the lower spectrum.

## Discrete-time functions

When both sampling and windowing are applied to s(t), in either order, the leakage caused by windowing is a relatively localized spreading of frequency components, with often a blurring effect, whereas the aliasing caused by sampling is a periodic repetition of the entire blurred spectrum.