= Spectral leakage bias in harmonic distortion measurements
<Spectral leakage bias in harmonic distortion measurements> occurs when a finite record spreads a strong component into bins interpreted as distinct harmonics. A waveform can have zero physical <total harmonic distortion> while a naive FFT-bin ratio reports otherwise. Confining a <sinusoid> to a finite interval creates spectral sidelobes; the pinned primary guide derives this leakage from the finite-time Fourier transform.<SciPy 1.16.2 documentation>[Signal Processing guide, Spectral Analysis, equations 1–3 and window comparison]{ref}
For an exact discrete calculation, take $x_m=A\cos(2\pi\nu m/N+\phi)$, where $\nu$ is the number of cycles in the record. With the unscaled forward <discrete Fourier transform>, a finite geometric sum gives
$$
X_k=\frac A2\{e^{i\phi}D_N(\nu-k)+e^{-i\phi}D_N(-\nu-k)\},
$$
where
$$
D_N(q)=\sum_{m=0}^{N-1}e^{2\pi iqm/N}
=e^{i\pi q(N-1)/N}\frac{\sin\pi q}{\sin(\pi q/N)}
$$
whenever the denominator is nonzero, with the finite-sum limit elsewhere. Integer-cycle <coherent sampling> makes the unwanted integer bins cancel; a noninteger cycle count generally does not. The negative-frequency contribution also matters because the input is real.
For an original pure-tone example, let $A=1$, $\phi=0$, $N=128$ and $\nu=5.3$. Its true higher-harmonic <amplitudes> are zero. Yet choosing the nearest bins $5$, $11$, and $16$ for the fundamental, second and third harmonic gives
$$
\frac{\sqrt{|X_{11}|^2+|X_{16}|^2}}{|X_5|}\approx0.06581.
$$
A naive result would be about $6.58\%$ distortion from this undistorted <sinusoid>. This is an exactly specified record calculation, not an instrument's measured distortion floor.
A window reduces some sidelobes at the cost of a broader main lobe and a changed <amplitude> normalization. Its <coherent gain of a window> must be treated consistently, and one cannot assume that one selected bin captures a noncoherent tone's full <amplitude>. Zero padding samples the same finite-record spectrum more densely; it does not restore missing observation time or remove leakage.
A measurement can instead synchronize the source and acquisition for an integer number of cycles, fit a justified sinusoidal model, or use a validated window/band-integration method. The <finite-record phasor extraction with coherent sampling> gives a particularly transparent exact case. Calibrated receiver response and actual harmonic coverage remain necessary, as in the primary Anritsu apparatus.<Total Harmonic Distortion Measurements by Anritsu>[Printed pp. 2–3, definitions and frequency-dependent receiver calibration]{ref} Power spectral density and squared-amplitude spectrum outputs also have different units; an arbitrary square root of a density bin is not a calibrated harmonic <amplitude>.<SciPy 1.16.2 documentation>[scipy.signal.periodogram, Parameters: scaling; Notes]{ref}
Back to article page