Digital transmission of information and digital signal processing all require signals to
first be "acquired" by a computer. One of the most amazing and useful results in
electrical engineering is that signals can be converted from a function of time into a
sequence of numbers without error: We can convert the numbers back into the signal with
(theoretically) no error. Harold Nyquist, a Bell Laboratories engineer, derived this result,
known as the Sampling Theorem, first in the 1920s. It found no real application back
then. Claude Shannon, also at Bell Laboratories, revived the result once computers were
made public after World War II.
The sampled version of the analog signal stst is snTss
nTs
, with TsTs known as the sampling interval.
Clearly, the value of the original signal at the sampling times is preserved;
the issue is how the signal values between the samples can be reconstructed since they are lost in the sampling process.
To characterize sampling, we approximate it as the product
xt=st
p
T
s
t
x
t
s
t
p
T
s
t
, with
p
T
s
t
p
T
s
t
being the periodic pulse signal.
The resulting signal, as shown in Figure 1, has nonzero values only during the time intervals
n
T
s
−Δ2
n
T
s
+Δ2
n
T
s
Δ
2
n
T
s
Δ
2
,
n=…−101…
n
…
1
0
1
…
.
For our purposes here, we center the periodic pulse signal about the origin so that its Fourier series coefficients are real (the signal is even).
p
T
s
t=∑
k
=−∞∞
c
k
e(((j2)π)k)t
T
s
c
k
=sin(πk)Δ
T
s
πk
p
T
s
t
k
∞
c
k
e
j
2
k
t
T
s
c
k
π
k
Δ
T
s
π
k
(1)
If the properties of
st
s
t
and the periodic pulse signal are chosen properly, we can recover
st
s
t
from
xt
x
t
by filtering.
To understand how signal values between the samples can be "filled"; in, we need to calculate
the sampled signal's spectrum. Using the Fourier series representation of the periodic sampling
signal,
xt=st∑k=−∞∞
cke(((j2)π)k)t
Ts=∑k=−∞∞((
ckst)e(((j2)π)k)t
Ts)
xt
st
k
∞
∞
ck
e
j2
π
k
t
Ts
k
∞
∞
ckst
e
j2
π
k
t
Ts
(2)
Considering each term in the sum separately, we need to know the spectrum of the
product of the complex exponential and the signal. Evaluating this transform directly is
quite easy.
∫∞∞stej2πkt
T
s
e−(j2πft)d
t
=∫−∞∞ste−(j2π(f−k
T
s
)t)d
t
=S(f−k
T
s
)
t
∞
∞
s
t
e
j
2
π
k
t
T
s
e
j
2
π
f
t
t
∞
∞
s
t
e
j
2
π
f
k
T
s
t
S
f
k
T
s
(3)
Thus, the spectrum of the sampled signal consists of weighted (by the coefficients
c
k
c
k
) and delayed versions of the signal's spectrum (
Figure 2).
Xf=∑
k
=−∞∞
c
k
S(f−k
T
s
)
X
f
k
∞
∞
c
k
S
f
k
T
s
(4)
In general, the terms in this sum overlap each other in the frequency domain, rendering
recovery of the original signal impossible. This unpleasant phenomenon is known as
aliasing.
If, however, we satisfy two conditions:
- The signal
st
s
t
is bandlimited—has power in a restricted frequency range—to
W
W
Hz, and
- the sampling interval
T
s
T
s
is small enough so that the individual components in the sum do not overlap—
T
s
<1/2W
T
s
12
W
,
aliasing will not occur. In this delightful case, we can recover the original signal by lowpass filtering
xt
x
t
with a filter having a cutoff frequency equal to
W
W
Hz.
These two conditions ensure the ability to recover a bandlimited signal from its sampled
version: We thus have the
Sampling Theorem.
The Sampling Theorem (as stated) does not mention the pulse width
Δ
Δ
. What is the effect of this parameter on our ability to recover a signal from its samples (assuming the Sampling Theorem's two conditions are met)?
The only effect of pulse duration is to unequally weight the spectral
repetitions. Because we are only concerned with the repetition
centered about the origin, the pulse duration has no significant
effect on recovering a signal from its samples.
The frequency
12
T
s
1
2
T
s
,
known today as the Nyquist frequency and the Shannon sampling frequency, corresponds
to the highest frequency at which a signal can contain energy and remain compatible with
the Sampling Theorem. High-quality sampling systems ensure that no aliasing occurs by
unceremoniously lowpass filtering the signal (cutoff frequency being slightly lower than
the Nyquist frequency) before sampling. Such systems therefore vary the anti-aliasing
filter's cutoff frequency as the sampling rate varies. Because such quality features cost
money, many sound cards do not have
anti-aliasing filters or, for that matter, post-sampling
filters. They sample at high frequencies, 44.1 kHz for example, and
hope the signal contains no frequencies above the Nyquist frequency
(22.05 kHz
in our example).
If, however, the signal contains frequencies beyond the sound
card's Nyquist frequency, the resulting aliasing can be impossible to remove.
To gain a better appreciation of aliasing, sketch the spectrum
of a sampled square wave. For simplicity consider only
the spectral repetitions centered at
−1
T
s
1
T
s
, 00,
1
T
s
1
T
s
. Let the sampling interval
T
s
T
s
be 1; consider two values for the square wave's period: 3.5
and 4. Note in particular where the spectral lines go as the
period decreases; some will move to the left and some to the
right. What property characterizes the ones going the same
direction?
The square wave's spectrum is shown by the bolder set of lines centered about the origin. The dashed
lines correspond to the frequencies about which the spectral repetitions (due to sampling
with
T
s
=1
T
s
1
)
occur. As the square wave's period decreases, the negative frequency lines move to the
left and the positive frequency ones to the right.
If we satisfy the Sampling Theorem's conditions, the signal will
change only slightly during each pulse. As we narrow the pulse, making
ΔΔ
smaller and smaller, the nonzero values of the signal
st
p
T
s
t
s
t
p
T
s
t
will simply
be
sn
T
s
s
n
T
s
,
the signal's samples. If indeed the Nyquist frequency equals the signal's highest
frequency, at least two samples will occur within the period of the signal's highest
frequency sinusoid. In these ways, the sampling signal captures the sampled signal's
temporal variations in a way that leaves all the original signal's structure intact.
What is the simplest bandlimited signal? Using this signal, convince yourself that less than two samples/period will not suffice to specify it. If the sampling rate
1
T
s
1
T
s
is not high enough, what signal would your resulting undersampled
signal become?
The simplest bandlimited signal is the sine wave. At the Nyquist frequency, exactly two
samples/period would occur. Reducing the sampling rate would result in fewer
samples/period, and these samples would appear to have arisen from a lower frequency
sinusoid.