Title: Sampling and the Nyquist Critereon
1Sampling and the Nyquist Critereon
You should recall that an analog signal is
continuous in time. That is, it exists for all
values of the time variable, t. Any one-second
interval of time contains an infinite number of
values of t. Any one-microsecond (or
one-nanosecond, or one-picosecond, or
one-femtosecond, ) interval also contains an
infinite number of values of t. An analog signal
processing system processes the input signal for
an infinite number of values.
1
Analog Signal
Sampled Analog Signal
Switch closes very briefly, then opens, 22,000
times per second.
2Sampling and the Nyquist Critereon
A digital signal processing system is, by
definition, a digital system. It operates on
integer numbers (even if they are floating
point numbers, they are still represented by
integers), and can only process a finite number
of integers in any finite interval of time.
Therefore, out of the infinite number of values
of t within any finite time interval, we must
select a finite number of values of t and process
the input signal only for those values of t.
1
Analog Signal
Sampled Analog Signal
Switch closes very briefly, then opens, 22,000
times per second.
3Sampling and the Nyquist Critereon
This is what the sample-and-hold portion of an
analog to digital (A/D) converter does. It takes
a snapshot of the analog signal (V(t) in the
figure below) at a finite number of values of t.
In most systems, he values of t at which V(t) is
sampled are usually separated by time intervals
of uniform size. In the figure below, any two
adjacent samples are taken at values of t
separated by 1/22000 sec. This is called uniform
sampling, because the interval between adjacent
samples is uniform.
1
Analog Signal
Sampled Analog Signal
Switch closes very briefly, then opens, 22,000
times per second.
4Sampling and the Nyquist Critereon
For example, suppose V(t) is a 1000 Hz. Sine wave
as shown below
Lets sample this signal every 1/22000 of a
second. This is a sampling rate or sampling
frequency of 22 kHz, 22,000 samples per second,
or 22 ksps. The sampling period or sampling
interval is 1/22000 sec.
5Sampling and the Nyquist Critereon
The samples are snapshots of V(t) at discrete
values of t, and are only
Valid at those discrete values of t. In this
example, let Ts represent the sampling period.
Vs(t) is defined only at these values of t.
6Sampling and the Nyquist Critereon
The samples may be though of as dots in a
connect-the-dots sketch of
the analog signal. Its pretty obvious that the
analog signal was a 1 kHz sine wave,
right? Before answering that, consider a 21 kHz
sine wave, sampled at 22 kHz.
7Sampling and the Nyquist Critereon
The samples may be though of as dots in a
connect-the-dots sketch of
the analog signal. Its pretty obvious that the
analog signal was a 1 kHz sine wave,
right? Before answering that, consider a 21 kHz
sine wave, sampled at 22 kHz
8Sampling and the Nyquist Critereon
Heres the signal
9Sampling and the Nyquist Critereon
Here are the samples. Notice that theyre
identical to the sequence of
samples taken from the 1 kHz sine wave. This
sequence could represent either a 1 kHz analog
signal, or a 21 kHz analog signal.
10Sampling and the Nyquist Critereon
At the output of the sample-and-hold circuit, the
analog signal no longer exists. Only a sequence
of samples exists, and this by itself is not
sufficient to tell whether the original signal
frequency was 1 kHz. Or 21 kHz. This ambiguity
can only be resolved if we have prior (or a
priori) knowledge that the analog signal
frequency was either 1 kHz or 21 kHz.
1
Analog Signal
Sampled Analog Signal
Switch closes very briefly, then opens, 22,000
times per second.
11Sampling and the Nyquist Critereon
Heres the frequency-domain view of the 1 kHz
sine wave sampled
At 22 kHz. Notice that theres a concentration
of power at 1kHz, but theres a second
concentration of power at 21 KHz. The sampled
sequence is actually equivalent to the sum of two
sine waves, one at 1 kHz and the other at 21 kHz.
This spectrum is identical to the spectrum of a
21 kHz sine wave sampled at 1 kHz.
12Sampling and the Nyquist Critereon
Heres the frequency-domain view of the 1 kHz
sine wave sampled
At 22 kHz. Notice that theres a concentration
of power at 1kHz, but theres a second
concentration of power at 21 KHz. The sampled
sequence is actually equivalent to the sum of two
sine waves, one at 1 kHz and the other at 21 kHz.
This spectrum is identical to the spectrum of a
21 kHz sine wave sampled at 1 kHz.
13Sampling and the Nyquist Critereon
Heres the frequency-domain view of a 10 kHz sine
wave sampled
At 22 kHz. Notice the power at both 10 kHz and
12 KHz. This spectrum is identical to the
spectrum of a 17 kHz sine wave sampled at 22
kHz. In general, if the sampling frequency is fs
and the signal frequency is f1, sampling produces
an image at
14Sampling and the Nyquist Critereon
If the signal frequency is, for example, 1 kHz, 5
kHz or 10 kHz, the
image frequency is 21 kHz, 17 kHz or 12 kHz,
respectively.
15Sampling and the Nyquist Critereon
Unfortunately, a signal at 21 KHz, 17 kHz or 12
KHz results in an
Image at 1 kHz, 5 kHz or 10 kHz, respectively.
Without a priori (prior) knowledge that the
signal frequency was 1 kHz, we cant distinguish
after sampling between a 1 kHz signal and a 21
kHz signal.
16Sampling and the Nyquist Critereon
If the signal frequency is, for example, 1 kHz, 5
kHz or 10 kHz, the
image frequency is 21 kHz, 17 kHz or 12 kHz,
respectively. If the analog signal frequency is
less then fs/2, then we know that the spectral
content in the sequence of samples which is below
fs/2 represents the signal and that the spectral
content above fs/2 represents the image.
17Sampling and the Nyquist Critereon
Heres an example you can actually hear A 1 kHz
sine wave, sampled
at 11 kHz (or was it a 10 kHz sine wave? The
spectrum doesnt really tell which). To hear
the 1 kHz sine wave, click here To hear the
signal sampled at 11 kHz, click here Do you
hear the image?
18Sampling and the Nyquist Critereon
Thus, if we make sure that the signal only
contains power below fs/2, we can resolve the
signal/image ambiguity. We can make sure the
signal is band-limited by placing a lowpass
filter which rejects any signal component above
fs/2 ahead of the sampler. This filter is called
an anti-aliasing filter.
Sample And Hold
Lowpass filter
Analog Signal
Sampled Analog Signal
19Sampling and the Nyquist Critereon
If we wish to be able to recover the original
analog signal unambiguously (that is, draw the
original signal by connecting the dots between
samples), we must be sure that the analog signal
we sample contains no energy above the frequency
fs/2.
Power Spectral density
Heres a bandlimited signal, with bandwidth B.
B lt fs/2, so the signal and image spectra are
distinct.
signal spectrum
image spectrum
fs/2
f (Hz.)
fs - B
B
fs
20Sampling and the Nyquist Critereon
If the signal bandwidth B gt fs/2, the signal and
image spectra overlap as shown below. The
sampling theorem, or Nyquist theorem, says that
the original analog signal can be perfectly
recovered (i.e., re-created) from the sequence of
its samples if it contains no energy at any
frequency greater than ½ the sample rate. fs/2,
the frequency at or above which there must be no
energy, is called the Nyquist frequency.
Power Spectral density
signal spectrum
image spectrum
fs/2
f (Hz.)
fs - B
B
fs
21Sampling and the Nyquist Critereon
A signal which may contain energy at any
frequency f lt B must be sampled at a rate of at
least fs/2 Hz. This minimum sampling rate is
called the Nyquist rate or Nyquist sampling rate.
A signal which contains no energy above fs/2 may
be said to satisfy the Nyquist critereon or
Nyquist requirement.
Power Spectral density
signal spectrum
image spectrum
fs/2
f (Hz.)
fs - B
B
fs
22Sampling and the Nyquist Critereon
The figure below shows a more complete frequency
domain view of a bandlimited, sampled signal.
Notice that the signal spectrum, including both
positive and negative frequencies, is replicated
at every positive and negative integer multiple
of fs.
Power Spectral density
B
-B
fs
2fs
-fs
fs/2
-fs/2
23Sampling and the Nyquist Critereon
The analog signal has only its own spectrum, none
of the images
Power Spectral density
B
-B
fs
2fs
-fs
fs/2
-fs/2
24Sampling and the Nyquist Critereon
To recover the analog signal, we can simply use a
lowpass filter (an anti-imaging filter, or
recovery filter) to reject the images.
Power Spectral density
Frequency response of recovery filter
B
-B
fs
2fs
-fs
fs/2
-fs/2
25Sampling and the Nyquist Critereon
After rejection of the images, the
frequency-domain view of the recovered signal is
the same as the frequency-domain view of the
original signal. Because a signals time-domain
and frequency-domain views map to each other
uniquely (that is, a signal with a given time-
Domain view has one and only one possible
frequency-domain view, and vice versa), the
filtered signal must be identical to the original
analog signal.
Power Spectral density
B
-B
fs
2fs
-fs
fs/2
-fs/2
26Sampling and the Nyquist Critereon
How can this be? The sampled signal, which was
the output of the
recovery filter, exists only as a sequence of
snapshots, or unconnected dots. There are an
infinite number of Voltages, each with an
infinite number of possible values, between each
of the dots. How can these be filled in?
27Sampling and the Nyquist Critereon
The recovery filter is a lowpass filter, which
smooths jagged input
waveforms by performing a sort of moving average
on neighboring samples. As it does this, it
connects the dots.
28Sampling and the Nyquist Critereon
Youll recall that theres more than one way to
connect the dots. The
samples in this figure could represent a 1 kHz
sine wave, or a 21 kHz, or 23, or 43, or 45,
kHz sine wave.
29Sampling and the Nyquist Critereon
If the original signal was bandlimited by passing
it through an anti-
liasing filter to reject frequencies above 11
kHz, we know we dont have to worry about the
image frequencies. The original signal is the
one picked out and recovered by the recovery
filter.