You are on page 1of 10

Module 7

Nonlinear control design

Objectives: To design nonlinear stabilizing control laws.

Lesson objectives
This module helps the reader in

– using Lyapunov function to extract control laws that guarantee stability.

– the use of sliding mode control technique to achieve robust stability.

131
Lecture-38

Control Lyapunov function


Consider the system ẋ = f (x) + g(x)u where u is the control input. Our objective is to
stabilize the origin/equilibirium point of interest. Considering a positive definite V (x) we
see
∂V ∂V
f (x) + V̇ =
g(x)u
∂x ∂x
We could choose a u = α(x) such that V̇ 6 0. V is then called a control Lyapunov
function.
Example 38.0.55 Consider the problem of stabilizing the simple pendulum at a desired
angle θd . By taking x1 = θ − θd ; x2 = θ̇ we obtain the equations

x˙1 = x2
(38.1)
x˙2 = −K sin(x1 + θd ) + cτ
x21 +x22
Let V (x) = 2
. Then

V̇ = x1 x2 + x2 (−K sin(x1 + θd ) + cτ )
= x2 (x1 − K sin(x1 + θd ) + cτ )

To force V̇ = −K1 x22 we have to make x1 − K sin(x1 + θd ) + cτ = −K1 x2 . Hence we obtain


−[x1 + K1 x2 − K sin(x1 + θd )]
τ=
c
This would make V̇ only negative semidefinite. Hence to confirm stability we have to rely
on LaSalle’s invariance principle.

x2 ≡ 0 ⇒ x˙2 ≡ 0 ⇒ −K sin(x1 + θd ) + cτ ≡ 0 ⇒ x1 ≡ 0 ⇒ θ = θd

Hence M = (θd , 0) and stability follows.

132
NPTEL-Electrical Engineering - Nonlinear Control System

Example 38.0.56

x˙1 = −x1 + x22


x˙2 = −x1 x2 − x22 x3
x˙3 = −x21 x23 + u
x21 +x22 +x23
The objective is to stabilize the origin. Taking V (x) = 2
we obtain V̇ = −x21 −
x3 [x32 + x21 x23 + u]. Proceeding as in the above example we obtain

u = −kx3 − x22 − x21 x23

To prove stability we again use LaSalle’s invariance principle which shows that (0, 0, 0) is
asymptotically stable.

Swing-up control of the pendulum on a cart system


In Lecture 11, we presented the nonlinear model of the pendulum on a cart systems. We
use the model so obtained to design a swing-up control law based on Lyapunov function.
The control objective is to swing-up the pendulum from the vertically downward position
to the vertically upward equilibrium position and then balance it at that position; termed
as the swing-up phase and the capture phase. We address the swing-up problem through
the following analysis. The balancing of the pendulum can be achieved using a linear
feedback control and is not discussed here. The equations of motion of the pendulum on
a cart system are given by

ẋ = f (x) + g(x)u (38.2)

where,
   
x3 0
   
 x4   0 
f (x) =  1
 , g(x) = 
a2
,

 (a a x2 sin x2 − a3 a3 sin x2 cos x2 ) 
∆ 2 3 4 

 ∆


1 −a3

(−a3 x24 sin x2 cos x2 + a1 a4 sin x2 ) ∆
cos x2

Consider the candidate Lyapunov function V defined by


1
V (x) = (kp x21 + kd x23 + ke Ê 2 (x)) (38.3)
2
where kp , kd , ke are strictly positive constants and Ê(x) = E(x) − Ed . The motivation for
this choice of V achieves the following tasks:

Joint Initiative of IITs and IISc 133


–Funded by MHRD
NPTEL-Electrical Engineering - Nonlinear Control System

• Pump-in energy E(x) = Ed , where Ed = mgl is the potential energy of the system
at the upward equilibrium position.

• Bring the cart to rest at the origin.

Note that V is positive-definite. Differentiating (38.3) along the trajectories of (38.2),


we have

V̇ = kp x1 x3 + kd x3 f3 + kd x3 g3 u + ke Ê(x)x3 u
= x3 (kp x1 + kd f3 + (kd g3 + ke Ê(x))u). (38.4)

In taking the derivative of Ê, we have used the passivity property of robotic system,
in other words, Ė is the inner-product of the vector of generalized velocities and input
vector. Since, the pendulum is not actuated, we have Ė = x3 u. To render the rate of
change of V to be negative semidefinite, we set

kp x1 + kd f3 + (kd g3 + ke Ê(x))u = −x3 (38.5)

which results in

V̇ = −x23 . (38.6)

Equation (38.5) can be rewritten as

{kp x1 + kd x3 + (g3 (x) + ke Ê(x))u} = −x3 (38.7)

From (38.7) we extract the control law u as


−{x3 + kp x1 + kd f3 (x)}
u = (38.8)
kd g3 (x) + ke Ê(x)
The control law (38.8) will not encounter any singularities provided

(kd g3 (x) + ke Ê(x)) 6= 0.

Points to ponder
• To avoid singularities in the control law (38.8), the initial energy of the system has
to be restricted, which imposes a restriction on the set of initial conditions that the
pendulum can swing-up. Obtain the initial condition set in terms of level sets of
the Lyapunov function V that guarantees the swing-up of the pendulum.

• The V̇ in (38.6) is negative semi-definite. Using LaSalle’s invariance analysis, show


that the control law (38.8) indeed meets the set objectives.

Joint Initiative of IITs and IISc 134


–Funded by MHRD
Lecture-39

Sliding mode control


Sliding mode is a nonlinear control design technique that has been used in almost every
control application. It ensures robustness in the presence of uncertainties and external
disturbances. For certain systems that cannot be smoothly stabilized (viz. Mobile robot,
autonomous underwater vehicle etc.), sliding mode offers a possible solution in view of
the discontinuous nature of the control law. Verification of stability is restricted to a
reduced-order as compared to a Lyapunov based control technique.

Sliding mode terminology


Consider a system described by

ẋ = f (x) (39.1)

where f : IRn −→ IRn .

x) called sliding function such that S : IRn −→ IR


• S(x

x ∈ IRn : S(x
• The set {x x) = 0} is called sliding surface.

• O ⊂ IRn termed as switching surface such that it satisfies the following properties.

a. O is connected and contains the equilibrium point x e .


b. The closed-loop system confined to this set O, called equivalent dynamics, is
stable.

In a typical sliding mode control, the control objective is

135
NPTEL-Electrical Engineering - Nonlinear Control System

• Design of a proper switching surface such that the closed-loop system behaves as
desired.

• Reach the switching surface in finite time and maintain it there (positive invariance).
The design of sliding surface is greatly simplified if an affine in control system of the form
P
ẋ = f (x) + mi=1 gi (x)ui can be represented in a regular form:

x1 = f1 (x
ẋ x1 , x 2 )
Pm
x2 = f2 (x
ẋ x1 , x 2 ) + 1 x1 , x 2 )uj
ḡj (x
where
x 1 ∈ IRn−m , x 2 ∈ IRm and ḡj is related to gj as gj = [01×(n−m) ḡj⊤ ]⊤ .

Design outline
• Aim is to restrict the motion of the system to x 1 dynamics

• Let

x ∈ IRn : f1 (x
O = {x x1 , x2 ) = l(x
x1 )}

• The equivalent dynamics


x1 = l(x
ẋ x1 )

Case 1:

x1 ) of the form
• Assign a linear dynamics to l(x
x1 ) = −Kx
l(x x1

where K ∈ IR(n−m)×(n−m) > 0. Equivalent dynamics ẋ


x1 = −Kx
x1

• Difficulties
If O is the intersection of (n − m) sliding surfaces and n − m > m, then it is difficult
to reach using m control inputs.
Case 2:

• Consider the following candidate Lyapunov function V : IRn−m −→ IR defined as


x1 ) = 21 x ⊤
V (x 1 x1

x1 ) such that V̇ (x
• Construct l(x x1 ) ≤ 0 on O

• O is the intersection of m sliding surfaces.

Joint Initiative of IITs and IISc 136


–Funded by MHRD
NPTEL-Electrical Engineering - Nonlinear Control System

Finite-time reachability
Definition 39.0.57 The switching surface O is said to be finite-time reachable if for any
x (0) ∈ U ⊆ IRn , there exists T ∈ [0, ∞) and an admissible control u : [0, T ] −→ IRm with
the property that x (T ) ∈ O.
Tm
x) such that O =
• Assume that m sliding functions Sj (x x)
j=1 (Sj (x = 0).

• The dynamics obtained after differentiating each Sj into rj times


 
(r1 )
S
 1(r ) 
 S 2 
 2 
 .  = R(x x) + Q(x
x)uu
 .. 
 
(r )
Sm m

where,
 
Lrf1 S1
 

 Lrf2 S2 

x) = 
R(x .. ;

 . 

Lrfm Sm
 
Lg1 Lrf1 −1 S1 Lg2 Lrf1 −1 S1 ... Lgm Lrf1 −1 S1
 
 L Lr2 −1 S Lg2 Lrf2 −1 S2 . . . Lgm Lrf2 −1 S2 
 g1 f 2 
x) = 
Q(x .. .. .. .. 

 . . . . 

Lg1 Lrfm −1 Sm Lg2 Lrfm −1 Sm . . . Lgm Lrfm −1 Sm

∂Sj ⊤
Then term Lf Sj (x) = ∂x
f (x) refers to the Lie derivative of a real-valued function
Si (x) along the vector field f . In coordinates, it is the inner-product of the gradient
△ ∂Sj ri −1
of Si with f . In a similar way, the iterated Lie-derivative Lrfi Sj (x) = L
∂x f
.

x) is invertible at x e and
• By the definition of well-defined vector relative degree , Q(x
thus for all x in the neighbourhood of xe , we have

u = Q−1 (x
x) {P (x
x) − R(x
x)} .

x) ∈ IRm depends on the relative degree of the sliding functions.


• The choice of P (x
For example, if the vector relative degree is {1, 2}, then a few possible choices of

Joint Initiative of IITs and IISc 137


–Funded by MHRD
NPTEL-Electrical Engineering - Nonlinear Control System

x) = [P1 (x
P (x x)]⊤ are
x) P2 (x


 −K1 sign(S1 )


 −S λ
1
x) =
P1 (x


 −K1 sign(S1 ) − K2 S1


−K1 |S1 |λ sign(S1 )



 −sign(S2 )|S2 |a − sign(Ṡ2 )|Ṡ2 |b
 h i   1/5
x) =
P2 (x 1/3 3 5/3 3 5/3
−sign(Ṡ2 )|Ṡ2 | − sign (S2 + 5 Ṡ2 ) S2 + 5 Ṡ2


−γ1 sign(S˙2 + γ2 |S2 |1/2 sign(S2 ))

b
where, K1 > 0, λ, b ∈ (0, 1), a > 2−b
, γ1 , γ2 > 0.

A general form of the reaching law is given by

Ṡ = −k1 sign(S) − k2 h(S) (39.2)

where, k1 , k2 > 0 and Sh(S) > 0, h(0) = 0. Three special cases of (39.2) are:

1. Constant rate reaching law

Ṡ = −k1 sign(S).

Large reaching time and severe chattering for large k1 .

2. Constant plus proportional rate reaching law

Ṡ = −k1 sign(S) − k2 S.

3. Power rate reaching law

Ṡ = −k1 |S|αsign(S), α ∈ (0, 1).

Eliminates chattering !

4. Fractional power reaching law

Ṡ = −K1 S α

Continuous, bounded, robust to disturbance and uncertainties.

Joint Initiative of IITs and IISc 138


–Funded by MHRD
Lecture-40

Sliding mode control: Example


The robustness property of sliding-mode technique is illustrated through the following
example.

ẋ1 = x2
(40.1)
ẋ2 = h(x) + g(x)u

where h and g are unknown nonlinear functions and g(x) ≥ g0 > 0 ∀ x. The control
objective is to stabilize the origin (x1 , x2 ) = (0, 0).

• Choose S(x) = x2 + kx1 , k > 0.

• Assumption: h and g satisfy | kxg(x)


2 +h
| ≤ ρ(x) ∀ x.
S2
• The derivative of V = 2
w.r.t time along the trajectories of (40.1) is

V̇ = S Ṡ = S(x)(h(x) + kx2 + g(x)u) ≤ g(x)ρ(x)|S(x)| + g(x)S(x)u

• Choose u = −β(x)sign(S(x)), where β(x) is free.

• Then, Ṡ = −(β(x) − ρ(x))g(x)|S|.

• To render V̇ negative definite, choose β(x) ≥ ρ(x) + β0 , β0 > 0, which implies

V̇ ≤ −g(x)β0 |S| ≤ −g0 β0 |S|

• The equivalent dynamics on the set {(x1 , x2 ) : x2 = −kx1 } is given by ẋ1 = −kx2 ,
which is exponentially stable.

139
NPTEL-Electrical Engineering - Nonlinear Control System

S(x)=0
2

Sliding phase
1

Reaching
x2

0
phase

−1

−2

−3
−3 −2 −1 0 1 2 3
x1

Figure 40.1: Vector field plot of a closed-loop second-order system

Joint Initiative of IITs and IISc 140


–Funded by MHRD

You might also like