You are on page 1of 16

Lecture : Feedback Linearization

Nikola Miskovic, dipl. ing. and Prof. Zoran Vukic


June 2009

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).

The system dynamics can now be written as



h(t) = v(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

h (t) = K [hdes (t) h (t)]


1
K
h (t) + h (t) = hdes (t)
h(s) 1
hdes (s)
= 1 s+1
K

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.

2.1 Lie Algebra


Definition 1 (Lie derivatives). Let h : Rn R be a smooth scalar function and f : Rn R be a
smooth vector field on Rn , then the Lie derivative of h with respect to f is a scalar function defined
by Lf h = h f .

The symbol is often written as x making the definition as follows: Lf h = h x
f . The Lie
derivative is interpreted as differentiation of function h in the direction of the vector f .

Example 2 (Lie derivative). If a homogenous nonlinear system is described as

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, ....

Some properties of Lie brackets:

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 )

2.2 Relative Degree


A SISO nonlinear system is given in a form (2).
x = f (x) + g(x)u
(2)
y = h(x)
If we observe the output derivatives we obtain the following:
h
y = x
x =
h
= x
[f (x)
+ g(x)u] =
h h
= f (x) + g(x) u =
|x{z } |x{z }
Lf h Lg h
= Lf h + (Lg h) u
Lets assume that the first derivative of the output is not influenced by the input signal u, i.e.
Lg h = 0 and y = Lf h. Then the next derivative of the output is
(Lf h)
y = dtd y = dtd (Lf h) = x x =
L h
= xf (f + gu) = Lf (Lf h) + Lg (Lf h) u =
= L2f h + Lg (Lf h) u
| {z }
=0

Induction leads us to the following:


y = Lf h
y = L2f h
..
. 
y (r) = Lrf h + Lg Lr1
f h u

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)

has relative degree r at the point x0 if


 
Lg Lkf h(x) = 0 for all x in the neighbourhood of x0 and all k < r 1
 
Lg Lfr1 h(x0 ) 6= 0.

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

For starters, lets differentiate the output


   
h   0   0
Lg L0f h = Lg h = g= h
x1
h
x2 = 1 0 =0
x 1 1
This one does not depend on the input!!

  
 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]

Graphically, this is what happened:


Another way of thinking is that we have defined a new state space vector, which consists of the
derivatives of the output:
z1 = y = L0f h
z2 = y = L1f h
..
.
zr = y (r1) = Lr1
f h
(r)
zr+1 = y = + u = 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

Algorithm for input/output linearization:

1. Find the relative degree r of the nonlinear system.


 
Lg Lkf h(x) = 0
 
Lg Lr1f h(x0 ) 6= 0

2. Make the r state transformations.



1 (x) L0f h

2 (x)
L1f h

z = (x) = .. = ..
. .
r (x) Lr1
f h

3. Define the new input so that the states are linearized.

(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

= Lg [x1 x22 ] = 1 2x2 0 ex2 = ex2 (1 + 2x2 )


0
Relative degree is 3 if 1 + 2x2 6= 0, it is the same as the order of the nonlinear system.
Make the r state transformations.
z1 = 1 (x) = L0f h = h = x3
 0 
z2 = 2 (x) = L1f h = 0 0 1 x1 + x22 = x1 x2
x1 x2
  0
z3 = 3 (x) = L2f h = Lf Lf h = 1 1 0 x1 + x22 = x1 x22
x1 x2

Define the new input so that the states are linearized.



    0 
(x) = L3f h = Lf L2f = Lf x1 x22 = 1 2x2 0 x1 + x22 = 2x2 x1 + x22
x1 x2

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

and now we can design whatever type of control we desire.

Lets take a look at an example where relative degree is smaller than the order of the system
(rn).

Example 8 (r < n THIS EXAMPLE IS WRONG REGARDING STABILITY - NEEDS REVI-


SION).
x 1 = x21 x2
x 2 = 3x2 + u
y = h(x) = 2x1 x2
The state-space form is then
   2   
x 1 x1 x2 0
= + u
x 2 3x2 1
y = h(x) = 2x1 x2

Find the relative degree


   
h   0   0
Lg L0f h = Lg h = g= h
x1
h
x2 = 2 1 = 1
x 1 1

Relative degree is 1. That means that we have 1 state transformation. Notice that we have a
second order system!!

Make the r state transformations.

z1 = 1 (x) = L0f h = h = 2x1 x2

The second state stays the same.

Define the new input so that the states are linearized.


h  
(x) = L1f h = f = 2 1 f = 2x21 x2 3x2
x
8

(x) = Lg L0f h = Lg h = 1

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

The state space form is then


     
x 1 x2 + x31 1
= + u
x 2 0 1
y = h(x) = x1

Find the relative degree


   
h   1   1
Lg L0f h = Lg h = g= h
x1
h
x2 = 1 0 =1
x 1 1

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) g = (x) adf g = ... = (x) adn2


f g=0

(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:

1. the vector fields {g, adf g, ..., adn1


f g} are linearly independent in (the matrix has to have
full rank)

2. the set {g, adf g, ..., adn2


f g} is involutive in ,

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

4. Compute the state transformation



1 1 (x) L0f (x)
.. .. ..
. = (x) = . = .
n1
n n (x) Lf (x)

and the input transformation with

(x) = Lnf (x) 


(x) = Lg Ln1
f (x) .
1
u = (x) [ (x) + v]

Example 12. Consider a mechanism given by the dynamics which represents a single link flexible
joint robot. Its equations of motion is derived as

I q1 + MgL sin q1 + k(q1 q2 ) = 0


J q2 k(q1 q2 ) = u
Because nonlinearities (due to gravitational torques) appear in the first equation, while the control
input u enters only in the second equation, there is no easy way to design a large range controller.

q1 x2 0
q1 M gL sin x1 k (x1 x3 ) 0
x= q2 , f =
l l ,g =
0
x4
k 1
q2 J
(x1 x3 ) J

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 )

The input transformation is then

(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

thus completing the input/output linearization.

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

You might also like