1
x
c(t)
p(t)
t
t
x
s(t)
t
-5T
0-4T
0-3T
0-2T
0-T0 0 T
02T
03T
04T
05T
0x
c(t)
p(t)
x
s(t)
SAMPLING AND RECONSTRUCTION OF SIGNALS
The sampling theorem states that to reconstruct any analog signal from its samples, the sampling frequency ω
0must be at least twice the signal’s maximum frequency ω
m:
ω
0≥ 2ω
mSampling is a presentation of the continuous-time signal x
c(t) by a series of samples x[nT
0].
Consider a signal x
s(t) defined as the product of two signals: x
c(t)-is an original signal and p(t) -is a periodic
impulse train or Dirac distribution.
The spectrum of the Dirac distribution p(t) is itself a periodic train.
The spectrum X s( ω ) of the output signal x s(t)
The spectrum of the signals are shown in Figure 5.2; where Xc ω) is arbitrary. The distance between two adjacent replicated spectra is called a guard band
B g = ω0- 2 ωm.
∑
+∞ ∞ − ω − ω δ π = ω ( k ) T 2 ) ( P 0 0∑
+∞ −∞ = ω − ω = ω ω π = ω k 0 c 0 c s T X ( k ) 1 )] ( P * ) ( X [ 2 1 ) ( X (∑
+∞∑
−∞ = +∞ −∞ =−
δ
=
−
δ
=
=
k k 0 0 c 0 c c s(
t
)
x
(
t
)
p
(
t
)
x
(
t
)
(
t
kT
)
x
(
kT
)
(
t
kT
)
x
x
s(t)= x
c(t)p(t)
∑
+∞ −∞ =−
δ
=
k 0)
kT
t
(
)
t
(
p
3
Xc( ) P( ω ) ω ω - 2 ω0 - ω0 0 ω0 2 ω0 Figure 5.2 Xs( ω ) ω -2 ω-ω0 m -2 ω0 -2 ω+0 ωm -ω0 -ωm -ω0 -ω0 + ωm -ωm 0 ωm ω-ω0 m ω0 ω+0 ωm 2 ω-ω0 m 2 ω0 2 ω+0 ωm B g = ω0- 2 ωm ωc c Xs( ω ) ω - 2 ω0 ω0 0 ω0 2 ω0 Aliasing - ωm ωm 1 2 π /T0 1/T 0 1/T 0 ω Xc( ω ) 1 T0 ω m H(j ϖ ) - ωc a) b) c) d) e) f) ωExample 5.1 A band limited signal has a bandwidth equal to 200 Hz. What sampling rate should be used to guarantee a guard band
of 100 Hz.
Solution: Fm=200 Hz; Bg=100 Hz. Bg= F0-2Fm; 100=F0-2x100; F0=300 Hz.
The following three cases present practical interest:
Under sampling:
ω0 < 2ωm
Nyquist rate:
ω0 = 2ωm
Over sampling:
ω0 > 2ωm
From Figure 5.2 it is evident that when ω0-ωm>ωm or ω0>2ωm the spectrum of Xs(ω) don’t overlap (see Figure 5.2 (c)). and
consequently it can be recovered from its samples with ideal low-pass filter having a frequency response H(jω) (see Figure 5.2 (e)).
If ω0>2ωm , output of the filter corresponds to Xc(ω) (see Figure 5.2 (f)). If ω0>2ωm does not hold , i.e ω0<2ωm the spectrum
Xs(ω) overlap(see Figure 5.2 (d)) and xc(t) is not recoverable by low pass filtering because of side-band distortion. This high
frequency distortion is called an aliasing.
5
Reconstruction of a Bandlimited Signal From Its Samples
According to the sampling theorem, samples of a continuous-time band limited signal taken frequently enough are sufficient to represent the signal exactly in the sense that the signal can be recovered from the samples. Impulse train modulation provides a convenient means for understanding the process of reconstructing the continuous-time bandlimited signal from its samples.
If the conditions of the sampling theorem are met and if the modulated impulse train is filtered by an appropriate low-pass filter, then the Fourier transform of the filter output will be
identical to the Fourier transform of the original continuous-time signal xc(t), and thus the
output of the filter will be x*c (t). If x c(nT0) is the input to an ideal low-pass continuous time
filter with frequency response Hr(jω) and impulse response hr(t), them the output of the filter
will be
[ ] [
r 0]
n 0 c c (t) x nT h t nT x∗ =∑
∞ − −∞ = (5.1)A block diagram representation of this signal reconstruction process is shown in Figure 5.3.
x
c[nT
0]
x*
c(t)
x
c(t)
Sampling
period T
0Ideal
reconstruction
filter
H
r(jω)
Convert from
sequence to
impulse train
Figure 5.3
[ ]
0 0 t j t j 0 t j 0 t j 0 rT
/
t
T
/
t
sin
j
2
e
e
t
T
e
jt
1
2
T
d
e
2
T
)
t
(
h
c c c c c cπ
π
=
+
π
=
=
π
=
ω
π
=
ω ω ω ω − ω ω ω − ω∫
T0 if |ω| < ωc
0 if |ω| > ωc
H(ω) =
7
» sxms t k»x1=sin(2*(t -(4*k*pi/2)))/(2*(t -(4*k*pi/2))); z1=sxmsum(x1,k, -2,2); » x2=sin(2*(t -(4*k+1)*pi/2))/(2*(t -(4*k+1)*pi/2)); z2=sxmsum(x2,k, -2,2); » x3=sin(2*(t -(4*k+2)*pi/2))/(2*(t -(4*k+2)*pi/2)); z3=sxmsum(x3,k, -2,2); » x3=sin(2*(t -(4*k+3)*pi/2))/(2 *(t-(4*k+3)*pi/2)); z4=sxmsum(x3,k, -2,2); » x3=sin(2*(t -(4*k+4)*pi/2))/(2*(t -(4*k+4)*pi/2)); z5=sxmsum(x3,k, -2,2); » x*c=2.2975*z1 -0.5975*z2+0.2975*z3 -0.5975*z4; ezplot(x*c,[0 2*pi]) » t=0:2*pi/40:2*pi; » s=0.35+sin(t+pi/2)+ 1.34*sin(2*t+pi/4); » plot(t,s) »hold on » t=0:2*pi/4:2*pi; » s=0.35+sin(t+pi/2)+ 1.34*sin(2*t+pi/4); » stem(t,s,'fill','k') 0.2975 -0.5975 -0.5975 0 1 2 3 4 5 6 7 -0.5 -1.0 -1.5 0.0 0.5 1.0 1.5 2.0 2.5 2.2975 2.2975 0.2975 -0.5975 -0.5975 0 1 2 3 4 5 6 7 -0.5 -1.0 -1.5 0.0 0.5 1.0 1.5 2.0 2.5 2.2975 2.2975 x*c(t) xc(t)
A major application of discrete-time systems is the processing of continuous-time signals.
This is accomplished by a system of the general form depicted in Figure 5.8
ADC- Analog-to-digital converter; DAC- Digital –to-analog converter
x
c(t)
X[n]
Y
[n]
y(t)
T
0T
0ADC
Discrete-time
system
DAC
Sampling Interval and Lagrange Approximation
Interpolation means to estimate a missing function value by taking weighted average values at
neighboring points.
The general form of Lagrange approximation passing true N+1 points
(
t
0,
x
0),..(
t
n,
x
n)
is
defined as
9
The Lagrange polynomial passing true the 2 points (t
1,x
1) and (t
2,x
2) is linear interpolation
∑
==
=
1 0 K K , 1 K 1(
x
)
x
L
(
t
)
P
=
x
0L
1,0(
t
)
+
x
1L
1,1(
t
)
(5.5)
1 0 1 0 , 1t
t
t
t
)
t
(
L
−
−
=
;
0 1 0 1 , 1t
t
t
t
)
t
(
L
−
−
=
The Lagrange parabolic interpolating polynomial passing trough 3 points
(
t
0,
x
0),
(
t
1,
x
1)
and
)
,
(
t
2x
2is
∑
==
2 0 K K 2,K 2(
t
)
x
L
(
t
)
P
) t t )( t t ( ) t t )( t t ( ) t ( L 2 0 1 0 2 1 0 , 2 − − − − = ) )( ( ) )( ( ) ( 2 1 0 1 2 0 1 , 2 t t t t t t t t t L − − − − = ) )( ( ) )( ( ) ( 1 2 0 2 1 0 2 , 2 t t t t t t t t t L − − − − = For equally spaced nodes with tt
0=0, t1=1 and t2=22 ) 2 )( 1 ( ) ( 0 , 2 − − = t t t L ; L2,1(t) = −t(t−2); 2 ) 1 t ( t ) t ( L2,2 = − 2 ) 1 t ( t y ) -2 t ( t y 2 ) 2 t -)( 1 t-( y ) t ( P2 = 0 − 1 + 2 −
Error of approximation ) t ( P ) t ( x ) t ( = c − N,K ε
Sampling intervals T 0for N=0; 1; 2 are defined as following.
N=0 – staircase approximation see (Figure 5.13)
1 0
M
T = ε ; (5.7)
N=1 – Linear interpolation (see Figure 5.14)
2 1 M 8 T = ε ; M =2 x ''(t) (5.8) N=2 – Parabolic interpolation 3 3 2 M 6 , 15 T = ;M3 = x' ''(t) (5.9) t x(t) 0 T 2T 3T 4T t x(t) 0 T 2T 3T 4T x(t) Figure 5.14 Figure 5.13
11
Example 5.4. Using the Matlab files perform staircase and linear approximation of y=sin(t)for t = 0: 2π.
In Figure 5.16 are shown staircase (a) and linear (b) interpolations of the sinusoidal signal using the Matlab files.
» t=0:pi/100:2*pi; y=sin(t); plot(t,y,'k'); hold on » t=0:pi/4:2*pi; y=sin(t); stem(t,y,'k','fill'); hold on
» stairs(t,y) set(gca,'xtick',[0.pi/4 pi/2 3pi/4 pi 5pi/4 6pi/4 7pi/4 2pi]) »t=0:2*pi/100:2*pi; y=sin(t);ti=0:pi/4:2*pi; yi=interp1(t,y,ti);plot(t,y,ti,yi)
a) b) 1 0 0.78 1.57 2.35 3.14 3.92 4.71 5.49 6.28 -0.8 -0.6 -0.4 -0.2 0 0.2 0.6 0.8 1 0 0.78 1.57 2.35 3.14 3.92 4.71 5.49 6.28 -0.8 -0.6 0.4 -0.2 Figure 5.16 0.8 0.4 0.6 0.4 0.2