Discrete and Hybrid Systems: 3.1: Laplace Transform of Ideal Sampler
Discrete and Hybrid Systems: 3.1: Laplace Transform of Ideal Sampler
Discrete and Hybrid Systems: 3.1: Laplace Transform of Ideal Sampler
u
DISCRETE AND HYBRID SYSTEMS
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–2
x(2T ) [1(t − 2T ) − 1(t − 3T )] + · · ·
! " ! −T s "
1 e−T s e e−2T s
X̄(s) = x(0) − + x(T ) − +
s s s s
! −2T s "
e e−3T s
x(2T ) − +···
s s
! "
1 − e−T s # $
= x(0) + x(T )e−T s + x(2T )e−2T s + · · ·
s
%∞ '!
−T s "
& 1 − e
= x(kT )e−kT s .
k=0
s
• First factor is function of input x(t) and sampling period T .
• Second factor is independent of x(t), so can be considered a
transfer function.
DEFINE : %∞ '
&
X ∗(s) = x(kT )e−kT s .
k=0
■ This is a representation of the A2D/sampling operation. X ∗(s) is not a
physical signal, but results from factoring X̄ (s) into two parts. Then:
X ∗ (s) zoh
X (s) X̄ (s)
T ( )
1 − e−T s
s
■ Note, the operation converting X (s) → X ∗(s) is not LTI. (why?) So, it
cannot be represented by a transfer function.
Ideal sampling
■ Take the inverse-Laplace transform of X ∗(s) to view sampling in the
time-domain.
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–3
* +
x ∗(t) = L −1
X ∗(s) = x(0)δ(t) + x(T )δ(t − T ) + x(2T )δ(t − 2T ) + · · ·
■ So, x ∗(t) is an impulse train, with impulse values weighted (multiplied)
by the value of x(t) at the sampling instants. That is,
x(t) and x ∗ (t)
∞
&
∗
x (t) = x(t) δ(t − kT )
,k=0 -. /
δT (t)
= x(t)δT (t).
∗
EXAMPLE : Find X (s) for x(t) = 1(t).
&∞
∗
X (s) = x(kT )e−kT s
k=0
= 1 + e−T s + e−2T s + · · ·
■ Multiply both sides by (1 − e−T s )
(1 − e−T s )X ∗(s) = 1
1 0 −T s 0
∗
X (s) = −T s
0e 0 < 1.
1−e
■ Hmmm. Does this look familiar? Consider z-transform of 1[k] with
z = eT s .
z
1[k] ↔
z−1
Ts eT s 1
let z = e → T s = .
e − 1 1 − e−T s
EXAMPLE : Find X ∗(s) when x(t) = e−t 1(t).
∞
&
X ∗ (s) = x(kT )e−kT s
k=0
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–4
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–5
3.2: Properties of X ∗ (s) and data reconstruction
■ What these two properties MEAN is that two different signals X 1(s)
and X 2(s) may have the SAME starred transform X 1∗ (s) = X 2∗(s).
Why?
■ One signal is said to alias as the other.
■ This is very easy to see in the time domain.
■ The (blue) solid line is the
analog signal cos(2π(5)t)
drawn over one second.
■ The (blue) squares show
sampling points for a rate of
f s = 14 Hz.
■ The (green) dots show sampling times for a rate of f s = 7 Hz.
■ The dashed (green) curve is a cos(2π(2)t) signal.
• Both the cos(2π(5)t) and cos(2π(2)t) curves pass through all the
dots so the signal may be assumed to be a 2 Hz sinusoid
(aliasing!).
• Only the cos(2π(5)t) curve passes through all the squares, so the
signal must be assumed to be a 5 Hz sinusoid (no aliasing).
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–7
■ The solution to the problem is easiest to see in the Fourier domain.
F[x(t)] = L[x(t)]|s= j ω. Since X ∗ (s) is periodic, X ∗( jω) is also periodic.
■ For X ( jω) having a spectral bandwidth W < 2 f s the sampled signal
spectrum is the following
X ( jω)
1
ω
Passband of the −W ∗ W
reconstruction filter X ( jω)
1
ω
−ωs −ωs /2 ωs /2 ωs
■ If the sampling rate f s < 2W , then spectral overlap called ALIASING
occurs.
X ( jω)
1
ω
−W W
Aliasing X ∗ ( jω)
1
ω
−2ωs −ωs ωs 2ωs
■ When aliasing is present, it is impossible to recover the original
analog signal from the sampled signal.
■ Nyquist/Shannon said that if a signal is sampled at a rate ω N there
will be no aliasing if ω N ≥ 2 times the highest frequency in the signal.
KEY POINT: Our digital control system will need to sample at least twice
as fast as the closed-loop bandwidth. Four to six times faster is safer.
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–8
Data deconstruction
■ If the signal x(t) has been sampled at or above the Nyquist rate ω N , it
is mathematically possible to recover x(t) from x(kT ). Surprise?
Magic?
■ Process X ∗( jω) by passing it through an ideal low-pass filter with
bandwidth ω N /2.
Passband of the
reconstruction filter X ∗ ( jω)
1
ω
−ω N −ω N /2 ω N /2 ωN
■ The filter must have gain T to recover the magnitude lost by sampling.
sin(πt/T )
h(t) = = sinc(t/T ).
πt/T
PROBLEM: h(t) is non-causal.
■ Solution: “Approximate” h(t) very crudely with a causal filter—the
hold circuit.
■ The impulse response of the hold
= + delay.
circuit is:
t t
T −T /2 T /2
■ So, H ( jω) is
( ) T
sin(ωT /2) − j ωT /2
H ( jω) = T e
ωT /2
( )
ω
= T sinc e− j π ω/ωs . ωs
ωs 0 2ωs 3ωs
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–9
EXAMPLE : Let x(t) = 2 sin(ω1t) with ω1 < ωs /2.
X ( jω)
1
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–10
3.3: Open-loop discrete-time systems
■ X ∗(s) has ∞ poles and zeros in the s-plane because of its periodic
nature.
■ X (z) has a single zero at z = 0, and two poles at z = e−T and
z = e−2T .
■ Pole-zero analysis is going to be easier in the z-domain.
versus
t k
0 0
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–12
■ We are interested in systems that look like:
X ∗ (s) 1 − e−T s Y (s)
X (s) G p (s) Y ∗ (s)
T s T
PLANT
, HOLD -. /
( G(s)
−sT )
1−e
■ Define G(s) = G p (s) to “hide” the mess introduced by the
s
hold operation.
X ∗(s) Y (s)
X (s) G(s) Y ∗ (s)
T T
EXAMPLE : At sample points, left plot looks better than right plot, but
in-between sample points, left plot looks worse than right plot.
Bad Step Response Good Step Response
60 60
Output Temperature ◦ C
Output Temperature ◦ C
58 58
56 56
54 54
52 52
50 50
48 48
46 46
44 44
42 42
40 40
0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 25 30 35 40 45 50
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–14
3.4: Finding G(z) from G p (s)
■ Recall that
( )
1 − e−sT
• G(s) = G p (s),
s
∗
• G (s) is a sampled Laplace transform of G(s), and
∗
0
• G(z) = G (s)0 sT . z=e
■ We calculate
!( ) "
1 − e−sT
G(z) = Z G p (s)
s
! "
# $ G p (s)
= Z 1 − e−sT
s
!( )" ! "
G p (s) G p (s)
=Z − Z e−sT .
s s
■ But: e−sT is the cts-time transfer function of a delay of T seconds.
■ In disc-time, z −1 is the transfer function of a unit delay, (T seconds).
! " ! "
G p (s) z − 1 G p (s)
G(z) = (1 − z −1)Z = Z .
s z s
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–15
■ This last term may often be looked up in a table.
1
■ In MATLAB: Let G (s) = .
p
s+1
numc=1;
denc=[1 1];
sysc=tf(numc,denc);
sysd=c2d(sysc,T);% = sampling period.
[numd,dend,T]=tfdata(sysd);
sys=tf(num,den);
set(sys,'ioDelay',tau); % tau is total delay, in seconds
sysd=c2d(sys,T);
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–17
( )( )
1 − e−T z 1
Y (z) =
z − e−T z−1
z z
= −
z − 1 z − e−T
# $ 0 T 2T 3T 4T 5T
y[k] = 1 − e−kT 1[k].
NOTE : A shortcut for this particular example would have been to notice
that the sample-and-hold does nothing to the unit-step input!
■ This example is also a good one to illustrate dc gain:
yss = lim (z − 1)Y (z)
z→1
(1 − e−T )z
= lim
z→1 (z − e −T )
1 − e−T
= = 1.
1 − e−T
■ Equivalently, we can find in general
= lim (z − 1)G(z)1(z)
z→1
■ Our digital controllers will not simply sample and hold their input
value. They will perform some mathematical operations on the
sampled input. “FILTER”
■ So, we expand our system of interest:
x[k] u[k] 1 − e−T s ū(t) y(t)
X (s) D(z) G p (s) Y ∗ (s)
T s T
FILTER HOLD PLANT
■ Suppose our digital filter has transfer function D(z).
■ Then,
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–20
■ We can determine y [k] by partial-fraction expansion and inversion of
Y (z):
Y (z) (2z − 1)(1 − e−T ) 1 − e T 1 eT − 2
= = + + .
z z(z − 1)(z − e−T ) z z − 1 z − e−T
z T z(e T − 2)
Y (z) = (1 − e ) + +
z−1 z − e−T
⇕ ⇕ ⇕
(1 − e T )δ[k] 1[k] (e T − 2)e−kT 1[k]
y[k] = (1 − e T )δ[k] + 1[k] + (e T − 2)e−kT 1[k].
NOTE : At k = 0,
y[0] = (1 − e T ) + 1 + (e T − 2) = 0.
■ This could also be observed by noting that Y (z) has higher-order
denominator than numerator.
➠ The delay in the HOLD means that the output is not instantaneous.
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–22
3.6: Some more challenging examples
Y ∗(s) = [G ∗
-. 1(s)/ X (s)]
, 2(s)G
∗
G(s)
= [G(s)X ∗(s)]∗
= G ∗(s)X ∗(s)
e2sT T esT
G ∗1 (s)G ∗2(s) = sT ̸= sT .
(e − 1)2 (e − 1)2
KEY CONCLUSION : [G 1(s)G 2(s)]∗ ̸= G ∗1 (s)G ∗2(s) in general.
REASON : Sampling is time-varying, so system is not LTI. In fact, in some
cases we may not even be able to find transfer functions. . .
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–23
EXAMPLE :
G(s)
. /, -
∗
E(s) E (s)
R(s) HOLD G p (s) Y (s)
T
H (s)
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett
ECE4540/5540, DISCRETE AND HYBRID SYSTEMS 3–24
E(s) = R(s) − H (s)Y (s)
H (s)
Y (z) D(z)G(z)
= .
R(z) 1 + D(z)G H(z)
The problem of disturbance
W (s)
A(s) A∗ (s)
R(s) HOLD G p (s) Y (s)
T
■ Solution (?)
W (s) G p (s)
W1 (s)
A(s) A∗ (s)
R(s) HOLD G p (s) Y (s)
T
! " ! "
G(z) 1
Y (z) = R(z) + W1(z).
1 + G(z) 1 + G(z)
Where to from here?
■ We now understand the hybrid nature of digital control systems and
are able to analyze such hybrid systems.
■ We’re almost ready for controller design—but first, we look at stability
analysis for discrete-time systems.
Lecture notes prepared by Dr. Gregory L. Plett. Copyright © 2017, 2009, 2004, 2002, 2001, 1999, Gregory L. Plett