Peak phasor versus positive-frequency Fourier coefficient (source code)

= Peak phasor versus positive-frequency Fourier coefficient

<Peak phasor versus positive-frequency Fourier coefficient> distinguishes a real <sinusoid>'s reconstruction <amplitude> from one coefficient in its two-sided exponential expansion. For $v(t)=\operatorname{Re}(\widehat V e^{i\omega t})$,
$$
v(t)=\frac{\widehat V}{2}e^{i\omega t}+\frac{\widehat V^{\,*}}2e^{-i\omega t}.
$$
Thus the positive-frequency <Fourier coefficient> is half the <peak amplitude phasor>. The negative-frequency coefficient is its conjugate. A real <sinusoid> needs both; a complex exponential input has a different one-sided reconstruction.

The distinction also controls a sampled record. For $N$ evenly spaced samples of a real <sinusoid> with exactly $k$ cycles in the record and $0<k<N/2$, use the unscaled forward <discrete Fourier transform>
$$
X_k=\sum_{m=0}^{N-1}v_m e^{-2\pi i km/N}.
$$
Orthogonality of the discrete exponentials gives $X_k=N\widehat V/2$. Consequently
$$
\widehat V=\frac{2X_k}{N},\qquad
V_{\rm rms}=\frac{\sqrt2|X_k|}{N}.
$$
The default SciPy forward FFT has exactly this unscaled convention; its forward and orthonormal modes have different factors.<SciPy 1.16.2 documentation>[scipy.fft.fft, Parameters: norm; Notes: forward sum and real-input symmetry]{ref}

For an original example, sample $v_m=3\cos(2\pi5m/64)-4\sin(2\pi5m/64)$ volts. Then $\widehat V=3+4i$ volts and $X_5=96+128i$ volts. Dividing by 64 gives the positive-frequency coefficient $1.5+2i$ volts; doubling it recovers the peak phasor. The RMS <amplitude> is $5/\sqrt2\approx3.536$ volts.

These exact relations assume coherent sampling of the stated <sinusoid> without aliased extra components. DC and, for even $N$, the Nyquist bin do not have distinct conjugate partners and must not be doubled. With a noninteger number of cycles or a windowed record, <finite-record phasor extraction with coherent sampling> must be distinguished from a generic bin readout; <spectral leakage> and the window's <amplitude> normalization alter the estimate. The parent <peak amplitude phasor> specifies the continuous-time convention before any sampled transform is chosen.