= Finite-record phasor extraction with coherent sampling
<Finite-record phasor extraction with coherent sampling> recovers a <sinusoid>'s complex <amplitude> by arranging its <frequency> on a discrete Fourier bin. Let samples be taken at $t_m=t_0+m\Delta t$, with $N\Delta t$ containing exactly $k$ cycles, where $k$ is an integer and $0<k<N/2$. For
$$
x_m=B+\operatorname{Re}(\widehat V e^{i\omega(t_0+m\Delta t)}),\qquad
\omega\Delta t=\frac{2\pi k}{N},
$$
the constant baseline cancels from bin $k$. The <peak phasor versus positive-frequency Fourier coefficient> relation then gives the estimate
$$
\widehat V=\frac2N e^{-i\omega t_0}
\sum_{m=0}^{N-1}x_m e^{-2\pi ikm/N}.
$$
The factor $e^{-i\omega t_0}$ assigns <wave phase> to the stated physical time origin; without it the coefficient refers to the record's start. The default forward FFT is unscaled, while other FFT normalization modes require different prefactors.<SciPy 1.16.2 documentation>[scipy.fft.fft, Parameters: norm; Notes: forward sum]{ref}
For an original example, sample at $80\,\mathrm{kHz}$ with $N=80$ and use a $7\,\mathrm{kHz}$ tone, so $k=7$ and the cyclic record duration is $1\,\mathrm{ms}$. Let its physical peak phasor be $2e^{i\pi/6}\,\mathrm V$ and let $t_0=50\,\mathrm{\mu s}$. The record-start <wave phase> is $30^\circ+126^\circ=156^\circ$, and the unscaled bin is
$$
X_7=80e^{i156^\circ}\,\mathrm V.
$$
Applying both $2/N$ and the time-origin correction recovers the physical $2e^{i30^\circ}\,\mathrm V$ phasor. Its RMS <amplitude> is $\sqrt2\,\mathrm V$. Omitting the start-time correction would give a correct magnitude but a different <wave phase> reference.
With independent zero-mean real <noise> of <variance> $\sigma^2$ on each sample, the extracted phasor remains unbiased. Orthogonality gives <noise> <variance> $2\sigma^2/N$ in each real and imaginary component and zero <covariance> between them. For $\sigma=0.01\,\mathrm V$ here, each component's <standard deviation> is about $1.581\,\mathrm{mV}$. These are complex-amplitude uncertainties; taking a magnitude is a nonlinear operation and need not retain unbiasedness.
<Coherent sampling> must describe the actual source/clock relationship, not just the rounded <frequency> entered into software. Frequency drift, extra tones, aliasing or a changed window invalidate the simple exact-bin identity; <spectral leakage bias in harmonic distortion measurements> shows one consequence. A <coherent gain of a window> can correct an on-bin <amplitude> scale in suitable models, but cannot in general turn a noncoherent one-bin reading into an exact phasor.
Back to article page