Lecture Digital signal processing - Lecture 4 present sampling and reconstruction. The main contents of this chapter include all of the following: Periodic sampling, frequency domain representation, reconstruction, changing the sampling rate using discretetime processing.
Trang 1Digital Signal Processing, IV, Zheng-Hua Tan, 2006
1
Digital Signal Processing, Fall 2006
Zheng-Hua Tan
Department of Electronic Systems Aalborg University, Denmark
zt@kom.aau.dk
Lecture 4: Sampling and reconstruction
Course at a glance
Discrete-time signals and systems
Fourier-domain
representation
DFT/FFT
System structures
Filter structures Filter design
Filter
z-transform
MM1
MM2
MM9,MM10
MM3
MM6
MM4
MM7 MM8
Sampling and reconstruction MM5
System analysis System
Trang 2Digital Signal Processing, IV, Zheng-Hua Tan, 2006
3
Part I: Periodic sampling
Periodic sampling
Reconstruction
discrete-time processing
Periodic sampling
)
(t
∞
<
<
∞
−
n
x[ ] c( ),
T
T f T
s
s
/ 2
/ 1 π
= Ω
=
Trang 3Digital Signal Processing, IV, Zheng-Hua Tan, 2006
5
Two stages
train to a sequence
∑
∑
∑
∞
−∞
=
∞
−∞
=
∞
−∞
=
−
=
−
=
=
−
=
n
c
n
c
c
s
n
nT t nT
x
nT t t
x
t
s
t
x
t
x
nT
t
t
s
) ( )
(
) (
)
)
)
)
(
) (
)
(
δ δ
δ
τ τ δ
x
t
x c( ) =∫−∞∞ c( ) ( − )
∞
<
<
∞
−
n
x[ ] c( ),
In practice?
Periodic sampling
Tow-stage representation
convenient for gaining insight into sampling in
both the time and frequency domains
zero except at nT
no explicit information about sampling rate
Many-to-many Æ in general not invertible
)
(t
x s
]
[n
x
Trang 4Digital Signal Processing, IV, Zheng-Hua Tan, 2006
7
Part II: Frequency domain represent.
Frequency domain representation
Reconstruction
discrete-time processing
Frequency-domain representation
From x c (t) to x s (t)
repetition of the Fourier transform of x c (t).
∑
∑
∑
∑
∑
∞
−∞
=
∞
−∞
=
∞
−∞
=
∞
−∞
=
∞
−∞
=
−
=
Ω
− Ω
=
−
=
Ω Ω
= Ω
↔
=
Ω
− Ω
= Ω
↔
−
=
n
c
k
s c
n c
c c
s
k
s n
nT t nT x
k j X T nT
t t
x
j S j X j
X t
s t
x
t
x
k T
j S nT
t t
s
) ( ) (
)) (
( 1 ) ( ) (
) (
* ) ( 2
1 ) ( ) ) )
) (
2 ) ( ) (
)
s
δ δ
π
δ π δ
The Fourier transform of a periodic impulse train is a periodic impulse train.
?
Trang 5Digital Signal Processing, IV, Zheng-Hua Tan, 2006
9
Frequency-domain
∑
∑
∞
−∞
=
∞
−∞
=
Ω
− Ω
= Ω
Ω
− Ω
= Ω
k
s c
k
s
k j X T j X
k T
j S
)) (
( 1 ) (
) ( 2 ) (
s
δ π
N s N N
Recovery
Ideal lowpass
filter with gain
T and cutoff
frequency
) ( )
(
)
r jΩ =H jΩ X jΩ
X
) (
)
(
) (
Ω
=
Ω
Ω
− Ω
<
Ω
<
Ω
Ω
j
X
j
N s
c
N
c
Trang 6Digital Signal Processing, IV, Zheng-Hua Tan, 2006
11
Aliasing distortion
to
) (
c jΩ
X
N
s ≤ 2Ω
Ω
)
(
c jΩ
X
Aliasing – an example
t t
x c( ) = cos Ω0
t t
x r( ) = cos Ω0
t t
x r( ) = cos( Ωs− Ω0)
a.1
b.2
b.1
a.2
∑∞
−∞
=
Ω
− Ω
= Ω
k
s
X T j
Xs( ) 1 ( ( ))
Trang 7Digital Signal Processing, IV, Zheng-Hua Tan, 2006
13
Nyquist sampling theorem
Given bandlimited signal with
Then is uniquely determined by its samples
If
is called Nyquist frequency
is called Nyquist rate
N
c j
X ( Ω ) = 0 , for | Ω | ≥ Ω
N
Ω
)
(t
x c
∞
<
<
∞
−
n
x[ ] c( ),
N s
T ≥ Ω
=
)
(t
x c
N
Ω
2
Fourier transform of x[n]
From to
From to
By taking discrete-time Fourier transform of x[n]
) ( )
] [
)
(t x n
x s
∑∞
−∞
=
Ω
−
=
Ω
n
Tn j c
∑∞
−∞
=
−
=
n
c
∞
<
<
∞
−
n
x[ ] c( ),
∑∞
−∞
=
−
=
n
n j j
e n x e
T j
) )
( )
( ( X jΩ =∫−∞∞x t e−jΩt dt
Trang 8Digital Signal Processing, IV, Zheng-Hua Tan, 2006
15
Fourier transform of x[n]
is simply a frequency-scaled version of
with
retains a spacing between samples equal
to the sampling period T while always
has unity space
∑
−∞
=
∞
−∞
=
−
=
−
=
k c k
c j
T
k j
X T T
k T j X T e
T
Ω
=
ω
) (
| ) ( )
∑∞
−∞
=
Ω
− Ω
=
Ω
k
s
X T
j
) (jΩ
X s
)
(e jω
X
]
[n
x
)
(t
x s
Sampling and reconstruction of Sin Signal
) 4000 (
) 4000 (
) (
)
(t ↔X jΩ = πδ Ω − π + πδ Ω + π
) cos(
) ) 3 / 2 cos((
) 4000 cos(
)
(
]
[
aliasing no
12000 /
2 6000
/
1
4000 )
4000
cos(
)
(
0
0
n n
nT nT
x
n
x
T T
t t
x
c
s c
ω π
π
π π
π π
=
=
=
=
∴
=
= Ω
→
=
= Ω
→
=
T T
j X j
X
e
frequency normalized
with ) / (
| ) (
)
) 16000 cos(
)
about How
t t
∑∞
−∞
=
Ω
− Ω
= Ω
k
s
X T j
Xs ( ) 1 ( ( ))
Trang 9Digital Signal Processing, IV, Zheng-Hua Tan, 2006
17
Part III: Reconstruction
Reconstruction
discrete-time processing
Requirement for reconstruction
On the basis of the sampling theorem,
samples represent the signal exactly when:
signal
Trang 10Digital Signal Processing, IV, Zheng-Hua Tan, 2006
19
Reconstruction steps
Given x[n] and T, the impulse train is
i.e the nth sample is associated with the impulse at
t=nT
The impulse train is filtered by an ideal lowpass CT
filter with impulse response
∑
−∞
=
∞
−∞
=
−
=
−
=
n n
c
∑∞
−∞
=
−
=
n
r
(2)
(1)
)
(t
h r
) ( ) ( )
) ( Ω
↔H r j
Ideal lowpass filter
T t
T t t
h r
/
) / sin(
) (
π
π
=
T
s
as frequncy cutoff
choose Commonly
π
= Ω
= Ω
Trang 11Digital Signal Processing, IV, Zheng-Hua Tan, 2006
21
Ideal lowpass filter interpolation
CT signal
Modulated impulse train
∑∞
−∞
−
=
n r
T nT t
T nT t n
x t
x
/ ) (
) / ) ( sin(
] [ )
(
π π
Ideal discrete-to-continuous-time converter
Trang 12Digital Signal Processing, IV, Zheng-Hua Tan, 2006
23
discrete-to-continuous-time converter
From http://en.wikipedia.org/wiki/Digital-to-analog_converter
Ideally sampled signal Piecewise constant signal typical
of a practical DAC output
“Practical DACs do not output a sequence of dirac impulses (that, if
ideally low-pass filtered, result in the original signal before sampling)
but instead output a sequence of piecewise constant values or
rectangular pulses”
Applications
Trang 13Digital Signal Processing, IV, Zheng-Hua Tan, 2006
25
Part IV: Changing the sampling rate
Reconstruction
Changing the sampling rate using
discrete-time processing
Downsampling
By reconstruction & re-sampling though not desirable
Using DT processing only:
downsampling by “sampling” it
) ( ] [ ]
) ' ( ]
[
'
) ( ]
[
nT x n
x
nT x n
x
c
c
=
=
Trang 14Digital Signal Processing, IV, Zheng-Hua Tan, 2006
27
Frequency domain
∞
<
<
∞
−
−
≤
≤
∞
<
<
∞
− +
∑
∑
∑
∞
−∞
=
∞
−∞
=
∞
−∞
=
−
=
−
=
−
=
r c
r c j
d
k c j
MT
r MT j X MT
T
r T j X T e
X
T
k T j X T
e
X
)) 2 ( ( 1
)) '
2 ' ( ( '
1 )
(
)) 2 ( ( 1
)
(
π ω
π ω
π ω
ω
ω
∑
∑
∑ ∑
−
=
−
∞
−∞
=
−
−
=
∞
−∞
=
=
→
−
−
=
−
−
=
1 0
/ ) 2 (
/ ) 2 (
1 0
) (
1 ) (
)) 2 2 ( ( 1 ) (
Since
))]
2 2 ( ( 1 [ 1 )
(
M
i
M i j j
d
k c M
i j
M
c j
d
e X M e X
T
k MT
i MT j X T e
X
MT
i T
k MT j X T M e
X
π ω ω
π ω
ω
π π ω
π π ω
Similar to the Eq above!
Frequency domain - an example
copies at
generates M copies of
with frequency
scaled by M and
shifted
avoided if is
bandlimited
T n
nΩs = 2 π/
)
(e jω
X
N N j
M
e
X
ω π
π ω ω
ω
2 /
2
and
2
|
| , 0
)
(
≥
≤
≤
=
) (e jω X
This example
N
s = Ω
Trang 15Digital Signal Processing, IV, Zheng-Hua Tan, 2006
29
Frequency domain - an example
Downsampling factor is
too large, causing
aliasing, resulting in
the need for DT ideal
lowpass filter with
cutoff frequency pi/M
To avoid aliasing in
downsampling by a
factor of M requires
that
π
ωN M <
'
T N
N= Ω
ω
A general downsampling system
Trang 16Digital Signal Processing, IV, Zheng-Hua Tan, 2006
31
Increasing sampling rate – upsampling
,
2 , , 0 ), / ( ] / [ ]
L T T nT
x n
x
nT x n
x
c i
c
=
=
=
' ), ' ( ]
[
) ( ]
[
Expander
∑∞
−∞
=
−
=
⎩
⎨
⎧ = ± ±
=
k
e
e
kL n k
x
n
x
L L n L
n
x
n
x
] [ ] [
]
[
otherwise
,
0
, 0 ], /
[
]
[
δ
Fourier domain
Which is s frequency scaled version, w is replaced by
wL so
'
T
Ω
=
ω
) ( ]
[
) [ ] [ ( ) (
] [ ] [ ] [
L j k
Lk j
n j
j e
k e
e X e
k x
e kL n k x e
X
kL n k x n x
ω ω
ω
δ
=
=
−
=
−
=
∑
∑ ∑
∑
∞
−∞
=
−
−
∞
−∞
=
∞
−∞
=
∞
−∞
=
Trang 17Digital Signal Processing, IV, Zheng-Hua Tan, 2006
33
An example
DTFT of
System: interpolator
Process: interpolation
) ( ] [n x nT
) ( )
Summary
Periodic sampling
Frequency domain representation
Reconstruction
Changing the sampling rate using
discrete-time processing
Trang 18Digital Signal Processing, IV, Zheng-Hua Tan, 2006
35
Course at a glance
Discrete-time signals and systems
Fourier-domain
representation
DFT/FFT
System structures
Filter structures Filter design
Filter
z-transform
MM1
MM2
MM9,MM10
MM3
MM6
MM4
MM7 MM8
Sampling and reconstruction MM5
System analysis
System