Professional Documents
Culture Documents
Summary: This document follows the lectures on feedback linearization tought at the
University of Zagreb, Faculty of Electrical Engineering and Computing.
1 Motivation
The dynamic equation that describes the water level h(t) in a tank with an opening at the bottom
(cross section is a) is shown with (1). The assumption is that the tank has the same cross section
A throughout the whole height. Input water flow is denoted with q(t).
1 ap
h (t) = q (t) 2gh(t) (1)
A A
The aim is not to linearize the system, which would give approximate dynamics around the
operating point, but we want to design a controller such that it linearizes the system completely, in
the whole operating region. We can resolve this by introducing a new control input v such that
p
q(t) = a 2gh(t) + Av(t).
Since the system is completely linear, one can design a controller so that the system is guided to
the desired value, e.g. by choosing v(t) = K [hdes (t) h (t)] the control closed loop differential
equation becomes
or h (t) hdes (t) as t . The following part of this lecture will describe how to formalize the
described approach, what to do with unstable dynamics, etc.
1
2 Introduction
In this part a short description of Lie algebra on vector fields is described, together with an idea of
relative degree in nonlinear systems.
x = f (x)
y = h(x)
then the derivatives of the output can be represented using the Lie derivatives:
h
y = x
x = Lf h
[Lf h]
y = x
x = Lf 2 h
.
Definition 3 (Lie brackets). Let f and g be two vector fields on Rn . The Lie bracket of f and g is
a third vector defined by
[f, g] = g f f g
.
The Lie bracket [f, g] is commonly written as adf g where ad stands for adjoint. Repeated
Lie brackets can be defined recursively by
adf o g = g
.
adf i g = [f, adf i1 g] f or i = 1, 2, ....
bilinearity
[1 f1 + 2 f2 , g] = 1 [f1 , g] + 2 [f2 , g]
[f, 1 g1 + 2 g2 ] = 1 [f, g1 ] + 2 [f, g2 ]
skew comutativity
[f, g] = [g, f ]
2
Jacobi identity
Ladf g h = Lf Lg h Lg Lf h.
Example 4 (Lie brackets). Let x = f (x) + g(x)u with two vector fields f and g defined by
2x1 + ax2 + sin x1 0
f= g(x) =
x2 cos x1 cos(2x1 )
The Lie bracket can be computed as
0 0 2x1 + ax2 + sin(x1 ) 2 + cos x1 a 0
[f, g] =
2 sin(x1 ) 0 x2 cos x1 x2 sin x1 cos x1 cos(2x1 )
.
a cos(2x1 )
=
cos x1 cos(2x1 ) 2 sin(2x1 )(2x1 + ax2 + sin x1 )
Lets assume that the r th derivation of the output sees the input signal u. Then the value r is
called the relative degree of the system.
3
Definition 5 (Relative degree). The nonlinear system
x = f (x) + g(x)u
y = h(x)
In other words, we should differentiate the output until the input appears in the equation. The
derivative to which we have come is the degree of the system.
Note: Relative degree is defined only if there exists an output from the system. It
also depends on the chosen output equation. In linear systems the relative degree is
the pole excess of the system, i.e. the difference between the number of poles and the
number of finite zeros of the transfer function of the systems. If the relative degree of
the linear system is less then n, that means that there exist finite zeros (which may be
unstable). Since transfer functions do not exist in nonlinear systems, the fact that the
relative degree of the nonlinear system is smaller then the order of the system, means
that there are some internal dynamics which cannot be seen from the output.
Example 6 (Relative degree of the Van der Pool oscillator). Calculate the relative degree of the
van der Pool oscillator given with
x2 0
x = f (x) + g(x)u = 2 2 + u
2 (1 x1 ) x2 x1 1
y = h (x) = x1
h x2 x2
Lg L1f h = Lg x f = Lg 1 0 = Lg x2 = g =
2 (1 x21 ) x2 2 x1 x
0
= 0 1 =1
1
This one depends on the input so the relative degree is r = 2 (we had to make 2 calculations, i.e.
we had to differentiate the output twice to get to the input signal).
4
If the output were defined as:
y = h (x) = sin (x2 ) ,
then the following calculations would take place
h
h h
0
Lg L0f h = Lg h = g = x1 x2
x
1
0
= 0 cos (x1 ) = cos (x1 )
1
so the relative degree is 1 at all points apart from x = 2 (2k + 1). At these points, relative degree is
not defined. From this example it is obvious that the relative degree depends on the chosen output,
just as the number of zeros in the linear system depend on the chosen output.
3 Input/Output Linearization
We have shown before that the nonlinear system (2) can be transformed to a form
y = L0f h
y = L1f h
y = L2f h
..
.
y (r) = Lrf h + Lg Lr1
f h u.
If we introduce (x) = Lrf h and (x) = Lg Lr1 f h then y
(r)
= (x) + (x) u. Since the
input signal can be whatever we want it to be, lets choose it in such a way that the nonlinearities
in the system are compensated for, i.e. y (r) = (x) + (x) u v from where it follows that
v = (x) + (x) u
1
u = (x) [ (x) + v]
5
So the system can be represented in a state space form as
z1 0 1 0 z1 0
z2 . . . 0 z2
0
.. = 0 0
. + .. v
. 0 0 1 .. .
zr 0 0 0 zr 1
z1
z2
y = 1 0 0 ..
.
zr
which is in fact a cascade of r integrators. Now we can design any type of controller for the r
integrator linear system. The most appropriate one would be a state controller. What was the
transformation between the two state spaces, x and z?
0
1 (x) Lf h
2 (x) L1 h
f
z = (x) = .. = ..
. .
r1
r (x) Lf h
(x) = Lrf h
(x) = Lg Lr1
f h
1
u= [ (x) + v]
(x)
6
Example 7 (r = n). x
0 e2
2
x = x1 + x2 + ex2 u
x1 x2 0
y = h(x) = x3
Find the relative degree
h
Lg L0f h = Lg h = x
g =
ex2
h h h ex2 = 0
= x1 x2 x3
0
0
Lg L1f h = Lg hx
f = Lg 0 0 1 x1 + x22 =
x1 x2 x
ex
2
= Lg [x1 x2 ] = 1 1 0 g = 1 1 0 e 2 = 0
0
0
2
Lg L2f h = Lg Lf hx
f = L L
g f [x 1 x2 ] = L g 1 1 0 x1 + x2 =
x x1 x2
e 2
x
e2
(x) = Lg L2f h = Lg x1 x22 = 1 2x2 0 ex2 = (1 + 2x2 ) ex2
0
7
1 2x2 (x1 + x22 ) 1
u= [ (x) + v] = x
v
(x) (1 + 2x2 ) e 2 (1 + 2x2 ) ex2
By introducing this control, we have obtained a system with the following dynamics
z1 0 1 0 z1 0
z2 = 0 0 1 z2 + 0 v
z3 0 0 0 z3 1
z1
y = 1 0 0 z2
z3
Lets take a look at an example where relative degree is smaller than the order of the system
(rn).
Relative degree is 1. That means that we have 1 state transformation. Notice that we have a
second order system!!
1
u= [ (x) + v]
(x)
Now the system of nonlinear equations is transformed to
z1 = v
x 2 = 3x2 + u = 3x2 2x21 x2 3x2 v = 2x21 x2 v
Lets observe the zero dynamics. This is done so that the output is kept 0 and the behavior of
the system is observed. If the output is zero y = 2x1 x2 = 0 x2 = 2x1 which means that
z1 = v
x 2 = 2x32 v
what is a stable system. This means that the zero dynamics are stable.
Lets take a look at another example where the zero dynamics are not stable.
Example 9 (r < n, unstable zero dynamics).
x 1 = x2 + x31 + u
x 2 = u
y = h(x) = x1
Relative degree is 1. That means that we have 1 state transformation. Notice that we have a second
order system!!
Make the r state stransformations
z1 = 1 (x) = L0f h = h = x1
The second state stays the same. Define the new input so that the states are linearized.
1 h x2 + x31
(x) = Lf h = f= 1 0 = x2 + x31
x 0
9
(x) = Lg L0f h = Lg h = 1
1
u= [ (x) + v] = x2 x31 + v
(x)
Now the system of nonlinear equations is transformed as
z1 = v
x 2 = x2 + x31 v
Not only is it not linearized, but lets say that we want to design a proportional controller so
that the output goes to 0, i.e. v = Kp (y ydes ) = Kp y The closed loop system is then
z1 = v = Kp z1
x 2 = x2 + z13 + Kp z1
If y has to go to 0, that means that z1 has to go to zero. If that one goes to zero, that means that
x2 is governed by x 2 = x2 which is unstable!!!!!
Obviously we have some internal dynamics which are unstable. The reason why we didnt
notice these internal dynamics is the fact that the relative degree is smaller than the degree of the
nonlinear system. There is something else, some other states that we forgot about - n r states.
The internal dynamics might not be unstable, maybe it would be enough for us to linearize the r
states of the system (which are based on the output) and the rest would have been stable. But we
cannot be sure. Bare in mind that we performed only the transformation to the r states.
The question is: can we derive such a transformation so that the relative degree of the system
is n? This way we could include all of the dynamics in the design procedure. What should this
transformation look like? What are the constraints? Is this transformation even possible? What if
the relative degree of the system is not equal to the degree of the nonlinear system, i.e. rn? This
means that we have the following situation
z1 L0f h (x)
.. ..
.
r1.
zr (x) Lf h (x)
= =
r+1 (x) r+1 (x)
. ..
.. .
n n (x)
4 Input/State Linearization
Lets rephrase the problem. If a nonlinear system is given with
x = f (x) + g(x)u
Find a transformation = (x) so that the system in the new coordinates can be linearized and
so that it is controllable. can be linearized. This will be possible if we find an output y = (x)
such that the system has relative degree n at some x0 . How to find a suitable (x)? Just as in the
case when the output was available, this function has to satisfy the following properties:
10
Lg (x) = Lg Lf (x) = ... = Lg Ln2
f (x) = 0 (all the terms next to the input u have to
disappear)
Lg Ln1
f (x0 ) 6= 0
.
It can be shown by the use of the Jacobi identity that these conditions can be rewritten as
(x) adn1
f g 6= 0
or
(x) g adf g adn2
f g =0
(x) adn1
f g 6= 0.
These equations are much more appropriate since the unknown function (x) has been sepa-
rated from the rest of the calculations.
If we manage to find this function, the state transformation will follow as
1 1 (x) L0f (x)
.. .. ..
. = (x) = . = .
n1
n n (x) Lf (x)
How do we know that there even exists a transformation such that the relative degree is n? It is
the same as asking: how do we know that the previously stated partial differential equations have
a solution? The Frobenius theorem tells us if the solution exists.
Theorem 10 (Frobenius). The nonlinear system with f (x) and g(x) being smooth vector fields, is
input-state linearized if and only if there exists a region such that the following conditions hold:
Note: The first condition can be interpreted as controllability condition for the nonlin-
ear system. The involutivity condition is less intuitive. It is trivially satisfied for linear
systems, but not generally satisfied in the nonlinear case.
11
Definition 11 (Involutivity). A linear independent set of vectors [f1 , ..., fm ] is involutive if
m
X
[fi , fj ] = ijk (x) fk (x),
k=1
i.e. if you take Lie brackets you dont generate new vectors.
The input-state linearization can be performed through the following steps:
1. Construct the vector fields g, adf g, ..., adn1
f g for the given system.
2. Check whether the controllability and involutivity conditions are satisfied.
3. If both are satisfied, find the output function (x) (the output function which will lead to
the input-output linearization of the relative degree n) by using
(x) g adf g adn2 f g =0
(x) adn1
f g 6= 0
Example 12. Consider a mechanism given by the dynamics which represents a single link flexible
joint robot. Its equations of motion is derived as
12
g
adf g = [f,g] = f
x
f
x
g=
0 1 0 0 0 0
M gL cos x1 k 0 k 0 0
0
= I I I = 1
0 0 0 1 0
J
k 1
J
0 Jk 0 J
0
ad g
ad2f g = [f,adf g] = xf f fx
adf g =
0 1 0 0 0 0
M gL cos x1 k 0 k 0 0
k
= I I I = JI
0 0 0 1 J1 0
k
J
0 Jk 0 0 Jk2
2
ad g
ad3f g = f,ad2f g = xf f f x
ad2f g =
k
0 1 0 0 0 JI
M gL cos x1 k 0 k k
0 JI
0
= I I I = k
0 0 0 1 0 2
J
k
J
0 Jk 0 Jk2 0
k
0 0 0 IJ
0 0 k
0
[g adf g ad2 f g ad3 f g] =
0 1
IJ
k
J
0 J2
1 k
J
0 J2 0
It has rank 4. Furthermore, since the above vector fields are constant, they form an involutive
set. Therefore the system is input-state linearizable.
Let us find the state-transformation z = (x) and the input transformation u = (x)+(x)v
so that input-state linearization is achieved.
(x) g = x1 x2 x3 x4 g=0 =0
x4
0
1 = 0 = 0
0
(x) adf g = x1 x2 x3 x4
J x3
0
0
k
IJ = 0 = 0
(x) ad2f g =
x1
x2
x3
x4 0 x2
Jk2
k
IJ
k 6= 0 6= 0
0
(x) ad3f g =
x1
x2
x3
x4 2
J x1
0
13
It is obvious that lambda should be a function of x1 only. Therefore, we choose a function
which is a diffeomorphism, e.g. (x) = x1 .
The other states are obtained from the following calculations:
z2 = Lf = z1 f = x2
z3 = L2f = z2 f = MIgL sin x1 kI (x1 x3 )
z4 = L3f = z3 f = MIgL x2 cos x1 kI (x2 x4 )
(x) = Lf 4 (x) = Lf z4 =
x2
M gL M gL k k
M gL sin x1 k (x1 x3 )
= I
x 2 sin x1 I
cos x1 I
0 I
I I =
x4
k
J
(x1 x3 )
M gL 2 M gL k
M gL k
k2
= I
x2 sin x1 I
cos x 1 I I
sin x1 + I
(x1 x3 ) + IJ (x1 x3 )
0
0
(x) = Lg Lf 3 (x) = Lg z4 = M gL
I
x2 sin x1 M gL
I
cos x1 k
I
0 k
I
=
0
k
IJ
1
J
with
1
u= (v )
We end up with the following set of linear equations
z1 = z2
z2 = z3
z3 = z4
z4 =v
Example 13.
x3 (1 + x2 ) 0
x = x1 + 1 + x2 u
x2 (1 + x1 ) x3
First to see if it is possible to find a function so that the system can be input/state linearized.
We have to find [g adf g ad2 f g].
14
g
adf g =
x
f f
x
g =
0 0 0 x3 (1 + x2 ) 0 x3 1 + x2 0
= 0 1 0 x1 1 0 0 1 + x2 =
0 0 1 x2 (1
+ x1 ) x2 1+ x 1 0 x3
0 0 0
= x1 0 = x1
x2 (1 + x1 ) (1 + x2 ) (1 + x1 ) (1 + x1 ) (1 + 2x2 )
(adf g)
[f, adf g] = x f f
ad2f g = x
(adf g)=
0 0 0 x3 (1 + x2 )
= 1 0 0 x1
(1 + 2x2 ) 2 (1 + x1
) 0 x2 (1 + x1 )
0 x3 1 + x2 0
1 0 0 x1 =
x2 1 + x1 0 (1 + x1 ) (1
+ 2x
2)
0 x1 x3 (1 + x2 ) (1 + x1 ) (1 + 2x2 )
= x3 (1 + x2 ) 0 =
x3 (1 + x2 ) (1 + 2x2 ) 2x1 (1 + x1 ) x1 (1 + x1 )
x1 x3 + (1 + x2 ) (1 + x1 ) (1 + 2x2 )
= x3 (1 + x2 )
x3 (1 + x2 ) (1 + 2x2 ) 3x1 (1 + x1 )
Lets observe the necessary conditions around the equilibrium point x = 0.
0 0 1
g adf g ad2f g x = 1 0 0
0
0 1 0
The rank is full, so the first condition is satisfied. The second condition is involutivity.
ad g g
[g, adf g] = xf g x adf g =
0 0 0 0
= 1 0 0 1 + x2
(1 + 2x2 ) 2
(1 + x1 ) 0 x3
0 0 0 0
0 1 0 x1 =
0 0 1 (1+ x1 ) (1 + 2x2 )
0 0
= 0 x1 =
2 (1 + x1 ) (1 + x2 ) (1 + x1 ) (1 + 2x2 )
0
= x1
3 (1 + x1 ) (1 + 2x2 )
15
The matrix g adf g [g, adf g] has rank 2 which means that the vectors that for it are
linearly dependant. That means that the third column is not a new vector but a linear combination
from the first two columns. This means that the desired distribution is involutive.
The desired function (x) is then calculated from
(x) g adf g adn2 f g =0
0 0
1 + x2 x1 =0
x1 x2 x3
x3 (1 + x1 ) (1 + 2x2 )
and
(x) adfn1 g 6= 0.
This can be done with (x) = x1 which is a diffeomorphism.
16