Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
15 views

Lecture2 LectureNotes

State-space representations are a fundamental concept in modern control theory. They describe dynamical systems using state vectors within a state space. Knowing the initial state vector is sufficient to determine the system's future evolution. Linear state-space representations describe systems using matrices, while nonlinear representations use vector fields. Common state-space forms are given for continuous and discrete time, with and without inputs and outputs. Examples demonstrate how different systems can be modeled in state-space form.

Uploaded by

Asaad waqar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Lecture2 LectureNotes

State-space representations are a fundamental concept in modern control theory. They describe dynamical systems using state vectors within a state space. Knowing the initial state vector is sufficient to determine the system's future evolution. Linear state-space representations describe systems using matrices, while nonlinear representations use vector fields. Common state-space forms are given for continuous and discrete time, with and without inputs and outputs. Examples demonstrate how different systems can be modeled in state-space form.

Uploaded by

Asaad waqar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

1.4.

STATE-SPACE REPRESENTATIONS

1.4 State-Space representations


State-space representations are at the basis of modern control theory, and many
control concepts such as stability, controllability and observability are defined
using state-space representations. As we will see, the power of these representa-
tions lies in their ability to describe a wide range of systems, including nonlinear
systems and systems with multiple inputs and multiple outputs (similarly to the
examples of the beginning of this chapter). State-space representations are also
very useful when it comes to demonstrating important dynamical properties,
mostly coming from the relative simple way state-space representations are de-
fined.

1.4.1 The State-Vector and the State-Space


Introduce first a time-dependent vector x(t) taking values in Rn (mathemati-
cally, write x(t) 2 Rn ). We call this vector the state vector or simply state,
while the space Rn is called the State-Space. In state-space representations, ie
centered around the state vector and the state-space concepts, a particularity
is that the knowledge of the state vector x of a considered system at instant t0
is enough to know the future evolution of this system for all t t0 .

Example: A simple discrete-time system


Consider a system described by the following set of di↵erence equations:
(
x1 (t + 1) = x2 (t), x1 (0) = 1
(1.15)
x2 (t + 1) = x1 (t), x2 (0) = 0

In the above system, the state vector is the vector of dimension 2 defined by

x (t)
x(t) := 1 (1.16)
x2 (t)

So that the state space is R2 . Let us now draw a simple 2-dimensional graphical
representation of the evolution of this state at time t = 0, 1, 2, 3. For initial
conditions set as above (ie x(0) = [1, 0]T ), this evolution can be seen in figure
1.18a:

(a) State evolution for system (b) Initial conditions changed to


(1.15). x(0) = [1, 1]T

Figure 1.18: Graphical representation of the evolution of state vector x(t)

13
1.4. STATE-SPACE REPRESENTATIONS

If we now modify only the initial conditions of system (1.15) to x(0) =


[1, 1]T , it is easy to obtain the new values of the state for di↵erent subsequent
times, as represented in figure 1.18b.
This means that knowing x at time t = t0 = 0 is enough to know the evolution
of x(t) for all t 0. Hence the vector/variable we have chosen for system (1.15)
is indeed a valid state vector.

Generally speaking, state-space representations are described by a system


of first-order di↵erence or di↵erential equations with the state-vector as the
delayed or di↵erentiated variable. This is obviously the case in the previous
example.
Let us see now another example.

Example: Fibonacci sequence


Consider the system described by the di↵erence equation:

F (t + 2) = F (t + 1) + F (t) (1.17)

The order of this system is 2, so we need 2 initial conditions which are set to

F (1) = 1, F (0) = 0.

The first observation one can make is that since system (1.17) is of order 2, then
it is not a state-space representation.
Let us now consider the variable F (t). Could this be a valid state vector? If that
were the case, then this would mean that knowning F (0) would be sufficient to
obtain F for any future t, which is not the case since we also need F (1)! Hence
dynamic variable F (t) is not a state vector.

1.4.2 State-Space representations of Linear Time Invari-


ant (LTI) Systems
We would like to extend the above ideas to have a linear representation contain-
ing a dynamic part responsible for the evolution of the state, and also allows
for the addition of external control signals.
Hence we have the two following linear state-space representations given below,
one for continuous-time systems, the other for discrete-time ones.

Continuous-time: Linear State-Space Representation


ẋ(t) = Ax(t) + Bu(t), x(0) = x0 (1.18)
where the vectors and matrices have the dimensions

x 2 Rn , A 2 Rn⇥n , u 2 Rm , B 2 Rn⇥m

and where u(t) is called the control input vector.

14
1.4. STATE-SPACE REPRESENTATIONS

Discrete-time: Linear State-Space Representation


x(t + 1) = Ax(t) + Bu(t), x(0) = x0 (1.19)
again with
x 2 Rn , A 2 Rn⇥n , u 2 Rm , B 2 Rn⇥m
Some systems of di↵erential equations are directly or almost directly put
into a state-space representation. Let us see that with the example below.

Example: The Compartment model as a linear state-space represen-


tation
Let take again the system represented by
(
V1 ċ1 (t) = q (c2 (t) c1 (t)) q0 c1 (t) + c0 u(t)
(1.20)
V2 ċ2 (t) = q (c1 (t) c2 (t)))
If we rewrite this dynamical system as
8 q q0 c0
>
<ċ1 (t) = V (c2 (t) c1 (t)) c1 (t) + u(t)
1 V1 V1
(1.21)
:ċ2 (t) = q (c1 (t)
>
c2 (t))
V2
then we are not very far from a state-space representation (not far at all actu-
ally). Indeed, defining the state as
 
x1 (t) c (t)
x(t) := = 1 , (1.22)
x2 (t) c2 (t)
replacing the ci ’s by the corresponding xi ’s, and putting everything in vectorial
form, we get
2 q q0 q 3 2c 3
  0
ẋ1 (t) 6 1 V V 1 V1 7 x1 (t) 4 V
=4 1 5 u(t)
ẋ2 (t) q q 5 x2 (t) + (1.23)
0
V2 V2
so that we have state-space representation (1.18) with
2 q q0 q 3 2c 3
0
6 V1 V1 V1 7 4 V 15 .
A=4 q q 5 and B = (1.24)
0
V2 V2

Coming back to general state-space representations, equations (1.18) and


(1.19) are often called dynamic equations in a state-space representation context.
In order to represent outputs of interest, for example parts of the state that are
measured by sensors, it is common to add to the dynamic equation a so-called
output equation so that we obtain:
(
ẋ(t) = Ax(t) + Bu(t), x(0) = x0
(1.25)
y(t) = Cx(t) + Du(t)
where
y 2 Rp , C 2 Rp⇥n , D 2 Rp⇥m

15
1.4. STATE-SPACE REPRESENTATIONS

Example: Compartment continued


Coming back to our previous example, we assume now we measure only c2 (t) or
equivalently x2 (t), which means that we have y(t) = c2 (t) = x2 (t)1 . In vectorial
form, this gives

⇥ ⇤ x1 (t) ⇥ ⇤
y(t) = 0 1 + 0 u(t) = Cx(t) + Du(t) (1.26)
x2 (t)

1.4.3 Nonlinear state-space representations


In the nonlinear case, matrices of the linear state-space representations are
replaced by a vector field or multi-dimensional function.
Thus, if the system is without control input, a state-space representation will
have the following form

ẋ(t) = f (x(t)), x(0) = x0 (continous-time) (1.27)

or, for the discrete-time version,

x(t + 1) = f (x(t)), x(0) = x0 (discrete-time) (1.28)

where f is a vector field taking values in Rn , ie we have

f : Rn ! Rn (1.29)

Example: The Lorenz System


This system is already described in state-space form since all the di↵erential
equations are of first order:
8
>
<ẋ1 (t) = px1 (t) + px2 (t)
ẋ2 (t) = x1 (t)x3 (t) x2 (t) (1.30)
>
:
ẋ3 (t) = x1 (t)x2 (t) x3 (t)

where p is a constant. Let us then define the state as


2 3
x1 (t)
x(t) = 4x2 (t)5 (1.31)
x3 (t)

so that f : R3 ! R3 :
2 3 2 3
px1 (t) + px2 (t) f1 (x1 (t), x2 (t), x3 (t))
f (x(t)) = 4 x1 (t)x3 (t) x2 (t)5 = 4f2 (x1 (t), x2 (t), x3 (t))5 (1.32)
x1 (t)x2 (t) x3 (t) f3 (x1 (t), x2 (t), x3 (t))
When inputs are included into the representation, the vector field f also
depends on u(t) and we have

ẋ(t) = f (x(t), u(t)) (1.33)


1 The output is here not in bold font because the output vector is of dimension one, ie there

is only one output. Same for the input.

16
1.5. BRIDGES

and similarly for discrete-time systems (ie we have x(t + 1) = f (x(t), u(t))).
Similarly to the linear case, an output equation, also nonlinear, can be added:

y(t) = h (x(t), u(t)) (1.34)

where h is another vector field.

1.5 Bridges
Mathematical bridges or transformations between systems that are described
mathematically can be very useful, not only for finding interesting theoretical
results, but also for more practical-related matters.
The first one which we will see below concerns the actual implmentation of our
continuous-time systems on digital computers, ie how to discretize a system by
a simple program written in C, Python or pure Matlab (ie no Simulink).

1.5.1 From continuous to discrete-time state-space repre-


sentations: discretization using the Euler Method
The Euler method is probably amongst the crudest and simplest methods of
discretizing an ODE. However, it is still very widely used because it can quite
often be enough to give satisfactory results.
Principle: Approximate a first-order derivative by a di↵erence in time.
Thus, discretizing
ẋ(t) = f (x(t), u(t)) (1.35)
gives, after discretization,

x(t + 1) x(t)
= f (x(t), u(t)) (1.36)
Ts
where we recall that, in the above, time variable t is now discrete. The con-
stant Ts is the period at which the signal is discretized or sampled. Finally,
isolating the terms in (t + 1), we have the following discrete-time state-space
representation

x(t + 1) = x(t) + Ts f (x(t), u(t)) = f 0 (x(t), u(t)) (1.37)

Example: Discretizing the Lorenz system


Recall a description of the Lorenz chaotic system
8
>
<ẋ1 (t) = px1 (t) + px2 (t)
ẋ2 (t) = x1 (t)x3 (t) x2 (t) (1.38)
>
:
ẋ3 (t) = x1 (t)x2 (t) x3 (t)

17
1.5. BRIDGES

Discretizing this system using the Euler method gives


8
> x1 (t + 1) x1 (t)
>
> = px1 (t) + px2 (t)
>
> Ts
>
<
x2 (t + 1) x2 (t)
= x1 (t)x3 (t) x2 (t) (1.39)
>
> Ts
>
>
>
> x (t + 1) x3 (t)
: 3
= x1 (t)x2 (t) x3 (t)
Ts
from which we can now obtain the following discrete-time state-space represen-
tation 8
>
<x1 (t + 1) = x1 (t) + Ts [ px1 (t) + px2 (t)]
x2 (t + 1) = x2 (t) + Ts [ x1 (t)x3 (t) x2 (t)] (1.40)
>
:
x3 (t + 1) = x3 (t) + Ts [x1 (t)x2 (t) x3 (t)]

It is quite important to note that choosing the sampling period obviously


depends on the system dynamics, otherwise the first-order approximation might
be too crude. A fast system will generally need a small Ts while a slow one will
do with a larger sampling period.

1.5.2 From ODEs to state-space representations


Obviously, ODEs can be of any order, while state-space representations are
exclusively first-order forms. While state-space representations are widely used
in control systems, ODEs of higher-order come naturally when modeling many
physical systems (especially mechanical systems, ie many of second order).
If we are to control them, we should find a way to obtain a state-space
representation out of systems modelled by ODEs. We give below a few tips on
how to do that (note: in this section, we consider only systems with 1 input
and 1 output).
Consider the following di↵erential equation

y (n) (t) + an 1y
(n 1)
(t) + ... + a1 ẏ(t) + a0 y(t) = bu(t) (1.41)

which is a linear equation of order n, where the coefficients ai are constant.


Main idea: Define a state vector x(t) that contains y(t) and the derivatives of
y(t), and whose dimension is the same as the order of the above system, ie n.
This gives 2 3 2 3
x1 (t) y(t)
6 x2 (t) 7 6 ẏ(t) 7
6 7 6 7
6 x3 (t) 7 6 7
x(t) = 6 7 := 6 ÿ(t) 7 (1.42)
6 .. 7 6 .. 7
4 . 5 4 . 5
xn (t) y (n 1)
(t)
Since a state-space representation relates ẋ(t) to x(t), we first compute the

18
1.5. BRIDGES

derivative of x(t), and obtain


2 3 2 3
ẏ(t) x2 (t)
6 ÿ(t) 7 6 x3 (t) 7
6 7 6 7
ẋ(t) = 6 .. 7=6 .. 7 (1.43)
4 . 5 4 . 5
y (n) (t) y (n) (t) = ẋn (t)

Then, by isolating the highest-order derivative (1.41), i.e. by computing

y (n) (t) = a0 y(t) a1 ẏ(t) ... an 1y


(n 1)
(t) + b.u(t) (1.44)

we get the set of first-order di↵erential equations, put in component form


8
>
>ẋ1 (t) = x2 (t)
>
>
<ẋ2 (t) = x3 (t)
.. (1.45)
>
> .
>
>
:
ẋn (t) = a0 x1 (t) a1 x2 (t) ... an 1 xn (t) + b.u(t)

which can then be put under a vectorial/matrix form


2 3 2 32 3
ẋ1 (t) 0 1 0 0 ... 0 2 3
x1 (t)
6 ẋ2 (t) 7 6 0 76 7 0
6 7 6 0 1 0 ... 0 76 x2 (t)
7 6 07
6 ẋ3 (t) 7 6 0 0 0 1 ... 0 76 7 6 7
x3 (t)
6 7 6 76 7 6 .. 7
6 .. 7 = 6 .. .. .. .. .. .. 76 7 + 6 . 7 u(t)
..
6 . 7 6 . . . . . . 76 7 6 7
.
6 7 6 76 7 4 05
4ẋn 1 (t)5 4 0 0 0 0 ... 1 5 4xn 1 (t)5
b
ẋn (t) a0 a1 a2 a3 ... an 1 xn (t)
(1.46)
so that we have the following A and B matrices
2 3
0 1 0 0 ... 0 2 3
6 0 7 0
6 0 1 0 ... 0 7 607
6 0 0 0 1 ... 0 7 6 7
6 7 6.7
A=6 . .. .. .. .. .. 7 and B = 6 .. 7 (1.47)
6 .. . . . . . 7 6 7
6 7 405
4 0 0 0 0 ... 1 5
b
a0 a1 a2 a3 ... an 1

As for the output equation, note that the definition of the state (1.42) also
implies that
y(t) = x1 (t) (1.48)
which simply translates in having the matrix C written as
⇥ ⇤
C = 1 0 ... 0 (1.49)

while we obviously have D = 0.2


2 The above form of a state-space representation, with matrices A and B having this special

structure shown in (1.47), in particular for matrix A, with a diagonal of ones and all the ai
coefficients on the last line of the matrix, is often referred to as Controllability Canonical
Form.

19
1.5. BRIDGES

Example: Mass-Spring-Damper system


Consider the following mass-spring-damper system

mÿ(t) + dẏ(t) + ky(t) = u(t) (1.50)

We would like to find a state-space representation for this system.

Start by defining the state as


   
x1 (t) y(t) ẏ(t) ẋ (t)
x(t) = := ) ẋ(t) = = 1 (1.51)
x2 (t) ẏ(t) ÿ(t) ẋ2 (t)
and isolate the highest-order derivative
d k 1
ÿ(t) = ẏ(t) y(t) + u(t) , (1.52)
m m m
which, using definition (1.51), gives

ẋ1 (t) = x2 (t) (1.53)

and
d k 1
ẋ2 (t) = x2 (t) x1 (t) + u(t) , (1.54)
m m m
so that we have the state-space representation
 " # " #
ẋ1 (t) 0 1 x (t) 0
1
= k d + 1 u(t) (1.55)
ẋ2 (t) x2 (t)
m m m

⇥ ⇤ x1 (t)
y= 1 0 (1.56)
x2 (t)

Important remark: At this point, it is important to insist on the fact that


the definition of the state is something which is decided upon.
Hence one can have many di↵erent state-space representations corresponding to
a single system, as there are many possible ways to define the state. Let us see
that in the next example.

Example: Second-order system


Consider the system described below

ÿ(t) + a1 ẏ(t) + a0 y(t) = bu(t) (1.57)

and let this time the state vector be defined by


✓ ◆
1 d 1 1
x1 (t) := y(t), x2 (t) := y(t) = ẏ(t) (1.58)
b dt b b
Hence, using (1.58) we obtain the derivative of the state
1
ẋ1 (t) = x2 (t), ẋ2 (t) = ÿ(t) (1.59)
b

20
1.5. BRIDGES

and putting (1.59) into (1.57), we get


1 a1 a0
ÿ(t) = ẏ(t) y(t) + u(t) (1.60)
b b b
so that replacing with our state definition, we get
ẋ2 (t) = a1 x2 (t) a0 x1 (t) + u(t). (1.61)
We then have the following state-space representation:
   
ẋ1 (t) 0 1 x1 (t) 0
= + u(t) (1.62)
ẋ2 (t) a0 a1 x2 (t) 1

⇥ ⇤ x1 (t)
y(t) = b 0
x2 (t)
which is di↵erent from a state-space representation obtained by our usual defi-
nition of the state, ie we would have
   
ẋ1 (t) 0 1 x1 (t) 0
= + u(t) (1.63)
ẋ2 (t) a0 a1 x2 (t) b

⇥ ⇤ x1 (t)
y(t) = 1 0
x2 (t)
Thus, we can see that two di↵erent state-space representations can be obtained
starting with the same dynamical system.

Derivatives of the input


State-space representations can also be obtained for linear equations containing
derivatives of the input signal, ie starting with
y (n) (t) + an 1y
(n 1)
(t) + ... + a1 ẏ(t) + a0 y(t)
(n 1) (n 2)
= bn 1u (t) + bn 2u (t) + · · · + b1 u̇(t) + b0 u(t), (1.64)
a corresponding state-space representation reads
2 3 2 3 2 3
ẋ1 (t) 0 1 0 0 ... 0 0
6 ẋ2 (t) 7 6 0 0 1 0 ... 0 7 6 07
6 7 6 7 6 7
6 ẋ3 (t) 7 6 0 0 0 1 ... 0 7 6 07
6 7 6 7 6 7
6 .. 7 = 6 .. .. .. .. . .. .. 7 x(t) + 6 .. 7 u(t) (1.65)
6 . 7 6 . . . . . 7 6.7
6 7 6 7 6 7
4ẋn 1 (t)5 4 0 0 0 0 ... 1 5 4 05
ẋn (t) a0 a1 a2 a3 ... an 1 1
and ⇥ ⇤
y(t) = b0 b1 b2 ··· bn 1 x(t) (1.66)
for the output equation. Note that, if this state-space representation is very
similar to the one we obtained without derivatives in the input, the defini-
tion of the state is generally a bit more involved than the simple x(t) :=
[y(t), ẏ(t), · · · , y (n 1) (t)]T .
However, seeing how the above state-space representation is obtained is not
so complicated if one uses a simple trick. Let us see that on a second-order
example.

21
1.5. BRIDGES

Example: Second-order system with input derivative


Start with
ÿ(t) + a1 ẏ(t) + a0 y(t) = b0 u(t) + b1 u̇(t). (1.67)
In order to find the state-space representation of (1.67), let us first consider a
modified version of (1.67), but without the input derivatives, ie we have

ÿm (t) + a1 ẏm (t) + a0 ym (t) = u(t) (1.68)

which also implies that


...
y m (t) + a1 ÿm (t) + a0 ẏm (t) = u̇(t). (1.69)

A state-space representation can be found similarly as we have done at the


beginning of this section so that we have
   
ẋ1 (t) 0 1 x1 (t) 0
= + u(t) (1.70)
ẋ2 (t) a0 a1 x2 (t) 1

with
ym (t) = x1 (t) and ẏm (t) = ẋ1 (t) = x2 (t). (1.71)
Then, let the actual output of system (1.67) be defined by

y(t) = b0 ym (t) + b1 ẏm (t). (1.72)

Then, since system (1.69) is a second-order system, di↵erentiate expression


(1.72) twice to obtain
...
ÿ(t) = b0 ÿm (t) + b1 y m (t). (1.73)
The above expression, using (1.68) and (1.69) can be rewritten and progressively
re-arranged so that we finally get

ÿ = b0 ( a1 ÿm (t) a0 ẏm (t) + u̇(t)) + b1 ( a1 ÿm (t) a0 ẏm (t) + u̇(t))
= a1 (b0 ẏm (t) + b1 ÿm (t)) a0 (b0 ym (t) + b1 ẏm (t)) + b0 u(t) + b1 u̇(t)
= a1 ẏ(t) a0 y(t) + b0 u(t) + b1 u̇(t)

Hence, system (1.67) corresponds to state-space representation (1.70) with out-


put equation (using (1.72))

⇥ ⇤ x1 (t)
y(t) = b0 x1 (t) + b1 x2 (t) = b0 b1 (1.74)
x2 (t)

Discrete-time systems
The reasoning is almost the same for discrete-time systems. Indeed, in this case,
consider instead the di↵erence equation of order n

y(t + n) + an 1 y(t +n 1) + ... + a1 y(t + 1) + a0 y(t) = bu(t) (1.75)

22
1.5. BRIDGES

Define then the state vector as


2 3
y(t)
6 y(t + 1) 7
6 7
6 y(t + 2) 7
x(t) := 6 7
6 .. 7
4 . 5
y(t + (n 1))

and calculate the state vector at time t + 1, ie


2 3 2 3
y(t + 1) x2 (t)
6 y(t + 2) 7 6 x3 (t) 7
6 7 6 7
6 7 6 7
x(t + 1) = 6 y(t + 3) 7 = 6 x4 (t) 7 (1.76)
6 .. 7 6 .. 7
4 . 5 4 . 5
y(t + n) a0 x1 (t) a1 x2 (t)... an 1 xn (t)

so that we have
2 3
0 1 0 0 ... 0 2 3
6 7 0
6 0 0 1 0 ... 0 7 607
6 0 0 0 1 ... 0 7 6 7
6 7 6.7
x(t + 1) = 6 .. .. .. .. .. .. 7 x(t) + 6 .. 7 u(t) (1.77)
6 . . . . . . 7 6 7
6 7 405
4 0 0 0 0 ... 1 5
b
a0 a1 a2 a3 ... an 1

with the output equation


⇥ ⇤
y= 1 0 ... 0 x(t) (1.78)

Example: The Fibonacci Sequence


Let us go back to the Fibonacci sequence described by

y(t + 2) = y(t + 1) + y(t) (1.79)

with the 2 inital conditions

y(1) = 1, y(0) = 0

To find a state-space representation, start with the definition of a state vector


   
x (t) y(t) y(t + 1) x2 (t)
x(t) = 1 := ) x(t + 1) = = (1.80)
x2 (t) y(t + 1) y(t + 2) x1 (t) + x2 (t)

which gives  
x1 (t + 1) 0 1
x(t + 1) = = x(t) (1.81)
x2 (t + 1) 1 1
  
⇥ ⇤ x1 (t) y(0) 0
y(t) = 1 0 , x(0) = = (1.82)
x2 (t) y(1) 1

23
1.5. BRIDGES

Nonlinear Systems
Generally, not all nonlinear ODEs can be converted to state-space representa-
tions, and this is a topic of current research.
For example, the nonlinear system

ÿ(t) = y(t)u̇2 (t) (1.83)

cannot be transformed into a state-space representation. This system is then


said to be nonrealizable.

However, in many cases, it is possible to obtain a state-space representation


of a nonlinear system by using the same reasoning as for linear systems. Let us
show this through the following example.

Example: state-space representation for the Pendulum/Robot elbow


Take again the pendulum equation
¨ + mgl sin ✓(t) = u(t),
ml2 ✓(t) y(t) = ✓(t) (1.84)

Isolating the highest-order equation

¨ = g 1
✓(t) sin ✓(t) + u(t), y(t) = ✓(t) (1.85)
l ml2
and defining the state vector as
 
x1 (t) ✓(t)
x(t) = := ˙ (1.86)
x2 (t) ✓(t)

we obtain the following state-space representation


" #
x2 (t)
ẋ(t) = f (x(t), u(t)) where f (x(t), u(t)) = g 1 (1.87)
sin x1 (t) + u(t)
l ml2

1.5.3 From nonlinear systems to their linear approxima-


tion
As we will see, quite a few techniques used in autonomous systems (the Kalman
Filter, PID, LQR, MPC) were initially defined in a linear setting, with good
reason: linear systems are usually easier to tackle than nonlinear ones.
Interestingly, applying linear techniques to systems which are nonlinear is quite
often possible. The basic idea consists in choosing a point of interest where one
wishes to consider the nonlinear system and compute a linear approximation
around this point of interest.

24
1.5. BRIDGES

Equilibrium Points
In order to make the notion of “point of interest” a bit more precise, we will
use the concept of equilibrium point. Let us start by giving a definition of an
equilibrium point in the state-space context.

Definition: An equilibrium point or equilibrium, noted x⇤ , is a point in the


state-space, for which, if the state x(t) reaches x⇤ , it will stay there forever (in
a state of equilibrium).

From the above definition, note, importantly, that while it is possible that
the origin of the state-space is an equilibrium, it does not have to be so (see
for example the illustration in figure 1.19 below). Second, and as we will see on
an example, the definition implies that there can be several points, not just one.

Figure 1.19: Trajectory and equilibrium point for a two-dimensional discrete-


time system

It now remains to be able to determine/compute equilibrium point(s) for


a given system. As it turns out, the above definition also helps us with that.
Indeed, for continuous-time systems, an important implication of the definition
can be written as
d ⇤
x =0 (1.88)
dt
which, if the considered system is described by ẋ = f (x), gives

0 = f (x⇤ ) (1.89)

Hence, a mathematical way to obtain the set of equilibrium points of a continuous-


time system described by the nonlinear state-space representation ẋ = f (x) con-
sists in finding all the solutions x⇤ of equation (1.89).

Let us see that through the following example.

Example: Equilibrium points for the pendulum


Recall that we have " #
x2 (t)
ẋ(t) = g (1.90)
sin x1 (t)
l

25
1.5. BRIDGES

A first simple way to find the equilibrium points of this system is through using
a simple physical reasoning. The system is in equilibrium means that it does not
move anymore :-). Hence we have that the second component of x⇤ , ie angular
velocity x⇤2 is zero. This corresponds to 2 equilibrium positions (modulo 2⇡),
pendulum up and pendulum down. Thus we can easily conjecture 2 equilibrium
points:  ⇤   ⇤ 
⇤ x1 0 ⇤ x1 ⇡
x = ⇤ = and x = ⇤ = (1.91)
x2 0 x2 0
Let us now confirm that mathematically. Indeed, having equation (1.89) means
that we need to solve " # 
x⇤2 0
g = (1.92)
sin x⇤1 0
l
which indeed leads exactly to the 2 equilibrium points obtained in (1.91).

At this point, it is worth mentioning that the dynamic behavior around (but
not on) each equilibrium point can be very di↵erent whether the pendulum is up
or down. This is indeed the case and we will discuss that when we look at stabil-
ity considerations. For now, let us continue our discussion on equilibrium points.

For discrete-time systems like x(t + 1) = f (x(t)), the concept of derivative


with respect to the time-variable does not apply. However, saying that x⇤ “will
stay there forever” can easily be translated mathematically by the expression

x⇤ = f (x⇤ ) (1.93)

which we need to solve in order to find the set of equilibrium points.

The systems we have considered now did not have any input signal... Let us
first see what happens when a torque input is added to our pendulum example.

Example: Pendulum with control input


Consider now our pendulum with a torque applied to it. The state-space model
is now " #
x2 (t)
ẋ(t) = g 1 (1.94)
sin x1 (t) + u(t)
l ml2
where the control input signal u(t) is the torque applied to the pendulum. Let
us now start with a basic consideration given by the physics of the system. Since
a specific constant torque can maintain the pendulum in a particular fixed an-
gle/position, then the input signal plays an important role in the definition of
equilibrium points.
Let us see that mathematically. Setting the vector field to zero leads to expres-
sion " # 
x⇤2 0
g 1 ⇤ = (1.95)
sin x⇤1 + u 0
l ml2
where u⇤ stands for the control input associated to the equilibrium x⇤ , ie the
value of the control input for which we have an equilibrium. While the first line

26
1.5. BRIDGES

of (1.95) means that we have x⇤2 = 0, rewriting the second line of this expression
gives
g 1 ⇤
0= sin x⇤1 + u (1.96)
l ml2
where we see that we can choose any value of x⇤1 as long as we find the corre-
sponding u⇤ !
For example, assume that we would like to maintain the pendulum on position
x⇤1 = ⇡/4. Then we have the associated control input

u⇤ = mgl sin (1.97)
4
Finally, for system (1.94), we have the set of equilibrium points given by
 ⇤
x
x⇤ = 1 (1.98)
0

and its associated control input

u⇤ = mgl sin x⇤1 (1.99)

Hence, for systems with a control input, the set of equilibrium points have
to be considered in conjunction with their associated control input vector u⇤ ,
ie in continuous-time and for systems of the form ẋ = f (x, u), we need to find
the solutions x⇤ , u⇤ of the algebraic equation

0 = f (x⇤ , u⇤ ) , (1.100)

while for a discrete-time system with input vector x(t + 1) = f (x(t), u(t)), we
need to solve
x⇤ = f (x⇤ , u⇤ ) . (1.101)
In the simpler case where the considered state-space representation is linear, ie
as exemplified by the continuous-time case ẋ = Ax + Bu, we simply have the
linear algebraic equation
0 = Ax⇤ + Bu⇤ . (1.102)
Let us use our now infamous Mass-Spring-Damper example to illustrate this
last point.

Example: Equilibrium points for the Mass-Spring-Damper system


Recalling the state-space representation of an MSD system given by (1.55), we
have the equilibrium relation
 " # " #
0 0 1  x⇤ 0
= k d 1
⇤ + 1 u⇤ (1.103)
0 x2
m m m
which, after a very simple calculation, gives
 
0 x⇤2
= (1.104)
0 kx⇤1 + u⇤

27
1.5. BRIDGES

which means that there is an infinity of equilibrium points corresponding to


all positions of the mass with zero velocity, ie x⇤T = [x⇤1 , 0]T , as long as the
associated control input is u⇤ = kx⇤1 . A physical interpretation of this result,
remembering that u is the force applied to the mass, is that, in order to maintain
the mass at a specific position x⇤1 , we need to apply to the mass a force related
to how strong the spring with sti↵ness coefficient k is.

Linear approximation of a nonlinear system


Similarly to a smooth curve being approximated by a straight line in a neigh-
borhood around a point, a nonlinear system can be locally and approximately
described by a linear system around an equilibrium point x⇤ .
Let us see how such a linear approximation can be obtained, first on a system
without input. Hence, starting with the nonlinear system dynamics
d
x(t) = f (x(t)) (1.105)
dt
we would like to find the linear dynamics corresponding to small deviations
around an equilibrium point, ie we define
x(t) := x(t) x⇤ (1.106)
which makes it possible to rewrite nonlinear system (1.105) as
d ⇤
(x + x(t)) = f (x⇤ + x(t)) (1.107)
dt
Let us now recall a basic mathematical result on the use of Taylor series.

First-order approximation using Taylor series:


Around x⇤ , an approximation of function f can be written as
@f
f (x⇤ + x(t)) ⇡ f (x⇤ ) + (x) . x(t) (1.108)
@x x=x⇤

where, if we have the vector field given by


2 3
f1 (x1 , x2 , ..., xn )
6 f2 (x1 , x2 , ..., xn ) 7
6 7
f (x) = 6 .. 7, (1.109)
4 . 5
fn (x1 , x2 , ..., xn )
@f
the expression @x is the so-called Jacobian matrix written as
2 3
@f1 @f1 @f1
6 @x1 (x) @x2 (x) . . . @xn (x)7
6 7
6 @f @f2 @f2 7
@f 6 2
(x) (x) . . . (x)7
6 7
(x) = 6 @x1 @x2 @xn 7 (1.110)
@x 6 . .. .. 7
6 .. . ... . 7
6 7
4 @fn @fn @fn 5
(x) (x) . . . (x)
@x1 @x2 @xn

28
1.5. BRIDGES

Combine now (1.107) and (1.108) to get

d ⇤ @f
(x + x(t)) ⇡ f (x⇤ ) + (x) . x(t) (1.111)
dt @x x=x⇤

d ⇤
Then, since x⇤ is an equilibrium point, we have dt x = 0 and f (x⇤ ) = 0, which
finally gives us the dynamics

d @f
( x(t)) = (x) x(t) (1.112)
dt @x x=x⇤

Note that the above system is linear, ie we have the form



@f
ẋ(t) = A x, with A = (x) . (1.113)
@x x=x⇤

Example: Linearized pendulum


We would like to have the linear approximation of the pendulum system around
both equilibrium points x⇤ = [0, 0]T and x⇤ = [⇡, 0]T . Recall that
" # " #
x2 x2
ẋ = g ) f (x) = g (1.114)
sin x1 sin x1
l l
which gives the Jacobian
" #
@f 0 1
(x) = g (1.115)
@x cos x1 0
l
Evaluating this Jacobian on the two equilibrium points gives
" #
@f 0 1
(x) = g (1.116)
@x x=x⇤ =[0,0]T
0
l
for x⇤ = [0, 0]T and " #
@f 0 1
(x) = g (1.117)
@x x=x⇤ =[⇡,0]T
0
l
for x⇤ = [⇡, 0]T . Hence, for both equilibrium points, we have the linear dynamics
of the small variations
ẋ = A x (1.118)
but with a di↵erent matrix A! Indeed, for equilibrium x⇤ = [0, 0]T we have
" #
0 1
A= g (1.119)
0
l

29
1.5. BRIDGES

while for x⇤ = [⇡, 0]T we have


" #
0 1
A= g (1.120)
0
l

The previous reasoning can easily be extended to systems with inputs rep-
resented by
ẋ(t) = f (x(t), u(t)) (1.121)
In this case, we want to obtain a linear approximation of the system around x⇤
and its associated input u⇤ . Hence we write
d ⇤
(x + x(t)) = f (x⇤ + x(t), u⇤ + u(t)) (1.122)
dt
so that the first-order approximation of f (x, u) is now

f (x⇤ + x(t), u⇤ + u(t))


" #
⇤ ⇤ @f
⇡ f (x , u )+ (x, u) . x(t)
@x x=x⇤ ,u=u⇤
" #
@f
+ (x, u) . u(t) (1.123)
@u x=x⇤ ,u=u⇤

where u(t) := u(t) u⇤ . From there, and similarly to what we have done for
systems without inputs, we end up with the following linear approximation
" # " #
d @f @f
x(t) = (x, u) x(t) + (x, u) u(t) (1.124)
dt @x x=x⇤ ,u=u⇤ @u x=x⇤ ,u=u⇤

that is we have the following state-space representation

ẋ = A x + B u (1.125)

with
" # " #
@f @f
A= (x, u) and B= (x, u) (1.126)
@x x=x⇤ ,u=u⇤ @u x=x⇤ ,u=u⇤

Example: Linearization of the robot “elbow”


We want to linearize again our controlled pendulum, but this time around the
equilibrium points
 
⇡/2 ⇡/4
x⇤ = and x⇤ = (1.127)
0 0

Recalling that the controlled pendulum equations read


" #
x2 (t)
ẋ(t) = g 1 (1.128)
sin x1 (t) + u(t)
l ml2

30
1.5. BRIDGES

it means that we have the two Jacobians


" # " #
@f 0 1 @f 0
(x, u) = g and (x, u) = 1 (1.129)
@x cos x1 0 @u
l ml2
Hence, for the first equilibrium point, we have
 
⇡/2 @f 0 1
x⇤ = ) (x) = (1.130)
0 @x ⇤
x=x ,u=u ⇤ 0 0

so that the local dynamics around x⇤ are


 " #
0 1 0
ẋ = x+ 1 u (1.131)
0 0
ml2
For the second equilibrium point, we have this time
2 3

⇡/4 @f p0 1
x⇤ = ) (x) =4 2g 5 (1.132)
0 @x x=x⇤ ,u=u⇤ 0
2 l
which gives the local linear dynamics
2 3 " #
p0 1 0
ẋ = 4 2g 5 x+ 1 u (1.133)
0 2
2 l ml

31

You might also like