Sampling Theory and Nyquist
Every ADC samples an analog signal at discrete moments in time. The Nyquist-Shannon sampling theorem states precisely how fast you must sample to capture a signal correctly — and what goes wrong if you do not sample fast enough. This theorem underpins every digital audio system, every SDR receiver, and every digital radio modulation scheme. Violating Nyquist creates aliasing, a subtle form of interference that is impossible to remove after the fact.
Top: sampling a 1 kHz tone at 8 kHz correctly captures it. Bottom: sampling the same tone at only 1.5 kHz aliases it to a different (incorrect) frequency. Both the time-domain and frequency-domain effects are shown.
View LargerThe Nyquist Theorem
The Nyquist-Shannon sampling theorem states: to perfectly reconstruct an analog signal from digital samples, the sample rate must be at least twice the highest frequency present in the signal.
fs ≥ 2 × fmax
Where fs is the sample rate and fmax is the highest frequency in the signal. The minimum allowed sample rate (fs = 2 × fmax) is called the Nyquist rate. Half the sample rate (fs/2) is the Nyquist frequency — the highest frequency that can be correctly represented.
The reasoning is geometrical: to define a sine wave unambiguously you need at least two samples per cycle — one for the peak and one for the trough. At exactly two samples per cycle (the Nyquist rate), a sine wave is minimally defined. In practice, you always sample faster than the Nyquist rate to leave headroom for the anti-alias filter.
Why the theorem is exact. Claude Shannon proved in 1949 that if the signal is strictly band-limited (contains no frequency above fmax) and you sample at exactly 2 × fmax, the original signal can be perfectly reconstructed using a sinc interpolation function. The result is mathematically exact — not an approximation. This is why high-fidelity digital audio works: a 44.1 kHz sample rate perfectly represents any signal up to 22.05 kHz (well above the 20 kHz limit of human hearing).
Aliasing: What Goes Wrong
When a signal contains a frequency above the Nyquist frequency and the ADC samples it anyway, the high-frequency component folds back into the spectrum and appears as a lower-frequency alias. The alias frequency is:
falias = | fsignal − n × fs |
Where n is the integer that brings the result into the range 0 to fs/2. The alias appears at a completely different frequency from the original signal and is indistinguishable from a real signal at that frequency.
Nyquist frequency = 8000 / 2 = 4000 Hz. The 7 kHz tone is above the Nyquist frequency.
Alias = |7000 − 8000| = 1000 Hz
The 7 kHz signal appears in the recorded data as a 1 kHz tone. It is impossible to determine from the samples alone whether a recorded 1 kHz tone is a real 1 kHz signal or an aliased 7 kHz signal. This contamination cannot be removed after sampling.
Aliasing is insidious because the alias looks like a real signal at the aliased frequency. There is no way to recover the true signal once aliasing has occurred — the information about the original frequency is permanently lost. This is why preventing aliasing before sampling is critical, and why anti-alias filters are always placed before the ADC input.
Anti-Alias Filtering
An anti-alias filter is a low-pass filter placed immediately before the ADC input. It attenuates all signal components above the Nyquist frequency before they reach the ADC. The filter's cutoff frequency is set at or below fs/2 so that any signal that passes through the ADC has already been band-limited.
Anti-alias filters need steep roll-off to provide adequate attenuation just above the cutoff. A filter that cuts off at 20 kHz (for a 44.1 kHz audio ADC) must reject frequencies at 22 kHz and above. Early CD players used sharp analog filters with unfortunate phase distortion near the cutoff — a common criticism of first-generation digital audio. Modern systems use high oversampling rates to push the Nyquist frequency far above 22 kHz so the required anti-alias filter cutoff is much higher and a gentle-slope filter can be used.
Oversampling and Its Benefits
Oversampling means sampling at a rate significantly higher than the minimum Nyquist rate. A signal with a 20 kHz bandwidth requires only 40 kHz sampling (Nyquist), but modern audio ADCs sample at 192 kHz or higher — an oversampling ratio of 4× to 10×. SDR systems often oversample by 10× to 100×.
Oversampling provides three practical benefits:
- Gentler anti-alias filter requirements. If fs = 192 kHz, the Nyquist frequency is 96 kHz. The anti-alias filter only needs to roll off between 20 kHz and 96 kHz — a very gradual slope — rather than between 20 kHz and 22 kHz.
- Noise shaping and improved SNR. Each doubling of the sample rate reduces noise in the signal band by 3 dB (half a bit of effective resolution). With digital decimation filtering, oversampling can improve effective ADC resolution significantly.
- Wider capture bandwidth for SDR. An SDR sampling at 2 MHz captures a 1 MHz bandwidth of RF spectrum simultaneously. Every signal in that 1 MHz window is captured and can be decoded by the DSP.
Undersampling and Bandpass Sampling
The Nyquist theorem says the sample rate must exceed twice the highest frequency — but it also has a more general form: the sample rate must exceed twice the bandwidth of the signal, provided the signal occupies a known frequency band. This is called bandpass sampling or undersampling.
A bandpass signal centered at 10 MHz with 1 MHz bandwidth has fmax = 10.5 MHz. Naively, you would need a 21 MHz sample rate. But bandpass sampling says: because the signal occupies only 1 MHz of bandwidth, you only need a 2 MHz sample rate — the ADC intentionally aliases the 10 MHz signal down to baseband. The alias is the desired result: the signal appears in the ADC output as a 0–1 MHz baseband signal, ready for DSP processing.
Bandpass sampling is widely used in SDR receivers and digital IF (intermediate frequency) stages in modern transceivers. The ADC sample rate determines the signal bandwidth it can capture, not the center frequency. A 20 MSPS ADC sampling an IF of 30 MHz captures a 10 MHz bandwidth centered at 30 MHz, with the signal appearing as a 0–10 MHz baseband output.
Nyquist Rate Calculator
Nyquist Rate Calculator
Enter the highest signal frequency (or bandwidth for bandpass sampling) to find the minimum required sample rate and the Nyquist frequency.
Nyquist in Ham Radio Systems
SSB audio. Phone voice signals occupy roughly 300 Hz to 3 kHz. The Nyquist rate for SSB audio is 6 kHz. Telephone systems sample at 8 kHz (giving 4 kHz of usable bandwidth), providing comfortable headroom for the anti-alias filter. Ham radio digital voice codecs like CODEC2 use 8 kHz sample rates.
HF SDR transceivers. An SDR like the Icom IC-7300 uses an ADC sampling at 122.88 MSPS with a 14-bit depth. After decimation and digital filtering, it presents a receive bandwidth of up to 5 MHz. The high oversample rate allows very steep-slope digital filters without the phase distortion of analog filters, contributing to the IC-7300's excellent close-in dynamic range.
RTL-SDR dongles. The RTL2832U chip was designed for DVB-T digital television. It samples at up to 3.2 MSPS (with best results at 2.4 MSPS). The 2.4 MSPS sample rate captures 1.2 MHz of instantaneous bandwidth — enough to see an entire VHF/UHF ham band segment simultaneously on the spectrum display. The Nyquist frequency is 1.2 MHz, meaning signals within 1.2 MHz of the tuned center frequency are captured cleanly.
WSPR and weak-signal modes. WSPR signals occupy about 200 Hz of bandwidth. The Nyquist rate for WSPR is only 400 Hz — far slower than any practical ADC. WSPR software processes audio from a SSB receiver at 12 kHz or 48 kHz sample rate, massively oversampling the 200 Hz WSPR band. The oversampling and subsequent digital filtering narrows the noise bandwidth proportionally, improving sensitivity. This is why WSPR can decode signals 30 dB below the audible noise floor — extreme oversampling combined with coherent integration over 110 seconds.
Frequently Asked Questions
If I sample at exactly twice the highest frequency, can I really reconstruct the signal perfectly?
Mathematically yes, but in practice no. At exactly the Nyquist rate, a sine wave at fmax could be sampled at its zero crossings, giving you all zeros — meaning you would see nothing even though the signal is present. You need to sample slightly faster than twice fmax, and the signal's phase relative to the sampling clock must be known to guarantee reconstruction. Real systems sample at 2× to 10× or more above the Nyquist frequency and rely on anti-alias filters to ensure no signal energy reaches fmax = fs/2.
Does sample rate affect audio quality once it is above 44.1 kHz?
For playback on normal speakers or headphones, no — there is no scientific evidence that humans can hear content above 20 kHz. The main benefit of high sample rates (96 kHz, 192 kHz) in audio production is that it allows more gentle anti-alias filters and gives processing headroom during digital effects (pitch shifting, time stretching). For SDR, higher sample rate directly equals more captured bandwidth, which has an unambiguous benefit.
Test Your Knowledge
Answer the questions below to check your understanding. Every answer can be found in the lesson above.