Sampling and Reconstruction
Sampling and Reconstruction
Topic 4:
Sampling and Reconstruction (Part 1/2)
2
• An analog signal is • A digital signal is
continuous in both time discrete in both time
and amplitude. and amplitude.
3
4
To convert a signal from continuous time to discrete time, a
process called sampling is used.
5
6
Sampling
When the continuous analog signal is sampled at a frequency F,
the resulting discrete signal has more frequency components
than did the analog signal.
7
Example:
8
Frequency Sampling Method
9
The time interval T between successive samples is called the
sampling period.
1/ T = Fs
10
Sampling
11
If the signal contains high frequency components, we
will need to sample at a higher rate to avoid losing
information that is in the signal.
12
The Sampling Theorem states that a signal can be
exactly reproduced if it is sampled at a frequency F,
where F is greater than twice the maximum
frequency in the signal.
13
14
15
Nyquist rate FN = 2 Fmax , where this signal is said to be
critically sampled.
16
Aliasing
Aliasing is potentially a very serious problem in any
system that processes sampled signals.
Example :
If aliasing happens in digital telephone systems, for
example, speech would sound strange and probably
unintelligible. Digital audio recordings which failed to
sample the sound signal at a sufficient rate would
result in extremely poor reproduction.
17
Avoid aliasing
(image overlap/noise
etc)
Fs > 2 Fmax
18
19
Preventing Aliasing
What can be done to avoid or prevent aliasing? Briefly,
there are two approaches:
20
21
Preventing Aliasing
2. Use an anti-aliasing filter prior to the sampling stage. This is
a low-pass filter designed to pass all frequency
components that can be handled correctly by the sampling
process, but to block out higher-frequency components
that would give rise to aliasing.
22
23
24
Sampling
In real-world applications, sampling at higher
frequencies results in better reconstructed signals.
25
Example
Consider the analog signal
xa (t ) = 3 cos100πt
26
Solution
The frequency of the analog signal is .
F = 50 Hz
27
Periodic Sampling
Discrete time signal x[n] often arises from periodic
sampling of continuous time signal x(t):
x[n] = x(nT ) −∞ < n < ∞
C/D
x(t ) x[n] = x(nT )
T
28
29
C/D converter is described by the following:
• sampling period: T seconds
• sampling frequency:
30
The sampling process is not generally invertible, one
cannot always reconstruct x(t) unambiguously from
x[n]. However, ambiguity can be removed by
restricting input signals to sampler.
31
32
Frequency domain representation
of sampling
What is the frequency domain relation between input
and output of C/D converter?
33
which has frequency representation:
2π ∞
S ( jΩ ) =
T
∑ δ (Ω − kΩ )
k = −∞
s
34
Through the sifting property of the impulse function:
xs (t ) = xc (t ) s (t )
∞
= xc (t ) ∑ δ (t − nT )
n = −∞
∞
= ∑ x (nT )δ (t − nT )
n = −∞
c xc (t )
xs (t )
t 35
The Fourier Transform X s ( jΩ) of xs (t ) = xc (t ) s (t )
is the continuous-time convolution of Fourier
Transforms X c ( jΩ) and S ( jΩ) so
1
X s ( jΩ ) = X c ( jΩ ) ∗ S ( jΩ )
2π
1 ∞
= ∑ X c ( j (Ω − kΩ s ))
T k = −∞
36
Therefore, the Fourier Transform of xs (t ) consists of
copies of X c ( jΩ) shifted by integer multiples of
sampling frequency Ω s and then superimposed:
X c ( jΩ )
0 ΩN Ω
37
S ( jΩ )
− 2Ω s − Ω s 0 Ωs 2Ω s Ω
X s ( jΩ )
− 2Ω s − Ω s 0 ΩN Ω 38
If xc (t ) is bandlimited, with highest nonzero
frequency at Ω N then the replicas do not overlap
when
Ω s > 2Ω N
39
X s ( jΩ )
− 2Ω s − Ω s 0 Ωs 2Ω s Ω
“ aliasing “
40
The frequency Ω N is referred to as the Nyquist
frequency, and the frequency 2Ω N that must be
exceeded in the sampling is the Nyquist rate.
41
yields the following:
∞
X s ( jΩ ) = ∑ c
x (
n = −∞
nT ) e − jΩTn
42
It follows that:
X s ( j Ω ) = X ( e jω ) = X (e jΩT )
ω = ΩT
Consequently
1 ∞
jΩT
X (e ) =
T
∑X
k = −∞
c ( j (Ω − kΩ s ))
1 ∞
ω 2πk
jω
X (e ) =
T
∑ X c j −
k = −∞ T T
43
Thus, X (e jω ) is just a frequency scaled version of
X s ( jΩ) with the scaling specified by ω = ΩT .
44
Reconstruction of bandlimited
signal from samples
If samples of a bandlimited continuous time signal are taken
frequently enough, then they are sufficient to represent the
signal exactly.
− 2Ω s − Ω s 0 Ωs 2Ω s Ω
Ωc 47
Reconstruction of bandlimited
signal from samples
A convenient choice for the cutoff frequency is
Ω c = Ω s / 2 = π / T corresponding to the ideal
reconstruction filter
T Ω ≤ π /T
H r ( jΩ ) =
0 Ω > π /T
48
Reconstruction of bandlimited
signal from samples
And reconstructed signal:
X r ( jΩ) = H r ( jΩ) X (e jΩT )
TX (e jΩT ) Ω ≤ π /T
=
0 Ω > π /T
49
Reconstruction of bandlimited
signal from samples
In the time domain, the ideal reconstruction filter has
impulse response:
sin(π t / T )
hr (t ) =
π t /T
So, the reconstructed signal is:
∞
sin[π (t − nT ) / T ]
xr (t ) = ∑ x[n]
n = −∞ π ( t − nT ) / T
50
Reconstruction of bandlimited
signal from samples
From the previous frequency domain argument, if
x[n] = xc (nT ) with X c ( jΩ) = 0 for Ω ≥ π / T then
xr (t ) = xc (t ) .
51
Reconstruction of bandlimited
signal from samples
An ideal discrete-to-continuous (D/C) reconstruction
system, therefore, has the form:
Sequence to Reconstruction
impulse train filter
x[n] xs (t ) H r ( jΩ ) xr (t )
T
D/C
x[n] xr (t )
T
52
Discrete time processing of
continuous time signals
Discrete time systems are often used to process
continuous time signals. This is accomplished by:
Discrete
C/D D/C
time
xc (t ) x[n] system
y[n] yr (t )
T T
53
Discrete time processing of
continuous time signals
For now, it is assumed that the C/D and D/C converters
have the same sampling rate. The C/D converter
produces the discrete time signal x[n] = xc (nT ) with
Fourier Transform:
1 ∞
ω 2πk
X (e ) = ∑ X c j −
jω
T k = −∞ T T
54
Discrete time processing of
continuous time signals
The D/C converter creates a continuous time output of
the form: ∞
sin[π (t − nT ) / T ]
yr (t ) = ∑ y[n]
n = −∞ π (t − nT ) / T
The continuous time Fourier Transform of yr (t )
namely Yr ( jΩ) and the discrete time Fourier
Transform of y[n] namely Y (e jΩ ) are related by:
jΩT
Yr ( jΩ) = H r ( jΩ)Y (e )
55
Discrete time processing of
continuous time signals
TY (e jΩT ) Ω < π / T
=
0 otherwise
56
Discrete time processing of
continuous time signals
Therefore,
Yr ( jΩ) = H r ( jΩ) H (e jΩT ) X (e jΩT )
1 ∞
2πk
= H r ( jΩ) H (e ) ∑ X c j Ω −
jΩT
T k = −∞ T
58
Continuous time processing of
discrete time signals
It is conceptually useful to consider continuous time
processing of discrete time signal. This system is:
D/C hc (t ) C/D
x[n] xc (t ) H c ( jΩ ) yr (t ) y[n]
T T
h[n], H (e jω )
59
Continuous time processing of
discrete time signals
Since the D/C converter includes an ideal LPF, X c ( jΩ)
and therefore also Yc ( jΩ) will be zero for Ω ≥ π / T .
Thus, the C/D converter samples yc (t ) without
aliasing and we have:
∞
sin[π (t − nT ) / T ]
xc (t ) = ∑ x[n]
n = −∞ π (t − nT ) / T
∞
sin[π (t − nT ) / T ]
yc (t ) = ∑ y[n]
n = −∞ π (t − nT ) / T
where x[n] = xc (nT ) and y[n] = yc (nT ).
60
Continuous time processing of
discrete time signals
In the frequency domain,
X c ( jΩ) = TX (e jΩT ) Ω < π /T
1 ω
jω
Y (e ) = Yc ( j ) ω <π
T T
61
Continuous time processing of
discrete time signals
The overall system, therefore, behaves like a discrete-
time system with frequency response:
ω
jω
H (e ) = H c ( j ) ω <π
T
Equivalently, the overall frequency response of the
system will be equal to a given H (e jω ) if the
frequency of the continuous-time system is
H c ( jΩ) = H (e jΩT ) Ω < π /T
Since X c ( jΩ) = 0 for Ω < π / T , H c ( jΩ) may be
chosen above π / T . 62
63