Professional Documents
Culture Documents
DSP
4-1
4.0 Introduction
Q estion to answer: ans er how ho to approximate appro imate a contin o s Question continuous (analog) linear system by a digital system? Notations Notations:
Signals: time-domain frequency-domain Systems: time-domain frequency-domain continuous-time discrete-time
xc ( t )
X c ( j )
continuous-time
x[n ]
X ( e j )
discrete-time
hc (t ) H c ( j )
h[n ]
H (e j )
4-2
DSP
T is the sampling period f s = 1 / T is the sampling frequency (samples per second) = 2 / T is the sampling frequency (radians per second)
s
DSP
4-3
xc ( t )
xs ( t )
x[n] = xc (nT )
s(t ) =
n =
(t nT )
xs (t ) = xc (t ) s(t ) = xc (t ) (t nT )
n =
(modulation)
xs ( t ) =
DSP
n =
x (nT ) (t nT )
c
(sifting property)
4-4
DSP
4-5
xs (t ) = xc (t ) s (t ) = xc (t ) (t nT )
n =
n =
x (nT ) (t nT )
c
4-6
DSP
Frequency-Domain Representation
Given the Fourier transform of the impulse train as
2 s(t ) = (t nT ) S ( j) = T n =
2 ( k s ) (where s = ) T k =
Since
1 x s ( t ) = x c ( t ) s ( t ) X s ( j ) = X c ( j ) * S ( j ) 2
Then
1 2 X s ( j ) = X c ( j ) * 2 T
k =
( k )
s
1 = X c ( j ( k s )) T k =
DSP 4-7
1 X s ( j) = X c ( j ( k s )) T k =
periodically y repeated p and scaled copies p of the X s ( j) consists of p Fourier transform of The copies of X c ( j) are shifted by integer multiples of the sampling frequency s. All copies of replicated spectrums are superimposed to produce the Fourier transform of the sampled signal signal.
4-8
.) xc (t ), i.e., X c ( j
DSP
DSP
4-9
X ( j) = 0, > N
There is no overlap between replicated spectrums, when we have the sampling p g rate as following g
s > 2 N
That means we CAN reconstruct the continuous-time signal with an ideal low-pass filter.
That means we CANNOT reconstruct the continuous-time signal from its samples.
4-10
DSP
DSP
4-11
Reconstructed Signal g
4-12
xc (t ) = cos 0t
What is the Fourier transform of the given signal? Use the Euler E ler equation eq ation, we e kno know that
x (t ) = e j0t X ( j) = 2 ( 0 )
X c ( j) = ( ( 0 ) + ( + 0 ) )
DSP 4-13
Original Signal
Sampled Signal
Reconstructed Signal
Original Signal
Sampled Signal
1 j ( s 0 ) t xr ( t ) = e + e j ( s 0 ) t = cos( ( s 0 )t 2
DSP 4-15
Reconstructed Signal
X () = 0 for N
Then x(t) can be exactly y reconstructed from equidistant q 2 samples xd [n ] = xa ( nTs ) = xa ( 2n / s ), if s = 2 N , Ts where T = 2 / is the sampling period period, s is the
s s
sampling frequency (radians per second), N is referred to as the Nyquist frequency, and 2 N is called the Nyquist rate.
DSP 4-16
xs (t ) =
n =
x (nT ) (t nT )
c
(t nT ) e
jnT
X s ( j) =
DSP
n =
x (nT )e
c
jTn
4-17
x[n ] = xc ( nT T)
x[n ]
n =
is defined as
X ( e j ) =
By comparing with
jn x [ n ] e
X s ( j) =
DSP
n =
jTn x ( nT ) e c
4-18
X (e ) =
n =
x[n]e
jn
X s ( j) =
= T
n =
T )e x (nT
c
jTn
X s ( j) = X ( e j )
= X ( e jT ).
1 X (e ) = X c T k =
j
2k j T T
( = T )
1 X s ( j) = X c ( j ( k s ) ) T k =
DSP
X (e j ) is simply a frequency-scaled version of X s ( j) with the frequency scaling specified by = T . This scaling is a normalization of the frequency axis so that the frequency = s in X s ( j) is normalized to = 2 for X (e j ) .
4-19
X ( e j )
Problem Analysis
X c ( j) = ( 4000 ) + ( + 4000 )
1 X s ( j) = X c ( j ( k s )) T k =
DSP
1 2 X (e ) = X c ( j( k )) T k = T T
j
4-20
( = T )
( / T ) = T ( )
DSP
4-21
X ( e j )
Problem Analysis
X c ( j) = ( 16000 ) + ( + 16000 )
Sampling frequency s = 2 / T = 12000 . Fourier transforms of the sampled signal are exactly same as the previous i one, why? h ?
k=-2 k=0
k=1
k=-1
k=2
k=0
( = T )
( / T ) = T ( )
0 = 16000
DSP 4-23
xc (t ) = cos(4000t )
X c ( j) = ( 4000 ) + ( + 4000 )
Sampling frequency s = 2 / T = 3000 . The discrete-time Fourier transform is the same as previous one. Wh ? Why?
k=-2 k=0 0
k=1
k=-1
k=2
k=0
( = T )
( / T ) = T ( )
DSP
4-25
xs ( t ) =
n =
x[n] (t nT )
If the impulse train is the input to an ideal low-pass continuoustime filter with impulse response hr (t )
xr (t ) = xs (t ) * hr (t ) = x[n ] (t nT ) * hr (t ) = x[n ]hr (t nT ) n = n =
DSP
4-26
DSP
4-27
Frequency Response
Impulse Response
sin(t / T ) t hr (t ) = = sinc t / T T
DSP 4-28
xr ( t ) =
n =
x[n]h (t nT )
r
sin(t / T ) t = sinc hr (t ) = t / T T
sin[ (t nT ) / T ] xr (t ) = x[n ] (t nT ) / T n =
X c ( j) = 0 for / T
then
x r ( t ) = xc ( t )
DSP 4-29
sin[ (t nT ) / T ] xr (t ) = x[n ] (t nT ) / T n =
If there is no aliasing, the ideal low-pass filter interpolates correct reconstruction between the samples. However, the ideal low-pass p filter has infinite length g which is not realizable in practice. Finite length low-pass filtering will result in some reconstruction error.
DSP 4-30
Sampled signal
Reconstructed signal
DSP
4-31
DSP
4-32
X r ( j) =
n =
jTn x [ n ] H ( j ) e . r
Linearity of continuous-time Fourier transform Time shifting leads to an exponential factor in the Fourier transform Discrete-time Fourier Transform (DTFT) of x[n]
4-33
X r ( j) = H r ( j) X (e
DSP
jT
).
yd [n ]
d (e j )
g a (t )
a ()
ya ( t )
Comments:
j C Compensation ti with ith either ith d ( e ) or a () - not tb both th. The D/A block g a (t ) is not filtering - it is weighting.
No compensation is needed if
g a (t )
DSP
ya (t ) =
d
n =
x [n ]g
d
g a (t )
d
(t nTs )
1 0
It holdsy
Ts
yd [n ]
1
ZOH Z.O.H
ya ( t )
1
-3
DSP
-2 -1
-3
-2 -1
n
4-36
sin(Ts / 2) jTs / 2 Ga ( j) = e ( / 2)
The high frequencies in the reconstructed signal (sharp steps) are introduced from side-lobes as follows.
Ga ( )
Ideal Z.O.H
DSP
2 Ts
Ts
Ts
2 Ts
4-37
Compensation of ZOH
The phase response of ZOH corresponds to an advance time shit of T/2 which cannot be compensated and usually neglected. The magnitude g response can be compensated as follows.
<
a ()
1
Ts else
DSP
4-39
x[n ] x ' [n ]
DSP 4-40
xd [n ] = x[nM ] = xc ( nMT ).
DSP
4-42
1 X (e ) = X c T k =
j
2k j T T
xd [n ] = x[nM ] = xc ( nMT ) is
Xc r =
1 X d (e ) = MT
j
2r j MT MT
X ( e j ) X d ( e j )
DSP 4-43
1 X d (e ) = MT
j
Xc r =
2r j MT MT
( r = i + kM )
< k < , 0 i M 1
1 j X d (e ) = M
M 1
1 2 ( kM + i ) X c j MT i =0 T k = MT
M 1
1 j X d (e ) = M
DSP
1 2k 2i X c j T MT i =0 T k = MT
4-44
1 j X d (e ) = M
j j
M 1
1 Xc i =0 T k =
2i 2k j T MT
We know that
1 2 k k 1 2 = X c j X((e e )) = X (DTFT from CTFT) T kk= T T T = T
1 j ( 2 i ) / M ) = T X c X (e k =
2i 2k j T MT
j ( 2 r ) / M
Therefore, we have
1 j X d (e ) = M
DSP
M 1 r =0
X (e
)
4-45
1 j X d (e ) = M
There is a strong analogy between X d ( e j ) and X ( e j ). ) X d ( e j ) can be composed of M copies of the periodic Fourier transform X ( e j ) , frequency scaled by M and shifted by integer multiples lti l of f 2.
2 / T = 4 N s = 4 N
N = N T = / 2
-4
DSP
4-47
DSP
4-48
DSP
4-49
hlp [n ] =
sin c n sin( (n / M ) = n n
DSP
4-50
xe [n ] = (1 0 2 0 3 0 4 0 5 0) ( n = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and L = 2)
Or equivalently,
xe [ n ] =
DSP
k =
x[n ] = (1 2 3 4 5) ( n = 0, , 1, , 2, , 3, , 4) )
x[k ] [n kL]
DSP
4-52
k =
jkL jL x [ k ] e = X ( e )
We can see the Fourier transform of the output of the expander is a frequency-scaled frequency scaled version of the Fourier transform of the input, i.e, is replaced by L.
DSP
4-53
DSP
4-54
DSP
4-57
1 n / L, n L hlin = otherwise 0,
DSP
4-58
DSP
4-59
So that
xi [n ] =
k =
x[k ]h
lin
[n kL]
4-60
Sample at a faster rate - perhaps not possible (why?). Use an anti-aliasing g filter.
DSP
4-61
The idea is sample: p remove the high g frequencies q . The ideal frequency response of the anti-aliasing filter is an ideal low-pass filter as > / 2 ,
s
1; F = 0;
1 c c < s = Ts 2 > c
Even the LPF destroys information, it is better than the aliasing effect effect. Ideal sampler
xa (t )
DSP
Fa ()
Anti-aliasing filter (low-pass)
xd (n)
Ts
4-62
Anti-aliasing: Formulation
aliasing the sampled signal becomes With anti anti-aliasing,
xd [n ] = xa (nT Ts ) * f a ( nT Ts )
1 X d (e ) = Ts
j
2m 2m X Fa a T T m = s s
The repeated spectra X a () Fa () will not fold f or overlap. If Fa () is an ideal LPF with cutoff c , then
1 X d ( e j ) = Ts X a (); 2m where X a = Xa T m = s 0;
c > c
Anti-aliasing: Example-1
X a ()
Analog Signal Spectrum
X a () Fa ()
Anti-aliased Spectrum
c
c < s / 2
X d (e j )
2
DSP
cTs
cTs
2
4-64
Anti-aliasing: Example-2
Original image
DSP
4-65
yd [n ]
H d ( e j )
ya ( t )
H a ()
2m j X H ( e ) a d m = Ts
without anti-aliasing
1 Yd ( e ) = Ts
j
2m 2m j X F H ( e ) a a d m = Ts Ts
with anti-aliasing
DSP
4-66