Sampling of Continous-Time Signals
Sampling of Continous-Time Signals
Sampling of Continous-Time Signals
continous-time signals
1.ideal sample
x[n] xc (t ) |t nT xc (nT ) Tsample period
fs=1/T:sample rate
s=2/T:sample rate
Figure 4.1 ideal continous-time-to-discrete-time(C/D)converter
time normalization
tt/T=n
(t nT )
n
frequency spectrum
change of ideal sample
X ( j( k ))
1
X s ( j)
s N N T
c s
k
No aliasing
s N N
aliasing
X (e j ) X s ( j) | / T
s / 2
2
X ( j( k 2 ) / T )
1
aliasing frequency T T
c
k
Period =2in time domain
w=2.1and w=0.1are the same
cos(2.1n) cos(0.1n)
trigonometric function property
high frequency is changed into low frequency in time domain
w=1.1 and w=0.9are the same
cos(1.1n) cos(0.9n)
trigonometric function property
2.ideal reconstruction
Figure 4.4
s / 2
EXAMPLE Figure 4.5 Take sinusoidal signal for example to
understand aliasing from frequency domain
s 0
EXAMPLE
Reconstruct frequency:
f ' 8 5 3Hz
Figure 4.10(a) mathematic model for ideal D/C
X r ( j) X s ( j) H r ( j) X c ( j)
T | | c
H r ( j)
0 | | c
X r ( j ) X s ( j ) H r ( j )
1 1 C
jt
hr (t ) IFT {H r ( j)} H r ( j ) e d Te jt d
2 2 C
sin( c t ) sin( t / T )
t / T t / T
sin( t / T )
xr (t ) xs (t ) hr (t ) [ x[n] (t nT )]
n t / T
sin( t / T )
sin[ (t nT ) / T ]
x[n][ (t nT ) ] x[n] ideal reconstruction in
n t / T n (t nT ) / T time domain
sin( x)
sin c( x)
x
sin c( x)
EXAMPLE
Figure 4.9
understand aliasing from time-
domain interpolation
EXAMPLE
3.Nyquist sampling theorems
s N N
s N N
Nyquist sampling theorems:
c s / 2
The highest frequency of analog signal ,which wav file with sampling rate
16kHz can show is
8kHz
frequency range B
A20~44.1kHz B20~20kHz
C20~4kHz D20~8kHz
EXAMPLE Matlab codes to realize
interpolation
f s 2( f H f L )(1 M / N )
fH
N int
fH fL
fH
M N
fH fL
f H 5B
4 B f H 5B
4fs
Nf s 2 f H
fH / B (M N )
f s 2 f H / N 2B 2B 2 B(1 M / N )
N N
4.1 summary
x[n] xc (t ) |t nT xc (nT )
2.changes in frequency domain caused by sampling
X ( j( k ))
1
X s ( j) c s
T
k
X ( j( k 2 ) / T )
1
X ( e j ) c
T
k
3. understand reconstruction in frequency domain
4. understand reconstruction in time domain
5. sampling theorem
s N N
s N N
Requirements and difficulties
frequency spectrum chart of sampling and reconstruction
comprehension and application of sampling theorem
4.2 discrete-time processing of
continuous-time signals
Figure 4.11
H (e jT ) | | / T
H eff ( j)
0 | | / T
conditionsLTIno aliasing or aliasing occurred outside the pass band of filters
EXAMPLE
Figure 4.12
EXAMPLE
Figure 4.13
4.3 continuous-time processing of discrete-time signal
Figure 4.16
H (e j ) Hc ( j / T ) for | |
Figure 4.12
EXAMPLE Ideal delay systemnoninteger delay
H (e j ) e j
4.4 digital processing of analog signals
Figure 4.41
Sampling and holding
Figure 4.46(b)
uniform
quantization and
coding
quantization
error of 3BIT
quantization
error of 8BIT
nonuniform quantization
0
vector quantization
x index0
4
4
3 3 3
3 3
2
2 1 1
codeword 1 codeword d(x,c0)=5
c0
c1 d(x,c1)=11
x 4 4 d(x,c2)=8
3 3
2 2
1
d(x,c3)=8
codeword 1 codeword
c2 c3
vector quantization
Example: image coding
Initial image block4 gray-levelsdimentions k=44=16
x 0 1 2 3
d(x,y0)=25
Code book C y0, y1 , y2, y3
d(x,y1)=5
d(x,y2)=25
d(x,y3)=46
y0 y1 y2 y3
codeword y1 is the most adjacent to xso it is coded by
the index 01.
reconstruction
h(t ) RN (t )
Figure 4.5
record the digital sound
Influence caused by sampling rate
and quantizing bits
Different tones require
different sampling rates.
4.1~4.4 summary
xd [n] x[nM ]
a sampling rate compressor :
Figure 4.20
time-domain of downsampling decrease the datareduce the sampling rate
M=2fs=fs/M,T=MT
X d e M
M 1
1
j ( 2i ) / M
X
i 0
e j ( 2i ) / M
EXAMPLE M=2
j 1
X d (e ) X e j / 2 X e j ( 2 ) / 2)
2
X (e j )
2 0 2
X d ( e j )
1/ 2
2 0 2
Figure 4.21(c)(d)
EXAMPLE M=3
j 1
X d (e ) X e j / 3 X e j ( 2 ) / 3) X e j ( 4 ) / 3)
3
X (e j )
2 0 j 2
X d (e )
2 0 2
EXAMPLE M=3aliasing
Figure 4.22(b)(c)
Figure 4.23
4.5.2 increasing the sampling rate by an integer factor
(upsampling, interpolation)
x[n / L] n 0, L,2 L
xe [n]
0 other
or , xe [n] x[k ] [n kL]
k
a sampling rate exp ander :
x e [n]
x[n] L
time-domain of upsampling increase the dataraise the sampling rate
L=2fs=Lfs,T=T/L
X e (e j ) X (e jL )
EXAMPLE
Figure 4.25
L=2
frequency domain of
reverse mirror-image filter
Figure 4.24
(n kL)
sin
x[k ]hi [n kL] x[k ]
L
k k
(n kL)
L
EXAMPLE
time-domain process of
mirror-image filter
Use linear interpolation actually
Figure 4.27
4.5.3 changing the sampling rate by a noninteger factor
L
fs ' fs
M
Figure 4.28
EXAMPLE change 400 Hz' s signal to 300 Hz
L 3, M 4
X (e j )
2 0 2
X e (e j ), X i (e j )
2 0 / 4 2
Y ( e j )
2 0 2
Figure 4.43
FIGURE 4.44
2.reconstruction systemreplace high-powered analog reconstructing filter with
interpolation, high-powered digital reverse mirror-image filter and low-powered
analog analog reconstructing filter.
xe[n] xi[n]
x[n] L x(t)
h1(t)
3. filter bank
analysis and synthesis of
sub band
y 0 [ n]
x[n] h0 [n] M M h0 [n] x[n]
y1 [ n]
h1 [ n ] M M h1 [ n ]
..........
..........
..........
..........
.
y N [n]
hN [n] M M hN [n]
In MP3, M=32sub-band analysis filter bank is 32 equi-band filters with center
frequency uniformly distributed from 0 to
MP3 coders use different quantization to realize compression for signals yi[n] in
different sub-bands.
examplecompression for M=2
X (e j )
0 2
Y0 (e j ) Y1 (e j )
' '
0 2
0 2
Y0 (e j ) Y1 (e j )
0 2
0 2
Y0 (e j ) Y1 (e j )
'' ''
0 2 0 2
Y1 (e j )
'
Y0 (e j )
'
0 2 0 2
16bit f s
bit rate before compressio n
16bit fs / 2 8bit fs / 2 12bit fs
bit rate after compressio n
4.pitch scaledecimation or interpolation sampling rate of reconstruction is
not changed.
decimation an d interpolation to
realize pitch scale
4.5 summary
requirement
frequency spectrum chart of interpolation and decimation
exercises
4.15 (b)(c)
4.24(a)(b)
4.26 only for h= /4