sampling theorem
DESCRIPTION
Sampling Theorem. 主講者:虞台文. Content. Periodic Sampling Sampling of Band-Limited Signals Aliasing --- Nyquist rate CFT vs. DFT Reconstruction of Band-limited Signals Discrete-Time Processing of Continuous-Time Signals Continuous-Time Processing of Discrete-Time Signals - PowerPoint PPT PresentationTRANSCRIPT
Sampling Theorem
主講者:虞台文
Content Periodic Sampling Sampling of Band-Limited Signals Aliasing --- Nyquist rate CFT vs. DFT Reconstruction of Band-limited Signals Discrete-Time Processing of Continuous-Time Signals Continuous-Time Processing of Discrete-Time Signals Changing Sampling Rate Realistic Model for Digital Processing
Sampling Theorem
Periodic Sampling
Continuous to Discrete-Time Signal Converter
C/D
T
xc(t) x(n)= xc(nT)
Sampling rate
C/D SystemConversion from impulse train to
discrete-time sequence
xc(t)x(n)= xc(nT)
s(t)xs(t)
Sampling with Periodic Impulse train
t
xc(t)
0 T 2T 3T 4TT2T3T
n
x(n)
0 1 2 3 4123
t
xc(t)
0 2T 4T 8T 10T2T4T8T
n
x(n)
0 2 4 6 8246
Sampling with Periodic Impulse train
t
xc(t)
0 T 2T 3T 4TT2T3T
n
x(n)
0 1 2 3 4123
t
xc(t)
0 2T 4T 8T 10T2T4T8T
n
x(n)
0 2 4 6 8246
What condition has to be placed on the sampling rate?
We want to restore xc(t) from x(n).
C/D SystemConversion from impulse train to
discrete-time sequence
xc(t)x(n)= xc(nT)
s(t)xs(t)
n
n
nTtts )()(
)()()( tstxtx cs
n
nc nTttx )()(
n
nc nTtnTx )()(
C/D SystemConversion from impulse train to
discrete-time sequence
xc(t)x(n)= xc(nT)
s(t)xs(t)
n
n
nTtts )()(
)()()( tstxtx cs
n
nc nTttx )()(
n
nc nTtnTx )()(
)(*)(21)(
jSjXjX cs
2 2( ) ( ), s sk
S j kT T
C/D System)(*)(
21)(
jSjXjX cs
Tk
TjS s
ks
2 ,)(2)(
s:Sampling Frequency
kscs k
TjXjX )(2*)(
21)(
C/D System
kscs k
TjXjX )(2*)(
21)(
k
sc kjXT
)(*)(1
k
sc kjjXT
)(1
k
scs kjjXT
jX )(1)(
Sampling Theorem
Sampling of Band-Limited Signals
Band-Limited Signals
Yc(j)
Band-Limited
Band-Unlimited
Xc(j)
NN
1
Sampling of Band-Limited Signals
Band-Limited
TkjjX
TjX s
kscs
2 ),(1)(
Xc(j)
NN
1
ss 2s 3s2s3s
S(j)2/T
4s4s 2s 6s2s6s
S(j)2/T
Sampling withHigher Frequency
Sampling withLower Frequency
Sampling Theorem
Aliasing ---Nyquist Rate
Recoverability
Band-Limited
TkjjX
TjX s
kscs
2 ),(1)(
Xc(j)
NN
1
ss 2s 3s2s3s
S(j)2/T
4s4s 2s 6s2s6s
S(j)2/T
Sampling withHigher Frequency
Sampling withLower Frequency
s > 2N
s < 2N
Case 1: s > 2N T
kjjXT
jX sk
scs
2 ),(1)(
Xc(j)
NN
1
ss 2s 3s2s3s
S(j)2/T
1/T
ss 2s 3s2s3s
Xs(j)
Case 1: s > 2N T
kjjXT
jX sk
scs
2 ),(1)(
Xc(j)
NN
1
ss 2s 3s2s3s
S(j)2/T
1/T
ss 2s 3s2s3s
Xs(j)
Passing Xs(j) through a low-pass filter with cutoff frequency N < c< s N , the original signal can be recovered.
Xs(j) is a periodic function with period s.
Case 2: s < 2N T
kjjXT
jX sk
scs
2 ),(1)(
Xc(j)
NN
1
1/T
2s2s 4s 6s4s6s
S(j)2/T
2s2s 4s 6s4s6s
Xs(j)
Case 2: s < 2N T
kjjXT
jX sk
scs
2 ),(1)(
Xc(j)
NN
1
1/T
2s2s 4s 6s4s6s
S(j)2/T
2s2s 4s 6s4s6s
Xs(j)Aliasing
No way to recover the original signal.
Xs(j) is a periodic function with period s.
Nequist Rate
Xc(j)
NN
1Band-Limited
Nequist frequency (N) The highest frequency of a band-limited signal
Nequist rate = 2N
Nequist Sampling Theorem
Xc(j)
NN
1Band-Limited
s > 2N
s < 2N
Recoverable
Aliasing
Sampling Theorem
CFT vs. DFT
C/D SystemConversion from impulse train to
discrete-time sequence
xc(t)x(n)= xc(nT)
s(t)xs(t)
k
scs kjjXT
jX )(1)(
n
n
nTtts )()(
)()()( tstxtx cs
n
nc nTttx )()(
n
nc nTtnTx )()(
Continuous-Time Fourier Transform
Conversion from impulse train to
discrete-time sequence
xc(t)x(n)= xc(nT)
s(t)xs(t)
n
n
nTtts )()(
)()()( tstxtx cs
n
nc nTttx )()(
n
nc nTtnTx )()(
k
scs kjjXT
jX )(1)(
n
Tnjcs enTXjX )()(
CFT vs. DFT
Conversion from impulse train to
discrete-time sequence
xc(t)x(n)= xc(nT)
s(t)xs(t)
n
Tnjcs enTXjX )()(
n
njj enxeX )()(
k
scs kjjXT
jX )(1)(
x(n)
CFT vs. DFT
Conversion from impulse train to
discrete-time sequence
xc(t)x(n)= xc(nT)
s(t)xs(t)
n
Tnjcs enTXjX )()(
n
njj enxeX )()(
k
scs kjjXT
jX )(1)(
x(n)
Ts
j jXeX )()(T
js eXjX
)()(
CFT vs. DFT
Tsj jXeX )()(
k
scs kjjXT
jX )(1)(
kc
j
Tkj
TjX
TeX )2(1)(
CFT vs. DFT
kc
j
Tkj
TjX
TeX )2(1)(
Xs(j)
ss
Ts
21/T
X(ej)
2
1/T
2 44
Xc(j)1
CFT vs. DFT
Xs(j)
ss
Ts
21/T
X(ej)
2
1/T
2 44
Xc(j)1Amplitude scaling
&Repeating
Frequency scaling
s2
kc
j
Tkj
TjX
TeX )2(1)(
Sampling Theorem
Reconstruction of Band-limited Signals
Key Concepts
t
xc(t)
0 T 2T 3T 4TT2T3T
n
x(n)
0 1 2 3 4123
X(ej)
FT
IFT
Xc(j)
/T/T
SamplingC/D
RetrieveOne period
ICFT
CFT
TTjXT
eX cTj // 1)(
Interpolation
T
T
tjcc dejXtx
/
/21)(
T
T
tjTj deeTX/
/21
T
T
tj
n
Tnjc deenTxT /
/)(
2
T
T
tjTnj
nc deeTnTx
/
/2)(
T
T
Tntj
nc deTnTx
/
/
)(
2)(
TnTtTnTtnTx
nc /)(
]/)(sin[)(
Interpolation
TnTtTnTtnTxtx
ncc /)(
]/)(sin[)()(
x(n) n(t)
)()()( tnxtx nn
c
Ideal D/C Reconstruction System
x(n) xs(t) xr(t)Covert from sequence to
impulse train
T
Ideal Reconstruction
FilterHr(j)
T
x(n) xs(t) xr(t)Covert from sequence to
impulse train
T
Ideal Reconstruction
FilterHr(j)
T
Ideal D/C Reconstruction System
/T/T
Hr(j)
T
Obtained from sampling xc
(t) using an ideal C/D system.
)()()( nTtnxtxn
s
x(n) xs(t) xr(t)Covert from sequence to
impulse train
T
Ideal Reconstruction
FilterHr(j)
T
Ideal D/C Reconstruction System
)()( Tjs eXjX
))(/())(/sin()()(
nTtTnTtTnxtx
nr
)()()( Tjrr eXjHjX
Ideal D/C Reconstruction System
x(n) xr(t)D/C
T
))(/())(/sin()()(
nTtTnTtTnxtx
nr
xc(t) C/D
T
In what condition xr(t) = xc(t)?
Sampling Theorem
Discrete-Time Processing of Continuous-Time Signals
The Model
y(n) yr(t)D/C
T
Discrete-TimeSystem
T
xc(t) C/Dx(n)
Continuous-TimeSystemxc(t) yr(t)
The Model
y(n) yr(t)D/C
T
Discrete-TimeSystem
T
xc(t) C/Dx(n)
Continuous-TimeSystemxc(t) yr(t)Heff(j)
H (ej)
LTI Discrete-Time Systems
y(n) yr(t)D/C
T
Discrete-TimeSystem
T
xc(t) C/Dx(n)
H (ej)
)( jX c )( jeX )( jeY )( jYr
Hr (j)
kc
j
Tkj
TjX
TeX )2(1)(
)()()( Tjrr eYjHjY )()()( TjTj
r eXeHjH
kc
Tjr T
kjjXT
eHjH )2(1)()(
LTI Discrete-Time Systems
y(n) yr(t)D/C
T
Discrete-TimeSystem
T
xc(t) C/Dx(n)
H (ej)
)( jX c )( jeX )( jeY )( jYr
Hr (j)
kc
Tjrr T
kjjXT
eHjHjY )2(1)()()(
TTjXeH
jY cTj
r /||0/||)()(
)(
LTI Discrete-Time Systems
Continuous-TimeSystemxc(t) yr(t)Heff(j)
TTjXeH
jY cTj
r /||0/||)()(
)(
)( jX c )()()( jXjHjY reffr
TTeH
jHTj
eff /||0/||)(
)(
Example:Ideal Lowpass Filter
y(n) yr(t)D/C
T
Discrete-TimeSystem
T
xc(t) C/Dx(n)
)( jX c )( jYr
1
cc
H(ej)
TT
jHc
ceff /||0
/||1)(
TTeH
jHTj
eff /||0/||)(
)(
Example:Ideal Lowpass Filter
Continuous-TimeSystemxc(t) yr(t)1
cc
Heff(j)
2||0||1
)(T
TeH
c
cj
TTeH
jHTj
eff /||0/||)(
)(
Example: Ideal Bandlimited Differentiator
Continuous-TimeSystemxc(t) )()( tx
dtdty cc
TTj
jHeff /||0/||
)( jjH )(
Example: Ideal Bandlimited Differentiator
Continuous-TimeSystemxc(t) )()( tx
dtdty cc
TTj
jHeff /||0/||
)( jjH )(
|Heff(j)|
T
T
Example: Ideal Bandlimited Differentiator
|| ,/)( TjeH j
Continuous-TimeSystemxc(t) )()( tx
dtdty cc
|Heff(j)|
T
T
Impulse InvarianceContinuous-Time
LTI systemhc(t), Hc(j)
xc(t) yc(t)
y(n) yc(t)D/C
T
Discrete-TimeLTI System
h(n)H(ej)
T
xc(t) C/Dx(n)
What is the relation between hc(t) and h(n)?
|| ),/()( TjHeH cj
Impulse Invariance || ),/()( TjHeH c
j
)()( jeXnx )()( jXtx cc
)()( nTxnx c
k
cj
Tkj
TjX
TeX 21)(
|| , 1)(T
jXT
eX cj
Impulse Invariance || ),/()( TjHeH c
j
)()( jeHnh )()( jHth cc
)()( nThnh c
|| , 1)(T
jHT
eH cj
)()( nTThnh c
|| , )(T
jHeH cj
Impulse InvarianceContinuous-Time
LTI systemhc(t), Hc(j)
xc(t) yc(t)
y(n) yc(t)D/C
T
Discrete-TimeLTI System
h(n)H(ej)
T
xc(t) C/Dx(n)
What is the relation between hc(t) and h(n)?
)()( nTThnh c
Sampling Theorem
Continuous-Time Processing of Discrete-Time Signals
The Modelyc(t) y(n)
C/D
T
Continous-TimeSystem
T
x(n)D/C
xc(t)
Discrete-TimeSystemx(n) y(n)
The Modelyc(t) y(n)
C/D
T
Continous-TimeSystem
T
x(n)D/C
xc(t)
Discrete-TimeSystemx(n) y(n)H (ej)
Hc(j)
The Modelyc(t) y(n)
C/D
T
Continous-TimeSystem
T
x(n)D/C
xc(t) Hc(j)
)( jX c)( jeX )( jeY)( jYc
TnTtTnTtnxtx
nc /)(
]/)(sin[)()(
TnTtTnTtnyty
nc /)(
]/)(sin[)()(
TeTXjX Tjc /|| ),()(
TjXjHjY ccc /|| ),()()(
|| ),/(1)( TjYT
eY j
The Model
TeTXjX Tjc /|| ),()(
TjXjHjY ccc /|| ),()()(
|| ),/(1)( TjYT
eY cj
)/()/(1)( TjXTjHT
eY ccj
)()/(1 jc eTXTjH
T)()/( j
c eXTjH
The Model)/()/(1)( TjXTjH
TeY cc
j
)()/(1 jc eTXTjH
T)()/( j
c eXTjH
Discrete-TimeSystemx(n) y(n)H (ej)
)/()( TjHeH cj
The Model
Discrete-TimeSystemx(n) y(n)H (ej)
)/()( TjHeH cj
yc(t) y(n)C/D
T
Continous-TimeSystem
T
x(n)D/C
xc(t) Hc(j)
Sampling Theorem
Changing Sampling Rate UsingDiscrete-Time Processing
The Goal
Down/UpSampling
)()( nTxnx c )'()(' nTxnx c
Sampling Rate Reduction By an Integer Factor
DownSampling
)()( nTxnx c )'()(' nTxnx c
MTT ' )()()( nMTxnMxnx cd
Sampling Rate Reduction By an Integer Factor
k
cj
Tkj
TjX
TeX 21)(
MTT ' )()()( nMTxnMxnx cd
r
cj
d Trj
TjX
TeX
'2
''1)(
r
c MTrj
MTjX
MT21
Sampling Rate Reduction By an Integer Factor
k
cj
Tkj
TjX
TeX 21)(
r
cj
d MTrj
MTjX
MTeX 21)( Let r = kM + i
1
0
2211 M
i kc MT
ijT
kjMT
jXTM
1
0
2211)(M
i kc
jd T
kjMT
ijXTM
eX
Sampling Rate Reduction By an Integer Factor
1
0
2211)(M
i kc
jd T
kjMT
ijXTM
eX
1
0
/)2( )(1)(M
i
Mijjd eX
MeX
NN
Xc(j)
NN
Xs(j), X (ejT)
2/T2/T
1/T
N=NTN
X (ej)
22
1/T
Sampling Rate Reduction By an Integer Factor
Xd (ej)
22
1/MTM=2
Xd (ejT)1/T’
2/T’2/T’ 4/T’4/T’
1
0
/)2( )(1)(M
i
Mijjd eX
MeX
NN
Xc(j)
NN
Xs(j), X (ejT)
2/T2/T
1/T
N=NTN
X (ej)
22
1/T
N < : no aliasing
Antialiasing
NN
X (ej)
22
1/T
M=3
Xd (ej)1/MT
22
Aliasing
Antialiasing
NN
X (ej)
22
1/T
22
)(~ jd eX
/3
Hd (ej)
22
1
/3
22
)()()( jjd
jd eXeHeX
/3/3
However, xd(n) x(nT’)
M=3
Decimator
Lowpass filterGain = 1
Cutoff = /MM)(nx )(~ nx
)(~)(~ nMxnxd
Increasing Sampling Rate By an Integer Factor
UpSampling
)()( nTxnx c )'()(' nTxnx c
LTT /'
T4/' TT
Increasing Sampling Rate By an Integer Factor
UpSampling
)()( nTxnx c )'()(' nTxnx c
LTT /'
)( jeX )(' jeX
X (ej)
1/T
X’ (ej)
L/T
InterpolatorLowpass filter
Gain = LCutoff = /L
L)(nx )(nxe)(nxi
otherwiseLLLnx
nxe 0,2,,0)/(
)(
k
e kLnkxnx )()()(
Interpolator
k
e kLnkxnx )()()()()( Ljje eXeX
nj
n k
je ekLnkxeX
)()()(
k n
njekLnkx )()(
k
Lkjekx )(
Interpolator
k
e kLnkxnx )()()()()( Ljje eXeX
X (ej)
1/T
Xe(ej)
1/T
Xi(ej)
L/T
L=3
Hi(ej)
L
/3/3
Changing the Sampling Rate By a Noninteger Factor
Resampling
)()( nTxnx c )'()(' nTxnx c
LTMT '
Changing the Sampling Rate By a Noninteger Factor
)(nx
Lowpass filterGain = 1
Cutoff = /MM
Lowpass filterGain = L
Cutoff = /LL )(nxe )(nxi )(~ nxi )(~ nxd
Sampling Periods:
T LT / LTM /
MLowpass filter
Gain = LCutoff = min(/L, /M)
L)(nx )(nxe )(~ nxi )(~ nxd
Sampling Theorem
Realistic Model forDigital Processing
Ideal Discrete-Time Signal Processing Model
y(n) yc(t)D/C
T
Discrete-TimeLTI System
T
xc(t) C/Dx(n)
Real world signal usually is not
bandlimited
Ideal continuous-to-discrete converter is
not realizable
Ideal discrete-to-continuous
converter is not realizable
More Realistic Model
y(n) yc(t)D/C
T
Discrete-TimeLTI System
T
xc(t) C/Dx(n)
)(ˆ nx )(ˆ ny)(txc )(txa
)( jH aa
)(txo )(tyDA )(ˆ tyr
)(~ jH r
Anti-aliasing
filter
Sample and
Hold
A/D converter
Discrete-time system
D/A converter
Compensated reconstruction
filter
T TT
Analog-to-Digital Conversion
T
Sample and
Hold
A/D converter
T T
)(txa )(txo )(ˆ nxB
)(txo
)(txa
Sample and Hold
T )(txo
)(txa
otherwiseTt
th0
01)(0
tT
ho(t)
n
nTt )(t
Sample and Hold
T )(txo
)(txa
otherwiseTt
th0
01)(0
tT
ho(t)
n
nTtnx )()(
t
xo(t)
n
a nTtnTx )()(
Sample and Hold
otherwiseTt
th0
01)(0
tT
ho(t)
n
nTtnx )()(
t
xo(t)
n
a nTtnTx )()(
n
aoo nTtnTxthtx )()(*)()(
Sample and Hold
n
aoo nTtnTxthtx )()(*)()(
Zero-OrderHoldho(t)
n
nTtts )()(
)(txc )(txo)(txs
Goal: To hold constant sample value for A/D converter.
A/D Converter
C/D
T
Quantizer Coder)(ˆ nx)(txa )(nx )(ˆ nxB
)]([)(ˆ nxQnx
Typical Quantizer
2Xm (B+1)-bit Binary code
Bm
Bm XX
222
1
2
23
25
27
29
2-
23-
25-
27-
29-
2
3
2
3
4
2’s complementcode
Offset binarycode
011
010
001
000
111
110
101
100
111
110
101
100
011
010
001
000
)(ˆ xQx
x
Analysis of Quantization Errors
C/D
T
Quantizer Coder)(ˆ nx)(txa )(nx )(ˆ nxB
)(ˆ)(ˆ nxXnx Bm
QuantizerQ[ ]
)]([)(ˆ nxQnx )(nx
)()()(ˆ nenxnx )(nx
)(ne
Analysis of Quantization Errors
)()()(ˆ nenxnx )(nx
)(ne 2/)(2/ ne)2/()()2/( mm XnxX
The error sequence e(n) is a stationary random process. e(n) and x(n) are uncorrelated. The random variables of the error process are uncorrelated,
i.e., the error is a white-noise process. e(n) is uniform distributed.
SNR (Signal-to-Noise Ratio)
)()()(ˆ nenxnx )(nx
)(ne 2/)(2/ ne)2/()()2/( mm XnxX
12
22 e 12
)2/( 2BmX
12
2 2m
B X
2
2
10log10e
xSNR
2
22
10212log10
m
xB
XSNR
x
mXB 10log208.1002.6
SNR (Signal-to-Noise Ratio)
12
22 e 12
)2/( 2BmX
12
2 2m
B X
2
2
10log10e
xSNR
2
22
10212log10
m
xB
XSNR
x
mXB 10log208.1002.6
每增加一個 bit , SNR 增加約 6dB
SNR (Signal-to-Noise Ratio)
12
22 e 12
)2/( 2BmX
12
2 2m
B X
2
2
10log10e
xSNR
2
22
10212log10
m
xB
XSNR
x
mXB 10log208.1002.6
x大較有利,但不得過大 ( 為何? ) x過小不利 x每降低一倍 SNR 少 6dB X~N(0, x
2) P(|X|<4x )0.00064
Let x=Xm / 4 SNR 6B1.25 dB