Ingegneria dell ’Automazione - Sistemi in Tempo Reale
Selected topics on discrete-time and sampled-data systems
Luigi Palopoli
palopoli@sssup.it - Tel. 050/883444
Outline
Effects of delay
Sampled-data systems
Discrete equivalents
An example
Consider a first order system ˙x = λx + u Γ1 = RT
mT eληdη = eλT−λeλmT , Γ2 = emλTλ −1 Augmented discrete-time system:
2 4
x(k + 1) z(k + 1)
3 5 =
2 4
eλT eλT−λeλmT
0 0
3 5
2 4
x(k) z(k)
3 5 +
2 4
emλT−1 λ
1
3
5u(k)
Control by static feedback u(k) = kx(x) yields the closed loop dynamic:
2 4
x(k + 1) z(k + 1)
3 5 =
2 4
eλT + kemλTλ −1 eλT−λeλmT
k 0
3 5z
Stability can be studied- via Jury criterion - on
z2 − (eλT + kemλT − 1
λ )z − keλT − eλmT λ
An example
Consider a first order system ˙x = λx + u Γ1 = RT
mT eληdη = eλT−λeλmT , Γ2 = emλTλ −1 Augmented discrete-time system:
2 4
x(k + 1) z(k + 1)
3 5 =
2 4
eλT eλT−λeλmT
0 0
3 5
2 4
x(k) z(k)
3 5 +
2 4
emλT−1 λ
1
3
5u(k)
Control by static feedback u(k) = kx(x) yields the closed loop dynamic:
2 4
x(k + 1) z(k + 1)
3 5 =
2 4
eλT + kemλTλ −1 eλT−λeλmT
k 0
3 5z
Stability can be studied- via Jury criterion - on
z2 − (eλT + kemλT − 1
λ )z − keλT − eλmT λ
An example
Consider a first order system ˙x = λx + u Γ1 = RT
mT eληdη = eλT−λeλmT , Γ2 = emλTλ −1 Augmented discrete-time system:
2 4
x(k + 1) z(k + 1)
3 5 =
2 4
eλT eλT−λeλmT
0 0
3 5
2 4
x(k) z(k)
3 5 +
2 4
emλT−1 λ
1
3
5u(k) Control by static feedback u(k) = kx(x) yields the closed loop dynamic:
2 4
x(k + 1) z(k + 1)
3 5 =
2 4
eλT + kemλTλ −1 eλT−λeλmT
k 0
3 5z
Stability can be studied- via Jury criterion - on
z2 − (eλT + kemλT − 1
λ )z − keλT − eλmT λ
An example
Consider a first order system ˙x = λx + u Γ1 = RT
mT eληdη = eλT−λeλmT , Γ2 = emλTλ −1 Augmented discrete-time system:
2 4
x(k + 1) z(k + 1)
3 5 =
2 4
eλT eλT−λeλmT
0 0
3 5
2 4
x(k) z(k)
3 5 +
2 4
emλT−1 λ
1
3
5u(k)
Control by static feedback u(k) = kx(x) yields the closed loop dynamic:
2 4
x(k + 1) z(k + 1)
3 5 =
2 4
eλT + kemλTλ −1 eλT−λeλmT
k 0
3 5z Stability can be studied- via Jury criterion - on
z2 − (eλT + kemλT − 1
λ )z − keλT − eλmT λ
An example
Consider a first order system ˙x = λx + u Γ1 = RT
mT eληdη = eλT−λeλmT , Γ2 = emλTλ −1 Augmented discrete-time system:
2 4
x(k + 1) z(k + 1)
3 5 =
2 4
eλT eλT−λeλmT
0 0
3 5
2 4
x(k) z(k)
3 5 +
2 4
emλT−1 λ
1
3
5u(k)
Control by static feedback u(k) = kx(x) yields the closed loop dynamic:
2 4
x(k + 1) z(k + 1)
3 5 =
2 4
eλT + kemλTλ −1 eλT−λeλmT
k 0
3 5z
Stability can be studied- via Jury criterion - on
z2 − (eλT + kemλT − 1
)z − keλT − eλmT
Solution
a 2 < 1 ⇒ k > − e
λT−e λ
λmTa 2 > −1 − a 1 ⇒ k < −λ
a 2 > −1 + a 1 ⇒ (
k > −λ 2e
λmTe
λT−e +1
λT−1 if m > log
1+eλT 2
λT
k > −2e
λmTe
λT+e +1
λT+1 λ Otherwise
Solution
a 2 < 1 ⇒ k > − e
λT−e λ
λmTa 2 > −1 − a 1 ⇒ k < −λ a 2 > −1 + a 1 ⇒
(
k > −λ 2e
λmTe
λT−e +1
λT−1 if m > log
1+eλT 2
λT
k > −2e
λmTe
λT+e +1
λT+1 λ Otherwise
Solution
a 2 < 1 ⇒ k > − e
λT−e λ
λmTa 2 > −1 − a 1 ⇒ k < −λ a 2 > −1 + a 1 ⇒
(
k > −λ 2e
λmTe
λT−e +1
λT−1 if m > log
1+eλT 2
λT
k > −2e
λmTe
λT+e +1
λT+1 λ Otherwise
Sampled-data systems
So far we have seen discrete-time systems Computer controlled systems are actually a mix of discrete-time and continuous time
systems
We need to understand the interaction
between different components
Ideal sampler
Ideal sampling can intuitively be seen as generated by multiplying a signal by a
sequence of dirac’s δ
Properties of δ
R + ∞
−∞ f (t)δ(t − a)dt = f (a) R t
−∞ δ(τ )dτ = 1 → L[δ(t)] = 1
L -trasform of r ∗
Using the above properties it is possible to write:
L[r
∗(t)] = R
+∞−∞
r
∗(τ )e
−sτdτ = R
+∞−∞
P
+∞−∞
r(τ )δ(τ − kT )dτ =
= P
+∞−∞
R
+∞−∞
r(τ )δ(τ − kT )dτ = P
+∞−∞
r(kT )e
−sKT= R
∗(s) The L-transform of the sampled-data signal r can be
achieved from the Z-transform of the sequence r(kT ) by choosing z = e
−sTBackward or forward shifting yields different samples:
the sampling operation is not time-invariant (but it is
Spectrum of the Sampled Signal
Fourier Series transform of the sampling signal
P+∞
−∞δ(t − kT ) = P+∞
−∞ Cnej2nπt/T Cn = RT /2
−T /2
P+∞
−∞ δ(t − kT )e−j2nπt/Tdτ = R T /2
−T /2 δ(t)e−j2nπt/Tdτ = T1 → P+∞
−∞δ(t − kT ) = T1 P+∞
−∞ej2nπt/T Spectrum of r∗
L[r∗(t)] = R +∞
−∞ r(t)T1 P+∞
−∞ej2nπt/Te−sTdt =
= T1 P+∞
−∞ r(t)R+∞
−∞ e−(s−j2nπ/T )tdt =
= T1 P+∞
−∞ R(s − j2πn/T )
Example
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
ω
|R(j ω)|
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
ω
|R*(jω)|
2 π /T
Aliasing
The spectrum might be altered (i.e., signal not attainable from samples!)
−2
−1.5
−1
−0.5 0 0.5 1 1.5 2
sin(2 π t)
sin(2 π t/3)
samples collected with T = 3/2
Shannon theorem
If the signal has a finite badwidth then the signal can be reconstructed from samples collected with a period
such that T 1 ≥ 2B
Band-limited signals have infinite duration;
many signals of interest have infinite bandwidth
Typically a low-pass filter is used to
de-emphasize higher frequencies
Data Extrapolation
If the following hypotheses hold
the signal has limited bandwidth B
the signal is sampled at frequency f
s=
T1≥ 2B then the signal can be reconstructed using an ideal lowpass filter L(s) with
|L(jω)| =
T if ω ∈ [−
Tπ,
Tπ] 0 elsewhere.
Signal l(t) is given by:
1 Z pi/T sin(πt/T )
Data Extrapolation I
The reconstructed signal is computed as follows:
r(t) = r∗(t) ∗ l(t) = R+∞
−∞ r(τ )P δ(τ − kT )sincπ(t−τT dτ =
= P+∞
−∞ r(kT )sincπ(t−kT )T
The function sinc is not causal and has infinite duration In communication applications
The duration problem can be solved truncating the signal
The causality problem can be solved introducing a delay and collecting some sample before the reconstruction
Not viable in control applications since large delays jeopardise stability
Extrapolation via ZOH
Zoh transfer function
Zoh(jω) = 1−ejωjωT = e−jωT /2 n
ejωT /2−−jωT /2 2j
o 2j jω =
= T ejωT /2sinc(ωT2 ) Amplitude:
|Zoh(jω)| = T |sinc(ωT 2 )|
Phase:
∠Zoh(jω) = −ωT 2
Sinusoidal signal
−0.6
−0.4
−0.2 0 0.2 0.4 0.6 0.8 1
−0.6
−0.4
−0.2 0 0.2 0.4 0.6 0.8 1
sin(2 π t)
ZoH extrapolation
Example
Consider the signal r(t) = π 1 sin(t) The spectrum is given by
R(jω) = j(δ(ω − 1) − δ(ω + 1))
Suppose we sample it with period T = 1 The spectrum of
r ∗ (t) = 1/T P +∞
k=−∞ R(jω − 2nπ)
Example - I
−8 −6 −4 −2 0 2 4 6 8
0 0.5 1 1.5 2
−8 −6 −4 −2 0 2 4 6 8
0 0.5 1 1.5 2
|R(j ω) |
|R*(j ω)|