Skript Control Systems II V1
Skript Control Systems II V1
Gioele Zardini
[email protected]
August 2, 2018
1
Gioele Zardini Control Systems II FS 2018
Abstract
This ”Skript” is made of my notes from the lecture Control Systems II of Dr. Gregor
Ochsner (literature of Prof. Dr. Lino Guzzella) and from my lectures as teaching assistant
in 2017 for the lecture of Dr. Guillaume Ducard and in 2018 for the lecture of Dr. Jacopo
Tani.
This document, should give the chance to repeat one more time the contents of the lecture
Control Systems II and practice them through many examples and exercises.
Cheers!
Gioele Zardini
Version Update:
2
Gioele Zardini Control Systems II FS 2018
Contents
1 Recapitulation from Control Systems I 7
1.1 Loop Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1.1 Standard Feedback Control Loop . . . . . . . . . . . . . . . . . . . 7
1.1.2 The Gang of Six . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.1.3 The Gang of Four . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.1.4 Relations to Performance . . . . . . . . . . . . . . . . . . . . . . . . 10
1.1.5 Feed Forward . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2 General Control Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.2.1 Nominal Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.2.2 Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.2.3 Synthesis: Loop Shaping . . . . . . . . . . . . . . . . . . . . . . . . 16
1.2.4 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.2.5 Robustness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.3 The Bode’s Integral Formula . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2 Digital Control 30
2.1 Signals and Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.2 Discrete-Time Control Systems . . . . . . . . . . . . . . . . . . . . . . . . 31
2.2.1 Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.2.2 Discrete-time Control Loop Structure . . . . . . . . . . . . . . . . . 32
2.3 Controller Discretization/Emulation . . . . . . . . . . . . . . . . . . . . . . 34
2.3.1 The z-Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.4 State Space Discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.5 Discrete-time Systems Stability . . . . . . . . . . . . . . . . . . . . . . . . 45
2.6 Discrete Time Controller Synthesis . . . . . . . . . . . . . . . . . . . . . . 46
2.6.1 Emulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.6.2 Discrete-Time Synthesis . . . . . . . . . . . . . . . . . . . . . . . . 47
2.7 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3
Gioele Zardini Control Systems II FS 2018
4
Gioele Zardini Control Systems II FS 2018
8 H∞ Control 208
8.1 Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
8.2 Mixed Sensitivity Approach . . . . . . . . . . . . . . . . . . . . . . . . . . 209
8.2.1 Transfer Functions Recap . . . . . . . . . . . . . . . . . . . . . . . 209
8.2.2 How to ensure Robustness? . . . . . . . . . . . . . . . . . . . . . . 210
8.2.3 How to use this in H∞ Control? . . . . . . . . . . . . . . . . . . . . 210
8.3 Finding Tzw (s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
8.3.1 General Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
8.3.2 Applying Mixed Sensitivity Approach . . . . . . . . . . . . . . . . . 212
8.4 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
8.4.1 State Space Representation . . . . . . . . . . . . . . . . . . . . . . 213
8.4.2 H∞ Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
8.4.3 Feasibility Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . 216
5
Gioele Zardini Control Systems II FS 2018
B Rules 243
B.1 Trigo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
B.2 Euler-Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
B.3 Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
B.4 Logarithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
B.5 Magnitude and Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
B.6 dB-Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
C MATLAB 245
C.1 General Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
C.2 Control Systems Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 246
C.3 Plot and Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
6
Gioele Zardini Control Systems II FS 2018
d(t) n(t)
r(t) e(t) u(t) v(t) η(t) y(t)
F (s) C(s) P (s)
−
tation will be the key element for your further control systems studies.
The plant P (s) represents the system you want to control: let’s imagine a Duckiebot.
The variable u(t) represents the real input that is given to the system and d(t) some
disturbance that is applyied to it. These two elements toghether, can be resumed into
an actuator for the Duckiebot example. The signal v(t) represents the disturbed input.
The signal η(t) describes the real output of the system. The variable y(t), instead,
describes the measured output of the system, which can be eventually measured by a
sensor with some noise n(t). In the case of the Duckiebot, this can correspond to the
position of the vehicle and its orientation (pose). The feedback controller C(s) makes
sure that the tracking error e(t) between the measured output and the reference r(t)
approaches zero. F (s) represents the feedforward controller of the system.
Remark. Note the notation: signals in time domain are written with small letters, such as
n(t). Transfer functions in frequency domain (Laplace/Fourier transformed) are written
with capital letters, such as P (s).
Why transfer functions? In order to make the analysis of such a system easier, the loop
transfer functions are defined. In fact, it is worth transforming a problem from the time
domain into the frequency domain, solve it, and back transform it into time domain.
The main reason behind this is that convolutions (computationally complex operations
which relate signals) are multiplications (through Laplace/Fourier transformation) in the
frequency domain.
1
Note that multiple versions of this loop exist
7
Gioele Zardini Control Systems II FS 2018
Recalling that a performant controller minimizes the difference between the reference R(s)
and the output Y (s), one can write this difference as an error E(s). This can be computed
as
E(s) = F (s)R(s) − Y (s)
= F (s)R(s) − (η(s) + N (s))
= F (s)R(s) − (P (s)V (s) + N (s))
(1.5)
= F (s)R(s) − (P (s)(D(s) + U (s)) + N (s))
= F (s)R(s) − P (s)D(s) − N (s) − P (s)U (s)
= F (s)R(s) − P (s)D(s) − N (s) − P (s)C(s)E(s).
Furthermore, recalling that we started from E(s), one gets the new equation
E(s) = F (s)R(s) − P (s)D(s) − N (s) − P (s)C(s)E(s)
(1 + P (s)C(s))E(s) = F (s)R(s) − P (s)D(s) − N (s)
F (s) P (s) 1
E(s) = R(s) − D(s) − N (s).
1 + P (s)C(s) 1 + P (s)C(s) 1 + P (s)C(s)
(1.6)
This procedure can be applied to each pair of signals of the feedback loop depicted in
Figure 1. The following equations can be derived:
Y (s) P (s)C(s)F (s) P (s) 1
η(s) P (s)C(s)F (s) P (s) −P (s)C(s) R(s)
1
V (s) =
1 + P (s)C(s) C(s)F (s)
1 −C(s) · D(s) . (1.7)
U (s) C(s)F (s) −P (s)C(s) −C(s) N (s)
E(s) F (s) −P (s) −1
8
Gioele Zardini Control Systems II FS 2018
Exercise 1. A good exercise to practice this procedure could be to derive all the other
relations reported in Equation (1.7) on your own.
As you can notice, many terms in the relations introduced in Equation (1.7), are repeated.
Using the defined sensitivity function S(s) (Equation 1.2) and the complementary sensi-
tivity function T (s) (Equation 1.3), one can define four new important transfer functions.
The load sensitivity function is defined as
P (s)
P (s)S(s) = , (1.8)
1 + P (s)C(s)
and gives us an intuition on how does the disturbance affect the output. The noise
sensitivity function is defined as
C(s)
C(s)S(s) = , (1.9)
1 + P (s)C(s)
and gives us an intuition on how does the noise affect the input. Moreover, one can define
two more useful transfer functions:
C(s)F (s) P (s)C(s)F (s)
C(s)F (s)S(s) = , T (s)F (s) = . (1.10)
1 + P (s)C(s) 1 + P (s)C(s)
The new introduced four transfer functions together with the sensitivity and the comple-
mentary sensitivity functions, describe the so called gang of six.
9
Gioele Zardini Control Systems II FS 2018
You may notice that none of these transfer functions contains the important information
about the unstable pole of the plant. However, this information is crucial: if one computes
the rest of the gang of four, one gets
1
s−1 1
P (s)S(s) = = ,
1 + ks (s − 1)(s + k)
(1.13)
k · (s−1)
s k(s − 1)
C(s)S(s) = = .
1 + ks s+k
These two transfer functions still contain the problematic term and are extremely useful
to determine the influence of the unstable pole on the system, because they explicitly
show it.
Exercise 2. Which consequence does the application of a small disturbance d on the
system have?
which represents the error between the reference signal and the real plant output. One
can show, that this error can be written as
and hence
R(s) = P (s)U (s) ⇒ U (s) = P (s)−1 R(s). (1.17)
10
Gioele Zardini Control Systems II FS 2018
u(t) y(t)
P (s)
• There are time delays, (non causal inverse): how much of the future output trajectory
information we need in order to perform the desired output tracking?
But what does it mean for a system to be realizable or causal? Let’s illustrate this with
an example.
Example 3. If one has a transfer function with a number of zeros bigger than the number
of poles, this represents pure differentiators, which are not causal. Imagine to deal with
the transfer function
(s + 2)(s + 3)
P (s) = . (1.18)
s+1
This transfer function has two zeros and one pole. This can be rewritten as
(s + 2)(s + 3)
P (s) =
s+1
s2 + 5s + 6
=
s+1 (1.19)
s(s + 1) + 4s + 6
=
s+1
4s + 6
=s+ ,
s+1
where s is a pure differentiator. A pure differentiator’s transfer function can be written
as the ratio of an output and an input:
Y (s)
G(s) = s = , (1.20)
U (s)
y(t) = u̇(t)
u(t + δt ) − u(t) (1.21)
= lim ,
δt →0 δt
which confirms us that this transfer function must have knowledge of future values of the
input u(t) (from u(t + δt )) in order to react with the current output y(t). This is per
definition not physical and hence not realizable, not causal.
11
Gioele Zardini Control Systems II FS 2018
One can essentially subdivide the job of a control engineer into two big tasks:
(I) Analysis: Given a controller, how can we check that the objectives above are
satisfied?
(II) Synthesis: Given a plant, how can we design a controller that achieves the objec-
tives above?
Let’s analyse the objectives of a controller with respect to their relation to these two
tasks.
Internal/Lyapunov Stability
Internal stability, also called Lyapunov stability, characterises the stability of the trajec-
tories of a dynamic system subject to a perturbation near the to equilibrium. Let now
x̂ ∈ Rn be an equilibrium of system (1.22).
∀ε > 0, ∃δ > 0 s.t. kx(0) − x̂k < δ ⇒ kx(t) − x̂k < ε. (1.23)
In words, an equilibrium is said to be Lyapunov stable if for any bounded initial condition
and zero input, the state remains bounded.
12
Gioele Zardini Control Systems II FS 2018
In words, an equilibrium is said to be asymptotically stable if, for any bounded initial
condition and zero input, the state converges to the equilibrium.
Definition 4. An equilibrium x̂ ∈ Rn is said to be unstable if it is not stable.
Remark. Note that stability is a property of the equilibrium and not of the system in
general.
External/BIBO Stability
External stability, also called BIBO stability (Bounded Input-Bounded Output), charac-
terises the stability of a dynamic system which for bounded inputs gives back bounded
outputs.
Definition 5. A signal s(t) is said to be bounded, if there exists a finite value B > 0
such that the signal magnitude never exceeds B, that is
|s(t)| ≤ B ∀t ∈ R. (1.25)
can be written as
Z t
At
y(t) = Ce x(0) + C eA(t−τ ) Bu(τ )dτ + Du(t). (1.28)
0
13
Gioele Zardini Control Systems II FS 2018
• The zeros of the denominator of Equation (1.29) are the poles of the system, i.e.
the values si which fulfill det(si I − A) = 0, or, in other words, the eigenvalues of A.
Theorem 1. The equilibrium x̂ = 0 of a linear time invariant system is stable if and only
if the following two conditions are met:
2. The algebraic and geometric multiplicity of all λ ∈ σ(A) such that Re(λ) = 0 are
equal.
Remark. We won’t go into the proof of this theorem, because beyond the scope of the
course. As an intuition, however, one can look at Equation (1.28). As you learned in
Linear Algebra, the matrix exponential computation can be simplified with help of the
diagonalization of a matrix. Moreover, if matrix A is diagonalizable, you can derive a
form where you are left with exponential terms of the eigenvalues of A on the diagonal.
If these eigenvalues are bigger than 0, the exponentials, which depends on time, diverge.
If these eigenvalues are smaller than zero, the exponentials converge to 0 (asymptotically
stable behaviour). In the case of zero eigenvalues, the exponentials converge, but not
to 0 (stable behaviour). If the matrix A is not diagonalizable, i.e. the algebraic and
the geometric multiplicity of an eigenvalue do not coincide, one should recall the Jordan
form. In this case, some polynomial terms may be multiplied with the exponential ones
in the diagonal: this could lead to unstable behaviour (stable vs. unstable because of 0
eigenvalue). For the rigorous proof of the Theorem, go to https://en.wikibooks.org/
wiki/Control_Systems/State-Space_Stability.
1.2.2 Analysis
Which tools do we already know in order to analyze nominal stability? In the course
Control Systems I you learned about
• Root locus. In order to recall the root locus method, have a look at Example 4.15,
page 123 in [2].
Moreover, stable and unstable poles and zeros have specific consequences on the
Bode diagram:
dB
– Poles cause a gradient of −20 decade in the amplitude:
14
Gioele Zardini Control Systems II FS 2018
dB
– Zeros cause a gradient of 20 decade in the amplitude:
15
Gioele Zardini Control Systems II FS 2018
The choice of the loop gain is free: it can be chosen such that it meets the desired
specifications.
16
Gioele Zardini Control Systems II FS 2018
The parameters kp and Ti can be chosen such that the loop gain L(s) meets the known
specifications. One can reach better robustness with Lead/Lag elements of the form
T ·s+1
C(s) = . (1.36)
α·T ·s+1
where α, T ∈ R+ . One can understand the Lead and the Lag elements as
• α < 1: Lead-Element:
• α > 1: Lag-Element:
As one can see in Figure 5 and Figure 6, the maximal benefits are reached at frequencies
(ω̂), where the drawbacks are not yet fully developed.
and
1
T = √ . (1.38)
ω̂ · α
17
Gioele Zardini Control Systems II FS 2018
where ω̂ is the desired center frequency and ϕ̂ = ϕnew − ϕ is the desired maximum
phase shift (in rad).
3. Set the gain of the controller kp such that we reach the desired crossover frequency.
Realizability
Once the controller is designed, one has to look if this is really feasible and possible to
implement. That is, if the number of poles is equal or bigger than the number of zeros
of the system. If that is not the case, one has to add poles at high frequencies, such that
they don’t affect the system near the crossover frequency. One could e.g. add to a PID
controller a Roll-Off Term as
1 1
C(s) = kp · 1 + + Td · s · . (1.39)
Ti · s (τ · s + 1)2
| {z } | {z }
PID Controller Roll-Off Term
2
L(jω) often suits not the learned requirements
18
Gioele Zardini Control Systems II FS 2018
1.2.4 Performance
Under performance, one can understand two specific tasks:
• Regulation/disturbance rejection: Keep a setpoint despite disturbances, i.e.
keep y(t) at r(t). As an example, you can imagine you try to keep driving your
Duckiebot at a constant speed towards a cooling fan.
• Reference Tracking: Reference following, i.e. let y(t) track r(t). As an example,
imagine a luxury Duckiebot which carries Duckiecustomers: a temperature con-
troller tracks the different temperatures which the different Duckiecustomers may
want to have in the Duckiebot.
1.2.5 Robustness
All models are wrong, but some of them are useful. (1.40)
A control system is said to be robust when it is insensive to model uncertainties. But
why should a model have uncertainties? Essentially, for the following reasons:
• Aging: the model that was good a year ago, maybe is not good now. As an example,
think of the wheel deterioration which could cause slip in a Duckiebot.
• Poor system identification: there are entire courses dedicated to the art of
system modeling. It is not possible not to come to assumptions, which simplify
your real system to something that does not perfectly describe that.
19
Gioele Zardini Control Systems II FS 2018
One notes, that this magnitude |S(jω)| < 1 for all finite frequencies and can be made as
small as desired by choosing a sufficiently large k.
Theorem 2. Bode’s integral formula. Assume that the loop transfer function L(s)
of a feedback system goes to zero faster than 1s as s → ∞, and let S(s) be the sensitivity
function. If the loop transfer function has poles pk in the right-half-plane, then the
sensitivity function satisfies the following integral:
Z ∞ Z ∞
1
log |S(jω)|dω = log dω
0 0 |1 + L(jω)| (1.44)
X
=π pk .
• So much dirt we remove at some frequency, that much we need to add at some other
frequency. This is also called the waterbed effect.
This can be resumed with Figure 7
Theorem 3. (Second waterbed formula) Suppose that L(s) has a single real RHP-zero z
or a complex conjugate pair of zeros z = x ± jy and has Np RHP-poles pi . Let p̄i denote
the complex conjugate of pi . Then for closed-loop stability, the sensitivity function must
satisfy
Z ∞ Np
Y pi + z
ln |S(jω)| · w(z, ω)dω = π | |, (1.45)
0 I=1
p̄i − z
20
Gioele Zardini Control Systems II FS 2018
where (
2z
w(z, ω) = z 2 +ω 2
, if real zero
x x (1.46)
w(z, ω) = x2 +(y−ω)2
+ x2 +(y+ω)2
, if complex zero.
Summarizing, unstable poles close to RHP-zeros make a plant difficult to control. These
weighting functions make the argument of the integral negligible at ω > z. A RHP-zero
reduces the frequency range where we can distribute dirt, which implies a higher peak for
S(s) and hence disturbance amplification.
1.4 Examples
Example 5. The dynamic equations of a system are given as
21
Gioele Zardini Control Systems II FS 2018
Solution.
22
Gioele Zardini Control Systems II FS 2018
Example 6. Some friends from a new startup of ETH called SpaghETH and want you to
help them linearizing the system which describes their ultimate invention. The company
is active in the market of the food trucks and sells pasta on the Polyterrasse everyday.
They decided to automate the blending of the pasta in the water by carefully optimizing
its operation. A sketch of the revolutionary system is shown in Figure 63.
~ey
x
m1
k k ~ex
m2 , L, Θ
θ
The blender is modeled as a bar of mass m2 , length L, and moment of inertia (w.r.t.
1
center of mass) Θ = 12 m2 L2 . The blender is attached to a point mass m1 . In order to
deal with possible vibrations that might occur in the system, the mass is attached to two
springs with spring constant k.
The equations of motion of the system are given by
1
(m1 + m2 )ẍ + m2 L −θ̇2 sin(θ) + 2kx = 0
2
2 (1.49)
L 1 L
m2 θ̈ + m2 ẋLθ̇ sin(θ) + m2 g sin(θ) = 0.
12 2 2
a) How would you choose the state space vector in order to linearize this system? Write
the system in a new form, with the chosen state space vector.
b) Linearize this system around the equilibrium point where all states are zero except
ẋ(0) = t ∈ R is constat in order to find the matrix A.
Hint: Note that no input and no output are considered here, i.e. just the computa-
tions for the matrix A are required.
23
Gioele Zardini Control Systems II FS 2018
Solution.
a) The variables x and θ arise from the two equations of motion. Since the equation
of motion have order two with respect to these variables, we augment the state and
consider also ẋ and θ̇. Hence, the state space vector s(t) reads
s1 (t) x(t)
s2 (t) θ(t)
s(t) =
s3 (t) = ẋ(t) .
(1.50)
s4 (t) θ̇(t)
By re-writing the equations of motion with the state space vector one gets
ẋ(t) s3 (t)
θ̇(t) s4 (t)
ṡ(t) =
ẍ(t) = (m +m
1 1 2
:= f (1.51)
1 2)
· 2 m2 Ls4 (t) sin(s2 (t)) − 2ks1 (t)
θ̈(t) − L1 · (6s3 (t)s4 (t) sin(s2 (t)) + 6g sin(s2 (t)))
24
Gioele Zardini Control Systems II FS 2018
b) Find the eigendecomposition of matrix A, i.e. compute its eigenvectors and deter-
mine T and D s.t. A = T DT −1 .
25
Gioele Zardini Control Systems II FS 2018
Solution.
It follows
−3 − λ 4 −4
det(A − λI) = det 0 5−λ −8
0 4 −7 − λ
5−λ −8 (1.57)
= (−3 − λ) det
4 −7 − λ
= −(3 + λ) · [(5 − λ) · (−7 − λ) − (−24)]
= −(3 + λ)2 · (λ − 1).
(A − λI)vi = 0. (1.59)
It holds:
Note that since we have introduced two free parameters, the geometric multi-
plicity of λ1,2 = −3 is 2.
26
Gioele Zardini Control Systems II FS 2018
−4 4 −4 0
0 4 −8 0 .
0 4 −8 0
Subtracting the second row from the third row results in the form
−4 4 −4 0
0 4 −8 0 .
0 0 0 0
Since one has a zero row, one can introduce a free parameter. Let x3 = u,
u ∈ R. It follows x2 = 2t and x1 = t. The second eigenspace hence reads
n 1 o
E1 = 2 (1.61)
1
Note that since we have introduced one free parameter, the geometric multi-
plicity of λ3 = 1 is 1.
Since the algebraic and geometric multiplicity concide for every eigenvalue of A, the
matrix is diagonalizable. With the computed eigenspaces, one can build the matrix
T as
1 0 1
T = 0 1 2 , (1.62)
0 1 1
and D as a diagonal matrix with the eigenvalues on the diagonal:
−3 0 0
D = 0 −3 0 . (1.63)
0 0 1
These T and D are guaranteed to satisfy A = T DT −1 .
c) Because of λ3 = 1 > 0 one can conclude that the system is unstable in the sense of
Lyapunov.
d) Because the new matrix A contains only 0 elements above the diagonal, one can
clearly see that its eigenvalues are
λ1 = −1, λ2,3 = 0. (1.64)
The eigenvalue λ1 = −1 leads to asymptotically stable behaviour. The eigenvalue
λ2,3 = 0 has algebraic multiplicity of 2, which means that, in order to have a
marginally stable system, its geometric multiplicity should be 2 as well. It holds
• Eλ2,3 = E0 : From (A − λ2,3 I) · x = 0, one gets the linear system of equations
−1 0 0 0
−1 0 0 0 ,
−1 1 0 0
which clearly has x1 = 0, x2 = x2 = 0 and x3 = t ∈ R. Since we introduced
only one free parameter, the geometric multiplicity of this eigenvalue is only 1,
which means that the system is unstable.
27
Gioele Zardini Control Systems II FS 2018
Example 8. Assume that the standard feedback control system structure depicted in
Figure 10 is given.
w d
r e u y
C(s) P (s)
−
Figure 10: Standard feedback control system structure (simplified w.r.t. the lecture
notes).
a) Assume that R(s) = 0. What T (s) and S(s) would you prefer? Is this choice
possible?
28
Gioele Zardini Control Systems II FS 2018
Solution.
a) If the reference signal R(s) is 0 for all times, the desired output signal Y (s) should
be zero for all times as well. Thus, referring to the closed loop dynamics
In this case, all the disturbances and noise would be suppressed. However, this
choice is not possible. This can be easily checked by looking at the constraint
1 L(s) 1 + L(s)
S(s) + T (s) = + = = 1. (1.67)
1 + L(s) 1 + L(s) 1 + L(s)
This result has a key importance for the following discussions. In fact, at a fixed
frequency s, either S(s) or T (s) can be 0 but not both. In other words, it is not
possible to suppress both disturbances and noise in the same frequency band.
29
Gioele Zardini Control Systems II FS 2018
2 Digital Control
2.1 Signals and Systems
A whole course is dedicated to this topic (see Signals and Systems of professor D’Andrea).
A signal is a function of time that represents a physical quantity.
Continuous-time signals are described by a function x(t) such that this takes continuous
values.
Discrete-time Signals differ from continuous-time ones because of a sampling procedure.
Computers don’t understand the concept of continuous-time and therefore sample the
signals, i.e. measure signal’s informations at specific time instants. Discrete-time systems
are described by a function
x[n] = x(n · Ts ), (2.1)
where Ts is the sampling time. The sampling frequency is defined as fs = T1s .
One can understand the difference between the two descriptions by looking at Figure 11.
x(t)
• The informations between two samplings, that is between x[n] and x[n + 1], are lost.
30
Gioele Zardini Control Systems II FS 2018
2.2.1 Aliasing
If the sampling frequency is chosen too low, i.e. one measures less times pro second, the
signal can become poorly determined and the loss of information is too big to reconstruct
it uniquely. This situation is called aliasing and one can find many examples of that in
the real world. Let’s have a look to an easy example:
Example 9. You are finished with your summer’s exam session and you are flying to
Ibiza, to finally enjoy the sun after a summer spent at ETH. You decide to film the
turbine of the plane because, although you are on holiday, you have an engineer’s spirit.
You land in Ibiza and, as you get into your hotel room, you want you have a look at your
film. The rotation of the turbine’s blades you observe looks different to what it is supposed
to be, and since you haven’t drunk yet, there must be some scientific reason. In fact, the
sampling frequency of your phone camera is much lower than the turning frequency of
the turbine: this results in a loss of information and hence in a wrong perception of what
is going on.
31
Gioele Zardini Control Systems II FS 2018
Although the two signals have different frequencies, they are equal when discretized. For
this reason, one has to define an interval of good frequencies, where aliasing doesn’t occur.
In particular it holds
π
|ω| < (2.7)
Ts
or
1
f< ⇔ fs > 2 · fmax . (2.8)
2 · Ts
The maximal frequency accepted is f = 2·T1 s and is called Nyquist frequency. In order
to ensure good results, one uses in practice a factor of 10.
1
f< ⇔ fs > 10 · fmax . (2.9)
10 · Ts
For control systems the crossover frequency should be
ωc
fs ≥ 10 · . (2.10)
2π
32
Gioele Zardini Control Systems II FS 2018
Microcontroller (µP )
This is a discrete-time controller that uses the sampled discrete-signal and gives back a
dicrete output.
33
Gioele Zardini Control Systems II FS 2018
L (x(t)) = X(s)
= x̃(s)
Z ∞ (2.12)
= x(t)e−st dt.
0
Because of its definition, the Laplace transform is used to consider continuous-time sig-
nals/systems. In order to deal with discrete-time system, one must derive its discrete
analogon.
Example 10. Consider x(t) = cos(ωt). The Laplace transform of such a signal reads
Z ∞
L(cos(ωt)) = e−st cos(ωt)dt
0
ω ∞ −st
∞
Z
1 −st
= − e cos(ωt) − e sin(ωt)dt
s 0 s 0
(2.13)
ω ∞ −st
Z
1 ω 1 −st ∞
= − − e sin(ωt) + e cos(ωt)dt
s s s 0 s 0
1 ω2
= − 2 L(cos(ωt)).
s s
From this equation, one has
s
L(cos(ωt)) = (2.14)
s2 + ω2
Some of the known Laplace transforms are listed in Table 1.
Laplace transforms receive as inputs functions, which are defined in continuous-time. In
order to analyze discrete-time system, one must derive its discrete analogue. Discrete
time signals x(kT ) = x[k] are obtained by sampling a continuous-time function x(t). A
sample of a function is its ordinate at a specific time, called the sampling instant, i.e.
where T is the sampling period. A sampled function can be expressed through the mul-
tiplication of a continuous funtion and a Dirac comb (see reference), i.e.
34
Gioele Zardini Control Systems II FS 2018
Remark. An intuitive explanation of this, is that this function is 1 for t = kT and 0 for all
other cases. Since k is a natural number, i.e. k = −∞, . . . , ∞, applying this function to
a continuous-time signal consists in considering informations of that signal spaced with
the sampling time T .
Imagine to have a continuous-time signal x(t) and to sample it with a sampling period T .
The sampled signal can be described with the help of a Dirac comb as
∞
X
xm (t) = x(t) · δ(t − kT )
k=−∞
∞
X
= x(kT ) · δ(t − kT ) (2.18)
k=−∞
X∞
= x[k] · δ(t − kT ),
k=−∞
where we denote x[k] as the k-th sample of x(t). Let’s compute the Laplace transform of
the sampled signal:
X∞
(c) = x[k]e−ksT ,
k=−∞
where we used
(b) The sum and the integral can be switched because the function f (t) = δ(t − kT )e−st
is non-negative. This is a direct consequence of the Fubini/Tonelli’s theorem. If you
are interested in this, have a look at https://en.wikipedia.org/wiki/Fubini%
27s_theorem.
(c) This result is obtained by applying the Dirac integral property, i.e.
Z ∞
δ(t − kT )e−st dt = e−ksT . (2.20)
0
35
Gioele Zardini Control Systems II FS 2018
which is defined as the z−transform of a discrete time system. We have now found the
relation between the z transform and the Laplace transform and are able to apply the
concept to any discrete-time signal.
Definition 9. The bilateral z-transform of a discrete-time signal x[k] is defined as
∞
X
X(z) = Z ((x[k]) = x[k]z −k . (2.22)
k=−∞
e−at 1
s+a
e−akT 1
1−e−aT z −1
1 T z −1
t s2
kT (1−z −1 )2
2 T 2 z −1 (1+z −1 )
t2 s3
(kT )2 (1−z −1 )3
ω z −1 sin(ωT )
sin(ωt) s2 +ω 2
sin(ωkT ) 1−2z −1 cos(ωT )+z −2
s 1−z −1 cos(ωT )
cos(ωt) s2 +ω 2
cos(ωkT ) 1−2z −1 cos(ωT )+z −2
Properties
In the following we list some of the most important properties of the z−transform. Let
X(z), Y (z) be the z−transforms of the signals x[k], y[k].
1. Linearity
Z (ax[k] + by[k]) = aX(z) + bY (z). (2.23)
Proof. It holds
∞
X
Z (ax[k] + by[k]) = (ax[k] + by[k]) z −k
k=−∞
∞ ∞
X X (2.24)
= ax[k]z −k + by[k]z −k
k=−∞ k=−∞
= aX(z) + bY (z).
36
Gioele Zardini Control Systems II FS 2018
2. Time shifting
Z (x[k − k0 ]) = z −k0 X(z). (2.25)
Proof. It holds
∞
X
Z (x[k − k0 ]) = x[k − k0 ]z −k . (2.26)
k=−∞
3. Convolution ∗
Z (x[k] ∗ y[k]) = X(z)Y (z). (2.28)
4. Reverse time
1
Z (x[−k]) = X . (2.29)
z
Proof. It holds
∞
X
Z (x[−k]) = x[−k]z −k
k=−∞
∞ −r
X 1 (2.30)
= x[r]
r=−∞
z
1
=X .
z
5. Scaling in z domain z
k
Z a x[k] = X . (2.31)
a
Proof. It holds
∞
X z −k
k
Z a x[k] = x[k]
a
k=−∞ (2.32)
z
=X .
a
37
Gioele Zardini Control Systems II FS 2018
6. Conjugation
Z (x∗ [k]) = X ∗ (z ∗ ). (2.33)
Proof. It holds
∞
!∗
X
X ∗ (z) = x[k]z −k
k=−∞
∞
(2.34)
X
∗ ∗ −k
= x [k](z ) .
k=−∞
7. Differentiation in z domain
∂
Z (kx[k]) = −z X(z). (2.35)
∂z
Proof. It holds
∞
∂ ∂ X
X(z) = x[k]z −k
∂z ∂z k=−∞
∞
X ∂ −k
linearity of sum/derivative = x[k] z
k=−∞
∂z
∞ (2.36)
X
−k−1
= x[k](−k)z
k=−∞
∞
1 X
=− kx[k]z −k ,
z k=−∞
Approximations
In order to use this concept, often the exact solution is too complicated to compute and
not needed for an acceptable result. In practice, approximations are used. Instead of
considering the derivative as it is defined, one tries to approximate this via differences.
Given y(t) = ẋ(t), the three most used approximation methods are
• Euler forward:
x[k + 1] − x[k]
y[k] ≈ (2.37)
Ts
• Euler backward:
x[k] − x[k − 1]
y[k] ≈ (2.38)
Ts
• Tustin method:
y[k] − y[k − 1] x[k] − x[k − 1]
≈ (2.39)
2 Ts
38
Gioele Zardini Control Systems II FS 2018
1
Exact s= · ln(z) z = es·Ts
Ts
z−1
Euler forward s= z = s · Ts + 1
Ts
z−1 1
Euler backward s= z=
z · Ts 1 − s · Ts
Ts
2 z−1 1+s· 2
Tustin s= · z= Ts
Ts z + 1 1−s· 2
The meaning of the variable z can change with respect to the chosen discretization ap-
proach. Here, just discretization results are presented. You can try derive the following
rules on your own. A list of the most used transformations is reported in Table 2. The
different approaches are results of different Taylor’s approximations5 :
• Euler Forward:
z = es·Ts ≈ 1 + s · Ts . (2.40)
• Euler Backward:
1 1
z = es·Ts = ≈ . (2.41)
e−s·Ts 1 − s · Ts
• Tustin: Ts Ts
es· 2 1+s· 2
z= Ts ≈ Ts
. (2.42)
e−s· 2 1−s· 2
In practice, the most used approach is the Tustin transformation, but there are cases
where the other transformations could be useful.
Example 11. You are given the differential relation
d
y(t) = x(t), x(0) = 0. (2.43)
dt
One can rewrite the relation in the frequency domain using the Laplace transform. Using
the property for derivatives
d
L f (t) = sL(f (t)) − f (0). (2.44)
dt
By Laplace transforming both sides of the relation and using the given initial condition,
one gets
Y (s) = sX(s). (2.45)
In order to discretize the relation, we sample with a generic sampling time T the signals.
Forward Euler’s method for the approximation of differentials reads
x((k + 1)T ) − x(kT )
ẋ(kT ) ≈ . (2.46)
T
5
As reminder: ex ≈ 1 + x.
39
Gioele Zardini Control Systems II FS 2018
By recalling that x[k + 1] = x((k + 1)T ), one can start from the solution derived for
continuous-time systems
Z t
At
x(t) = e x(0) + eAt
e−Aτ Bu(τ )dτ. (2.53)
0
and hence Z kT
x(kT ) = e AkT
x(0) + eAkT
e−Aτ Bu(τ )dτ. (2.55)
0
Since we want to write x((k + 1)T ) in terms of x(kT ), we multiply all terms of Equation
(2.55) by eAT and rearrange the equation as
Z kT
e A(k+1)T
x(0) = e AT
x(kT ) − e A(k+1)T
e−Aτ Bu(τ )dτ. (2.56)
0
40
Gioele Zardini Control Systems II FS 2018
Example 12. Given the general state space for in Equation (2.51), the forward Euler
approach for differentials reads
x[k + 1] − x[k]
ẋ ≈ . (2.59)
Ts
Applying this to the generic state space formulation
ẋ(t) = Ax(t) + Bu(t)
(2.60)
y(t) = Cx(t) + Du(t),
one gets
x[k] − x[k − 1]
= Ax[k] + Bu[k]
Ts (2.61)
y[k] = Cx[k] + Du[k],
which results in
x[k + 1] = (I + Ts A) x[k] + Ts B u[k]
| {z } |{z}
Ad,f Bd,f
(2.62)
y[k] = |{z}
C x[k] + |{z}
D u[k].
Cd,f Dd,f
41
Gioele Zardini Control Systems II FS 2018
(a) Find the discrete-time state space representation of the system using a sampling
time Ts = 1s, i.e. find Ad , Bd , Cd , Dd
42
Gioele Zardini Control Systems II FS 2018
Solution. In order to compute the exact discretization, we use the formulas derived in
class. For Ad , one has
Ad = eATs = eA . (2.64)
In order to compute the matrix exponential, one has to compute its eigenvalues, store
them in a matrix D, find its eigenvectors, store them in matrix T , find the diagonal form
and use the law
eA = T eD T −1 . (2.65)
First, we compute the eigenvalues of A. It holds
PA (λ) = det(A − λI)
1 − λ −1
= det
2 4−λ (2.66)
2
= λ − 5λ + 6
= (λ − 2) · (λ − 3).
Therefore, the eigenvalues are λ1 = 2 and λ2 = 3 and they have algebraic multiplicity 1.
We compute now the eigenvectors:
• Eλ1 = E2 : from (A − λ1 I)x = 0 one gets the system of equations
−1 −1 0
2 2 0
One can note that the second row is linear dependent with the first. We therefore have a
free parameter and the eigenspace for λ1 reads
n −1 o
E2 = . (2.67)
1
E2 has geometric multiplicity 1.
• Eλ2 = E3 : from (A − λ2 I)x = 0 one gets the system of equations
−2 −1 0
2 1 0
One notes that the first and the second row are linearly dependent. We therefore have a
free parameter and the eigenspace for λ2 reads
n −1 o
E3 = (2.68)
2
E3 has geometric multiplicity 1. Since the algebraic and geometric multiplicity concide
for every eigenvalue of A, the matrix is diagonalizable. With the computed eigenspaces,
one can build the matrix T as
−1 −1
T = , (2.69)
1 2
and D as a diagonal matrix with the eigenvalues on the diagonal:
2 0
D= . (2.70)
0 3
43
Gioele Zardini Control Systems II FS 2018
It holds
−1 1 2 1
T = ·
(−2 + 1) −1 −1
(2.71)
−2 −1
= .
1 1
Ad = eA
= T eD T −1
2
−1 −1 e 0 −2 −1 (2.72)
= · ·
1 2 0 e3 1 1
2e2 − e3 e2 − e3
= .
−2e2 + 2e3 −e2 + 2e3
For Bd holds
Z Ts
Bd = eAτ Bdτ
Z0 1
= eAτ Bdτ
Z0 1 2τ
−1 −1 e 0 −2 −1 1
= · 3τ · · dτ
0 1 2 0 e 1 1 0
Z 1 2τ (2.73)
−e −e3τ −2
= 2τ 3τ · dτ
0 e 2e 1
Z 1
2e2τ − e3τ
= dτ
0 −2e2τ + 2e3τ
2 e3 2
e − 3 −3
= .
−e2 + 32 e3 + 13
44
Gioele Zardini Control Systems II FS 2018
As usual, we want to find conditions for wich the state x[k] does not diverge. The free
evolution (free means without input) can be written as
x[1] = Ad x0
x[2] = A2d x0
.. (2.76)
.
x[k] = Akd x0 .
In order to analyze the convergence of this result, let’s assume that Ad ∈ Rn×n is diago-
nalizable and let’s rewrite Ad with the help of its diagonal form:
x[k] = Akd x0
k
= T DT −1 x0
!
(2.77)
= T D |T −1 −1
{zT} DT . . . T DT
−1
I
k −1
= TD T x0 .
where D is the matrix containing the eigenvalues of Ad and T is the matrix containing
the relative eigenvectors. One can rewrite this using the modal decomposition as
n
X
k −1
TD T x0 = αi λki vi , (2.78)
i=1
where vi are the eigenvectors relative to the eigenvalues λi and αi = T −1 x0 some coef-
ficients depending on the initial condition x0 . Considering any possible eigenvalue, i.e.
λi = ρi ejφi , one can write
n
X
k −1
TD T x0 = αi ρki ejφi k vi . (2.79)
i=1
It holds
|λi | = ρki |ejφi k |
(2.80)
= ρki .
45
Gioele Zardini Control Systems II FS 2018
• |λi | ≤ 1 ∀i = 1, . . . , n and eigenvalues with unit modulus have equal geometric and
algebraic multiplicity: the free evolution converges (but not to 0) and the system is
marginally stable or stable.
• ∃i s.t. |λi | > 1: the free evolution diverges and the system is unstable.
Remark. The same analysis can be performed for non diagonalizable matrices Ad . The
same conditions can be derived, with the help of the Jordan diagonal form of Ad .
Since Ad is a lower diagonal matrix, its eigenvalues lie in the diagonal, i.e. λ1 = 0, λ2 = 12 .
Since both eigenvalues satisfy |λi | < 1, the system is asymptotically stable.
2.6.1 Emulation
In the previous chapter, we learned how to emulate a system. Let’s define the recipe for
such a procedure: Given a continous-time plant P (s):
46
Gioele Zardini Control Systems II FS 2018
2. Choose a sampling rate that is at least twice (ten times in practice) the crossover
frequency.
3. If required, design an anti aliasing filter (AAF) to remove high frequency components
of the continuous signal that is going to be sampled.
4. Modify your controller to take into accout the phase lag introduced by the dis-
cretization (up to a sampling period delay) and the AAF.
5. Discretize the controller (e.g. use the Tustin method for best accuracy).
6. Check open loop stability. If the system is unstable, change the emulation method,
choose a faster sampling rate, or increase margin of phase.
We want to compute the equivalent discrete-time transfer function H(z). The loop is
composed of a Digital-to-Analog Converter (DAC), the continuous-time transfer function
G(s) and of an Analog to Digital Converter (ADC). We aim reaching a structure that
looks like the one depicted in Figure 16.
n=0
47
Gioele Zardini Control Systems II FS 2018
The first thing to do, is to consider an input to analyze. The usual choice for this type of
analysis is a unit-step of the form
Sn = U0 + U0 · a + U0 · a2 + . . . + U0 · an−1
(2.86)
= U0 · (1 + a + a2 + . . . + an−1 ).
Then
a · Sn = U0 · (a + a2 + a3 + . . . + an ) (2.87)
and
Sn − a · Sn = U0 · (1 − an ), (2.88)
which leads to
1 − an
Sn = U0 · . (2.89)
1−a
From here, it can be shown that the limit for n going to infinity convergenges if and only
if the absolute value of a is smaller than one, i.e.
1
lim Sn = U0 · , iff |a| < 1. (2.90)
n→∞ 1−a
Therefore the limiting case |a| = 1 =: r is called radius of convergence. The according
convergence criterion is |a| < r.
H(z) contains the converters: at first, we have the digital -to-analog converter. The
Laplace-Transform of the unit-step reads generally
1
. (2.91)
s
Hence, the transfer function before the analog-to-digital converter reads
G(s)
. (2.92)
s
48
Gioele Zardini Control Systems II FS 2018
In order to consider the analog-to-digital converter, we have to apply the inverse Laplace
transfrom to get
−1 G(s)
y(t) = L . (2.93)
s
Through a z− transform one can now get Y (z). It holds
Y (z) = Z (y(kT ))
(2.94)
−1 G(s)
=Z L .
s
Y (z)
H(z) = . (2.95)
U (z)
49
Gioele Zardini Control Systems II FS 2018
2.7 Examples
Example 15. A continuous-time system with the following transfer function is consid-
ered:
9
G(s) = . (2.96)
s+3
(a) Calculate the equivalent discrete-time transfer function H(z). The latter is com-
posed of a Digital-to-Analog Converter (DAC), the continuous-time transfer function
G(s) and an Analog-to-Digital Converter (ADC). Both converters, i.e. the DAC and
ADC, have a sampling time Ts = 1s.
(b) Calculate the static error if a proportional controller K(z) = kp is used and the
reference input yc,k is a step signal.
Hint: Heavyside with amplitude equal to 1.
50
Gioele Zardini Control Systems II FS 2018
Solution.
(a) Rather than taking into account all the individual elements which make up the
continuous-time part of the system (DAC, plant, ADC), in a first step, these el-
ements are lumped together and are represented by the discrete-time description
H(z). In this case, the discrete-time output of the system is given by
where U (z) is the z−transform of the discrete input uk given to the system. There-
fore, the discrete-time representation of the plant is given by the ratio of the output
to the input
Y (z)
H(z) = . (2.98)
U (z)
For the sake of convenience, uk is chosen to be the discrete-time Heaviside function
(
uk [k] = 1, k ≥ 0
(2.99)
0, else.
This input function needs to be z−transformed. Recall the definition of the z-
transform ∞
X
X(z) = x(n) · z −n . (2.100)
n=0
and applying it to the above equation, with the input uk gives (uk [k] = 1 for k ≥ 0)
U (z) = X(uk )
∞
X
= z −k
k=0 (2.101)
X∞
= (z −1 )k .
k=0
For U (z) to be defined, this sum must converge. Recalling the properties of geo-
metric series one can see
1
U (z) = , (2.102)
a − z −1
as long as the convergence criterion is satisfied, i.e. as long as |z −1 | < 1 or better
|z| > 1 (a = 1). This signal is then transformed to continuous time using a zero-
order hold DAC. The output of this transformation is again a Heaviside function
uh (t). Since the signal is now in continuous time, the Laplace transform is used to
for the analysis. The Laplace transform of the step function is well known to be
1
L(uh (t))(s) = = U (s). (2.103)
s
The plant output in continuous time is given by
After the plant G(s), the signal is sampled and transformed into discrete time once
more. Therefore, the z−transform of the output has to be calculated. However, the
signal Y (s) cannot be transformed directly, since it is expressed in the frequency
domain. Thus, first, it has to be transformed back into the time domain (i.e. into
y(t)) using the inverse Laplace transform, where it is then sampled every t = k · T .
The resulting series of samples {y[k]} is then transformed back into the z−domain,
i.e.
−1 G(s)
Y (z) = X {L (kT )} . (2.105)
s
To find the inverse Laplace transform of the output, its frequency domain represen-
tation is decomposed into a sum of simpler functions
G(s) 9
=
s s · (s + 3)
α β
= + (2.106)
s s+3
s · (α + β) + 3 · α
= .
s · (s + 3)
α = 3, β = −3. (2.107)
and thus
G(s) 3 3
= −
s s s + 3 (2.108)
1 1
=3· − .
s s+3
The z−transform of the output sampled at discrete time istants y(kT ) is given by
"∞ ∞
#
X X
X({y(kT )}) = 3 · z −k − e−3kT · z −k
" k=0
∞
k=0
∞
#
X X (2.110)
=3· z −1k − (e−3T · z −1 )k
k=0 k=0
= Y (z).
52
Gioele Zardini Control Systems II FS 2018
Using the above equations the output transfrom converges to (given that the two
convergence criteria are satisfied)
1 1
Y (z) = 3 · − . (2.112)
1 − z −1 1 − e−3T · z −1
Y (z)
H(z) =
U (z)
= (1 − z −1 ) · Y (z)
1 − z −1 (2.113)
=3· 1−
1 − e−3T · z −1
(1 − e−3T ) · z −1
=3· .
1 − e−3T · z −1
(b) From the signal flow diagram, it can be seen that the error ε(z) is composed of
The input yc (t) is a discrete step signal, for which the z-transform was calculated in
(a):
1
Yc (z) = . (2.115)
1 + z −1
Therefore, the error signal reads
1
1+z −1
ε(z) = −3T )·z −1 . (2.116)
1+3· kp · (1−e
1−e−3T ·z −1
To calculate the steady-state error, i.e. the error after infinite time, the discrete-time
final value theorem6 is used:
6
limt→∞ ε(t) = lims→0 s · ε(s)
53
Gioele Zardini Control Systems II FS 2018
Example 16. Together with your friends, you founded the new startup TACSII, which
is active in self-driving taxi services. You are given the dynamics of the demand for the
two different types of vehicles you offer: small vehicles (x1 (t)) and large vehicles (x2 (t)).
TACSI, a startup founded a year ago, helps you when you don’t have enough vehicles, by
giving you a multiple of e(t) extra vehicles when needed. Due to software limitations, for
the moment you can only mesaure the sum of small and large vehicles that are requested
to you. The dynamics read
a) Write down the state space description for the system, considering the extra vehicles
as an input to the system, i.e. find the system matrices A, B, C and D.
b) Discretize the system using the forward Euler approach and a sampling time Ts = 2s,
i.e. find Ad,f , Bd,f , Cd,f and Dd,f .
c) Discretize the system using exact discretization and a sampling time of Ts = 1s, i.e.
find Ad , Bd , Cd and Dd .
54
Gioele Zardini Control Systems II FS 2018
Solution.
a) The state space description reads
ẋ1 (t) 5 −6 1
ẋ = = x(t) + E(t)
ẋ2 (t) 3 −4 2
| {z } |{z}
A B (2.120)
y(t) = 1 1 x(t).
| {z }
C
x[k + 1] − x[k]
ẋ ≈ . (2.121)
Ts
Applying this to the generic state space formulation
which results in
x[k + 1] = (I + Ts A) x[k] + Ts B u[k]
| {z } |{z}
Ad,f Bd,f
(2.124)
y[k] = |{z}
C x[k] + |{z}
D u[k].
Cd,f Dd,f
Ad,f = (I + Ts A)
1 0 10 −12
= +
0 1 6 −8
11 −12
= ,
6 −7
Bd,f = Ts B (2.125)
2
= ,
4
Cd,f = C
= 1 1
Dd,f = D = 0,
55
Gioele Zardini Control Systems II FS 2018
c) In order to compute the exact discretization, we use the formulas derived in class.
For Ad , one has
Ad = eATs = eA . (2.126)
In order to compute the matrix exponential, one has to compute its eigenvalues,
store them in a matrix D, find its eigenvectors, store them in matrix T , find the
diagonal form and use the law
eA = T eD T −1 . (2.127)
Therefore, the eigenvalues are λ1 = 2 and λ2 = −1 and they have algebraic multi-
plicity 1. We compute now the eigenvectors:
3 −6 0
3 −6 0
One can note that the second row is identical to the first. We therefore have a free
parameter and the eigenspace for λ1 reads
n 2 o
E2 = . (2.129)
1
6 −6 0
3 −3 0
One notes that the first and the second row are linearly dependent. We therefore
have a free parameter and the eigenspace for λ2 reads
n 1 o
E−1 = (2.130)
1
E−1 has geometric multiplicity 1. Since the algebraic and geometric multiplicity
concide for every eigenvalue of A, the matrix is diagonalizable. With the computed
eigenspaces, one can build the matrix T as
2 1
T = , (2.131)
1 1
56
Gioele Zardini Control Systems II FS 2018
It holds
−1 1 1 −1
T = ·
(2 − 1) −1 2
(2.133)
1 −1
=
−1 2
Ad = eA
= T eD T −1
2
2 1 e 0 1 −1 (2.134)
= · ·
1 1 0 e−1 −1 2
−1 −1
2 2
2e − e −2e + 2e
= .
e2 − e−1 2e−1 − e2
For Bd holds
Z Ts
Bd = eAτ Bdτ
0
Z 1
= eAτ Bdτ
Z0 1 2τ
2 1 e 0 1 −1 1
= · −τ · · dτ
0 1 1 0 e −1 2 2
Z 1 2τ −τ (2.135)
2e e −1
= 2τ −τ · dτ
0 e e 3
Z 1
−2e2τ + 3e−τ
= dτ
0 −e2τ + 3e−τ
4 − e2 − 3e−1
= 7 e2 .
2
− 2 − 3e−1
57
Gioele Zardini Control Systems II FS 2018
Example 17.
(a) Choose all the signals that can be sampled without aliasing. The sampling time is
Ts = 1s.
x(t) = 100 2π
P
i=1 cos i+2 · t .
is sampled with sampling frequency fs . What is the minimal fs such that no aliasing
occurs?
58
Gioele Zardini Control Systems II FS 2018
Solution.
3 x(t) = P100 2π
i=1 cos i+2
· t .
Explanation:
If one goes back to the definition of the ranges to ensure no aliasing occurs, one gets
the formula
1
f< .
2 · Ts
In this case the condition reads
1
f< = 0.5Hz.
2 · 1s
One can read the frequency of a signal from its formula: the value that multiplies t
is ω and
ω
= f.
2π
The first three signals have
4π
f= = 2Hz.
2π
which is greater than 0.5Hz. Moreover, additional phase and gain don’t play an
important role in this sense. The next three signals have a frequency of
0.2π
f= = 0.1Hz.
2π
that is lower than 0.5Hz and hence perfect, in order to not encounter aliasing. The
next three signals have the critical frequency and theoretically speaking, one sets
this as already aliased. The reason for that is that the Nyquist theorem sets a strict
< in the condition.
For the next two signals a special procedure applies: if one has a combination of
signals, one has to look at the bigger frequency of the signal. In the first case
this reads 2Hz, that exceeds the limit frequency. In the second case this reads
0.2Hz, that is acceptable. The last two cases are a general form of combination
59
Gioele Zardini Control Systems II FS 2018
1
of signals. The leading frequency of the first sum, decreases with i+1 and has its
biggest value with i = 1, namely 0.5Hz. This is already at the limit frequency,
1
hence not acceptable. The leading frequency of the second sum, decreases with i+2
and has its biggest value with i = 1, namely 0.33Hz. This is lower that the limit
frequency, hence acceptable.
60
Gioele Zardini Control Systems II FS 2018
Example 18.
True.
False.
61
Gioele Zardini Control Systems II FS 2018
Solution.
1 2 1
(a) A= ,B= .
1 2 2
−1 −2 1
A= ,B= .
−1 −2 2
3A= 0 0 0.1
,B= .
0 0 0
−1 −2 1
A= ,B= .
1 −0.5 2
−1 −2 1
A= ,B= .
0 −0.5 2
3A= −0.1 −2 1
,B= .
0 −0.5 2
3A= −0.1 −2 0.1
,B= .
0 −0.5 0
3 0.1 −2 1
A= ,B= .
0 0.5 2
3A= 0.1 −2 0.1
,B= .
0 0.5 0
(b)
3 True.
False.
Explanation:
The eigenvalues of A should fulfill
λi | < 1. (2.136)
Furthermore. this has nothing to do with B.
62
Gioele Zardini Control Systems II FS 2018
Example 19. One of your colleagues has developed the following continuous-time con-
troller for a continuous-time plant
2s + 1
C(s) = (2.137)
s+α
where α ∈ R is a tuning factor.
(a) You now want to implement the controller on a microprocessor using the Euler
backward emulation approach. What is the resulting function C(z) for a generic
sampling time T ∈ R+ ?
(b) What is the range of the tuning factor α that produces an asymptotically stable
discrete.time controller when applying the Euler backward emulation approach?
63
Gioele Zardini Control Systems II FS 2018
Solution.
(b) The controller C(z) is asymptotically stable if its pole πd fulfills the condition
|πd | < 1.
z · (1 + α · T ) − 1 = 0
1 (2.140)
πd = .
1+α·T
This, together with the condition for stability gives
1 2
−1 < < 1 ⇒ α > 0 or α < − . (2.141)
1+α·T T
(c) For C(s) to be asymptotically stable, its pole πc = −α must lie in the left half of
the complex plane:
Re{πc } < 0 ⇒ α > 0. (2.142)
Together with the results from (b), the condition on α is α > 0.
64
Gioele Zardini Control Systems II FS 2018
The big difference from SISO systems is that u(t) and y(t) are here vectors and not
scalars anymore. For this reason B, C, D are now matrices.
65
Gioele Zardini Control Systems II FS 2018
d(t) n(t)
r(t) e(t) u(t) v(t) η(t) y(t)
F (s) = I C(s) P (s)
−
66
Gioele Zardini Control Systems II FS 2018
Example 20. In order to understand how to work with these matrices, let’s analyze the
following problem. We start from the standard control system’s structure (see Figure 18).
To keep things general, let’s say the plant P (s) ∈ Cp×m and the controller C(s) ∈ Cm×p .
The reference r ∈ Rp , the input u ∈ Rm and the disturbance d ∈ Rp . The output Y (s)
can as always be written as
Y (s) = T (s) · R(s) + S(s) · D(s). (3.15)
where T (s) is the transfer function of the complementary sensitivity and S(s) is the
transfer function of the sensitivity.
w=0 d
r e u y
C(s) P (s)
−
n=0
67
Gioele Zardini Control Systems II FS 2018
Recalling the general equation (4.39) one gets the two transfer functions:
T1 (s) = P (s) · C(s) · (I + P (s) · C(s))−1 ,
(3.19)
S1 (s) = (I + P (s) · C(s))−1 .
68
Gioele Zardini Control Systems II FS 2018
From the minors one can calculate the poles and the zeros as follows:
3.2.1 Zeros
The zeros are the zeros of the numerator’s greatest common divisor of the maximal minors,
after their normalization with respect to the same denominator (polepolynom).
3.2.2 Poles
The poles are the zeros of the least common denominator of all the minors of P (s).
3.2.3 Directions
In MIMO systems, the poles and the zeros are related to a direction. Moreover, a zero-
pole cancellation occurs only if zero and pole have the same magnitude and input-output
in,out
direction. The directions δπ,i associated with a pole πi are defined by
in out
P (s) s=πi
· δπ,i = ∞ · δπ,i . (3.29)
in,out
The directions δξ,i associated with a zero ξi are defined by
in out
P (s) s=ξi
· δξ,i = 0 · δξ,i . (3.30)
The directions can be computed with the singular value decomposition (see next
chapters) of the matrix P (s).
69
Gioele Zardini Control Systems II FS 2018
3.3 Examples
Example 22. One wants to find the poles and the zeros of the given transfer function
s+2
s+3
0
P (s) = . (3.31)
0 (s+1)·(s+3)
s+2
70
Gioele Zardini Control Systems II FS 2018
Solution. First of all, we list all the minors of the transfer function:
Minors:
s+2 (s+1)·(s+3)
• First order: s+3
, s+2
, 0, 0 ;
• Second order: s + 1.
Poles:
The least common denominator of all the minors is
(s + 3) · (s + 2) (3.32)
π1 = −2
(3.33)
π2 = −3.
Zeros:
The maximal minor is s + 1 and we have to normalize it with respect to the polepolynom
(s + 3) · (s + 2). It holds
(s + 1) · (s + 2) · (s + 3)
(s + 1) ⇒ (3.34)
(s + 2) · (s + 3)
71
Gioele Zardini Control Systems II FS 2018
Example 23. One wants to find the poles and the zeros of the given transfer function
!
1 1 2·(s+1)
s+1 s+2 (s+2)·(s+3)
P (s) = s+3 s+4 . (3.37)
0 (s+1)2 s+1
72
Gioele Zardini Control Systems II FS 2018
Solution. First of all, we list all the minors of the transfer function:
Minors:
• First order: 1
, 1 , 2·(s+1) , 0, (s+1)
s+1 s+2 (s+2)·(s+3)
s+3 s+4
2 , s+1 ;
Poles:
The least common denominator of all the minors is
π1 = −1
π2 = −1
π3 = −1 (3.39)
π4 = −2
π5 = −3.
Zeros:
The numerators of the maximal minors are (s + 3), 1 and −(s + 4). We have to normalize
them with respect to the polepolynom (s + 1)3 · (s + 2) · (s + 3). It holds
(s + 3)2 · (s + 2)
(s + 3) ⇒ , (3.40)
(s + 1)3 · (s + 2) · (s + 3)
(s + 1)2 · (s + 2) · (s + 3)
1 ⇒ , (3.41)
(s + 1)3 · (s + 2) · (s + 3)
(s + 4) · (s + 1) · (s + 2) · (s + 3)
−(s + 4) ⇒ − . (3.42)
(s + 1)3 · (s + 2) · (s + 3)
(s + 3) · (s + 2). (3.43)
ζ1 = −2,
(3.44)
ζ2 = −3.
73
Gioele Zardini Control Systems II FS 2018
74
Gioele Zardini Control Systems II FS 2018
The least common denominator – the pole-polynom – is (s + 1)(s + 2)2 (s − 1), from which
the system’s poles and their multiplicities can be read: s = −1 (multiplicity = 1), s = 1
(multiplicity = 1) und s = −2 (multiplicity = 2).
Normalizing the minors of second order with the denominator (s + 1)(s + 2)2 (s − 1) yields
75
Gioele Zardini Control Systems II FS 2018
The easiest example of such a norm is the case where p = 2, i.e. the euclidean norm
(shortest distance between two points):
v
u n
uX
kxk2 = t |xi |2 . (4.2)
i=1
Another important example of such a norm is the infinity norm (largest element in the
vector):
kxk∞ = max |xi |. (4.3)
i
76
Gioele Zardini Control Systems II FS 2018
kAxkp
kAkp = sup
x∈Cn , x6=0 kxkp (4.13)
= sup (kAxkp )
x∈Cn , x=1
Remark. At this point, one would ask what is the difference between sup and max. A
maximum is the largest number within a set. A sup is a number that bounds a set. A
sup may or may not be part of the set itself (0 is not part of the set of negative numbers,
but it is a sup because it is the least upper bound). If the sup is part of the set, it is also
the max.
77
Gioele Zardini Control Systems II FS 2018
u y
G
The definition of induced norm is interesting because one can interpret this as in Figure
19. In fact, using the induced norm
kGuk
kGkp = sup , (4.14)
kuk6=0 kuk
one can quantify the maimum gain (amplification) of an output vector for any possible
input direction at a given frequency. This turns out to be extremely useful for evaluating
system interconnections. Referring to Figure 20 and using the multiplication property for
norms, it holds
In words, the input-output gain of a system series is upper bounded by the product of
the induced matrix norms.
u w y
G1 G2
(ii) If A is orthogonal:
kAk2 = 1. (4.17)
Note that this is the case because orthogonal matrices always have eigenvalues with
magnitude 1.
78
Gioele Zardini Control Systems II FS 2018
(iv) If A is invertible:
1
kA−1 k2 = √
µmin
(4.19)
1
=√ .
minimal eigenvalue of A∗ · A
(v) If A is invertible and symmetric:
1
kA−1 k2 = . (4.20)
mini (|λi |)
Remark. Remember: the matrix A∗ A is always a square matrix.
A special case of this is the two-norm, also called euclidean norm, integral square error,
energy of a signal: v
u Z ∞ n !
u X
ke(t)k2 = t |ei (τ )|2 dτ . (4.23)
−∞ i=1
79
Gioele Zardini Control Systems II FS 2018
Remark. Note that this norm is a measure of the combination of system gains in all
directions, over all frequency. This is not an induced norm, as it does not respect the
multiplicative property.
The infinity norm is
kĜ(s)k∞ = sup kĜ(jω)k2 (4.27)
ω
Remark. This norm is a measure of the peak of the maximum singular value, i.e. the
biggest amplification the system may bring at any frequency, for any input direction
(worst case scenario). This is an induced norm and respects the multiplicative property.
4.1.5 Examples
Example 27.
b) Find the euclidean and the maximum signal norm of the following signals, for
t ∈ (0, ∞):
i) u(t) = e−2t .
ii) v(t) = cos(5t).
80
Gioele Zardini Control Systems II FS 2018
Solution.
a) The euclidean norm of a matrix is defined as:
sX
kGk2 = |gi,j |2 . (4.29)
i,j
The given input signals are only one dimensional, so n = 1 for both cases. As
written in the exercise description, only times from 0 to ∞ are to be considered.
i)
sZ
∞
ku(t)k2 = |u(τ )|2 dτ
0
sZ
∞
= |e−2τ |2 dτ
0
sZ
∞
= e−4τ dτ (4.34)
0
r
−1 −4τ ∞
= [e ]0
4
r
1
= − [0 − 1]
4
1
= .
2
81
Gioele Zardini Control Systems II FS 2018
ii)
sZ
∞
kv(t)k2 = |v(τ )|2 dτ
0
sZ (4.36)
∞
= | cos(5τ )|2 dτ ,
0
which is ∞.
kv(t)k∞ = sup(|v(τ )|)
τ
= sup(| cos(5τ )|) (4.37)
τ
= 1.
82
Gioele Zardini Control Systems II FS 2018
y =A·u (4.38)
is defined as
kyk
kAk = max
u6=0 kuk
(4.39)
= max kyk.
kuk=1
Let’s recall Equation 4.16, and let’s notice that if A ∈ Rn×m it holds
A∗ = A| . (4.40)
In order to define the SVD we have to go a step further. Let’s consider a Matrix A and
the linear function given in Equation 4.38. It holds
kAk22 = max y ∗ · y
kuk=1
= max (A · u)∗ · (A · u)
kuk=1
= max u∗ · A∗ · A · u (4.41)
kuk=1
= max µ(A∗ · A)
i
= max σi2 .
i
kyk
σmin (A) ≤ ≤ σmax (A). (4.43)
kuk
83
Gioele Zardini Control Systems II FS 2018
u
y =A·u
Kochrezept:
Let A ∈ Cp×m be given:
(I) Compute all the eigenvalues and eigenvectors of the matrix
A∗ · A ∈ Cm×m . (4.45)
and sort them as
µ1 ≥ µ2 ≥ . . . ≥ µr > µr+1 = . . . = µm = 0 (4.46)
(II) Compute an orthogonal basis from the eigenvectors vi and write it in a matrix as
V = (v1 . . . vm ) ∈ Cm×m . (4.47)
(III) We have already found the singular values: they are defined as
√
σi = µi for i = 1, . . . , min{p, m}. (4.48)
By ordering them from the biggest to the smallest, we can then write Σ as
σ1 0 ... 0
Σ=
.. .. .. ∈ Rp×m , p < m (4.49)
. . .
σp 0 . . . 0
σ1
..
.
σm
Σ= ∈ Rp×m , p > m. (4.50)
0 ... 0
. ..
.. .
0 ... 0
84
Gioele Zardini Control Systems II FS 2018
(V) If r < p one has to complete the basis u1 , . . . , ur (with ONB from Gram-Schmid) to
obtain an orthogonal basis, with U orthogonal.
A = U · Σ · V ∗. (4.52)
A∗ · A = (U · Σ · V ∗ )∗ · (U · Σ · V ∗ )
= V · Σ∗ · U ∗ · U · Σ · V ∗
(4.53)
= V · Σ∗ · Σ · V ∗
= V · Σ2 · V ∗ .
This is nothing else than the diagonalization of the matrix A∗ · A. The columns of V
are the eigenvectors of A∗ · A and the σi2 the eigenvalues.
For U :
A · A∗ = (U · Σ · V ∗ ) · (U · Σ · V ∗ )∗
= U · Σ · V ∗ · V · Σ · U∗
(4.54)
= U · Σ∗ · Σ · U ∗
= U · Σ2 · U ∗ .
This is nothing else than the diagonalization of the matrix A · A∗ . The columns of U
are the eigenvectors of A · A∗ and the σi2 the eigenvalues.
• U −1 = U ∗ (because U is unitary).
• V −1 = V ∗ (because V is unitary).
Remark. Since the matrix A∗ ·A is always symmetric and positive semidefinite, the singular
values are always real numbers.
Remark. The Matlab command for the singular value decomposition is
[U,S,V]=svd
85
Gioele Zardini Control Systems II FS 2018
4.2.3 Intepretation
Considering the system depicted in Figure 19, one rewrite the system G as G = U ΣV ∗ .
The matrix V is orthogonal and contains the input directions of the system. The
matrix U is orthogonal as well and contains the output directions of the system
(unfortunate notation). It holds
G = U ΣV ∗
GV = U Σ (4.56)
Gvi = σi ui , ∀i,
which is similar to an eigenvalue equation. This can be rewritten as
kGvi k
σi = . (4.57)
kui k
For a unitary input, i.e. kuk2 = 1, one has
y1 = σ1 u1 ,
(4.58)
ym = σm um ,
where σm is the last (and hence the smallest) singular value. This can be interpreted
using Figure 21 and interpreting the circle as a unit circle.
Example 28. Let u be
cos(x)
u= (4.59)
sin(x)
with kuk = 1. The matrix M is given as
!
2 0
M= 1
. (4.60)
0 2
We need the maximum of kyk. In order to avoid square roots, one can use that the x that
maximizes kyk should also maximize kyk2 .
1
kyk2 = 4 · cos2 (x) + · sin2 (x) (4.62)
4
has maximum
dkyk2 1 !
= −8 · cos(x) · sin(x) + · sin(x) · cos(x) = 0
dx 2
(4.63)
π 3π
⇒ xmax = 0, , π, .
2 2
86
Gioele Zardini Control Systems II FS 2018
M∗ · M = M| · M
(4.65)
4 0 1 1
= ⇒ λi = 4, ⇒ σi = 2, .
0 41 4 2
As stated before, one can see that kyk ∈ [σmin , σmax ]. The matrix U has eigenvectors of
M · M | as coulmns and the matrix V has eigenvectors of M | · M as columns.
In this case
M · M | = M | · M,
hence the two matrices are equal. Since their product is a diagonal matrix one should
recall from the theory that the eigenvectors are easy to determine: they are nothing else
than the standard basis vectors. This means
1 0 2 0 1 0
U= , Σ= , V = . (4.66)
0 1 0 21 0 1
Interpretation:
Referring to Figure 22, let’s interprete these calculations. One can see that the maximal
amplification occurs at v = V (:, 1) and has direction u = U (:, 1), i.e. the vector u
is doubled (σmax ). The minimal amplification occurs at v = V (:, 2) and has direction
u = U (:, 2), i.e. the vector u is halved (σmin ).
1
0.5 u y =M ·u
1 2
87
Gioele Zardini Control Systems II FS 2018
88
Gioele Zardini Control Systems II FS 2018
λ1 = 16, λ2 = 9. (4.69)
89
Gioele Zardini Control Systems II FS 2018
90
Gioele Zardini Control Systems II FS 2018
In order to calculate the singular values, we have to compute the eigenvalues of H = G∗ ·G:
H = G∗ · G
1 −j+1 1 j+1
! !
−j+3 −j+3 j+3 j+3
= −j+1 1
· j+1 1
−j+3 −j+3 j+3 j+3
(4.74)
3 2
!
10 10
= 2 3
10 10
1 3 2
= · .
10 2 3
It follows
1
λ1 =
10 (4.76)
1
λ2 =
2
and so
r
1
σ1 =
10
≈ 0.3162.
r (4.77)
1
σ2 =
2
≈ 0.7071.
91
Gioele Zardini Control Systems II FS 2018
92
Gioele Zardini Control Systems II FS 2018
Solution.
• Let’s begin with matrix A. It holds
H = A∗ · A
1 0 1 2
= ·
2 1 0 1 (4.79)
1 2
= .
2 5
In order to find the eigenvalues of H we compute
1−λ 2
det(H − λ · I) = det
2 5−λ
(4.80)
= (1 − λ) · (5 − λ) − 4
= λ2 − 6λ + 1.
This means that the eigenvalues are
√
λ1 = 3 + 2 2
√ (4.81)
λ2 = 3 − 2 2.
The singular values are then
σ1 ≈ 2.4142
(4.82)
σ2 ≈ 0.4142.
• Let’s look at matrix B. It holds
F = B∗ · B
−j
= · j 1
1 (4.83)
1 −j
= .
j 1
In order to find the eigenvalues of F we compute
1 − λ −j
det(F − λ · I) = det
j 1−λ
= (1 − λ)2 − 1 (4.84)
= λ2 − 2λ
= λ · (λ − 2).
This means that the eigenvalues are
λ1 = 0
(4.85)
λ2 = 2.
The singular values are then
σ1 = 0
√ (4.86)
σ2 = 2.
93
Gioele Zardini Control Systems II FS 2018
where uz is the input zero direction and yz is the output zero direction. Furthermore,
it holds
kuz k2 = 1, kyz k2 = 1. (4.88)
Directions of poles
Assume a system G(s) has a pole at s = p. Then, it must holds
where up is the input pole direction and yp is the output pole direction. Furthermore,
it holds
kup k2 = 1, kyp k2 = 1. (4.90)
Remark. In both cases, if the zero/pole causes an unfeasible calculation, one consider
feasible variations, i.e. z + ε, p + ε.
the answer after a big amount of time is still an harmonic function with equal frequency
ω:
y∞ (t) = |P (j · ω)| cos(ω · t + ∠(P (j · ω))). (4.92)
One can generalize this and apply it to MIMO systems. With the assumption of p = m,
i.e. equal number of inputs and outputs, one excite a system with
µ1 · cos(ω · t + φ1 )
..
u(t) = · h(t) (4.93)
.
µm · cos(ω · t + φm )
and get
ν1 · cos(ω · t + ψ1 )
y∞ (t) = ..
. (4.94)
.
νm · cos(ω · t + ψm )
Let’s define two diagonal matrices
Φ = diag(φ1 , . . . , φm ) ∈ Rm×m ,
(4.95)
Ψ = diag(ψ1 , . . . , ψm ) ∈ Rm×m
94
Gioele Zardini Control Systems II FS 2018
With these one can compute the Laplace Transform of the two signals as:
Φ·s s
U (s) = e ω ·µ· . (4.97)
s2 + ω2
and
Ψ·s s
Y (s) = e ω ·ν· . (4.98)
s2 + ω2
With the general equation for a systems one gets
We then recall that the induced norm for the matrix of a linear transformation y = A · u
from 4.39. Here it holds
keΨ·j · νk
kP (j · ω)k = max
eΦ·j ·µ6=0 keΦ·j · µk
(4.100)
= max keΨ·j · νk.
keΦ·j ·µk=1
Since
keΦ·j · µk = kµk (4.101)
and
keΨ·j · νk = kνk. (4.102)
One gets
kνk
kP (j · ω)k = max
µ6=0 kµk
(4.103)
= max kνk.
kµk=1
Here one should get the feeling of why we introduced the singular value decomposition.
From the theory we’ve learned, it is clear that
and if kµk =
6 1
kνk
σmin (P (j · ω)) ≤ ≤ σmax (P (j · ω)). (4.105)
kµk
with σi singular values of P (j · ω). These two are worst case ranges and is important to
notice that there is no exact formula for ν = f (µ).
95
Gioele Zardini Control Systems II FS 2018
P (j · ω) = U · Σ · V ∗ . (4.106)
One can read out from this decomposition several informations: the maximal/minial gain
will be reached with an excitation in the direction of the column vectors of V . The
response of the system will then be in the direction of the coulmn vectors of U .
Let’s look at an example and try to understand how to use these informations:
Example 32. We consider a system with m = 2 inputs and p = 3 outputs. We are given
its singular value decomposition at ω = 5 rad
s
:
0.4167 0
Σ= 0 0.2631 ,
0 0
0.2908 0.9568
V = , (4.107)
0.9443 − 0.1542 · j −0.2870 + 0.0469 · j
−0.0496 − 0.1680 · j 0.1767 − 0.6831 · j −0.6621 − 0.1820 · j
U = 0.0146 − 0.9159 · j −0.1059 + 0.3510 · j −0.1624 + 0.0122 · j .
0.0349 − 0.3593 · j 0.1360 − 0.5910 · j 0.6782 + 0.2048 · j
For the singular value σmax = 0.4167 the eigenvectors are V (:, 1) and U (:, 1):
0.2908 0.2908 0
V1 = , |V1 | = , ∠(V1 ) = , (4.108)
0.9443 − 0.1542 · j 0.9568 −0.1618
−0.0496 − 0.1680 · j 0.1752 −1.8581
U1 = 0.0146 − 0.9159 · j , |U1 | = 0.9160 , ∠(U1 ) = −1.5548 . (4.109)
0.0349 − 0.3593 · j 0.3609 −1.4741
The reason for this difference stays in the phase deviation between y1 (t), y2 (t) and y3 (t).
The same analysis can be computed for σmin .
96
Gioele Zardini Control Systems II FS 2018
Find the parameters ϕ2 and µ2 such that for steady-state conditions the output signal
y1 (t)
(4.115)
y2 (t)
97
Gioele Zardini Control Systems II FS 2018
the output signal y(t), after a transient phase, will also be a harmonic signal and hence
have the form
ν1 cos(ωt + ψ1 )
y(t) = . (4.117)
ν2 cos(ωt + ψ2 )
As we have learned, it holds
One gets
ψ ·j ϕ ·j
e 1 0 ν1 P11 (jω) P12 (jω) e 1 0 µ1
ψ2 ·j · = · ϕ2 ·j · . (4.119)
0 e ν2 P21 (jω) P22 (jω) 0 e µ2
For y1 (t) = 0 to hold we must have ν1 = 0. In the given case, some parameters can be
easily copied from the signals:
µ1 = 1
ϕ1 = 0 (4.121)
ω = 1.
1 3
µ2 · · (cos(ϕ2 ) + sin(ϕ2 )) + =0
2 10 (4.123)
1 1
µ2 · · (sin(ϕ2 ) − cos(ϕ2 )) − = 0.
2 10
Adding and subtracting the two equations one can reach two better equations:
1
µ2 · sin(ϕ2 ) + =0
5 (4.124)
2
µ2 · cos(ϕ2 ) + = 0.
5
98
Gioele Zardini Control Systems II FS 2018
99
Gioele Zardini Control Systems II FS 2018
Example 34. A 2 × 2 linear time invariant MIMO system with transfer function
1 2
!
s+1 s+1
P (s) = s2 +1 1
(4.126)
s+10 s2 +2
Because we bought a cheap signal generator, we cannot know exactly the constants µ1,2
and ϕ1,2 . A friend of you just found out with some measurements, that the excitation
frequency is ω = 1 rad . The cheap generator, cannot produce signals with magnitude of
s p
µ bigger than 10, i.e. µ21 + µ22 ≤ 10. This works always at maximal power, i.e. at 10.
Choose all possible responses of the system after infinite time.
5 · sin(t + 0.114)
y∞ (t) = .
cos(t)
5 · sin(t + 0.114)
y∞ (t) = .
cos(2 · t)
sin(t + 0.542)
y∞ (t) = .
sin(t + 0.459)
19 · cos(t + 0.114)
y∞ (t) = .
cos(t + 1.124)
5 · cos(t + 0.114)
y∞ (t) = .
5 · cos(t)
10 · sin(t + 2.114)
y∞ (t) = .
11 · sin(t + 1.234)
100
Gioele Zardini Control Systems II FS 2018
Solution.
3 y∞ (t) = 5 · sin(t + 0.114) .
cos(t)
5 · sin(t + 0.114)
y∞ (t) = .
cos(2 · t)
sin(t + 0.542)
y∞ (t) = .
sin(t + 0.459)
19 · cos(t + 0.114)
y∞ (t) = .
cos(t + 1.124)
3 5 · cos(t + 0.114)
y∞ (t) = .
5 · cos(t)
3 10 · sin(t + 2.114)
y∞ (t) = .
11 · sin(t + 1.234)
Explanation
We have to compute the singular values of the matrix P (j · 1). These are
σmax = 1.8305
(4.128)
σmin = 0.3863.
101
Gioele Zardini Control Systems II FS 2018
Example 35. A 3 × 2 linear time invariant MIMO system is excited with the input
3 · sin(30 · t)
u(t) = . (4.130)
4 · cos(30 · t)
You have forgot your PC and you don’t know the transfer function of the system. Before
coming to school, however, you have saved the Matlab plot of the singular values of the
system on your phone (see Figure 23. Choose all the possible responses of the system.
0.5 · sin(30 · t + 0.314)
y∞ (t) = 0.5 · cos(30 · t) .
0.5 · cos(30 · t + 1)
4 · sin(30 · t + 0.314)
y∞ (t) = 3 · cos(30 · t) .
2 · cos(30 · t + 1)
0.1 · sin(30 · t + 0.314)
y∞ (t) = 0.1 · cos(30 · t) .
0.1 · cos(30 · t + 1)
0
y∞ (t) = 4 · cos(30 · t) .
2 · cos(30 · t + 1)
2 · cos(30 · t + 0.243)
y∞ (t) = 2 · cos(30 · t + 0.142).
2 · cos(30 · t + 0.252)
102
Gioele Zardini Control Systems II FS 2018
Solution.
0.5 · sin(30 · t + 0.314)
3 y∞ (t) = 0.5 · cos(30 · t) .
0.5 · cos(30 · t + 1)
4 · sin(30 · t + 0.314)
y∞ (t) = 3 · cos(30 · t) .
2 · cos(30 · t + 1)
0.1 · sin(30 · t + 0.314)
y∞ (t) = 0.1 · cos(30 · t) .
0.1 · cos(30 · t + 1)
0
3 y∞ (t) = 4 · cos(30 · t) .
2 · cos(30 · t + 1)
2 · cos(30 · t + 0.243)
3 y∞ (t) = 2 · cos(30 · t + 0.142).
2 · cos(30 · t + 0.252)
Explanation
From the given input one can read
√
kµk = 32 + 42 = 5. (4.131)
103
Gioele Zardini Control Systems II FS 2018
d) How could you compute the directions of the poles of the system? Note that you
don’t need to compute them by hand.
104
Gioele Zardini Control Systems II FS 2018
Solution.
a) In order to compute the poles of the transfer function, one needs to compute its
minors. First order minors are
1
1, , 1, 1. (4.134)
s−3
Second order minor is
1 s−4
1− = . (4.135)
s−3 s−3
The least common denominator (i.e. the pole-polynom) is (s − 3), from which it is
clear that the only pole of the system is π1 = 3.
c) With the method learned in class, in order to find the direction of the zero z1 = 4,
one needs to compute the singular value decomposition of P (4). It holds
1 1 ∗ 1 1
P (4) = , P = . (4.137)
1 1 1 1
λ1 = 4, λ2 = 0. (4.140)
2) The singular values are the positive square roots of the found eigenvalues. It
holds
σ1 = 2, σ2 = 0. (4.141)
105
Gioele Zardini Control Systems II FS 2018
4) The right singular vectors vi are the eigenvectors of M with respect to the
found eigenvalues λi . It holds
• Eλ1 = E4 : From (M − λ1 I) · x = 0 one gets the linear system of equations
−2 2 0
.
2 −2 0
Using the first row as reference and summing it to the second row, one
gets the form
−2 2 0
.
0 0 0
Since one has a zero row, one can introduce a free parameter. Let x1 =
s ∈ R. Using the first row, one can recover x2 = x1 . This defines the first
eigenspace, which reads
n 1 o
1
E4 = ⇒ v1 = (4.143)
1 1
106
Gioele Zardini Control Systems II FS 2018
which is the second column of matrix V (relative to the 0 singular value). In order
to find the output zero direction, we want to find a direction yz s.t.
yz∗ P (z) = 0 0 .
(4.158)
107
Gioele Zardini Control Systems II FS 2018
d) In order to use the same method used for the zeros, we consider a deviation ε = 0.001
from the pole. One can write
P (p1 + ε) = P (3 + 0.001)
(4.160)
1 1000
= .
1 1
where we took the directions relative to the biggest singular value (pole causes in-
crease of the value of the transfer function), i.e. first columns of U and V . Note that
in order to find this decomposition, the MATLABr command [U,V,D]=svd(P) has
been used.
For more informations and examples, please have a look at
http://karimpor.profcms.um.ac.ir/imagesm/354/stories/mul_con/multivariable_
lec4.pdf.
108
Gioele Zardini Control Systems II FS 2018
u y
G
Definition 12. A MIMO system y = Gu is said to be BIBO stable (i.e. bounded input
bounded output) if there exists a finite constant k ∈ R such that
Remark. A necessary and sufficient condition for BIBO stability is: the closed loop
transfer function
P (s) = C(sI − A)−1 B + D (4.164)
has all poles in the open left-half of the complex plane (all poles have real part strictly
smaller than 0).
x(t) ∈ Rn×1 , u(t) ∈ Rm×1 , y(t) ∈ Rp×1 , A ∈ Rn×n , B ∈ Rn×m , C ∈ Rp×n , D ∈ Rp×m .
(4.166)
Such a system is internally stable if for all initial conditions, and all bounded signals
injected at any place in the system, all states remain bounded for all future time.
Definition 13. The MIMO linear time invariant system described in Equation 4.165 is
BIBO stable if and only if C(sI − A)−1 B + D has all poles on the open left-half of the
complex plane (all poles have real part strictly smaller than 0).
Remark.
• Internal stability implies BIBO stability. The converse is not true.
• BIBO stability with controllability and observability imply internal stability.
This is a crucial concept: it is not sufficient for the input-output transfer function of
the system to be stable. In fact, internal transfer functions, related to the sensitivity
functions, must be stable as well to prevent pole/zero cancellations, which could hide
instabilities.
109
Gioele Zardini Control Systems II FS 2018
w1 e1
G(s)
K(s)
e2 w2
The necessary and sufficient condition for internal stability is: each of the four transfer
functions in relation 4.171 must be stable, i.e. smaller than 0 . Note: even if three of four
are stable, the system is not internally stable.
110
Gioele Zardini Control Systems II FS 2018
As it was done for the SISO case, one can show by using x(t) = eA·t · x0 that the stability
can be related to the eigenvalues of A through:
4.3.4 Examples
Example 37. You are given the feedback control loop depicted in Figure 26.
w1 e1
G(s)
K(s)
e2 w2
|
a) Derive the internal stability criterion, i.e. write the error vector e1 e2 as a
|
function of w1 w2 .
111
Gioele Zardini Control Systems II FS 2018
Solution.
b) It holds
−1
−1 1
(I − K(s)G(s)) = 1 − −
s+1
−1
s+2
=
s+1
s+1
= .
s+2 (4.179)
s+1
(I − K(s)G(s))−1 K(s) = − .
(s + 2)(s − 1)
s−1
(I − G(s)K(s))−1 G(s) = .
s+2
s+1
(I − G(s)K(s))−1 = .
s+2
112
Gioele Zardini Control Systems II FS 2018
One can notice hat the element in the first row, second column has a pole at s =
1 > 0, which causes the system to be not internally stable.
c) We start by computing the term in the first column, first row of Equation 4.178:
s−1 1 −1
−1 1 0 − s+1 −1 s−1
0
(I − K(s)G(s)) = − · 1
0 1 0 −1 0 s+1
1 1
−1
1 0 − s+1 − s+1
= − 1
0 1 0 − s+1
s+2 1 −1
= s+1 s+1 (4.181)
0 s+2
s+1
(s + 1)2 s+2 1
s+1
− s+1
= s+2
(s + 2)2 0 s+1
s+1 s+1
− (s+2)2
= s+2 s+1 .
0 s+2
113
Gioele Zardini Control Systems II FS 2018
It is easy to see, that the last two terms we computed contain a pole at s = 1 > 0,
which causes the system to be not internally stable.
114
Gioele Zardini Control Systems II FS 2018
R = B A · B A2 · B . . . An−1 · B ∈ Rn×(n·m) .
(4.185)
4.4.2 Observability
Observable: is it possible to reconstruct the initial conditions of all the states of a system
from the output y(t)?
A system is said to be completely observable, if the observability Matrix
C
C ·A
2
O = C · A ∈ R(n·p)×n . (4.186)
..
.
n−1
C ·A
115
Gioele Zardini Control Systems II FS 2018
(d) The poles of the system are π1 = 2 and π2,3 = 3. The zero of the system is ζ1 = 2.
Are there any zero-pole cancellations?
116
Gioele Zardini Control Systems II FS 2018
Solution.
Since all the three eigenvalues are bigger than zero, the system is Lyapunov unsta-
ble.
(b) The controllability matrix can be found with the well-known multiplications:
4 1 0 1 0
A · B = −1
2 0 · 0 0
0 0 2 0 1
4 0
= −1 0 ,
0 2
(4.191)
4 1 0 4 0
A2 · B = −1 2 0 · −1 0
0 0 2 0 2
15 0
= −6 0 .
0 4
117
Gioele Zardini Control Systems II FS 2018
(c) The observability matrix can be found with the well-known multiplications:
4 1 0
1 0 0
C ·A= · −1 2 0
0 1 1
0 0 2
4 1 0
= ,
−1 2 2
(4.193)
4 1 0
4 1 0
C · A2 = · −1 2 0
−1 2 2
0 0 2
15 6 0
= .
−6 3 4
(d) Although ζ1 = 2 and π1 = 2 have the same magnitude, they don’t cancel out.
Why? Since the system ist completely controllable and completely observable, we
have already the minimal realization of the system. This means that no more
cancellation is possible. The reason for that is that the directions of the two don’t
coincide. We will learn more about this in the next chapter.
118
Gioele Zardini Control Systems II FS 2018
with two inputs u1 (t) and u2 (t) and two outputs y1 (t) and y2 (t). The transfer function of
the system reads !
2s−1 s+2
(s2 +2s+5)·(s+2) s2 +2s+5
P (s) = 5 5
. (4.196)
s2 +2s+5 s2 +2s+5
(a) How many state variables are needed, in order to describe the input/output be-
haviour of the system?
(b) How many outputs are needed, in order to reconstruct the initial state x(0)?
(c) For every x(0) 6= 0 we have to ensure limt→∞ x(t) = 0. How many inputs are needed,
in order to ensure this condition?
119
Gioele Zardini Control Systems II FS 2018
Solution.
(a) We want to find the minimal order of the system, that is, the number of poles.
π1 = −2
(4.200)
π2,3 = −1 ± 2j.
The minimal order of the system is n = 3, since we have 3 poles. The given
description is already in the minimal realization.
Alternative
As alternative one can compute the controllability matrix and the observability
matrix as follows: for the controllability matrix it holds:
−2 0 0 1 0
A · B = 0 −2 5 · 0 0
0 −1 0 1 1
−2 0
= 5 5 .
0 0
(4.201)
−2 0 0 −2 0
A2 · B = 0 −2 5 · 5 5
0 −1 0 0 0
4 0
= −10 −10 .
−5 −5
120
Gioele Zardini Control Systems II FS 2018
121
Gioele Zardini Control Systems II FS 2018
λ1 = −2
(4.209)
λ2,3 = −1 ± 2j.
These eigenvalues are all asymptotically stable: this means that no matter which
input is given, the state will come back to its initial state.
Remark. If this wouldn’t be the case, we would proceed like in task (b): if one takes
into account just input u1 (t), one gets
1
B1 = 0 (4.210)
1
This controllability matrix has full rank and would satisfy the condition. You can
check yourselves that this wouldn’t be the case for u2 (t).
122
Gioele Zardini Control Systems II FS 2018
d(t) n(t)
r(t) e(t) u(t) v(t) η(t) y(t)
F (s) = I C(s) P (s)
−
123
Gioele Zardini Control Systems II FS 2018
Disturbance Rejection
Equation 4.274 shows that the effects of the disturbance D(s) on the output can be re-
jected by making the output sensitivity function SO (s) small. Since typically disturbances
occur at low frequencies, one needs to do that only for this frequency range. How can we
relate this to what we have learned about singular values? It must hold
σ̄ (SO (jω)P (jω)) = σ̄ (I + P (jω)C(jω))−1 P (jω)
Noise Attenuation
Similarly, Equation 4.274 shows that the effects of the noise N (s) on the output can be
attenuated by making the output sensitivity function SO (s) small. Since typically noise
occurs at high frequencies, one needs to do that only for this frequency range. It holds
σ̄ (SO (jω)) = σ̄ (I + P (jω)C(jω))−1
(4.222)
1.
124
Gioele Zardini Control Systems II FS 2018
Disturbance Rejection
Equation 4.225 shows that the effects of the disturbance D(s) on the input can be rejected
by making the input sensitivity function SI (s) small. Since typically disturbances occurr
at low frequencies, one needs to do that only for this frequency range. It must hold
Noise Attenuation
Similarly, Equation 4.225 shows that the effects of the noise N (s) on the input can be
attenuated by making the input sensitivity function SI (s) small. Since typically noise
occurs at high frequencies, one needs to do that only for this frequency range. It holds
Disturbance Rejection
Equation 4.230 shows that the effects of the disturbance D(s) on the error can be rejected
by making the output sensitivity function SO (s) small. Since typically disturbances occurr
at low frequencies, one needs to do that only for this frequency range. It must hold
125
Gioele Zardini Control Systems II FS 2018
Noise Attenuation
Similarly, Equation 4.230 shows that the effects of the noise N (s) on the error can be
attenuated by making the output sensitivity function SO (s) small. Since typically noise
occurs at high frequencies, one needs to do that for this frequency range and for reference
relevant frequencies (we have R(s) in the term). It holds
Remark. One can note that the reference tracking case resumes the other two cases.
(II) Sum:
σi (A) − σ̄(B) ≤ σi (A + B)
(4.234)
≤ σi (A) + σ̄(B).
In particular, it holds
σ(A) − 1 ≤ σ(I + A)
(4.235)
≤ σ(A) + 1.
(III) Product:
σ̄(AB) ≤ σ̄(A)σ̄(B)
(4.236)
σ(AB) ≤ σ(A)σ(B).
For disturbance rejection, using Equations 4.220, 4.226, 4.231 one can write
For noise attenuation, using Equations 4.222, 4.227, 4.232 one can write
σ̄(SO (jω)) 1
(4.239)
σ̄(SI (jω)C(jω)) 1.
126
Gioele Zardini Control Systems II FS 2018
With Equation 4.237 and σ(C(jω)P (jω)) > 1, σ(P (jω)C(jω)) > 1, one can write
1 1
≤ σ̄(SI (jω)) ≤
σ(C(jω)P (jω)) + 1 σ(C(jω)P (jω)) − 1
(4.241)
1 1
≤ σ̄(SO (jω)) ≤ .
σ(P (jω)C(jω)) + 1 σ(P (jω)C(jω)) − 1
This implies
Disturbance Rejection
Suppose that P (s) and C(s) are invertible.
• Output: It holds
This implies:
This implies
Noise Attenuation
Suppose that P (s) and C(s) are invertible.
127
Gioele Zardini Control Systems II FS 2018
This implies
• Input: It holds
This implies
where we used
Since
det(I + ∆TO ) ≈ 1, (4.254)
it holds
k∆TO k 1. (4.255)
This implies
128
Gioele Zardini Control Systems II FS 2018
Actuator Saturation
Using Figure 27, one can derive
U (s) = C(s)SO (s)R(s) − TI (s)D(s) − C(s)SO (s)N (s). (4.257)
With the defined conditions, it holds
U (s) ≈ C(s) (R(s) − N (s)) . (4.258)
In order to avoid the actuator saturation, the controller gain cannot be chosen too big,
i.e.
σ̄(C(jω)) ≤ M, ∀ω ∈ (ωhigh , ∞). (4.259)
4.5.7 Summary
The specifications we derived are resumed in Figure 28. Mathematically, we have found:
Disturbance Rejection
At frequency ω ∈ (0, ωlow ) holds
σ(C(jω)) 1,
σ(C(jω)P (jω) 1, (4.260)
σ(P (jω)C(jω)) 1.
Noise Attenuation
At frequency ω ∈ (ωhigh , ∞) holds
σ̄(C(jω)) ≤ M,
σ̄(C(jω)P (jω) 1, (4.261)
σ̄(P (jω)C(jω)) 1.
129
Gioele Zardini Control Systems II FS 2018
Modeling Uncertainty
Let P (s), C(s) be the nominal MIMO plant and an internally stabilizing controller, re-
spectively. Let’s define ∆(s), W1 (s), W2 (s) to be stable, rational and proper transfer
matrices. We call W1 (s) and W2 (s) weighting functions. ∆(s) is the modeling error. We
represent uncertainty as
W1 (s)∆(s)W2 (s). (4.263)
Let’s define Π(s) to be the set of perturbed plants such that P (s) ∈ Π(s).
Unstructured Uncertainty
d(t) n(t)
r(t) e(t) u(t) v(t) η(t) y(t)
F (s) = I C(s) Π(s)
−
Using Figure 29 and the Equations for internal stability, one can write
For unstructured uncertainty, nothing more can be said without writing the relation
between the uncertainty and the plant.
Additive Uncertainty
Theorem 4. (robust stability under additive uncertainty). Let
and let C(s) be a stabilizing controller for the nominal plant P (s). Then, the closed loop
system is well-posed (i.e., realizable) and internally stable for all k∆k∞ < 1 if and only if
kW2 (s)C(s)SO (s)W1 (s)k∞ ≤ 1.
130
Gioele Zardini Control Systems II FS 2018
Multiplicative Uncertainty
Theorem 5. (robust stability under multiplicative uncertainty). Let
and let C(s) be a stabilizing controller for the nominal plant P (s). Then, the closed loop
system is well-posed (i.e., realizable) and internally stable for all k∆k∞ < 1 if and only if
kW2 (s)TO W1 (s)k∞ ≤ 1.
Definition 14. Robust stability: Given a controller C, one determines whether the
system remains stable for all possible plants P in the uncertaint set.
where P (s) represents the perturbed plant and P0 (s) the nominal plant. Assuming a
controller which stabilizes the nominal plant, one has
In order to ensure stability even in the worst case scenario, it should hold
|1 + L(jω)| > |1 + L0 (jω)| − |L0 (jω)W (jω)∆(jω)|
|∆| ≤ 1 > |1 + L0 (jω)| − |L0 (jω)W (jω)| (4.270)
> 0.
From this it follows
W (jω)L0 (jω)
| | < 1. (4.271)
1 + L0 (jω)
What we want to do, is to be able to write such relations for MIMO systems.
131
Gioele Zardini Control Systems II FS 2018
y∆ (t) u∆ (t)
∆
G0 (s) = P0 (s)C(s)
w(t) z(t)
U∆ (s) Y∆ (s)
Note that represents the plant outputs and the plant inputs, where
Z(s) W (s)
Y∆ (s) = ∆(s) · U∆ (s). In order for the system to be internally stable, each element of
the matrix
M (s) N (s)
(4.273)
J(s) L(s)
must be stable itself. By looking at the transfer function which relates z(t) to w(t) one
has
Z(s) = J(s)Y∆ (s) + L(s)W (s)
(4.274)
= J(s)∆(s)U∆ (s) + L(s)W (s)
Furthermore, the first equation of the system reads
U∆ (s) = M (s)Y∆ (s) + N (s)W (s)
(4.275)
W (s) = N −1 [(I − M (s)∆(s)) U∆ (s)] .
By pluggin Equation 4.275 in Equation 4.274 one gets
Z(s) = J(s)∆(s)U∆ (s) + L(s)W (s)
= J(s)∆(s)U∆ (s)W −1 (s) + L(s) W (s)
(4.276)
= J(s)∆(s)U∆ (s)U∆ (s)−1 (I − M (s)∆(s))−1 N (s) + L(s) W (s)
The internal stability of the perturbed closed-loop system requires this transfer function
to be stable for all possible perturbations ∆(s). Since from above M (s), N (s), J(s), L(s)
are stable, Gzw (s) is stable for all stable (I − M (s)∆(s))−1 .
and let M be stable. Then, (I − M (s)∆(s))−1 and ∆ (I − M (s)∆(s))−1 are stable, for all
˜ if and only if kM k∞ < 1.
∆ ∈ ∆,
132
Gioele Zardini Control Systems II FS 2018
(I) Sufficiency: we show that (I − M (s)∆(s)) has no zeros ζ in the right-half plane.
In particular, we show
It holds
k(I − M (ζ)∆(ζ))xk2 > 0, ˜
x 6= 0, ∀∆ ∈ ∆
triangle inequality k(I − M (ζ)∆(ζ))xk2 ≥ kxk2 − kM (ζ)∆(ζ)xk2
induced matrix norm ≥ kxk2 − σ̄ (M (ζ)∆(ζ)) kxk2
≥ kxk2 − kM (ζ)k∞ k∆(ζ)k∞ kxk2
| {z }
≤1
> 0,
(4.280)
where in the last step we used the fact that σ̄(H(s)) ≤ kH(s)k∞ for stable and
causal H(s).
˜
(II) Necessity: we show by construction, that if σ̄(M (jω0 )) > 1, there exists a ∆ ∈ ∆
−1
such that (I − M ∆) is unstable, i.e.
In particular, we show
133
Gioele Zardini Control Systems II FS 2018
It holds then
σ1 0 ... 0 σ1−1 0 ... 0
0 σ2 ... 0 0 0 ... 0
∗ ∗
(I − M (jω0 )∆(jω0 )) = I − U .. .. V V .. U
.. ... .. .. . .
. . . . . . .
0 0 . . . σp 0 0 ... 0
1 0 ... 0
0 0 . . . 0
∗
= U I − .. .. U
.
. . .
. . . .
0 0 ... 0
0 1 ... 0
0 0 ... 0 ∗
= U .. .. U ,
.. . .
. . . .
0 0 ... 1
| {z }
I
(4.285)
1. Define the input and the output of each perturbation block ∆i as (u∆,i , y∆,i ) and let
| |
u∆ = u∆,1 . . . u∆,q , y∆ = y∆,1 . . . y∆,q , (4.286)
where q is the number of uncertainties in the loop.
2. Compute each component of the transfer matrix M as the map between the (i, j)-th
inputs and outputs to each uncertainty block, assuming ∆i = I ∀i = 1, . . . , q, i.e.
M1,1 (s) M1,2 (s) . . . M1,q (s)
.. .. ..
M2,1 (s)
. . . U∆,i
M (s) = . . ... . , Mi,j = . (4.287)
.. .. .. Y∆,j
3. The uncertainty block will be block diagonal in the MIMO case and diagonal in the
SISO one:
∆ = diag (∆1 , . . . , ∆q ) , k∆i k∞ < 1. (4.288)
Example 40. (Additive Uncertainty) You are given the system depicted in Figure 34
and the input output behaviour depicted in Figure 32, where
134
Gioele Zardini Control Systems II FS 2018
d(t) = 0 n(t) = 0
r(t) e(t) u(t) u(t) η(t) y(t)
C(s) Π(s)
−
u(t) η(t)
Π(s) = P0 (s) + W1 (s)∆(s)W2 (s)
In order to find the transfer function M , one rewrites the problem as depicted in Figure
33. It holds
U∆ (s) = W2 (s)U (s) (4.290)
and
U (s) = C(s)(R(s) − Y (s))
= −C(s) (P0 (s)U (s) + W1 (s)Y∆ (s))
= −C(s)W1 (s)Y∆ (s) − C(s)P0 (s)U (s) (4.291)
(I + C(s)P0 (s))U (s) = −C(s)W1 (s)Y∆ (s)
U (s) = −(I + C(s)P0 (s))−1 C(s)W1 (s)Y∆ (s),
u∆ (t) y∆ (t)
W2 (s) ∆(s) W1 (s)
135
Gioele Zardini Control Systems II FS 2018
Example 41. (Multiplicative Uncertainty) You are given the system depicted in
Figure 34 and the input output behaviour depicted in Figure 35, where
d(t) = 0 n(t) = 0
r(t) e(t) u(t) u(t) η(t) y(t)
C(s) Π(s)
−
u(t) η(t)
Π(s) = P0 (s)(I + W1 (s)∆(s)W2 (s))
In order to find the transfer function M , one rewrites the problem as depicted in Figure
36. It holds
u∆ (t) y∆ (t)
W2 (s) ∆(s) W1 (s)
P0 (s)
136
Gioele Zardini Control Systems II FS 2018
Wn (s)
d(t) = 0
ν
r(t) e(t) u(t) u(t) η(t) y(t)
C(s) P (s)
−
The same result is obtained considering the following loop and treating it as a robust
stability problem, as in Figure 38. One can then identify the transfer function
Y
M (s) = = SO (s)Wn (s) ⇒ kM k∞ . (4.298)
N
Before having a closer look to the problem, let’s recall what we have seen so far:
• Nominal Stability (NS): The controller internally stabilizes the (nominal) plant.
137
Gioele Zardini Control Systems II FS 2018
Wn (s) ∆p (s)
d(t) = 0
ν
r(t) e(t) u(t) u(t) η(t) y(t)
C(s) P (s)
−
• Robust Stability (RS) The controller internally stabilizes all plants parametrized
through model uncertainty.
• Robust Performance (RP): like NP, but for all plants within a given model set.
1. The controller C(s) stabilizes the closed loop system for all P ∈ Π with
Using the small gain theorem, a sufficient condition for robust performance is
kM k∞ < 1. (4.301)
138
Gioele Zardini Control Systems II FS 2018
∆r 0
0 ∆p
Definition 16. Mu: Given ∆, find the smallest (in terms of σ̄(∆)) ∆ which makes
Then:
1
µ(M ) = . (4.303)
σ̄(∆)
˜ then µ(M ) = 0.
If det(I − M (s)∆(s)) 6= 0 ∀∆ ∈ ∆,
˜ with
Theorem 7. (SSV Robust Stability) The M − ∆ system is stable for all ∆ ∈ ∆
k∆k∞ < 1 if and only if
sup µ(M (jω)) < 1. (4.304)
ω
Remark. Mu is a measure of the smallest perturbation that sends the system unstable.
139
Gioele Zardini Control Systems II FS 2018
Properties
(I)
µ(M ) ≥ 0. (4.305)
(II) It holds
˜ = {∆|∆ ∈ Cp×q , full matrix} ⇒ µ(M ) = σ̄(M ).
∆ (4.306)
(III) It holds
˜ = {λI|λ ∈ C} ⇒ µ(M ) = ρ(M ) = |λmax (M )|.
∆ (4.307)
because inf λ−1 (M ) = ρ(M ).
(IV) It holds
˜ = {diag(∆1 , . . . , ∆q )|∆i is complex} ⇒ ρ(M ) ≤ µ(M ) ≤ σ̄(M )
∆ (4.308)
(V) It holds
˜ = {diag(∆1 , . . . , ∆q )|∆i is complex} ⇒ µ(M ) = µ(D−1 M D), ∀D ∈ D, (4.309)
∆
Remark.
• SSV provides a necessary and sufficient condition for RS (and thus RP), provided
mu. This leads to a less conservative bound than the infinity norm condition.
• Computing mu is very tricky. There exist numerical approaches to refine upper and
lower bounds for mu.
|α|>0
< 1.
140
Gioele Zardini Control Systems II FS 2018
2. We find λmax (α), i.e. the biggest λ from det(A∗ (α)A(α) − λI) = 0. It holds
| {z }
I
kSk22
!
kW2 k22 kT k22 + α2
−λ αkW2 k22 kT k22 Wn + α1 kSk22 Wn
det(I) = det
αkW2 k22 kT k22 W̄n + α1 kSk22 W̄n α2 kW2 k22 kT k22 kWn k22 + kSk22 kWn k22 − λ
= α2 kW2 k42 kT k42 kWn k22 + kW2 k22 kW2 k22 kT k22 kSk22 kWn k22 − λkW2 k22 kT k22
2 2 2 2 kSk42 kWn k22 λ
+ kW2 k2 kT k2 kSk2 kWn k2 + 2
− 2 kSk22 − λα2 kW2 k22 kT k22 kWn k22
α α
− λkSk22 kWn k22 + λ2 − α2 kW2 k42 kT k42 kWn k22 − 2kW2 k22 kW2 k22 kT k22 kSk22 kWn k22
1
− 2 kSk42 kWn k22
α
2 2 2 2 2 2 2 2 2 1 2
= λ − λ kW2 k2 kT k2 + α kW2 k2 kT k2 kWn k2 + kSk2 kWn k2 + 2 kSk2 ,
α
(4.317)
141
Gioele Zardini Control Systems II FS 2018
kSk2
µ(M ) = λmax = kW2 k22 kT k22 + kW2 k22 kT k22 kWn k22 + kSk22 kWn k22
kW2 k2 kT k2 kWn k2
kW2 k2 kT k2 kWn k2
+ kSk22
kSk2
= kW2 k22 kT k22 + 2kSk2 kW2 k2 kT k2 kWn k2 + kSk22 kWn k22
= (kSk2 kWn k2 + kW2 k2 kT k2 )2
(4.320)
142
Gioele Zardini Control Systems II FS 2018
i.e. each input affects each output. For a decoupled system, one can e.g. write
Y1 (s) P11 (s) 0 U1 (s) P11 (s)U1 (s)
= = , (5.2)
Y2 (s) 0 P22 (s) U2 (s) P22 (s)U2 (s)
i.e. the system behaves like a union of non interacting SISO systems. Furthermore, if
one assumes a non-square system, for a general system P (s) ∈ Rl×n , one can meet the
following two cases:
1. Tall system(l > m): we have more outputs than inputs, i.e. not all outputs are
affected by an input. Which outputs are best controlled with which inputs?
2. Fat system(l < m): we have more inputs than outputs. How to distribute control
action over the inputs?
In the next section, we will introduce a systematic way to address this kind of problems.
143
Gioele Zardini Control Systems II FS 2018
where
P (s)−T = (P (s)T )−1 . (5.4)
and A. × A represents the element-wise, Shur multiplication (A.*A in Matlab). If
P (s) is not invertible (recall tall, fat and non inverbile square systems), one needs to
generalize the inverse with the Moore-Penrose Inverse. Recalling P (s) ∈ Rl×m one can
define two cases:
[RGA]ab ≈ 1 (5.8)
the numerator and the denominator are equal, i.e. SISO control is enough to bring ua at
yb .
Remark. The theory behind the relative-gain array goes far beyond the aim of this course
and one should be happy with the given examples. If however you are interested in this
topic, you can have a look here.
Let’s take the example of a 2 × 2 plant: in order to compute the first element (1, 1) of the
RGA(s) we consider the system depicted in Figure 41. We close with a SISO controller
C22 (s) the loop from y2 (t) to u2 (t) and try to compute the transfer function from u1 (t)
to y1 (t).
Everyone has his special way to decouple a MIMO system. I’ve always used this procedure:
starting from the general equation in frequency domain
Y1 (s) P11 (s) P12 (s) U1 (s)
= · , (5.9)
Y2 (s) P21 (s) P22 (s) U2 (s)
144
Gioele Zardini Control Systems II FS 2018
• We assume high controller gains, i.e. all other loops closed : P22 (s) · C22 (s) 1.
One gets
P11 (s) · (1 + P22 (s) · C22 (s)) − P12 (s) · C22 (s) · P21 (s)
lim
C22 (s)→∞ 1 + P22 (s) · C22 (s)
(5.14)
P11 (s) · P22 (s) − P12 (s) · P21 (s)
= .
P22 (s)
As stated before, the first element of the RGA is the division of these two. It holds
P11 (s)
[RGA]11 = P11 (s)·P22 (s)−P12 (s)·P21 (s)
P22 (s)
(5.15)
P11 (s) · P22 (s)
= .
P11 (s) · P22 (s) − P12 (s) · P21 (s)
Remark. As you can see, the definition of the element of the RGA matrix does not depend
on the chosen controller C22 (s). This makes this method extremely powerful.
By repeating the procedure one can try to find [RGA]22 . In order to do that one has to
close the loop from y1 (t) to u1 (t): the result will be exactly the same:
[RGA]11 = [RGA]22 . (5.16)
Let’s go a step further. In order to compute the element [RGA]21 , one has to close the
loop from y1 (t) to u2 (t) and find the transfer function from u1 (t) to y2 (t).
145
Gioele Zardini Control Systems II FS 2018
2. If one looks at RGA(s = 0) and the diagonal entries of the matrix are positive, SISO
control is possible.
4. The RGA is invariant to scaling, i.e. for every diagonal matrix Di it holds
y1 P11 P12 u1
y2 u2
P21 P22
−C22
146
Gioele Zardini Control Systems II FS 2018
Example 42. For a MIMO system with two inputs and two outputs just the first element
of the RGA matrix is given. This is a function of a system parameter p and is given as
1
[RGA(s)]11 = . (5.22)
ps2 + 2ps + 1
(b) For which values of p is the system for all frequencies ω ∈ [0, ∞) controllable with
two independent SISO control loops (one loop at the time)?
Now, you are given the following transfer function of another MIMO system:
1 s+2
P (s) = s s+11 . (5.23)
1 − s+1
(c) Use the computed matrix to see if for frequencies in the range ω ∈ [3, 10] rad/s the
system is controllable with two separate SISO controllers.
147
Gioele Zardini Control Systems II FS 2018
Solution.
(b) In order to use two independend SISO control loops, the diagonal elements of the
RGA matrix should be ≈ 1 and the anti diagonal elements should be ≈ 0. It’s easy
to see that this is the case for p = 0. In fact, if one sets p = 0 one gets
RGA(s) = I. (5.26)
Hence, independently of the frequency one has, i.e. ω ∈ [0, ∞), the control problem
can be solved with two independent SISO controllers.
[RGA(s)]11 = [RGA(s)]22
P11 (s) · P22 (s)
=
P11 (s) · P22 (s) − P12 (s) · P21 (s)
1
− s·(s+1)
= 1
− s·(s+1) − s+2
s+1
(5.27)
1
=
1 + s · (s + 2)
1
= 2
s + 2s + 1
1
= .
(s + 1)2
and
[RGA(s)]12 = [RGA(s)]21
= 1 − [RGA(s)]11
1
=1− (5.28)
(s + 1)2
s · (s + 2)
= .
(s + 1)2
148
Gioele Zardini Control Systems II FS 2018
(d) In order to evaluate the RGA matrix in this range, we have to express it with it’s
frequency dependence, i.e. s = jω. For the magnitudes it holds
|[RGA(jω)]11 | = |[RGA(jω)]22 |
1
= (5.29)
|jω + 1|2
1
= .
1 + ω2
and
|[RGA(jω)]12 | = |[RGA(jω)]21 |
1
= · |jω| · |jω + 2|
|jω + 1|2 (5.30)
√
ω · 4 + ω2
= .
1 + ω2
We can know insert the two limit values of the given range and get
and
|[RGA(j · 10)]11 | = |[RGA(j · 10)]22 |
1
=
101
= 0.01.
(5.32)
|[RGA(j · 10)]12 | = |[RGA(j · 10)]21 |
√
10 · 104
=
101
≈ 1.01.
In both cases the diagonal elements are close to 0 and the antidiagonal elements are
close to 1. This means that the system is diagonal dominant and SISO control
one loop at time is permitted. We just need to pay attention to what should be
controlled: since the antidiagonal elements are close to 1, we need to use u1 for y2
and u2 for y1 .
149
Gioele Zardini Control Systems II FS 2018
Example 43. Figure 42 shows a 2 × 2 MIMO system. Sadly, we don’t know anything
about the transfer functions Pij (s) but
Your boss wants you to use a one loop at the time approach as you see in the picture.
150
Gioele Zardini Control Systems II FS 2018
Solution.
(a) To check if the suggestion is correct let’s have a look at the RGA matrix: it holds
[RGA]11 = [RGA]22
P11 (s) · P22 (s)
=
P11 (s) · P22 (s) − P12 (s) · P21 (s)
= 1. (5.34)
[RGA]12 = [RGA]21
= 1 − [RGA]11
= 0.
since P12 (s) = 0. This means that the RGA matrix is identical to the identity
matrix, resulting in a perfect diagonal dominant system, which can be controlled
with the one loop at the time approach.
(b) Let’s analyze the signals from Figure 42. Since P12 (s) = 0, the output y1 is not
affected from u2 . Moreover, this means that the reference signal r2 , which influences
u2 , cannot affect the output y1 . The only reference that acts on both y1 and y2 is
r1 : directly through C1 (s) on y1 and with crosscouplings through P21 (s) on y2 .
(c) As usual we set to 0 the reference values we don’t analyze: here r2 = 0. Starting
from the general equation in frequency domain
Y1 (s) P11 (s) P12 (s) U1 (s)
= ·
Y2 (s) P21 (s) P22 (s) U2 (s)
(5.35)
P11 (s) 0 U1 (s)
= · .
P21 (s) P22 (s) U2 (s)
one can read
Y1 (s) = P11 (s) · U1 (s)
(5.36)
Y2 (s) = P21 (s) · U1 (s) + P22 (s) · U2 (s).
Since we want to relate r1 and y2 let’s express u1 as something we know.
Using Figure 42 one gets
R1 (s) · C1 (s) = U1 (s) + P11 (s) · C1 (s) · U1 (s)
R1 (s) · C1 (s) (5.37)
U1 = .
1 + P11 (s) · C1 (s)
Inserting this into the second equation one gets
R1 (s) · C1 (s)
Y2 (s) = P21 (s) · + P22 (s) · U2 (s). (5.38)
1 + P11 (s) · C1 (s)
One have to find an expression for U2 (s). To do that, we look at the second loop in
Figure 42 an see
R2 (s) ·C2 (s) − Y2 (s) · C2 (s) = U2 (s)
| {z }
=0 (5.39)
U2 (s) = −Y2 (s) · C2 (s).
151
Gioele Zardini Control Systems II FS 2018
R1 (s) · C1 (s)
Y2 (s) = P21 (s) · + P22 (s) · U2 (s)
1 + P11 (s) · C1 (s)
R1 (s) · C1 (s)
= P21 (s) · + P22 (s) · (−Y2 (s) · C2 (s))
1 + P11 (s) · C1 (s)
R1 (s) · C1 (s)
Y2 (s) · (1 + P22 (s) · C2 (s)) = P21 (s) ·
1 + P11 (s) · C1 (s)
P21 (s) · C1 (s)
Y2 (s) = ·R1 (s).
(1 + P11 (s) · C1 (s)) · (1 + P22 (s) · C2 (s))
| {z }
F (s)
(5.40)
152
Gioele Zardini Control Systems II FS 2018
Example 44. Figure 43 shows the structure of a MIMO system, composed of three
subsystems P1 (s), P2 (s) and P3 (s). It has inputs u1 and u2 and outputs y1 and y2 . The
153
Gioele Zardini Control Systems II FS 2018
Solution. One should think with matrix dimensions here. Let’s redefine the subsystem’s
matrices more generally:
11
P1 11
P1 (s) = 21 , P2 (s) = P2 P212 , P3 (s) = P311 P312 (5.42)
P1
This can be written in the general matrix for the transfer function:
11
P2 + P212 · P111 0
P (s) =
P311 · P121 P312
1 s+4 s−5
!
s+3
+ ·
s−5 s+3
0
= s+2 (5.44)
· 1
s+5 s+4
1
s+1
s+5
!
s+3
0
= s+2 1
.
(s+5)·(s+4) s+1
154
Gioele Zardini Control Systems II FS 2018
Example 45. Figure 44 shows the structure of a MIMO system, composed of two sub-
systems P1 (s), P2 (s). It has inputs u1 and u2 and outputs y1 and y2 . The subsystem P1 (s)
155
Gioele Zardini Control Systems II FS 2018
Solution. First of all, we compute the transfer function in frequency domain of the first
subsystem P1 (s). It holds
P1 (s) = C1 · (s · I − A1 )−1 · B1 + D1
−1
0 2 s+3 0 1 0 0 1
= · · +
3 1 −2 s − 1 2 1 0 0
0 2 1 s−1 0 1 0 0 1
= · · · +
3 1 (s + 3) · (s − 1) 2 s+3 2 1 0 0
1 0 2 s−1 0 0 1 (5.47)
= · · +
(s + 3) · (s − 1) 3 1 2s + 8 s + 3 0 0
1 4s + 16 (s + 1)(s + 3)
= ·
(s + 3) · (s − 1) 5s + 5 s+3
4s+16 s+1
!
(s+3)·(s−1) s−1
= 5s+5 1
.
(s+3)·(s−1) s−1
One should think with matrix dimensions here. Let’s redefine the subsystem’s matrices
more generally: 11
P1 P112 11
P1 (s) = 21 22 , P2 (s) = P2 P212 . (5.48)
P1 P 1
Together with the structure of the system one gets
This can be written in the general matrix for the transfer function:
11
P2 + P111 · P212 P112 · P212
P (s) =
P121 P122
= ... (5.50)
s+7 s+1
!
(s+3)·(s−2) (s+4)(s−2)
= 5s+5 1
.
(s+3)·(s−1) s−1
156
Gioele Zardini Control Systems II FS 2018
Example 46. The system in Figure 45 can be well controlled with two separate SISO
controllers.
True.
False.
157
Gioele Zardini Control Systems II FS 2018
Solution.
3 True.
False.
Explanation:
One can observe that the input u2 affects only the output y2 . This means that the transfer
function matrix has a triangular form and hence, that the RGA matrix is identical to
the identity matrix: this means that we can reach good control with two separate SISO
controllers.
5.1.3 Q Parametrization
Recalling the standard control Loop repicted in Figure 46, one can write
d(t) n(t)
r(t) e(t) u(t) v(t) η(t) y(t)
F (s) = I C(s) P (s)
−
In order for the system to be internally stable, TO (s), SO (s)P (s), SI (s)C(s) and TI (s)
must be stable. Ideally, we would like to translate this properties on direct consequences
for C(s). However, relations are not linear and it is not obvious how to find direct
translations. One defined
158
Gioele Zardini Control Systems II FS 2018
and
(I + C(s)P (s))−1 = (I + C(s)P (s) − C(s)P (s))(I + C(s)P (s))−1
= (I + C(s)P (s))(I + C(s)P (s))−1 − C(s)P (s)(I + C(s)P (s))−1
= I − Q(s)P (s).
(5.54)
It follows
TO (s) = (I + P (s)C(s))−1 P (s)C(s)
= P (s)C(s)(I + P (s)C(s))
= P (s)Q(s).
(5.55)
SO (s)P (s) = (I − P (s)Q(s))P (s)
SI (s)C(s) = Q(s)
TI (s) = Q(s)P (s).
Theorem 8. Q internal stability: Let P (s) be a stable plant of a negative feedback
system, then the closed loop system is internally stable if and only if Q(s) is stable.
This makes the tuning of the controller extremely easier: the sensitivity functions depend
linearly on Q. Moreover, it holds:
• Supposing that the plant is stable: Q(s) can be any transfer matrix that satisfies
the definition.
• If only proper controllers are taken into account, then Q(s) must be proper.
• Finding a Q(s) is equivalent to finding the controller C(s).
• As long as Q(s) is stable, it can vary freely and internal stability will be guaranteed.
Even if Q(s) maps to an unstable controller C(s).
• Starting from the formula for Q(s), one can write
C(s) = (I − Q(s)P (s))−1 Q(s) = Q(s)(I − P (s)Q(s))−1 . (5.56)
159
Gioele Zardini Control Systems II FS 2018
Remark. Note that the controller C(s) can be defined with the orange region in Figure
47.
Analysis
By trying to relate the output signal y(t) to the other signals available in the loop, one
can write
Y (s) = N (s) + η(s)
= N (s) + P (s)V (s)
= N (s) + P (s) (D(s) + U (s))
= N (s) + P (s)D(s) + P (s)Q(s)E(s)
= N (s) + P (s)D(s) + P (s)Q(s) (R(s) − I(s))
= N (s) + P (s)D(s) + P (s)Q(s)R(s) − P (s)Q(s) (Y (s) − Y0 (s))
= N (s) + P (s)D(s) + P (s)Q(s)R(s) − P (s)Q(s)Y (s) + P (s)Q(s)P0 (s)U (s)
= N (s) + P (s)D(s) + P (s)Q(s)R(s) − P (s)Q(s) (N (s) + P (s)V (s)) + P (s)Q(s)P0 (s)U (s)
= (I − P Q) N + P (I − QP ) D + P Q R + P Q (P − P0 ) U,
| {z } | {z } |{z}
SO (s) P SI (s) TO (s)
(5.58)
where in the last line we dropped the s dependency for simplicity reasons. In the case
where P (s) = P0 (s) and Q(s) = P −1 (s), one gets
d(t) n(t)
r(t) e(t) u(t) v(t) η(t) y(t)
F (s) = I Q(s) P (s)
−
y0 (t) −
P0 (s)
C(s) i
160
Gioele Zardini Control Systems II FS 2018
water by turning the temperature controller; the water becomes too hot and so one turns
it on the other side to have colder water and so on, resulting in a non optimal strategy.
Moreover, the D part of the controller is practically useless7 . What does the expression
substantial delays mean? As indicative range one can say that it is worth using predictive
control if
T
> 0.3, (5.60)
T +τ
where T is the delay and τ is the time constant of the system. Other prerequisites are
ŷr
P̂r (s) e−T̂ ·s −
r e u y
−
Q(s) Pr (s) e−s·T
−
P̂r (s)
−
e−s·T̂
If the system has big delays, one can assume that it is possible to write the delay element
and the nondelayed plant as a product in the frequency domain: that’s what is done in
7
Taking the derivative of a delay element doesn’t help to control it
161
Gioele Zardini Control Systems II FS 2018
the upper right side of Figure 48. This means that the transfer function u(t) → y(t) can
be written as
P (s) = Pr (s) · e−sT . (5.61)
Main Idea:
As long as we have no disturbance d(t) (i.e. d(t) = 0) and our model is good enough
(this means Pr (s) = P̂r (s), T = T̂ )8 , we can model a non delayed plant and get the non
delayed output ŷr (t) (one can see this on the lower right side of Figure 48). The feedback
signal results from the sum of ŷr (t) and the correction signal .
Analysis
The controller of the system is the transfer function e(t) → u(t) , which can be computed
as
U (s) = Q(s) E(s) − P̂r (s) U (s) − U (s)e−sT̂
(5.62)
= Q(s)E(s) − Q(s)P̂r (s) 1 − e−sT̂ U (s),
If one assumes as stated, that the model is good enough s.t. Pr (s) = P̂r (s), T = T̂ , one
gets
L(s)
T (s) =
1 + L(s)
Q(s)·Pr (s)·e−s·T
1+Q(s)·Pr (s)·(1−e−s·T )
= Q(s)·Pr (s)·e−s·T
1 + 1+Q(s)·P r (s)·(1−e
−s·T )
162
Gioele Zardini Control Systems II FS 2018
Remark.
• This result is very important: we have shown that the delay cannot be completely
eliminated and that every tranfer function (here T (s) but also S(s)) will have the
same delay as the plant P (s).
– Very fast.
– Same Robustness.
163
Gioele Zardini Control Systems II FS 2018
5.3 Examples
Example 47. Consider the control problem depicted in Figure 50, designed for the stable,
linear, SISO system P0 (s). Let’s consider w(t) to be the vector which describes the inputs
to the system (disturbances and reference), z(t) to be the vector which describes all the
interesting signals for control, u(t) to be the control signal from C(s) and y(t) to be signal
used by the controller.
d(t) n(t)
w(t) z(t)
P (s)
u(t) y(t)
C(s)
a) Choose
d(t) x(t)
w(t) = , z(t) = . (5.66)
n(t) v(t)
Derive the transfer function P (s) such that the system can be rewritten in the form
depicted in Figure 51.
Hint: P (s) can be rewritten in terms of the contributions of its signals, i.e.
Pzw (s) Pzu (s)
P (s) = , (5.67)
Pyw (s) Pyu (s)
where Pij (s) is the transfer function between signal i and signal j.
b) We denote the closed-loop system (i.e. from w to z) H(s). Show that
H(s) = Pzw (s) + Pzu (s)C(s) (1 − Pyu (s)C(s))−1 Pyw (s). (5.68)
c) Determine H(s) for the system depicted in Figure 50 and rewrite it in terms of the
output sensitivity function SO (s) = (1 − Pyu (s)C(s))−1 and output complementary
sensitivity function TO (s) = −(1 − Pyu (s)C(s))−1 Pyu (s)C(s).
Hint: Use the formula you derived in b).
164
Gioele Zardini Control Systems II FS 2018
True.
False.
165
Gioele Zardini Control Systems II FS 2018
Solution.
a) As a first step, one needs to identify the dimensions of the transfer functions in P (s)
(from the hint):
Referring to the given flow diagram, one can write the relations for V (s):
166
Gioele Zardini Control Systems II FS 2018
b) It holds
and
Y (s) = Pyu (s)U (s) + Pyw (s)W (s)
= Pyu (s)C(s)Y (s) + Pyw (s)W (s) (5.86)
⇒ Y (s) = (1 − Pyu (s)C(s))−1 Pyw (s)W (s).
With these two informations, we compute the relation between Z(s) and W (s):
167
Gioele Zardini Control Systems II FS 2018
Note that each element of H(s) is linear in Q(s). This simplifies the tuning of the
controller.
e)
3 True.
False.
Solution: Since Q(s) and P0 (s) are both asymptotically stable, the closed-loop
system is internally stable.
Remark. Theorem (Q internal stability): let P (s) be a stable plant of a negative
feedback system, then the closed loop system is internally stable if and only if Q(s)
is stable.
168
Gioele Zardini Control Systems II FS 2018
6 State Feedback
Motivation: Each control strategy we analyzed so far, was based on output feedback.
In fact, the main analysis has been based on the fact that system outputs are available
through measurements. Imagine now to have the states of the system available. Would the
control problem benefit from this new information? Intuitively, outputs are nothing else
than a linear combination of the states (one can always write this through the dynamics
of the system), hence contain less information.
6.1 Concept
The big difference to what we have seen so far, is that we are looking at a continuous
time control system, which operates in time domain and no more in frequency domain.
The basic state feedback control structure is depicted in Figure 52. The basic idea is: we
have the dynamics in the loop, with the input u(t) and the output y(t). We negatively
feedback the state x(t) with a controller K and add to a reference (or a multiple of it,
kr ). In words, we try to keep the state where we want it to be. Assuming for simplicity
D = 0 (the same analysis can be performed), one gets
We get a new closed loop matrix Acl , i.e., state feedback affects the poles of the closed
loop transfer function.
6.2 Reachability
A key property of a control system is reachability. Which set of points in the state space
of the system can be reached through the choice of a specific control input? Reachability
plays a central role in deciding if state feedback is a good strategy for the control of a
specific dynamic system. Let’s assume that a dynamic system of the form
d
x(t) = Ax(t) + Bu(t). (6.3)
dt
169
Gioele Zardini Control Systems II FS 2018
Definition 18. A linear system is reachable if for any x0 , xf ∈ Rn , there exists a T > 0
and u(t) : [0, T ] → R such that the corresponding solution satisfies x(0) = x0 and x(T ) =
xf ∈ Rn .
(A, B, C, 0) , (6.6)
such that
P (s) = C(sI − A)−1 B. (6.7)
A possible solution is the reachable canonical form:
0m Im 0m ... 0m 0m
0m 0m Im ... 0m 0m
.. . .
A= . . . . . , B = ...
. 0 m . .
(6.8)
0m 0m 0m ... Im 0m
−a0 Im −a1 Im −a2 Im . . . −an−1 Im Im
C = B0 B1 . . . Bn−2 Bn−1 ,
Theorem 10. Let A and B be the dynamics of a reachable system. Then there exists
a transformation z(t) = T x(t) such that in the transformed coordinates the dynamics
matrices are in reachable canonical form and the characteristic polynomial for A is given
by
det(sI − A) = sn + a1 sn−1 + . . . + an−1 s + an . (6.9)
170
Gioele Zardini Control Systems II FS 2018
The aim of the exercise, is to find the reachable canonical form of the system.
d) Compute the reachability matrix for the general form you found in a).
e) Find a transformation z(t) = T x(t) which brings the original system in the reachable
form.
171
Gioele Zardini Control Systems II FS 2018
Solution.
a) We wish to find a transformation which converts the system into the reachable
canonical form:
0 1 0
à = , B̃ = . (6.11)
−a1 −a2 1
b) A and à must have the same eigenvalues (they describe the same system). It holds
α−λ ω
det(A − λI) = det
−ω α − λ
= α2 − 2λα + λ2 + ω 2
(6.12)
−λ 1
det(Ã − λI) = det
−a1 −a2 − λ
= λ2 + λa2 + a1 .
a1 = α 2 + ω 2
(6.13)
a2 = −2α
c) The reachability matrix for the original system can be computed as follows:
0
B= ,
1
(6.14)
α ω 0 ω
AB = = .
−ω α 1 α
This implies
0 ω
R= . (6.15)
1 α
d) The reachability matrix for the general form can be computed as follows:
0
B̃ = ,
1
(6.16)
0 1 0 1
ÃB̃ = = .
−a1 −a2 1 −a2
This implies
0 1
R̃ = . (6.17)
1 −a2
172
Gioele Zardini Control Systems II FS 2018
Since R contains
B̃ = T B
(6.19)
ÃB̃ = T AT −1 T B = T AB,
which leads to
T = R̃R−1
1 0 1 α −ω
=−
ω 1 −a2 −1 0
(6.21)
1 1 0
=
ω −α − a 2 ω
1
0
= ωα .
ω
1
173
Gioele Zardini Control Systems II FS 2018
But is it always possible to find a solution for the pole placement problem?
Theorem 11. The problem of pole placement has a solution if and only if the system is
reachable.
• R is the reachability matrix. Note that this must be invertible (hence, the system
is reachable).
Check in the Problem Set for the derivation of the Ackermann’s formula.
174
Gioele Zardini Control Systems II FS 2018
Example 49. Your task is to keep a space shuttle in its trajectory . The deviations from
the desired trajectory are well described by
where x1 (t) is the position of the space shuttle and x2 (t) is its velocity. Moreover, u(t)
represents the propulsion. The position and the velocity are known for every moment and
for this reason we can use a state-feedback regulator. You want to find a state feedback
controller using pole placement. The specifications for the system are
175
Gioele Zardini Control Systems II FS 2018
Solution
a) Overshoot or in general oscillations, are due to the complex part of some poles. The
real part of these poles is given by the decrease function of the error. Since the
system must have two poles (A is 2 × 2), it holds
π1 = π2 = −3. (6.27)
A − B · K. (6.28)
We have to choose K such that the eigenvalues of the state feedback matrix are
both −3. The dimensions of K must make the matrix multiplication with B and
the subtraction with A feasible. It holds K ∈ C1×2 . It holds
0 1 0
A−B·K = − · k1 k2
0 0 1
0 1 0 0
= − (6.29)
0 0 k1 k2
0 1
= .
−k1 −k2
k22
k1 =
4 (6.31)
= 9.
where R is the system reachability matrix and p∗cl (A) is the desired closed loop
characteristic polynomial evaluated at s = A. For our system it holds
0
B=
1
0 1 0 1
AB = = (6.34)
0 0 1 0
−1 0 1
⇒R=R = .
1 0
176
Gioele Zardini Control Systems II FS 2018
177
Gioele Zardini Control Systems II FS 2018
6.4 LQR
6.4.1 Motivation
In previous sections, we introduced the concept of state feedback, with the idea of using
the states of the system and its dynamics to synthesize a controller using desired pole-
placement. This week we introduce Linear Quadratic control (LQ) and the special case
of the Linear Quadratic Regulator (LQR). The concept behind this control strategy has
a key role for control theory and is worth a detailed explanation.
Moreover, pole placement has some drawbacks:
• Does not work well with model uncertainty.
• Does not allow specific tuning of desired trade-offs (e.g. cost vs. performance).
z(t) ∈ Rk
r(t) e(t) u(t) ẋ(t) = Ax(t) + Bu(t)
KLQR
- y(t) = Cx(t) + Du(t)
x(t)
178
Gioele Zardini Control Systems II FS 2018
Definition 19. A pair (A, C) is observable if and only if rank(O) = n = dim(A), where
C
CA
O = .. . (6.43)
.
CAn−1
Definition 20. A pair (A, C) is detectable if all the unobservable modes are stable.
Eigenvalue Test
A real, symmetric matrix is (semi)-positive definite if and only if it has all (non-negative)
positive eigenvalues.
Sylvester’s Criterion
An symmetric matrix M ∈ Rm×m is positive definite if and only if all the upper-left i × i
submatrices (principal minors), i ∈ 1, . . . , m have positive determinant. In the case of
a b
A= , (6.46)
b d
1. a > 0.
2. ad − b2 > 0.
179
Gioele Zardini Control Systems II FS 2018
where Q̄, R̄ are symmetric and positive definite, ρ ∈ R+ , u(t) ∈ Rm×1 , z(t) ∈ Rk×1 ,
x ∈ Rn×1 and
R = F | Q̄F + ρR̄, R ∈ Rm×m
Q = E | Q̄E, Q ∈ Rn×n (6.48)
N = E | Q̄F.
and
6 0
R= . (6.51)
0 10
6.4.5 Solution
If
• The system (A, B) is stabilizable (all unstable modes are reachable). Intuition: this
is necessary for state feedback to work (stabilizable means that the unstable modes
must be controllable). Controllability is the same as reachability for continuous
time systems).
180
Gioele Zardini Control Systems II FS 2018
then
uLQR (t) = − R−1 (N + P B)| x(t), (6.52)
| {z }
KLQR
where P is the real, symmetric, positive definite solution of the algebraic Riccati
equation
(N + P · B) · R−1 · (N | + B | · P ) − P · A − A| · P − Q = 0. (6.53)
(N + P · B) · R−1 · (N | + B | · P ) − P · A − A| · P − Q = 0
(N R−1 + P BR−1 )(N | + B | P ) − P · A − A| · P − Q = 0
N R−1 N | + N R−1 B | P + P BR−1 N | + P BR−1 B | P − P · A − A| · P − Q = 0
− (A − BR−| N | )| P − P (A − BR−1 N | ) +P (BR−1 B | ) P − (Q − N R−1 N | ) = 0.
| {z } | {z } | {z } | {z }
Ã| Ã R̃ Q̃
(6.54)
with the unknown quadratic matrix P . Note that this equation can be rewritten as
à R̃ I
P −I ∗ = 0, (6.56)
−Q̃ −Ã P
| {z }
H∈R2n×2n
where H is the hamiltonian matrix. In order to find the solution of the ARE, we assume
two things:
1. H has no eigenvalues on the imaginary axis, i.e. it wil have n eigenvalues in the
LHP and n in the RHP. Let the subspace spanned by the eigenvectors associated
to the stable eigenvalues (i.e. in the LHP) be
X1
XH = Im , (6.57)
X2
where X1 , X2 ∈ Cn×n .
2. X1 is invertible.
181
Gioele Zardini Control Systems II FS 2018
If the two assumptions are met, one says that the Hamiltonian belongs to the domain of
the Riccati operator, i.e. H ∈ dom(Ric). With these two assumptions, the solution of the
ARE can be computed as
P = X2 X1−1 . (6.58)
Remark. The ARE has in general more than one solution, but only one is stabilizing, i.e.
it makes the closed loop asymptotically stable (see assumption before).
Theorem 12. H ∈ dom(Ric) if there exists symmetri matrices P, H ∈ Rn×n with stable
H such that
X1 X1
H = H, (6.59)
X2 X2
where
c) The matrix à + R̃P is stable (all eigenvalues are in the open LHP).
182
Gioele Zardini Control Systems II FS 2018
6.4.7 Examples
Example 51. You have to design a LQ regulator for a plant with 2 inputs, 3 outputs
and 6 state variables.
183
Gioele Zardini Control Systems II FS 2018
Solution.
(a) One can find the solution by analyzing the meaning of the matrices:
• Since we are given 6 states variables, the matrix A should have 6 rows and 6
columns, i.e. A ∈ R6×6 .
• Since we are given 2 inputs, the matrix B should have 2 columns and 6 rows,
i.e. B ∈ R6×2 .
• Since we are given 3 outputs, the matrix C should have 6 columns and 3 rows,
i.e. C ∈ R3×6 .
• Since we are given 2 inputs and 3 outputs, the matrix D should have 2 columns
and 3 rows, i.e. D ∈ R3×2 .
(b) Since we are dealing with a system with 2 inputs and 3 outputs, P (s) ∈ R3×2 .
Moreover, P (s) should have the same dimensions of D because of its formula.
(c) From the formulation of Q one can easily see that its dimensions are the same of
the dimensions of A, i.e. Q ∈ R6×6 .
(d) From
u(t) = −K · x(t).
we can see that K should have 6 columns and 2 rows, i.e. K ∈ R2×6 .
184
Gioele Zardini Control Systems II FS 2018
185
Gioele Zardini Control Systems II FS 2018
Solution.
a) Using quadratic forms, one can identify Q̃ and R̃ to be (using the null matrix for
N)
7 0
Q= (6.63)
0 3
and
1
R= . (6.64)
4
The state-space description of the system can be re-written in standard form as
ẋ1 (t) 0 3 x1 (t) 0
= + 1 u(t)
ẋ2 (t) 3 −2 x2 (t) 2
| {z } | {z }
A
B (6.65)
7
x1 (t)
y(t) = 4 3 + |{z}
0 u(t).
| {z } x2 (t)
D
C
In order to find the controller K, one has to compute the symmetric, positive definite
solution of the Riccati equation related to this problem. First, one has to look at
the form that this solution should have. Here B ∈ R2×1 . This means that since
Φ = Φ| we are dealing with Φ ∈ R2×2 of the form
ϕ1 ϕ2
Φ= . (6.66)
ϕ2 ϕ3
Hence, one gets 3 equations (two elements are equal because of symmetry):
ϕ22 − 6 · ϕ2 − 7 = 0 (I)
ϕ2 · ϕ3 − 3 · ϕ1 + 2 · ϕ2 − 3 · ϕ3 = 0 (II) (6.68)
ϕ23 − 6 · ϕ2 + 4 · ϕ3 − 3 = 0 (III).
(a) ϕ1 > 0.
186
Gioele Zardini Control Systems II FS 2018
Since we cannot discard a specific value, we pursue with ϕ2,1 = −1 and ϕ2,2 = 7:
ϕ23 + 6 + 4ϕ3 − 3 = 0
(6.70)
ϕ23 + 4ϕ3 + 3 = 0,
and
√
−4 ± 4
ϕ3 =
2 (6.71)
= {−3, −1}.
In order for these two values to fulfill the second Sylvester condition, it should hold
ϕ1 < 0, which violates the first condition. For this reason this is not a possible
choice.
Case ϕ2,1 = 7:
ϕ23 − 42 + 4ϕ3 − 3 = 0
(6.72)
ϕ23 + 4ϕ3 − 45 = 0,
and
√
−4 ± 196
ϕ3 =
2 (6.73)
= {−9, 5}.
ϕ3 = 5 is the only value which does not violate the two Sylverster’s conditions.
Plugging the values into Equation (II) one gets
35 − 3ϕ1 + 14 − 15 = 0
34 (6.74)
ϕ1 = .
3
The solution of the Riccati equation hence is
34
7
Φ= 3 . (6.75)
7 5
187
Gioele Zardini Control Systems II FS 2018
K = R−1 B | Φ
34
1
7
=4· 0 2 · 3 (6.76)
7 5
= 14 10 .
• (A, B) stabilizable (all unstable modes are reachable). The reachability matrix
for this pair
R = B AB
0 32 (6.77)
= 1
2
−1
9 −6
In order to use the Hamiltonian method, one needs to build the Hamiltonian matrix
à R̃
H= , (6.79)
−Q̃ −Ã|
where
à = A − BR−1 N |
R̃ = −BR−1 B | (6.80)
−1 |
Q̃ = Q − N R N .
à = A.
0 1 1
R̃ = − 1 1 0 2
2 4
(6.81)
0 0
= .
0 −1
Q̃ = Q.
188
Gioele Zardini Control Systems II FS 2018
Since we only care about stable eigenvalues (in LHP), we compute the eigenvectors
for λ2 = −3 and λ4 = −4.
It holds:
189
Gioele Zardini Control Systems II FS 2018
3 3 0 0 0
0 −2 0 −1 0
.
0 0 3 − 13 0
2
0 0 0 0 0
Since one has one zero row, one can introduce a free parameter. Let x4 = s,
then x3 = 13
6
s, x2 = − 2s , x1 = 2s , s ∈ R. This defines the first eigenspace,
which is (multiplying everything by 6)
3
n −3 o
E−3 = 13 .
(6.85)
6
0 −3 −3 6 0
Using the second row as reference and subtracting the correct multiples of it
from the other rows, one gets the form
4 3 0 0 0
0 −1 0 −4 0
0 0 16 −96 0 .
0 0 0 0 0
Since one has one zero row, one can introduce a free parameter. Let x4 = s,
then x3 = 6s, x2 = −4s, x1 = 3s, s ∈ R. This defines the second eigenspace,
which is (multiplying everything by 6)
3
n −4 o
E−4 = 6 .
(6.86)
1
190
Gioele Zardini Control Systems II FS 2018
It holds
Φ = X2 X1−1
−1
6 13 3 3
=
1 6 −4 −3
(6.88)
1 6 13 −3 −3
=
3 1 6 4 3
34
7
= 3 ,
7 5
det((A − B · K) − λ · I) = 0
(6.90)
λ2 + 7λ + 12 = 0
191
Gioele Zardini Control Systems II FS 2018
1 A = [1 0 0 0; 1 1 0 0; 1 1 1 0; 0 0 1 1];
2 B = [1 1 1 1; 0 1 0 2]’;
3 C = [0 0 0 1; 0 0 1 1; 0 1 1 1];
4
5 nx = size(A,1); Number of state variables of the plant, in Script: n
6 nu = size(B,2); Number of input variables of the plant, in Script: m
7 ny = size(C,1); Number of output variables of the plant, in Script: p
8
9 q = 1;
10 r = 1;
11 Q = q*eye(###);
12 R = r*eye(###);
13
14 K = lqr(A,B,Q,R);
11 : ### =
12 : ### =
Solution. The matrix Q is a weight for the states and the matrix R is a weight for the
inputs. The correct filling is
11 : ### = nx
12 : ### = nu
192
Gioele Zardini Control Systems II FS 2018
7 State Estimation
In the previous chapters, we assumed that all the state variables of a given systen system
were available at each time. In real systems, however, this is not the case: one knows just
the output y(t) and the input u(t). Hence, one has to figure out how to get the actual
state x(t). The idea is to use an observer to get an estimate of x(t), also called x̂(t).
A whole course about estimation if offered at IDSC in the master by Prof. D’Andrea:
Recursive Estimation.
Definition 24. A pair (A, C) is detectable if all the unobservable modes are stable.
Definition 25. A linear system is reachable if for any x0 , xf ∈ Rn , there exists a T > 0
and u(t) : [0, T ] → R such that the corresponding solution satisfies x(0) = x0 and x(T ) =
xf ∈ Rn .
at each time instant t construct an estimate of the state x̂(t) by only measuring the
system’s inputs and outputs, such that
193
Gioele Zardini Control Systems II FS 2018
It holds
˙ = ẋ(t) − x̂(t)
ê(t) ˙
= Ax(t) + Bu(t) − Ax̂(t) − Bu(t) (7.7)
= Aê(t).
If matrix A has all the eigenvalues in the left half-plane, the error ê(t) will converge to
zero, resulting in a correct state estimation. But is this what we want? Essentially, our
error is converging to zero because the states of the two systems are designed to converge
to zero. In particular, we are not using the output as an information. How can we solve
the problem even for unstable systems? For the following, consider the structure reported
in Figure 54. Let’s add feedback from the measured output by considering the observer
˙
x̂(t) = Ax̂(t) + Bu + L(y(t) − ŷ(t)). (7.8)
It holds
˙ = ẋ(t) − x̂(t)
ê(t) ˙
With this new equation, one can choose a matrix L such that the matrix A − LC has
eigenvalues with negative real parts and hence such that the error ê(t) will converge to 0.
This observer is known as the Luenberger observer.
x̂(t) ŷ(t) −
˙
x̂(t) = Ax̂(t) + Bu(t) + L(y(t) − ŷ(t)) ŷ(t) = C x̂(t) + Du(t)
194
Gioele Zardini Control Systems II FS 2018
Since the problem has the same form, one can use the same methodology to solve it.
One recalls that pole placement is allowed if and only if the system is reachable, i.e. if
rank(R) = n = dim(A), where R is the reachability matrix defined in Equation 7.2 By
using the analogies, one can define similarly
R̃ = B̃ ÃB̃ . . . Ãn−1 B̃
= C | A| C | . . . (A| )n−1 C |
|
C
CA (7.12)
= ..
.
CAn−1
= O| ,
where O is the observability matrix defined in Equation 7.1. Using the well known rule
rank(O) = rank(O| ), (7.13)
one can impose rank(O) to be n in order for observer pole placement to be feasible.
Starting from the Ackermann formula for state feedback
K = 0 . . . 1 R−1 p∗cl (A),
(7.14)
one can write
K̃ = L|
= 0 . . . 0 1 R̃−1 p∗cl (A)
(7.15)
|
⇒ L = p∗cl (A)O−1 0 . . . 0 1 .
195
Gioele Zardini Control Systems II FS 2018
satisfying
• the dynamics
ẋ(t) = Ax(t) + Bu(t), x(0) = x0 (7.20)
and
z(t) = Ex(t) + F u(t), (7.21)
with u(t) ∈ Rm×1 , z ∈ Rk×1 and x ∈ Rn×1 .
• Q > 0, R > 0, Q = Q| , R = R| , with
R = F | Q̄F + ρR̄, ρ ∈ R+
Q = E | Q̄E (7.22)
N = E | Q̄F.
196
Gioele Zardini Control Systems II FS 2018
then
uLQR (t) = − R−1 (N + P B)| x(t), (7.23)
| {z }
KLQR
where P is the real, symmetric, positive definite solution of the algebraic Riccati equation
(ARE)
A| P∞ + P∞ A − P∞ BR−1 B | P∞ + Q = 0. (7.25)
such that (A − LC) is stable, shows duality with the control problem, i.e.
C | → B, A| → A, L| → K. (7.27)
Thank to this duality, one can solve the estimation problem by solving the control one.
The algebraic Riccati equation for estimation is
The duality exists also for the technical conditions for the ARE:
197
Gioele Zardini Control Systems II FS 2018
Deterministic Interpretation
It is worth mentioning that the Kalman filter’s theory is not that short. Among others,
stochastic interpretation, recursive formulatiom, finite horizon and discrete time imple-
mentation represent important topics to be discussed. However, for the aim of this course,
we use the deterministic interpretation of Kalman filters. Considering the effect of dis-
turbances/noises on the plant
where w(t) represents the process noise and n(t) the measurement noise. The Kalman
Filter can be interpreted deterministically as minimizing an uncertainty measure
Z T
2
kx0 k2 + kwk22 + knk22 dt, (7.32)
0
i.e. estimating the last energy/most likely initial condition, disturbance and measurement
noise that justify the measurements.
7.4.5 Summary
The linear quadratic gaussian (LQG) regulator is the union of a LQR controller and a
Kalman Filter. One can see such a closed loop system in Figure 56. The closed loop is
Kr r(t) n(t)
r(t) Trajectory xref (t) u(t) ẋ(t) = Ax(t) + Bu(t) y(t)
− KLQR
Generation y(t) = Cx(t) + Du(t)
x̂(t)
˙
x̂(t) = Ax̂(t) + Bu(t) − L(ŷ(t) − y(t))
ŷ(t) = C x̂(t) + Du(t)
stable if and only if K is a stabilizing state feedback gain and L is a stabilizing estimation
gain.
198
Gioele Zardini Control Systems II FS 2018
7.5 Examples
Example 54. You are given the following system matrices:
1 3 0 2
A = 0 −4 0 , B = 0 , C= 1 0 0 (7.33)
3 −2 −2 0
199
Gioele Zardini Control Systems II FS 2018
200
Gioele Zardini Control Systems II FS 2018
You want to design a state observer. The observer should use the measurements for y(t)
and u(t) in order to estimate the state variables x̂(t) ∼ x(t).
201
Gioele Zardini Control Systems II FS 2018
Solution.
(a) Since C ∈ R1×2 matrix and L · C has the same dimensions of A ∈ R2×2 , L is a 2 × 1
matrix, i.e.
L1
L= . (7.38)
L2
(b) First of all, let’s read from 7.37 the system matrices:
0 1
A=
0 0
0
B= (7.39)
1
C= 1 0
D = 0.
Plugging these matrices into the algebraic Riccati equation and using the unknown
matrix
ψ1 ψ2
Ψ= , (7.40)
ψ2 ψ3
one gets:
1
· Ψ · CT · C · Ψ − Ψ · AT − A · Ψ − B · B T = 0
R
1 0 1 0 0 0 0 0
Ψ· · 1 0 ·Ψ−Ψ· − ·Ψ− · 0 1 =
0 0 0 1 0 1 0 0
ψ12 ψ1 · ψ2 2ψ2 ψ3 0 0 0 0
− − = .
ψ1 · ψ2 ψ22 ψ3 0 0 1 0 0
(7.41)
The matrix Ψ is symmetric and positive definite and with these informations we
can compute its elements:
• From the last term of the equation one gets
ψ22 = 1 ⇒ ψ2 = ±1. (7.42)
√
• By plugging this into the first equation √one gets ψ1 = ± 2. Because the
positive definite condition, one gets ψ1 = 2, ψ2 = 1.
• Because of the form of C we don’t care about ψ3 .
From these calculations it follows
1
LT = ·C ·Ψ
R √
1 2 1 (7.43)
= · 1 0 ·
1 1 ∗
√
= 2 1 ,
and so √
2
L= . (7.44)
1
202
Gioele Zardini Control Systems II FS 2018
(c) By looking at Figure 57, one can write the transfer function of the feedback controller
as
Ĉ(s) = K · (s · I − (A − B · K − L · C))−1 · L. (7.45)
By plugging in the found matrices one gets
√
0 1 0 2
(A − B · K − L · C) = − · 1 1 − · 1 0
0 0 1 1
√
0 1 0 0 2 0
= − − (7.46)
0 0 1 1 1 0
√
− 2 1
= .
−2 −1
It follows
√ −1
−1 s + 2 −1
(s · I − (A − B · K − L · C)) =
2 s+1
1 s+1 1√
= √ · .
(s + 2) · (s + 1) + 2 −2 s + 2
(7.47)
Ĉ(s) = K · (s · I − (A − B · K − L · C))−1 · L
√
1 s+1 1√ 2
= 1 1 · √ · ·
(s + 2) · (s + 1) + 2 −2 s + 2 1
√
√
1 2
= √ · s−1 s+1+ 2 ·
(s + 2) · (s + 1) + 2 1 (7.48)
1 √ √ √
= √ · ( 2s − 2 + s + 1 + 2)
(s + 2) · (s + 1) + 2
√
( 2 + 1)s + 1
= √ .
(s + 2) · (s + 1) + 2
203
Gioele Zardini Control Systems II FS 2018
204
Gioele Zardini Control Systems II FS 2018
Solution.
l
a) The observer gain is defined as L = 1 .
l2
The evolution in the estimation error for a Luenberger observer can be written as:
b) To apply the Ackermann formula, the inverse of the observability matrix of the
system needs to be known:
C 1 0 −1 1 0
O= = ⇒O = (7.55)
CA −2 1 2 1
−4
The desired observer poles are at the characteristic polynomial is therefor
−4
written as:
p∗cl (s) = s2 + 8s + 16 ⇒ p∗cl (A) = A2 + 8A + 16I (7.56)
2
−2 1 −2 1 1 0 4 2
p∗cl (A) = +8 + 16 = (7.57)
0 −4 0 −4 0 1 0 0
The observer gain can now be derived using the Ackermann formula:
∗ −1 0
L = pcl (A)O (7.58)
1
l1 4 2 1 0 0 2
L= = = (7.59)
l2 0 0 2 1 1 0
205
Gioele Zardini Control Systems II FS 2018
Example 57. You are working for your semester thesis at a project which includes a water
reservoir. Your task is to determine the disturbance d(t) that acts on the reservoir. Figure
58 shows the situation. The only state of the system is the water volume x(t) = V (t).
The volume flows in the reservoir Vin∗ (t) are the known system input u(t) and the unknown
disturbance d(t) > 0. The volume flow of the system is assumed to be only dependend
on the water volume, i.e.
∗
Vout (t) = −β · x(t). (7.60)
The system output y(t) is the water level h(t). The model of this reservoir reads
dx(t)
= −β · x(t) + u(t) + d(t),
dt (7.61)
1
y(t) = · x(t), α > 0, β > 0.
α
Figure 58: a) Drawing of the reservoir; b) Inputs and Outputs of the observer; c) Blocks
for signal flow diagram.
.
The goal is to determine d(t). Your supervisor has already tried to solve the model
equations for d(t): he couldn’t determine the change in volume dx(t)
dt
with enough precision.
Hence, you want to solve this problem with a state observer.
(a) Draw the signal flow diagram of such a state observer. Use the blocks of Figure
58c).
(b) The state feedback matrix L is in this case some scalar value. Which value can L
be, in order to get an asymptotically stable state observer?
ˆ in the state observer. This should approximate the real
(c) Introduce a new signal d(t)
disturbance d(t).
(d) Find the state space description of the observer with inputs u(t) and y(t) and output
ˆ
d(t).
206
Gioele Zardini Control Systems II FS 2018
Solution.
(a) The signal flow diagram can be seen in Figure 59.
(b) The stability of the ovserver depends on the eigenvalues of A − L · C. In this case,
since A − L · C is a scalar,
A−L·C <0 (7.62)
should hold. This leads to
A
L> . (7.63)
C
With the given informations it follows
β
L>− . (7.64)
α
(c) The dashed line in Figure 59 represents the new output d(t).ˆ The integrator in
Figure 59 has now 3 inputs. The arrow from downwards from the reservoir is
∗ ∗
Vout (t), the arrow from left is the input flow u(t) = Vin1 (t). If we simulate the
system without the dashed arrow, there is a deviation between the measured y(t)
and the simulated ŷ(t). This results from the extra inflow d(t) = Vin∗ (t), which is
not considered in the simulation.
(d) The new state-space description reads
dx̂(t) L
= −β − · x̂(t) + (1) · u(t) + (L) · y(t) (7.65)
dt α
ˆ L
d(t) = − · x̂(t) + (0) · u(t) + (L) · y(t). (7.66)
α
207
Gioele Zardini Control Systems II FS 2018
8 H∞ Control
The big disadvantage of LQR/LQG is that one cannot directly impose frequency domain
specifications to the control loop. A solution to this problem is given by the H∞ control
formulation.
w z
G(s)
ũ
C(s) ỹ
• G(s) is called the extended system and is real, rational and proper.
• w(t) ∈ Cm1 ×1 is called exogenous input, and contains at least the reference signal
r(t) and possibly other exogenous signals, such as a noise model n(t).
• z(t) ∈ Cp1 ×1 is called the performance output and is a virtual output signal only
used for design.
kzk2
kTzw (s)k∞ = sup
w6=0 kwk2
:= γmin ,
where Tzw (s) is the transfer function which relates signals z(t) and w(t). Intuitively, this
is equivalent to
208
Gioele Zardini Control Systems II FS 2018
Optimal H∞ Control: Find all admissible controllers C(s) such that kTzw (jω)k∞ is
minimized.
Differently to what we observed in H2 control, the optimal H∞ controllers are not unique.
Moreover, the process of finding an optimal controller is complicated, numerically and
theoretically. This said, in practice is often not necessary to design an optimal controller:
often it is sufficient to find controllers which are close to optimality, but easier to com-
pute, i.e. suboptimal controllers.
Suboptimal H∞ Control: Given γ > 0, find all admissible controllers C(s) such that
kTzw (jω)k∞ < γ.
U (s) = C(s)E(s)
(8.3)
= C(s)S(s)(R(s) − N (s)),
209
Gioele Zardini Control Systems II FS 2018
d(t) = 0 n(t)
r(t) e(t) u(t) v(t) η(t) y(t)
F (s) = I C(s) P (s)
−
210
Gioele Zardini Control Systems II FS 2018
ze
We (s)
zu
Wu (s)
zy
Wy (s)
y e
P (s)
u −
C(s)
r(t) to the input u(t) is known to be C(s)S(s) (refer to Equation 8.5), one can write
211
Gioele Zardini Control Systems II FS 2018
We (s) = Ŝ(s)−1
Wu (s) = R̂(s)−1 (8.18)
−1
Wy (s) = T̂ (s) ,
one can write the control problem as:
Suboptimal H∞ Control: Find C(s) such that for sufficiently small γ ∈ R+ it holds.
We (s)S(s)
k Wu (s)C(s)S(s) k∞ ≤ γ. (8.19)
Wy (s)T (s)
Remark. Note that
1
σ̄ (Tzw (s)) = σ̄ → σ Tzw (s)−1 = . (8.20)
σ̄
One can then in general define the generalized optimization problem related to this control
problem to be
min γ. (8.21)
kTzw (s)k∞ ≤γ
212
Gioele Zardini Control Systems II FS 2018
8.4 Implementation
By fixing a γ ∗ , one can solve the optimization problem. The augmented plant G(s) has
to be represented in state space form, i.e. we need to express the weighting functions’
dynamics. In general, one can always write
and
ẋy (t) = Ay xy (t) + By uy (t)
= Ay xy (t) + By y(t)
= Ay xy (t) + By (Cx(t) + Du(t))
= Ay xy (t) + By Cx(t) + By Du(t),
(8.25)
zy (t) = yy (t)
= Cy xy (t) + Dy uy (t)
= Cy xy (t) + Dy (Cx(t) + Du(t))
= Cy xy (t) + Dy Cx(t) + Dy Du(t),
213
Gioele Zardini Control Systems II FS 2018
and
ẋu (t) = Au xu (t) + Bu uu (t)
= Au xu (t) + Bu u(t),
zu (t) = yu (t) (8.26)
= Cu xu (t) + Du uu (t)
= Cu xu (t) + Du u(t).
8.4.2 H∞ Solution
Once that one has the extended plant G(s) and the state space description of the system,
one can solve the optimization problem.
Simplified Case
Assuming
|
• Cext,z Dext,zu = 0,
|
• Bext,w Dext,yw = 0, i.e. process noise and sensor noise are uncorrelated,
|
• Dext,zu Dext,zu = I,
|
• Dext,yw Dext,yw = I,
find a controller C(s) such that kTzw k∞ < γ for γ > 0. It turns out that by simplifying
the problem, the solution has similarities with the one of LQG (state feedback). The
procedure to solve this problem is:
214
Gioele Zardini Control Systems II FS 2018
Kochrezept H∞ Control
A controller C(s) which satisfies the objective exists if and only if the conditions contained
in the different steps are fulfilled.
II) Find the quatratic, real matrix X∞ ≥ 0 which solves the algebraic Riccati equation
1
A|ext X∞ + X∞ Aext + |
Cext,z Cext,z + X∞ | |
Bext,w Bext,w − Bext,u Bext,u X∞ (8.29)
γ2
III) Find the quadratic, real matrix Y∞ ≥ 0 which solves the algebraic Riccati equation
1 |
Aext Y∞ + Y∞ A|ext + Bext,w Bext,w
|
+ Y∞ C |
Cext,z − Cext,y Cext,y Y∞ = 0, (8.31)
γ 2 ext,z
VI) If the resulting minimal γ ∗ > 1, the feasibility conditions we intoduced in the
previous chapter are no more valid. In order to make the problem feasible, one need
to relax the weights We (s), Wu (s), Wy (s). If the resulting minimal γ ∗ ≤ 1, the result
is acceptable. One can use the matrices X∞ and Y∞ to calclulate the H∞ control
dynamics. Considering the extended state
x(t)
xe (t)
x̂(t) =
xu (t) ,
(8.35)
xy (t)
215
Gioele Zardini Control Systems II FS 2018
Remark. In order to solve this kind of problems, a popular strategy is bisection. Let γ ∗
be the optimal solution. By maintaining lower and upper bounds γ− < γ ∗ < γ+ one uses
the following procedure:
1. Initialize γ− = 0 and γ+ = α, where α is the H∞ norm of the H2 optimal design
(LQG). Let K+ be the optimal LQG controller.
2. Let
γ− + γ+
γ← . (8.38)
2
Check if a controller exists such that kTzw k∞ < γ. If yes, set γ+ = γ and K+ to the
controller just designed. If not, set γ− ← γ.
3. Repear from step 2. until
γ+ − γ− < ε, (8.39)
where ε is a user-defined threshold.
4. Return K+ .
216
Gioele Zardini Control Systems II FS 2018
Example 58. Given an extended system of a SISO plant with performance output
Ze (s) We (s)S(s)
Zu (s) = Wu (s)C(s)S(s) R(s) (8.41)
Zy (s) Wy (s)T (s)
| {z }
=Tzw
where
• We (s), Wu (s) and Wy (s) are weights for the corresponding sensitivities,
Note: The system matrix A and state vector x(t) correspond to the extended system state
and not only to the plant’s one.
217
Gioele Zardini Control Systems II FS 2018
a) Which of the following magnitude plots are possible for the given extended system?
218
Gioele Zardini Control Systems II FS 2018
a)
b)
c)
d)
219
Gioele Zardini Control Systems II FS 2018
b) Let We (s) = Ŝ(s)−1 where Ŝ(s) is a designer defined upper boundary for S(s).
Which magnitude plot of S(s) and Ŝ(s) could correspond to the the given system?
a)
b)
220
Gioele Zardini Control Systems II FS 2018
Given that all matrices in (8.42) are the same as the one derived in the lecture. One
can show that the eigenvalues of A are the eigenvalues of all separately considered
subsystems. Assume for the next two subtasks that the not considered conditions
(summarized on slide 18, lecture 11) for well-posedness of the H∞ -problem hold.
c) Given stabilizability to the extended system. There exists a solution to the problem
if all eigenvalues of the weight system matrices have negative real part.
True.
False.
d) Assume for the given extended system that σ̄(D11 ) = 1.15. There exists a solution.
True.
False.
221
Gioele Zardini Control Systems II FS 2018
Solution.
a) 3 a)
b)
3 c)
d)
From the lecture we know that if
We (s)S(s)
Wu (s)C(s)S(s) ≤1 (8.44)
Wy (s)T (s) ∞
holds, then each individual inequality holds as well. Therefore the Bode magnitude
plots of We (s)S(s), Wu (s)C(s)S(s) and Wy (s)T (s) must not exceed the 0dB-line.
We see that only the plots of a) and c) satisfy this condition.
b) 3 a)
b)
Since Ŝ(s)−1 S(s) ≤ 1, the magnitude plot of S(s) has to be always below
∞
the one of Ŝ(s). This means, that the H∞ -controller is exact the solution of the
minimization problem which leads to a S(s) satisfying the above condition.
c) 3 True.
False.
From the lecture we know that a sufficient condition for well-posedness of the prob-
lem is [A, B2 ] stabilizable and [A, C2 ] detectable. Since C2 = −Cs 0 0 0 , where
Cs corresponds to the plant’s LTI-representation, only the states of the plant can
be observed. However, the states of the plant are not influenced by the remaining
one. In other words, there is no possibility to observe the weight’s states. Therefore
the poles of the weights has to be stable in order to have well-posedness.
d) True.
3 False.
From the lecture we know that a sufficient condition for well-posedness of the prob-
lem is σ̄(D11 ) = γ, where in our case γ = 1. Therefore the problem is not well-posed.
222
Gioele Zardini Control Systems II FS 2018
where f (·) and g(·) are nonlinear functions. Recall that (xe , ue ) represents an equilibrium
point if and only if
0 = f (xe , ue , t)
(9.2)
ye = g(xe , ue , t).
As the analysis of the nonlinear system is often difficult, we previously considered such a
system in a neighbourhood of its equilibrium points. Mathematically, this translates into
considering the Taylor expansion of the functions f (·) and g(·) around the equilibrium
points of the system and neglecting high order terms. Let δx = x − xe and δu = u − ue .
It holds then
δ ẋ = f (xe + δx, ue + δu, t)
∂f ∂f
= δx + δu + high order terms (9.3)
∂x xe ,ue ∂u xe ,ue
= Aδx + Bδu + high order terms.
By proceeding analogously for g(·) and neglecting high order terms, one gets
δ ẋ = Aδx + Bδu
(9.4)
δy = Cδx + Dδu,
∂g ∂g
where C = ∂x
and D = ∂u
.
xe ,ue xe ,ue
Remark.
• Note that in general, matrices A, B, C, D are time-varying. However, if f (·), g(·) do
not depend explicitly on time t, the linearized model will be time-invariant.
• δx, δu, δy describe a deviation from the equilibrium point. The linearized dynamics
are given by
x = xe + δx
y = ye + δy (9.5)
u = ue + δu.
223
Gioele Zardini Control Systems II FS 2018
∀ε > 0, ∃δ > 0 s.t. kx(0) − x̂k < δ ⇒ kx(t) − x̂k < ε. (9.7)
In words, an equilibrium point is said to be Lyapunov stable if for any bounded initial
condition and zero input, the state remains bounded.
Definition 27. An equilibrium x̂ ∈ Rn is said to be asymptotically stable in Ω ⊆ Rn if it
is Lyapunov stable and attractive, i.e. if
In words, an equilibrium is said to be asymptotically stable if, for any bounded initial
condition and zero input, the state converges to the equilibrium.
Definition 28. An equilibrium x̂ ∈ Rn is said to be unstable if it is not stable.
Remark. Note that stability is a property of the equilibrium and not of the system in
general.
|s(t)| ≤ B ∀t ∈ R. (9.9)
224
Gioele Zardini Control Systems II FS 2018
• The zeros of the numerator of Equation (9.13) are the zeros of the system, i.e. the
values si which fulfill
P (si ) = 0. (9.14)
• The zeros of the denominator of Equation (9.13) are the poles of the system, i.e.
the values si which fulfill det(si I − A) = 0, or, in other words, the eigenvalues of A.
Theorem 13. The equilibrium x̂ = 0 of a linear time invariant system is stable if and
only if the following two conditions are met:
2. The algebraic and geometric multiplicity of all λ ∈ σ(A) such that Re(λ) = 0 are
equal.
Remark. For linear systems, the stability of an equilibrium point does not depend on the
point itself. For nonlinear systems, it does.
Then:
It holds:
225
Gioele Zardini Control Systems II FS 2018
2. The local stability properties of an arbitrary-order nonlinear system are fully un-
derstood once the eigenvalues of the linearization are known.
If we are interested in non-local results or in the case of stable systems, we should use the
Lyapunov’s direct method.
A scalar function α(p) with α : R+ → R+ is a nondecreasing function if α(0) = 0 and
α(p) ≥ α(q)∀p > q. A function V : Rn+1 → R is a candidate global Lyapunov function if
• The function is strictly positive, i.e., V (x, t) > 0 ∀x 6= 0, ∀t and V (0) = 0 and
• there are two nondecreasing functions α and β which satisfy the inequalities
Remark. If these conditions are not met, only local assumptions can be made.
Theorem 14. The system
2. The eigenvalues of matrix A are λ1 = 0 and λ2 = −6. Using the Lyapunov principle,
we cannot evaluate the stability of the nonlinear system, since the linearized one is
just stable around the equilibrium.
3. The derivative of the Lyapunov function reads
V̇ = x1 ẋ1 + x2 ẋ2
= x1 · (x1 x22 ) + x2 · (x21 x2 + 2x32 − 6x2 )
(9.26)
= x21 x22 + x22 x21 + 2x42 − 6x22
= 2x22 · (x21 + x22 − 3).
In order for V̇ to be negative definite, it must hold x21 + x22 < 3.
227
Gioele Zardini Control Systems II FS 2018
228
Gioele Zardini Control Systems II FS 2018
229
Gioele Zardini Control Systems II FS 2018
230
Gioele Zardini Control Systems II FS 2018
and
∂T1
γ(x(t)) = 0
∂x
∂T2
γ(x(t)) = 0
∂x
..
. (9.52)
∂Tn−1
γ(x(t)) = 0
∂x
∂Tn 1
γ(x(t)) =
∂x β(x(t))
9.7 Examples
Example 60.
a) Consider the continuous-time system
V (x) is a Lyapunov function for this system and therefore the system is asymp-
totically stable.
V (x) is not a Lyapunov function for this system and therefore the system is
not stable.
V (x) is not a Lyapunov function for this system. Furthrermore, given this
information, we cannot conclude anything about the stability of the system.
The largest region of attraction of the system is {x(t) ∈ R2 |x1 (t)2 +x2 (t)2 ≤ 3}.
2 2 2
√ largest region of attraction of the system is {x(t) ∈ R |x1 (t) + x2 (t) ≤
The
3}.
The largest region of attraction of the system is {x(t) ∈ R2 |x1 (t)2 +x2 (t)2 ≤ 2}.
2 2 2
√ largest region of attraction of the system is {x(t) ∈ R |x1 (t) + x2 (t) ≤
The
2}.
None of the above.
232
Gioele Zardini Control Systems II FS 2018
Solution.
a)
V (x) is a Lyapunov function for this system and therefore the system is asymp-
totically stable.
V (x) is not a Lyapunov function for this system and therefore the system is
not stable.
3 V (x) is not a Lyapunov function for this system. Furthermore, given this
information, we cannot conclude anything about the stability of the system.
Solution: The test function is not a Lyapunov function. One can verify this by
observing that:
Since V (x) is not a Lyapunov function, we cannot conclude anything about the
stability of the system. Moreover, we know that the system is unstable only from
the positive eigenvalue λ1 = 0.5, and not from V (x).
b)
Solution:
c) The largest region of attraction of the system is {x(t) ∈ R2 |x1 (t)2 +x2 (t)2 ≤ 3}.
233
Gioele Zardini Control Systems II FS 2018
2 2 2
√ largest region of attraction of the system is {x(t) ∈ R |x1 (t) + x2 (t) ≤
The
3}.
The largest region of attraction of the system is {x(t) ∈ R2 |x1 (t)2 +x2 (t)2 ≤ 2}.
2 2 2
√ largest region of attraction of the system is {x(t) ∈ R |x1 (t) + x2 (t) ≤
The
2}.
3 None of the above.
Solution: It holds
∂V ∂x1 ∂V ∂x2
V̇ (x1 (t), x2 (t)) = +
∂x1 ∂t ∂x2 ∂t
= x1 (t) x1 (t)x2 (t)2 + x2 (t) x1 (t)2 x2 (t) + 2x2 (t)3 − 6x2 (t) (9.58)
In order to find the region of attraction for which the system is asymptotically
stable, V̇ (x) must be negative definite. This is the case if
This ensures that the region of attraction for the origin is at least the one presented
in Equation 9.59. However, the choice of another Lyapunov function could result
in a larger region of attraction. This explains why none of the first four answers is
correct.
234
Gioele Zardini Control Systems II FS 2018
with
x2 (t) 0
−a sin(x1 (t)) − b(x1 (t) − x3 (t)) 0
f (x(t)) = , g= (9.61)
x4 (t) 0
c(x1 (t) − x3 (t)) d
where a, b, c and d are positive constants. We want to find a diffeomorphismus such that
T1 (x(t)) fulfills:
∂Ti ∂T4
g = 0, i = 1, 2, 3; g 6= 0. (9.62)
∂x ∂x
The system has clearly an equilibrium point at x = 0. From the first condition
∂T1
g = 0, (9.63)
∂x
one knows that
∂T1
d = 0. (9.64)
∂x4
This means that one must choose T1 (x(t)) independent of x4 (t). Using this, one can write
∂T1 ∂T1 ∂T1
T2 (x(t)) = x2 (t) + (−a sin(x1 (t)) − b(x1 (t) − x3 (t)) + x4 (t). (9.65)
∂x1 ∂x2 ∂x3
From the second condition
∂T2
g = 0, (9.66)
∂x
one knows that
∂T1
= 0. (9.67)
∂x4
This implies
∂T2 ∂T1
=0⇒ = 0. (9.68)
∂x4 ∂x3
T1 (x(t)) needs to be independent of x3 (t) and hence
∂T1 ∂T1
T2 (x(t)) = x2 (t) + (−a sin(x1 (t)) − b(x1 (t) − x3 (t)) , (9.69)
∂x1 ∂x2
and
∂T2 ∂T2 ∂T2
T3 (x(t)) = x2 (t) + (−a sin(x1 (t)) − b(x1 (t) − x3 (t)) + x4 (t). (9.70)
∂x1 ∂x2 ∂x3
From the third condition
∂T3
g = 0, (9.71)
∂x
one knows that
∂T3
= 0. (9.72)
∂x4
This implies
∂T3 ∂T2 ∂T1
=0⇒ =0⇒ = 0. (9.73)
∂x4 ∂x3 ∂x2
235
Gioele Zardini Control Systems II FS 2018
236
Gioele Zardini Control Systems II FS 2018
Example 62. Your SpaghETH startup, which cooks pasta on the polyterrasse everyday,
is growing every week more and although no particular production issues occur you are
concerned about ecology. Since each tank of pasta you cook needs water and a correct
salt seasoning for it to taste that delicious, you need a lot of salt and water, which are
often wasted. For this reason, you open a research branch in your startup which decides
to design a duct-hydraulic system to counteract the waste of water and salt. The idea
is to use a two water tank system, which helps you seasoning the water and changing it,
without substituting the whole pot. The dynamics of the system are given by
p
ẋ1 (t) = 1 + u(t) − 1 + x1 (t)
p p
ẋ2 (t) = 1 + x1 (t) − 1 + x2 (t) (9.78)
y = x2 (t).
a) Linearize the nonlinear system around the equilibrium
x1,eq (t) x2,eq (t) ueq (t) = 3 3 1 . (9.79)
b) Determine the coordinate transformation such that the system can be written in
the form
ż1 (t) = z2 (t)
ż2 (t) = α(z) + β(z)u(t) (9.80)
y(t) = z1 (t).
u(t)
x1 (t)
SALT
x2 (t)
237
Gioele Zardini Control Systems II FS 2018
Solution.
a) It holds
− √ 1 0
2 1+x (t)
A= √ 1 1
− √ 1
x1,eq (t)=x2,eq (t)=3
2 1+x1 (t) 2 1+x2 (t)
1
!
−4 0
= 1 1
,
4
− 4 (9.81)
1
B= ,
0
C= 0 1 ,
D = 0.
238
Gioele Zardini Control Systems II FS 2018
where
1
u(t) = (v(t) − α(z(t)))
β(z(t))
p !!
p 1 1 z2 (t) + 1 + z 1 (t)
= 2(z2 (t) + 1 + z1 (t)) v(t) − p − p .
2 z2 (t) + 1 + z1 (t) 1 + z1 (t)
(9.88)
239
Gioele Zardini Control Systems II FS 2018
Use the linearizability conditions for SIMO systems to find the transformation (diffeo-
morphism) z(x(t)) = T (x(t)).
240
Gioele Zardini Control Systems II FS 2018
241
Gioele Zardini Control Systems II FS 2018
A Linear Algebra
A.1 Matrix-Inversion
1
A−1 = · adj(A), {adj(A)}ij = (−1)i+j · det(Aij ) (A.1)
det(A)
Special Cases:
• n = 2:
a b −1 1 d −b
A= ⇒ A = · (A.2)
c d a · d − b · c −c a
• n = 3:
a b c e·i−f ·h c·h−b·i b·f −c·e
1
A = d e f ⇒ A−1 = f · g − d · i a · i − c · g c · d − a · f
det(A)
g h i d·h−e·g b·g−a·h a·e−b·d
(A.3)
242
Gioele Zardini Control Systems II FS 2018
B Rules
B.1 Trigo
α[◦ ] 0 30 45 60 90 120 180
π π π π 2π
α[rad] 0 6 4 3 2 3
π
√ √ √
1 2 3 3
sin(α) 0 1 0
√2 √2 2 2
3 2 1
cos(α) 1 0 − 12 −1
√3 2
√ 2
√
3
tan(α) 0 3
1 3 ±∞ − 3 0
√ √
3
√
3
cot(α) ±∞ 3 1 2
0 − 2
±∞
B.2 Euler-Forms
eix = cos(x) + i · sin(x)
a + i · b = |a + i · b| · ei·∠(a+i·b)
1 ix
sin(x) = (e − e−ix )
2i
1
cos(x) = (eix + e−ix )
2
B.3 Derivatives
1 1
(loga |x|)0 = (loga e) =
x x ln a
cx 0 cx
(a ) = (c ln a)a
1
(tan x)0 = = 1 + tan2 x
cos2 x
1
(arcsin x)0 = √
1 − x2
1
(arccos x)0 = − √
1 − x2
1
(arctan x)0 =
1 + x2
B.4 Logarithms
ln |y| · C = ln |y C |
− ln |r| = ln |r−1 |
ln(1) = log(1) = 0
243
Gioele Zardini Control Systems II FS 2018
B.6 dB-Scale
Typically the unit for the magnitude is dB:
1
= −X|dB
X dB
(X · Y )|dB = X|dB + Y |dB
√
Value 0.001 0.01 0.1 0.5 √1 1 2 2 10 100
2
dB −60 −40 −20 ≈ −6 ≈ −3 0 ≈ 3 ≈ 6 20 40
244
Gioele Zardini Control Systems II FS 2018
C MATLAB
C.1 General Commands
Command Description
A(i,j) Element of A in position i (row) and j (column)
abs(X) Magnitude of all elements of X
angle(X) Phase of all elements of X
X’ Complex conjugate and transpose of X
X.’ Transpose, not complex conjugate of X
conj(X) Complex conjugate of all elements of X
real(X) Realteil von allen Einträge von X
imag(X) Imaginary part of all elements of X
eig(A) Eigenvalues of A
[V,D]=eig(A) Eigenvalues D (diagonal elements), eigenvectors V (column vectors)
s=svd(A) singular values of A
[U,Sigma,V]=svd(A) Singular Values Decomposition of A
rank(A) Rank of A
det(A) Determinant of A
inv(A) Inverse of A
diag([a1,...,an]) Diagonalmatrix with a1,...,an as diagonal elements
zeros(x,y) Zero matrix of dimension x×y
zeros(x) Zero matrix of dimension x×x
eye(x,y) Identity matrix of dimension x×y
eye(x) Identity matrix of dimension x×x
ones(x,y) One-Matrix (all elements = 1) of dimension x×y
ones(x) One-Matrix (all elements = 1) of dimension x×x
max(A) Largest element in vector A (A Matrix: Max in column vectors)
min(A) Smallest element in vector A (A Matrix: Max in column vectors)
sum(A) Sum of elements of A (A Matrix: Sum row pro row)
dim=size(A) Dimension of A (size=[#rows #columns])
dim=size(A,a) a=1: dim=#rows, a=2: dim=#columns, sonst dim=1
t=a:i:b t=[a,a+i,a+2i,...,b-i,b] (row vector)
y=linspace(a,b) row vector with 100 “linear-spaced” points in range [a,b]
y=linspace(a,b,n) row vector with n “linear-spaced” points in range [a,b]
y=logspace(a,b) row vector with 50 “logarithmically-spaced” points in range [10^a,10^b]
y=logspace(a,b,n) row vectors with n “logarithmically-spaced” points in range [10^a,10^b]
I=find(A) I: Index of non zero elements of A
disp(A) Print on screen of A (String: ’name’)
245
Gioele Zardini Control Systems II FS 2018
Befehl Beschreibung
sys=ss(A,B,C,D) State-Space M. with A,B,C,D in time domain
sys=ss(A,B,C,D,Ts) State-Space M. with A,B,C,D and sampling Ts (discrete-time)
sys=zpk(Z,P,K) State-Space M. with zeros Z, poles P and gain K
sys=zpk(Z,P,K,Ts) State-Space M. with zeros Z, poles P, gain K and sampling Ts
sys=tf([bm ...b0],[an ...a0]) Transfer function with bn in numerator and an in denom.
P=tf(sys) Transfer function of sys
P.iodelay=... Insers to P delay.
pole(sys) Poles of System
zero(sys) Zeros og System
[z,p,k]=zpkdata(sys) z: Zeros, p: Poles, k: static gain
ctrb(sys) or ctrb(A,b) Controllability Matrix
obsv(sys) or obsv(A,c) Observability Matrix
series(sys1,sys2) series of sys1 and sys2
feedback(sys1,sys2) sys1 with sys2 as (negative) Feedback
[Gm,Pm,Wgm,Wpm]=margin(sys) Gm: gain margin, Pm: phase margin, Wpm: crossover freq.
[y,t]=step(sys,Tend) y: step response von sys until T, t: time
[y,t]=impulse(sys,Tend) y: impulse response of sys until Tend, t: time
y=lsim(sys,u,t) Simulation of sys with input u for the timet
sim(’Simulink model’,Tend) Simulation of Simulink Model’ until Tend
p0=dcgain(sys) static gain (P (0))
K=lqr(A,B,Q,R) Gain Matrix K (solution of the LQR-Problem)
[X,L,K]=care(A,B,Q) X: solution of the Riccati equation, G: Gain matrix
Paug=augw(G,W1,W3,W2) Space State M. for H∞
[K,Cl,gamma]=hinfsyn(Paug) H∞ : K: Controller
fr=evalfr(sys,f) sys evaluated in f (s = f )
sysd=c2d(sys,Ts,method) Discretization of sys with method with Sampling Time Ts
246
Gioele Zardini Control Systems II FS 2018
Befehl Beschreibung
nyquist(sys) Nyquist diagram of the system sys
nyquist(sys,{a,b}) Nyquis diagramm in interval [a,b] of the system sys
bode(sys) Bode diagram of the system sys
bode(sys,{a,b}) Bode diagram in intervall [a,b] of the system sys
bodemag(sys) Bode diagram (just magnitude) of the system sys
bodemag(sys,{a,b}) Bode diagram (just magnitude) in interval [a,b] of the system. sys
rlocus(sys) Root Locus diagram
impulse(sys) Impulse Response of the system sys
step(sys) Step response of the system sys
pzmap(sys) Poles and zeros mapping of the system sys
svd(sys) Singular values dynamics of the dystem sys
plot(X,Y) Plot of Y as function of X
plot(X,Y,...,Xn,Yn) Plot of Yn as function of Xn (for all n)
stem(X,Y) Discrete plot of Y as function of X
stem(X,Y,...,Xn,Yn) Discrete plot of Yn as function of Xn (for all n)
xlabel(’name’) Name of the x-Axis
ylabel(’name’) Name of the y-Axis
title(’name’) Title of the plot
xlim([a b]) Range for the x-Axis (Plot between a and b)
ylim([a b]) Range for the y-Axis (Plot between a and b)
grid on Grid
title(’name’) Title of the plot
legend(’name1’,...,’name’) Legend
subplot(m,n,p) Grid m×n, Plot in Position p
semilogx(X,Y) Logarithmitic Plot with y-Axis linear
247
Gioele Zardini Control Systems II FS 2018
References
[1] Essentials of Robust Control, Kemin Zhou.
[2] Karl Johan Amstroem, Richard M. Murray Feedback Systems for Scientists and En-
gineers. Princeton University Press, Princeton and Oxford, 2009.
[3] Sigurd Skogestad, Multivariate Feedback Control. John Wiley and Sons, New York,
2001.
248