DSP FundamentalsNyquist TheoremADC / SDR

Sampling Theory and Aliasing

Sample a spinning wheel too slowly with a camera and it appears to spin backwards. Sample a radio signal too slowly and you hear phantom signals. Same physics.

What is Sampling?

In plain English

Sampling is like taking snapshots of a wave. If you take enough snapshots per second, you can reconstruct the original wave perfectly. Take too few, and the wave looks like something completely different. The Nyquist rule tells you the minimum number of snapshots you need — at least two per cycle of the highest frequency in your signal.

Sampling is the process of converting a continuous-time analog signal into a discrete sequence of numbers by measuring the signal's amplitude at regular time intervals. The rate of measurement is the sample rate (or sampling frequency), measured in samples per second (Hz). An ADC with a 1 MHz sample rate takes one measurement every microsecond, producing a million numbers per second.

The crucial question is: how fast must you sample to faithfully represent a given signal? Intuition says at least fast enough to capture the signal's highest-frequency content. The Nyquist–Shannon theorem makes this mathematically precise: to perfectly reconstruct a signal containing frequencies up to f_max, the sample rate must be at least f_s ≥ 2 × f_max. The minimum rate of 2 × f_max is the Nyquist rate. The corresponding maximum frequency representable at a given sample rate, f_s / 2, is the Nyquist frequency (also called the folding frequency).

When the sampling theorem is satisfied, perfect reconstruction is theoretically possible by passing the discrete samples through an ideal low-pass filter with cutoff at f_s/2. The filter interpolates between sample points, perfectly recovering the original continuous waveform. In practice, imperfect reconstruction filters leave some ripple, which is why oversampling (sampling well above the Nyquist rate) is common in high-quality audio and SDR systems.

Interactive Sampling Visualiser
Drag the slider to change the sample rate. The signal frequency is 5 Hz. Nyquist rate is 10 samples/s.
Above Nyquistfs=18, f=5, fn=10True signal (5 Hz)Sample points
Sample rate:18 samples/s — No aliasing
3 (very low)Nyquist = 1030 (high)

Signal freq

5 Hz

Sample rate

18 Hz

Nyquist rate

10 Hz

Status

Correct

Aliasing in the Frequency Domain
Spectral view showing the signal peak and its alias component when below Nyquist
Nyquist = fs/2 = 9 Hz5 Hz→ freq (Hz)
No aliasing: Sample rate (18 Hz) meets the Nyquist criterion for a 5 Hz signal. The signal can be perfectly reconstructed from these samples.
Sampling Theory Deep Dive

Nyquist Rates for Common Applications
ApplicationSignal BWMin Sample RateTypical Rate Used
Telephone (PSTN)0–4 kHz8 kSPS8 kSPS (G.711)
CD Audio0–20 kHz40 kSPS44.1 kSPS
Studio Audio0–24 kHz48 kSPS96–192 kSPS
FM Broadcast (mono)0–15 kHz30 kSPS~200 kSPS (RTL-SDR)
Narrowband FM voice±2.5 kHz5 kSPS12.5–25 kSPS
WiFi 802.11b (11 Mbps)22 MHz44 MSPS44 MSPS (direct RF)
RTL-SDR receiverUp to 2.4 MHz4.8 MSPS2.4 MSPS
HackRF OneUp to 20 MHz40 MSPS20 MSPS