What is left if I drop a harmonic?
Three reconstructions of an 8 ms signal, starting from the same signal.
The signal has a wide oscillation and one that makes two turns in the same time. If I keep only the first, where does the second end up? To be able to answer I built a signal whose every component I know.
y(t) = 2 + 1.5 cos(2π · 125t) + 0.7 sin(2π · 250t) V
Here t is in seconds, the origin is zero and the declared period is 8 ms. The synthetic CSV (ZIP) contains 80 samples spaced 0.1 ms apart from 0 to 7.9 ms. Eighty steps cover an 8 ms period. The 8 ms endpoint would repeat the initial phase, so it is excluded.
Estimate two harmonics, retain one
Fitted harmonics decides how many harmonic coefficients are estimated together. Retained orders says up to which harmonic each displayed sum goes, always starting from the DC level. With fit order 2 and retained orders 0 1 2, the three curves use the same fit. The viewer used orthogonal_dft without a window. On the 80 uniform times that cover the phases of one period, the model components are orthogonal and the calculation is equivalent to an equally weighted least-squares fit. Order 0 is the 2 V level, order 1 adds the cosine at 125 Hz and order 2 adds the sine at 250 Hz.

I also tried Fitted harmonics = 1. On this uniform one-period grid, the 250 Hz sine and the order-1 components are orthogonal: the estimate of the fundamental stays at 1.5 V. On a different interval or with different weights, removing terms from the fit can change the remaining coefficients. Reducing only the retained order leaves the coefficients of the full fit unchanged.
How much is left in the samples?
I evaluate each partial sum at the same instants as the observations, from 0 to 7.9 ms. The residual ri is the difference between the observed value and the sum at that instant. The RMS is √(Σri²/80), with the same weight for each of the 80 samples. For order 0 the expected value is about 1.17047 V. For order 1 a sine of 0.7 V peak is left, that is 0.494975 V RMS. Order 2 contains the whole formula. The residual is zero in the exact calculation and at rounding level in the run. The viewer reported maximum absolute values on the samples of 1.90282 V, 0.7 V and 1.78 × 10−15 V for orders 0, 1 and 2. The maximum and the RMS summarise the same residual in two different ways. The test concerns the synthetic samples with a declared period.
Repeat the test
Import the CSV with Acquisition → Generic CSV, as a generic table. In the variable configuration assign s and role time to time, V and role signal to voltage. Confirm the import. In Mathematics → Study → Fourier partial sums… choose source, time and response. Set period 0.008, fit 2 and orders 0 1 2. Run Fit and review and then Publish Graph with a free ID. The CSV extracted from the published Dataset contains 129 reconstruction points from 0 to 8 ms, endpoints included. The full-fit column matches the order-2 sum. To redo the RMS take the 80 times of the input CSV, from 0 to 7.9 ms, and evaluate the partial-sum formulas on those. In the P012 test Store Function… stayed disabled after the Graph was rendered.
Reconstruction extracted from the published Dataset (ZIP) · Formula, generation and independent calculation (ZIP).