Lecture_notes_for_System_Theory_and_Control
Lecture_notes_for_System_Theory_and_Control
Lecture notes
November 6, 2023
Preface
These notes on System Theory are a revised version of the lecture notes first written by Dr. Luca
Peretti after the course taught by Prof. Franco Blanchini in the academic year 2002/2003. Through
the years, the notes have been deeply revised and integrated. Several students have pointed out
typos or errors (most of which are due to the teacher).
The English translation was first released in 2016. Should the reader have any comments or
find out errors, a message would be very appreciated. For this purpose, please contact
blanchini@uniud.it
The present notes will be updated/corrected in the future, tending to perfection in the very long
run (with a very slow convergence speed).
Given their nature, these notes SHOULD NOT be considered as a substitute of a good textbook.
They only provide a track of the arguments presented in the course.
Franco Blanchini
i
Contents
1 Introduction 1
3 Dynamical systems 35
3.1 General consideration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.2 Causal dynamical systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.3 Automata as dynamical systems . . . . . . . . . . . . . . . . . . . . . . . . . . 38
iii
iv CONTENTS
4.11 Cancellations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
4.11.1 External stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.12 Controllable canonical form . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5 Realisation 71
5.1 The problem in general . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.2 Minimal realisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.3 Minimal realisation for SISO systems . . . . . . . . . . . . . . . . . . . . . . . 75
5.3.1 Other techniques for SISO systems realisation . . . . . . . . . . . . . . . 75
5.4 Realisation of discrete-time systems . . . . . . . . . . . . . . . . . . . . . . . . 76
6 Control Systems 77
6.1 General considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
6.2 State feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
6.2.1 A simple algorithm for eigenvalue assignment . . . . . . . . . . . . . . . 83
6.3 State observer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
6.4 Synthesis of regulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
6.5 External disturbances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
6.6 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
7 Nonlinear systems 97
7.1 General considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
7.2 Equilibrium points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
7.3 Lyapunov functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
7.3.1 Lyapunov stability theorem . . . . . . . . . . . . . . . . . . . . . . . . . 102
7.3.2 Instability theorems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
7.4 Lyapunov criterion for discrete-time systems . . . . . . . . . . . . . . . . . . . . 109
7.5 Lyapunov equations for linear systems . . . . . . . . . . . . . . . . . . . . . . . 110
7.5.1 Lyapunov equations for discrete-time systems . . . . . . . . . . . . . . . 112
7.6 Linearisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
7.7 Stability analysis of an equilibrium point . . . . . . . . . . . . . . . . . . . . . . 117
7.8 Stabilisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
7.9 Robustness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
7.9.1 Lyapunov redesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
vii
viii LIST OF FIGURES
Introduction
In the subject name, System Theory, an important aspect is actually omitted. To be more precise, in
fact, we should talk about the Theory of Dynamical Systems. The expression “dynamical system”,
or “dynamic system”, generically refers to any entity that evolves over time according to the laws
of causality, interacting with the environment in accord with the cause-and-effect principle.
From an external viewpoint, a dynamical system is characterised by a set of input functions,
representing the cause, and a set of output functions that represent the effect (Figure 1.1). A key
feature is that the link between input and output is not static, but is intrinsically linked to time and
to the past history.
For example, consider a system whose output y(t) depends on the input u(t) as per the differential
equation1
ÿ(t) + aẏ(t) + by(t) = u(t) ,
fairly representing a balance (Figure 1.2). When u(t) is assigned, the solution of the equation
describes the time evolution of y(t). If we consider a constant input u(t) = ū, then this differential
equation has a constant (static) solution, which can be easily computed by setting ÿ(t) = ẏ(t) = 0.
This solution is
ū
ȳ = .
b
Typically, in order to determine the weight ū of the object on the balance, we observe the output y,
or a quantity proportional to y. Obviously, however, if we considered solutions of this type only, we
would neglect a fundamental aspect, which is the transient response of the system to a given input.
Indeed, a single given input may produce several (infinitely many) outputs, which is a peculiar
feature of dynamical systems.
Dynamical systems were well studied already at the beginning of the XX century, but systems
theory was deeply investigated and developed in the 1950s-1960s, with the main goal of explaining
the dynamic behaviour of a broad class of entities and processes. Actually, systems theory is able
1
We denote by f ′ (x), f ′′ (x) the first and second derivative of the function f (·) with respect to the generic variable x,
and by ġ(t), g̈(t) the first and second derivative of g(·) as a function of time.
1
2 Chapter 1. Introduction
to provide really meaningful explanations in the case of specific classes of systems, such as regular
dynamical systems (those that can be represented in terms of differential equations).
Linear Time-Invariant systems are an extremely interesting particular case, for which very
powerful tools have been proposed. Some of the techniques developed for studying this type of
systems can be applied to more general types of systems, thanks to a technique called linearisation.
This is an extremely important aspect and justifies the fact that most of the course will be devoted
to the study of Linear Time-Invariant (LTI) systems.
1111111111
0000000000
0000000000
1111111111
0000000000
1111111111
M
0000000000
1111111111
Example 1.1. (The balance.) The balance (scales) is a simple example of a linear time-invariant
system. Consider Figure 1.2 and assume that (1) the mass of the balance plate is negligible
compared to the mass of the object to be weighed and (2) the viscous friction is a linear function of
the speed. Then, we can easily obtain the linear differential equation which governs the system:
where y(t) represents the vertical displacement of the plate, while the constants M, h, k and g
respectively represent the mass of the object, the friction coefficient, the elastic constant of the spring
and the gravitational acceleration. When measuring the weight of an object, we are interested in
y(t) after the system has settled: assuming ÿ(t) = ẏ(t) = 0, we get
Mg
y= .
k
From this equation, expressing the steady-state value of y, we derive the weight Mg. However,
before reaching this static condition, the balance is subjected to a transient that depends on the
value of the friction coefficient, as is qualitatively shown in Figure 1.3.
Clearly, in the case of the scales, the most interesting aspect is the steady-state operation.
However, in other cases the dynamic behaviour of the system has a fundamental role. An example
is given by structural engineering. Buildings are normally designed assuming static loads. Limiting
the study to this case is correct as long as the structure is not affected by forces (or accelerations)
that vary over time. Yet, when the building is located in an earthquake region or when strong winds
are present2 , the building must be designed by modeling it as a dynamic system.
2
The Tacoma bridge is a famous example of this problem: http://www.youtube.com/watch?v=j-zczJXSxnw
3
t
Figure 1.3: The balance system: a qualitative graph of the transient.
Outline
The course starts by introducing basic tools for modeling dynamical systems. These include
differential and difference equations, vector spaces and transfer functions. The theory of linear
systems and of their properties (superposition principle, free and forced responses, modes and
stability) are explained in detail. The problem of sampling and sampled-data systems, along with
the techniques for digital implementation, are then introduced.
A formal definition of a general dynamical system is given along with some examples of
non-regular systems (i.e., not expressed by differential or difference equations), such as automata.
Then, basic structural properties of linear systems are presented, in particular reachability and
observability and their connection with the transfer function analysis.
The theory of realisation of transfer functions is subsequently introduced. The basic problem
is how we can associate a (minimal) state representation with a transfer function (or a transfer
function matrix).
These notions are preliminary and essential3 to understand the fundamental concepts of regula-
tion. The regulation problem via eigenvalue assignment with state feedback is initially presented
for linear systems. The output feedback problem is then solved via state observer design.
The course then presents fundamental notions on the analysis and the control of nonlinear
systems. The tools presented for the linear case can be successfully applied by means of the
linearisation technique (a key point of the course). A strong support is given by Lyapunov theory,4
which allows us to deal in an efficient and elegant way with systems whose solutions are impossible
to compute analytically, or even numerically.
Finally, the course presents in a very simple way fundamental topics that cannot be discussed
in depth. These include robustness and control optimality. Typically, the final lectures also
present short seminars about specific topics, such as model-predictive control (MPC) and system
identification.
About one third of the course is devoted to exercises. These include a survey of mathematical
notions, in particular linear algebra. Many models of linear and nonlinear systems are described.
Video of laboratory experiences are shown. Many exercises to better understand the theory are
proposed, including three sessions of test exercises.5
3
Although perhaps tedious...
4
As you will notice, this is the part that is most appreciated by the teacher.
5
The teacher strongly approves human cooperation in all occasions but these...
Chapter 2
This chapter will briefly present the basics concept required as a technical support for what follows.
The proposed theory should be the subject of previous courses. However, given its importance,
some fundamental aspects are summarised here.
These vectors provide an external representation of the system behaviour. A dynamical system is
internally represented by a number n of variables named states, or state variables, which are also
grouped in a vector x(t):
x1 (t)
x2 (t)
x(t) = . ∈ Rn (2.2)
..
xn (t)
Example 2.1. (Electric motor.) Consider the system describing an electric motor, illustrated in
Section 9.1. The input vector for this system is
v f (t)
u(t) = va (t) ,
Cm (t)
whose components represent the excitation voltage, the armature voltage and the external torque.
As an output vector, we can take
φ(t)
" #
y(t) = ,
ω(t)
5
6 Chapter 2. Systems of differential equations
whose components are the excitation current, the armature current, the angular speed and the
angle.
Note that some state variables can correspond to output variables (as in the example above).
Conversely, a state variable cannot be an input.
In general, the relation between state variables and inputs is given by differential equations. In
most cases, these equations are of the first order and the overall system can be expressed in the form
This is called the normal form, since the derivatives of the state are explicit functions of all of the
other variables.
Remark 2.1. A formal definition of state will be given later on. For regular systems in normal form,
the states are the variables xk (t) whose derivatives appear on the left hand side of the differential
equations.
It is desirable to seek a compact form that allows us to easily manipulate the equations. To this
aim, we consider the derivative of the state vector
ẋ1 (t)
d ẋ (t)
ẋ(t) = x(t) = 2 ∈ Rn , (2.4)
dt ...
ẋn (t)
so that the above equations reduce to the following compact vector representation:
This equation represents a generic regular system of n first order differential equations, with m
inputs. It represents an instant relation between the state variables x(t) and inputs u(t) of the system.
Example 2.2. (Chemical reactions.) Consider the following system of differential equations
that involves three state variables (x1 (t), x2 (t) and x3 (t)) and two input variables (u1 (t) and u2 (t)).
If x1 , x2 and x3 are the concentration of the chemical species A, B and C, this system represents the
time evolution of the concentrations when the chemical reactions
u1 u2 α β
∅ −−⇀ A, ∅ −−⇀ B, A + B −
⇀ C, C ⇀
− ∅
are occurring: u1 and u2 are injections of A and B; C is produced from A and B with reaction
speed α and C is consumed with speed β.
2.1. Differential equations in normal form 7
According to the theory of differential equations, in order to solve the equation (2.5) for a given
value of the input vector u(t), we need to know the initial conditions x(t0 ), namely, the value of
the state at a given (initial) time instant t0 . Under regularity conditions, there will be a solution
x(t) = φ(x(t0 ), u(t)) that depends on the initial conditions x(t0 ) of the system and on the input u(t).
In the following, we will always assume that the solution exists and is unique. This is true if the
function f has some regularity property (for instance, it is a Lipschitz function) and u is sufficiently
regular (e.g., piecewise-continuous).
Cm
θ
mg
Example 2.3. (The pendulum.) Consider Figure 2.1, where Cm is the torque (system input) and
y = θ is the angle with respect to the vertical reference frame (system output). The equation
governing this system in the absence of friction is
g 1
θ̈(t) = − sin(θ(t)) + 2 Cm (t)
l ml
Denoting by ω(t) = θ̇(t), this equation can be written in normal form as the system
θ̇(t) = ω(t)
g 1
ω̇(t) = − sin(θ(t)) + 2 Cm (t)
l ml
where θ and ω are the state variables.
In order to find the value of output at the generic time instant t, it is not enough to know the time
evolution of the torque: we also need to know the initial position and the initial speed (namely, the
initial state). Given these quantities, one can determine the time evolution of the position θ(t) and
of the angular speed ω(t) = θ̇(t) by integrating the differential equation, thus obtaining a complete
description of the trajectory.
The dynamical system described by equation (2.5) is said invariant o autonomous if the
function f does not directly depend on time. Note, however, that it always indirectly depends on
time, since t is an argument of both x(t) and u(t). A time invariant system can then be written as
Instead, if time enters directly in the equation, the system is said non-autonomous.
8 Chapter 2. Systems of differential equations
In this case, then, the matrices A (dimension n × n) and B (dimension n × m) does not depend on
time.
The output variables of a system are given by the components of a vector y(t) whose components
are statically1 determined by the following algebraic equations
y1 (t) = g1 (t, x1 (t), . . . , xn (t), u1 (t), . . . , um (t))
..
. (2.10)
y (t) = g (t, x (t), . . . , x (t), u (t), . . . , u (t))
p p 1 n 1 m
The above equation is called the output transformation. If the system is time-invariant, the output
transformation is of the form:
y(t) = g(x(t), u(t)). (2.12)
Conversely, if the system is linear, we have:
Finally, if the system is both linear and time-invariant, the output transformation is of the form:
where matrix A has dimension n × n, B has dimension n × m, C has dimension p × n and D has
dimension p × m. We will sometime use the notations
Σ(A, B, C, D),
or " #
A B
Σ ,
C C
or even (A, B) or (A, C) when the properties we are discussing concern these matrices only.
For this class of systems, we can determine an analytic solution (while for most systems it
is impossible to obtain a solution without resorting to numerical techniques). The solution we
obtain will not be used numerically, but will be analysed qualitatively and will provide fundamental
information about the system.
Suppose that u(t) and x(0) are known (since the system is time-invariant, we can choose t0 = 0
without loss of generality). If we carefully look at the equations, we can easily see that, in order
to understand the entire system behaviour, we only need to determine x(t): then, y(t) can be
immediately determined from the algebraic linear output transformation. Therefore, our main aim
is to solve the system:
ẋ(t) = Ax(t) + Bu(t)
(
(2.17)
x(0) known
A fundamental property of this class of systems2 is the superposition principle.
For the vectors u(t) and x(0) representing input and initial conditions respectively, the symbol
−→ means “give rise to the solution”:
Assume that we have two different solutions with the different inputs and initial conditions
αx∗ (0) + βx∗∗ (0), αu∗ (t) + βu∗∗ (t) −→ αx∗ (t) + βx∗∗ (t)
We can use this general principle for the natural-forced response decomposition: the problem
of computing the solution can be decomposed into two simpler problems, and the overall solution
2
Actually, of all linear systems, including heat equation, waves equation, transmission lines. . .
10 Chapter 2. Systems of differential equations
is the sum of the solutions of the two simpler problems. Any given initial condition and input x(0)
and u(t) can be decomposed as follows:
xL (0) = x(0)
Consider the scalar case first. Then, we have
ẋL (t) = axL (t)
(
⇒ x(t) = x(0) eat
xL (0) = x(0)
In fact, for t = 0 the exponential is equal to 1, and ẋ = a x(0) eat = ax(t). The solution in Rn is
similar to that in the scalar case. Let us define the exponential of a matrix:
X Ak tk +∞
1 1
eAt I + At + A2 t2 + A3 t3 + . . . = (2.23)
2 3! k=0
k!
This is a convergent series (the factorial dominates the exponential for k → +∞).3 We can then
verify that the natural response of the system is equal to:
In fact, for t = 0,
eA0 x(0) = I x(0) = x(0). (2.25)
Moreover, if we write the derivative, we get
+∞ +∞
d At d X Ak tk X Ak−1 tk−1
(e x(0)) = = A = A(eAt x(0)) ⇒ ẋL (t) = AxL (t) (2.26)
dt dt k=0 k! k=1 (k − 1)!
This can be verified by applying the Laplace transform to the system equations:
Since the Laplace transform of a convolution is equal to the product of the individual Laplace
transforms, we have:
L
u(σ) −→ u(s)
L
eAt −→ (sI − A)−1
Z t
eA(t−σ) Bu(σ)dσ = L eAt B L[u(t)] =
⇒L
0
= (sI − A)−1 B u(s) (2.30)
Note also that the Laplace transform of the matrix exponential is nothing but a generalisation of the
Laplace transform of the scalar exponential:
L
eAt −→ (sI − A)−1
Let us now introduce two assumptions: x(0) = 0 and D = 0 (the latter assumption is only for
brevity). In this case we get: Z t
y= CeA(t−σ) Bu(σ)dσ (2.33)
0
This is the input-output relationship, which is very important and leads to the definition of impulse
response matrix W(t), having dimension p × m:
The reason of the name can be explained by considering the Dirac delta (impulse) as the system
input. The Dirac delta δ(·) is a distribution, having the property that, for any continuous function f
defined on an interval [a, b] and any t0 in this interval, we have
Z b
f (t)δ(t − t0 )dt = f (t0 ). (2.35)
a
The meaning of the elements of matrix W(t) is then the following: each element Wi j (t −τ) represents
the ensuing response of the i-th output at time t, due to an impulse applied at time τ to the j-th
input (Figure 2.2).
1 1
2 2
j W(t− τ) i
m p
Figure 2.2: A system with m inputs and p outputs and its impulse response matrix.
Example 2.5. (Impulse on an elastic structure.) Figure (2.3) represents a simple elastic structure,
consisting of three storeys that can shift horizontally relatively to one another. The lower storey
is placed on a cart. Take as inputs the forces u1 , u2 , u3 acting on the storeys and as outputs the
positions of the storeys, y1 , y2 , y3 . An impulsive input u1 (t) = δ(t − t0 ) applied to the first storey
(illustrated by an object hitting the first storey) causes the output W31 on the third storey.
T [t1 , . . . , tn ]
A = T ΛT −1 .
s⊤
+∞
+∞ n n
1
T Λk S tk X Λk tk X
eAt = T eΛt S = Λt .. λi t
Zi eλi t
X X
= T S = [t1 , . . . , tn ]e = ti s ⊤ =
. e
i
k! k!
k=0 k=0 s⊤
n
i=1 i=1
Remark 2.3. The product of a column vector and a row vector (unlike the product of a row vector
and a column vector) forms a matrix (and not a scalar). For example, if we take the vectors
" #
−1 h i
ti = s⊤
i = 1 2 ,
2
we obtain " #
−1 −2
Z i = ti s ⊤
i = ,
2 4
i ti = [3].
while s⊤
14 Chapter 2. Systems of differential equations
s+4
" #
1
det(sI − A) = det = s2 + 5s + 6 = (s + 2)(s + 3)
−2 s + 1
Hence, the eigenvalues are λ1 = −2, λ2 = −3 and their respective eigenvectors can be computed as
−4 + 2
" #" # " #
−1 t1 1
(A − λ1 I)t¯1 = 0 ⇒ = 0 ⇒ t¯1 =
2 −1 + 2 t2 −2
and
−4 + 3
" #" # " #
−1 t1 1
(A − λ2 I)t¯2 = 0 ⇒ = 0 ⇒ t¯2 =
2 −1 + 3 t2 −1
The expression
n
Zi eλi t ,
X
e At
= (2.37)
i=1
valid in the case of distinct eigenvalues, reveals that the elements of matrix eAt are linear combina-
tions of the functions eλi t , where λi are the eigenvalues of A.
The scalar functions eλi t are called the modes of the system. They are of fundamental impor-
tance for the system analysis.
Note that, in general, the eigenvalue of a real matrix can be complex. If the i-th eigenvalue is
complex, then
λi = ξi + ji ωi ⇒ eλi t = e(ξi + jωi )t = eξi t (cos(ωi t) + j sin(ωi t)) (2.38)
If there is a complex eigenvalue λ, then also its complex conjugate λ∗ is an eigenvalue. Moreover, if
λ is associated with the matrix Zi , then λ∗ is associated with the conjugate matrix Zi∗ . Therefore, the
2.3. The exponential eAt 15
exponential eAt can be decomposed into two summations that include, respectively, the contribution
of real eigenvalues and the contribution of complex eigenvalues:
r n−1
Zi eλi t + (Zi eλi t + Zi∗ eλi t ),
X X ∗
eAt = (2.39)
i=1 i=r+1, step 2
From this expression one can see that the exponential of a real matrix is always a real matrix, as
expected.
In conclusion, from the analysis of the eigenvalues of a matrix we can obtain important
information about the natural response of the system, which depends on the modes eλi t .
λn
0 0 0
This is no longer true in general when there are coincident eigenvalues: in this case, we can only
“block-diagonalise” A in the following way
J1 0 0 0
0 J 0 0
2
A = TJT , −1
J = ,
0 0 . . . 0
(2.41)
0 0 0 Jn
where the blocks Jk are of the form
λk 1 0 0
0 λ 1 0
k
Jk = .. .
(2.42)
0 0 . 1
λk
0 0 0
Then, we say that the matrix J is in Jordan canonical form, or in Jordan normal form.
Example 2.7. (Jordan form.) The following matrix is in Jordan form
2 0 0 0 0 0 0 0
0 2 1 0 0 0 0 0
0 0 2 1 0 0 0 0
0 0 0 2 0 0 0 0
A =
0 0 0 0 3 0 0 0
0 0 0 0 0 3 0 0
0 0 0 0 0 0 3 1
0 0 0 0 0 0 0 3
16 Chapter 2. Systems of differential equations
In the presence of multiple eigenvalues, a fundamental parameter is the ascent deg(λk ) of the
eigenvalue λk , defined as the maximum size of the block associated with λk in the Jordan form. In
Example 2.7, we have
deg(2) = 3 and deg(3) = 2.
M deg(λk )−1
Zk j t j eλk t
X X
eAt = (2.43)
k=1 j=0
where M is the number of distinct eigenvalues and deg(λk ) the ascent of each of them.
The function
t j eλk t
Example 2.8. The modes associated with matrix A in Example 2.7 are:
• λ2 = 3: e3t , t e3t
We now have an expression for the impulse response matrix. In the case of distinct eigenvalues,
n
Qi eλi t ,
X
W(t) = CeAt B = Qi = CZi B. (2.44)
i=1
m deg(λk )−1
Qk j t j eλk t
X X
W(t) = CeAt B = Qk j = CZk j B. (2.45)
k=1 j=0
The modes appear in the impulse response matrix as well, hence they affect not only the natural
response, but also the forced response of the system.
2.4. Stability 17
2.4 Stability
Consider a linear time-invariant system with given initial condition and input:
x̄(0) known
Denote by x̄(t) the corresponding solution. Assume now to perturb the initial condition: x(t) , x̄(t)
will then be the new solution of the new system
The main question is how the two solutions are related: do they tend to stay close, to get closer, or
to split apart? To investigate this problem, we can study the difference of the two solutions,
and its behaviour as t → +∞. If we take the derivative of z(t), we get the following relation:
ż(t) = ẋ(t) − x̄˙(t) = Ax(t) + Bu(t) − A x̄(t) − Bu(t) = A(x(t) − x̄(t)) = Az(t) (2.46)
Observation 2.1. The difference between the nominal solution and the perturbed solution evolves
as the natural response of the system, regardless of the input u(t).
Definition 2.1.
• The system is stable if ∀ ε > 0 ∃ δ > 0 such that, if ∥x(0) − x̄(0)∥ = ∥z(0)∥ < δ, then
∥x(t) − x̄(t)∥ = ∥z(t)∥ ≤ ε.
• The system is asymptotically stable if the previous condition holds and moreover, for ∥z(0)∥ <
δ, we have lim ∥z(t)∥ = 0;
t→+∞
Graphically, the situation is shown in Figure 2.4. For any sphere Sε of radius ε > 0, there
must exist a smaller sphere Sδ of radius δ > 0 such that, for any perturbation inside Sδ , the system
solution is confined within Sε . If, on top of this, z converges to 0, then the system is asymptotically
stable (see Figure 2.5).
Stability can be defined as a property of the system for linear systems only. In the nonlinear
case, it is only possible to discuss stability of a given equilibrium point. A nonlinear system may
have both stable and unstable equilibrium points, such as the pendulum in the upper and lower
positions.
Example 2.10. (The pendulum.) Figure 2.6 represents the pendulum in the lower equilibrium
position (on the left) and the inverted pendulum in the upper equilibrium position (on the right).
For small oscillations and small perturbations, the systems corresponding to the two cases can be
considered linear. The “linearised” system associated with the lower position is stable. Conversely,
the “linearised” system associated with the upper position is unstable, because for any disturbance,
no matter how small, the difference between nominal solution and perturbed solution will leave a
small sphere of radius ε.
18 Chapter 2. Systems of differential equations
z1
ε
δ
z(0)
z2
z1
ε
δ
z(0)
z2
Since the difference between nominal solution and perturbed solution evolves as the natural
response, stability can be analysed by considering the modes of the system.
σ(A) = {λ1 , . . . , λn }.
We have to remind that any eigenvalue can be written as λ = ξ + jω, where ω = 0 if the
eigenvalue is real; we denote as ℜ(λ) the real part of a complex number. Hence, the most general
expression of a mode is
tk eλt = tk eξt [cos(ωt) + j sin(ωt)]
• if ℜ(λ) = 0, then |tk eλt | → ∞, unless k = 0, since in this case we have |t0 eλt | = |eλt | = 1.
To have asymptotic stability, all of the modes must converge to 0; to have stability, they must be
bounded. Then, the following fundamental properties hold.
Theorem 2.1. • The system is asymptotically stable if and only if, for any λ ∈ σ(A), we have
ℜ{λ} < 0.
• The system is stable if and only if, for any λ ∈ σ(A), we have ℜ{λ} ≤ 0 and, moreover, if
some λ ∈ σ(A) is such that ℜ{λ} = 0, then it must be deg(λ) = 1.
• The system is unstable if either there exists λ ∈ σ(A) with ℜ{λ} > 0 or there exists λ ∈ σ(A)
with ℜ{λ} = 0 and deg(λ) > 1.
We stress that marginal stability should be carefully considered and it cannot be enough for
engineering applications. Indeed, infinitely small perturbations of the system parameters can bring
the eigenvalues with zero real part to the unstable (right) half-plane where ℜ(λ) > 0. In addition,
marginal stability does not guarantee the damping of the modes, i.e., convergence, but only their
boundedness.
The ascent of the eigenvalues having zero real part is equal to 2: hence, the system is unstable. If
we replace the “1” entries with two zero entries, the system becomes stable (marginally).
20 Chapter 2. Systems of differential equations
We stress that, for computing the transform, it is essential that the matrices A, B, C, D are
constant over time, meaning that the system is linear and time-invariant. Then we get
which expresses the system state in terms of the Laplace transform. If we compare this with the
result obtained in the time domain, we can observe the following matches:
L
eAt −→ (sI − A)−1
Z t
L
eA(t−σ) Bu(σ)dσ −→ (sI − A)−1 Bu(s) (2.49)
0
N(s)
where W(s) = is a matrix of rational transfer functions (where each entry expresses the ratio
d(s)
between the Laplace transform of an output and the Laplace transform of an input). The term d(s)
is the characteristic polynomial of matrix A.
The elements of matrix W(s) are proper transfer functions, that is, the degree of numerator is
less than or equal to the degree of the denominator:
deg(ni j ) ≤ deg(d).
In this case, the functions are called strictly proper. To summarise, the matrix of transfer functions
W(s) is proper, and it is strictly proper (it has all strictly proper components) if and only if D = 0.
The transfer function can be computed as follows. Consider the case with a single input and a
single output m = p = 1
To prove the last equation let ψ(s) (sI − A)−1 B and note that
n(s)
= C(sI − A)−1 B + D = Cψ(s) + D
d(s)
then
ψ(s)
" # " #
(sI − A) −B 0
= where o = 1
n(s)
C D o d(s)
Now let us pretend to ignore the value of o = 1 and let us apply Cramer’s rule to determine o
(sI − A) 0
det n(s)
C d(s)
o= " #
(sI − A) −B
det
C D
Now we suddlently remind that o = 1 and we notice that the numerator is the determinant of a
block–triangular matrix, hence
" #
(sI − A) 0 n(s) (sI − A) −B
= det(sI − A) = n(s) = det
det n(s)
C d(s) d(s) C D
It is not difficult to see that for generic m and n the numerators polynomials are
" #
(sI − A) −B j
ni j (s) = det
Ci Di j
where σ is a complex number. Note that, if σ = 0, this input signal is the unit step. If σ = jω, we
have
e jωt = cos(ωt) + j sin(ωt).
Both are meaningful signals to test the system.
From the well-known properties of the Laplace transform, we have:
1
uσ (s) =
s−σ
Assuming σ < σ(A) (σ is not in the spectrum of A, namely, it is not an eigenvalue), we obtain:
1 1 1
y(s) = W(s) = W(σ) + (W(s) − W(σ)) (2.52)
s−σ s−σ s−σ
22 Chapter 2. Systems of differential equations
It can be shown that the second term does not have poles at s = σ, since the term s − σ cancels out.
Then
1
y(s) = W(σ) + W̃(s), (2.53)
s−σ
ñ(s)
where W̃(s) = and p(s) is the characteristic polynomial of matrix A. Hence, the poles of W̃(s)
p(s)
are in the spectrum of matrix A. By applying the inverse Laplace transformation, we get:
y(t) = W(σ)eσt + W̃(t), (2.54)
where W̃(t) is a linear combination of the modes. In the case of distinct eigenvalues, we have
n
σt
q̃i eλi t .
X
y(t) = W(σ)e + (2.55)
i=1
The first term is called steady-state response, while the second is the transient response and
depends on the modes only. If the system is asymptotically stable, the transient response tends to
zero as t → +∞.
In particular, the steady-state response to the test signal for σ = jω is
y jω (t) = W( jω)e jωt = |W( jω)|e jωt+φ( jω) =
= |W( jω)| cos(ωt + φ( jω)) + j|W( jω)| sin(ωt + φ( jω)). (2.56)
This means that, if the input is a sine or cosine wave of pulsatance ω, the resulting output is a sine
or cosine with the same pulsatance, amplified by a factor |W( jω)| and shifted by an angle equal to
φ( jω)) = arg{W( jω)}. This can be represented in terms of phasors, as shown in Figure 2.7.
Im
jωt
W(jω ) e
t
ϕ ejω
Re
As in the case of continuous-time systems, the variables can be expressed in a vector form,
x(k) ∈ Rn , u(k) ∈ Rm , y(k) ∈ R p . Then, the discrete-time equations are
x(k + 1) = f (k, x(k), u(k))
(
(2.57)
y(k) = g(k, x(k), u(k))
Again, this notation is equivalent to the following set of equations
xi (k + 1) = fi (k, x1 (k), . . . , xn (k), u1 (k), . . . , um (k)) for i = 1, . . . , n
y j (k) = g j (k, x1 (k), . . . , xn (k), u1 (k), . . . , um (k)) for j = 1, . . . , p
where τ is a small parameter, represent a nonlinear discrete-time system. If we assume that the
time variables are taken from a continuous time axis that has been discretised with step τ,
t = kτ, x(k) = x(kτ), u(k) = u(kτ),
and τ is omitted to have a simpler notation, then this system is the Euler approximating system of
the equations (2.6). For τ small enough, the sequence x(kτ) approximates the exact solution of the
system (2.6).
In general, given any system ẋ(t) = f (x(t), u(t)), we can numerically approximate its solution
by means of the Euler approximating system
x((k + 1)τ)) = x(kτ)) + τ f (x(kτ), u(kτ))
This is the simplest method to numerically compute the solution of a continuous-system (of course,
there are more sophisticated methods that can be used).
xL (k + 1) = AxL (k)
(
(2.61)
xL (0) = x(0) known
We have
x(k) = xL (k) + xF (k)
It is not difficult to verify that the general solution is:
k−1
X
x(k) = Ak x(0) + Ak−h−1 Bu(h)
h=0
k−1
X
y(k) = CAk x(0) + CAk−h−1 Bu(h) + Du(k) (2.63)
h=0
Assume that matrix A has n distinct eigenvalues. Then there are n linearly independent eigenvectors
that we can group in an invertible matrix T
T = [t1 , t2 , . . . , tn ]
Let us denote ⊤
s1
s⊤
S = T −1 = 2
:
s⊤
n
as before. We remind that Ak = T Λk S . Hence, along the same lines as in the previous computation
for the continuous-time case, we find
n
X
Ak = Zi λki , (2.64)
i=1
where Zi = ti s⊤
i . The sequences λi are called modes of the discrete-time system, or discrete-time
k
modes.
As expected, the modes affect both the natural response and the forced response. Indeed, for
any eigenvalue λ ∈ C we have
λ = |λ|e jθ ,
where θ = 0 if the eigenvalue is real. Then
Note that the magnitude of this sequence is increasing if |λ| > 1 or decreasing if |λ| < 1 and
constant if |λ| = 1. Then we can already see the similarity of the theory for continuous and discrete
systems: the only difference is that the real and imaginary part of eigenvalues are considered in
the continuous-time case, while the magnitude and phase of the eigenvalues are considered in the
discrete-time case.
In the case of distinct eigenvalues, we can write the following expression for Ak
r
X n−1
X
A =
k
Zi λki +2 |λi |k (Mi cos(θi k) − Ni sin(θi k)) (2.65)
i=1 i=r+1, step 2
Note that
k(k − 1) . . . (k − h + 1)
!
k
= = ph (k)
h h!
is a polynomial in k of degree h. The maximum degree is the ascent of the eigenvalue.
The expression for the modes can be obtained by taking into account that, for any matrix A,
A = T J k S , where J is in Jordan form. Raising to a power k a matrix in Jordan form, we get
k
J k = blockdiag{J1k , J2k , . . . , J sk }
a block diagonal matrix with the powers of the Jordan blocks. For each Jordan block
k !
X k
(λI + J0 )k = λk−h J0h
h
h=0
where J0 is
...
0 1 0 0
0 0 1 ... 0
.. .. .. ..
J0 = ..
.
. . . .
...
0 0 0 1
...
0 0 0 0
It is easy to check that, for h larger than the ascent of the eigenvalue, we have J0h = 0.
0 0 0 3 1
0 0 0 0 3
The three modes associated with the corresponding discrete-time system are
! !
k k
3,k
3 = p1 (k)3 ,
k k
3k = p2 (k)3k .
1 2
26 Chapter 2. Systems of differential equations
Each element Wi j (k) = Ci Ak B j is the response of the i-th output when the discrete impulse
{1, 0, 0, . . . , 0} is applied as the j-th input.
• stable if and only if ∀ λ ∈ σ(A) we have |λ| ≤ 1 and, if |λ| = 1, then deg(λ) = 1;
• unstable if and only if there exists either λ ∈ σ(A) with |λ| > 1, or λ ∈ σ(A) with |λ| = 1 and
deg(λ) > 1.
x = T x̂
Applying this transformation to a linear autonomous system, we get:
 = T −1 AT (2.69)
B̂ = T −1
B (2.70)
Ĉ = CT (2.71)
D̂ = D (2.72)
2.8. Sampled-data systems 27
Note that matrix D is unchanged. This was expected, because D represent the relationship between
y(t) and u(t), which are not transformed.
Note also that, in the transition to new representation, matrix A undergoes a similarity transfor-
mation. Characteristic polynomial and (thus) eigenvalues are invariant under this transformation,
hence the modes and the stability properties of the system are unchanged. Also the system
transfer function matrix is unchanged, as expected since input and output are unaltered by the
transformation.
t kTs
The block marked with A/D is an analog-to-digital converter and the implemented operation
is called sampling. It is assumed here that the signal is sampled with a fixed step T s . In general
it is also possible that a vector signal (multiple input channels) is sampled with different rates
for different components. These are called multi-rate systems, a case we will not consider. The
sampling operator is linear, therefore it does not compromise the linearity of the system:
A/D
f (t) −→ f (kT s )
A/D
α f (t) + βg(t) −→ α f (kT s ) + βg(kT s ) (2.73)
A basic scheme of an analog-to-digital converter is depicted in Figure 2.9. When the START
signal switches to 1, it enables a ramp generator and a counter. The counter is stopped when the
value r reaches the signal s. The counter provides then an integer number s∗ proportional to s (with
a roundoff error). The time required for conversion must be much smaller than the sampling time
and it must be very small compared to the inverse of the signal bandwidth.
LEVEL
SIGNAL COMPARATOR
RAMP
COUNTER
GENERATOR
of degree N − 1) that passes through these N data points. In the case of polynomial interpolation,
this reduces to the following linear equations
that allow us to determine the coefficients of the interpolating polynomial. However, in order to
apply this method and find the polynomial, we must know all of the N samples. Then this method
has to be adopted off-line. This is obviously not feasible in real time applications. It is necessary
to find a way to convert on-line the samples, to generate the continuous-time signal in real time.
An easy way to convert on-line is to use the so-called zero order hold (Z.O.H.). This method
simply creates a piecewise constant function, whose value is equal to the value of the last available
sample (see Figure 2.10).
kTs t
This operation creates from the samples f (kT s ) a piecewise constant function whose value is
There are also higher-order holders (see Figure 2.11 for the case of order 1), but nowadays the
sampling time can be assumed so small that the information lost by adopting zero order holders is
practically negligible (given that the error decreases when T s decreases, as shown in Figure 2.12).
In fact, methods based on higher order holders are seldom used.
kTs t
2.8.3 Aliasing
We now briefly recall the problem of aliasing, which has to be carefully considered when we use
a sampling device. We consider the case of a sinusoidal signal. This is not restrictive, since it
is known that periodic functions can be described by a Fourier series expansion that consists of
harmonic functions, and the most reasonable signals admit a Fourier transform that expresses their
harmonic content.
Let us denote by
2π
Ωc =
Ts
the sampling pulsatance. Consider the continuous-time signal cos(ω1 t): by sampling the signal
with step T s , we obtain a sequence cos(ω1 kT s ). It is easily seen that the same sequence can be
obtained if we sample, with the same step T s , a signal cos(ω2 t) with a different pulsatance ω2 ,
provided that the following equality holds:
ω2 − ω1 = m ΩC , m∈Z
holds, the two signals are indistinguishable under sampling. In general, if a signal includes two
components of this kind, it is impossible to correctly reconstruct the signal.
|f|
ω
−ω ω
Signals processed in real problems typically are band-limited: their Fourier transform, or their
spectrum, has a bounded support, as is qualitatively shown in Figure 2.13. A band-limited signal can
always be fully reconstructed from its samples, provided that a fundamental condition is satisfied
(Nyquist-Shannon sampling theorem). For a band-limited signal whose band is between −ω̄ and
ω̄, reconstruction is possible after sampling as long as
because in this case (2.75) can be satisfied only for m = 0, hence ω2 = ω1 . Replacing ω̄ = 2π f¯ and
Ωc = 2π fc , where f¯ is the maximum signal frequency and fC is the sampling frequency, we get
f¯ < f2C or
fC > 2 f¯, (2.77)
namely, to be able to fully reconstruct the signal after sampling, the sampling frequency must
exceed twice the maximum frequency in the band-limited signal. The minimum sampling frequency
fCmin = 2 f¯ is called the Nyquist rate. This fundamental result is a consequence of the sampling
theorem, stating that the continuous-time signal is completely recoverable, at least in principle,
starting from the individual samples provided that the condition above is satisfied.
The proof of sampling theorem, due to Shannon in 1949, was a fundamental step for signal
theory and telecommunications, because it allowed the transition from analog to digital signals
processing.
fC
One final consideration concerns the condition f¯ < and its applicability. In reality, being
2
the signals unknown and unpredictable, we cannot know the signal bandwidth in advance. In
these cases, however, once the sampling frequency of the devices is known, the received signal is
pre-filtered in order to eliminate all of the spurious spectral components whose frequency is higher
fC
than . This filtering effect often occurs naturally in many devices, as microphones or sensors.
2
Otherwise, the introduction of an analog filter is necessary.
Example 2.16. The frequencies audible by human ears are up to about 20 kHz. This means
that each spectral component whose frequency is above this value is not detectable by humans.
Microphones have a cutoff frequency of about 20 kHz, so basically greater frequencies are not
recorded. In view of the condition fC > 2 f¯, the sampling frequency for digital music is usually
chosen as fC = 44, 1 kHz.
PROCESS
D/A A/D
REGULATOR
has then a constant input during the sampling interval. However, this does not mean that x(t) and
y(t) are constant during the sampling interval as well. We can only observe that x(t) is continuous
and is differentiable everywhere, with the exception of the points kT s (because u is not continuous at
these points). The output y(t) of the continuous-time process enters the analog-to-digital converter,
and for this reason we can consider it to be relevant at instants kT s that are multiples of the sampling
time T s . So, we look at the relationship between u(kT s ), x(kT s ), x((k + 1)T s ) and y(kT s ).
If u(kT s ) and x(kT s ) are known, the continuous-time system solution at a time t > kT s is
Z t
x(t) = e A(t−kT s )
x(kT s ) + eA(t−σ) Bu(σ)dσ (2.78)
kT s
The time value kT s has now been taken as the initial time, instead of t = 0 (this is allowed because
the system is time invariant). If we evaluate this expression for t = (k + 1)T s , we get:
Z (k+1)T s
x((k + 1)T s ) = e AT s
x(kT s ) + eA((k+1)T s −σ) Bu(kT s )dσ, (2.79)
kT s
where we have set u(σ) = u(kT s ) because the input is constant in the integration interval [kT s , (k + 1)T s ).
Hence, u(kT s ) can be taken outside the integral
"Z (k+1)T s #
x((k + 1)T s ) = e AT s
x(kT s ) + e A((k+1)T s −σ)
Bdσ u(kT s ) (2.80)
kT s
and the term in brackets can be simplified by means of the change of variables (k + 1)T s − σ = ξ
Z (k+1)T s Z 0 Z Ts
e A((k+1)T s −σ)
Bdσ = e B(−dξ) =
Aξ
eAξ Bdξ (2.81)
kT s Ts 0
where Z Ts
AD = eAT s , BD = eAξ Bdξ, C D = C, DD = D (2.83)
0
The graphic representation of the equivalent discrete-time system is shown in Figure 2.15.
s s
,D)
Observe that the discrete-time system we have found is exactly equivalent to the continuous-
time system to which the D/A and A/D converters have been applied (before the system and after
the system, respectively), resulting in the digital input u(kT s ) and the digital output y(kT s ). Also,
note that the matrices C and D are unchanged.
These results are very important in systems and control theory, since they allow us to design
a regulator indifferently in the continuous- or in the discrete-time domain. Nowadays, a digital
implementation is highly preferred for its flexibility, reliability and cheapness.
It can be shown that asymptotic stability of the continuous-time system represented by ma-
trices A, B, C, D is equivalent (necessary and sufficient condition) to asymptotic stability of the
discrete-time system with matrices AD , BD , C D , DD . This is true because, if A has eigenvalues
{λ1 , λ2 , . . . , λn }, then AD = eAT s has eigenvalues {eλ1 T s , eλ2 T s , . . . , eλn T s } and, if λk has a negative
real part, then the modulus of eλ1 T s is smaller than 1 (and vice-versa).
RT
Example 2.17. (Calculation of the integral 0 s eAξ Bdξ.)
Using the expression eAξ = T eΛξ S that we have previously derived, we get:
Z Ts Z Ts "Z Ts #
Λξ Λξ
e Bdξ =
Aξ
T e S Bdξ = T e dξ S B
0 0 0
and then we need only to calculate the individual integrals of the exponential eΛt , which are placed
on the diagonal.
Z Ts h i
Example 2.18. (Formula for A invertible.) If A is invertible, we have eAt dt = A−1 eAT s − I .
0
This can be verified by considering that
+∞ +∞ k +∞
d At d X (At)k X A X Ak
e = = kt k−1
= tk−1 =
dt dt k=0 k! k=0
k! k=1
(k − 1)!
+∞ +∞
X Ak−1 k−1 X (At)h
=A t = A = A eAt
k=1
(k − 1)! h=0
h!
d h −1 At i
In fact , we have that A e = eAt , hence the definite integral between 0 and T s is the proposed
dt
expression.
2.9. Discrete-time equivalent of a continuous-time system 33
ẋ(t) = e(t)
(
1. Initialise x;
2. read e;
3. compute u = KI x + KP e;
5. update x := x + T s e;
Dynamical systems
v R v R
Example 3.1. Consider Figure 3.1, in which two different types of electrical circuit are represented,
the first including just a resistor R and the second formed by a simple R-L circuit. The laws
governing the two circuits are:
v(t)
• for the first system, i(t) = ;
R
Z t
di(t) 1
• for the second system, L = v(t) ⇒ i(t) = i(t0 ) + v(σ)dσ.
dt L t0
In both cases, we can take as input (cause) the voltage and as output (effect) the current. To
compute the output of the R circuit, we only need to know the function v(t). However, the R-L
system is governed by a differential equation and the knowledge of v(t) is not enough to uniquely
determine the value of the current. In fact, we also need the value of i(t0 ), the initial condition of
the system, for some initial time t0 . These type of systems, for which it is necessary to know the
initial conditions at a given initial time instant, are called dynamical.
For a dynamical system, the evolution after a time t0 depends on both the input and the past
history of the system, and not only on u(t). One question we might ask is: besides u(t), do we
need to know the entire past history of the evolution of the system in order to calculate its future
evolution? The answer is no: if we are interested in what happens after an initial time t0 , it is
35
36 Chapter 3. Dynamical systems
enough to know the state of the system at t0 : information concerning the previous instants is
redundant. This concept is the notion of state of the system.
State of the system (meta-definition) The state of a system at time τ is given by all the
information we need in order to uniquely determine the future evolution for t > τ, given the input
function u(t).
Example 3.2. In the case of the R-L circuit, a state variable is the current i(t). Indeed we can write
Z t Z t0 Z t Z t
1 1 1 1
i(t) = v(σ)dσ = v(σ)dσ + v(σ)dσ = i(t0 ) + v(σ)dσ (3.1)
L −∞ L −∞ L t0 L t0
where we assumed i(−∞) = 0. Note that we can arrive at the same value i(t0 ) via completely
different trajectories, but this does not affect the future evolution.
• A set of times T , which is totally ordered (that is, if t1 , t2 , then either t1 < t2 or t2 < t1 ). In
our case, we mainly consider T = R or T = Z. Clearly, any sequence of ordered instants tk ,
not necessarily equi-spaced, is also appropriate.
• A set of states X. It can be any set (finite or not). We will typically use Rn .
• a set of inputs U. It can be any set (finite or not). We will mainly adopt Rm .
φ:T ×T ×X×Ω→ X
(
(3.2)
x(t) = φ(t, τ, x(τ), u(·))
where t is the current time, τ the initial instant, x̄ the initial state. The notation u(·) indicates the
dependence on the entire function and not only on its value at time t. To define a dynamic system,
the transition function must satisfy the following axioms.
• Consistency:
φ(τ, τ, x̄, u(·)) = x̄ ∀ τ ∈ T, x̄ ∈ X, u ∈ Ω (3.3)
In essence, at the initial time t = τ the function must give the initial state x(τ) = x̄.
3.2. Causal dynamical systems 37
η:T ×X×U →Y
(
(3.7)
y(t) = η(t, x(t), u(t))
If y(t) = η(t, x(t)), the system is said strictly proper (in the case of linear systems, this means that
matrix D is equal to zero).
Example 3.3. The axioms above can be checked for the known expression of the solution of a
linear time-invariant system
Z t
x(t) = e A(t−t0 )
x(t0 ) + eA(t−σ) Bu(σ)dσ
t0
• x(t) is surely defined for t ≥ t0 because the integral is defined for these values; in this case
the system is reversible, so it is defined for t < t0 as well;
• if u1 (t) = u2 (t) in an interval [t1 , t2 ], then the integral does not change by taking different
values u1 (t) , u2 (t) outside the interval, so we have causality.
The properties of the transition function are also verified for discrete-time systems. In this case,
the exact calculation of φ is possible by recursion. However, for discrete-time systems the property
of reversibility, typically verified in continuous-time, may fail. For example, the system described
by the equation
x1 (k + 1)
" # " #" #
0 1 x1 (k)
=
x2 (k + 1) 0 0 x2 (k)
is non-reversible, because the state matrix (A) is not invertible.
x(τ) known
(which is not a transition function) can be associated with a dynamical system. Under the assump-
tions of existence and uniqueness of the solution, x(t) is uniquely determined by the input and by
x(τ). Therefore, in principle there exists a function x(t) = φ(t, τ, x(τ), u(. . .)), which is precisely
the transition function, even though most of the times it is impossible to know or to calculate
analytically, without resorting to some numerical technique.
A mathematical problem that arises when we deal with differential equations is that, in patho-
logical cases the uniqueness of the solution might be not insured. For example, the differential
equation √
ẋ(t) = x(t)
(
x(0) = 0
has infinite solutions. This happens because the considered function f is not Lipschitz. This initial
value problem is therefore not a candidate to describe a dynamic system. The differential equation
ẋ(t) = x(t)2
(
x(0) = 1
has a unique solution but it is not defined for all t > 0. Hence, this is not a candidate to describe a
dynamic system if we take as T the real axis.
U = {u1 , u2 , . . . , un }
Y = {y1 , y2 , . . . , y p }
X = {x1 , x2 , . . . , xm } (3.8)
that provides the state at the next time instant given the current time, the current state and the
current input. In the case of time-invariant automata, the expression has the form
There are basically two ways to effectively represent an automaton: a table or a graph that represent
the function F.
The table is a m × n matrix, whose n columns are associated with the system states, and whose
m rows with the inputs. Every element Fi j of this matrix, called transition table, represents the
future state in the case the current automaton state is x = j and the current input is u = i.
x1 x2 ... xn
u1 F11 F12 ... F1n
u2 F21 F22 ... F2n
.. .. .. .. ..
. . . . .
um Fm1 Fm2 ... Fmn
The complete description of the automaton can be also given, as said, in terms of flow graph.
Consider for example Figure 3.2, where X = {1, 2, 3, 4}, U = {1, 2, 3}, Y = {0, 1}. This graph
1 1,2 2
1,2 1 1 3
3 3
1,3
1 3 4
0 2 0
2
The four possible states are represented as circles divided in two parts: the upper part shows the
state index, the lower shows the output value associated with that state. Every input changes state
of the system in accordance with the direction of the arcs. Each arch is associated with the value
of input that causes the transition. It is important to note that, in this case, the output is linked to
the current state only by an equation of the type y = g(x), and then the system is proper. It is also
possible to consider automata where the output depends on both the state and the input y = g(x, u).
The output of such a system can be represented by a matrix as well. The representation by means
of flow graphs can be quite complex if the system has a high number of states.
40 Chapter 3. Dynamical systems
Example 3.4. (Recognition of a string.) Suppose we want to realise a finite state machine that
recognises the string 358 within a longer string. The sets U, Y, X are:
U = {0, 1, 2, . . . , g}
Y = {0, 1}
X = {1, 2, 3, 4}
where the output is 0 if the string is not recognised and 1 if the string is recognised. The flow graph
is shown in Figure 3.3.
U−{3} 3
3 5 8
0 0 0 1
U−{5,3} U−{8}
U
Example 3.5. (Exercise: sum of two binary sequences.) Suppose we want to calculate the sum of
two sequences of bits that enter the machine, starting from the least significant digits. Sets U, Y, X
are:
( ! ! ! !)
0 1 0 1
U = , , ,
0 0 1 1
Y = {0, 1}
X = {A, B, C, D}
The reachability and the observability problem are concerned with the relationships between input
and state and between state and output, respectively. Hence, these two problems affect the input-
output relationship. To understand the importance of these aspects, consider the following problem.
Assume that matrices A (2 × 2), B (2 × 1) and C (1 × 2) are given and produce the input-output
relation
s−1 1
y(s) = u(s) = u(s)
(s + 2)(s − 1) (s + 2)
expressed in terms of transfer function. The zero-pole cancellation reveals something pathological
in the system. Although λ = 1 appears as a pole in the first expression, hence it is an eigenvalue of
A, the cancellation implies that this pole does not affect the input-output behaviour. Indeed, the
impulse response is
W(t) = e−2t
At the end of the chapter we will understand that, in this situation, “something wrong” must occur
in either the relation between input and state or the relation between state and output (or both).
In this section we will consider the following basic problem: given an initial state x̄1 and a target
state x̄2 , is there any choice of the input u that allows us to reach x̄2 ? If the answer is yes, we
say that x̄2 is reachable from x̄1 and that x̄1 is controllable to x̄2 . Formal definitions are given
below for continuous-time systems. These definitions consider the reachability from zero and the
controllability to zero. As we will see, they allow for a complete characterisation of the problem.
Definition 4.1. The state x̄ is reachable (from zero) in the time interval [0, τ] if ∃ u(·) such that
x(0) = 0 ⇒ x(τ) = x̄.
Definition 4.2. The state x̄ is controllable (to zero) in the time interval [0, τ] se ∃ u(·) such that
x(0) = x̄ ⇒ x(τ) = 0.
Definition 4.3. Given two states x̄1 and x̄2 , we say that x̄1 is controllable to x̄2 and that x̄2 is
reachable from x̄1 in the time interval [0, τ] if ∃ u(·) such that x(0) = x̄1 ⇒ x(τ) = x̄2 .
41
42 Chapter 4. Reachability and Observability
Note that, if x̄1 is controllable to zero and x̄2 is reachable from zero, then x̄2 is reachable from
x̄1 . Later, we will show that reachability and controllability properties are equivalent.
We now define the following set
The set Xr (τ) is a subspace of Rn . Indeed if x̄1 is reachable in [0, τ] with input u1 (·) and x̄2 is
reachable in [0, τ] with input u2 (·), then α x̄1 + β x̄2 is reachable in [0, τ] with input αu1 (·) + βu2 (·),
given the linearity of the system.
This property can be verified by observing that the set of states that are reachable from zero can
be expressed as follows: Z τ
x̄(τ) = 0 + eA(t−σ) Bu(σ)dσ (4.1)
0
Given the linearity of the integral, we notice that the whole set Xr (τ) is actually a subspace of Rn .
The reachable states form a subspace
( Z τ )
Xr (τ) = x̄ = e A(t−σ)
Bu(σ)dσ
0
If B has dimension n × m and A has dimension n × n, then R has dimension n × (n · m). We remind
that the range or image of a matrix M is the subspace Ra(M) = {y : y = Mx}. The following
fundamental theorem holds.
Theorem 4.1. Xr (τ) = Xc (τ) = Ra(R) for each τ > 0.
Proof To prove the statement of the theorem, we equivalently demonstrate Xr⊥ (τ) = Ra(R)⊥ .1
Reachable states can be expressed as
Z τ
x̄ = eA(τ−σ) Bu(σ)dσ
0
We have: ( Z τ )
Xr⊥ (τ) = z: z ⊤
e A(τ−σ)
Bu(σ)dσ = 0, ∀ u(·)
0
1
This equivalence holds in finite-dimensional spaces in which the orthogonal of the orthogonal of X is (X ⊥ )⊥ = X.
This is not true in infinite-dimensional spaces.
4.1. Reachability of continuous-time systems 43
We can characterise all of the elements of the orthogonal space using the following result:
Z τ
z⊤ eA(τ−σ) Bu(σ)dσ = 0 ∀u(·) ⇐⇒ z⊤ eA(τ−σ) B ≡ 0 (4.4)
0
(≡ means identically 0 for all σ ∈ [0, τ]). The implication right to left is obvious. The implication
left to right is not. Then denote with W(σ) = z⊤ eA(t−σ) B. Since the equality on the left is true for
all inputs, can choose in particular u(σ) = W ⊤ (σ), to get:
Z τ Z τ Z τ
W(σ)u(σ)dσ = W(σ)W (σ)dσ =
⊤
∥W(σ)∥2 dσ = 0 (4.5)
0 0 0
Since the value ∥ · ∥ is always non negative and is zero only if the argument is the zero vector, we
have that W(σ) = z⊤ eA(τ−σ) B = 0, ∀ σ ∈ [0, τ], the condition on the right.
Considering the expression of the matrix exponential, we can write:
+∞ +∞ ⊤ k
X Ak (τ − σ)k X z A B
⊤
z B ≡ 0 ⇐⇒
(τ − σ)k ≡ 0 (4.6)
k!
k=0
k! k=0
In view of the principle of identity for power series this equality is true if and only if
z⊤ A k B = 0 ∀k ≥ 0 (4.7)
From Cayley-Hamilton identity, the powers Ak with k ≥ n can be expressed as a linear combination
of the first n powers of A. Therefore the previous condition holds true if and only if it is verified for
k = 0, 1, . . . , n − 1. Putting these n zero terms together we have
h i
z⊤ B| z⊤ AB| z⊤ A2 B| . . . | z⊤ An−1 B = 0
h i
⇐⇒ z⊤ B|AB|A2 B| . . . |An−1 B = 0
⇐⇒ z⊤ R = 0 (4.8)
This is equivalent to saying that any vector z⊤ , belonging to the orthogonal subspace of Xr (τ), is
orthogonal to the columns of R, hence orthogonal to Ra(R). On the other hand, all the previous
implications are reversible and therefore any vector z⊤ , belonging to the orthogonal subspace of R,
is orthogonal to Xr (τ). Hence Ra(R)⊥ = Xr⊥ (τ) and therefore Xr (τ) = Ra(R).
Along the same lines, using (4.2), we can arrive to the conclusion that Xc (τ) = Ra(R). □
Key points that emerge from the theorem are:
The fact that reachability does not depends on the time horizon is suspect. This would mean, for
example, that any state reachable by an aircraft can be reached in an arbitrarily small amount of
time. This is obviously not true: it is in contradiction with the physical limits of the actuators in the
plane. The apparent contradiction can be explained by the fact that the theorem does not take into
account upper limits for the magnitude of the system input. If such limits are taken into account
(for instance, ∥u∥ ≤ umax ), then one can see that Xr (τ) is a bounded convex set that depends on τ.
44 Chapter 4. Reachability and Observability
It is not difficult to see that (as is physically obvious) this set is bounded if u is bounded and it gets
larger as we increase τ.
We have just seen that the subspaces Xr and Xc do not depend on τ, and are the image of
reachability matrix R.
Definition 4.4. A system is said reachable (resp. controllable) if all of the possible states are
reachable (resp. controllable).
In view of the previous theorem, since the reachable (controllable) space is the image of R, we
have the following.
Rank(R) = n (4.9)
This means that we have reachability of the whole space: all possible state vector for the system
can be generated by the columns of R, namely, the columns of R are a set of generators for Rn ).
This result is remarkable, because it transforms an analytical problem (finding the u to put in the
integral) into an algebraic problem (easily solvable via standard software).
If we apply the state transformation T to the system we get the new representation
˙
x̂(t) = Â x̂(t) + B̂u(t)
y(t) = Ĉ x̂(t) + D̂u(t)
where
 = T −1 AT
B̂ = T −1 B
Ĉ = CT
D̂ = D
We demonstrate now that ϕ1 and ϕ2 are zero matrices. If we start from zero initial conditions,
x̂r (0) = 0 and x̂nr (0) = 0, then after a time t > 0, by construction, only reachable states are reached.
In the new representation, these are of the form
" #
x̂r (t)
x=T
0
This means that x̂nr (t) = 0 for all t > 0 and then x̂˙nr (t) = 0 for all t > 0. Consider the second
equation in (4.13)
The first subsystem is the reachable subsystem, the second the unreachable subsystem. Note that
the unreachable subsystem influences the reachable one through the block Ar,nr .
The block diagram corresponding to the whole system is reported in Figure 4.1.
If a matrix is block-triangular, then its determinant is equal to the product of the determinants
of the diagonal blocks:
det(sI − Â) = det(sI − Ar ) det(sI − Anr ) (4.18)
The eigenvalues of Â, which are the same eigenvalues as A, are thus those of Ar and those of Anr ;
more precisely, we can split the eigenvalues in two distinct sets:
46 Chapter 4. Reachability and Observability
• {λ1 , λ2 . . . , λr } = σ(Ar ) are the reachable eigenvalues, associated with reachable modes;
• {λr+1 , λr+2 . . . , λn } = σ(Anr ) are the unreachable eigenvalues, associated with unreachable
modes.
This result has a fundamental consequence when the system has to be controlled. The evolution
of the second subsystem is completely independent of the input u and evolves in natural response
with modes σ(Anr ). As we will see, a feedback controller may change the reachable eigenvalues,
but not the unreachable ones (if any). Therefore, if the system has unstable unreachable modes, no
controller will be able to stabilise it.
u x&ˆr x̂r y
Br ∫ Cr
Ar,nr Ar
x̂nr
x&ˆnr ∫ Cnr
Anr
From the diagram in Figure 4.1, we can notice the absence of the interaction between the
input and x̂˙nr , which should be given by ϕ2 , and of the interaction between x̂r and x̂˙nr , which
should be given by ϕ1 . The part consisting of (Ar , Br , Cr ) is called reachable subsystem, while
that consisting of (Anr , 0, Cnr ) is called unreachable subsystem. A simplified block diagram is
depicted in Figure 4.2.
Both in the block diagram reported in Figure 4.1 and in its simplified version in Figure 4.2, there
is no arrow from u to the unreachable subsystem, in accordance with the definition of unreachable
state. Also, there is no arrow from the reachable subsystem to the unreachable one: in fact, this
would indirectly cause reachability of some states of the unreachable subsystem. Instead, no
information can reach the unreachable subsystem transiting through the reachable one. However,
note that the unreachable subsystem is able to influence the reachable subsystem (and the output of
the system). This motivates us to study stability of the unreachable subsystem as well (as said, if
the unreachable subsystem is not asymptotically stable, it is impossible to stabilise the system by
means of a feedback controller).
reachable
subsystem +
unreachable
subsystem
Figure 4.2: Simplified block diagram of the Kalman decomposition for reachability.
4.2. Kalman decomposition for reachability 47
It can be shown that the transfer function depends on the reachable subsystem only
W(s) = C(sI − A)−1 B + D = Cr (sI − Ar )−1 Br + D (4.19)
because cancellations occur related to eigenvalues associated with the unreachable subsystem. This
is obvious, because the transfer function represents the link between the system input and the
system output when the initial conditions are zero and, by definition, the unreachable subsystem is
not affected by the applied input.
Example 4.2. Consider the system with the following matrices:
" # " #
−1 1 1 h i
A= , B= , C = 1 0 , D = [0]
1 −1 1
The reachability matrix is equal to
" #
h i 1 0
R= B AB =
1 0
and its rank is 1 (hence, less than n = 2), therefore the system is not completely reachable. The set
of reachable vectors can be easily interpreted in a geometric fashion: it is bisector of the first and
third quadrant of the Cartesian plane.
We can complete the basis for R2 by choosing, together with the only linearly independent
column of R, any vector that is not linearly dependent on that column. For example, we can choose:
" #
1 1
T= ,
1 0
but also " # " #
1 0 1 −1
T= , or T=
1 1 1 1
are valid choices. Any vector of the state space, the plane R2 , can be expressed as a linear
combination of the two vectors in T .
Before applying T , let us consider the system transfer function.
d(s) = det(sI − A) = s2 + 2s
s + 1 −1 −1
" #
sI − A −B j
n(s) = det = det −1 s + 1 −1 = s + 2
Ci Di j
1 0 0
s+2 1
⇒ W(s) = =
s(s + 2) s
We see that there is a cancellation of the factor (s + 2). We expect that this is due to the lack of
reachability.
We can easily verify that matrix  = T −1 AT , calculated with a T chosen as above, gives
" #
0 #
 =
0 −2
where the underlined 0 is expected, and corresponds to the identically zero ϕ1 matrix, while the 0
and −2 on the diagonal are the eigenvalues of matrix A. The element # in the upper right position
depends on matrix T , and in particular on the choice of the second column. Similarly, B̂ = T −1 B
has the form " #
$
B̂ =
0
where, again, the zero 0 is expected since it corresponds to the identically zero matrix ϕ2 , while $
depends the chosen second column of T . The reader is invited to perform the computation with two
different T matrices among those proposed above.
48 Chapter 4. Reachability and Observability
Xr = Ra(R). (4.25)
Example 4.3. (Inventory with ageing.) Consider the system with the following matrices:
0 1 0 0
A = 0 0 1 , B = 0
0 0 0 1
The quantity u(k) is the supply of goods at time k, x3 (k) is the quantity of goods arrived the previous
day, x2 (k) is the quantity of goods arrived two days before, x1 (k) is the quantity of goods arrived
three days before. Then, the goods are eliminated due to ageing (in xh (k), h represents the number
of days for which the goods can survive). It is not difficult to see that the natural response Ak x(0)
goes to zero in finite time, as expected in a perishable goods inventory.
The set of states that are reachable in one step is
0
Xr (1) = Ra ([B]) = Ra 0
1
and can be geometrically interpreted as the set of vectors R3 on the z axis. The set of states that
can be reached in two steps is
h i 0 0
Xr (2) = Ra B AB = Ra 0 1
1 0
and, geometrically, is the set of vectors in the yz plane. Finally, the set of states that are reachable
in three steps is
h i 0 0 1
Xr (3) = Ra B AB A2 B = Ra 0 1 0
1 0 0
namely the whole R3 .
To summarise, in discrete time (A, B) is fully reachable if and only if Ra(R) = Rn , hence, if
and only if rank(R) = n. In addition, either a state can be reached in n or it cannot be reached at all.
The controllability problem in discrete time requires more caution. In fact, the set of controllable
states, for a discrete-time system, is different from the set of reachable sets, as can be seen from the
following example.
from which it is clear that the set of reachable states is the null set (only 0 can be reached). However,
the set of controllable states is equal to all R2 . Indeed, for u(k) = 0,
" #
0 0
x(k) = A x̄ = 0 for k ≥ 2 because A =
k k
for k ≥ 2.
0 0
Hence, any x(0) can be driven to zero in at most 2 steps. Matrix A in this example is nilpotent.3
The above example highlights the discrepancy between the sets Xr and Xc in discrete time. In
general, in fact, we have
Xr ⊆ Xc .
It can be proved that, if A is invertible (i.e., it has no null eigenvalues), then Xr = Xc in the
discrete-time case as well.
There is no a simple formula to express the set of all controllable states in T steps. This set is
the subspace of all vectors x̄ for which
T −1
X
0 = A x̄ +
T
AT −h−1 Bu(h)
h=0
Proof. It is very easy prove that the third condition is equivalent to the second. Obviously the
second implies the third. Now, if the third holds, then the rank condition holds even for λ < σ(A),
because in this case the matrix [λI − A B] has the full block λI − A having full rank.
We prove by contradiction that the first statement
h implies
i the third: if the third statement fails,
the first must fail as well.4 Assume that Rank λI − A B < n, namely, the n rows of this matrix
are not linearly independent. Therefore there exists a vector z⊤ , 0 such that:
h i
z⊤ λI − A B = 0
z (λI − A) = 0
( ⊤
z⊤ B = 0
3
Matrix A is nilpotent if Ak = 0 for some k. This is true if and only if all of its eigenvalues are zero.
4
{A} ⇒ {B} if and only if not{B} ⇒ not{A}.
4.4. Other reachability criteria 51
and then it appears that z⊤ is the left eigenvector of matrix A associated with the eigenvalue λ. We
can write
z⊤ A = λz⊤
z⊤ A2 = z⊤ A · A = λz⊤ A = λ2 z⊤
z⊤ A3 = z⊤ A · A2 = λz⊤ A2 = λ3 z⊤
..
.
z⊤ Ak = λk z⊤
and also
z ⊤ A k B = λk z ⊤ B = 0
Therefore,
h i h i
z⊤ B AB . . . An−1 B = z⊤ B z⊤ AB . . . z⊤ An−1 B = 0,
hence the reachability matrix R does not have full rank n, and the system is not reachable.
To prove that the third condition implies the first, again we proceed by contradiction. Assume
that the system is noth reachable and
i write ithin Kalman form.i This can be done, since it can be
easily seen that Rank λI − A B = Rank λI − Â B̂ . We get the matrix
λI − Ar −Ar,nr
" #
h i Br
λI − Â B̂ =
0 λI − Anr 0
So, if the system is not reachable, then the last block-row only has the square matrix [λI − Anr ]
of dimension n − r that is not identically zero. Then, if we take λ ∈ σ(A) among the unreachable
eigenvalues, matrix [λI − Anr ] is singular and so the last n×r rows are linearly dependent. Therefore,
the rank must be less than n. □
h i
From the previous proof, we have the Popov criterion: Rank λnr I − A B < n for all the
unreachable eigenvalues λnr ∈ σ(A). This criterion has several applications. It is very useful to test
if an eigenvalue λ (and the corresponding mode) is reachable or not.
For instance,
h assumei that matrix A has an eigenvalue λ̄ with positive or nonnegative real part.
Consider λ̄I − A B and observe that:
• if its rank is less than n, this eigenvalue λ̄ is unreachable, hence there is no way to design a
feedback controller that asymptotically stabilises the system;
• if its rank is equal to n, this eigenvalue is reachable, and therefore we can hope to realise the
controller (we will deal with this problem in one of the following chapters).
To compute the rank of this matrix, we can use the Gauss method for triangulation. By adopting
elementary operations that do not change the matrix rank, we can reduce the matrix to a triangular
form. In this case, multiplying the first row by 2 and adding it to the last row, we have:
−1 −1 −1
0 −3 3
0 −3 3
and multiplying the second row by −1 and adding it to the last we get
−1 −1 −1
0 −3 3
0 0 0
The number of rows that are not identically zero represents the rank of matrix. In this case, it
is equal to 2. A basis of the reachable subspace is then obtained by considering two linearly
independent columns of the original matrix R. We can take, for instance,
2 −1
Xr =
0 −3
−1
−1
This selection may be completed with an additional column that must be linearly independent to
the other two, so as to form a basis of R3 :
2 −1 1
T = 0 −3 0
−1 −1 0
In this case the eigenvalues are λ1 = 1, λ2 = −2, λ3 = −1; the eigenvalue λ3 = −1, which is
asymptotically stable, is associated with the unreachable part of the system. If we had known the
eigenvalues and wanted to check the feasibility of a feedback controller to be applied to system, we
could just have checked the reachability of the eigenvalue λ1 , which is responsible of the system
instability. To this aim, we can use the Popov criterion explained
h above.i According to this criterion,
to test reachability of the unstable eigenvalue, the matrix λI − A B must have rank n for λ = 1.
We have:
h i 1 2 −1 2
λI − A B = 3 0 3 0
λ=1
2 −2 4 −1
We use again Gauss elimination to triangularise the system. Multiplying the first row by −2 and
adding it to the last row, and multiplying the first row by −3 and adding it to the second, we obtain
1 2 −1 2
0 −6 6 −6
0 −6 6 −5
Then, multiplying the second row by −1 and adding it to the last one, we get
1 2 −1 2
0 −6 6 −6
0 0 0 1
Finally, the matrix rank is equal to 3 = n, hence the eigenvalue λ1 = 1 is reachable. Therefore we
expect that, in principle, there is a controller able to stabilise the system.
Example 4.6. The circuit in Figure 4.3 is governed by the following equations:
v(t) = R1 I1 (t) + v1 (t) = R1C1 v̇1 (t) + v1 (t)
v(t) = R2 I2 (t) + v2 (t) = R2C2 v̇2 (t) + v2 (t)
Set v(t) = u(t) and consider the state vector:
" # " #
x1 (t) v1 (t)
=
x2 (t) v2 (t)
54 Chapter 4. Reachability and Observability
In order to have full rank (equal to 2), matrix R must have a non-zero determinant
1 1 1 1
det(R) = − 2
+ =
R1C1 (R2C2 ) R2C2 (R1C1 )2
!
1 1 1 1
= − , 0,
R1C1 R2C2 R1C1 R2C2
hence R1C1 , R2C2 . This condition means that, if the circuit presents a symmetry (R1C1 = R2C2 ),
it is not possible to independently control both of the capacitor voltages. This situation is very
similar to the case of two identical tanks with identical drainpipes, and filled by a single tap that
supplies both of the tanks with the same amount of water. It is intuitive that, if the tanks start from
the same level, by symmetry, we cannot unbalance the level of one tank relatively to the other. If,
instead, the tanks are different, with an appropriate flow input function one can bring both tanks at
the desired levels at some time τ.
The situation of the previous example can be generalised. Consider two systems (A1 , B1 ), (A2 , B2 ),
where B1 and B2 are columns (single input), and consider the parallel of the two. The parallel
system equation is " # " #" # " #
ẋ1 (t) A1 0 x1 (t) B1
= + u(t) (4.26)
ẋ2 (t) 0 A2 x2 (t) B2
We can prove the following:
Theorem 4.6. Consider two systems with a single input variable. The parallel system is reachable
if and only if the two systems are reachable and they have no common eigenvalues.
Proof. (⇒) Assume that A1 has size n1 × n1 and A2 has size n2 × n2 . If the parallel system is
reachable, then the matrix
λI − A1
" #
0 B1
0 λI − A2 B2
has full rank equal to n1 + n2 , according to the Popov criterion. This means that the number of
linearly independent rows of the matrix is n1 + n2 . So, if we take the submatrix
h i
λI − A1 0 B1
it must have n1 linearly independent rows (and the same number of linearly independent columns).
Removing the 0 column, we have that
h i
λI − A1 B1
has rank n1 , which implies the reachability of system (A1 , B1 ). The same reasoning applies to the
system (A2 , B2 ).
It is also necessary that (A1 , B1 ) and (A2 , B2 ) have no common eigenvalues. Indeed, if there
were a common eigenvalue λ, the matrices
λI − A1
" # " #
0
,
0 λI − A2
4.5. Observability and detectability of continuous-time systems 55
would have rank less than n1 and than n2 , respectively. This means that, in the most favourable
case, the sub matrix
λI − A1
" #
0
0 λI − A2
would have at most n1 + n2 − 2 = n − 2 linearly independent columns, so that the addition of the
column " #
B1
B2
would bring the rank at most to to n1 + n2 − 1. As a consequence,the parallel system would be
unreachable, in contradiction with the hypothesis.
(⇐) Assume that the two systems are reachable and do not have common eigenvalues. Take λ
eigenvalue of A1 . Then, h i
λI − A1 B1
has rank n1 because system 1 is reachable. On the other hand, matrix
h i
λI − A2
λI − A1
" #
0 B1
0 λI − A2 B2
has full rank n1 + n2 = n, because, in view of how the blocks are arranged, the first n1 rows are
independent and none of them can be generated as a combination of the last n2 , and vice versa. A
similar reasoning applies to any eigenvalue of A2 ; therefore, the Popov criterion is satisfied. □
Definition 4.7. The system is observable in the interval [0, τ] if, given known u(t) and y(t) for
t ∈ [0, τ], it is possible to uniquely determine x(0).
Definition 4.8. The system is detectable in the interval [0, τ] if, given known u(t) and y(t) for
t ∈ [0, τ], it is possible to uniquely determine x(τ).
Before proceeding further, we set matrix D to zero. In fact, y(t) = Cx(t) + Du(t) reads as
y(t) − Du(t) = Cx(t), so we can consider the new “output” ỹ(t) = y(t) − Du(t). Hence, it is not
restrictive to choose D = 0.
A first question is whether the problem of observability can be solved by adopting the punctual
relationships at time t = 0:
y(0) = Cx(0).
The answer is clearly negative, because, most of the times, matrix C is not square and therefore not
invertible, therefore it is impossible to uniquely determine x(0) from the condition y(0) = Cx(0).
Then, we need more information and we have to observe the system evolution in an interval.
56 Chapter 4. Reachability and Observability
Observation 4.1. Since the continuous-time system is reversible, if we can find x(0), then we can
calculate x(τ), and vice versa. Therefore, in the case of continuous-time systems, the observability
problem is equivalent to the detectability problem.
Note also that the observability problem is conceptually different from the reachability problem
discussed earlier. The reachability problem mainly concerns the existence of an input that allows us
to reach a certain state. Here, the existence is a certain fact, because the system has indeed been in
some initial state x(0). The issue now is uniqueness. In fact, given the same input and observed
output, there can be several initial states that are consistent with the observation.
To analyse this problem, we define
Z t
g(t) = CeA(t−σ) Bu(σ)dσ
0
where y(t) and g(t) are known on the observation interval [0, τ].
Suppose that there is no uniqueness, namely there are two different states x̄1 and x̄2 such that:
that is, two different initial states that produce the same output when the same input is applied.
Subtracting the first equation from the second and denoting by x̄ = x̄2 − x̄1 we obtain:
0 = CeAt x̄ (4.29)
Then uniqueness is ensured if there are no vectors x̄ , 0 which satisfy (4.29). Indeed if (4.27) and
(4.28) are true, then x̄ = x̄2 − x̄1 , 0 is one of such vectors. The opposite implication is quickly
verified: assume that x̄ , 0 satisfies (4.29). If one considers the equations:
0 = CeAt x̄
y(t) = CeAt x(0) + g(t) (4.30)
Observation 4.2. The problem of observability is solvable if and only if there are no vectors x̄ , 0
such that CeAt x̄ = 0 for all t ∈ [0, τ].
4.5. Observability and detectability of continuous-time systems 57
Definition 4.9. A vector x̄ ∈ Rn , x̄ , 0 is called not observable (indistinguishable from zero) in the
interval [0, τ] if CeAt x̄ = 0 ∀ t ∈ [0, τ].
We have established that the problem has no solution if and only if there are non-observable
vectors. From equation (4.29), it is easy to realise that any of these vectors, if chosen as an initial
condition with zero input u(t) = 0, produces a zero output. The set of non-observable vectors Xno is
a subspace of the state space, because it is the kernel of CeAt , and any kernel is a subspace. In the
light of this definition, the observability problem has solution if and only if such a kernel is trivial,
namely, Xno = {0}.
The expression CeAt x̄ can be expanded using the exponential series
+∞ +∞
X Ak tk X CAk x̄ k
Ce x̄ = C
At x̄ = t = 0 ∀ t ∈ [0, τ]
k=0
k! k=0
k!
Using once again the principle of power identity, this is equivalent to
CAk x̄ = 0 ∀k ≥ 0 ⇔ CAk x̄ = 0 for k = 0, 1, . . . , n − 1
in view of the Cayley-Hamilton theorem. Similarly to what was done for the reachability problem,
we can incorporate all of these terms in a matrix:
C x̄ = 0
C
CA x̄ = 0
CA
x̄ = 0 ⇔ O x̄ = 0
.. ⇔ ..
. .
CAn−1 x̄ = 0
CAn−1
where the matrix
C
CA
.. = O
(4.32)
.
CAn−1
is the observability matrix. Hence, the set of all vectors such that CeAt x̄ = 0 in [0, τ] is the kernel
of O. We conclude the following.
Theorem 4.7. The system is observable if and only if ker(O) = {0}.
Matrix O has dimension (n · p) × n, and it is square if p = 1 (single output). If ker(O) = 0, then
it must be rank(O) = n. In fact, if it happened that O x̄ = 0 with x̄ , 0, this would mean that the
columns of O are linearly dependent, namely, that rank(O) < n. Therefore we have the following.
Theorem 4.8. The system is observable if and only if rank(O) = n.
Once again, an analytical problem has been turned into an algebraic problem. Note the following
facts:
• matrix B has no role in determining the observability of the system;
• the horizon length τ does not influence observability.
The previous considerations are somewhat analogous to what was found for the reachability problem.
In particular, the second fact means that, if the initial state of a system can be determined, this is
possible in an arbitrarily small observation period. This has to do with the ideal hypothesis of the
theorem, and not with real-world situations. Each measure y(t), in fact, is certainly affected by
disturbances that are not always exactly quantifiable. As a result, the smaller is the observation
period, the higher is the influence of the error. In reality, therefore, to determine the state we need
to filter the measured signal and this requires the observation over a period of time that is not
infinitesimal.
58 Chapter 4. Reachability and Observability
It is then possible to complete this basis with other n − r linearly independent vectors
We denote the subspace generated by T o as the observable subspace. This nomenclature is purely
conventional, because, if there exists unobservable vectors, the entire observability problem has no
solution.
Note the duality with respect to the reachability problem: in that case, the basis of the reacha-
bility subspace is obtained by selecting the linearly independent columns of R and then the basis
is completed (to get a basis of the whole state space) by adding new vectors that generate the
“non-reachable” subspace (if the system is reachable, R is a basis of Rn ). Here, the “non-observable”
subspace is determined as the kernel of O and the basis is completed (to get a basis of the whole
state space) with vectors that generate the observable subspace.
If we transform the system by means of T , we get
" # " #" # " #
d x̂no (t) Ano Ano,o x̂no (t) Bno
= + u(t)
dt x̂o (t) ϕ1 Ao x̂o (t) Bo
h i " x̂no (t) #
Y(t) = ϕ2 Co (4.36)
x̂o (t)
where the matrices ϕ1 and ϕ2 are identically zero. To see this, consider u(t) = 0 and an unobservable
initial vector equal to " #
x̂no (t)
x(0) =
0
By definition of unobservable vector, y(t) = 0 ∀ t > 0, and this is possible only if ϕ2 is a null matrix.
Moreover, if ϕ1 were not zero in the same conditions we would have that, at some t, x̂o (t) , 0, and
this would produce a nonzero output.
4.7. Observability of discrete-time system 59
u x&ˆno x̂no
Bno ∫
Ano,o Ano
x&ˆo x̂o y
Bo ∫ Co
Ao
and, assuming to perform T observations at different times. with the purpose of uniquely determin-
ing x(0), we obtain the following equations:
y(0) C g(0)
y(1) CA g(1)
.. = .. x(0) + ..
(4.38)
. . .
CAT −1
y(T − 1) g(T − 1)
x1 (k + 1)
" # " #" #
0 1 x1 (k)
=
x2 (k + 1) 0 0 x2 (k)
h "
i x1 (k) #
y(k) = 0 0
x2 (k)
Since we get no information from y(k) = 0, it is impossible to derive x1 (0) and x2 (0). However, A is
a nilpotent matrix. Hence, for k > 2, the state vector is zero and the problem of detectability has
a solution. From this simple case, we observe that the detectability problem is different from the
observability problem for discrete-time systems.
For simplicity, the external load torque is assumed to be zero. We first perform a reachability
analysis. We have a single input u. The reachability matrix is
− RL2a
1
La ∗
a
R = 0
kīe
JLa ∗
kīe
0 0 JLa
where the determination of the entries (∗) is left as an exercise. This matrix is upper triangular,
with non-zero diagonal elements, hence it has full rank and the system is reachable.
This systems can be used as an electric drive, but to this aim we need to measure the position,
and possibly the speed and the current.
4.8. Examples of reachability and observability analysis 61
We first assume that an encoder is available as a sensor, namely, the angle is measured. The
output matrix C takes the form h i
0 0 1
from which we get the observability matrix
0 0 1
O = 0 1 0
− Jf
kīe
0
J
This matrix has full rank, so we can find φ(0) and the initial values of all of the other variables,
based on measurement of the angular position φ(t).
Conversely, assume that we choose the angular speed as an output. Then matrix C is
h i
0 1 0
where (∗) are non-zero numbers. Now, the matrix rank is equal to 2, hence the kernel has dimension
1 and its unique basis vector is
0
x̄ = 0
1
This means that x(0) and x(0) + α x̄ produce the same output for any α ∈ R, namely, we can change
the initial value of the angle and we will get the same output ω. Consequently, from the angular
velocity we cannot determine the position. This is expected, because the angle can be determined
from the speed by integration but we must know the initial value.5 Also if we measure the armature
current, we cannot determine the angular position (this is left as an exercise). In conclusion, given
the angle, we can find speed and current, but given any of these last two we cannot determine the
position.
Example 4.9. One way to determine the angular velocity based on the angle (which is theoretically
possible) is to use a pseudo-differentiator. Assuming y(0) = 0 (without restriction, since we measure
its value), in time and frequency (Laplace) domain we have
d
ω(t) = φ(t)
dt
ω(s) = sφ(s)
The transfer function above is not physically implementable, because it is not proper. However, we
can alter the high-frequency Bode diagram by inserting two poles at higher frequencies, far away
from the system bandwidth. For instance, we can take the strictly proper transfer function
s 1 s s
W(s) = = 2 = λ2
(1 + τs) 2 τ (s + τ )
1 2 (s + λ2 )
Figure 4.5: Bode plot of a real differentiator, with a pole at ω = 103 rad
s .
We can then realise the corresponding discrete-time system by means of the equivalent discrete-time
matrices
AD = eAT
Z ⊤
BD = eAξ dξ B
0
CD = C
s ω20 s
W(s) = = ,
1 + 2 ωξ0 + s2
ω20
s2 + 2ξω0 s + ω20
Example 4.10. A method based on accelerometers allows us to track the position based on the
acceleration, by means of a double integrator: acceleration → speed → position. This seems
to be in contradiction with the observability notion, and impossible. Indeed, the position is not
recoverable from the acceleration. As an exercise, one can write the state space representation of
the force-acceleration equation
ÿ(t) = u(t)
In these cases, as opposed to the observability problem, the position and the speed at the initial
instant are assumed to be known. The differential problem to be solved is
Z t
v(t) = a(σ)dσ + v(0)
0
Z t
x(t) = v(t)dt + x(0)
0
An easy way to get the dual system matrices is take the transpose
" ⊤
A C⊤
" # #
A B T
−→ (4.41)
C D B⊤ D⊤
Note that the number of inputs to the dual system is p, equal to the number of outputs of the primal
system, while the number of outputs of the dual system is equal to m, the number of inputs to the
primal system. The state of the dual system, instead, always belongs to Rn , as in the primal system
case. Also observe the following relationships:
• reachability concerns matrices (A, B) for the primal system, (A⊤ , C ⊤ ) for the dual;
64 Chapter 4. Reachability and Observability
• observability concerns matrices (A, C) for the primal system and (A⊤ , B⊤ ) for the dual.
The reachability matrix R∗ of the dual system,
h i
R∗ = C ⊤ A⊤C ⊤ (A⊤ )2C ⊤ . . . (A⊤ )n−1C ⊤ (4.42)
The observability matrix of the dual system is the transpose of the reachability matrix of the primal:
O∗ = R⊤
B⊤
B⊤ A⊤
⇒ O∗⊤ = B AB . . . An−1 B = R
h i
O∗ = .. (4.44)
.
⊤ ⊤ n−1
B (A )
Thus, fundamental properties hold:
• is reachable ⇐⇒ ∗ is observable;
P P
• is observable ⇐⇒ ∗ is reachable
P P
W(s)∗ = W ⊤ (s),
namely, the dual transfer function matrix is the transpose. Clearly, if m = p = 1, the primal
system and the dual system have the same transfer function. The only difference in this case is
that cancellations due to the unreachable modes in the primal system become cancellations due to
unobservable modes in the dual system.
4.10. Joint Kalman form and transfer functions 65
• X2 , such that Xr = X1
L
X2 (completion of X1 in Xr );
• X3 , such that Xno = X1
L
X3 (completion of X1 in Xno );
• X4 , such that X1 X4 = Rn .
L L L
X2 X3
X3 = Xr + Xno . Furthermore, since the subspaces Xnr and Xo are
L L
We also have that X1 X2
complements of Xr and Xno in Rn ,
• Xnr = X3
L
X4
• Xo = X2
L
X4 .
The relations between these subspaces areLsummarised in Table 4.1 (arrow means direct sum: e.g.,
the arrow in the first row means Xr = X1 X2 , and so on). It is now possible to choose a matrix T
reachable → X1 X2
non reachable → X3 X4
↑ ↑
non observable observable
where the columns of the matrix T k form a basis of the corresponding subspace Xk . Each vector
x ∈ Rn can be represented as:
x̂1
h i x̂
x = T 1 T 2 T 3 T 4 2 (4.47)
x̂3
x̂4
Each reachable vector can be expressed as:
x̂1
h i x̂
xr = T1 T2 T3 T 4 2 (4.48)
0
0
Each non-observable vector can be expressed as:
x̂1
h i 0
xno = T1 T2 T3 T 4 (4.49)
x̂
3
0
66 Chapter 4. Reachability and Observability
All zeros in this matrix are structural. We can recognise the following subsystems:
• 1 (A1 ) is the reachable and unobservable subsystem;
P
Theorem 4.10. The transfer function depends on the reachable and observable subsystem only
The proof of the theorem requires tedious (not difficult) computations. This result is intuitive.
Unreachable components, in fact, are not affected by the input, while unobservable components do
not give any contribution to the output.
4.11 Cancellations
Consider the simplest case of a dynamic single input-single output (SISO) system, in which
n(s)
m = p = 1 and D = 0, hence W(s) = C(sI − A)−1 B = d(s) . The denominator d(s) is the
characteristic polynomial of matrix A, hence it has degree n.
The polynomials n(s) and d(s) are co-prime if they do not have common roots, namely, ∄ λ ∈ C
such that n(λ) = d(λ) = 0. Note that, if the two polynomial are not co-prime, then n(s) = (s − λ)ñ(s)
and d(s) = (s − λ)d̃(s), hence we have a zero-pole cancellation and
n(s) ñ(s)
W(s) = C(sI − A)−1 B = =
d(s) d̃(s)
4.11. Cancellations 67
Theorem 4.11. Given a linear system (A, B, C) with m = p = 1, the numerator n(s) and the
P
denominator d(s) of the transfer function are co-prime if and only if (A, B, C) is reachable and
observable.
Proof. We prove the implication (⇒) by contradiction. Assume that n(s) and d(s) are co-prime
and that the system is not reachable and observable. We have seen that the transfer function depends
only on the reachable and observable part of the system:
However, dim(A2 ) < dim(A). Then the denominator of the transfer function has degree at most
n2 = dim(A). This means that there is at least one cancellation. But then n(s) and d(s) cannot be
co-prime: a contradiction.
We now prove the implication (⇐). We assume that the system is reachable and observable,
with n(s) and d(s) not co-prime. We obtain a transfer function that is reducible through cancellations.
This means that, for some λ,
λI − A −B
" #" #
x̄
=0 (4.56)
C 0 −ū
where x̄ has n components and ū is a scalar. The same applies to the matrix in (4.54): [sI − A] is
singular. We can write
h i h i h i " x̃ #
λI − A x̃ = λI − A x̃ + B · 0 = λI − A B =0 (4.57)
0
where the last equality is always true due to the properties of partitioned matrices. We have two
possible cases
• ū , 0: in this case the two vectors
" # " #
x̄ x̃
,
ū 0
h i
are linearly independent, therefore dim(ker λI − A B ) ≥ 2. Since the number of columns
h i
of λI − A B is equal to n + 1, it follows that the rank of this matrix is less than n, hence
the system is not reachable (contradiction).
• u = 0: in this case
λI − A −B λI − A
" #" # " # " #
x̄ B
= x̄ + 0 (4.58)
C 0 0 C 0
thus, if we consider only the first term, we get
λI − A
" #
x̄ = 0 (4.59)
C
It follows that the matrix has rank less than n, and therefore, in view of the Popov observability
criterion (see the section about the duality), the system is not observable: a contradiction.
68 Chapter 4. Reachability and Observability
The case of systems with m > 1 and p > 1 is much more involved. Consider the following
example.
and they both have rank n, hence the system is reachable and observable. However, the transfer
function matrix is
0
s+1
(s+1)2 (s+1)2
W(s) = 0
s+1
(s+1)2 (s+1)2
and we can see that there is a cancellation in each term. Therefore, it is no longer true that a
reachable and observable system has no cancellations.
The case of multidimensional systems will not be analysed in detail here. However, we state
some fundamental results:
• if either reachability or observability of the system fails, there must be cancellations in the
transfer function matrix (but not vice versa, as already seen);
• if matrix A has distinct eigenvalues, then the system is reachable and observable if and only
if there are no cancellations.
Definition 4.10. Let x(0) = 0. We say that a system (A, B, C, D) is externally stable or BIBO
P
(Bounded Input, Bounded Output) stable if, assuming that ∥u(t)∥ ≤ µ, then there exists ν such that
∥y(t)∥ ≤ ν.
Theorem 4.12. A system is externally stable if and only if the reachable and observable subsystem
is asymptotically stable. If the whole system is reachable and observable, then asymptotic stability
is equivalent to BIBO stability.
We will not prove the theorem, which is intuitive. Indeed, non-reachable and non-observable
parts (if any) do not affect the input-output behaviour. Conversely, reachable unstable (or marginally
stable) modes can become arbitrarily large due to a bounded input and, if they are observable, they
will produce an arbitrarily large output.
We will prove the last part of the theorem, to get a very interesting formula, in the case
m = p = 1. Assume that the system is reachable and observable, and that A is asymptotically stable.
We show that the system is BIBO stable. Let x(0) = 0 and ∥u(t)∥ ≤ µ. We have:
Z t
y(t) = W(t − σ)u(σ)dσ
0
4.12. Controllable canonical form 69
hence
Z t Z t Z t
|y(t)| = W(t − σ)u(σ)dσ ≤ |W(t − σ)u(σ)| dσ = |W(σ)| |u(t − σ)| dσ ≤
0 0 0
Z t Z +∞ Z +∞
≤ µ |W(σ)| dσ ≤ µ |W(σ)| dσ = µ CeAσ B dσ = µ∥(A, B, C)∥1 = ν
0 0 0
Observation 4.4. The property of BIBO stability does not offer any kind of warranty on the proper
functioning of the system, if the system is not reachable or is not observable. In fact, unstable
unobservable modes do not affect the output, but may lead to exponentially increasing internal
variables. Unstable unreachable modes theoretically remain at zero, because in the definition of
BIBO stability we take x(0) = 0, but they may grow large when x(0) , 0 (no matter how small).
Non-observability and non-reachability is a pathology.
0 ...
0 1 0 0
0 0 1 . . . 0 0
. . . . .
ÂF = .. .. .. . .. .. , B̂F = ..
(4.60)
0 ...
0 0 1 0
−a0 −a1 −a2 . . . −an−1
1
h i
Ĉ F = c0 c1 c2 . . . cn−1 (4.61)
This is called the Frobenius form. It is not difficult to prove the following
hence
R̂ = T −1 R (4.62)
By duality we also have
Ô = O T (4.63)
70 Chapter 4. Reachability and Observability
(in brief, R and O transform as B and C). If, as assumed, m = 1 and the system is reachable, the
reachability matrix is square and invertible. Hence, T R̂ = R and
T = RR̂−1 . (4.64)
Therefore, to determine the transformation T , we have to compute R and R̂. We know that
the similarity transformation operation does not change the eigenvalues of the matrix A, so the
characteristic polynomial of  is the same as that of A. To determine the unknown elements of Â,
we need to compute the coefficients of the characteristic polynomial of A. Then, the transformation
T can be computed through the following steps:
1. compute det (sI − A) and form matrix  with its coefficients;
2. compute R;
3. compute R̂;
4. compute T = RR̂−1 .
As mentioned, Â is said to be in Frobenius form. This form is very important for three reasons,
two of which will be analysed later. The remaining reason is that a matrix in Frobenius form is
the simplest option to represent in a state form (n differential equations of the first order) a generic
linear differential equations of order n. If, for example, we have
y(n) (t) + an−1 y(n−1) (t) + . . . + a1 y(1) (t) + a0 y(t) = u(t), (4.65)
then we can define the state variables
x1 (t) = y(t)
x2 (t) = y(1) (t)
..
.
xn (t) = y(n−1) (t) (4.66)
and write the equivalent system of n first order differential equations, thus obtaining
ẋ1 (t) = x2 (t)
ẋ2 (t) = x3 (t)
...
ẋn−1 (t) = xn (t)
ẋn (t) = −a0 x1 (t) − a1 x2 (t) − . . . − an−1 xn (t) + u(t), (4.67)
which is equivalent to the Frobenius form (check!).
Clearly, in view of duality, we can define the (Frobenius) observability canonical form, where
A and C are the transposed matrices of A and B in the controllable canonical form.
0 0 0 . . . −a0
b0
1 0 0 . . . −a1 b1
Realisation
71
72 Chapter 5. Realisation
Example 5.1. It is legitimate to ask how we can realise the transfer function W(s) = e−τs (delay),
but we will not find matrices Σ(A, B, C, D) that provide a realisation.
Example 5.2. The PID controllers given by the transfer functions
KI K D s2 + K P s + K I
G(s) = G D (s) + KD + =
s s
are not directly implementable, because the above rational function is not proper. Then, it does not
admit a realisation A, B, C, D. A physical implementation is possible if we introduce one or two
additional poles, such as
K I + K P s + K D s2
G̃(s) = .
s(1 + τs)2
These artificially introduced poles are located at high frequency, far from the band of frequencies of
the system. They are not only necessary for the realisation, but also beneficial, since they have a
low-pass effect.
Definition 5.1. Given a proper rational matrix W(s), we say that Σ(A, B, C, D), is a realisation if
W(s) = C(sI − A)−1 B + D.
The realisation problem corresponds to finding Σ(A, B, C, D) for a given W(s).
The first step for solving the realisation problem is the determination of matrix D. We have that
• if W is strictly proper, then D = 0;
• if W is weakly proper, then D , 0 and its value can be obtained by division.
Division means writing the transfer matrix as the sum of a constant matrix and a strictly proper
transfer function:
Nν sν + Nν−1 sν−1 + . . . + N0
W(s) = =
d0 + d1 s + . . . + sν
Nν (d0 + d1 s + . . . + sν ) + (Nν−1 − Nν dν−1 )sν−1 + (Nν−2 − Nν dν−2 )sν−2 + . . . + (N0 − Nν d0 )
=
d0 + d1 s + . . . + sν
ν−1
Ñν−1 s + . . . + Ñ0
= Nν + = D + W̃(s) (5.1)
d0 + d1 s + . . . + sν
Then, the constant matrix D is obtained (which is obviously zero in the strictly proper case).
The next step is finding the matrices A, B, C starting from the strictly proper part of the transfer
function.
So let W(s) be strictly proper and write it as
N0 + N1 s + . . . + Nν−1 sν−1
(5.2)
d0 + d1 s + . . . + sν
Determining a realisation is straightforward. We can just adopt the following matrices (generalised
Frobenius form):
...
0 Im 0 0
0
0 0 I . . . 0
m 0
. . .
A = 0 0 0 I m , B = . ,
..
.. .. .. .. ..
. . . . .
Im
−d0 Im −d1 Im −d2 Im . . . −dν−1 Im
h i
C = N0 N1 N2 . . . Nν−1 , (5.3)
5.2. Minimal realisation 73
where Im is the identity matrix of dimension m × m. To demonstrate that this realisation returns
W(s) we just write:
ϕ(s) = (sI − A)−1 B ⇒ (sI − A)ϕ(s) = B. (5.4)
By direct verification we can check that ϕ(s) is given by
I
Is
1 s2 I
ϕ(s) =
(5.5)
d(s) ..
.
ν−1
s I
Remark 5.1. By duality, one can find a realisation as follows. Consider the transfer function matrix
W ⊤ (s) of the dual system and find a realisation (A∗ , B∗ , C∗ , D∗ ), of dimension pν × pν. Consider
the dual realisation (A⊤ ∗ , C ∗ , B∗ , D∗ ): it is a realisation for W. This procedure is convenient if
⊤ ⊤ ⊤
Example 5.3. As a preliminary example, we show that the realisation found as above can be non
minimal. Take i h [02] [ 1 0 ]s
h i
W(s) = (s+1)(s+2)
2 s
(s+1)(s+2) = (s2 +3s+2) (s2 +3s+2)
The realisation has state dimension 2m = 4.
0 0 1 0
0 0
0 0 0 1 0 0 h i
A = B = C = 0 2 1 0
−2 0 −3 0
1 0
0 −2 0 −3 0 1
Definition 5.2. Matrices (A, B, C, D) are a minimal realisation of W(s) if they are a realisation,
namely C(sI − A)−1 B + D = W(s), and there is no other realisation (A′ , B′ , C ′ , D) with dim(A′ ) <
dim(A).
74 Chapter 5. Realisation
Finding a minimal realisation amounts to minimising the size of matrix A, namely n. Once
again, the number of columns B (equal to m) and the number of lines of C (equal to p) are fixed.
The following fundamental theorem characterises minimal realisations.
Theorem 5.1. The realisation (A, B, C, D) of W(s) is minimal if and only if (A, B, C) is reachable
and observable.
The implication ⇒ has already been discussed, because if the realisation is minimal then
there are cannot be unreachable or unobservable parts in the system. Otherwise, adopting Kalman
decomposition, we could just take the reachable (or observable) subsystem which has the same
transfer function, but a smaller dimension. The implication ⇐ is quite difficult to prove: its proof
can be found in specialised texts. The theorem tells us something interesting.
Observation 5.1. If (A, B, C, D) is a realisation, but not a minimal one, then the reachable and
observable subsystem (A2 , B2 , C2 , D) gives us a minimal realisation (because it has the same
transfer function).
The next question is the following. Given two minimal realisations, is there any difference
between the two?
Assume to have obtained two minimal realisations, (A1 , B1 , C1 , D1 ) and (A2 , B2 , C2 , D2 ), of
course with the matrices A1 and A2 having the same size. There is a fundamental link between the
two solutions.
Theorem 5.2. Let (A1 , B1 , C1 , D1 ), with state dimension n, be a minimal realisations of W(s).
Then (A2 , B2 , C2 , D2 ) is a minimal realisations of W(s) if and only if: if has state dimension n,
D1 = D2 and there exists T , invertible such that T −1 A1 T = A2 , T −1 B1 = B2 C1 T = C2 .
The previous theorem states that all minimal realisations are equivalent up to a state transforma-
tion.
The implication ⇐ is simple, because if (A1 , B1 , C1 ) is a minimal realisation and we apply a
state transformation we obtain a system with the same transfer function and a state matrix having
the same size as A1 . The implication ⇒ is much more difficult to prove and is not discussed.
We can say that if a given linear system (A, B, C, D) is modelled by means of transfer functions,
any information about the unreachable and unobservable parts is lost. If we assume that the system
is reachable and observable, we still loose some information because we will not be able to
determine the true realisation we started from, but we will be able to determine a realisation which
is related to the original one by a state transformation.
We conclude with the general procedure to derive a minimal realisation.
1. Given W(s) rational and proper, determine D by division: W(s) = D + W̃(s), with W̃(s)
strictly proper.
2. Consider the strictly proper part W̃(s) and take any realisation, not necessarily minimal (for
instance the generalised Frobenius one).
It is worth mentioning that the generalised Frobenius realisation shown above is always reachable.
So, in this case, we need to remove the unobservable part only. By duality, the dual generalised
Frobenius realisation is always observable and in this case we only need to remove the unreachable
part.
5.3. Minimal realisation for SISO systems 75
0 ...
0 1 0
0
0 0 1 ... 0
0
A = . . . , B = .. ,
0
0 0 1
.. .. .. ..
.
.. .
. . . .
1
−d0 −d1 −d2 . . . −dν−1
h i
C = n0 n1 n2 . . . nν−1 (5.8)
From Theorem 4.11, since m = p = 1, this realisation is minimal if and only if there are no
cancellations in W(s).
A nice property of the Frobenius form is that it can be implemented not only by a digital device,
but also by an analog device, by adopting the block diagram presented in Figure 5.1.
+ + + +
y
D n ν−1 n ν−2 n1 n0
u xν xν x ν−1 x2 x1
+
−
d ν−1 d ν−2 d1 d0
+ + +
The diagram is easy to interpret if one considers that, given the form of the matrices, we obtain
the following expressions
ẋi = xi+1 ∀ i = 1, . . . , n − 1
ν−1
X
ẋn = − di xi+1 + u
i=0
ν−1
X
y = n j x j+1 + Du (5.9)
j=0
Control Systems
• Open loop control: the input u(t) applied to the system is synthesised by means of some a
priori criterion based on the knowledge of the initial state and does not require the knowledge
of x(t) or y(t) in real time.
• Feedback control: the input to the process is generated in real time (instant by instant) by a
control algorithm that takes into account the current output (output-feedback) or the current
state (state-feedback) of the system.
A simple example of open-loop control is given by a temporised oven, which heats a cake for a
certain amount of time (decided at the beginning) and then stops.1 The main feature of a feedback
control is that it is able to modify the dynamics of a system to make it stable, or faster in terms
of convergence. A feedback control makes the system less sensitive to disturbances and assures
efficient tracking. In this chapter, we consider the case of feedback control for linear systems. This
technique will be applied to nonlinear systems later on.
In general, the inputs and outputs of a process can be divided according to Figure 6.1.
d e
u y
1
Inconveniences of this approach are often experimented by inexperienced bakers.
77
78 Chapter 6. Control Systems
• Vector d(t) represents exogenous, external inputs not modifiable by the user. This category
includes, for example, noise and external loads.
• Vector u(t), instead, represents the control inputs, on which we can actually act in real time,
in order to control the process.
• Vector e(t) is the performance output, on which design specifications are assigned.
• Vector y(t) is the measured output, namely, the signal measured in real time by sensors,
which can be used to generate a feedback control law.
The input u(t) corresponds therefore to the action of the actuators, while the output y(t) originates
from the sensors monitoring the system. The process needs to be equipped with these devices in
order to be governed by a feedback controller.
Example 6.1. (Damper.) Consider the damping control problem for a vibrating systems. The goal
is to keep the coordinate θ(t) small in the presence of a disturbance d(t). The measured output is
the derivative θ̇(t)
A control can be any system with input y and output u, such as a simple passive damper: u(t) =
−ky(t). Needless to say, the eigenvalues play a fundamental role. For instance, in the case of the
damper, the closed loop eigenvalues are the solutions of
s2 + κs + µ = 0
The eigenvalues are constrained on the so called root locus [λ1 (κ), λ2 (κ)]. It can be shown that the
√
real part is minimised by κ∗ = 2 µ. This control has one degree of freedom only. By adopting
more sophisticated techniques, we will be able to arbitrarily place the eigenvalues of the system.
SYSTEM
REGULATOR
In general, a feedback-regulated process can be described by the scheme in Figure 6.2. The first
purpose of the feedback is the stabilisation of the process, if the system is not already stable. Even
in the case of stable processes, feedback can have beneficial effects in improving the dynamics
(yielding, for instance, faster convergence). In the case of linear systems, this essentially means
changing the position of the eigenvalues in the complex plane, in order to modify the system
transient. The allocation of the eigenvalues is possible only by means of feedback controllers
(open-loop controllers do not modify the eigenvalues).
6.1. General considerations 79
A + BKC BH
" # " #" # " #
d x(t) x(t) E
= + d(t)
dt z(t) GC F z(t) 0
h i " x(t) #
e(t) = L 0 (6.3)
z(t)
A + BKC BH
" #
ACL =
GC F
and the modes of the closed-loop system are given by the eigenvalues of ACL . The first goal of
a controller is to modify the original eigenvalues of matrix A and get new eigenvalues that are
chosen appropriately. A more advanced task is to optimise the performance, under the constraints
of closed-loop stability.
The basic problem, which we face for the moment, is the following.
Problem 6.1. Eigenvalues assignment problem. Given a set ΛCL of N = dim(A) + dim(F)
complex numbers, ΛCL = {λ1 , λ2 , . . . , λN }, determine the unknown matrices F, G, H, K so that the
closed-loop eigenvalues are the element of ΛCL :
A + BKC BH
" #!
σ = ΛCL
GC F
In the following, we will always assume that the chosen set ΛCL satisfies the conjugate
eigenvalue constraint (CEC):
λ ∈ ΛCL ⇒ λ∗ ∈ ΛCL .
This means that either λ is real or, if it is complex, then also λ∗ belongs to ΛCL .2 If we do not
respect this condition, then the solution F, G, H, K will be given by complex matrices, hence
useless from a practical standpoint.
A fundamental principle in dealing with the allocation problem is the following. The eigenvalues
of the unreachable subsystem and of the unobservable subsystem cannot be changed.
Theorem 6.1. The unreachable eigenvalues, given the pair (A, B), and the unobservable eigenval-
ues, given the pair (A, C), are invariant under feedback.
There is no need to prove this theorem. Unreachable an unobservable subsystems can be
removed without changing the input-output behaviour of the system, hence no regulator can change
them. A fundamental consequence is the following.
2
For instance, −1, −2+ j3, −2− j3, −3+2 j, −3−2 j, −4 is a proper choice, while −1, −2+ j3, −2− j3, 6+2 j, −3−2 j, −4
is not.
80 Chapter 6. Control Systems
Theorem 6.2. A process can be asymptotically stabilised if and only if the unreachable and the
unobservable eigenvalues (if any) are asymptotically stable, namely, they have negative real part.
Necessity follows from Theorem 6.1. The sufficiency part will be proved in a constructive way:
we show how to arbitrarily modify reachable and observable modes (under CEC).
To study the allocation of the eigenvalues we will work, without restrictions, under the assump-
P
tion that (A, B, C) is reachable and observable. Its unreachable and/or unobservable parts (whose
eigenvalues are fixed) can be eliminated after having reduced the system in Kalman form.
We will solve the eigenvalue assignment problem in three steps.
• State-feedback design: we assume3 that any state variable is measured and we solve the
allocation problem.
• Observer design: we design a device that estimates the state variables based on output
measurement.
• Pole placement regulator: we put together these two steps and we apply the state feedback
to the estimated state variables.
In the first step, state feedback design, we consider the following equations:
ẋ(t) = Ax(t) + Bu(t)
(
(6.4)
u(t) = K x(t)
The corresponding diagram is shown in Figure 6.3.
u x x
B
Note that a direct practical implementation of the state feedback u(t) = K x(t) requires a sensor
for each state variable, and this may be unrealistic, expensive and even impossible in some cases.
This leads to the second step, state estimation, in accordance to diagram shown in Figure 6.4.
The estimation block returns an estimated value x̂(t) of the state x(t) of the process. This value
is subsequently used to operate the feedback u(t) = K x̂(t). This is convenient from the economic
point of view, since it does not require sensors for all state variables. In the following sections we
will study separately and in detail the two design phases above.
OBSERVER
where the subscript c stands for “compensator” and the CEC constraint are satisfied (so as to deal
with real problems). We look for a real matrix K such that the system
The matrix K has dimension m × n, hence there are m · n free parameters to be assigned in order to
solve the problem.
Here we have much more freedom with respect to classical techniques, such as root locus and
PID design, where the number of free parameters is limited.
Theorem 6.3. The problem has a solution with Λc arbitrarily taken (provided that CEC constraints
P
are satisfied), if and only if the system (A, B) is reachable. Instead, if the system is not reachable,
then the problem has solution if and only if Λc includes all of the unreachable eigenvalues.
Proof. If the system is not reachable, we can turn it into Kalman form. The equation u(t) = K x(t)
turns into u(t) = KT x̂(t) = K̂ x̂(t).4 We get
" # " #h
Âr Âr, nr B̂r i
 + B̂K̂ = + K̂1 K̂2 =
0 Ânr 0
Âr + B̂r K̂1 Âr, nr + B̂r K̂2
" #
= (6.6)
0 Ânr
This is a block-triangular matrix, whose spectrum is given by σ(Âr + B̂r K̂1 ) ∪ σ(Ânr ). The resulting
spectrum includes the eigenvalues of Ânr , the unreachable ones, which are invariant and cannot be
changed with the feedback. So we cannot assign Λc if it does not include the eigenvalues of Ânr .
We now assume that the system is reachable and we show how we can arbitrarily assign the
eigenvalues to the system. We now consider the case m = 1, while we will discuss the general case
later. The proof is constructive.
If the system is reachable, we can always find T such that the transformed system AF = T −1 AT ,
BF = T −1 B is in the Frobenius form (note that the new feedback matrix is transformed as well,
4
Note that matrix K is transformed as matrix C.
82 Chapter 6. Control Systems
...
0 1 0 0
0 0 ... 0
.. .. .. ..
AF + BF K̂ = ..
. . . . .
(6.7)
...
0 0 0 1
−a0 + k̂1 −a1 + k̂2 −a2 + k̂3 . . . −an−1 + k̂n
and it is therefore still a matrix in Frobenius form. Then the new coefficients of the closed-loop
characteristic polynomial are the opposite of the entries of the last row of the matrix. These elements
can be changed by selecting the individual elements k̂i . The problem of the arbitrary eigenvalues
assignment can be then reduced to the assignment of the characteristic polynomial whose roots
are the desired eigenvalues, which is p̂(s) = ni=1 (s − λ̄i ).
Q
The steps to solve the problem are the following.
2. Choose Λc = {λ̄1 , λ̄2 , . . . , λ̄n } and compute the new characteristic polynomial
n
Y
p̂(s) = (s − λ̄i ) = ā0 + ā1 s + . . . + ān−1 sn−1 + sn
i=1
If m > 1, the proof is more involved. The idea is to use one input at the time and proceed as
follows.
• If the system is reachable from a single input, for instance u1 , then there is nothing to prove.
The closed loop matrix will be A + B1 K1 where B1 is the first column of B.
• Alternatively, we assign all of the eigenvalues of the subsystem that are reachable from the
first input, achieving the matrix A∗ + B1 K1 . The system becomes
where A1 has the eigenvalues already assigned. The first input is no longer considered,
namely, we set m := m − 1, A := A∗ + B1 K1 , B := [B2 . . . Bm ].
• If there are still eigenvalues to assign, then go back to the previous step with m − 1 inputs,
in order to assign all of the eigenvalue we can (by means of some K2 ) and leave unchanged
those already assigned. Otherwise STOP.
5
This step is necessary because Frobenius form is only a tool to facilitate the solution of the problem, so we cannot
apply k̂ directly.
6.2. State feedback 83
K1
K2
K = ..
.
Km
The eigenvalues are the desired ones. The overall feedback matrix is
" #
−2 −2
K=
1 −1
Please check!6
In general it can be proved that, if the system is reachable, the procedure is successful. These
considerations are valid from a mathematical point of view. In practice, this procedure might not
distribute the work among the different actuators in a proper way. For instance, if the system is
reachable from the first input, the procedure would provide a feedback which uses the first input
only. This multi-input control problem will be reconsidered in the optimal control theory.
b1
b2
B = ..
(6.8)
.
bn
6
This is the English “please”, which basically means that the reader is strongly invited to check...
84 Chapter 6. Control Systems
We consider the unknown K and we write the characteristic polynomial of the feedback system
det(sI − (A + BK)) =
s − a11 − b1 k1 −a12 − b1 k2 . . . −a1n − b2 kn
−a − b k
21 2 1 s − a22 − b2 k2 . . . −a2n − b2 kn
= det .. .. .. .. =
. . . .
−an2 − bn k2 . . . s − ann − bn kn
−an1 − bn k1
= a0 (k1 , k2 , . . . , kn ) + a1 (k1 , k2 , . . . , kn )s + . . . + an−1 (k1 , k2 , . . . , kn )sn−1 + sn (6.9)
The characteristic polynomial coefficients are functions of the unknown elements ki . It turns out
that these functions are affine.7 Now we simply match the coefficients of the desired polynomial,
ai , with those desired after feedback, āk : p̄(s) = ā0 + ā1 s + ā2 s2 · · · + sn . Hence
a0 (k1 , k2 , . . . , kn ) = ā0
a1 (k1 , k2 , . . . , kn ) = ā1
(6.10)
...
a (k , k , . . . , k ) = ā
n−1 1 2 n n−1
The solution of this linear system provides the elements ki , hence solving the state feedback
problem.
Observation 6.1. The reachability test has to be performed before the algorithm. If the system is
not reachable, then the matrix of the system is singular. In this case, we have a solution only if we
choose a polynomial p̄(s) that has the non-reachable eigenvalues among its roots.
Suppose that the desired new eigenvalues are λ̄1 = −1 and λ̄2 = −2. Then, the characteristic
polynomial of the closed-loop system should match
p̂(s) = (s + 1)(s + 2) = s2 + 3s + 2
−4 − k1 = 3 k1 = −7
( (
⇒
3 + 2k1 − k2 = 2 k2 = −13
u x x y
B C
The most favourable case that can occur is when C is the identical matrix (or has full row
rank): this means that the outputs are precisely the state variables (or that the state variables can
be immediately computed based on the outputs). Then, we can straightforwardly apply a state
feedback controller. However matrix C, in general, has less rows than columns (often it has a single
row). Hence, we have to proceed differently.
A first idea (which will not lead us to the solution) could be to replicate the system by
implementing a device with the same equations, namely, with the same matrices of the process:
˙ = A x̂(t) + Bu(t)
x̂(t) (6.11)
This is a trivial observer (open-loop), in which x̂(t) is an estimate of the system state variables. To
evaluate the effectiveness of this solution (or of any other estimator), we monitor the estimation
error
e(t) = x̂(t) − x(t)
Since the system is described by the equations
˙ = Ax(t) + Bu(t)
(
x̂(t)
y(t) = Cx(t)
we can subtract the state equation from the estimated state equations. We obtain
d
( x̂(t) − x(t)) = A( x̂(t) − x(t)) + Bu(t) − Bu(t) = A( x̂(t) − x(t)) (6.12)
dt
The estimation error is then described by the equation
and therefore it evolves in natural response. We immediately understand that this open-loop observer
is not applicable to unstable systems, because the error diverges. Even for asymptotically stable
systems, trivial observers do not provide good results. Indeed, the state x̂(0) must be initialised in
some way and cannot be initialised exactly to x(0), which is unknown. In the absence of specific
information, for the symmetry of the problem, the most obvious choice is to set x̂(0) = 0. This
means that e(0) = x̂(0) − x(0) = −x(0). Assuming, for example, u(t) = 0, we obtain
ẋ = Ax(t),
ė(t) = Ae(t), (6.14)
with e(0) = −x(0), so the error has opposite initial conditions with respect to the state. By linearity,
we get
e(t) = −x(t)
Then, the error (shown in Figure 6.6) has the same amplitude of the state ∥x(t)∥ = ∥e(t)∥: the relative
error is 100 %. We would like to design an observer able to provide an estimate of the state that
86 Chapter 6. Control Systems
Figure 6.6: Evolution of the state (solid line) and of the error (dotted line) with the trivial observer.
Figure 6.7: Evolution of the state (solid line), the estimated state (dashed line) and of the error
(dotted line) with the desired observer.
converges to x(t), also in the case of unstable systems. If the system is stable, we would like the
observer to have a faster convergence than the natural convergence speed assured by the system
modes, as qualitatively shown in Figure 6.7.
Then, the right solution is given by the Luenberger observer. The trivial observer uses
information about u(t), but not about y(t). On the contrary, the Luenberger observer uses information
about both the input and the output of the process. The differential equation that governs the state
estimate is then
˙ = A x̂(t) + Bu(t) − LC( x̂(t) − x(t)),
x̂(t) (6.15)
where L is a matrix to be determined. Note that the difference is the correction term
The quantity ŷ(t) is the estimated output, which is compared with the true output y(t) and fed back.
This device is often called feedback observer. Note that the state estimation error x̂(t) − x(t)
is unknown, but the output estimation error ŷ(t) − y(t) = C( x̂(t) − x(t)) = C x̂(t) − y(t) is known
on-line, because x̂(t) is the known observer state and y(t) is the measured output. For the observer
implementation, we use the equivalent equation
Matrix L, having size n × p, contains the free design parameters. For L = 0 we recover the
trivial observer. The general scheme for the Luenberger observer is represented in Figure 6.8.
6.3. State observer 87
u x x y
B + C
x x
B + C +
To see how this new device works, we compute the error expression, subtracting the state
derivative from the estimated state derivative:
d
( x̂(t) − x(t)) = (A − LC) x̂(t) + Bu(t) + Ly(t) − Ax(t) − Bu(t) =
dt
= (A − LC) x̂(t) − Ax(t) + LCx(t) =
= (A − LC) x̂(t) − (A − LC)x(t)
= (A − LC)( x̂(t) − x(t))
and we get
ė(t) = (A − LC)e(t) (6.17)
Therefore, the error does not depend on u(t): it evolves in natural response according to the
modes of matrix (A − LC). Hence, the role of matrix L is similar to that of matrix K in a state
feedback controller. In analogy to the problem of eigenvalue placement via state feedback, we
would like to impose a set of eigenvalues Λo (O stands for observer) to matrix (A − LC), so as to
ensure fast converge of the error to zero. More formally, the problem is as follows.
Problem 6.2. Observer eigenvalues assignment Given the set of complex numbers
satisfying CEC (conjugate eigenvalues constraint), find matrix L so that the set of eigenvalues of
A − LC is
σ(A − LC) = Λo
Then we have the following result.
Theorem 6.4. The set Λo (satisfying CEC) can be arbitrarily assigned if and only if (A, C) is
observable. If the system is not observable, then Λo can be assigned if and only if it contains all of
the eigenvalues of the unobservable subsystem.
Proof. To prove the theorem, we exploit duality. Consider then the dual of the system that
provides matrix (A − LC):
A∗ = A⊤
B∗ = C ⊤
K ∗ = −L⊤ (6.18)
88 Chapter 6. Control Systems
where K ∗ −L.
Then assigning the spectrum of (A − LC) is equivalent to assigning the spectrum of (A∗ + B∗ K ∗ ),
a problem we have already studied and solved. The proof follows by duality since observability
of a system is equivalent to reachability of the dual system. Then, the problem is solvable with
arbitrary Λo if and only if the dual system is reachable, hence, if and only the primal is observable.
In the presence of unobservable modes, these correspond to unreachable modes in the dual, and the
last part of the proof follows. □
The analogy between state feedback design and Luenberger observer design, due the duality,
allows us to use the same algorithms to derive the matrices K and L. In fact, if we have any
procedure that, given the input data A, B, Λc , returns matrix K of a state feedback controller, we
can use the same procedure for observer design: by providing the input A⊤ , C ⊤ , Λo , we obtain
matrix K ∗ (the state feedback matrix for the dual system) and finally L = (−K ∗ )⊤ .
Cm
Example 6.4. Consider a servo system as in Figure 6.9. Assuming a reference angle θ = 0, let us
solve the problem of bringing the system to the zero state θ = θ̇ = 0. The equation describing this
system is
Cm (t)
J θ̈(t) = Cm (t) ⇒ θ̈(t) = = u(t)
J
If we set x1 (t) = θ(t) and x2 = θ̇(t), we obtain a state representation with matrices
" # " #
0 1 0
A= , B=
0 0 1
Suppose we have sensors for both the position and the speed. We can implement a state feedback
h i " x1 (t) #
u(t) = k1 k2
x2 (t)
6.4. Synthesis of regulators 89
which is already in Frobenius form. Then, we just have to require that −k1 and −k2 are equal to the
coefficients of the desired characteristic polynomial. If we choose p(s) = (s + 1)(s + 2) = s2 + 3s + 2,
we immediately get k1 = −2 and k2 = −3.
Employing both position and speed sensors is not convenient from an economic point of view.
We can then expect to have a single sensor, for just one of the state variables, along with an observer
estimating the variable that is not measured.
If we adopt a speed sensor, matrix C is
h i
C= 0 1
By means of a simple calculation, we see that the system is not observable (as is known, from
the speed it is not possible to determine the position). In addition, the eigenvalue of the non-
observable subsystem is zero, hence it is not asymptotically stable and the spectrum of (A − LC)
must necessarily contain the zero eigenvalue. This is not good news, because the error system
would not be asymptotically stable.
If, instead, we consider the position sensor, matrix C takes the form
h i
C= 1 0
and in this case the observability matrix has full rank. We can then compute (A − LC):
" # " # i " −l1 1 #
0 1 l1 h
(A − LC) = − 1 0 =
0 0 l2 −l2 0
s + l1 −1
" #
det(sI − A + LC) = det = s 2 + l1 s + l2
l2 s
Suppose that the desired eigenvalues are λ̄3 = −3 and λ̄4 = −4. We have p(s) = s2 + 7s + 12, hence
l1 = 7 and l2 = 12.
Remark 6.1. The observer generates an estimate of vector x̂(t) whose components are the estimated
position (which we already have as an output, thanks to the sensor) and the estimated speed. Hence,
we could avoid estimating the position, since it is already measured, and estimate the speed only
by means of a reduced order observer, which is not treated in the present course for two reasons.
First, in view of the current technology, the complexity of the full order observer is not a problem in
terms of implementation. Second, using the estimated position instead of the measured one has the
advantage that the observer has a filtering (noise-suppressing) action.
The further step for the control of the servo system is to feed the estimated state back:
h i " x̂1 (t) #
u(t) = k1 k2
x̂2 (t)
Intuitively, this idea should work because, after all, the estimated state converges to the true one.
We will prove that this scheme is successful in the following.
90 Chapter 6. Control Systems
u x x y
B C
A
L
x x
B C
y(t) = Cx(t)
while those of the observer and the controller are
˙ = (A − LC) x̂(t) + Bu(t) + Ly(t)
(
x̂(t)
u(t) = K x̂(t)
The overall system has n + n = 2n state variables (those of the process, together with those we
introduce with the observer-based controller).
" #
x(t)
xoverall (t) = ∈ R2n (6.20)
x̂(t)
The closed-loop matrix is " #
A BK
ACL =
LC A − LC + BK
To carry out the computations, a state transformation is useful to obtain a state vector that includes
both process state and estimated error. Mathematically, we have:
" # " #" #
x(t) I 0 x(t)
= (6.21)
e(t) −I I x̂(t)
The transformation matrix from the new to the old representation is then:
" # " #
I 0 I 0
T= T =
−1
(6.22)
I I −I I
(T is invertible). The overall system is governed by the following equations:
ẋ(t) = Ax(t) + Bu(t)
y(t) = Cx(t)
˙ = (A − LC) x̂(t) + Bu(t) + Ly(t) (6.23)
x̂(t)
u(t) = K x̂(t)
6.4. Synthesis of regulators 91
Applying the state transformation (i.e., manipulating the equations, with x̂(t) = x(t) + e(t)) we get
A + BK
" # " #" #
d x(t) BK x(t)
= (6.25)
dt e(t) 0 A − LC e(t)
| {z }
=Acl
Matrix ACL (CL means Closed Loop) is block triangular of size 2n × 2n. Therefore, its spectrum is
equal to the union of the spectra of its diagonal blocks:
[
σ(ACL ) = σ(A + BK) σ(A − LC) (6.26)
Under reachability and observability assumptions, these spectra can be arbitrarily assigned.
Hence, we can assign all of the eigenvalues of ACL , as follows:
2. design an observer for state estimation that assigns the eigenvalues σ(A − LC) = Λo ;
˙
x̂(t) = (A − LC) x̂(t) + Bu(t) + Ly(t)
u(t) = K x̂(t)
Observation 6.2. The assignment of the eigenvalues of the state feedback and of the observer is
performed in two independent stages. This independence is called separation principle.
The procedure leaves us complete freedom on how to choose the eigenvalues in Λc and Λr .
As a guideline, the convergence of the observer must often be faster than the convergence of the
system modes. Therefore, the negative real part of the eigenvalues of (A − LC) is usually required
to be larger (in magnitude) than the real part the eigenvalues of (A + BK) (typically 4 times larger).
The observer-based controller is thus governed by the equations:
Replacing the second equation in the first yields a useful mathematical simplification that is very
important from a physical standpoint:
In fact, we notice that we do not need to have sensors capable of measuring the input u(t), in order
to send it to the observer, because the input itself is generated as an output of the regulator system.
The regulator matrices are
(F, G, H, K) = (A − LC + BK, L, K, 0)
The controller thus obtained can be implemented in practice by means of an analog circuit, or,
much more realistically, can be implemented digitally on a computer, by exploiting the equivalent
discrete-time system having matrices
F D = eFT = e(A−LC+BK)T
Z T Z T
GD = eFσ Ldσ = e(A−LC+BK)σ Ldσ
0 0
HD = K
2. Initialise x̂(0).
4. Compute u := HD x̂.
5. Write the value of u in a memory location that will be read from the D/A converter.
8. Set x̂ = x̂+ .
10. Quit.
A final consideration concerns the effect of the observer. If we cannot completely assign
the eigenvalues via state feedback, we need an observer. Hence, we need to assign additional
modes: these affect the system with their transient (which is typically fast). To analyse the problem,
consider an input of the form
u(t) = K x̂(t) + v(t), (6.28)
where v(t) is a reference signal (often constant). It can be seen that the transfer function between
v(t) and y(t) is the same in both the state feedback case and the estimated state feedback case,
because the error e is not a reachable variable (this is immediate, since e evolves as ė = (A − LC)e).
Example 6.5. Reconsider the previous example, where we have obtained the parameters of the
matrices K and L for the servo-system. The controller implementation is immediate:
" # " #h i " 7 #h
0 1 0 i
F = A + BK − LC = + −2 −3 − 1 0 =
0 0 1 12
" #
−7 1
=
−14 −3
" #
7
G = L=
12
h i
H = K = −2 −3
A final remark concerns the discrete-time systems case. The discrete-time observer-based
control writes as
u(k) = K x(k)
x̂(k + 1) = (A − LC) x̂(k) + Bu(k) + Ly(k) (6.29)
As in the continuous-time system case, the error is governed by the equation:
e(k + 1) = (A − LC)e(k) (6.30)
Once again, the theory for discrete-time systems is parallel to that for continuous-time systems.
The only caution is that the eigenvalues must be assigned with the condition |λ̄k | < 1 so as to ensure
stability of the modes.
6.6 Examples
Example 6.6. (Two tank system.) As we will see in the examples chapter, the linearised equation
of the two-tank system has matrices
" # " #
−p p −1
A= B=
p −(p + δ) 0
The system poles are −2p ± 4p2 − 4pδ. Since δ is positive and small, one (negative) root is quite
p
close to 0.
To speed up the system, we can assign the eigenvalues: in particular, we can move the “slow”
pole far from the imaginary axis (to the left).
s + p − k1
" #
−p − k2
det[sI − A + BK] = det = s2 + (+2p − δk1 )s − (p + δ)k1 − pk2 + δp
−p s + (p + δ)
If the polynomial p̄(s) = s2 + p̄1 s + p̄0 is to be assigned, we get the equations
(+2p − δk1 ) = p̄1
−(p + δ)k1 − pk2 + δp = p̄0
which the reader is invited to solve.
Example 6.7. (Electrical machine control.) Consider the following model of a direct-current
electrical machine
x1 (t) ϵ
x1 (t) −α −β 0
x2 (t) = γ −δ 0 x2 (t) + 0 u(t)
x3 (t) 0 1 0 x3 (t) 0
where x1 (t) = ia , x2 (t) = ω and x3 (t) = φ are the armature current, the angular speed and the
angle, respectively, and where the input u(t) = va (t) is the armature voltage. We assume that
y(t) = x3 (t) = φ is the measured output, while α, β, γ, δ and ϵ are positive constants. Observability
and reachability have been tested for this system. To assign the eigenvalues, we write the matrix
s + α − ϵk1 β − ϵk2 −ϵk3
[sI − (A + BK)] = −γ s+δ 0
−1
0 s
Its determinant is
s3 + [α − ϵk1 + δ]s2 + [αδ − δϵk1 + γβ − γϵk2 ]s + ϵk3 γ
Given the desired characteristic polynomial for the state feedback s3 + ā2 s2 + ā1 s + ā0 , the solution
is found by equating term by term
α − ϵk1 + δ = ā2 , αδ − δϵk1 + γβ − γϵk2 = ā1 , ϵk3 γ = ā0
therefore k1 = (α + δ − ā2 )ϵ, k3 = (ā0 /γ)ϵ and k2 = (αδ − δ(α + δ − ā2 ) + γβ − ā1 )/(ϵγ).
For the state observer we proceed in the dual way and we consider the determinant of matrix
s + α β
l1
[sI − (A − LC)] = −γ s + δ l2
−1 s + l3
0
which we equate to the desired observer characteristic polynomial s3 + â2 s2 + â1 s + â0 . The reader
is invited to complete the exercise. The resulting regulator is
ż(t) = [A + Bk − LC]z + Ly, u(t) = Kz(t),
where z(t) is a state estimate.
6.6. Examples 95
Example 6.8. (Unknown constant signal.) As we have seen, the presence of an external signal or
disturbance may prevent the estimation error from converging to zero. This is true in the absence of
information on the disturbance. An interesting case is that of constant disturbances.
Assume that we have the system
where d is unknown but constant. This allows us to write an additional equation, ḋ = 0. We get
" # " #" # " # i " x(t) #
x(t) A E x(t) B h
= + u(t) y(t) = C 0
d(t) 0 0 d(t) 0 d(t)
If the augmented system is observable, we can reconstruct the constant signal by means of an
observer.8 Consider the servo system subject to a constant external torque (e.g., a lift with an
unknown load)
" # " # " #
0 1 0 0 h i
A= , B= , E= , C= 1 0
0 0 1 1
This system is observable. It is essential to notice that the augmented system is not reachable with
input B. In fact, by assumption, the external torque is constant and cannot be modified. Still, we
can design an observer that estimates position, speed and torque. Then we can use state feedback
to control the system position and speed.
8
If (A, E) is reachable and (A, C) is observable, then the augmented system is observable. The proof is not easy: it
can be done via Popov criterion.
Chapter 7
Nonlinear systems
Example 7.1. (Population evolution.) Population dynamics are interesting to analyse, for instance,
when studying colonies of bacteria in a laboratory or animal species in a natural environment.
These phenomena can be modeled by more or less complicated equations. We consider a very
simple model, which describes the evolution of a single population x(t). In the simplest case, a
population evolves according to the following linear equation: ẋ(t) = ax(t), where a > 0 is a scalar
coefficient. This represents the fact that the population grows proportionally to the population itself.
The solution is then a classic exponential x(t) = eat x(0). However, this model does not take into
account the limited resources of the surrounding environment. A well accepted model that includes
the dependence on the available resources is represented by the following nonlinear system:
" #
x(t)
ẋ(t) = a 1 − x(t)
C
x(t)
Note that, for x(t) ≪ C, the term is negligible and the model is almost linear. On the other
C
hand, if x(t) increases, the same term represents a limitation for the birth rate, due to the shortage
of resources. Even more, if x(t) > C, we have a trend inversion, and the number of births is less
than the number of deaths.
97
98 Chapter 7. Nonlinear systems
This is one of the simple and rare cases in which is possible to give an analytical solution,
which is the following:
eat x(0)
x(t) = x(0)
1 − x(0)
C + C e
at
For general nonlinear systems, there are few chances of finding analytic solutions like this one.
The evolution of the population with different initial conditions is reported in Figure 7.1.
To present the spirit of the investigation of nonlinear systems, we show that the same qualitative
considerations that we can derive from the closed-form solution can be drawn without solving the
equation, but just analysing it. Indeed, from the equation we immediately see that
Then, there are two equilibria characterised by ẋ = 0. Above the upper equilibrium the population
decreases, between the two equilibria the population increases, in 0 the population remains at 0.
The solution x(t) = C is a stable equilibrium point, because all the solutions with initial condition
grater than zero converge to x(t) = C. Vice versa, x(t) = 0 is an unstable equilibrium point, because
any small perturbation brings the solution far from zero. Actually, what we can see is that all the
conditions that we obtained from the analytical solution can be deduced based on a qualitative
analysis as well. Such a qualitative analysis is the main subject of this chapter.
With few exceptions, we neglect the case where there is a direct time dependence of ẋ(t) =
f (x(t), u(t), t) or x(k + 1) = f (x(k), u(k, k)), on time (non-autonomous systems), since it is much
more complicated and less important in practice.
7.2. Equilibrium points 99
Definition 7.1. Given a vector x̄ ∈ Rn , we say that it is an equilibrium point for the system (either
(7.1) or (7.2)) if there exists ū, called equilibrium input, such that, for x(0) = x̄ and u(t) = ū, we
have that x(t) ≡ x̄. In this case, the pair ( x̄, ū) ∈ Rn × Rm is called equilibrium pair.
The equilibrium conditions in a nonlinear system are easily obtained. Indeed, we have that, if
x(t) ≡ x̄ and u(t) = ū, then it is also true that ẋ = 0 for continuous-time systems, and x(k + 1) = x(k)
for discrete-time systems. Then, the equilibrium conditions are
x
B
A
t
Figure 7.2: Evolution of a population with external input. Line A: extinction threshold; line B:
survival threshold.
Example 7.2. (Population evolution, continued.) Consider again the equation for population
evolution in the previous example. We can easily find out that the equilibrium points are
x̄
1− x̄ = 0 ⇒ x̄ = 0, x̄ = C
C
Is is interesting to observe what happens if we add to the equation a term that represents an external
input (for instance hunting or predation):
x̄
1− x̄ + ū = 0
C
where ū < 0. In this case, the equilibrium points are the solutions of the equation above for a given
ū: r
C a a 2 a
x̄1, 2 = ± + ū
a 2 2 C
100 Chapter 7. Nonlinear systems
This method, known as Euler explicit method, represents a good approximation if the step τ is small
enough, while, if τ is too large, the discrete-time solution may not converge to the continuous-time
solution.
To assess the effectiveness of this method, we can check if the equilibrium conditions of the
Euler system correspond to those of the original continuous-time system. Indeed, it is very easy
to check that the equilibrium points of the approximating discrete-time system are the same of the
continuous-time system:
x̄ = x̄ + τ f ( x̄, ū) ⇔ f ( x̄, ū) = 0
Obviously, nothing can be said about the stability. In fact, stable equilibrium points of the
continuous-time system could be unstable for the discrete-time approximation (in particular if τ > 0
is not small enough).
Additional examples about equilibrium points will be presented in further sections.
Note that, for continuous-time linear systems, the equilibrium condition is
0 = A x̄ + Bū,
namely, the equilibrium pairs are the kernel of matrix [A B]. The reader is invited to find out the
equilibrium condition for discrete-time linear systems.
UNSTABLE
STABLE
Figure 7.3: Stable and unstable equilibrium points for a rolling sphere.
which is an autonomous system without inputs, with equilibrium point in x̄. We can apply a
coordinate shift: we introduce then the new variable z(t) = x(t) − x̄ and we get
With this new definition, the equilibrium point is z̄ = 0. We define G x̄, ū (z(t)) = Fū (z(t) + x̄).
Therefore can study the following system:
with equilibrium point in 0 = G x̄, ū (0). Thanks to a suitable change of variables (as done above), we
can always bring us back to the study of autonomous systems without inputs, of the form
In the sequel we will be also concerned with the stabilisation problem: we will use a control that
stabilises the equilibrium (if necessary). In this case, a change of variable is applied to the input as
well:
v(t) = u(t) − ū
Hence,
ẋ(t) = ż(t) = f (z(t) + x̄, v + ū) = G x̄, ū (z(t), v(t))
and
ż(t) = G x̄, ū (z(t), v(t)) (7.11)
is the equation we use for stabilisation. Again, the stabilisation problem can be approached by
considering a system for which (0, 0) is an equilibrium pair
To recap we have
V=1 x(0)
V=2
V=4
The concept introduced by Lyapunov, which we will shortly formalise with a theorem, is based
on an observation: if a trajectory x(t) of the system, with x(0) sufficiently small, is such that V(x(t))
is a non increasing function, then x(t) is forced to stay inside a sub-level set. And, if V(x(t)) is
decreasing, then the trajectory must converge to 0.
The fundamental problem is that, in most of the cases, the trajectory x(t) of a nonlinear system
is unknown, so in principle we are not able to tell whether V(x(t)) is a non increasing (or decreasing)
function. However, to avoid this obstacle, we can consider the derivative of the function:
d
V(x(t)) = V̇(x(t)) = ∇V(x) ẋ(t) = ∇V(x) f (x(t)), (7.13)
dt
7.3. Lyapunov functions 103
h ∂V ∂V ∂V
∂x2 . . . ∂xn . We notice that, if at a certain instant t the system has state
i
where ∇V(x) = ∂x 1
x(t) = x̃, then the derivative is easily computable
d
V(x(t)) = V̇(x(t)) = ∇V( x̃) f ( x̃) (7.14)
dt x(t)= x̃ x(t)= x̃
Hence it is no longer necessary to know the full trajectory x(t) in order to evaluate the derivative
of V. This derivative, also known as Lyapunov derivative, is useful to establish the stability of
a system: if V̇(x) ≤ 0, then V(x) is a non increasing function, while if V̇(x) < 0, then V(x) is a
decreasing function.
Remark 7.1. The Lyapunov derivative V̇(x) = ∇V(x) f (x) is the derivative of V(x(t)) if x(t) = x
along the system trajectory: it depends on both V and the system equation ẋ = f (x).
• if furthermore V̇(x) < 0 for x ∈ W\{0}, then the system is asymptotically stable I.E.P. x̄ = 0.
Proof. We prove the first part of the theorem only: if V̇(x) ≤ 0, then the system is stable I.E.P.
in zero. Let us take the sphere S ε = {x : ∥x∥ ≤ ε} in the state space. It is not restrictive to choose
S ε ⊂ W. Let m be the minimum value of V on the external surface of the sphere, ∥x∥ = ε,
m min V(x).
x∈∂S ε
Now we take a new sphere S δ with radius δ < ε. Define M as the maximum of V inside S δ
M max V(x),
x∈S δ
We can take δ small enough to assure that (by continuity of V, since V(0) = 0)
M < m.
By contradiction, assume that the system is not stable and that, for some initial condition inside
S δ , there is a trajectory that escapes from the sphere S ε . Then there exists a time instant t′ such that
x(t′ ) ∈ ∂S ε . Let t1 be the first positive instant in which x(t) hits the boundary of S ε
Between the instants t = 0 and the instant t = t1 , the trajectory is contained in S ε , and therefore
also in W. Then we have that V̇(x(t)) ≤ 0 for all t ∈ [0, t1 ]. On the other hand, by construction and
by the definitions of m and M, we have
hence V(x(t1 )) > V(x(0)), in contradiction with the fact that V̇(x(t)) ≤ 0 in the interval.
The second part of the problem, which concerns asymptotic stability, will not be proved: the
interested reader is referred to specialised books. However, the proof can be sketched as follows.
First we notice that V̇ = ∇V(x) f (x) is continuous, since f is continuous. If x(0) ∈ {x : V(x) ≤ κ} ⊂
W, namely, if we start inside a sphere that is contained in the κ sub-level set, then V(x(t)) ≤ κ for
104 Chapter 7. Nonlinear systems
all t > 0, because V̇ ≤ 0. For the same reason, if at some time t1 the trajectory reaches a smaller
sub-level set, x(t1 ) ∈ {x : V(x) ≤ κ1 }, κ1 < κ, then it will be trapped inside this new sub-level
set after t1 : V(x(t)) ≤ κ1 for all t > t1 . The proof can be carried out by showing that, no matter
how small κ1 is taken, the set {x : V(x) ≤ κ1 } will be ultimately reached. This can be proved
by contradiction. If the set is not reached, then the solution has to stay in the intermediate set
x(t) ∈ {x : κ1 ≤ V(x) ≤ κ}, namely,
κ1 ≤ V(x(t)) ≤ κ
for all t ≥ 0. In this closed set, V̇ has a maximum (−µ) that is strictly negative. Then
V̇(x(t)) ≤ −µ.
By integration Z t Z t
V(x(t)) − V(x(0)) ≤ V̇(x(σ))dσ ≤ −µdσ = −µt,
0 0
but this means that V(x(t)) becomes negative for t > V(x(0))/µ, which is not possible. □
Example 7.4. Consider the system
In fact, in a sufficiently small neighborhood of the equilibrium point (0, 0), the quadratic terms
dominate over the others. Therefore, the function V̇(x1 , x2 ) is negative semi-definite and this proves
the asymptotic stability of the system (I.E.P.).
Example 7.5. (The pendulum.) Given the pendulum shown in Figure 7.5, we want to study stability
of its equilibrium points. The system is described by the equation
2
lm ϑ̈(t) = −lm g sin ϑ(t)
Denoting by x1 (t) = ϑ(t) and x2 (t) = ϑ̇(t), and assuming all constants equal to 1, the system is:
The natural candidate Lyapunov function, from physical considerations, is mechanical energy,
equal to the sum of kinetic energy and potential energy:
1 2
V(x1 , x2 ) = x + 1 − cos x1
2 2
This function is positive definite in a neighborhood of the equilibrium, hence is a candidate
Lyapunov function. We obtain:
h i" x2
#
V̇(x1 , x2 ) = sin x1 x2 = x2 sin x1 − x2 sin x1 = 0
− sin x1
Hence, V̇(x1 , x2 ) is negative semi-definite, and this guarantees the system stability I.E.P.
7.3. Lyapunov functions 105
Mg
Figure 7.5: Pendulum (basic).
Example 7.6. Two-tank system Let us consider the system with two water tanks, whose equations
will be presented in Chapter 9.8.
√
ḣ1 = − αS
1
√ h1 − h2 +1u √
(
ḣ2 = αS h1 − h2 − βS h2
1
The system admits a generic equilibrium point in (h̄1 , h̄2 ). By translating the system with x1 = h1 −h̄1
and x2 = h2 − h̄2 ,1 we have:
p
ẋ1 = − αS
1
p x1 − x2 + h̄1 − h̄2 + u p
ẋ2 =
1
x1 − x2 + h̄1 − h̄2 − βS1 x2 + h̄2
αS
Consider the function V(x1 , x2 ) = x12 + x22 , V̇(x1 , x2 ). Then, with some manipulation we get
!
1
q
V̇(x1 , x2 ) = x1 x1 (t) + h̄1 − x2 (t) − h̄2 − q̄
αS
!
1 1
q q
+ x2 − x1 (t) + h̄1 − x2 (t) − h̄2 + x2 (t) + h̄2 ± x2 q̄
αS βS
! !
1 1
q q
= (x1 − x2 ) x1 (t) + h̄1 − x2 (t) − h̄2 − q̄ − x2 x2 (t) + h̄2 − q̄
αS βS
p p
If we consider the equilibrium conditions, αS 1
+h̄1 − h̄2 − q̄ = 0 and βS1 h̄2 − q̄ = 0, we see that
the sign of the terms in round brackets is opposite to that of x1 − x2 and x2 , hence the products are
negative. Then, V̇(x1 , x2 ) < 0 (for x1 , x2 ) , (0, 0). This proves asymptotic stability I.E.P.
1
The equilibrium conditions are derived in Chapter 9.8.
106 Chapter 7. Nonlinear systems
It is important to notice that a wrong choice of the function V(x) does not lead us to any
conclusion. If the Lyapunov derivative is possibly greater than zero in the neighborhood W, we
cannot say anything about the system stability in the equilibrium point.
Example 7.7. Consider system ẋ = Ax, where
−1 α
" #
A=
−1 −1
x2
N
x1
Example 7.9. Let us re-examine the dissipative pendulum and consider Figure 7.6.
The figure shows the neighbourhood W of the origin (a circle), the set N (the set of points with
x2 = 0 and x1 , 0) and a trajectory of vector ẋ(t) starting from an initial condition in N. For any
point in N, such that x2 = 0 and x1 , 0, the derivative is
" # " #
ẋ1 0
=
ẋ2 − sin x̄1
Hence, it must be ẋ2 , 0 and x2 (t) cannot remain 0, hence the trajectory will leave the set N. In
geometric terms, we see that the derivative vector has the direction of the x2 -axis, and the trajectory
is forced to exit from N, leaving the set of states where there is no dissipation. Thanks to the
Krasowskii criterion, we have then proved asymptotic stability. Figure 7.7 shows the trajectories of
the dissipative pendulum.
Theorem 7.3. (Cetaev criterion.) Suppose that a function V(x) ∈ C1 is defined in a neighbourhood
W of the origin. Assume that there exists an open set A such that the origin is contained inside the
closure of A (in other words, 0 is either in A or on the border of A, ∂A). Assume also that
• V(x) = 0 ∀ x ∈ ∂A ∩ W;
• V(0) = 0;
We can give an intuitive explanation of this theorem. Suppose, to simplify, that the origin
belongs to the border of A, which is the most interesting case, as shown in Figure 7.8. We see that
every trajectory that starts from W near the border of A, ∂A ∩ W, since V and V̇ are positive and
continuous, has to exit from W, so we cannot have local stability.
2
Mathematicians often publish a scientific article when they find a good Lyapunov function...
108 Chapter 7. Nonlinear systems
δA
V=0
VV>0
Example 7.10. Consider the magnetic levitator shown in Figure 9.15, Chapter 9.9. If we neglect
the electric equation (which means that we consider a permanent magnet), the system is described
by following equations:
ẋ1 (t) = x2 (t) 2
ẋ2 (t) = g − mk xi 2
1
0 = x2
k i2
0=g−
m x2
1
This means having null velocity and magnetic force equal and opposite to the gravity force. We
want to prove the instability of the equilibrium point obtained with a constant value of the current
i = ī. First of all, we shift the intersection of the axes to the equilibrium point:
z1 = x1 − x̄1
z2 = x − x̄2
2
ż1 = z2 + x̄2 = z2
⇒ 2
ż2 = g − mk (z +ī x̄ )2
1 1
Now the equilibrium point is (0, 0). As a candidate Cetaev function, we take V(x1 , x2 ) = z1 z2 . We
choose the set A as A = {z1 > 0, z2 > 0}. We have that:
ī2
!
h i z2 k
V̇(z1 , z2 ) = z2 z1 = z2 + z1 g −
2
2
g − mk (z +ī x̄ )2 m (z1 + x̄1 )2
1 1
V is null on the boundary (if either z1 = 0 or z2 = 0). Both V and V̇ are positive in the interior of A.
In view of Cetaev criterion, the system is unstable I.E.P.
and the equilibrium points are found as the solutions of the equation
The shifting is done as for continuous-time systems, assuming z = x − x̄, and assuming that
v(k) = u(k) − ū we can study a system of the following type:
in the 0 equilibrium state. For discrete-time systems, we take in consideration the Lyapunov
difference defined as follows:
Observe how in the last formula x(k + 1) has been replaced by the function f (x(k)), in view of the
equation which describes the system: we do not need to know the trajectory. The main idea is that,
if difference is not increasing, then the system is stable.
Theorem 7.4. Assume that f is continuous and there exists a function V(x) that is continuous in a
neighborhood W of 0 and positive definite in W (i.e., V(0) = 0 and V(x) > 0 ∀ x ∈ W\{0}). Then:
V(x) = x⊤ Px (7.21)
If matrix P is symmetric and positive definite, then V(x) is a candidate Lyapunov function. It can
be easily verified that the gradient is the row vector
Quadratic functions with symmetric and positive definite matrices are, without any doubt, the most
used Lyapunov functions. Now, if we consider a linear system ẋ(t) = Ax(t) (the input is not relevant
to stability) and we compute the derivative of the Lyapunov function that we have just introduced,
we obtain:
V̇(x) = ∇V(x) · f (x) = 2x⊤ PAx = x⊤ PAx + x⊤ PAx (7.23)
The last two terms are scalars, therefore we can transpose the first one without changing the result.
Then we have:
where we have defined Q = −(A⊤ P + PA). It can be easily seen that Q is a symmetric matrix,
because it is the sum of −A⊤ P and its transpose (−A⊤ P)⊤ = −PA. We obtain the following
fundamental equation
A⊤ P + PA = −Q (7.25)
3
The proof is more involved than in the continuous-time case, because discrete time can “jump”, so we cannot define
the instant t1 as we did the previous proof.
7.5. Lyapunov equations for linear systems 111
d At
Noticing that e = AeAt = eAt A,4 the function to be integrated is a derivative, hence:
dt
Z +∞ h i+∞
d A⊤ t At i h ⊤
A P + PA =
⊤
e Qe dt = eA t QeAt = 0 − Q, (7.28)
dt 0
0
where in the last equality we have used the fact that the system is asymptotically stable, hence
eAt = 0.
t→+∞
Matrix P given by the previous expression is
• symmetric, since the function
to be integrated is symmetric, because we can see (based on
At ⊤ A⊤ t
the exponential series) that e =e ;
• positive definite, because for any x̄ , 0 we have:
Z +∞ Z +∞ Z +∞
A⊤ t ⊤ A⊤ t
x̄ ⊤
e Qe dt x̄ =
At
x̄ e Qe x̄ dt =
At
x⊤ (t)Qx(t) dt (7.29)
0 0 0
where we have denoted by x(t) = eAt x̄ , 0. Then the function to be integrated is positive,
because by assumption Q is positive definite, therefore also the integral is positive, thus
proving that P is positive definite.
4
This is one of the few cases in which the product commutes and the position of matrix A is not important in the
derivative.
112 Chapter 7. Nonlinear systems
□
The Lyapunov equation is linear in P, therefore we can avoid the computation of the integral
and solve an algebraic linear system, where the unknowns are the elements of P. Actually, only the
entries of the upper (or lower) triangle of P have to be considered, because P is symmetric. The
(n + 1)n
total number of unknowns and equations is then n + (n − 1) + (n − 2) + . . . + 1 = .
2
Example 7.11. Consider the state matrix
" #
0 1
A=
−1 −1
α β α β
" # " # " # " # " #
0 −1 0 1 1 0
+ =−
1 −1 β γ β γ −1 −1 0 1
namely
α−β−γ
" # " #
−2β 1 0
=−
α−β−γ 2(β − γ) 0 1
Equating term-by-term, we get β = 1/2, γ = 1 and α = 3/2. The resulting matrix P is
" 3 1
#
P= 1 2 2 ,
2 1
2. for any positive definite matrix Q, the solution P of the discrete Lyapunov equation A⊤ PA −
P = −Q is positive definite.
Proof. It is similar to the proof in the continuous-time case, but we just have to consider, instead
of the integral, the sum
X∞
P= (A⊤ )k Q(A)k
k=0
□
7.6. Linearisation 113
The previous discussion allows us to perform a test to verify the asymptotic stability of a system.
However, since we consider linear systems, such a test could not seem really useful, because
stability can be simply studied by analysing the eigenvalues of matrix A. Moreover, almost all of
the algorithms that compute matrix P by solving either continuous or discrete Lyapunov equations
go through the computation of the eigenvalues of A, making the test pointless. Nevertheless, these
results are of fundamental importance for their consequences, including the possibility to give a
rigorous support to the linearisation theory.
A final consideration concerns the choice of matrix Q in order to find P. Choosing a positive
definite matrix is easy: a possibility is the identity matrix. As an alternative, we can consider a
square and invertible matrix R and compute Q = R⊤ R, which is
• symmetric, because R⊤ R ⊤ = R⊤ R;
• positive definite, because ∀ x , 0 we have x⊤ (R⊤ R)x = (Rx)⊤ (Rx) = ∥Rx∥2 > 0, because R is
invertible (nonsingular).
7.6 Linearisation
The topics discussed in this section and in the next ones are of high importance, because they will
justify our careful development of the theory for linear systems.
We start by reminding elementary notions of differential calculus. Consider a nonlinear function
f (x) in one dimension. It is well known that, if f is continuously differentiable, we can apply
Taylor theorem and write the function as follows:
where R(x − x0 ) is the residual and is an infinitesimal of order greater that one:
|R(x − x0 )|
→ 0 as x → x0 (7.33)
|x − x0 |
They represent a line passing through the point x0 with slope f ′ (x0 ).
For nonlinear functions in two scalar variables, the situation is similar. With a Taylor expansion,
we obtain:
" #
x − x0
f (x, u) = f (x0 , u0 ) + ∇ f + R(x − x0 , u − u0 ) =
u − u0
∂f ∂f
= f (x0 , u0 ) + (x − x0 ) + (u − u0 ) +
∂x x0 , u0 ∂u x0 , u0
+R(x − x0 , u − u0 ) (7.35)
In this case, the linear approximation is the equation of the plane that passes through (x0 , u0 ), with
equation:
f¯(x, u) = f (x0 , u0 ) + α(x − x0 ) + β(u − u0 ) (7.36)
The partial derivatives computed in the point are the coefficients of the plane that locally approxi-
mates the curve f = f (x, u).
114 Chapter 7. Nonlinear systems
This approximation can be applied to the case of nonlinear systems ẋ(t) = f (x(t), u(t)), where
the linear approximation can be determined with reference to a particular equilibrium point identified
by 0 = f ( x̄, ū):
∂f ∂f
" # " #
f (x, u) = f ( x̄, ū) + (x − x̄) + (u − ū) + R(x − x̄, u − ū) (7.37)
| {z } ∂x x̄, ū ∂u x̄, ū
=0
The terms
∂f ∂f
" # " #
∂x x̄, ū ∂u x̄, ū
∂ fi ∂ fi
" # " #
∂x j x̄, ū ∂u j x̄, ū
and become simple numbers once the derivatives are evaluated at the equilibrium point. Computing
the derivatives is a simple operation.
If an output transformation is given,
ȳ = g( x̄, ū)
∂g ∂g
" # " #
y(t) = G(x(t), u(t)) = ȳ + (x(t) − x̄) + (u(t) − ū) + S (x(t) − x̄, u(t) − ū) (7.38)
∂x x̄, ū ∂u x̄, ū
z(t) = x(t) − x̄
v(t) = u(t) − ū
w(t) = y(t) − ȳ
This transformation is nothing else than an axis shifting, in order to have the equilibrium point in
(z, v) = (0, 0) corresponding to the output w = 0. This means that, if in a thermal system T = 20oC
is the equilibrium temperature, in the new reference the desired temperature will be 0oC.5
Then the series expansion becomes:
∂f ∂f
" # " #
ż(t) = ẋ(t) = f ( x̄, ū) + z(t) + v(t) + R(z(t), v(t))
∂x x̄, ū ∂u x̄, ū
= 0 + A x̄, ū z(t) + Bx̄, ū v(t) + R(z(t), v(t)) (7.39)
∥R(z, v)∥
→ 0 as (∥v∥, ∥z∥) → 0
∥z∥ + ∥v∥
5
With no complaints.
7.6. Linearisation 115
Therefore, for little shifts in the neighbourhood of the equilibrium point, we can neglect the residual
term and obtain a linearised system of the form:
∂g ∂g
" # " #
w(t) = z(t) + v(t) + S (z(t), v(t))
∂x x̄, ū ∂u x̄, ū
where
∥S (z, v)∥
→ 0 as (∥v∥, ∥z∥) → 0
∥z∥ + ∥v∥
by neglecting the residual
w = C x̄, ū z(t) + D x̄, ū v(t)
To summarise, the nonlinear system written with reference to the equilibrium point is
where the matrices depend on the chosen equilibrium, although we can remove the indices x̄, ū
for a softer notation
∂ fi
[A]i j = ( x̄, ū)
∂x j
∂ fi
[B]i j = ( x̄, ū)
∂u j
∂gi
[C]i j = ( x̄, ū)
∂x j
∂gi
[D]i j = ( x̄, ū) (7.43)
∂u j
We will use the linearised system at the equilibrium point for two different purposes.
• Stability analysis: we analyse stability of the approximated system ż(t) = A x̄, ū z(t).
• Synthesis problem: by considering the linear approximation, we will build a regulator based
on the techniques studied for linear systems. This regulator will be applied to the nonlinear
system, as shown in Figure 7.9.
116 Chapter 7. Nonlinear systems
SYSTEM
Example 7.12. Let us consider the magnetic levitator described in Chapter 9.9. The equations that
describe the system are:
ẋ1 (t) = x2 (t)
x2 (t)
ẋ2 (t) = g − mk x32 (t)
1
ẋ3 (t) = − R x3 (t) + 1 u(t)
L L
The output e(t) is the voltage of a photo-diode that detects the position of the metallic sphere, based
on the light intensity that crosses a diaphragm and that is not covered by the sphere itself. The
equilibrium points of the system are determined by:
0 = x̄2
2
k x̄3
=
0 g −
m x̄2
1
0 = − R x̄3 + 1 ū
L L
In this case, it is natural to fix the position x̄1 , in which we want to keep the sphere, and find x̄3 and
ū consequently. Setting z1 = x1 − x̄1 , z2 = x2 − x̄2 e z3 = x3 − x̄3 , we have the linearised system
ż1 (t) 0 2 1 0
z1 (t) 0
k x̄
ż2 (t) = 2 m x̄33 0 −2 m x̄32 z2 (t) + 0 v(t)
k x̄
1 1 1
ż3 (t) z3 (t)
0 0 − RL L
The derivative inside matrix C x̄1 , x̄2 , x̄3 can be found from the slope of the photo-diode curve given
by the constructor. Matrix C is of the type
h i
µ 0 0
with µ , 0, hence the system is observable, as it can be easily checked. Therefore the linearised
system is stabilisable. The guess is that, if we can stabilise the linearised system, then we can also
stabilise the nonlinear system around the equilibrium point. We will see that this is the case.
We have seen that, by means of the coordinate shift z(t) = x(t) − x̄ and v(t) = u(t) − ū, we can bring
the equilibrum point to 0 and obtain the equivalent system
where A is the Jacobian evaluated at x = x̄ (we should have written A x̄ , but for brevity we will not
write any index from now on).
Observation 7.1. Remember: the linear approximation is valid only in a neighborhood of the
considered equilibrium.
The fundamental question is now: by analysing the stability of (7.46), which information can
we obtain on the stability of (7.45) in the equilibrium point (I.E.P.) x̄ = 0? The following is a
fundamental result.
• If the linear system (7.46) is asymptotically stable, then the nonlinear system (7.45) is
asymptotically stable I.E.P.
• If the linear system (7.46) is exponentially unstable (namely, ∃ λ ∈ σ(A) such that ℜ{λ} > 0),
then the nonlinear system is unstable I.E.P.
Proof. We prove only the first claim, since the second one is more difficult. To this aim, we
need two important properties. We remind that the norm of a matrix is defined as
∥Mx∥ 1
∥M∥ sup = max σ(M ⊤ M) 2 (7.47)
∥x∥,0 ∥x∥
118 Chapter 7. Nonlinear systems
Hence ∥Mx∥ ≤ ∥M∥ ∥x∥ (the implication is quite easy to see) and ∥MN x∥ ≤ ∥M∥ ∥N x∥ ≤
∥M∥ ∥N∥ ∥x∥. Moreover, we remind Schwartz inequality: if we denote by (x, y) the scalar product
of two vectors x and y, then
|(x, y)| ≤ ∥x∥ ∥y∥. (7.48)
In view of Theorem 7.5, if the linear system is asymptotically stable, for any choice of Q
positive definite, matrix P, solution of the Lyapunov equation, is positive definite. Then take Q = I,
the identity matrix, and the solution P of the equation
A⊤ P + PA = −I (7.49)
provides the Lyapunov function V(x) = x⊤ Px for the linear system. We now show that V(x) if a
Lyapunov function for the nonlinear system as well, thus proving the stability of (7.45) I.E.P.
Compute V̇(x) for the nonlinear system:
We obtain, for x , 0,
2|x⊤ PR(x)|
!
V̇(x) ≤ −∥x∥ + 2|x PR(x)| = −∥x∥ 1 −
2 ⊤ 2
∥x∥2
We show now that there exists a neighborhood W of zero in which
2|x⊤ PR(x)|
<1 (7.51)
∥x∥2
In fact, by applying Schwartz inequality and the property of matrix norms,
• if α > 0, then for x(t) > 0 we have ẋ(t) > 0, and for x(t) < 0 we have ẋ < 0: the system is
unstable I.E.P.;
• if α < 0, then for x(t) > 0 we have ẋ(t) < 0, and for x(t) < 0 we have ẋ > 0: the system is
asymptotically stable I.E.P., as we can see also by means of the Lyapunov function V(x) = x2 ;
∂f
" #
ẋ(t) = x + R(x) = 0 + R(x)
∂x 0
Then the matrix of the linearised system is zero independently of α (A = [0], and so its eigenvalue is
equal to zero for all α), in all of the three cases above. Therefore, it is obvious that the linearisation
criterion does not give us any information about the stability of the nonlinear system.
Remark 7.2. In control theory, if we find some eigenvalues with zero real part (while the others
have negative real part), we can come to a conclusion anyway. This is a situation that we should
avoid. Indeed, small perturbations on the system parameters can lead the eigenvalues to have a
real part greater than zero, thus leading to instability. Would you take a flight if the aircraft had
some poles at ± jω?
7.8 Stabilisation
Suppose that we have already linearised a nonlinear system at the equilibrium point. To avoid
complicated computations, we assume that y = g(x) does not depend on u (strictly proper system).
This immediately implies that D = 0. Hence,
By neglecting the residuals and working only with the approximated linear systems, we know how
to design a linear regulator. A legitimate question is whether the regulator that has been designed
based on the linear system is able to stabilise the nonlinear system in the equilibrium point as well.
The regulator, determined by means of any of the available methods for linear systems, will be
a system of the form:
żC (t) = FzC (t) + Gw(t)
(
(7.53)
v(t) = HzC (t) + Kw(t)
Assume that it stabilises the approximated linear system. The matrix of the closed-loop linear
system is
A + BKC BH
" # " #" #
ż(t) z(t)
= (7.54)
żC (t) GC F zC (t)
and is stable if the regulator is properly designed.
This regulator, however, is applied to the true system, which is a nonlinear system. By joining
(7.52) and (7.53), we get
where the last term is the residual, which is an infinitesimal of order greater than 1. So, if we
apply the theorem about stability analysis at the equilibrium point, we can study the stability of the
linearised system (neglecting the residual). But the matrix of such a linear system has eigenvalues
with negative real part, because it is exactly the matrix obtained when designing the chosen regulator
A + BKC BH
" #
Acl =
GC F
Hence, the closed-loop system turns out to be stable at the equilibrium point. This confirms that the
design of a regulator for the approximated linear system allows us to obtain a nonlinear system
that is asymptotically stable I.E.P., as shown in Figure 7.10. In the figure, solid arcs represent
linearisation, while dashed arcs represent the application of the regulator: by commuting the
operations of linearisation and application of the regulator, we reach the same stable linear system.
linearized system
7.9 Robustness
All systems in practice are affected by uncertainties. Uncertainties are typically due to the following
factors:
• model approximation.
In these cases, stability has to be ensured in a robust way, namely, under all possible cases and
variations. This is the problem of robust control design and is fundamental in control applications.
We provide a general definition of robustness and then we give just a simple condition based on
Lyapunov theory in a specific case.
First of all, to formulate a robustness problem we need
• a family F of systems, which can be all the possible actual models among which a single
one will be the exact “true” system (we do not know which one);
7.9. Robustness 121
• a property P of the system, which can be, for instance, stability, or maximum frequency
response peak, maximum amplification of the input, non-overshoot, no oscillations,. . .
Definition 7.3. Property P is robust if any system f ∈ F of the family has the property P.
Example 7.14. Consider a linear system with constant unknown parameters and transfer function
s
W(s) = 2 ,
s + as + b
where we know that a− ≤ a ≤ a+ , b− ≤ b ≤ b+ , for some known bounds a− , a+ , b− , b+ . This is a
family. The considered property can be asymptotic stability. Another property can be
sup |W( jω)| ≤ µ
ω≥0
for some µ, and so on.
Remark 7.3. The definition seems a trivial tautology. A deeper insight shows that it points out two
facts:
• we must have a family that is properly defined;
• we must consider a specific property.
For instance, in the example, the unknown parameters are constant. Completely different con-
clusions about stability can be drawn if we consider time-varying parameters a− ≤ a(t) ≤ a+ ,
b− ≤ b(t) ≤ b+ . We must also specify the property. For instance, a system may remain stable for
any parameter variation, but may have a bad frequency response for some parameters.
Here we consider a simple case of robustness analysis. In the model
ẋ(t) = [A + E(t, x(t), w(t)]x(t) (7.57)
A represents the nominal state matrix, while E is a perturbation matrix that can depend on time t,
on the state and on some external signal w. We may assume that E is unknown, but has a norm that
is bounded as follows:
∥E(t, x(t), w(t)∥ ≤ ρ (7.58)
The following theorem ensures that, if the nominal system is stable, then there exists a margin in
terms of the size ρ of the perturbation E for which robust stability is guaranteed.
Theorem 7.8. If the nominal system
ẋ(t) = Ax(t) (7.59)
is asymptotically stable, then there exists ρ > 0 such that the perturbed model (7.57) is asymptoti-
cally stable for any E as in (7.58).
Proof. If (7.59) is asymptotically stable, then there exists P positive definite such that
A⊤ P + PA = −I
We apply the Lyapunov function V(x) = x⊤ Px to the system (7.57). The Lyapunov derivative is
then
V̇(x) = 2x⊤ P[A + E]x = x⊤ (A⊤ P + PA) + 2x⊤ PEx = −x⊤ I x + 2x⊤ PEx
≤ −x⊤ x + |2x⊤ PEx| ≤ −∥x∥2 | + 2|x⊤ PEx| ≤ 2∥x∥ ∥PEx∥
≤ −∥x∥2 | + 2∥x∥ ∥P∥ ∥E∥ ∥x∥ = −∥x∥2 (1 − 2∥P∥ ∥E∥)
In view of Lyapunov theorem, the derivative is negative definite if 2∥P∥ ∥E∥ < 1, namely
1
ρ< ,
2∥P∥
which is a robustness bound. □
122 Chapter 7. Nonlinear systems
A⊤ P + PA = −I
u = −γ2 B⊤ Px,
V̇ = x⊤ (A⊤ P + PA)x + 2x⊤ PBu + 2x⊤ PB∆x = −x⊤ x − 2γ2 x⊤ PBB⊤ Px + 2x⊤ PB∆x
x⊤ ∆⊤ ∆x x⊤ ∆⊤ ∆x
" #
= −∥x∥ − 2 γ x PBB Px − x PB∆x +
2 2 ⊤ ⊤ ⊤
+ 2
4γ2 4γ2
#⊤ "
∆x ∆x x⊤ ∆⊤ ∆x
" #
= −∥x∥2 − 2 γB⊤ Px − γB⊤ Px − +2
2γ 2γ 4γ2
∆x 2 ∥∆x∥2 ∥∆x∥2 2 ∥x∥
2
= −∥x∥2 − 2 γB⊤ Px − + ≤ −∥x∥ 2
+ 2 ≤ −∥x∥ 2
+ δ
2γ 2γ2 4γ2 2γ2
δ2
" #
= −∥x∥2 1 − 2 < 0
2γ
√
if we take γ > δ/ 2.
Chapter 8
123
124 Chapter 8. Optimal control: basic notions
This condition is known as the stationary condition. For instance the minimum of l = θ12 + θ22 −
2θ1 − 4θ2 is in the point where
∇l = [2θ1 − 2 2θ2 − 4] = 0
where l is a functional and h : Rn → Rm , is a constraint function with m < n. Assume that both h
and l are continuously differentiable. Then a necessary condition for a local minimum is that the
Lagrangian
L(θ, λ) l(θ) + λ⊤ h(θ)
has a stationary point. Vector λ ∈ Rm is called the Lagrange multiplier. Namely the constrained
minima are computed by applying the stationary condition to L(θ, λ). Differentiating with respect
to λ, we derive h(θ) = 0, namely (8.2), conversely differentiating with respect to θ we derive the
equations
∂L(θ, λ)
=0
∂θ
Example 8.1. Compute the minimum Euclidean norm solution of Aθ = b, A = m × n matrix, with
m < n. Assume rank[A] = m. The problem is
∥θ∥2 /2 + λ⊤ [Aθ − b]
θ = A⊤ λ (8.3)
θ∗ = A⊤ [AA⊤ ]−1 b
which is the expression of the minimum norm solution of the system of equations.
under the boundary conditions x(0) = a and x(T ) = b on the fixed interval [0, T ]. The idea is that,
if x̄ is optimal, then any small variation
x → x + δ,
The inequality above has to be true for any δ, and in particular for those that are zero at the extrema
δ(0) = δ(T ) = 0. Hence, considering these perturbations, it must be
Now the condition must be true if we replace δ by −δ, therefore the inequality is actually an equality
Since δ is arbitrary (with δ(0) = δ(T ) = 0), the function between brackets must be 0:
with x(0) = x0 and x(T ) = xT . We can conclude that the optimal control problem is more general
and includes the calculus of variations as a special case, with the particular equation ẋ = u.
In this optimal control problem, the solution can be found by considering the Pontryagin
equations as follows. Define the Hamiltonian function as
H(x, u, λ) l(x, u) + λ⊤ f (x, u),
where λ(t) is a vector function with values in Rn , called the co-state. Then the Pontryagin equations
are
∂H(x, ū, λ)
ẋ = (8.9)
∂λ
∂H(x, ū, λ)
λ̇ = − (8.10)
∂x
ū = arg min H(x, u, λ) (8.11)
u∈U
x(0) = x0 , x(T ) = xT (8.12)
These equations are typically solved numerically. For ẋ = u scalar (under suitable assumptions),
we recover Euler-Lagrange equations.
We now derive the Pontryagin equations. As a first step we replace the cost function by
Z T Z Th i
J¯ = l(x(t), u(t)) + λ(t)⊤ − ẋ(t) + f (x(t), u(t)) dt = H(x(t), u(t)) − λ(t)⊤ ẋ(t) dt (8.13)
0 0
and we notice that the problem is unchanged, because − ẋ(t) + f (x(t), u(t)) = 0. Then we apply the
following principle.
Maximum principle. A pair (u, x) is optimal if for any infinitesimal perturbation δu
u(t) + δu(t) → x(t) + δx(t), ẋ(t) + δ ẋ(t)
compatible with the constraints
δx(0) = δx(T ) = 0
the cost does not decrease, namely the cost variation is nonnegative
Z Th i
δ J¯ = H(x + δx, u + δu, λ) − H(x, u, λ) + λ⊤ δ ẋ dt ≥ 0
0
Note that Z T Z T h iT Z T
λ δ ẋdt = −
⊤
λ̇ δxdt + λ δx
⊤ ⊤
=− λ̇⊤ δxdt
0
0 0 0
because λ⊤ δx T0 = 0 since no variations of x are possible at the extrema (constraints (8.12)). Then
we have
Z Th i
δ J¯ = H(x + δx, u + δu, λ) − H(x, u, λ) + λ̇⊤ δx dt
0
Z Th i Z T
= H(x + δx, u + δu, λ) − H(x, u + δu, λ) + λ̇ δx dt +
⊤
[H(x, u + δu, λ) − H(x, u, λ)] dt
0 0
∂H(x, u, λ)
Z T" # Z T
≈ + λ̇ δx dt +
⊤
[H(x, u + δu, λ) − H(x, u, λ)] dt ≥ 0
0 ∂x 0
Due to the optimality principle, if u is optimal the last inequality must be satisfied, as a necessary
condition, for any admissible small variation and for any λ(·). If we take λ(t) as the solution of the
differential equation
∂H(x, u, λ)
+ λ̇⊤ = 0
∂x
8.3. Dynamic programming 127
Example 8.2. (Optimal height reaching.) A craft has to reach the optimal-cruise height h after
taking off. Assuming that the horizontal speed is constant, we can decide the slope of the trajectory.
A height increase ẋ(t), with x(0) = 0, implies a fuel cost. This cost has to be added to the cost of
flying at height x(t), which is smaller at the target height. Let us assume
with
ẋ = u
with no constraints (u ∈ R). Euler-Lagrange equation (8.4) becomes
2σu̇ + 2µ(x − h) = 0
and then
µ
ẍ + (x − h) = 0
σ
Let us change variable y = (x − h) to get
µ
ÿ + y=0
σ
with conditions y(0) = −h and y(T ) = 0. The general solution is
õ õ
y(t) = αe σ t + βe− σ t ,
Note that √ µ T → ∞,
√ µ this approach has some problems if it is formulated on an infinite horizon
because e σ tends to infinity. Conversely, there is nothing wrong in the fact that e σ t diverges,
T
This function must have the following properties. Let t be the initial instant and let x(t + h) be an
intermediate state of the optimal trajectory. Then it should be
t+h
Z
ψ(x(t)) = min + ψ(x(t +
l(x(t), u(t)) dt h))
u(t)∈U
t | {z }
| {z } residual optimal cost
partial cost
The minimum depends on the assigned constraints. Since ψ(x(t)) is independent of u, we can
include it inside the brackets. Dividing by h, we have
Assume that the function ψ is differentiable. Then, for h → 0+ , the first term gives the derivative
and the second term gives l(x(t), u(t)) due to the mean value theorem
n o
min ψ̇(x(t)) + l(x(t), u(t)) = 0
u(t)∈U
This has to be true for any t. Now we have ψ̇(x) = ∇ψ(x) ẋ = ∇ψ(x) f (x, u), which is the Lyapunov
derivative of ψ, so we obtain the equation
named Bellman equation of dynamic programming. If the function ψ(x) is known, then the control
can be derived as the element of u = u(x) that minimises the above expression. Unfortunately, for
this equation it is not possible to determine an analytic solution in most cases. Numerical methods
have to be adopted (which are computationally very heavy).
with
ẏ = u
The Bellman equation is ( )
d
min ψ(y)u + σu + µy = 0
2 2
u∈U dy
x(0) = x0
Matrix Q is assumed to be positive semi-definite (of course it may be also positive definite), while
R is assumed to be symmetric positive definite. We assume that U = Rm , namely there are no
constraints. Equation (8.15) becomes
( )
1 ⊤
min ∇ψ(x)(Ax + Bu) + (x Qx + u Ru) = 0
⊤
(8.19)
u(t)∈U 2
We try a solution in the form ψ(x) = x⊤ Px/2, with P positive definite, and we replace ∇ψ(x) = x⊤ P
( )
1
min x⊤ P(Ax + Bu) + (x⊤ Qx + u⊤ Ru) = 0 (8.20)
u(t)∈U 2
For any fixed x, the minimum with respect to u is obtained by considering the gradient (with respect
to u, namely assuming x constant) and setting it equal to zero
x⊤ PB + u⊤ R = 0
This means
u = −R−1 B⊤ Px,
which is a linear control. By replacing this expression in the equation we have
1
x⊤ PAx − x⊤ PBR−1 B⊤ Px + (x⊤ Qx + x⊤ PBR−1 RR−1 B⊤ Px) = 0
2
Since x⊤ PAx = (x⊤ PAx + x⊤ A⊤ Px)/2, we obtain
1 ⊤ ⊤
x [A P + PA − PBR−1 B⊤ P + Q]x = 0,
2
130 Chapter 8. Optimal control: basic notions
which has to be valid for each x. This brings us to the Riccati equation
A⊤ P + PA − PBR−1 B⊤ P + Q = 0 (8.21)
We look for a positive definite solution P of this equation. Indeed, only positive definite solutions
are meaningful, since the cost has to be positive. Note that in general there is more than one solution.
To see this, it is sufficient to consider the scalar case
b2 2
2pa − p +q=0
r
(the products commute in this case). This second order equation has two solutions and we are
interested in the positive one. In general, the Riccati equation has a single positive definite solution.
We conclude with the following important result.
Theorem 8.1. Assume that (A, B) is stabilisable and Q is positive definite. Then (8.21) admits a
unique positive definite solution P. The optimal control is
We do not give a technical proof of the theorem. Just observe that, if Q is positive definite, then
the integrand function in the cost is positive, unless x0 = 0, hence x0⊤ Px0 > 0, so P must be positive
definite.
We can easily see that, if Q is positive definite, then the closed-loop system is asymptotically
stable. Write (8.21) as
The term (A − BR−1 B⊤ P) = (A + BKopt ) = ACL is the closed-loop matrix. Then we obtain
⊤
ACL P + PACL + Q + PBR−1 B⊤ P = 0 (8.24)
| {z }
=Q̂
Remark 8.1. It is not necessary to have Q positive definite. For instance, if we have a performance
output z = Hx, the state term is
z⊤ z = x⊤ H ⊤ Hx = x⊤ Qx
and in this case Q is positive semi-definite. Still, matrix Q̂ = Q + PBR−1 B⊤ P and matrix P can
be positive definite, and in this case the closed-loop is asymptotically stable. We need to solve the
equation and check that P and Q̂ are positive definite. A trick to avoid problems is to perturb the
cost as H ⊤ H → H ⊤ H + ϵI, which is positive definite. If ϵ is small, we are virtually not changing
the problem.
and R = [1]. The state variables are: x1 the position, x2 the speed and u the acceleration
(controlled) of a cart. The cost is the integral of the square of the position plus the square of the
acceleration. The positive definite solution of the Riccati equation is
" √ #
2 √1
P=
1 2
Q is not positive definite, however
" √ #
Q̂ = Q + PBR B P =
−1 ⊤ √2 2
2 2
is positive definite and the control is stabilising. The closed-loop poles are
1 1
λ12 = − √ ± j √
2 2
h i
Conversely, if we take H = 0 1 , we get P = Q and the control is not stabilising. This is not
surprising. We are penalising the speed and the control. So, if the initial condition is x1 , 0 and
x2 = 0, the optimal control is u = 0 (do nothing and stay in position x1 ), with cost 0, because both
speed and acceleration are 0.
The optimal control has infinite gain margin. If we modify the control as
u = −κR−1 B⊤ Px
with κ ≥ 1 arbitrarily large, the system remains stable. This can be easily checked, because we can
derive a Lyapunov equation similar to (8.24)
(A − κBR−1 B⊤ P)⊤ P + P(A − κBR−1 B⊤ P) + Q + (2κ − 1)PBR−1 B⊤ P(κ − 1)PBR−1 B⊤ P = 0
In some cases, increasing the gain κ improves robustness (see Chapter 7.9).
An interesting observation is the following. Consider a performance output z(t) = Hx(t) and
the cost
1 ∞ ⊤ 1 ∞
Z Z
J= x (t)H Hx(t) + u (t)u(t) dt =
⊤ ⊤
∥z(t)∥2 + ∥u(t)∥2 dt
2 0 2 0
This is a particular case with R = I and Q = H H. If we consider the “augmented output“
⊤
" # " #
u(t) K
= x(t)
z(t) H
we get the corresponding system
ẋ(t) = [A + BK]x(t) + I∆(t) (8.25)
u(t) = K x(t) (8.26)
z(t) = Hx(t) (8.27)
with input ∆. Denoting by W(t) the matrix of impulse responses, the LQ control is the one that
minimises
1 ∞ 1 ∞X 2
Z Z
Jtr = tr[W(t) W(t)]dt =
⊤
W (t)
2 0 2 0 ij ij
where v(t) and w(t) are unknown noises or disturbances. If we consider the standard observer
we get a system of the form (8.25)-(8.27), so its impulse response matrix is the transpose of the
impulse response matrix of (8.29)-(8.30). It can be easily seen that tr[M ⊤ M] = tr[MM ⊤ ]. So, to
minimise
1 ∞
Z
Jtr = tr[W(t)W(t)⊤ ]dt,
2 0
we can exploit duality and replace K with −L⊤ , H with −E ⊤ and B with C ⊤ . By transposing (8.28),
we obtain the dual Riccati equation
Duality between optimal control and optimal filtering is a fundamental achievement in control
theory. It can be shown that, by properly combining an optimal observer and an optimal state
feedback control, we get an optimal output feedback control.
In this section we examine the results we achieve by combining the optimal control with the
Kalman filter. We start with a technical computation concerning the performance loss we achieve
by replacing the optimal control by a generic stabilizing control u. For convenience we take R = I,
8.5. Model predictive control 133
As expected any control is worse than uopt = −B⊤ Px, for which the optimal performance is x0⊤ Px0
is ensured.
To evaluate the performance of the combination Kalman filter and optimal control we consider
u = −B⊤ P x̂, the feedback of the estimated state to get
Z ∞h i⊤ h i Z ∞h i⊤ h i
J = u + B Px
⊤
u + B Px dt +
⊤
x0⊤ Px0 = B⊤ P(x − x̂) B⊤ P(x − x̂) dt
Z0 ∞ 0
where we assume that (0, 0) is the target equilibrium point. Sets X and U are constraint sets. In
most cases they are of the form
X = x : xi− ≤ x ≤ xi+ U = u : u−i ≤ u ≤ u+i
n o n o
The idea is the following. First consider problem with a finite horizon T
0 +T
kX
min g(x(k), u(k)) + h(x(k0 + T ))
k=k0
s.t.
x(k + 1) = f (x(k), u(k))
x(k) ∈ X, u(k) ∈ U,
x(0) assigned
with T integer large enough. The term h(x(k0 + T )) is a weight on the final state. It can be replaced
by a constraint such as x(k0 + T ) = 0. Assume that this problem can be efficiently solved on–line
(real–time). Limiting ourself in solving it at the beginning k = 0, we would get an open–loop
solution. To derive a feedback solution we can apply the following procedure.
1. At k0 = 0, given x(k0 ) compute the optimal sequence u∗ (k0 ), u∗ (k0 + 1), . . . u∗ (k0 + T − 1);
2. Apply only the first input u∗ (k0 );
3. Measure the new state x(k0 + 1) = f (x(k0 ), u∗ (k0 )) and consider it as the new initial state;
4. Set k0 := k0 + 1 and GOTO 1 (recompute the sequence);
This technique, known as model predictive control (or receding horizon control) is very popular. Its
implementation requires the solution of an optimization problem at each step. This is reasonable in
most applications in view of the current computer performances. The solution time must be smaller
than the sampling time. Several commercial solvers are available to implement the technique.
One important case is that of linear systems with linear constraints and quadratic cost
+T −1
k0X
min J= x(k)⊤ Qx(k) + u(k)⊤ Ru(k) + x(k0 + T )⊤ S x(k0 + T )
k=k0
s.t.
x(k + 1) = Ax(k) + Bu(k))
y(k) = Hx(k) + Mu(k))
y−i ≤ y ≤ y+i
x(0) assigned
where Q, R and S are assumed positive definite matrices. Matrix S weights the final state. An
alternative possibility to this weight is the additional constraint x(T ) = 0
The linear constraints ensure that by defining
x(k0 + 1) Q 0 . . . 0 0 . . . . . . 0
x(k + 2) 0 . . . . . . . . . . . . 0
0 Q
0
.. .. .. .. .. .. .. .. ..
. . . . . . . . .
x(k + T ) 0 . . . 0 S 0 . . . . . . 0
0
ξ = , Ψ =
0 . . . . . . 0
u(k0 ) R 0 . . . 0
u(k + 1) 0 . . . . . . 0
0 R . . . 0
0
.. .. .. .. .. .. .. .. ..
. . . . . . . . .
u(k0 + T − 1) 0 ... ... 0 0 ... 0 R
8.5. Model predictive control 135
In this chapter, we present models and examples of dynamical systems. These examples are used
as application benchmarks in the course.
Ra La
Lf
Va
Rf ϕ
ω
Cr
Vf
Consider Figure 9.1, representing the diagram of a DC (direct current) electrical machine. This
device can be used in two different modes.
• Generator mode: mechanical power is provided and electrical power is produced.
• Motor mode: electrical power is provided and mechanical power is produced.
The current flows in the armature circuit of the rotor, connected to an external supplier (or an
electrical load in the case of generator mode) through a collector. In view of the rotation, the
rotor coils move with respect to the magnetic field. This creates a force, hence a torque, and an
electromotive force. These simultaneous effects are the basic principle of the electromechanical
energy conversion.
The equations of the machine are the following. The field circuit, which has the goal of
generating the flow in the machine, has equation
di f (t)
Lf = −R f i f (t) + v f (t), (9.1)
dt
137
138 Chapter 9. Examples of dynamical systems
where L f is the inductance, i f is the field circuit current, R f is the resistance, i f the current and v f
the field generator voltage. In small machines, the field circuit is replaced by a permanent magnet
that generates a constant flow, hence this equation is not present. The excitation circuit equation is
dia (t)
La = −Ra ia (t) − k̂ ie (t) ia (t) + va (t), (9.2)
dt
where La is the armature inductance, Ra is the resistance, ia is the armature current and va the
applied voltage (or the potential difference on the load). The term k̂ ie (t) ia (t) is the electromotive
force. There are two mechanical equations. The torque equation is
In the first equation J is the inertia, ω the rotational speed, f is a viscous coefficient, Cr (t) is a
torque due to the load. The term Cm is the torque produced by the machine. The second equation is
the definition of rotational speed, which is the derivative of the machine angle.
These equations are nonlinear. We can assume, as input and state variables, the vectors
ie (t)
ve (t) i (t)
u(t) = va (t) ∈ R3 x(t) = a ∈ R4 (9.4)
ω(t)
Cr (t)
φ(t)
As far as the output of the system is concerned, this depends the problem (and also on the applied
sensors). Typically, if the goal is to design a control system for the machine, we can take as an
output vector
φ(t)
" #
y(t) = (9.5)
ω(t)
The two electrical circuits of the machine can be connected in different ways. There are three
main possibilities.
• Parallel connection (Figure 9.2, left): ve = va , hence the two inputs are reduced to one.
• Series connection (Figure 9.2, right): ie (t) = ia (t); hence, two state variables are replaced by
one.
9.1. DC electrical machine 139
Va
Vf = cost
• Independent connection (Figure 9.3): typically we set ve (t) = ve constant. In this case the
field equation is removed and we assume ie =constant.
In the independent configuration, the equation of the excitation circuit is decoupled from the other,
as follows:
die Re ve
= ie (t) + (9.6)
dt Le Le
ve
and yields the steady-state value ie = . Therefore, assuming that the transient for ie is over, and
Re
ie is at its steady-state value, this current can be considered as a constant. The equation for ie is not
necessary anymore. Let us then write k̂ie = k. We get
dia (t)
La = −Ra ia (t) − kω(t) + va
dt
J ω̇(t) = Cm (t) − f ω(t) − Cr
φ̇(t) = ω(t)
Let us multiply the first equation by ia and the second by ω(t) to derive the power balance
d 1 dia 2
!
La + Ra i2a + kωia = v a ia
dt 2 dt |{z} |{z} |{z}
| {z } resistor dissipated power converted power supplied power
magnetic power
!
d 1 2
Jω + f ω2 + Cr ω = Cm ω
dt 2 |{z} |{z} |{z}
| {z } mechanical dissipated power used power converted power
kinetic power
Considering the converted power as it appears in the two equations, we have Cm ω = kωia , hence
the following expression for the torque:
C M = kia .
The equations are
dia (t) Ra k va (t)
= ia (t) − ω(t) +
dt La La La
k f Cr (t)
ω̇(t) = ia (t) − ω(t) −
J J J
φ̇(t) = ω(t) (9.7)
140 Chapter 9. Examples of dynamical systems
with the same outputs previously chosen. It is possible to write the system in matrix form as follows.
State, input and output vectors are
ia (t)
φ(t)
" # " #
va (t)
x(t) = ω(t) , u(t) = , y(t) = (9.8)
Cr (t) ω(t)
φ(t)
Then, denoting by α = Ra
La , β= k
La , γ = kJ , δ = Jf , ϵ = 1
La , µ = 1J ,
s + α +β 0 −ε
−γ s + δ 0 0
n11 (s) = det = εγ (9.12)
0 −1 s 0
0 0 1 0
The computation of the other elements ni j is analogous.
ϕ
ψ
where the components of the vectors q(t), q̇(t), q̈(t) are, respectively, angles, angular velocities and
angular accelerations. In general robotic systems, q is a vector of free coordinates.
Assuming that M(q(t)) is a non-singular matrix (therefore, it is invertible), we can choose the
following control law:
where u is a new control signal to be specified later. Note that, in order to implement such a control,
we need sensors that measure angles and angular velocities. Replacing τ in the initial equations, we
get
M(q(t))q̈(t) = M(q(t))u(t) ⇒ M(q(t))[q̈(t) − u(t)] = 0. (9.15)
Since M(q(t)) is non-singular by assumption, it must be
The resulting system (included in the dotted rectangle in Figure 9.5) is linear and can be controlled
by means of one of the (several) available techniques. This process is known as cancellation of
the nonlinearities. Based on this, linear feedback allows us to effectively control the robot arm.
Adopting the linearising feedback provides m decoupled equations (m is the number of degrees of
freedom). Then we may decide to control all of these coordinates qi independently. In general, the
state-space representation is:
" #
q(t)
q(t) ∈ R ,
m
u(t) ∈ R , x(t) =
m
∈ R2m
q̇(t)
" # " #" # " #
d q(t) 0 I q(t) 0
= + u(t)
dt q̇(t) 0 0 q̇(t) I
where I ∈ Rm is the identity matrix. Typically, the sensors for this system are encoders (measuring
angles) hence
h i " q(t) #
y(t) = I 0
q̇(t)
If also speed sensors are available, the output is the state y(t) = x(t), that is
" #" #
I 0 q(t)
y(t) = .
0 I q̇(t)
We can actually avoid the speed sensors, because the speed can be determined from the angles by
means of an observer.
142 Chapter 9. Examples of dynamical systems
τ q
ROBOT
q
Linearization
u r
Linear
v
Control
Figure 9.5: Control of a robot arm: r and v are position and speed references.
There is a major issue here. The cancellation (9.14) is not exact, because it is based on a model:
is an uncertain term. Hence, the control must be robust against this uncertainty. In Section 7.9, we
consider a simple case in which Ω = ∆x.
where x(k) represents the account balance, r(k) the money transfer, and i the interest. This is a
discrete-time system, i.e., k time units represent k days (or months). The underlying hypothesis is
that payments or withdrawals r(k) are accounted daily (or monthly). We have
which is a simple linear discrete-time system. According to the formula derived in the initial chapter
on discrete-time systems, if we consider r(k) as the system input, the evolution of the bank account
balance is:
k−1
X
x(k) = αk x(0) + αk−h−1 r(h). (9.21)
h=0
n
X αn+1 − 1
Since the sum is the classic geometric series αi = , we get the installment expression
i=0
α−1
αN (α − 1) (1 + i)N
r= C = iC (9.23)
αN − 1 (1 + i)N − 1
An interesting observation comes out if we write the installment according to the evolution at a
generic time
r = −i x(k) + x(k + 1) − x(k) .
(9.24)
When k is small, x(k) is large (negative) and the term −i x(k) > 0 prevails. The situation reverses
near the end of the loan (k close to N). One can thus conclude that, in the case of constant
installment, we return more interest than capital at the beginning, and vice-versa at the end.
x(k + 1) = Ax(k), Ai j ≥ 0
Nonnegative matrices have remarkable properties, such as positivity of the associated system:
(the notation x ≥ 0 for a vector is to be intended component-wise xi ≥ 0). A further property is the
Perron-Frobenius theorem.
Theorem 9.1. The eigenvalue with the largest modulus (dominating eigenvalue, also denoted as
Frobenius eigenvalue) of a nonnegative matrix is nonnegative and real. In other words, if we order
the eigenvalues by magnitude,
λ1 = |λ1 | ≥ |λ2 | ≥ · · · ≥ |λn |
Moreover, if λ1 is strictly dominating, i.e., λ1 = |λ1 | > |λ2 | . . . then the corresponding eigenvector
(Frobenius eigenvector) has positive components.
144 Chapter 9. Examples of dynamical systems
Example 9.1. A simplified population evolution is the following. There are three classes of age.
Youth x1 , middle age x2 , and old age x3 .1 At each time step, each population unit passes to the
older stage. In the middle age the population is assumed to reproduce and give birth, in the average,
to α new young individuals. In the old age the population is assumed to reproduce and give birth,
in the average, to β new young individuals. Then
0 α β
A = 1 0 0
0 1 0
It can be seen that for α + β > 1 the population diverges (λ1 > 1) while for α + β < 1 the population
extinguishes (λ1 < 1).
Assume, for instance, that α + β > 1. Then the free response is
x(k) = Ak x(0) = t1 s⊤
1 x(0)λ1 + t2 s2 x(0)λ2 + t3 s3 x(0)λ3 ≈ t1 s1 x(0)λ1
k ⊤ k ⊤ k ⊤ k
1 x(0) = γ1
for large k, because the dominant real mode diverges faster than the others. Then, since s⊤
is a scalar,
1 x(0))λ1 = t1 γ1 λ1
x(k) ≈ t1 (s⊤ k k
and we see that the asymptotic distribution of the population is given by the Frobenius eigenvector,
which is positive. For α = 1 and β = 1, the eigenvalues are 1.32472 and −0.66236 ± 0.56228 j.
The complex eigenvalues have modulus 0.86884, hence their modes converge. The Frobenius
eigenvector is t1 = [0.43016 0.32472 0.24512]⊤ so the asymptotic distribution is proportional
to these components: the components have been normalised so that their sum is 1, therefore we will
have 43016% of the population in the first class and so on.
The reader can imagine a more sophisticated model with division in n age classes, each with a
different contribution to birth.
{E1 , E2 , . . . , En }
that are a partition of the certain event, the vector x has components
with
n
X
xi (k) = 1, xi (k) ≥ 0. (9.25)
i=1
We write the previous conditions as
and that the transition probabilities are time-invariant. Assuming a discrete-time evolution, we get
a model of the form
x(k + 1) = Px(k). (9.27)
Since constraints (9.25) have to be satisfied all the times, we need that
n
X
Pi j ≥ 0, Pi j = 1, ∀ j
i=1
namely the matrix has to be nonnegative and for each column the elements must sum up to 1. This
is a necessary and sufficient condition for us to say that x(k) represents a probability:
The dominant eigenvalue of a Markov chain is 1. Indeed from (9.28), the system is marginally
stable, so its eigenvalues are in the unit disk (border included). Also, the columns sum up to 1
1̄P = 1̄ = (1)1̄,
so 1 is an eigenvalue, and since it is real and dominant it is the Frobenius eigenvalue. Assume
now that 1 is strictly dominant: 1 > |λ2 | ≥ |λ3 | . . . . The Frobenius eigenvector t1 is very important
because it expresses the asymptotic probability distribution. Indeed, we can normalise the left
eigenvector to s1 = 1̄ and we have, by definition of probability, that the initial condition satisfies
1 x(0) = 1
s⊤
hence
x(k) = t1 s⊤
1 x(0)λ1 + t2 s2 x(0)λ2 + · · · + tn sn x(0)λn → t1 s1 x(0) = t1
k ⊤ k ⊤ k ⊤
(9.29)
| {z }
→0
Proposition 9.1. The asymptotic probability distribution is given by the Frobenius eigenvector
normalised to 1.
In general, if the eigenvalue 1 is not strictly dominant, then there can be infinite asymptotic
distributions, for instance PId below, or no asymptotic distribution, for instance PBd (Buridan’s
donkey phenomenon) below:
" # " #
1 0 0 1
PId = PBd =
0 1 1 0
Example 9.2. (Buffer of a processing unit.) Consider the following processing unit (machine) in
which objects to be processed are waiting in a buffer. The buffer states are supposed to be
status description
1 0 parts, buffer empty
2 1 part, first slot occupied
3 2 parts, two slots occupied
4 3 parts, three slots occupied
5 4 part, buffer full
146 Chapter 9. Examples of dynamical systems
Assume that each part is processed in one time unit T = 1. We assume that probabilities are
assigned to the numbers of part arrivals:
probability description
P0 0 parts arrival
P1 1 part arrival
P2 2 parts arrival
Pk = 0 k ≥ 3 parts arrival
This corresponds to the graph in Figure 9.6. The Markov matrix P can be derived as follows
• p11 is the probability that the buffer is empty and remains empty. This happens if zero or one
parts arrive: p11 = P0 + P1 .
• p12 = P2 is the probability that, if the buffer is empty, the next time there will be one part.
• column j is associated with the state in which there are j − 1 parts. If 0 parts arrive the
buffer decreases by 1, if 1 part arrives the buffer remains in this state and if 2 parts arrive
the buffer increases by 1.
• p55 = P1 + P2 is the probability that the full buffer remains full, namely if it receives 1 or 2
parts, in the latter case we assume that one of the two parts is rejected.
The transition probabilities are reported in the following matrix governing the system
Given the probabilities P0 , P1 and P2 , the steady-state buffer distribution is determined by comput-
ing t¯, the nonnegative eigenvector associated with λ = 1. We can examine the special cases
• P0 = 1, P1 = 0, P2 = 0: the buffer becomes empty;
Consider Figure 9.8, which shows a structure (building) under seismic action. This system is
governed by the following equations
A ground reference has been chosen. This reference is non-inertial. The variables ϑ1 , ϑ2 , ϑ3
represent the horizontal relative displacements of the floors. The coefficients m1 , m2 , m3 are the
masses of the floors while the coefficients k1 , k2 , k3 are elastic coefficients. The term k1 ϑ1 represents
the elastic force applied on the first floor from the ground, while the terms ±ki j ϑi − ϑ j (t) are
elastic forces between floors. The term mi a(t) is a virtual force due to ground acceleration (the
reference frame acceleration).
148 Chapter 9. Examples of dynamical systems
Note that no friction has been considered and we will be back on this later.
In general, a vibrating system can be written in the following form
To explain these equations let us write them as follows: after pre-multiplication by ϑ̇⊤ (t) (the row
vector of the speeds), we have
!
d 1 ⊤ 1 ⊤
ϑ̇ (t)M ϑ̈(t) + ϑ̇ (t)Kϑ(t) =
⊤ ⊤
ϑ̇ (t)M ϑ̇(t) + ϑ (t)Kϑ(t) = ϑ̇⊤ (t)Ru(t)
dt 2 2 | {z }
| {z } supplied power
energy=kinetic+elastic
The previous equation means that the derivative of the total energy is equal to the supplied power.
Matrix M is always positive definite (indeed, the kinetic energy is Ec = 12 ϑ̇T (t)M ϑ̇(t) > 0
if the system is in motion) and the matrix K is semidefinite (because the potential energy E P =
2 ϑ (t)Kϑ(t) ≥ 0). In the particular case of the building under seismic action, matrix K is positive
1 T
definite.
To have a state representation we pre-multiply equation (9.32) by M −1 to get:
ϑ(t) ϑ(t)
" # " #" # " #
d 0 I 0
= + u(t) (9.34)
dt ϑ̇(t) −M −1 K 0 ϑ̇(t) M −1 R
Let us study the modes of the system. The eigenvalues and eigenvectors satisfy
" #" # " #
0 I x1 x1
Ax = λx ⇒ =λ (9.36)
−S 0 x2 x2
From the first equation, we have x2 = λx1 . This tells us that the generic eigenvector associated with
h iT
matrix A it is of the type x = xT1 λxT1 . Using the second equation
−S x1 = λx2 = λ(λx1 ) ⇒ S x1 = −λ2 x1 (9.37)
Let us now consider the expression of S = and let T =
M −1 K M 1/2 .
Then, by pre-multiplying by
T = M , we have
1/2
h i h i
M −1/2 K M −1/2 M 1/2 x1 = −λ2 M 1/2 x1 ⇒ M −1/2 K M −1/2 y Ŝ y = −λ2 y
Matrix Ŝ = M −1/2 K M −1/2 is positive definite and its eigenvalues are real and positive. Moreover
Ŝ = M −1/2 K M −1/2 = T −1 S T , hence its eigenvalues are those of S .
Denote the m eigenvalues of S as ω21 , ω22 , . . . , ω2m , then the n = 2m eigenvalues associated with
A are
ω2k = −λ2k ⇒ λk = ± jωk (9.38)
This means that vibrating systems without damping have in general oscillating modes e± jωt , namely,
sin(ωk t) and cos(ωk t) (9.39)
which are undamped oscillations. The coefficients ωk are named proper pulsations or resonance
pulsations. The numbers fk = ωk /(2π) are the proper frequencies.
Proposition 9.2. In an undamped vibrating system, the modes are of the form (9.39), where the
proper pulsations are ωk and ω2k are the eigenvalues of M −1 K.
Consider for instance the third floor when u(t) = 0. Its displacement ϑ3 (t) has the following
general expression:
ϑ3 (t) = α1 cos(ω1 t + φ1 ) + α2 cos(ω2 t + φ2 ) + α3 cos(ω3 t + φ3 )
where the terms αi and ϕi depend on the initial conditions of the system.
To explain the significance of the eigenvectors, consider initial conditions with ϑ̇(0) = 0 and
ϑ(0) = ϑ1 , where ϑ1 is an eigenvector of the matrix. The equation that governs the free response of
the system is
ϑ̈(t) = −S ϑ(t) ϑ(0) = ϑ1
⇒ −ω21 ϑ1 cos(ω1 t) = −S ϑ1 cos(ω1 t)
⇒ S ϑ1 = ω21 ϑ1
(just compute the second derivative of ϑ1 cos(ω1 t) to check the expression and take into account
that ϑ1 is an eigenvector of S ). This means that, if we initialise the building floors in positions equal
to the components of ϑ1 , with ϑ̇(0) = 0, the system shows only the oscillation mode corresponding
to an harmonic component with pulsation ω1 . Clearly any elastic motion (guitar string, vibrating
shells, acoustic instruments, vocal sound) is the sum of all harmonic components.
Finally, assume that there is friction to be taken into account. A typical model is
M ϑ̈(t) = −Kϑ(t) − H ϑ̇(t)Ru(t), (9.40)
where H is a positive semidefinite matrix including the friction coefficients. In this case the
eigenvalues are not imaginary, but have a negative real part. The energy balance is now
!
d 1 ⊤ 1 ⊤
ϑ̇ (t)M ϑ̇(t) + ϑ (t)Kϑ(t) + ϑ̇⊤ (t)H ϑ̇(t) = ϑ̇⊤ (t)Ru(t)
dt 2 2 | {z } | {z }
| {z } dissipated power supplied power
energy=kinetic+elastic
150 Chapter 9. Examples of dynamical systems
I1 IL
R1 R2
u(t) vC
C L
An electrical circuit is the connection of the previous components and of voltage and current
generators. The equations can be written by using Kirchoff laws. Typically, the inputs of these
systems are provided by the generators. As state variables, we can take
Consider, for example, Figure 9.9. Applying Kirchhoff loop law to the two loops, we obtain the
following two equations:
v = R1 i1 + vC
vC = R2 iL + Li̇L (9.41)
Conversely, applying Kirchhoff node law to the central node, we have the current balance
i1 = iL + iC = iL + C v̇C , (9.42)
where we have assumed the orientation in such a way that i1 is incoming while iL and iC are
outgoing. Replacing i1 with this expression, we get two first order differential equations
Denoting by u(t) = v(t), x1 (t) = vC (t), x2 (t) = iL (t), we obtain the matrix representation
− R11C − C1
" # " #" # " 1 #
d x1 (t) x1 (t)
= 1 R2 + R1C u(t) (9.44)
dt x2 (t) L − L
x 2 (t) 0
9.6. Linear electrical circuit 151
The choice of the output of the system depends on the problem. For example, if we want to describe
this circuit as an admittance, the output is i1 (t):
!
1 1 1 1 1
y = iL + C v̇C = iL + C − vC − iL + v = − vC + v (9.45)
R1C C R1C R1 R1
Note that y depends on the derivative v̇c of vc , and this would lead to a non-proper system. The
equation can be modified by replacing v̇c with its expression (from the state equation) in order to
have a dependence on state variables only, and not on their derivatives. The output is then
h 1 i " x1 (t) # h 1 i
y(t) = − R1 0 + R1 v(t) (9.46)
x2 (t)
This system is proper, but not strictly proper.
We stress that some circuits might have some singularities. This is the case in which there are
cut-sets of inductors (three-phases systems) in which I1 + I2 + . . . Im = 0 or circuits of capacitors
in which v1 + v2 + . . . vm = 0. Moreover, for some choices of inputs and outputs, a circuit can be
non-proper. For instance, in a capacitor, if we consider the voltage as an input and the current as an
output, we have
d
ic (t) = vc (t) with transfer function ic (s) = [s]vc (s),
dt
which is not proper.
Going back to the example, let us consider the characteristic polynomial of matrix A:
! !
1 R2 1 R2
det(sI − A) = s +
2
+ s+ +1 (9.47)
R1C L LC R1
Note that the term that multiplies s is the trace of −A, while the term that multiplies s0 is the
determinant of A. The roots of this polynomial have negative real part, since it is a second order
polynomial with positive coefficients. This is an expected result, because the circuit is dissipative.
The study of the circuit can also be done using the Laplace transform. Assuming x(0) = 0 for
simplicity, the dipole laws described earlier become:
• v(s) = Ri(s) (resistors);
• v(s) = sLi(s) (inductors);
• i(s) = sCv(s) (capacitors).
Note that, in the special case where we assume s = jω, we are representing the dipoles in the
sinusoidal regime, according to the theory of frequency analysis for electrical circuits.
These relationships are linear in the Laplace transform domain and can be used as generalised
impedances. Then we can apply standard properties of series-parallel connections between compo-
nents. In the case of the circuit under test, the passive network can be considered as an impedance
having this expression:
1 1 r1 LCs2 + (CR1 R2 + L)s + (R1 + R2 )
Z(s) = R1 + ∥ (R2 + sL) = R1 + = (9.48)
sC sC + R2 +sL
1 LCS 2 + R2Cs + 1
It is easily verifiable that the impedance is the inverse of transfer function W(s) = C(sI − A)−1B =
Z −1 (s), as expected.
The representation in terms of state description may not be useful for circuits of the dimension
considered here, because such calculations can be performed quickly using the Laplace transform.
However, for more complex circuits, the state representation can be more useful, because it can be
easily implemented on a computer.
152 Chapter 9. Examples of dynamical systems
y=a(u+−u− )
u− − u− +
+ + y +
u u
Operational amplifiers are components whose symbol and equivalent circuit are shown in Figure
9.10. The factor a is a very large number, ideally tending to infinity. This electronic component is
practically only used in feedback as, for example, in Figure 9.11. The Kirchoff equation for the “−’
Z2
Z1
−
+ y
R2
y(t) = − u(t). (9.50)
R1
Then the operational amplifier allows us to have an amplifier with tunable gain. The problem of
having a negative sign can be solved by properly connecting two amplifiers (in series).
9.8. Two-tank system 153
1
Consider, for example, Z1 = R and Z2 = , i.e., adopting a resistor and a capacitor. We get
sC
1
y(s) = − u(s), (9.51)
sCR
which, up to a multiplicative negative factor, is the transfer function of an integrator block. Similarly,
1
with Z1 = and Z2 = R, we obtain the transfer function of a differentiating block.
sC
Another interesting configuration for an operational amplifier is shown in Figure 9.12.
u1 R1 R0
u2 R2
−
um Rm + y
The circuit is a “summing” device that provides as an output a linear combination of the inputs.
Again, the minus sign is not really a problem, one can use other devices to invert the sign.
Since we are able to build amplifiers, integrators and summing circuits, we are able to build any
transfer function.
There are many different amplifier configurations to realise transfer functions, which are
typically optimised so as to use the smallest number of components.
v̇1 = q0 − q1
v̇2 = q1 − q2
v1 = (h1 − h10 )S 1
v2 = (h2 − h20 )S 2
154 Chapter 9. Examples of dynamical systems
where q0 , q1 , q2 are the input flow in the upper tank, the flow between first and second tank, and
the flow from the second tank to the basin, respectively. Based on fluid dynamics, we can also
consider the the following equations, concerning the dependence between the heights (potential
energy) and the flows.
h1 − h2 = α2 q21
h2 = β2 q22
1p
q1 = h1 − h2
α
1p
q2 = h2
β
Note that the inertial effect of the water in the pipes is not considered, because it can be ex-
perimentally verified that it is negligible. The derivatives of the volume of water in the tanks
are
v̇1 = S 1 ḣ1 v̇2 = S 2 ḣ2
where S is the tank section surface. The resulting state equations are
1 p
ḣ1 (t) = u − h1 (t) − h2 (t)
αS 1
1 p 1 p
ḣ2 (t) = αS
h1 (t) − h2 (t) − h2 (t)
βS
2 2
9.8. Two-tank system 155
where u = q0 /S 1 is the input, while h1 and h2 are the state variables. This is a nonlinear system. To
study the static problem, write the steady-state conditions ḣ1 (t) = 0 and ḣ2 (t) = 0, which implies a
flow balance q0 = q1 = q2
q0 1 √
0=
S 1 −√αS 1 h1 (t) − h2 (t)
0= 1 1 √
αS 2 h1 (t) − h2 (t) − βS 2 h2 (t)
h1 = S 12 (α2 + β2 )u2
h2 = S 12 β2 u2
where u = q0 S 1 is the constant input flow. Note that h1 > h2 because α and β are positive constants.
In fact, the proposed model is valid for h1 (t) > h2 (t). If we want to consider the possibility of
having (for example, during a transient) h2 (t) > h1 (t), then the model has to be changed as follows
p p
h1 (t) − h2 (t) =⇒ sign(h1 (t) − h2 (t)) |h1 (t) − h2 (t)|
so that the equilibrium pairs (h1 , h2 ) are a straight line in the plane h1 − h2 .
There are some problems with this system, which comes from a simplified model. First, the
levels are measured by floaters, connected to variable inductors. The measurement of h1 (t), returned
by the first floater, is highly affected by noise. Second, the pump is not continuously controlled, but
it is quantised. The input flow is controlled by two identical switching valves. Therefore there are
three possible input values:
u ∈ {0, ū, 2ū}
(if both valves are closed, one is open and the other closed, they are both open). In this case, to
achieve an arbitrary average input flow, one can use the pulse-width modulation PWM technique
shown in Figure 9.14.
αT T 2T
Let us consider the problem of achieving a desired value udes , between 0 and U. The technique
consists in fixing a sampling time T , and applying the control
U for kT ≤ t < kT + αT
(
uquant =
0̄ for kT + αT ≤ t < (k + 1)T
with
udes
α=
U
156 Chapter 9. Examples of dynamical systems
The average value is the desired value udes . This technique, therefore, allows us to obtain a quantised
input with the same mean value of the desired continuous signal. To analyse the error, write this
input as
uquant = udes + w(t)
where, if udes is constant, w(t) is a periodic error of period T . This control works well, as long as
the dominating frequency ω = 2π/T of w(t) is considerably greater than the system bandwidth. In
the real equipment, we have ω ≈ 3, which is greater then the bandwidth.
i2 (t)
f (t) = k .
y2 (t)
Then we get
k i2
ÿ(t) = g − .
m y2
If we introduce also the electric equation of the magnet, driven by voltage V, the equations
describing the system become:
di(t)
L = −Ri(t) + V(t)
dt
i2 (t)
mÿ(t) = mg − k
y2 (t)
M ÿ(t) = u − φẏ(t)
where M is the mass of the cart, φ is the friction coefficient and u(t) is the applied force. We neglect
the reaction of the pole on the cart which is much heavier. The pole equation is
where the last term is due to the fact that the reference on the cart is not inertial. We replace ÿ(t)
from the first equation to get
g 1
θ̈(t) = r sin(θ(t)) + cos(θ(t))[u − φẏ(t)]
r Mr
If we apply the linearization at θ = 0 we get sin(θ) ≈ θ and cos(θ) ≈ 1., hence
g 1
θ̈(t) = θ(t) + [u − φẏ(t)]
r Mr
Denoting by x1 = θ, x2 = θ̇, x3 = y and x4 = ẏ, we get ẋ(t) = Ax(t) + Bu(t), where
0 1 0 0 0
α 0 0 −µφ
µ
A = , B =
0 0 0 1 0
ν
0 0 0 −νφ
√
where µ = 1/M, ν = 1/(Mr) and α = g/r. This system is unstable: its poles are 0, −νφ and ± α.
It is reachable and it can be stabilized.
Real experiments show that pole assignment design is not suitable for the real problem due to
the lack of robustness. Indeed the term φ is uncertain and time–varying. To analyze the situation,
write
φ = φ0 + ∆
where φ0 is the nominal value of φ and w is uncertain for which we assume the following bound
|∆| ≤ δ
158 Chapter 9. Examples of dynamical systems
m
θ
r
M
u
A⊤ P + PA − PBB⊤ P + Q
• Apply the control u = uopt + ur , where ur is a robustifying term that will be specified soon, to
get the system
ẋ(t) = [A0 − B⊤ P]x(t) + BH∆(t) + Bur (t)
namely
ẋ(t) = Āx(t) + BH∆(t) + Bur (t)
Note that the Lyapunov equation holds
• Take
ur (t) = −γB⊤ Px
where γ is selected as explained in the Lyapunov redesign section.
It turns out the the optimal control stabilizes the cart-pendulum system.
Appendix A
Elements of Mathematics
In this section we will briefly summarise some basic concepts of mathematics that are required
for the study of dynamical systems. In particular, the concepts of linear algebra will be reported,
since it is a fundamental language for the formalisation of important concepts. Once again, this
manuscript is not a text book, but a guideline: this appendix is essentially listing the preliminary
notions that are necessary to understand the course (which should have been thoroughly studied
and learned in previous courses).
Mathematics in engineering has three fundamental roles:
1. if x ∈ X and λ ∈ C, then λx ∈ X;
2. if x1 , x2 ∈ X, then x1 + x2 ∈ X.
We will consider vector spaces defined over the field R. As is known, there are some axioms
that must be satisfied.1
159
160 Chapter A. Elements of Mathematics
• The set of solutions of a linear homogeneous differential equation aÿ(t) + bẏ(t) + cy(t) = 0.
• The set of polynomials of degree n.
• The set of polynomials of degree n for which p(0) = 0.
x = λ1 x1 + λ2 x2 + · · · + λm xm
Definition A.2. (Set of linearly independent vectors.) Vectors x1 , x2 , . . . , xn ∈ X are said linearly
independent if the condition
λ1 x1 + λ2 x2 + · · · + λm xm = 0
implies that λi = 0 for each i (in simple words, if the linear combination with all coefficients equal
to zero is the only one that gives the 0 vector).
x = λ1 x1 + λ2 x2 + · · · + λn xn ,
Given a vector space X, its basis is not unique. The following fundamental property holds.
This number is invariant: we can replace a basis with another one having the same number of
elements. This has a considerable importance.
Definition A.4. The cardinality (the number of elements) of any basis of X is called dimension of
the vector space X:
Dim(X).
Example A.2. (Polynomials of degree 4.) Consider the set of polynomials of degree 4, having the
form:
p(s) = a4 s4 + a3 s3 + a2 s2 + a1 s1 + a0 .
The 0 polynomial is p(s) ≡ 0, with all zero coefficients. The polynomials s and s3 + 1 are linearly
independent. The polynomials s4 , s3 , s2 , s1 , 1, s3 + 1 are a set of generators, the set s4 , s3 , s2 , s1 ,
1 is a basis. We can also take (s + 1)4 , (s + 1)3 , (s + 1)2 , (s + 1)1 , 1, which is a different basis, but
has the same number of elements. The reader should prove the above statements as an exercise.
A.1. Vector spaces 161
Example A.3. (Euclidean space.) Consider the space of vectors in R3 , with 3 real components, of
the type x = [α, β, γ]⊤ . This is a vector space of dimension 3. A possible basis is
1 0 0
0 , 1 , 0 ,
0 0 1
The set X = {0}, including the 0 vector only, is a vector space, and it is named trivial space. It
has dimension 0.
Definition A.5. Subspace A subset X1 of X which is also a vector space is called a subspace.
Example A.4. (Subspaces.) If X is the space of polynomials of degree 4, then the polynomials of
degree 2 form a subspace. In the 3D-space, any plane including the origin is a subspace. Precisely,
in the space of vectors (x1 , x2 , x3 ) with coordinates x1 , x2 and x3 , the subset {(x1 , x2 , x3 ) : 2x1 −
x2 + x3 = 0} is a subspace.
Given two subspaces X1 and X2 , the following operations are defined and provide subspaces.
• Intersection: \
X1 X2 = {x : x ∈ X1 , and x ∈ X2 }
• Sum:
X1 + X2 = {x = x1 + x2 , x1 ∈ X1 , and x2 ∈ X2 }
Definition A.6. (Direct sum.) The sum X of two subspaces is said direct if any element x ∈ X can
be written as x = x1 + x2 , where x1 ∈ X1 and x2 ∈ X2 are uniquely determined.
v = x1 v1 + x2 v2 + · · · + xn vn ,
where the numbers x1 , x2 , . . . , xn are called the components of v. For a fixed basis, they are
uniquely determined. Therefore, if the basis is fixed, there is a correspondence between the vectors
v and n-tuples of numbers (x1 , . . . , xn ):
x1
x
v ↔ 2 ∈ Rn
:
xn
where Rn is, by definition, the set of all n-tuples. For example, in the 4-degree polynomial space,
with basis s4 , s3 , s2 , s, 1, the polynomial x4 + 5x + 3 is associated with the tuple (1, 0, 0, 5, 3).
Therefore, without loss of generality we can consider the space Rn of n-tuples. When necessary,
we will consider Cn , the space of complex n-tuples.
162 Chapter A. Elements of Mathematics
A.2 Matrices
Given two spaces X and Y, we say that a map (or operator, or application) L : X → Y is linear if
for all xa , xb ∈ X and α, β ∈ R, (or C) we have
Examples of linear maps are: from the 4th degree polynomial space to the 3rd degree polynomial
space, the derivative; between 3D spaces, a rigid rotation (with respect to an axis that includes the
origin).
We have seen that, for a fixed basis, any space of dimension n is isomorphic to Rn . Hence,
we can focus on operators from the space Rn to the space Rm . A linear map from Rn to Rm is
represented by a matrix A of size m × n. Let y ∈ Rm and x ∈ Rn . Then, we have
y = Ax,
where
y1 a11 a12 . . . a1n x1
y2 21 a22 . . .
a a2n x2
.. = .. .. .. .. .. .
. . . . . .
am1 am2 . . .
ym amn xn
Hence, the coefficients yi are computed according to the rule
n
X
yi = ai j x j .
j=1
Example A.5. The derivative as an operator from the 3rd degree polynomial space to the 2nd
degree polynomial space, with basis 1, s, s2 , s3 and 1, s, s2 respectively, is represented by the
matrix
0 1 0 0
D = 0 0 2 0 .
0 0 0 3
A B
Y Z X
Figure A.1: Composition of linear maps.
Rn |{z}
→ Rm |{z}
→ Rp
A B
If B has size p × m and A has size m × n, matrix C has size p × n and its generic element is given by
m
X
[C]i j = ci j = bik ak j , i = 1, 2, . . . , p, j = 1, 2, . . . , n.
k=1
A.2. Matrices 163
Definition A.7. (Image.) The image (or range) of a m × n matrix is the set
Ra(A) = {y : y = Ax, x ∈ Rn } ⊆ Rm .
Such a set is a subspace of Rm . Given a matrix M, its columns form a set of generators for its
image, though not necessarily a basis.
Definition A.8. (Kernel.) The kernel (or nullspace) of a m × n matrix is the set
Ker(A) = {x : Ax = 0} ⊆ Rn .
Its columns are generators for the space Ra(M). We notice that, if we subtract the second column
from the first one, we get the third column. Therefore there are two linearly independent columns
only (we choose for instance the first two), which are a basis of Ra(M) (a subspace of the 4D space
R4 ). The kernel of matrix M is given by all the vectors of the form
1
x = α −1 , α ∈ R,
−1
and is a subspace of R3 .
We have to find all the solutions x of Mx = 0, the null space. To get a basis of such a subspace, we
can subtract the first row from the second and the first row multiplied by two from the third
x1
1 2 0 1
x2
0 −3 1 0 x3 = 0
0 −3 1 0
x4
The solution is unchanged. The third row is neglected, since it is zero. We parameterise x3 = α and
x4 = β and we derive x2 = α/3 and x1 = −β − 2x2 = −β − 2α/3. Finally we have that any vector in
the kernel can be written as
β − 23 α
2
− 3
1
1 α 1
= α 3 + β 0 = αv1 + βv2
xK = 3
α 1 0
−β 0 −1
The two vectors v1 and v2 form a basis for the kernel of matrix M.
Definition A.9. (Transposed matrix.) Given the m × n matrix A, its transposed matrix A⊤ is the
n × m matrix whose elements are
[A⊤ ]i j = a ji .
The transpose of a product is the product of the transposed matrices in reverse order:
(A B C . . . )⊤ = (. . . C ⊤ B⊤ A⊤ ).
A.2.1 Determinant
For a square n × n matrix, the determinant is a function defined as follows. Given the fundamental
tuple of integers (1, 2, . . . , n) and the generic permutation
p = (p1 , p2 , . . . , pn )
we say that p is of even class (class = 2) if the number of element swaps to get the fundamental is
even, of odd class (class = 1) in the opposite case.
Let P be the set of all permutations of the fundamental and cl(p) ∈ {1, 2} the class of a
permutation p. Then the determinant (according to the Leibniz formula) is defined as
X
det(A) = (−1)cl(p) a1p1 a2p2 . . . anpn .
p∈P
A.2.2 Rank
The columns or the rows of a matrix are vectors in Rn and Rm . The following fundamental theorem
holds.
Theorem A.3. Given a generic matrix A ∈ Rm×n , the maximum number m̂ of linearly independent
rows is equal to the maximum number n̂ of linearly independent columns.
Definition A.10. Rank. The number n̂ = m̂ = r̂ is called rank of matrix A and is denoted by
Rank(A).
It turns out that Rank(A) is equal to the dimension of the largest square submatrix of A having
nonzero determinant.
If the matrix m × n has rank equal to the maximum possible (which is the minimum of m and n,
number of rows and columns) is said to be a full rank matrix, or to have full rank. In particular, a
square matrix has full rank if and only if its determinant is non-zero.
The following relations are useful when determining the rank of a matrix or when computing
its image or its kernel.
n = Rank(A) + Dim(Ker(A))
m = Rank(A) + Dim(Ker(A⊤ )).
Ax = b.
Theorem A.5. Given the system Ax = b, a necessary and sufficient condition for the existence of a
solution is that
Rank([A|b]) = Rank(A),
namely, the rank does not increase if b is added as a new column to A.
x̄ + x̃,
Ax = b.
• A has rank n;
• det(A) , 0.
166 Chapter A. Elements of Mathematics
If det(A) = 0, there can be either no solutions or infinite solutions, depending on b. The system
Ax = 0 admits non-zero solutions if and only if det(A) = 0.
Definition A.11. (Inverse matrix.) Given a square matrix A such that det(A) , 0, the matrix
B = A−1 is its inverse matrix if for every x
y = Ax, ⇒ x = By.
AB = BA = I
where I is the identity matrix. The following formula holds to compute the elements Bi j of B = A−1 :
det(Â ji )
Bi j = (−1)i+ j .
det A
where  ji is the complement of ai j . Note that i and j are exchanged in A ji in the formula!!
The inverse of a product is the product of the inverses in reverse order:
Finally, we have
1
det(A−1 ) = .
det(A)
where Ai j are submatrices. Of a particular interest is the product rule: given two partitioned matrices
under the assumption that the number of rows in each submatrix Ak j matches the number of columns
in the submatrix Bik , the matrix product is
• they leave the set of solutions unchanged if the matrix M = [A b] represents a system of
linear equations Ax = b.
• the first non-zero element is equal to a 1, namely Mi,νi +1 = 1, unless the row is zero;
• in each column where a pivot (unitary) element exists, all other elements are 0.
Each m × n matrix can be row-reduced by means of elementary row operations. The procedure
works as follows.
Procedure A.1.
1. Set i := 1, j := 1.
2. If, in the jth column, there exists a non-zero element in position k ≥ i, (including the ith
element) take it in position i (by row permutation). Otherwise consider the next column:
j := j + 1.
3. Multiply row i by 1/Mi j . Now the element i, j has become a pivot (it is equal to 1).
4. Add row i to all other rows k , i after multiplication by −Mk j , to set to zero all elements of
column j (excluding the pivot Mi j = 1).
Example A.9. Given the matrix M below on the left, set i = 1 and j = 1. M11 = 1 becomes pivot.
perform the following operations: Row(2) := Row(2) − Row(1), Row(3) := Row(3) − 2Row(1),
achieving the matrix M ′ on the right,
1 1 −1 1 0 −1 1 1 −1 1 0 −1
1 1 2 −1 0 1 0 0 3 −2 0 2
M = ⇒ M ′ =
0 0 −1 0 1 2 0 0 −1 0 1 2
2 2 0 0 1 2 0 0 2 −2 1 4
Set i = 2 and j = 2. The element M22 ′ is 0 as all the other elements of the second column.
Then consider the third column, j = 3. The element M23 ′ is non-zero. Make it unitary (pivot)
by division of the row Row(2) := Row(2)/M23 , achieving the matrix M ′′ below on the left. Then
′
A.2. Matrices 169
In the third column M23′′′ = 1 is non-zero (pivot). Let i = 3 and j = 4. The element M ′′′ , 0. Operate:
34
Row(3) := Row(3)/M34 ′′′ , so the element becomes 1 (pivot), achieving the matrix M ′′′′ below on the
left. Operate the following: Row(1) := Row(1) − Row(3) · M14 ′′′′ , Row(2) := Row(2) − Row(3) · M ′′′′ ,
24
Row(4) := Row(4) − Row(3) · M44 ′′′′ , achieving the matrix M ′′′′′ below on the right.
0 −1/3
1 1 0 1/3
1 1 0 0 1/2 1
0 0 1 −2/3 0 2/3 0 0 1 0 −1 −2
M ′′′′ = ⇒ M ′′′′′ =
0 0 0 1 −3/2 −8/2 0 0 0 1 −3/2 −8/3
0 0 0 −2/3 1 8/3 0 0 0 0 0 0
Setting i = 4 and j = 5, M45′′′′′ = 0 and there are only zero elements corresponding to greater or
The procedure is useful to find the kernel and the solution of a system of linear equations.
1 1 −1 1 0 −1
1 1 2 −1 0 1
[A|b] =
0 0 −1 0 1 2
2 2 0 0 1 2
rank(A) = rank([A|b])
equivalent to
rank(Â) = rank([Â|b̂])
where [Â|b̂] is the transformed matrix after row-reduction. Checking the existence of solutions is
easy. Indeed we arrive to a form of the type
" #
Â1 b̂1
[Â|b̂] =
0̂ b̂2
170 Chapter A. Elements of Mathematics
and the rank equality is equivalent to b̂2 = 0, which is then a necessary and sufficient condition for
the existence of solutions. In the example we get
x1 x2 x3 x4 x5 b̂
1 1 0 0 1/2 1
0 0 1 0 −1 −2
0 0 0 1 −3/2 −4
0 0 0 0 0 [0]
• The kernel basis is the solution we get after setting to 0 the last column (the known terms).
This is achieved as follows. We consider the columns without pivots: each of them is
associated with a vector of the kernel basis. For each non-pivot column, we set to 1 the
corresponding component xi and to 0 all the elements corresponding to other non-pivot
columns. We then simply derive the elements corresponding to pivot columns.
In the specific case, the pivots are in the positions 1, 3 and 4. The non-pivot positions are 2 and 5.
To get a particular solution we put x2 = 0 and x5 = 0, then x1 = 1, x3 = −2 and x4 = −4,
namely h i
x̄⊤ = 1 0 − 2 −4 0
A kernel basis is achieved by setting to 0 the last column (zeroing the elements of column b̂). The
first vector of the basis is achieved by setting x2 = 1 and x5 = 0 and computing the other terms
h i
v⊤
1 = 1 −1 0 0 0
The two vectors v1 and v2 form a basis for the 2-dimensional kernel.
In the case of square non-singular matrices, row reduction is useful to compute the inverse as
well. Let P be a square invertible matrix. Its inverse is achieved as follows.
3. Then P−1 = Q.
where Q = P−1 .
Remark A.1. If the row and column operations so far described are applied to square matrices,
they do not preserve eigenvalues, eigenvectors and characteristic polynomial. The similarity
transformations presented in Section A.2.6 have this property.
(ek has all 0 elements except the kth, which is equal to 1). Indeed we have
x1
x2 X n
x = .. = x je j.
. j=1
xn
Now suppose we want to write the vector x as the convex combination of vectors forming a new
basis, t1 , t2 , . . . , tn , grouped in the matrix
T = [t1 t2 . . . tn ].
x = T x̂ ⇒ x̂ = T −1 x. (A.1)
172 Chapter A. Elements of Mathematics
Given a linear map y = Ax, the basis changes x = T x̂ and y = S ŷ lead to the transformation
ŷ = S −1 AT x̂
We consider mainly3 applications of a space to itself, for which the transformation is represented by
a square matrix A. In this case the new basis should be the same (x = T x̂ and y = T ŷ). The linear
application is then transformed as follows:
ŷ = T −1 AT x̂ = Â x̂. (A.2)
In this case the transformation is called similarity transformation. A similarity transformation has
fundamental property, we will show later. In particular we have the following. Any power Ak of Â,
with k positive integer, is transformed as A
Âk = T −1 −1
| AT T AT{z . . . T AT
−1
} = T A T.
−1 k
k times
If A is invertible, then the property applies also for negative k. This property allows us to define
analytic functions of matrices.
+1 2 +2 2
" #" # " #" #
x1 x1
(A − λ1 )x = = 0 and (A − λ2 )x = =0
−1 −2 x2 −1 −1 x2
Remark A.3. If A is real, its eigenvalues have the conjugate property: λ ∈ σ(A) implies that the
conjugate λ∗ ∈ σ(A). This is trivial if λ is real. If, for instance −1 + 2 j ∈ σ(A), then −1 − 2 j ∈ σ(A).
Finding a complex eigenvector is harder, but once the eigenvector v of λ is known, the eigenvector
associated with λ∗ is v∗ and comes for free.
Assume, for the moment, that the matrix A admits n distinct eigenvalues, namely that the roots
of p(λ) are distinct
σ(A) = { λ1 , λ2 , . . . , λn }.
In this case the corresponding eigenvectors t j are linearly independent. Call T the matrix whose
columns are the eigenvectors h i
T= t1 t2 . . . tn .
Then the following relation holds:
λ1 0 . . . 0
h i h i 0 λ2 . . . 0
t1 t2 . . . = t1 t2 . . . .. .. . . .. .
A tn tn
. . . .
0 0 ... λn
AT = TΛ
S A = ΛS
A = T ΛS
Λ = S AT.
174 Chapter A. Elements of Mathematics
Remark A.4. For simple eigenvalues all of these numbers are equal to 1.
The ascent of an eigenvalue is particularly important. There is a simple way to calculate it
without passing through the Jordan form. Define the following numbers:
ρ1 = rank(λI − A)1
ρ2 = rank(λI − A)2
:
ρg = rank(λI − A)g
It can be shown that ρi ≥ ρi+1 . The computation is carried out until equality occurs:
ρ1 > ρ2 > . . . ρg = ρg+1 .
The first index for which the equality holds is the ascent g of λ (g = mini : ρi = ρi+1 ).
A.2. Matrices 175
Matrix A1 has the eigenvalue −1 with algebraic multiplicity 3. Computing the rank of the powers
(A1 + 1I)k , we get ρ1 = 2, ρ2 = 1, ρ3 = 0 and ρ4 = 0. The ascent of the eigenvalue −1 is therefore 3.
Matrix A2 has a simple eigenvalue λ = −4 (hence of ascent 1) and another eigenvalue λ = −1. For
the latter eigenvalue, ρ1 = 1 and ρ2 = 1, hence the ascent is 1.
Proposition A.1. A similitude transformation preserves the characteristic polynomial, hence the
eigenvalues. In fact, if  = T −1 AT , then
• ∥λx∥ = |λ|∥x∥;
• ∥x + y∥ ≤ ∥x∥ + ∥y∥.
The norm represents the “size” of x. A famous norm is the geometric length, or 2-norm, or
Euclidean norm v
t n
X
∥x∥ xi2 .
i=1
The Euclidean and the 1-norm are special cases of the p-norm
v
t n
X
∥x∥ p |xi | p .
i=1
There are many other norms. In general ∥F x∥ is a norm of x ∈ Rn , if F has rank n. All norms in Rn
are equivalent. Precisely, given two norms ∥ · ∥1 and ∥ · ∥2 , there exist positive constants α and β
such that
α∥x∥1 ≤ ∥x∥2 ≤ β∥x∥1 .
176 Chapter A. Elements of Mathematics
Clearly for real vectors in Rn the Hermitian conjugate is the transposed: xH = x⊤ . Given two
vectors x, y in Cn , we define the scalar product as
(x, y) xH y
For vectors in Rn ,
(x, y) x⊤ y
As a particular case, when x = y we have that
n
X
(x, x) = ∥x∥2 = xi2 .
i=1
(x, y) = 0.
In three dimensions, the inner product is equal to the product of the lengths and the cosine of the
angle θ formed by the vectors
(x, y) = ∥x∥ ∥y∥ cos(θ).
This enables us to define “angles” between vectors in dimension greater than 3 as
(x, y)
cos(θ) = .
∥x∥ ∥y∥
To give a further interpretation, consider a unit vector v with ∥v∥ = 1 (note that, given a vector
x , 0, it is always possible to normalise it and get a unit vector v = ∥x∥
x
). Then the quantity (y, v)
represents the component y along the direction v.
Definition A.13. Given a subspace X of Rn , the set of all orthogonal vectors is a subspace and it is
called orthogonal complement
X ⊥ = {y : (x, y) = 0}
Definition A.14. A square n × n matrix Q = [q1 q2 . . . qn ] is said orthogonal if its columns are
non-zero and pairwise orthogonal: q⊤ i q j = 0 if i , j. It is said orthonormal if its columns are
pairwise orthogonal and of unit length:
(
0 if i , j
qi q j =
⊤
(A.4)
1 if i = j
The columns of an orthonormal matrix form an orthonormal basis. Orthonormal bases are very
convenient in computation, because the new components of a vector x are just computed as Q⊤ x.
Indeed, an orthonormal matrix has an inverse equal to the transpose
Q−1 = Q⊤
A.2. Matrices 177
Given a matrix M, we can define an induced norm, which is the maximum stretching of the
vector on which the matrix operates:
∥Mx∥
∥M∥ sup ∥Mx∥ = sup
∥x∥=1 ∥x∥,0 ∥x∥
The induced norm depends of the chosen vector norm. If we take the Euclidean norm,
p
∥M∥ = max σ(M ⊤ M)
is the maximum square root of the eigenvalues of M ⊤ M, which are all real and nonnegative, as we
will shown soon.
2 − j 3 + j4
#H
2+ j 1 + 3j
"
1
= 1 2 + 2j
3 − j4 2 − 2 j 4j
1 − 3 j −4 j
• (AB)H = BH AH .
A matrix is said Hermitian if P = PH . In the case of real matrices an Hermitian matrix
P ∈ Rn×n is called symmetric: P = P⊤ . We can prove the following.
Theorem A.6. An Hermitian matrix (symmetric if real) has real eigenvalues.
Proof Consider the expressions
Px = λx
∗ ∗
P x = λ∗ x ∗
xH Px = λxH x
x∗ T P∗ T = x ∗ T λ∗ ⇒ xH PH = xH λ∗
xH Px = λxH x
x H P H x = λ∗ x H x
178 Chapter A. Elements of Mathematics
λxH x = λ∗ xH x
Since xH x = ni=1 xi∗ xi = ni=1 |xi |2 is always greater than zero because x , 0, then it must
P P
necessarily happen that λ = λ∗ , that is, the eigenvalues of the matrix P are real. □
Theorem A.7. For a symmetric matrix, the eigenvectors qi and q j associated with two distinct
eigenvalues are orthogonal:
q⊤i q j = q j qi = 0.
⊤
In general (even if there are repeated eigenvalues) a symmetric matrix admits n eigenvectors that
form an orthonornal basis.
Indeed, we can derive eigenvectors that are mutually orthogonal and that can be normalised
to find a basis of orthonormal eigenvectors Q = [ q1 q2 . . . qn ]. In this case, (A.4) holds and then
Q⊤ Q = I: Q is orthonormal.
The previous properties imply that, for a symmetric matrix P, the diagonalising similarity
transformation is orthonormal
PQ = Q⊤ Λ
Q⊤ P = ΛQ⊤
P = QΛQ⊤
Λ = Q⊤ AQ.
x⊤ Px ≥ 0 (≤ 0) ∀ x.
x⊤ Px > 0 (< 0) ∀ x , 0.
In all other cases, when x⊤ Px can assume both negative and positive signs, we call P indefinite.
Note that P is a negative (semi)definite matrix if and only if −P is positive (semi)definite.
If P is positive definite, in two dimensions the level surfaces of the function V(x) = x⊤ Px are
ellipses, in three dimension are ellipsoids. The graph of V(x) = x⊤ Px with x two dimensional is
shown in Figure A.2 and its level curves are represented in Figure A.3.
A fundamental property of these matrices is the following.
• P is positive (negative) semidefinite if and only if, for all i, λi ≥ 0 (λi ≤ 0);
• P is positive (negative) definite if and only if, for all i, λi > 0 (λi < 0).
A.2. Matrices 179
This function is positive if and only if λi > 0 for all i (and so on).
An additional method to check whether a matrix P is positive definite is the Sylvester criterion.
Denote by Pk the principal sub-matrix formed by considering the first k rows and k columns.
Proposition A.2. P is positive definite if and only if det Pk > 0 ∀ k = 1, 2, . . . , n.
Example A.16. Matrix P, with
3 1 0 " #
3 1
P = 1 2 1 = P3 , P2 = 1 , P1 = [3],
2
0 1 1
is positive definite because the three first leading determinants determinants det(P1 ), det(P2 ) and
det(P3 ) = det(P) are positive (check it).
A function f (s) of this type is defined in a certain domain of convergence, having the form
D = {s : |s| < ρ},
where ρ ≥ 0 is called convergence radius. It depends on the coefficients { fh }. For instance
1 + s + s2 + s3 + s4 . . .
has convergence radius ρ = 1. The series
s s2 s3 s4
1+ + + + + ...
1! 2! 3! 4!
has convergence radius ρ = ∞. These two series, where convergent, are equal to 1−s 1
and e s
respectively. A polynomial is a particular series for which all coefficients are 0 after a finite n and
its convergence radius is infinite.
Functions that can be expressed as power series are called analytic and have several significant
properties (most of which are not reported here, for brevity). The following principle applies.
A.3. Polynomials and power series 181
Theorem A.9. (Identity principle of power series.) Let l be a continuous curve in the complex
plane having one extremum at the origin and containing other points different from 0. Then, given
two series f (s) = ∞ h=0 fh s and g(s) = h=0 gh s , whose convergence disks include l, we have
P h P∞ h
that f (s) = g(s) for each point of l if and only if gh = fh for each h ≥ 0.
It is obvious that gh = fh implies that f (s) = g(s) for each point of l. The fundamental point of
the theorem is that, if f (s) = g(s) on the curve, then f and g have the same coefficients, hence the
same convergence disk, hence they are the same function.
By means of power series, we can define functions of matrices. Let f (s) be an analytic function
and M a square matrix. Assume that the set of the eigenvalues of M is contained in the convergence
disk of f .4 Then we can define the function of M associated with f (s) as
∞
X
f (M) fh M h .
h=0
M h = T Λh T −1 ,
h=0 h=0
where
∞ ∞ ∞ ∞
X
X X X
Λ h
= λ h
, λ h
, . . . , λ h
= diag{ f (λ1 ), f (λ2 ), . . . , f (λn )}.
f h diag
f h 1 f h 2 f h n
h=0 h=0 h=0 h=0
Then it becomes apparent why we need to assume that the eigenvalues are in the convergence disk.
Example A.17. We can define
M M2 M3 M4
eM I + + + + + ...
1! 2! 3! 4!
M2 M4
cos(M) I − + + ...
2! 4!
and
M M3 M5
−
sin(M) + + ...
1! 3! 5!
Polynomials are particular power series. Then we can define the polynomial of a matrix. Given
p(s) = p0 + p1 s + p2 s2 + · · · + pn sn we just define
p(M) = p0 I + p1 M + p2 M 2 + . . . pn M n .
det(sI − A) = p(s) = a0 + a1 s + a2 s2 + · · · + sn
its characteristic polynomial. Then, the corresponding matrix polynomial calculated in A is zero:
p(A) = a0 I + a1 A + a2 A2 + · · · + An = 0.
4
This hypothesis can be removed thanks to the analytic extension technique.
182 Chapter A. Elements of Mathematics
t0 t
Figure A.4: The impulse can be seen as the limit of a sequence of functions.
where τ is an internal point of the interval [t0 − 2ϵ , t0 + 2ϵ ], which exists for the mean value theorem.
Being f continuous, when ϵ → 0 we have
Z b
f (t) δϵ (t − t0 )dt → f (t0 ).
a
Then the limit function δ(t − t0 ) is defined as the “function” (in fact, it is a distribution) having the
property that, for every continuous function f , defined on [a, b] having t0 as an interior point, we
have that Z b
f (t) δ(t − t0 )dt = f (t0 ). (A.5)
a
We can apply this concept to the case of the forced response of a single-input-single-output linear
system, given by the convolution
Z ⊤
y(t) = W(t − σ)u(σ)dσ.
0
for t > t0 (while yimp (t) = 0 for t < t0 ). Finally, note that, in order to consider the solution due to an
impulse at instant 0, we must consider the convolution from 0− to include the origin in the interior:
Z ⊤
y(t) = W(t − σ)u(σ)dσ.
0−
184 Chapter A. Elements of Mathematics
where s is a complex variable. If the function F is well defined, we say that f is Laplace-
transformable. The Laplace transform gives a one-to-one correspondence: F(s) = G(s) if and only
if f (t) = g(t).
With a certain abuse of notation (but with great convenience of representation), it is often
accepted to represent the function and its Laplace transform with the same letter
Z ∞
f (s) = f (t)e−st dt.
0
In particular, the smallest value c f of c for which convergence is ensured, namely for which
Z ∞
f (s) = | f (t)|e−st dt
0
Linearity
L[α f (t) + βg(t)] = α f (s) + βg(s).
Final limit theorem Assuming that the limits below exist and are both finite we have that
Initial limit theorem Assuming that the limits below exist and are both finite we have that
Convolution theorem
"Z ⊤ # "Z ⊤ #
L g(t − σ) f (σ)dσ = L g(σ) f (t − σ)dσ = f (s)g(s).
0 0
A.5. Laplace transforms 185
Shifting theorem
L[ f (t − τ)] = e−sτ F(s).
Multiplication by t
d
L[t f (t)] = − F(s).
ds
Multiplication by eξt
L[eξt f (t)] = F(s − ξ).
L[cos(ωt)] L[cos(ωt)]
Then
s
L[cos(ωt)] =
s2 + ω2
ω
L[sin(ωt)] = .
s + ω2
2
since
h i 1
L e(ξ+ jω)t =
s − ξ + jω
we get, taking real and imaginary parts separately,
s−ξ
L[eξt cos(ωt)] =
(s − ξ)2 + ω2
ω
L[eξt sin(ωt)] = .
(s − ξ)2 + ω2
Now consider the Laplace transform of the function teλt . This is obtained by considering the
theorem of multiplication by t:
d 1 1
L[teλt ] = − = .
ds s − λ (s − λ)2
186 Chapter A. Elements of Mathematics
From the trivial fact that tk eλt = t(tk−1 eλt ) we can recursively demonstrate that
k!
L[tk eλt ] = .
(s − λ)k+1
The transform of the impulse δ(t − τ) is important:
Z ∞
L[δ(t − τ)] = δ(t − τ)e−st dt = e−sτ
0
In particular for τ = 0 this means that the impulse function in the origin is just
L[δ(t)] = 1.
t≤τ
(
0 for
gr(t − τ) =
1 for t>τ
The transforms which have been considered so far are rational. There is an interesting case of
non-rational transform. Consider the T -delay operator
This operator is linear. Note that if u has positive support, then u(tT ) = 0 as t < T . In terms of
transform we get
y(s) = e−T s u(s)
The proof is simple and left to the reader.
Note that the coefficient of sν at the denominator is dν = 1: this is not restrictive because, if
dν , 1, we can always divide both numerator and denominator by dν (which is non-zero because
we consider proper functions). A proper rational function f (s) can be always be transformed into
the sum of a constant and a function strictly proper rational function6
n0 + n1 s + n2 s2 + · · · + nν sν nν (d0 + d1 s + d2 s2 + · · · + sν )
f (s) = = +
d0 + d1 s + d2 s2 + · · · + sν d0 + d1 s + d2 s2 + · · · + sν
(n0 − nν d0 ) + (n1 − nν d1 )s + · · · + (nν−1 − nν dν−1 )sν−1
+
d0 + d1 s + d2 s2 + · · · + sν
ñ0 + ñ1 s + ñ2 s2 + · · · + ñν−1 sν−1
= nν + = nν + f˜(s)
d0 + d1 s + d2 s2 + · · · + sν
Then we just need to determine the inverse transform of the strictly proper part.
Consider the strictly proper rational function f (s) . If f has distinct poles (roots of the
denominator) λ1 , λ2 , . . . , λν , it can always be written in the form
ν
X ri
f (s) = , (A.7)
i=1
s − λi
where the coefficients ri are called residuals and are computable as the limit
ri = lim (s − λi ) f (s),
s→λi
n(s)
f (s) =
(s − λ1 )(s − λ2 ) . . . (s − λν )
As an alternative, we can solve the problem by means of a system of linear equations. Take the
expression (A.7) and consider the common denominator
Pν Pν
j,i (s − λ j ) ri Ψi (s)
Q
n(s) i=1 ri
f (s) = = = i=1
d(s) (s − λ1 )(s − λ2 ) . . . (s − λν ) d(s)
The identity
ν
X
n(s) = ri Ψi (s),
i=1
must hold. Both sides are polynomials of degree ν in s. By applying the identity principle
for polynomials, the coefficients ri are determined by a linear system (obtained by equating the
coefficients of the terms with the same degree).
6
A rational function is strictly proper if the degree of the numerator is smaller than that of the denominator.
188 Chapter A. Elements of Mathematics
r1 + r2 + r3 = 0
5r 1 + 4r2 + 3r3 = 1
6r1 + 3r2 + 2r3 = 4
where the factors (s − λi ) are associated with the m real roots, while the factors ((s − ξi )2 + ω2i ) are
associated with the q pairs of complex conjugate roots ξi + jωi (m + 2q = ν). Then we have that
m q
X ri X ai s + bi
f (s) = + .
i=1
(s − λi ) i=1
(s − ξi )2 + ω2i
The coefficients ri can be determined by means of the limit formula. To compute all of the
coefficients ri , ai and bi , we can write the common denominator and calculate the coefficients
through a linear system.
Example A.19. Consider the rational function
2s3 + 1
f (s) = .
(s + 1)(s + 2)((s + 1)2 + 4)
This function can be written as
n(s) r1 r2 a1 s + b1
f (s) = = + + 2 .
d(s) s + 1 s + 2 (s + 2s + 5)
A.5. Laplace transforms 189
Through the principle of identity, we can determine the coefficients r1 , r2 , a1 and b1 of the polynomial
by solving the linear system
r1 + r2 + a1 = 2
4r1 + 3r2 + 3a1 + b1 = 0
9r1 + 7r2 + 2a1 + 3b1 = 0
10r1 + 5r2 + 2b1 = 1
The solution is
1
r1 = −
4
r2 = 3
3
a1 = −
4
23
b1 = − .
4
Let us briefly consider now the case of rational functions with multiple poles. The most general
case of decomposition is
m X gi
X ri j
,
i=1 j=1
(s − λi ) j
where gi is the multiplicity of the poles λi . The ri j ’s are obtainable through a system as in the
following example.
Example A.20.
s2 + s + 1
f (s) = (A.8)
(s + 1)2 (s + 2)3
r11 r12 r21 r22 r23
= + + + + (A.9)
s + 1 (s + 1) 2 s + 2 (s + 2)2 (s + 2)3
With the usual technique of the common denominator, we can equate the numerators and get
from which we can derive the coefficients r11 , r12 , r21 , r22 and r23 . Equating the coefficients of the
corresponding terms, we get the linear system
r11 + r21 = 0
7r11 + r12 + 6r21 + r22 = 0
18r11 + 6r12 + 13r21 + 4r22 + r23 = 1
20r11 + 12r12 + 12r21 + 5r22 + 2r23 = 1
8r11 + 8r12 + 4r21 + 2r22 + r23 = 1
190 Chapter A. Elements of Mathematics
The solution is
r11 = −4
r12 = 1
r21 = 4
r22 = 3
r23 = 3.
Once we have calculated the decomposition, the problem of the inverse transform can be solved
term by term (in view of linearity). For the terms whose denominator is of the first degree
r
L −1
= r eλt ,
s−λ
while for terms with a second degree denominator we can write
as + b a(s − ξ) (b + aξ)
= +
(s − ξ) + ω
2 2 (s − ξ) + ω
2 2 (s − ξ)2 + ω2
whereby
as + b b + aξ ξt
" #
L −1
= a eξt cos(ωt) + e sin(ωt).
(s − ξ)2 + ω2 ω
In the case of multiple eigenvalues, we have terms of degree k + 1. For these we have
" #
r r k λt
L −1
= t e
(s − λ) k+1 k!
where λ is either real or complex.
namely, it is the corresponding series of powers of 1z . The convergence domain of this function is a
set of the type
D = {z : |z| > ρ f }
(which is the complement of the disk of radius ρ f ), where the radius ρ f depends on the considered
function f .
The Zeta transform has properties that are quite similar to those of the Laplace transform. We
remember only the following properties.
Linearity Z[α f + βg] = αZ[ f ] + βZ[g].
Convolution transform
Xk−1
Z[ f (k − h)g(k)] = Z[ f ]Z[g].
h=0
A.7. Convex and least square optimization 191
The utility of the Zeta transform in the study of discrete-time systems is entirely comparable to that
of the Laplace transform in the study of continuous-time systems.
has transform
z z
= = ...
z − e jω z − (cos(ω) + j sin(ω))
and then split real and imaginary parts . . .
Proposition A.5. In a convex optimization problem, any local minimum is a global minimum.
The previous result, is very important and its consequence is that a convex optimization problem
is easier than the general optimization problems.
min h⊤ θ
s.t. Mθ = r
Nθ ≤ s
192 Chapter A. Elements of Mathematics
is a linear programming problem and can be solved for systems of dimension 1000 or more with no
difficulties. The following problem
min θ⊤ Pθ
s.t. Mθ = r
Nθ ≤ s
with P semi–positive definite, is a quadratic programming problem and can be also efficiently
solved.
Special cases of quadratic problems are the minimum euclidean norm problems with linear
constraints. Consider the linear systems
Ax = b
There are three cases.
1. Matrix A is square invertible, then the solution is unique.
2. There are infinite solutions. In this case one wish to find the one with smallest Euclidean
norm.
3. There are no solutions. In this case one wish to find the vector for which the error e = Ax − b
has the smallest Euclidean norm.
The previous are called generalized solutions.
For brevity assume A full rank. The first solution can be found as
1
min ∥x∥2
2
s.t. Ax = b
The Lagrangian is
1 2
∥x∥ + λ⊤ [Ax − b]
2
Differentiating with respect to x we get
x ⊤ + λ⊤ A = 0
namely x = −A⊤ λ. We replace this in Ax = b to get −AA⊤ λ = b or λ = −[AA⊤ ]−1 b. Then the
minimum norm solution is
x∗ = −A⊤ [AA⊤ ]−1 b
In the second case we wish to minimize
2x⊤ A⊤ A − 2b⊤ A = 0
transposing A⊤ Ax − A⊤ b = 0, then
x̂ = [A⊤ A]−1 A⊤ b
A.7. Convex and least square optimization 193