Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Ingegneria dell ’Automazione -Sistemi in Tempo Reale
Selected topics on discrete-time andsampled-data systems
Luigi Palopoli
[email protected] - Tel. 050/883444
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.1/19
Outline
Effects of delay
Sampled-data systems
Discrete equivalents
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.2/19
An example
Consider a first order system x = λx + u
Γ1 =R T
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
5 u(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 + k emλT−1
λeλT
−eλmT
λ
k 0
3
5 z
Stability can be studied- via Jury criterion - on
z2 − (eλT + kemλT − 1
λ)z − k
eλT − eλmT
λ
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.3/19
An example
Consider a first order system x = λx + u
Γ1 =R T
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
5 u(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 + k emλT−1
λeλT
−eλmT
λ
k 0
3
5 z
Stability can be studied- via Jury criterion - on
z2 − (eλT + kemλT − 1
λ)z − k
eλT − eλmT
λ
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.3/19
An example
Consider a first order system x = λx + u
Γ1 =R T
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
5 u(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 + k emλT−1
λeλT
−eλmT
λ
k 0
3
5 z
Stability can be studied- via Jury criterion - on
z2 − (eλT + kemλT − 1
λ)z − k
eλT − eλmT
λ
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.3/19
An example
Consider a first order system x = λx + u
Γ1 =R T
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
5 u(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 + k emλT−1
λeλT
−eλmT
λ
k 0
3
5 z
Stability can be studied- via Jury criterion - on
z2 − (eλT + kemλT − 1
λ)z − k
eλT − eλmT
λ
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.3/19
An example
Consider a first order system x = λx + u
Γ1 =R T
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
5 u(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 + k emλT−1
λeλT
−eλmT
λ
k 0
3
5 z
Stability can be studied- via Jury criterion - on
z2 − (eλT + kemλT − 1
λ)z − k
eλT − eλmT
λ
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.3/19
Solution
a2 < 1 ⇒ k > − λ
eλT−eλmT
a2 > −1 − a1 ⇒ k < −λ
a2 > −1 + a1 ⇒{
k > −λ eλT +1
2eλmT−eλT−1if m >
log 1+eλT
2
λT
k > eλT +1
−2eλmT +eλT +1λ Otherwise
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.4/19
Solution
a2 < 1 ⇒ k > − λ
eλT−eλmT
a2 > −1 − a1 ⇒ k < −λ
a2 > −1 + a1 ⇒{
k > −λ eλT +1
2eλmT−eλT−1if m >
log 1+eλT
2
λT
k > eλT +1
−2eλmT +eλT +1λ Otherwise
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.4/19
Solution
a2 < 1 ⇒ k > − λ
eλT−eλmT
a2 > −1 − a1 ⇒ k < −λ
a2 > −1 + a1 ⇒{
k > −λ eλT +1
2eλmT−eλT−1if m >
log 1+eλT
2
λT
k > eλT +1
−2eλmT +eλT +1λ Otherwise
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.4/19
Sampled-data systems
So far we have seen discrete-time systems
Computer controlled systems are actually amix of discrete-time and continuous timesystems
We need to understand the interactionbetween different components
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.5/19
Ideal sampler
Ideal sampling can intuitively be seen asgenerated by multiplying a signal by asequence of dirac’s δ
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.6/19
Properties of δ
∫ +∞
−∞ f(t)δ(t − a)dt = f(a)∫
t
−∞ δ(τ)dτ = 1 → L[δ(t)] = 1
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.7/19
L-trasform of r∗
Using the above properties it is possible to write:
L[r∗(t)] =∫ +∞
−∞r∗(τ)e−sτdτ =
∫ +∞
−∞
∑+∞−∞ r(τ)δ(τ − kT )dτ =
=∑+∞
−∞
∫ +∞
−∞r(τ)δ(τ − kT )dτ =
∑+∞−∞ r(kT )e−sKT = R∗(s)
The L-transform of the sampled-data signal r can beachieved from the Z-transform of the sequence r(kT )
by choosing z = e−sT
Backward or forward shifting yields different samples:the sampling operation is not time-invariant (but it islinear)
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.8/19
Spectrum of the Sampled Signal
Fourier Series transform of the sampling signal
P+∞
−∞δ(t − kT ) =
P+∞
−∞Cnej2nπt/T
Cn =R T/2−T/2
P+∞
−∞δ(t − kT )e−j2nπt/T dτ =
R T/2−T/2
δ(t)e−j2nπt/T dτ = 1T
→P+∞
−∞δ(t − kT ) = 1
T
P+∞
−∞ej2nπt/T
Spectrum of r∗
L[r∗(t)] =R +∞
−∞r(t) 1
T
P+∞
−∞ej2nπt/T e−sT dt =
= 1T
P+∞
−∞r(t)
R +∞
−∞e−(s−j2nπ/T )tdt =
= 1T
P+∞
−∞R(s − j2πn/T )
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.9/19
Example
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 10
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 20
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
ω
|R* (jω
)|
2 π /T
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.10/19
Aliasing
The spectrum might be altered (i.e., signal notattainable from samples!)
0 0.5 1 1.5 2 2.5 3−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
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.11/19
Shannon theorem
If the signal has a finite badwidth then the signal can bereconstructed from samples collected with a periodsuch that 1
T≥ 2B
Band-limited signals have infinite duration;many signals of interest have infinitebandwidth
Typically a low-pass filter is used tode-emphasize higher frequencies
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.12/19
Data Extrapolation
If the following hypotheses hold
the signal has limited bandwidth B
the signal is sampled at frequency fs = 1T≥ 2B
then the signal can be reconstructed using an ideallowpass filter L(s) with
|L(jω)| =
T if ω ∈ [− πT, π
T]
0 elsewhere.
Signal l(t) is given by:
l(t) =1
2π
Z pi/T
−pi/TTejωT dω =
sin(πt/T )
πt/T= sinc(πt/T )
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.13/19
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 somesample before the reconstruction
Not viable in control applications since large delays jeopardise stability
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.14/19
Extrapolation via ZOH
Zoh transfer function
Zoh(jω) = 1−ejωT
jω= e−jωT/2
n
ejωT/2−
−jωT/2
2j
o
2jjω
=
= TejωT/2sinc( ωT2
)
Amplitude:
|Zoh(jω)| = T |sinc(ωT
2)|
Phase:
∠Zoh(jω) = −ωT
2
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.15/19
Sinusoidal signal
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1−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−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
sin(2 π t)
ZoH extrapolation
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.16/19
Example
Consider the signal r(t) = 1π
sin(t)
The spectrum is given byR(jω) = j(δ(ω − 1) − δ(ω + 1))
Suppose we sample it with period T = 1
The spectrum ofr∗(t) = 1/T
∑+∞k=−∞ R(jω − 2nπ)
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.17/19
Example - I
−8 −6 −4 −2 0 2 4 6 80
0.5
1
1.5
2
−8 −6 −4 −2 0 2 4 6 80
0.5
1
1.5
2
−8 −6 −4 −2 0 2 4 6 80
0.5
1
1.5
2
|R(j ω) |
|R*(j ω)|
|R*(j ω) Zoh(j ω)| Impostors
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.18/19
Example - II
Sampling and ZoH extrapolation orignatespurious harmonics (called impostors)
Taking adavantage of the low pass behaviourof the plant we can restrict to the firstharmonic
v1(t) =1
πsinc(T/2) sin(t − T/2)
The sample-and-hold operation can bethought of (at a first approximation) as theintroduction of delay of T/2
Ingegneria dell ’Automazione - Sistemi in Tempo Reale – p.19/19