Sampling and Reconstruction
Sampling and Reconstruction
}
= O ) ( ) (
dt e t x s X
st
}
= ). ( ) (
Response of a linear system
The system is characterized by impulse response h(t). The
output y(t) is obtained by the time domain convolution :
Or frequency domain:
where H(O) is the frequency response of the system.
5
' ) ' ( ) ' ( ) (
}
= dt t x t t h t y
) ( ). ( ) ( O O = O X H Y
Linear system
h(t)
x(t)
input
y(t)
output
H(O) is the Fourier transform of h(t)
The steady state response of a sinusoid:
Output is a sinusoid with frequency (O),
amplitude equal to the signal amplitude multiplied
by MagH(O), and phase shift equal to arg(H(O)):
6
}
O
= O dt e t h H
t j
) ( ) (
Linear system
H(O)
x(t) = exp(jOt)
Sinusoid in
y(t) = H(O)exp(jOt)
Sinusoid out
) ( arg
. | ) ( | ) ( ) ( ) (
O + O O O
O = O = =
H j t j t j t j
e H e H t y e t x
Linear superposition: Signals x(t) has two frequency
components
After filtering
Note: Filtering only change the magnitudes but not
the frequencies
7
t j t j
e A e A t x
2 1
2 1
) (
O O
+ =
t j t j
e H A e H A t y
2 1
) ( ) ( ) (
2 1
O O
O + O =
The result is presented in frequency domain
Spectrum of X(O)
Spectrum of Y(O)
8
X( O)
A
1
A
2
H( O)
O
Y( O)
A
1
H( O)
O
A
2
H( O)
) ( 2 ) ( 2 ) (
2 2 1 1
O O + O O = O o t o t A A X
) ( ) ( 2 ) ( ) ( 2
)) ( 2 ) ( 2 )( ( ) ( ) ( ) (
2 2 2 1 1 1
2 2 1 1
O O O + O O O =
O O + O O O = O O = O
o t o t
o t o t
H A H A
A A H X H Y
Sampling process in Fig. 3.1. x(t) is sampled
by period T, t=nT where n=0,1,2,
Many high frequency components appear
in the signal spectrum
Two questions are often provided for
1. What is the effect of sampling on the
original frequency spectrum?
2. How should one choose the sampling
interval T?
9
3. Concept of Sampling theorem
The spectrum of the sampled sinusoid x(nT)
will be periodic replication of the original
spectral line at intervals f
s
=1/T
Figure 3.1 Ideal Sampler
10
11
Figure 3.2. Spectrum replication caused by sampling.
With the replicated spectrum of the sampled signal, one
cannot tell uniquely What the original frequency was. It
could be any one of the replicated frequencies namely
f=f+mf
s.
This potential confusion of the original frequency
with another is known as aliasing and can be avoided if one
satisfies the condition of the sampling theorem
Sampling theorem
For accurate representation of a signal x(t) by its
time samples x(nT), two conditions must be met:
1: x(t) is bandlimited
2: Sampling frequency must be chosen to be
at least twice the maximum frequency f
max
,
f
s
> 2f
max
:
f
s
= 2f
max
is the Nyquist rate.
f
s
/2 is the Nyquist frequency or folding
frequency
12
Typical sampling rate for some common applications
Antialiasing Prefilter
Signal must be bandlimited therefore need to pass
through a low pass filter namely prefilter before sampling
14
Prefiltered spectrum
0
0 - f
s
f
s
f
f
- f
s
/2 f
s
/2
f
Input spectrum
prefilter
Replicated
spectrum
Bandlimited
signal
x(t) Analog
signal
digital
signal
x( nT) x(t)
Analog lowpass
filter
Sampler and
quantizer
To DSP
Antialiasing prefilter
What happens if we do not sample in
accordance with the sampling theorem?
Missing important time variations between sampling instants
May arrive at the erroneous conclusion that the samples
represent a signal which is smoother than it actually is
Be confusing the true frequency content of the signal with a
lower frequency content. Such confusion of signals is called
aliasing
Aliasing in
The time domain
The number of samples per is given by the quantity f
s
/f:
16
4. Sampling of sinusoid: x(t) = cos(2tft)
cycle
samples
cycles
samples
f
f
s
= =
sec /
sec /
Special case with multiple frequency components in the x(t)
17
Analog reconstruction and aliasing
) ( ) (
2 2 2 ) ( 2
nT x e e e e nT x
jfTn Tn jmf jfTn Tn mf f j
m
s s
= = = =
+ t t t t
,... ,..., 2 , ,
s s s
mf f f f f f f
Using the property f
s
T=1 and the trigonometric identity
Define also the following family of sinusoids, for m in integer
And its sampled version
Note that x
m
(t) are different from each other
but they have same samples:
18
LPF as an ideal
reconstructor
Example
As sinusoid f=10 Hz, sampled by f
s
=12Hz. The sampled
signal consists of periodic frequencies 10+m.12Hz, m = 0,
1, 2, or: , -26, -14, -2, 10, 22, 34, 46, but only f
a
= 10 mod(12) = 10 12 = -2 Hz in the range of Nyquist
interval [-6,6] Hz. So the reconstructed signal with 2 Hz
is not as the original one with 10 Hz.
19
Example: 5 signals are sampled by the rate 4Hz:
(t second)
Let prove they are aliased each other due to their same
samples.
Sol: The frequencies of the signals: -7, -3, 1, 5, 9 Hz. They
have the same periodic replication in multiples of f
s
=4Hz.
Writing the five frequencies compactly:
f
m
=1+4m, m=-2, -1, 0, 1, 2.
20
t) sin(18 t), sin(10 t), sin(2 , ) 6 sin( ), t 14 sin( t t t t t t
2 -2,-1,0,1, m )), 4 1 ( 2 sin( ) 2 sin( ) ( = + = = n t f t x
m m
t t
) 4 / 2 sin( ) 2 4 / 2 sin(
) 4 / ) 4 1 ( 2 sin( ) ) 4 1 ( 2 sin( ) (
n mn n
n m nT m nT x
m
t t t
t t
= + =
+ = + =
Example: x(t)=4+3cos(pt)+2cos(2pt)+cos(3pt) t: in ms
Determine the min sampling rate without any aliasing effects
Supposed the signal sampled at half its Nyquist rate.
Determine xa(t) that would be aliased with x(t).
Sol:
Freq. of 4 terms: f
1
=0, f
2
=0.5kHz, f
3
=1kHz,f
4
=1.5kHz
Example: The square wave sampled at rate f
s
; t in seconds
Determine the x
a
(t) that will appear at the output of the
reconstructor for 2 cases f
s
=4kHz and 8kHz.
Sol:
Fourier series of square wave contains odd harmonics at freq.
For f
s
=4kHz, the aliased signal will be
For fs =8kHz, the aliased signal will be
The first case: Sketch for x
a
(t)
Condition x
a
(t)=x(nT) evalued at n=1 implies A=1
The second case: x
a
(t)=Bsin(tn/4)+Csin(3tn/4)
Condition x
a
(t)=x(nT) at n=1,2 give two equations
Example: A given x(t), t in ms and a block of DSP
Determine the y(t) and y
a
(t) in the following cases:
a. When there is no prefilter, that is, H(f)=1 for all f
b. When H(f) is the ideal filter with cutoff f
s
/2=20kHz
c. When H(f) is a practical prefilter as follows,
Sol: Six terms of freq. in x(t)
Case a.
Case b.
Case c.
Sampled signal:
In practical sampling, the sampled signal:
where, p(t) is flat-top pulse of duration t second.
Ideal sampling with t toward 0.
30
5. Spectra of sampled signals
=
=
n
nT t nT x t x ) ( ) ( ) (
=
=
n
flat
nT t p nT x t x ) ( ) ( ) (
0 T 2T . nT t
0 T 2T . nT t
x flat (t)
t
) ( t x
) ( ) ( nT t nT x o
) ( ) ( nT t p nT x
Discrete Time Fourier Transform DTFT
or
This approximation become exact if
Practical approximation
32
Spectrum Replication
Aliasing caused by overlapping spectral replicas
Ideal antialiasing prefilter
Practical antialiasing prefilter
Attenuation in dB
35
6. Analog signal reconstruction
Staircase reconstructor
Analog reconstructor as a low pass filter
) (
) ( ) ( f Y f H f Y
a
=
+
=
=
n
a
nT t h nT y t y ) ( ) ( ) (
) (
1
) (
=
=
m
s
mf f Y
T
f Y
36
+
=
=
n
nT t nT y t y ) ( ) ( ) (
+
=
=
n
a
nT t h nT y t y ) ( ) ( ) (
Replicated spectrum
Reconstructed analog signal
Ideal reconstructor
Staircase reconstructor
Anti-image postfilter
Digital equalization filter for D/A conversion