Sampling Theorem
Nyquist rate, aliasing, reconstruction.
The Sampling Theorem is the cornerstone of all digital communication and signal processing. It states the conditions under which a continuous-time analog signal can be completely represented by discrete samples and later perfectly reconstructed. Without this theorem, the entire field of digital audio, digital communications, and digital instrumentation would not exist.
Core Concept: The Nyquist-Shannon Sampling Theorem
The theorem, attributed to Harry Nyquist and Claude Shannon, states: a band-limited signal with maximum frequency component f_max can be completely recovered from its samples if the sampling frequency f_s satisfies f_s >= 2 * f_max. The minimum acceptable sampling rate, f_s = 2 * f_max, is called the Nyquist rate. The frequency f_s/2 is called the Nyquist frequency or folding frequency.
To understand why this works, consider sampling in the frequency domain. When a signal is multiplied by an impulse train with period T_s, the spectrum of the sampled signal is a periodic repetition of the original spectrum, with copies centered at 0, plus or minus f_s, plus or minus 2*f_s, and so on. If f_s >= 2*f_max, these spectral copies do not overlap, and the original spectrum can be recovered perfectly by passing the sampled signal through an ideal low-pass filter with cutoff at f_s/2.
If f_s less than 2*f_max, the spectral copies overlap. This overlap is called aliasing. Once aliasing occurs, the high-frequency components of the original signal appear as spurious low-frequency components in the reconstructed signal, and the original signal cannot be recovered. Aliasing is irreversible — no post-processing can remove it once sampling is done below the Nyquist rate.
Mathematical Expression
Mathematically, ideal sampling can be modeled as multiplication of the signal x(t) by a Dirac comb (impulse train). If the impulse train is p(t) = sum of delta(t - n*T_s), then the sampled signal is x_s(t) = x(t) * p(t). Taking the Fourier transform, the spectrum of the sampled signal is:
X_s(f) = f_s * sum of X(f - n*f_s) for n = 0, ±1, ±2, ... This shows the spectrum of x_s(f) is the sum of shifted copies of X(f). If X(f) = 0 for |f| > f_max and f_s >= 2*f_max, then the copies centered at n*f_s do not overlap with the original copy at n = 0, and the original X(f) can be extracted by an ideal LPF with gain 1/f_s and cutoff f_c = f_s/2.
The reconstruction formula (Whittaker-Shannon interpolation) states that the original signal can be recovered as: x(t) = sum of x(n*T_s) * sinc(f_s * t - n), where sinc(x) = sin(pi*x)/(pi*x). This shows each sample contributes a sinc pulse to the reconstructed waveform, and the sum of all sinc pulses exactly recreates the original continuous signal.
Practical Understanding: Anti-Aliasing and Oversampling
In real systems, signals are not perfectly band-limited. Before sampling, an anti-aliasing filter (a low-pass filter) is applied to limit the signal bandwidth to less than f_s/2. This ensures that any frequency component above f_s/2 is removed before sampling, preventing aliasing from those components. The design of this filter is a critical part of any ADC-based system.
In practice, oversampling (sampling at a rate significantly higher than the Nyquist rate) is commonly used. Oversampling simplifies the anti-aliasing filter design, since there is more transition band available, and allows noise shaping techniques used in sigma-delta ADCs. For example, CD audio uses 44.1 kHz sampling for a 20 kHz audio bandwidth, which is slightly more than the Nyquist rate of 40 kHz, with a gentle anti-aliasing filter.
Given:
Audio signal with maximum frequency f_max = 4000 Hz (telephone quality voice)
Sampling frequency f_s = 8000 Hz (standard telephony, as per ITU G.711)
Why this formula applies:
Nyquist theorem requires f_s >= 2 * f_max for perfect reconstruction
Formula:
f_s >= 2 * f_max
Substitution:
8000 >= 2 × 4000
8000 >= 8000
Calculation:
Nyquist rate = 2 × 4000 = 8000 Hz
f_s = 8000 Hz exactly meets the Nyquist condition.
Sampling interval T_s = 1/8000 = 125 microseconds
Alias frequency if a 5000 Hz component leaked through = |5000 - 8000| = 3000 Hz
Final Answer:
Sampling at 8000 Hz satisfies Nyquist for 4 kHz bandwidth;
any component above 4 kHz must be removed by anti-aliasing filter to prevent aliasing.Exam Tip: GATE frequently asks to calculate aliased frequency. If a signal of frequency f is sampled at f_s and f > f_s/2, the apparent alias frequency is |f - n*f_s| where n is chosen to bring the result into [0, f_s/2]. For example, if f = 7 kHz and f_s = 8 kHz, alias = |7000 - 8000| = 1000 Hz.
Loading lab...
Quick Revision
- Nyquist Sampling Theorem: f_s >= 2 * f_max for perfect reconstruction of a band-limited signal.
- Nyquist rate = 2 * f_max; Nyquist frequency = f_s/2 (the maximum frequency that can be represented).
- Aliasing occurs when f_s < 2 * f_max — high-frequency components fold back and appear as false low-frequency components.
- Alias frequency formula: f_alias = |f - n*f_s|, choosing n so that the result falls in [0, f_s/2].
- Anti-aliasing LPF must be applied before sampling to remove frequency content above f_s/2.
- Reconstruction uses an ideal LPF with cutoff at f_s/2 applied to the sampled signal; mathematically equivalent to sinc interpolation.
- Exam trap: The Nyquist rate is 2*f_max, not f_max. And the Nyquist frequency is f_s/2, not f_s.
Sampling Theorem Quiz
Test your understanding of the Nyquist-Shannon sampling theorem and its application to band-limited signals.