Skip to main content

Signal Sampling and Reconstruction

Learning Objectives

  • Explain what sampling is and why it is the bridge between analog and digital signal processing
  • State the Nyquist-Shannon sampling theorem and apply it to choose a valid sampling rate
  • Explain aliasing, why it occurs, and how it distorts a reconstructed signal
  • Distinguish uniform sampling, non-uniform sampling, and oversampling
  • Describe the role of a reconstruction (anti-imaging) filter in recovering a continuous signal
  • Calculate whether a given sampling rate avoids aliasing for a stated signal bandwidth

Quick Answer

Sampling converts a continuous-time signal into a sequence of discrete values by measuring its amplitude at regular time intervals, which is what every ADC does before a computer can process a real-world signal. The Nyquist-Shannon sampling theorem says this conversion is lossless — perfectly reversible — only if the sampling rate exceeds twice the signal's highest frequency component. Sample below that rate and different frequencies become indistinguishable after sampling, an unrecoverable distortion called aliasing. Reconstruction, the reverse process, rebuilds a continuous signal from its samples using an interpolation step followed by a low-pass reconstruction filter that removes the spectral copies created by sampling.

Why Sampling Exists

Digital systems — computers, DSP chips, microcontrollers — cannot store or process a continuous, infinitely detailed analog waveform directly. Sampling solves this by recording the signal's amplitude only at specific instants, spaced T seconds apart, producing a sequence of numbers a computer can store and manipulate. The rate at which these instants occur is the sampling frequency, fs = 1/T, measured in Hz (or samples per second).

This single conversion step is what makes every piece of modern digital signal processing possible: audio recording, digital communications, digital images, and sensor data acquisition all begin with sampling.

The Nyquist-Shannon Sampling Theorem

Sampling throws away information between samples — so an obvious question is: can you always get the original signal back? The Nyquist-Shannon theorem answers this precisely: a signal that is bandlimited to a maximum frequency f_max can be perfectly reconstructed from its samples if and only if:

fs > 2 f_max

The quantity 2f_max is called the Nyquist rate. As long as you sample faster than this, no information is lost — you can, in principle, recover the exact original continuous signal from the discrete samples. This is a genuinely surprising and powerful result: a continuous signal with uncountably many values can be represented exactly by a finite-rate sequence of numbers, provided its frequency content is bounded.

Worked example: Standard audio CDs sample at 44.1 kHz. Human hearing tops out around 20 kHz, so the Nyquist rate needed is 2 × 20 kHz = 40 kHz. The chosen 44.1 kHz clears that bar with margin, leaving room for a realistic (non-ideal) anti-aliasing filter to roll off before the Nyquist frequency of 22.05 kHz.

Aliasing: What Happens Below the Nyquist Rate

If you sample below the Nyquist rate, high-frequency components of the signal get misrepresented as lower frequencies in the sampled data — they become indistinguishable from genuine low-frequency content. This is aliasing, and once it happens, it cannot be undone by any amount of processing after the fact, because the information about the true frequency is gone.

A classic visual example is the "wagon wheel effect" in film: a wheel's spokes appear to rotate backward or freeze because the camera's frame rate (its sampling rate) is too low relative to the wheel's rotation speed (its frequency). The same mathematics governs any undersampled signal.

The fix is always applied before sampling: an analog anti-aliasing filter (a low-pass filter) removes frequency content above fs/2 so nothing above the Nyquist frequency reaches the sampler in the first place.

Types of Sampling

  • Uniform sampling — samples taken at exactly equal time intervals. The standard case, and the one the Nyquist theorem directly applies to.
  • Non-uniform sampling — samples taken at irregular intervals, sometimes used deliberately for non-stationary signals or to reduce data volume where the signal changes slowly.
  • Oversampling — sampling well above the Nyquist rate. This relaxes the requirements on the anti-aliasing filter (since there's more margin before fs/2) and, combined with noise shaping, is how techniques like delta-sigma ADCs achieve high effective resolution.

Reconstruction: Getting the Continuous Signal Back

Reconstruction reverses sampling — rebuilding a continuous-time signal from discrete samples. Two steps are involved:

  1. Interpolation — estimating the signal's value between known sample points. In theory, ideal (sinc-function) interpolation perfectly reconstructs a bandlimited signal sampled above the Nyquist rate. In practice, simpler methods like linear or spline interpolation are used as approximations.
  2. Reconstruction filtering — a physical DAC produces a staircase-like output holding each sample's value until the next one arrives. This process creates unwanted high-frequency spectral copies ("images") of the original spectrum. A low-pass reconstruction filter (sometimes called an anti-imaging filter) smooths this staircase, removing those images and leaving the intended continuous waveform.

Why Sampling and Reconstruction Matter

Every digital audio player, software-defined radio, digital camera, and sensor-driven control system depends on getting this pipeline right. Choose too low a sampling rate, and aliasing permanently corrupts the signal — no downstream processing can fix it. Skip the reconstruction filter, and the output signal contains audible or measurable high-frequency artifacts from the DAC's staircase output. Both ends of the sampling/reconstruction pipeline are equally essential to preserving signal fidelity.

Key Terms

TermDefinitionRelated Concept
SamplingConverting a continuous-time signal into discrete-time samples at regular intervalsADC, sampling rate
Sampling frequency (fs)The rate at which samples are taken, fs = 1/TNyquist rate
Nyquist rateThe minimum sampling rate (2 × f_max) required to avoid aliasingNyquist-Shannon theorem
AliasingDistortion where high frequencies are misrepresented as lower frequencies due to undersamplingAnti-aliasing filter
Anti-aliasing filterAnalog low-pass filter applied before sampling to remove content above fs/2Nyquist frequency
OversamplingSampling well above the Nyquist rateDelta-sigma ADC, relaxed filter design
InterpolationEstimating signal values between known samples during reconstructionSinc interpolation
Reconstruction filterLow-pass filter applied after a DAC to remove spectral images and smooth the outputAnti-imaging filter

Common Mistakes

Misconception: Sampling at exactly twice the highest frequency (fs = 2f_max) is sufficient to avoid aliasing. Why it's wrong: The Nyquist-Shannon theorem requires a strict inequality, fs > 2f_max. At exactly fs = 2f_max, samples can land precisely at the signal's zero crossings, potentially capturing no information at all about that frequency component. Correct understanding: Always sample strictly above the Nyquist rate, and in real systems use additional margin because real anti-aliasing filters don't cut off infinitely sharply at fs/2.


Misconception: Aliasing can be fixed after sampling by applying a digital filter to the sampled data. Why it's wrong: Once aliasing occurs, the high-frequency information has already been irreversibly folded into lower frequencies indistinguishable from real low-frequency content — no digital processing afterward can tell which is which. Correct understanding: Aliasing must be prevented before sampling, using an analog anti-aliasing filter that removes frequencies above fs/2 before the signal reaches the sampler.


Misconception: More samples (higher sampling rate) always means a "better" or more accurate digital representation. Why it's wrong: Once you're sampling above the Nyquist rate for a bandlimited signal, the reconstruction is already theoretically exact — additional oversampling brings diminishing returns and costs more data, storage, and processing. Correct understanding: The goal is to sample at or above the Nyquist rate with a practical margin; oversampling has specific engineering benefits (easier analog filtering, noise shaping) but isn't needed purely for "more accuracy" once the Nyquist condition is met.

Comparison and Connections

AspectSamplingReconstruction
DirectionContinuous to discreteDiscrete to continuous
Key requirementfs > 2 f_max (Nyquist)Interpolation + low-pass filtering
Failure modeAliasing (undersampling)Imaging artifacts (staircase output)
Protective filterAnti-aliasing filter (before sampling)Reconstruction / anti-imaging filter (after DAC)
Governing theoremNyquist-Shannon sampling theoremSame theorem, applied in reverse

Practice Questions

Recall

  1. State the Nyquist-Shannon sampling theorem in your own words, including the inequality. Answer guidance: A bandlimited signal can be perfectly reconstructed from its samples if the sampling frequency fs is strictly greater than twice the signal's highest frequency component: fs > 2f_max.

  2. What is aliasing, and at what point in the signal chain must it be prevented? Answer guidance: Aliasing is the distortion where high-frequency components become indistinguishable from lower frequencies due to undersampling. It must be prevented before sampling, using an analog anti-aliasing filter.

Understanding

  1. Explain why aliasing cannot be corrected after the fact with digital signal processing. Answer guidance: Once a signal is sampled below the Nyquist rate, the true high-frequency content and the aliased low-frequency artifact are represented by the exact same sample values — the information distinguishing them is gone, so no processing on the samples can recover the original frequency.

  2. Why does a DAC's staircase output need a reconstruction filter? Answer guidance: A DAC holds each sample value constant until the next sample arrives, producing a stepped (staircase) waveform. This introduces high-frequency spectral images beyond the original signal's content. A low-pass reconstruction filter smooths the staircase and removes these images, leaving the intended continuous signal.

Application

  1. A sensor signal contains frequency content up to 3 kHz. What is the minimum sampling rate needed to avoid aliasing, and what practical sampling rate would you choose? Answer guidance: The Nyquist rate is 2 × 3 kHz = 6 kHz; you'd choose something safely above that, e.g., 8 kHz or higher, to leave margin for a realistic anti-aliasing filter's non-ideal roll-off.

  2. You are designing a digital audio system and want to allow simpler, cheaper anti-aliasing filters. What sampling strategy would you use, and why? Answer guidance: Oversampling — sampling well above the Nyquist rate pushes the Nyquist frequency (fs/2) far above the signal's highest frequency of interest, giving the anti-aliasing filter a wide transition band to work with, so it doesn't need an extremely sharp (expensive) roll-off.

Analysis

  1. Compare uniform sampling and non-uniform sampling in terms of how directly the Nyquist-Shannon theorem applies to each. Answer guidance: The classical Nyquist-Shannon theorem is derived for uniform sampling and gives a clean, simple condition (fs > 2f_max). Non-uniform sampling can, under certain conditions, still allow perfect reconstruction (compressive sensing theory extends this), but the analysis is considerably more complex and depends on the specific sampling pattern rather than a single rate.

  2. A student samples a 60 Hz power-line signal at exactly 60 Hz and observes a flat, unchanging DC-like output. Explain what is happening. Answer guidance: This is a severe aliasing case — sampling at exactly the signal's own frequency means each sample lands at the same phase point on every cycle, so the sampled sequence appears constant (aliased down to 0 Hz), even though the actual signal is a 60 Hz sinusoid. This illustrates why fs must be strictly greater than twice (not equal to, and certainly not equal to) the signal frequency.

FAQ

Why is 44.1 kHz the standard sampling rate for audio CDs? Human hearing extends to roughly 20 kHz, so the Nyquist rate is 40 kHz. The extra margin up to 44.1 kHz accommodates the fact that real anti-aliasing filters can't cut off infinitely sharply right at the theoretical limit — they need some transition band above 20 kHz to fully attenuate before reaching the Nyquist frequency of 22.05 kHz.

Is aliasing always bad? In standard signal acquisition, yes — it's an unwanted, irreversible distortion. However, some techniques (like certain oscilloscope "equivalent-time sampling" modes, or intentional frequency down-conversion in radio receivers) deliberately exploit aliasing-like folding of frequencies for specific engineering purposes; those are controlled, understood applications, not the accidental corruption normal sampling avoids.

What's the difference between the Nyquist rate and the Nyquist frequency? The Nyquist rate is the minimum required sampling frequency, 2f_max, for a given signal. The Nyquist frequency is fs/2 for a given sampling rate — the highest frequency that can be represented without aliasing at that rate. They describe the same relationship from two different starting points.

Why can't we just use a perfect (ideal) anti-aliasing filter and avoid needing extra sampling margin? An ideal "brick-wall" filter with infinitely sharp cutoff is not physically realizable — every real filter has a finite transition band. Sampling above the theoretical Nyquist rate gives that real filter room to roll off before reaching the Nyquist frequency.

How is reconstruction different from simply "connecting the dots" between samples? Naively connecting samples with straight lines (linear interpolation) is only an approximation and introduces its own high-frequency artifacts. True reconstruction, following the sampling theorem, uses sinc-function interpolation (equivalent to ideal low-pass filtering), which is the mathematically exact way to recover a bandlimited signal from its samples.

Quick Revision

  • Sampling converts a continuous signal into discrete samples taken at intervals T = 1/fs
  • Nyquist-Shannon theorem: perfect reconstruction requires fs > 2f_max (the Nyquist rate)
  • Sampling below the Nyquist rate causes aliasing — an irreversible distortion
  • Anti-aliasing filters (low-pass, before sampling) prevent aliasing by removing content above fs/2
  • Uniform sampling uses equal time intervals; non-uniform sampling uses irregular intervals
  • Oversampling (sampling well above Nyquist) eases anti-aliasing filter design and enables techniques like delta-sigma conversion
  • Reconstruction = interpolation + a low-pass reconstruction (anti-imaging) filter
  • A DAC's staircase output creates spectral images that the reconstruction filter must remove
  • CD audio uses 44.1 kHz sampling to comfortably clear the ~40 kHz Nyquist rate for 20 kHz hearing
  • Sampling exactly at the signal frequency (fs = f) is a worst-case aliasing scenario, not a safe boundary

Prerequisites: Introduction to Signal Processing, Time-Domain Analysis, Frequency-Domain Analysis

Related Topics: Fourier Transform, Digital Filters, Frequency-Domain Analysis

Next Topics: Fourier Transform, Signal Compression