Professional Documents
Culture Documents
KOM 3781 Discrete-Time Control Systems: Veysel Gazi
KOM 3781 Discrete-Time Control Systems: Veysel Gazi
KOM 3781 Discrete-Time Control Systems: Veysel Gazi
Veysel Gazi
Lecture 3: Sampling and
Reconstruction
Outline
0 k
Practical Implementation: An A/D to sample, and a digital
register to hold the value. This is modeled as an ideal
sampler followed by a “zero-order hold” (ZOH).
Ideal Sampler and Zero-Order Hold
x (t ) x(t )
Signal
0 T 2T 3T 4T t
Symbolically, the ideal sampler and ZOH are shown as
0 t 0 k
0 k
x(t ) x *(t ) x (t )
ZOH
X (s) T X *( s)
Ideal Sampler and Zero-Order Hold
x (t ) = x(0) u (t ) − u (t − T ) + x(T ) u (t − T ) − u (t − 2T ) +
1 e − sT e − sT e −2 sT
X ( s ) = x (0) − + x(T ) − +
s s s s
1 − e − sT
− ksT
= x ( kT ) e
s 0
s
We cannot consider the sampler & ZOH as TFs independently.
1) The sampler equation is a function of the input.
2) The ZOH equation acts like a transfer function
- but only for a pulse train input (a series of delta functions)
The Ideal Sampler
1 − e − sT − ksT
X (s) = X ( kT ) e X *( s ) = x(kT )e − ksT
s k = 0 0
1 − e − sT
X (s) = X *( s )
s
0 T 2T 3T t
The Ideal Sampler
Define
T (t ) = (t − nT ) = (t ) + (t − T ) + (t − 2T ) +
n =0
Then
x *(t ) = x(t )T (t ) = x(0)(t ) + x(T )(t − T ) + x(2T )(t − 2T ) +
x(t ), t 0
with x(t ) =
0, t 0
1
from = 1 + x + x 2 + x3 + ... for x 1
1− x
1
X *( s ) = for e −Ts 1 For a unit step input
1 − e −Ts
Example
Let x(t ) = e − t u (t ) Find X*(s)
Then
X *( s ) = x(nT )e − nTs
= x(0) + x(T )e −Ts
+ x(2T )e −2Ts
+ .....
n =0
e jT e− sT 1 e − jT − sT
e 1
X *( s) = −
j 2 1 − e jT e − sT j 2 1 − e − jT e − sT
After some manipulation
e − sT sin(T )
X *( s ) =
1 − 2e − sT cos(T ) + e −2 sT
1
X *(s ) = residues of X () 1 − e −T (s − )
poles _ of _ X ( )
Residue Method
− t A
Let x(t ) = Ae , then X ( s) =
s +
Applying the residue method
A 1 A
X *( s) = Res −T ( s − )
= ( + ) −T ( s − )
( + ) (1 − e ) =− ( + )(1 − e ) =−
A A
= −T ( s − )
= −T ( s + )
(1 − e ) =− 1 − e
= ( − j) −T ( s − )
+ ( + j)
( + j)( − j )(1 − e ) = j ( + j)( − j)(1 − e −T ( s − ) ) =− j
1 1 1 e −Ts sin T
= − = 1 − 2e −Ts cos T + e −2Ts
2 j 1 − e −Ts e jT 1 − e −Ts e − jT
Example
1
Let x(t ) = (1 − e − t ) , then X ( s) =
s ( s + 1)
Applying the residue method
1 1
X *( s ) = residues of −T ( s − )
( = 0, −1) ( + 1) 1 − e
1 1 1 1
= −T ( s − )
+ 1 − e −T ( s − )
( + 1) 1 − e =0 =−1
1 1
= −
1 − e −Ts 1 − e −T ( s +1)
X*(s) and DELAY
Consider the case in which x(t) contains a time delay
t0 s t0 s
X ( s) e x1 (t ) e X1 ( s)
[ x(t )] X ( s) 0
x(t )e – st dt
0
x(t )e – jt dt [ x(t )] |s j
Thus, in general
[ x(t )u (t )] [ x(t )u (t )] |s j
Results from the Fourier Transform
The plot of X ( j) gives the frequency spectrum of x(t).
X ( j) | X ( j)|e j( j) | X ( j)| ( j)
For analog systems with input x(t), output y(t), and transfer
function G(s) (provided that the initial conditions are zero)
Y ( s) G ( s) X ( s)
If x(t) is a unit impulse function, then Y(s) = G(s) and
–1
y (t ) g (t ) [G ( s )]
For a causal system, g(t) = 0 for t < 0. A practical system
cannot respond before an input is applied. Consequently, for
a causal system, the Fourier transform of the unit impulse
response G(jω) is the Laplace transform G(s) with s
replaced by jω.
For a causal system Y ( j) G( j) X ( j)
Properties of the “Starred” Transform
1. X*(s) is periodic in s, with period jωs. To show this
X *( s ) = x(kT )e − ksT
0
X *( s + jms ) = x(nT )e − nT ( s + jms )
n =0
= x(nT )e − nTs − jnTms
e = x(nT )e − nTs = X *( s )
n =0 n =0
Holds because
for m an integer.
Properties of the “Starred” Transform
2. If X(s) has a pole at s = s1,
then X*(s) has poles at s = s1 + jmωs (m = 0, ±1, ±2, . . .)
1 1
T n =−
X ( s + jns ) = [X ( s ) + X ( s + js ) + X ( s + j 2s ) +
T
+ X ( s − js ) + X ( s − j 2s ) + ]
–ωs/2 0 ωs/2
Properties of the “Starred” Transform
The spectrum of the corresponding stared transform is
1/T
Practical suggestion:
• Select fs to be 5 to 10 times faster than the highest
frequency in the signal being sampled.
• For system’s identification, select fs to be 20 to 40
times faster.
Example
Consider the sinusoids f1 = sin(7t/4) and f2 = – sin(t/4)
On the plot, the red dots indicate the sampling interval set
at T = 1s. It would appear, then, that both functions have
the same X*(s) when both are sampled at this time interval.
Example
Plotting in MATLAB
>> T=1;
t=linspace(0,8,801); % Plot resolution is 0.01 s
f1=sin(7*pi*t/4);
f2=-sin(pi*t/4);
plot(t,f1,t,f2), grid
Data Reconstruction
1 − e − sT
The Zero-Order Hold X (s) = X *( s )
s
X ( s ) = Gho ( s ) X *( s )
• The ZOH has a “transfer function”
− sT
1− e
Gho ( s ) =
s
which, along with the sampling function accurately and
practically describes the sample and hold function.
0 T t
1 xout (t ) = u (t ) − u (t − T )
area = T 1 e − sT 1 − e − sT
X out ( s ) = − =
s s s
0 T t
Frequency Response of ZOH
1 − e − jT 1 − e − jT 2T j2T − j2T 1 − e − sT
Gho ( j ) = = e e Gho ( s ) =
j j 2T
s
+ j2T − jT
− jT
e − e 2
2 T 2 − j2T
=T e
2
= T sin e
2j T 2 T
− j
sin( / s ) s
=T e
/ s Plotting in MATLAB
>> T=2;
arg Gho (angle) = ws=2*pi/T;
w=linspace(-2.5*pi,2.5*pi,251);
− / s , sin( ) 0 w1=T*sin(pi*w/ws);
− / s + , sin( ) 0 w2=pi*w/ws;
magzoh=abs(w1./w2);
plot(w,magzoh), grid
Magnitude of ZOH
T
0.637T
0.637T
T/2
1) Series: X *( s ) = x(kT )e- ksT
0
1
2) Residues: X *( s ) = residues X ( ) 1 − e −T ( s − )
poles _ of _ X ( )
3) z-Transform: X *( s ) = X ( z ) z −1 =e− Ts
Example 5
E ( s) =
Determined previously s( s + 1)
using the residue method
Residues
1 1 e −Ts (1 − e −T )
X * ( s) = 5 −Ts
− = 5 −Ts −T
1− e 1 − e −T ( s +1) (1 − e −Ts
)(1 − e e )
z-Transform a z (1 − e − aT )
s ( s + a ) = ( z − 1)( z − e − aT )
5 z (1 − e −T ) z −1 (1 − e −T )
X ( z) = = 5 −1 −T
( z − 1)( z − e −T ) (1 − z −1
)(1 − z e )
z −1 (1 − e −T ) e −Ts (1 − e −T )
X * ( s) = 5 −1 −1 −T
= 5 −Ts −Ts −T
(1 − z )(1 − z e ) z −1 =e− Ts (1 − e )(1 − e e )