Jump back to chapter selection.


Table of Contents

7.1 The Sampling Theorem
7.2 Reconstruction and Interpolation
7.3 Aliasing
7.4 Discrete-Time Processing of Continuous-Time Signals
7.5 Discrete-Time Sampling, Decimation, and Interpolation
7.6 Quantization and Practical Conversion


7 Sampling

Sampling is the bridge between continuous-time and discrete-time signal processing. The surprising result is that a continuous-time signal can be represented exactly by equally spaced samples if it is bandlimited and if the sampling rate is high enough.

The exact theorem is idealised. Real systems need anti-aliasing filters, sample-and-hold circuits, quantizers, clocks with finite jitter, and reconstruction filters. The ideal theorem is still the right starting point because it tells us what the unavoidable failure mode is: overlapping spectral replicas, or aliasing.


7.1 The Sampling Theorem

Sampling a continuous-time signal at period T can be represented by multiplying it with an impulse train

p(t)=n=δ(tnT).

The sampled impulse train is

xp(t)=x(t)p(t)=n=x(nT)δ(tnT).

The sampling angular frequency is

ωs=2πT.

Multiplication in time corresponds to convolution in frequency. Since the Fourier transform of the impulse train is another impulse train, the sampled spectrum is

Xp(jω)=1Tk=X(j(ωkωs)).

Thus sampling creates shifted replicas of the original spectrum at integer multiples of ωs.

If x(t) is bandlimited such that

X(jω)=0for|ω|>ωM,

then the replicas do not overlap if

ωs>2ωM.

This is the sampling theorem. The frequency 2ωM is the Nyquist rate. Equality is not enough in the usual theorem statement because it leaves no transition band for reconstruction and can fail at spectral endpoints.


7.2 Reconstruction and Interpolation

If the sampling theorem is satisfied, the original signal is recovered by an ideal lowpass filter that selects the central spectral replica and rejects all others. The required reconstruction filter has gain T in the passband:

Hr(jω)={T,|ω|<ωc,0,|ω|>ωc,

with

ωM<ωc<ωsωM.

Choosing ωc=ωs/2=π/T gives the familiar sinc interpolation formula:

x(t)=n=x(nT)sin[π(tnT)/T]π(tnT)/T.

Each sample multiplies a shifted sinc function. The continuous-time reconstruction is the superposition of these interpolation functions.

In practice, impulse trains are not generated directly. A zero-order hold keeps each sample value constant until the next sample. This can be modelled as impulse-train sampling followed by a rectangular pulse:

h0(t)={1,0t<T,0,otherwise.

Its frequency response is

H0(jω)=ejωT/22sin(ωT/2)ω.

The magnitude has a sinc droop, so perfect reconstruction after a zero-order hold would require an equalising reconstruction filter. Often the droop is small enough over the signal band that it is treated as part of the analogue output-stage design.


7.3 Aliasing

If the shifted spectral replicas overlap, the original spectrum cannot be recovered by lowpass filtering. This overlap is aliasing.

For a sinusoid

x(t)=cos(ω0t+ϕ),

sampling at ωs makes frequencies separated by integer multiples of ωs indistinguishable. A component above ωs/2 is folded into the baseband. For example, a sinusoid with frequency ω0 in the range

ωs2<ω0<ωs

appears after ideal reconstruction as a sinusoid at

ωsω0.

The phase can also be reversed by this folding.

Aliasing is not just a mathematical nuisance. It is the reason a stroboscope can make a rotating wheel appear slower or even reversed. It is also why every practical A/D converter needs an anti-aliasing filter before sampling. Once aliasing has occurred, the overlapped frequency components are added together and cannot be separated by later digital processing.


7.4 Discrete-Time Processing of Continuous-Time Signals

A common processing chain is

xc(t)x[n]y[n]yc(t),

where the first arrow is sampling, the middle operation is a discrete-time system, and the final arrow is reconstruction.

If the input is bandlimited and the sampling theorem is satisfied, there is a direct mapping between continuous-time frequency Ω and discrete-time frequency ω:

ω=ΩT.

The discrete-time frequency response Hd(ejω) therefore acts on the continuous-time baseband as

Heff(jΩ)=Hd(ejΩT),|Ω|<πT.

This is the central idea behind digital filtering of analogue signals: design a discrete-time system that has the desired response after the frequency-axis mapping.

There are three important practical caveats:


7.5 Discrete-Time Sampling, Decimation, and Interpolation

Sampling ideas also apply entirely within discrete time. Downsampling by an integer factor M keeps every M-th sample:

y[n]=x[nM].

Its DTFT is

Y(ejω)=1Mr=0M1X(ej(ω2πr)/M).

Thus downsampling compresses and overlaps spectral replicas. To avoid aliasing, one should lowpass filter before downsampling so that the retained bandwidth is at most π/M.

Upsampling by an integer factor L inserts zeros:

y[n]={x[n/L],n/LZ,0,otherwise.

Its DTFT is

Y(ejω)=X(ejωL).

This creates spectral images. A lowpass interpolation filter is then used to remove the images and fill in the missing sample values.

Changing a sampling rate by a rational factor L/M is done by interpolation by L, lowpass filtering, and decimation by M. Efficient implementations combine these operations with polyphase filter structures, but the conceptual requirements are just anti-imaging and anti-aliasing.


7.6 Quantization and Practical Conversion

An A/D converter does not only sample in time; it also quantizes amplitude. If the quantization step is Δ, the quantized value can be modelled as

xQ[n]=x[n]+e[n],

where e[n] is the quantization error. Under the usual high-resolution assumptions, e[n] is treated as approximately uniformly distributed over [Δ/2,Δ/2], giving

σe2=Δ212.

This model is not exact for every signal, but it gives a useful noise-floor estimate.

Oversampling spreads quantization noise over a larger bandwidth. If the signal occupies only a small part of the sampled bandwidth, digital lowpass filtering can remove much of the out-of-band quantization noise. Noise-shaping converters go further by feeding quantization error back so that more of the noise is pushed outside the signal band.

For practical conversion, the ideal sampling theorem becomes a design checklist: