Sampling
Sampling is the processes of converting continuous-time analog
signal, xa(t), into a discrete-time signal by taking the “samples” at
discrete-time intervals
Sampling analog signals makes them discrete in time but still
continuous valued
If done properly (Nyquist theorem is satisfied), sampling does not
introduce distortion
Sampled values:
The value of the function at the sampling points
Sampling interval:
The time that separates sampling points (interval b/w samples), Ts
If the signal is slowly varying, then fewer samples per second will
be required than if the waveform is rapidly varying
So, the optimum sampling rate depends on the maximum
frequency component present in the signal
1
Analog-to-digital conversion is (basically) a 2 step process:
Sampling
Convert from continuous-time analog signal xa(t) to discrete-
time continuous value signal x(n)
Is obtained by taking the “samples” of xa(t) at discrete-time
intervals, Ts
Quantization
Convert from discrete-time continuous valued signal to discrete
time discrete valued signal
2
Sampling
Sampling Rate (or sampling frequency fs):
The rate at which the signal is sampled, expressed as the
number of samples per second (reciprocal of the sampling
interval), 1/Ts = fs
Nyquist Sampling Theorem (or Nyquist Criterion):
If the sampling is performed at a proper rate, no info is lost about
the original signal and it can be properly reconstructed later on
Statement:
“If a signal is sampled at a rate at least, but not exactly equal to
twice the max frequency component of the waveform, then the
waveform can be exactly reconstructed from the samples
without any distortion”
f s 2 f max
3
Ideal Sampling ( or Impulse Sampling)
1 jn s t
Therefore, we have: xs (t ) x(t ) e
Ts n
Take Fourier Transform (frequency convolution)
jnst 1
1
Xs ( f ) X ( f )* e X ( f ) * e jn s t
Ts n Ts n
1
s
X s ( f ) X ( f ) * ( f nf s ), f s
Ts n 2
1 1 n
Xs( f )
Ts
n
X ( f nf s )
Ts
n
X(f )
Ts
4
Sampling
If Rs < 2B, aliasing (overlapping of the spectra) results
If signal is not strictly bandlimited, then it must be passed through
Low Pass Filter (LPF) before sampling
Fundamental Rule of Sampling (Nyquist Criterion)
The value of the sampling frequency fs must be greater than twice
the highest signal frequency fmax of the signal
Types of sampling
Ideal Sampling
Natural Sampling
Flat-Top Sampling
5
Ideal Sampling ( or Impulse Sampling)
Is accomplished by the multiplication of the signal x(t) by the uniform
train of impulses (comb function)
Consider the instantaneous sampling of the analog signal x(t)
Train of impulse functions select sample values at regular intervals
xs (t ) x(t ) (t nTs )
n
Fourier Series representation:
1
2
n
(t nTs )
Ts
e
n
jns t
, s
Ts
6
Ideal Sampling ( or Impulse Sampling)
This shows that the Fourier Transform of the sampled signal is the
Fourier Transform of the original signal at rate of 1/Ts
7
Ideal Sampling ( or Impulse Sampling)
This means that the output is simply the replication of the original
signal at discrete intervals, e.g
8
Ts is called the Nyquist interval: It is the longest time interval that can
be used for sampling a bandlimited signal and still allow
reconstruction of the signal at the receiver without distortion
9
Practical Sampling
In practice we cannot perform ideal sampling
It is practically difficult to create a train of impulses
Thus a non-ideal approach to sampling must be used
We can approximate a train of impulses using a train of very thin
rectangular pulses:
t nTs
x p (t )
n
Note:
Fourier Transform of impulse train is another impulse train
Convolution with an impulse train is a shifting operation
10
Natural Sampling
If we multiply x(t) by a train
of rectangular pulses xp(t),
we obtain a gated waveform
that approximates the ideal
sampled waveform, known
as natural sampling or
gating (see Figure 2.8)
xs (t ) x(t ) x p (t )
x(t )
n
cn e j 2 nf s t
X s ( f ) [ x(t ) x p (t )]
n
cn [ x(t )e j 2 nf s t ]
c
n
n X [ f nf s ]
11
Each pulse in xp(t) has width Ts and amplitude 1/Ts
The top of each pulse follows the variation of the signal being
sampled
Xs (f) is the replication of X(f) periodically every fs Hz
Xs (f) is weighted by Cn Fourier Series Coeffiecient
The problem with a natural sampled waveform is that the tops of the
sample pulses are not flat
It is not compatible with a digital system since the amplitude of each
sample has infinite number of possible values
Another technique known as flat top sampling is used to alleviate
this problem
12
Flat-Top Sampling
Here, the pulse is held to a constant height for the whole
sample period
Flat top sampling is obtained by the convolution of the signal
obtained after ideal sampling with a unity amplitude
rectangular pulse, p(t)
This technique is used to realize Sample-and-Hold (S/H)
operation
In S/H, input signal is continuously sampled and then the
value is held for as long as it takes to for the A/D to acquire
its value
13
Sample-And-Hold Circuit
S/H
Analog Input (AI) is sampled when the
switch is closed and its value is held on the
capacitor where it becomes the Analog
Output (AO)
14
Sample-And-Hold Circuit
15
Recovering the Analog Signal
One way of recovering the original signal from sampled signal Xs(f)
is to pass it through a Low Pass Filter (LPF) as shown below
If fs > 2B then we recover x(t) exactly
Else we run into some problems and signal
is not fully recovered
16
Undersampling and Aliasing
If the waveform is undersampled (i.e. fs < 2B) then there will be
spectral overlap in the sampled signal
The signal at the output of the filter will be
different from the original signal spectrum
This is the outcome of aliasing!
This implies that whenever the sampling condition is not met, an
irreversible overlap of the spectral replicas is produced
17
This could be due to:
1. x(t) containing higher frequency than were
expected
2. An error in calculating the sampling rate
Under normal conditions, undersampling of signals causing
aliasing is not recommended
18
Solution 1: Anti-Aliasing Analog Filter
All physically realizable signals are not completely bandlimited
If there is a significant amount of energy in frequencies above
half the sampling frequency (fs/2), aliasing will occur
Aliasing can be prevented by first passing the analog signal
through an anti-aliasing filter (also called a prefilter) before
sampling is performed
The anti-aliasing filter is simply a LPF with cutoff frequency
equal to half the sample rate
19
Solution 2: Over Sampling and Filtering in the Digital
Domain
The signal is passed through a low performance (less costly)
analog low-pass filter to limit the bandwidth.
Sample the resulting signal at a high sampling frequency.
The digital samples are then processed by a high
performance digital filter and down sample the resulting
signal.
20
Summary Of Sampling
Ideal Sampling xs (t ) x(t ) x (t ) x(t ) (t nTs )
(or Impulse Sampling) n
x(nT ) (t nT )
n
s s
Natural Sampling
(or Gating)
xs (t ) x(t ) x p (t ) x(t ) cn e j 2 nf s t
n
Flat-Top Sampling
xs (t ) x '(t ) * p(t ) x(t ) (t nTs ) * p(t )
n
For all sampling techniques
If fs > 2B then we can recover x(t) exactly
If fs < 2B) spectral overlapping known as aliasing will occur
21
Example 1:
Consider the analog signal x(t) given by
x(t ) 3cos(50 t ) 100sin(300 t ) cos(100 t )
What is the Nyquist rate for this signal?
Example 2:
Consider the analog signal xa(t) given by
xa (t ) 3cos 2000 t 5sin 6000 t cos12000 t
What is the Nyquist rate for this signal?
What is the discrete time signal obtained after sampling, if
fs=5000 samples/s.
What is the analog signal x(t) that can be reconstructed from the
sampled values?
22
Practical Sampling Rates
Speech
- Telephone quality speech has a bandwidth of 4 kHz
(actually 300 to 3300Hz)
- Most digital telephone systems are sampled at 8000
samples/sec
Audio:
- The highest frequency the human ear can hear is
approximately 15kHz
- CD quality audio are sampled at rate of 44,000
samples/sec
Video
- The human eye requires samples at a rate of at
least 20 frames/sec to achieve smooth motion
23