Fiveable

๐Ÿ“šSignal Processing Unit 6 Review

QR code for Signal Processing practice questions

6.2 Nyquist-Shannon Sampling Theorem

6.2 Nyquist-Shannon Sampling Theorem

Written by the Fiveable Content Team โ€ข Last updated August 2025
Written by the Fiveable Content Team โ€ข Last updated August 2025
๐Ÿ“šSignal Processing
Unit & Topic Study Guides

Nyquist-Shannon Sampling Theorem

Theorem Statement and Implications

The Nyquist-Shannon sampling theorem answers a fundamental question: how often do you need to sample a continuous signal to perfectly reconstruct it later?

The answer: the sampling frequency fsf_s must be at least twice the highest frequency component in the signal. That threshold, 2B2B, is called the Nyquist rate, where BB is the signal's bandwidth (its highest frequency component).

fsโ‰ฅ2Bf_s \geq 2B

If you sample at or above this rate, the original continuous signal can be perfectly recovered from its discrete samples with zero information loss. If you sample below this rate, aliasing occurs: high-frequency components fold back into lower frequencies, distorting the reconstructed signal in ways that can't be undone.

A critical assumption here is that the signal must be bandlimited, meaning it contains no energy above some finite frequency BB. Real-world signals are never perfectly bandlimited, which is why practical systems need additional safeguards (more on that below).

Aliasing and Bandlimited Signals

Aliasing happens when your sampling rate is too low to distinguish high-frequency components from low-frequency ones. The sampled data literally can't tell the difference between a tone at frequency ff and a tone at frequency fsโˆ’ff_s - f, so they get mixed together.

Think of it this way: if you're sampling a 15 kHz sine wave at only 20 kHz, the reconstructed signal will show a 5 kHz tone instead. That's aliasing. The original frequency has "folded" around the Nyquist frequency (fs/2=10f_s / 2 = 10 kHz).

To prevent this, you need to ensure no frequency content exists above the Nyquist frequency before sampling. This is done with an anti-aliasing filter, which is a low-pass filter placed before the analog-to-digital converter. It attenuates all frequency components above fs/2f_s / 2, enforcing the bandlimited condition that the theorem requires.

Minimum Sampling Rate

Theorem Statement and Implications, Nyquistโ€“Shannon sampling theorem - Wikipedia

Calculating the Minimum Sampling Rate

Finding the minimum sampling rate is straightforward:

  1. Identify the highest frequency component BB present in your signal.
  2. Multiply by 2 to get the Nyquist rate: fs,min=2Bf_{s,\text{min}} = 2B.
  3. Choose a sampling frequency fsโ‰ฅfs,minf_s \geq f_{s,\text{min}}.

Example: A signal has frequency content up to 10 kHz.

fs,min=2ร—10ย kHz=20ย kHzf_{s,\text{min}} = 2 \times 10 \text{ kHz} = 20 \text{ kHz}

Any sampling rate at or above 20 kHz will satisfy the theorem for this signal.

Oversampling and Practical Considerations

In practice, you almost never sample at exactly the Nyquist rate. There are several reasons to use a higher rate:

  • Filter design becomes easier. An anti-aliasing filter needs to pass everything below BB and reject everything above fs/2f_s / 2. If fsf_s is only slightly above 2B2B, the filter must have an extremely sharp cutoff, which is expensive and difficult to build. Oversampling widens the gap between BB and fs/2f_s / 2, relaxing the filter requirements.
  • Signal-to-noise ratio (SNR) improves. Quantization noise spreads across the full frequency range up to fs/2f_s / 2. Sampling faster spreads that noise over a wider band, so less of it falls within your signal's bandwidth.
  • Safety margin. Real signals may have unexpected frequency content, and real hardware has tolerances. A buffer above the Nyquist rate protects against subtle aliasing.

The tradeoff is that higher sampling rates produce more data, requiring more storage and processing power. The choice of fsf_s in any real system balances reconstruction quality against these resource constraints.

Sampling Rate vs. Bandwidth

Theorem Statement and Implications, Wiki - Sampling Theorem

Relationship Between Sampling Rate and Bandwidth

The theorem creates a direct link between sampling rate and the maximum bandwidth you can faithfully represent:

Bmax=fs2B_{\text{max}} = \frac{f_s}{2}

This means:

  • If you increase fsf_s, you can capture higher-frequency content.
  • If your signal's bandwidth grows, you must increase fsf_s to keep up.
  • If fsf_s is fixed, any frequency content above fs/2f_s / 2 will alias.

Undersampling and Bandwidth Limitation

Undersampling is when fs<2Bf_s < 2B. The frequencies above fs/2f_s / 2 fold back into the range below fs/2f_s / 2, corrupting the signal. Once aliasing has occurred in the sampled data, there's no way to separate the aliased components from the real ones.

To avoid undersampling when your sampling rate is constrained, you must limit the signal's bandwidth to at most fs/2f_s / 2 using an anti-aliasing filter before the signal reaches the sampler.

Note on intentional undersampling: In some specialized applications (like bandpass sampling of narrowband RF signals), undersampling is used deliberately. The signal is bandlimited to a narrow range that doesn't straddle a multiple of fs/2f_s / 2, so aliasing maps it to a lower frequency without overlap. This is an advanced technique that still respects the theorem's core logic.

Sampling Theorem Applications

Audio and Video Recording

CD-quality audio uses a sampling rate of 44.1 kHz. Human hearing extends to roughly 20 kHz, so the Nyquist rate is 40 kHz. The extra 4.1 kHz provides headroom for the anti-aliasing filter's transition band, since no practical filter can cut off perfectly at 20 kHz.

Professional audio often uses 96 kHz or 192 kHz. These higher rates aren't necessarily about capturing frequencies humans can't hear; they ease filter design and can improve time-domain resolution during editing and processing.

In video, the sampling theorem applies spatially (pixel resolution) and temporally (frame rate). Common frame rates like 24 fps (cinema), 25 fps (PAL), and 30 fps (NTSC) are chosen based on the temporal frequencies the system needs to represent without visible flicker or motion aliasing.

Data Acquisition and Digital Communication

In data acquisition (sensors, measurement instruments), you pick the sampling rate based on the bandwidth of the physical quantity you're measuring. A vibration sensor monitoring machinery up to 5 kHz needs at least 10 kHz sampling, though oversampling to 25 kHz or more is common to improve SNR and simplify filtering.

In digital communication, pulse-code modulation (PCM) is the standard approach: sample the analog signal at a fixed rate, then quantize each sample into discrete levels for transmission. Telephone systems, for example, sample voice signals at 8 kHz (covering the 300 Hz to 3.4 kHz voice band with margin).

In all these applications, the practical limits of the analog-to-digital converter (ADC), available storage, and transmission bandwidth constrain how high you can push fsf_s. The Nyquist-Shannon theorem gives you the theoretical floor; engineering tradeoffs determine where above that floor you actually operate.