Feedback Linearization. Ravi N Banavar. March 26, 2013. These notes were
based on my readings of the two books. • Nonlinear Control Systems, A. Isidori,
3rd ...
Feedback Linearization Ravi N Banavar March 26, 2013 These notes were based on my readings of the two books • Nonlinear Control Systems, A. Isidori, 3rd Edition, Springer, 1992
Consider a dynamical system of the form x˙ = f (x) + g(x)u
x(t) ∈ U ⊂ Rn
(1)
where f (·), g(·) are smooth functions and u takes values in a subset of R. The vector f (x) is called the drift vector field and the vectors gi (x) are called the control vector fields. Now let us examine the behaviour of the system in a region U ⊂ R containing a point x0 in the state-space (x0 ∈ U ). Associated with system (1) let us define the output as y = h(x) The first derivative of the output is expressed as y (1) = Lf h(x) + Lg h(x)u where Lf and Lg denote the Lie derivatives along the vector fields f and g respectively and (1) denotes the first derivative with respect to time. Let us assume that Lg h(x) is zero in U and further, that Lg Lkf h(x) = 0
for
k = 0, 1, . . . , r − 2(r ≤ n)
∀x ∈ U
and Lg Lr−1 f h(x0 ) 6= 0 Lemma 0.1 The following two equalities are equivalent.
4
Lg h(x) = Lg L1f h(x) = · · · = Lg Lkf h(x) = 0
∀x ∈ U
Lg h(x) = L[f,g] h(x) = · · · = Ladkf g h(x) = 0
∀x ∈ U
where adkf g = [f, . . . , [f, g]]] (k-brackets).
Proof: Let us assume that the first equality is true. The proof is based on an iteration. From Lg h(x) = 0 and Lg Lf h(x) = 0 we have Ladf g h(x) = L[f,g] h(x) = [Lf Lg − Lg Lf ]h(x) = [Lf Lg h(x) − Lg Lf h(x)] = 0 Similarly, Lad2f g h(x) = L[f,[f,g]] h(x) = [Lf L[f,g] −L[f,g] Lf ]h(x) = Lf Ladf g h(x)−Ladf g Lf h(x) = −Ladf g Lf h(x) = −[Lf Lg − Lg Lf ]Lf h(x) = 0 Based on the above arguments, it follows that Ladkf g Llf h(x) = 0
if
if Lg Lk+l f h(x) = 0
Going on this way, we have Lg h(x) = L[f,g] h(x) = · · · = Ladkf g h(x) = 0
∀x ∈ U
.
Lemma 0.2 For a system with relative degree r at x0 , the r row vectors dh(x0 ), d(Lf h(x0 )), . . . , d(Lr−1 f h(x0 ) are linearly independent. Proof: ( Note that < dLjf h(x), adif g(x) >= Ladif g(x) Ljf h(x) and Ladkf g Llf h(x0 ) 6= 0 ) Consider the product =
dh(x0 ) d(Lf h(x0 )) .. .
d(Lr−1 f h(x0 )) 0 0 .. .
∀k + l = r − 1
h g(x0 ) adf g(x0 ) · · · ··· ··· .. .
< d(Lr−1 f h(x0 )), g(x0 ) > · · ·
adr−1 f g(x0 )
i
< dh(x0 ), adr−1 f g(x0 ) > < d(Lf h(x0 )), adr−1 f g(x0 ) > .. . r−1 < d(Lr−1 f h(x0 )), adf g(x0 ) >
In the first row, < dh(x0 ), adr−1 f g(x0 ) >6= 0. Consider the second row. The elements are r−1 0, 0, . . . , < d(Lf h(x0 )), adr−2 f g(x0 ) >, < d(Lf h(x0 )), adf g(x0 ) >
= 0, 0, . . . , Ladr−2 g Lf h(x0 ), Ladr−1 g Lf h(x0 ) f
f
The last but one (r − 1th) element of the row is non-zero. Similarly the third row has its last but second (r − 2th) element to be non-zero. Thus the (r − i + 1)th element of row i is non-zero and the matrix is lower triangular. Hence the matrix has rank r. From the result on the product of two linear transformations (or matrices) Rank(AB) = minimum{Rank(A), Rank(B)} it follows that the two matrices on the LHS have atleast rank r. . The purpose of the lemma is that it helps us to define a new set of coordinates in a neighbourhood around x0 as h(x) Lf h(x) .. . r−1 4 z = Φ(x) = Lf h(x) φ1 (x) .. . φn−r (x) where the φi s are n − r smooth functions such that Φ(·) is a diffeomorphism and the jacobian ∂Φ(x) |x=x0 ∂x has full rank. The system evolution in the new set of coordinates is z˙ = z˙ =
d ∂Φ(x) Φ(x) = (f (x) + g(x)u) dt ∂x
d ∂Φ(x) Φ(x) = |x=Φ−1 (z) (f (Φ−1 (z)) + g(Φ−1 (z))u) dt ∂x
Question: Why do we have the requirements - 1. that Φ be a diffeomorphism ? 2. that the Jacobian have full rank at x0 ? What would happen if these were not satisfied ? Let us now define the dynamics of the system in this new set of coordinates z˙1 =
d h(x) = Lf h(x) = z2 dt
z˙2 =
d Lf h(x) = L2f h(x) = z3 dt
and z˙r =
d r−1 L h(x) = Lrf h(x) + Lg Lr−1 f h(x)u = b(z) + a(z)u dt f
4
4
−1 −1 r where a(z) = Lg Lr−1 f h(Φ (z)) and b(z) = Lf h(Φ (z)). If the φi s are chosen such that Lg φi (x) = 0 (this is called the normal form) , and
d φi (x) = Lf φi (x) = qi (z) dt then the system in the new coordinates looks like z˙1 z2 .. .. . . z˙ b(z) + a(z)u r = z˙r+1 qr+1 (z) .. .. . . z˙n qn (z)
By defining a new control input v as 4
v = b(z) + a(z)u we notice that the sub-system ”from v to z” is a linear system. By means of the feedback u=
1 (v − b(z)) a(z)
this is state-feedback
the nonlinear system has been ”partially linearized” as z˙1 0 1 0... 0 z1 0 .. .. .. .. .. . . . = . . . . .. + .. v z˙r
0 0
...
0
zr
1
z˙r+1 qr+1 (z) .. ... . = z˙n qn (z)
If the relative degree r = n (order of the system), then the original nonlinear system can be fully feedback linearized.
Zero dynamics Defining ξ=
z1 z2 .. . zr
zr+1 . η = .. zn
the system can be written as
z˙1 .. . = z˙r
z2 .. .
η˙ = q(ξ, η)
b(ξ, η) + a(ξ, η)u
Suppose the output y = z1 is identically zero. Then it follows that z1 (t) ≡ z2 (t) ≡ . . . = zr (t) ≡ 0(⇒ ξ ≡ 0) and z˙r ≡ 0 = b(0, η) + a(0, η)u The input history u(t) is then given by u(t) = −
b(0, η(t)) a(0, η(t))
where η(t) is the solution of the differential equation η˙ = q(0, η)
η(0) = η0
The dynamics of the above equation are called the zero dynamics of the system.
Zero dynamics of a linear system Consider the transfer function G(s) =
b0 + b1 s + · · · sn−r a0 + a1 s + · · · s n
The state-space realization in a canonical form is 0 0 1 ··· 0 0 . .. .. .. A = .. B= . . . .. . −a0 −a1 · · · − an−1 1
C=
h
b0 b1 · · ·
Following a similar procedure as before z1 = y = b0 x1 + b1 x2 + · · · + bn−r−1 xn−r + xn−r+1 z2 = z˙1 = b0 x2 + b1 x3 + · · · + bn−r−1 xn−r+1 + xn−r+2 ··· zr = z˙r−1 = b0 xr + b1 xr+1 + · · · + bn−r−1 xn−1 + xn
bn−r−1 1 0 · · · 0
i
To ensure that the rank of the jacobian is n, choose the other n − r coordinates as zr+1 = x1
···
zr+2 = x2
zn = xn−r
(Check on the rank of the jacobian). As before, partition the new set of variables into ξ = (z1 , · · · , zr ) and η = (zr+1 , · · · , zn ). The dynamics are z˙1 = z2
···
z˙r−1 = zr
z˙r = Rξ + Sη + u η˙ = P ξ + Qη If we identically zero the output (ξ ≡ 0), then η˙ = Qη where
0 .. Q= .
1 .. .
··· .. .
−b0 −b1 · · ·
0 .. .
−bn−r−1
The eigen values of Q correspond to the zeros of the transfer function ! Remark 1 Please note that “zero dynamics” is a concept related to identically zeroing the output with a particular control. The reason we are concerned about the “hidden” part (the“η” part) is that we do not wish that these variables get unbounded when the output is identically zero. Hence we insist on “asymptotic stability” of this subsystem. So whatever the initial conditon of “η,” this variable then decays to zero. As seen from above, the same concepts apply to a linear system. Though one can draw comparisons to observability/detectability, please remember that here we are using an “input.” We are not studying an output due to initial conditions alone. In the situation of the output identically being zero, as we have seen, the following identities hold y(t) = h(x(t)) ≡ 0
y (1) (t) = Lf h(x(t)) ≡ 0
···
y (r−1) (t) = Lr−1 f h(x(t)) ≡ 0
and y (r) (t) = Lrf h(x(t)) + Lg Lr−1 f h(x(t))u(t) ≡ 0 (Note: Each independent algebraic constraint on the system dynamics reduces the dimension of the manifold on which the system trajectories evolve by 1.) We recall that the r row vectors dh(x0 ), d(Lf h(x0 )), · · · , d(Lr−1 f h(x0 )) are linearly independent and this holds in a
region around x0 (since the functions are smooth) and hence the zero-dynamics trajectory lies in an n − r dimensional submanifold (Z)of the original n-dimensional manifold. The control input required to realize the output zeroing is ∗
u (x(t)) = −
Lrf h(x(t)) Lg Lr−1 f h(x(t))
and we have
dh(x) d(Lf h(x)) .. . r−1 d(Lf h(x))
h(x) (Lf h(x)) .. .
∗ [f (x) + g(x)u (x)] = r−1 Lf h(x) 0
For all x ∈ Z, the output is zero and hence dh(x) d(Lf h(x)) [f (x) + g(x)u∗ (x)] = 0 .. . r−1 d(Lf h(x)) which implies that the vector field [f (x) + g(x)u∗ (x)] is tangential to Z. The system trajectories for a zero output thus evolve on Z - the n − r dimensional manifold.
Local asymptotic stability Zero dynamics are helpful in determining the local asymptotic stability of a system around a critical point (when the linearization contains eigen values on the imaginary axis which are not controllable) Proposition 0.1 Consider the system (1) with an equilibrium x0 = 0 and where the relative degree is r. Without loss of generality assume that (ξ, η) = (0, 0) is the equilibrium point in the transformed coordinates. Suppose the equilibrium η = 0 of the zero dynamics of the system is locally asymptotically stable and the feedback linearized subsystem is stable, then the system with the feedback control law is locally asymptotically stable at (ξ, η) = (0, 0). Proof:
Integrable distributions Consider a non-singular smooth distribution W = span{f1 , . . . , fr } of rank r(< n) in an open set U ⊂ Rn . This implies that at every point p ∈ U , the r vectors {f1 (p), . . . , fr (p)} span an r-dimensional subspace W (p) of Rn . From basic vector space theory, the annihilator of W (p), denoted by W o (p), forms an (n − r) dimensional subspace of Rn . So if y ∈ W o (p), then [y, fi (p)] = 0 i = 1, . . . , r Now, as a consequence, we can find (n − r) smooth functions {α1 , . . . , αn−r } such that [αj , fi ](x) = 0 ∀i = 1, . . . , r, j = 1, . . . , n − r and ∀x ∈ U So, when can we say that the distribution W is integrable ? If the annihilator co-vector functions αi s can be expressed as gradients of smooth functions λi s, then the distribution is said completely integrable in U . So if there exist (n − r) functions λi (·) : U → R such that − − − dλ1 (x) − − − h i | f1 (x) · · · fr (x) = 0 − − −− dλ1 (x) − − −− holds, then the distribution W is said to be integrable. The distribution W is said to be involutive if all Lie brackets lie in the distribution. Mathematically expressed [· · · [fi , fj ]]] ∈ W for all order Lie brackets and all i, j.
When can we completely feedback linearize ? Question: At a point x0 , when can we find a scalar function λ(x) such that the system has relative degree n at x0 ? Answer: The following two conditions are both necessary and sufficient to be able to feedback linearize the system around x0 . 1. The matrix h has rank n.
g(x0 ) adf g(x0 ) · · ·
(n−2)
adf
(n−1)
g(x0 ) adf
g(x0 )
i
2. The distribution (n−2)
D = {g(x), adgf (x), · · · , adf
g(x)}
is involutive around x0 . . Based on our previous study, the necessary conditions are (n−2)
Lg λ(x) = Lg Lf λ(x) = · · · = Lg Lf (n−1)
Lg Lf
λ(x) = 0 ∀x ∈ U (x0 ∈ U )
λ(x0 ) 6= 0
The first set of conditions are (as we have seen) equivalent to Lg λ(x) = Ladgf λ(x) = · · · = Lad(n−2) g λ(x) = 0 ∀x ∈ U (x0 ∈ U )
(2)
f
and the second non-triviality condition is equivalent to Lad(n−1) g λ(x0 ) 6= 0 f
Recall lemma 0.2. These conditions imply that the vectors (n−1)
g(x0 ), adgf (x0 ), · · · , adf
g(x0 )
(3)
are linear independent. Now the condition (3) also implies that the distribution (n−2)
D = span{g(x), adgf (x), · · · , adf
g(x)}
(4)
is nonsingular and (n − 1) dimensional around x0 . The conditions (2) can be written as (n−2) dλ(x)[g(x), adgf (x), · · · , adf g(x)] = 0 This implies that dλ(·) is a basis for the one-dimensional codistribution that annihilates D. By Frobenius’ theorem theorem, the distribution D is involutive.
An example: A DC motor Complete feedback linearization The governing differential equations of a DC motor in which the rotor voltage (Vr ) is kept constant and the stator voltage (Vs ) is used as a control input are given by Ls
dIs + RIs = Vs dt
The electrical dynamics on the stator side.
Lr
dIs + RIr = Vr − E The electrical dynamics on the rotor side. dt dΩ J + F Ω = T The mechanical dynamics of the rotor. dt
where Ls , Lr are stator and rotor inductances, Rs , Rr are stator and rotor resistances, E is the back EMF in the rotor, J, Ω, F, T are the rotor inertia, angular speed of the rotor, viscous friction and torque developed at the rotor shaft. The back EMF, the torque and the flux are further given by the relations E = KΦΩ
T = KΦIr
Φ = Ls Is
Choosing the state variables as x1 = Is x2 = Ir x3 = Ω and the input as Vs , the drift and control vector fields are f (x) =
s −R x Ls 1 Rr Vr s − Lr x2 + Lr − KL x1 x3 Lr F KLs x + J x 1 x2 J 3
1 Ls
0 g(x) = 0 0
Question 1: Can we fully feedback linearize this system around an arbitrary x0 ? Let us check whether the two conditions are satisfied. Condition 1: Is Rank{g(x0 ) [f, g](x0 ) [f, [f, g]](x0 )} = 3? Answer: Yes, provided x2 6= 0 or x3 6= 0. Sounds alright since these variables correspond to the rotor current and rotor speed. Condition 2: Is the distribution{g(x) [f, g](x)} integrable around x0 ? Answer: Let us try to find a β : U → R such that grad(β)[g(x) [f, g](x)] = 0 i. e. h
∂β ∂x1
∂β ∂β ∂x2 ∂x3
i
[g(x) [f, g](x)] = (0 0)
Yes, one possible solution is β(x) = Lr x22 + Jx23
Zero dynamics A natural output in a DC motor is the speed of the rotor. Suppose we wish to regulate this speed around a desired value Ωd . How would we choose an appropriate y in our problem ? If we wish to regulate the output to Ωd , a natural choice would be y = h(x) = Ω − Ωd = x3 − x3d But with this output are we able to fully feedback linearize the system ? If not, what happens ?