Sampling & aliasing

A waveform needs more than its fundamental. Change the wave and sample rate to see what happens when its harmonics cross the Nyquist limit.

FUNDAMENTAL ONLY
1 Hz40 Hz
2 samples/s400 samples/s
TRY:
All harmonics capturedNyquist: 10 HzHarmonics below Nyquist: 1 / 1Full capture needs: > 12 samples/s

Time domain

AMPLITUDE / TIME
Original waveform, samples, and reconstructioncosine wave with a 6 hertz fundamental, sampled at 20 samples per second. 1 of 1 harmonics are below Nyquist. The dashed reconstruction passes through every sample.-10100.10.20.30.40.5Time (s)
Original waveReconstructedSamples

Frequency domain

TWO-SIDED MAGNITUDE
Original and reconstructed spectraOriginal harmonics extend to 6 hertz. Reconstructed harmonics fold into the shaded band from minus 10 to plus 10 hertz; overlapping components combine with their phase.00.51-20-1001020Frequency (Hz)
OriginalReconstructed± Nyquist band

Every included harmonic is below Nyquist, so the reconstruction preserves the source waveform’s shape.

A single unit-amplitude tone. No anti-alias filter is applied. Reconstruction combines all folded harmonics with their signs and phases, assuming an infinite uniform sample train; the visible window only shows a portion. Spectra show ideal lines, not an FFT. Coincident lines can reinforce or cancel.

Track each harmonic
Source harmonics and where sampling puts them
HarmonicOriginalFolded toStatus
1 × f6 Hz6 HzCaptured