Professional Documents
Culture Documents
主講者:虞台文
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
T
Sampling rate
C/D System
s(t)
Conversion from
xs(t) impulse train to x(n)= xc(nT)
xc(t)
discrete-time
sequence
Sampling with Periodic Impulse train
xc(t) xc(t)
3T 2T T 0 T 2T 3T 4T
t 8T 4T 2T 0 2T 4T 8T 10T
t
x(n) x(n)
3 2 1 0 1 2 3 4
n 6 4 2 0 2 4 6 8
n
We want to restore xc(t) from x(n).
Sampling with Periodic Impulse train
What condition has to be placed
on the sampling rate?
xc(t) xc(t)
3T 2T T 0 T 2T 3T 4T
t 8T 4T 2T 0 2T 4T 8T 10T
t
x(n) x(n)
3 2 1 0 1 2 3 4
n 6 4 2 0 2 4 6 8
n
C/D System
s(t)
Conversion from
xs(t) impulse train to x(n)= xc(nT)
xc(t)
discrete-time
sequence
xs (t ) xc (t )s(t )
n
xc (t ) (t nT )
n
s (t ) (t nT )
n
n
n
x (nT )(t nT )
n
c
C/D System
1
s(t)
X s ( j) X c ( jConversion
) * S ( j)from
2 x (t) x(n)= xc(nT)
s impulse train to
xc(t)
2 2
( k sequence
discrete-time
S ( j ) s ), s
T k T
xs (t ) xc (t )s(t )
n
xc (t ) (t nT )
n
s (t ) (t nT )
n
n
n
x (nT )(t nT )
n
c
C/D System
1 s :
X s ( j) X c ( j) * S ( j)
2 Sampling Frequency
2 2
S ( j )
T k
( k s ), s
T
1 2
X s ( j)
2
X c ( j) *
T k
( k s )
C/D System
1
X s ( j) X c ( j kj s )
T k
1
X c ( j kj s )
T k
1
X c ( j) * ( k s )
T k
1 2
X s ( j)
2
X c ( j) *
T k
( k s )
Sampling Theorem
Sampling of
Band-Limited Signals
Band-Limited Signals
Xc(j)
Band-Limited 1
N N
Band-Unlimited Yc(j)
1 2
X s ( j) X c ( j kj s ), s
T k T
Sampling of Band-Limited Signals
Xc(j)
Band-Limited 1
N N
Sampling with
Higher Frequency
2/T
S(j)
3s 2s s s 2s 3s
Sampling with
Lower Frequency 2/T S(j)
6s 4s 2s 2s 4s 6s
Sampling Theorem
Aliasing ---
Nyquist Rate
1 2
X s ( j) X c ( j kj s ), s
T k T
Recoverability
Xc(j)
Band-Limited 1
N N
Sampling with
Higher Frequency
s > 2N
2/T
S(j)
3s 2s s s 2s 3s
s < 2N
Sampling with
Lower Frequency 2/T S(j)
6s 4s 2s 2s 4s 6s
1 2
X s ( j) X c ( j kj s ), s
T k T
Case 1: s > 2N
Xc(j)
1
N N
2/T
S(j)
3s 2s s s 2s 3s
Xs(j)
1/T
3s 2s s s 2s 3s
1 2
X s ( j) X c ( j kj s ), s
T k T
Case 1: s > 2N
Passing Xs(j) through a
Xc(j)
1 Xs(j) is a periodic
low-pass filter with cutoff
frequency N < c< s N , function with
N N
the original signal can be period s.
recovered. 2/T
S(j)
3s 2s s s 2s 3s
Xs(j)
1/T
3s 2s s s 2s 3s
1 2
X s ( j) X c ( j kj s ), s
T k T
Case 2: s < 2N
Xc(j)
1
N N
2/T S(j)
6s 4s 2s 2s 4s 6s
1/T Xs(j)
6s 4s 2s 2s 4s 6s
1 2
X s ( j) X c ( j kj s ), s
T k T
Case 2: s < 2N
Xc(j)
1 Xs(j) is a periodic
No way to recover
function with
the original signal. N N
period s.
2/T S(j)
6s 4s 2s 2s 4s 6s
1/T Xs(j)
6s 4s 2s 2s 4s 6s
Nequist Rate
Xc(j)
Band-Limited 1
N N
N N
xs (t ) xc (t )s(t )
n
xc (t ) (t nT )
n
s (t ) (t nT )
n
n
n
x (nT )(t nT )
n
c
1
X s ( j) X c ( j kj s )
T k
Continuous-Time Fourier Transform
s(t)
Conversion from
xs(t) impulse train to x(n)= xc(nT)
xc(t)
discrete-time
sequence
xs (t ) xc (t )s(t )
X s ( j) n X ( nT ) e jTn n
xc (t ) (t nT )
c
s (t ) n
(t nT ) n
n n
x (nT )(t nT )
n
c
1
X s ( j) X c ( j kj s )
T k
CFT vs. DFT
s(t)
Conversion from
xs(t) impulse train to x(n)= xc(nT)
xc(t)
discrete-time
sequence
X s ( j ) c
X (
n
nT ) e jTn
X (e j ) x (
n
n ) e jn
x(n)
1
X s ( j) X c ( j kj s )
T k
CFT vs. DFT
s(t)
Conversion from
xs(t) impulse train to x(n)= xc(nT)
xc(t)
discrete-time
sequence
X s ( j ) c
X (
n
nT ) e jTn
X (e j ) x (
n
n ) e jn
x(n)
j j
X s ( j) X (e ) X (e ) X s ( j) T
T
CFT vs. DFT
1
X s ( j) X c ( j kj s )
T k
j
X (e ) X s ( j) T
1
2k
X (e ) X c ( j j
j
)
T k T T
1
2k
X (e ) X c ( j j
j
)
T k T T
CFT vs. DFT
1 Xc(j)
Xs(j) 2
1/T s
T
s s
1/T X(ej)
4 2 2 4
1
2k
X (e ) X c ( j j
j
)
T k T T
CFT vs. DFT
1 Xc(j)
Amplitude scaling
&
Repeating
Xs(j) 2
1/T s
T
Frequency scaling
s2
s s
1/T X(ej)
4 2 2 4
Sampling Theorem
Reconstruction of
Band-limited Signals
Key Concepts
xc(t) Xc(j)
CFT
ICFT
3T 2T T
t
0 T 2T 3T 4T
/T /T
Sampling Retrieve
C/D One period
x(n) FT X(ej)
IFT
n
3 2 1 0 1 2 3 4
Interpolation
X c j
1
X (e jT ) /T /T
T
T / T j(t Tn )
xc (nT ) e
/T
1
d
2 / T
jt
xc (t ) X j e d
c
n 2 / T
1 /T
2 / T
TX e jT
e jt
d
xc (nT )
sin[ (t nT ) / T ]
n (t nT ) / T
T /T
jTn jt
xc (nT )e e d
2 / T
n
T / T jTn jt
xc (nT ) e e d
n 2 / T
Interpolation
sin[ (t nT ) / T ]
xc (t ) xc (nT )
n (t nT ) / T
x(n) n(t)
xc (t ) x(n)
n
n (t )
Ideal D/C Reconstruction System
Ideal
x(n) Covert from xs(t) Reconstruction xr(t)
sequence to Filter
impulse train Hr(j)
T T
Obtained from sampling xc(t)
using an ideal C/D system.
Ideal D/C Reconstruction System
Ideal
x(n) Covert from xs(t) Reconstruction xr(t)
sequence to Filter
impulse train Hr(j)
T T
Hr(j)
T
xs (t ) x(n)(t nT )
n
/T /T
sin( / T )(t nT )
xr (t ) x(n)
n ( / T )(t nT )
Ideal D/C Reconstruction System
Ideal
x(n) Covert from xs(t) Reconstruction xr(t)
sequence to Filter
impulse train Hr(j)
T T
jT
X s ( j) X (e jT
) X r ( j) H r ( j) X (e )
sin( / T )(t nT )
xr (t ) x(n)
n ( / T )(t nT )
Ideal D/C Reconstruction System
T T
Discrete-Time Processing of
Continuous-Time Signals
The Model
xc(t) x(n) Discrete-Time
y(n) yr(t)
C/D System D/C
T T
Continuous-Time
xc(t) System yr(t)
The Model
xc(t) x(n) Discrete-Time
y(n) yr(t)
C/D H (e ) j D/C
System
T T
Continuous-Time
xc(t) H (j)
System
eff yr(t)
LTI Discrete-Time Systems
X c ( j ) X (e j ) Y ( e j ) Yr ( j)
xc(t) x(n) Discrete-Time
y(n) yr(t)
C/D j
H (e ) HrD/C
(j)
System
T T
1 2k
X (e ) X c ( j j
j
)
T k T T
Yr ( j) H r ( j)Y (e jT ) H r ( j) H (e jT ) X (e jT )
1
2k
H r ( j ) H ( e ) X c ( j j
jT
)
T k T
LTI Discrete-Time Systems
X c ( j ) X (e j ) Y ( e j ) Yr ( j)
xc(t) x(n) Discrete-Time
y(n) yr(t)
C/D j
H (e ) HrD/C
(j)
System
T T
H (e jT ) X c ( j) | | / T
Yr ( j)
0 | | / T
1
2k
Yr ( j) H r ( j) H (e ) X c ( j j
jT
)
T k T
H (e jT ) | | / T
H eff ( j)
0 | | / T
LTI Discrete-Time Systems
Continuous-Time
xc(t) H (j)
System
eff yr(t)
X c ( j ) Yr ( j) H eff ( j) X r ( j)
H (e jT ) X c ( j) | | / T
Yr ( j)
0 | | / T
H (e jT ) | | / T
H eff ( j)
0 | | / T
Example:Ideal Lowpass Filter
X c ( j ) Yr ( j)
H(ej)
xc(t) x(n) Discrete-Time
1
y(n) yr(t)
C/D System D/C
c c
T T
1 | | c / T
H eff ( j)
0 | | c / T
H (e jT ) | | / T
H eff ( j)
0 | | / T
Example:Ideal Lowpass Filter
Heff(j)
Continuous-Time
xc(t) 1
System yr(t)
c c
j 1 | | cT
H (e )
0 cT | | 2
Example:
Ideal Bandlimited Differentiator
d
xc(t) Continuous-Time
System
yc (t ) x c (t )
dt
j | | / T
H ( j ) j H eff ( j)
0 | | / T
Example:
Ideal Bandlimited Differentiator
|Heff(j)|
d
xc(t)
Continuous-Time
System
yc (t ) x c (t )
dt
T T
j | | / T
H ( j ) j H eff ( j)
0 | | / T
Example:
Ideal Bandlimited Differentiator
|Heff(j)|
d
xc(t)
Continuous-Time
System
yc (t ) x c (t )
dt
T T
j
H (e ) j / T , | |
j
H (e ) H c ( j / T ), | |
Impulse Invariance
Continuous-Time
xc(t) LTI system yc(t)
hc(t), Hc(j)
Discrete-Time
xc(t) x(n) LTI System y(n) yc(t)
C/D h(n) D/C
H(ej)
T T
Impulse Invariance
x(n) X (e ) j
xc (t ) X c ( j)
x(n) xc (nT )
1
2k
X (e ) X c j j
j
T k T T
j 1
X (e ) X c j , | |
T T
j
H (e ) H c ( j / T ), | |
Impulse Invariance
j
h ( n) H (e ) hc (t ) H c ( j)
h(n) hc (nT )
j 1
H (e ) H c j , | |
T T
h(n) Thc (nT )
j
H (e ) H c j , | |
T
h(n) Thc (nT )
Impulse Invariance
Continuous-Time
xc(t) LTI system yc(t)
hc(t), Hc(j)
Discrete-Time
xc(t) x(n) LTI System y(n) yc(t)
C/D h(n) D/C
H(ej)
T T
Continuous-Time Processing of
Discrete-Time Signals
The Model
x(n) xc(t) Continous-Time yc(t) y(n)
D/C System
C/D
T T
Discrete-Time
x(n) System y(n)
The Model
x(n) xc(t) Continous-Time yc(t) y(n)
D/C Hc(j)
System
C/D
T T
Discrete-Time
x(n) H (e )
System
j y(n)
sin[ (t nT ) / T ]
sin[ (t nT ) / T ]
xc (t ) x(n) yc (t ) y ( n)
n (t nT ) / T n (t nT ) / T
The Model
X (e )j
X c ( j ) Yc ( j) Y (e )j
T T
X c ( j) TX (e jT ), | | / T
Yc ( j) H c ( j) X c ( j), | | / T
j 1
Y (e ) Y ( j / T ), | |
T
The Model
j 1
Y ( e ) H c ( j / T ) X c ( j / T )
T
1 j j
H c ( j / T ) TX (e ) H c ( j / T ) X (e )
T
X c ( j) TX (e jT ), | | / T
Yc ( j) H c ( j) X c ( j), | | / T
j 1
Y (e ) Yc ( j / T ), | |
T
j
H (e ) H c ( j / T )
The Model
j 1
Y ( e ) H c ( j / T ) X c ( j / T )
T
1 j j
H c ( j / T ) TX (e ) H c ( j / T ) X (e )
T
Discrete-Time
x(n) H (e )
System
j y(n)
j
H (e ) H c ( j / T )
The Model
x(n) xc(t) Continous-Time yc(t) y(n)
D/C Hc(j)
System
C/D
T T
Discrete-Time
x(n) H (e )
System
j y(n)
Sampling Theorem
1 2k
X (e ) X c j j
j
T k T T
1
2r 1
2r
X d (e ) X c j j
j
Xc j j
T ' r T ' T ' MT r MT MT
1 2k
X (e ) X c j j
j
T k T T
1
2r
j
X d (e )
MT
r
Xc j
MT
j
MT
Let r = kM + i
1 M 1
1 2k 2i
M
T X c j MT j T j MT
i 0 k
1 M 1
1 2i 2k
j
X d (e )
M
T X c j MT j T
i 0 k
M 1
1
j
X d (e )
M
X
i 0
( e j ( 2 i ) / M
)
1 M 1
1 2i 2k
j
X d (e )
M
T X c j MT j T
i 0 k
M 1
1
N < : no aliasing X d (e )
M
j
X
i 0
( e j ( 2 i ) / M
)
Xd (ej) M=3
1/MT
2 2
However, xd(n) x(nT’)
Antialiasing
1/T X (ej)
2 N N 2
Hd (ej)
1 M=3
2 /3 /3 2
X d (e j ) H d (e j ) X (e j )
2 /3 /3 2
~
X d (e j )
2 2
Decimator
Lowpass filter ~
xd (n) ~
M
x (nM )
Gain = 1
x(n) ~
Cutoff = /M x (n)
Increasing Sampling Rate By an Integer Factor
T
T' T / 4
Increasing Sampling Rate By an Integer Factor
j j
X (e ) X ' (e )
x(n) xc (nT ) x' (n) xc (nT ' )
Up
Sampling T ' T / L
X (ej)
1/T
X’(ej)
L/T
xe (n) x(k )(n kL)
k
Interpolator
Lowpass filter
x(n) L xe (n)
Gain = L
Cutoff = /L xi (n)
Interpolator
jn
X e (e ) x(k )(n kL) e
j
n k
jn
x(k ) (n kL)e
k n
x (
k
k ) e jLk
X e (e j ) X (e jL ) xe (n) x(k )(n kL)
k
Interpolator
X (ej)
1/T
Xe(ej) L=3
1/T
j
L Hi(e )
/3 /3
Xi(ej)
L/T
Changing the Sampling Rate By a Noninteger Factor
Resampling TM
T '
L
Changing the Sampling Rate By a Noninteger Factor
Sampling Periods:
T T/L TM / L
Lowpass filter Lowpass filter
x(n)
L xe (n)
Gain = L
Cutoff = /L
Gain = 1
xi (n) Cutoff = /M ~
xi (n) M ~
xd (n)
T T
T T
T T
xa (t )
T xo (t )
Sample and Hold
1 0 t T
h0 (t )
0 otherwise
ho(t)
(t nT )
n
t
t
T
xa (t )
T xo (t )
Sample and Hold
1 0 t T
h0 (t )
0 otherwise xo(t)
x(n)(t nT )
n
ho(t)
t
xa (nT )(t nT )
t
T
n
xa (t )
T xo (t )
Sample and Hold
1 0 t T
h0 (t )
0 otherwise xo(t)
x(n)(t nT )
n
ho(t)
t
xa (nT )(t nT )
t
T
n
xo (t ) ho (t ) * xa (nT )(t nT )
n
Goal: To hold constant sample value for A/D converter.
Zero-Order
Hold
xc (t ) xs (t ) ho(t) xo (t )
xo (t ) ho (t ) * xa (nT )(t nT )
n
xˆ (n) Q[ x(n)]
A/D Converter
T
2X m X m
B 1 B
2 2
Typical Quantizer
xˆ Q ( x) 2’s complement Offset binary
code code
3 011 111
2 010 110
001 101
- 2
x
000 100
9 7 5 3
- 2 - 2 - 2 - 2 2
3
2
5
2
7
2
9
2
111 011
2 110 010
4 100 000
2Xm (B+1)-bit Binary code
xˆ (n) X m xˆ B (n)
Analysis of Quantization Errors
e(n)
Analysis of Quantization Errors
12 22 B 2x Xm
SNR 10 log 10 6.02B 10.8 20 log 10
x
2
Xm
12 22 B 2x Xm
SNR 10 log 10 6.02B 10.8 20 log 10
x
2
Xm
每增加一個bit,SNR增加約6dB
Let x=Xm / 4 SNR 6B1.25 dB
SNR (Signal-to-Noise Ratio)
2x 2 ( X m / 2 B ) 2 2 2 B X m
SNR 10 log 10 2
2
e
e
12 12 12
12 22 B 2x Xm
SNR 10 log 10 6.02B 10.8 20 log 10
x
2
Xm
x大較有利,但不得過大(為何?)
x過小不利 x每降低一倍SNR少6dB
X~N(0, x2) P(|X|<4x )0.00064