Uploaded by Khiêm Nguyễn

Chapter 2 NonlinearAdaptiveControl

advertisement
Lecture note
NONLINEAR AND ADAPTIVE CONTROL
Instructor: Assoc. Prof. Dr. Huynh Thai Hoang
Department of Automatic Control
Faculty of Electrical and Electronics Engineering
Ho Chi Minh City University of Technology
Email: hthoang@hcmut.edu.vn
© H. T. Hoàng - HCMUT
1
Chapter 2
NONLINEAR CONTROL
© H. T. Hoàng - HCMUT
2
Outline
Introduction 
 Mathematical model of nonlinear systems 
 Linearization of nonlinear systems 
 Describing function method 
 Lyapunov stability 
 Feedback linearization control 
 Sliding mode control 
 Simulation of nonlinear system using Matlab

© H. T. Hoàng - HCMUT
3
References
Applied Nonlinear Control, E.Slotine and W.Li
 Nonlinear Control System, Isidori
 Nonlinear Systems, Khalil

© H. T. Hoàng - HCMUT
4
Introduction
© H. T. Hoàng - HCMUT
5
What is a nonlinear system?
A nonlinear system is a system of which input – output
relationship cannot be described by a linear differential or
difference equation
 Most of practical systems are nonlinear.
 Hydraulic/pneumatic systems (Ex: water tank,…),
 Themodynamic system (Ex: furnace,…),
 Mechanical systems (Ex: robot arms,….),
 Electromechanical system (Ex: motors, amplifier
circuits,…)
 Hybrid physical systems,…
 There are two types of nonlinear systems:
 Continuous nonlinear systems
 Discrete nonlinear systems
This course focuses only on continuous nonlinear systems

© H. T. Hoàng - HCMUT
6
Properties of nonlinear systems

Nonlinear systems do not satisfy the superposition
principle.

Stability of a nonlinear system is not only depedent
on its structure and parameters but also dependent
on the input signal.

If the input is a sinusodal signal, the output may have
harmonic components (high frequencies) in adition to
the basic component (equal to the input’s frequency).

Nonlinear systems can exhibit limit cycles.
© H. T. Hoàng - HCMUT
7
Simple nonlinear elements
two-state relay
three-state relay
y
y
Ym
Ym
u
D
 Ym
y  Ym sgn(u )
D
u
 Ym
Ym sgn(u ) (if | u | D)
y
(if | u | D)
0
© H. T. Hoàng - HCMUT
8
Example of ON-OFF controller using two-state relay
r(t)

e(t)
+_
ON-OFF
ON-OFF Controller:
 If e(t) > 0 then u(t)=Vm
 If e(t) < 0 then u(t)=Vm
y(t)
u(t)
u>0
0
y(t)
u
Vm
r(t)
y(t)
e
Vm
t
© H. T. Hoàng - HCMUT
9
Example of ON-OFF controller using three-state relay
r(t)

e(t)
+_
ON-OFF
u>0
ON-OFF Controller:
 If e(t) > D then u(t)=Vm
 If D<e(t)<D then u(t)=0
 If e(t) < D then u(t)=Vm
Vm
D
y(t)
u(t)
0
y(t)
u
r(t)
y(t)
e
r(t)
D
Vm
© H. T. Hoàng - HCMUT
r(t)+D
r(t)D
t
10
Simple nonlinear elements (cont.)
Saturation amplifier
Dead-zone amplifier
y
y
Ym
K
u
D
u
D
D
D
 Ym
ìïïYm sgn(u ) (if | u |> D)
y =í
ïïî Ku
(if | u |£ D)
( K  Ym / D)
ìïï K (u - D sgn(u )) (if | u |³ D)
y =í
ïïî
(if | u |< D)
0
© H. T. Hoàng - HCMUT
11
Example of saturation amplifier
Vi
Vo
R1
R2
K  1
R1
R2
Vo
Vsat
Vi
D
D
Vsat
© H. T. Hoàng - HCMUT
Vsat
K
D
12
Example of deadzone amplifier

Class B amplifier
Q1
Q2
© H. T. Hoàng - HCMUT
13
Simple nonlinear elements (cont.)
two-state relay with
hysteresis
y
Ym
three-state relay with
hysteresis
y
u
-D
D
Ym
u
D
D
 Ym
 Ym
ì
Ym sgn(u ) (if | u |³ D)
ï
ï
y =í
ï
ï
î-Ym sgn(u ) (if | u |< D)
© H. T. Hoàng - HCMUT
14
Example of ON-OFF controller (two-state relay with hysteresic)
y(t)

ON-OFF
ON-OFF Controller:
 If y(t) < LO then u(t)=Vm
 If LO<y(t)<HI then u(t)
unchaged
 If y(t) > HI then u(t)=0
y(t)
u(t)
HI
u(t)
y(t)
u
LO
y(t)
Vm
HI
y
LO
LO
t
HI
© H. T. Hoàng - HCMUT
15
Simple nonlinear elements (cont.)
Saturation amplifier with hysteresis
y
Ym
u
D
D
 Ym
© H. T. Hoàng - HCMUT
16
Mathematical Model of Nonlinear Systems
© H. T. Hoàng - HCMUT
17
Mathematical model of continuous nonlinear systems

The input-output relationship of a continuous
nonlinear system can be described by a nonlinear
differential equation:

 d n1 y (t )
dy (t )
d n y (t )
d mu (t )
du (t )
, ,
, y (t ),
, ,
, u (t ) 
 g 
n
n 1
m
dt
dt
dt
dt

 dt
where: u(t) : input signal,
y(t) : output signal,
g(.) : nonlinear function
© H. T. Hoàng - HCMUT
18
Mathematical model of nonlinear system – Example 1
qin
u(t)
y(t)

Balance equation:
where
qout
a: cross area of the output valve
A: cross area of the tank
g: gravity acceleration constant
k: pump power constant
CD: discharge constant
Ay (t )  qin (t )  qout (t )
qin (t )  ku (t )
qout (t )  aCD 2 gy (t )

1
 y (t )  ku (t )  aC D 2 gy (t )
A

(1st order nonlinear system)
© H. T. Hoàng - HCMUT
19
Mathematical model of nonlinear system – Example 2
B
u
l

m

m: mass of the pendulum
l: length of the pendulum
B: viscous friction constant;
g: gravity acceleration
u(t): torque applied to the rotating axis
(t): angle (position) of the pendulum
Applying the Newton’s law, we have:
J(t )  
 ml 2(t )  u (t )  B(t )  mgl sin  (t )
1
B 
g

  (t )  2 u (t )  2  (t )  sin  (t )
ml
ml
l
(2nd order nonlinear system)
© H. T. Hoàng - HCMUT
20
Mathematical model of nonlinear system – Example 3
l
u

m

J: moment of inertia of the robot arm
M: mass of the robot arm
m: mass of the load; l: length of the robot arm
lC : distance from the center of mass to the link
B: viscous friction constant; g: gravity acceleration
u(t): torque applied to the rotating axis
(t): angle (position) of the robot arm
Applying the Newton’s law, we have:
( J  ml 2 )(t )  B(t )  (ml  MlC ) g cos  u (t )
 (t )  
1
B
(ml  MlC )

 (t ) 
g cos 
u (t )
2
2
2
( J  ml )
( J  ml )
( J  ml )
(2nd order nonlinear system)
© H. T. Hoàng - HCMUT
21
Mathematical model of nonlinear system – Example 4
: rudder angle
: moving direction
(t)
k: constant
i: constant
Moving direction
(t)

Differential equation describing the dynamics of the ship’s
steering system:


1 1
 1  3
 k  
  (t )   (t )  
 3 (t )   (t ) 
(t )    (t )  
 1  2 
  1 2 
  1 2 
(3rd order nonlinear system)
© H. T. Hoàng - HCMUT
22
Exercise
qin
u(t)
y1(t)
b1, b2: cross area of the output valve
A1, A2: cross area of the tank
g: gravity acceleration constant
k: pump power constant
CD: discharge constant
y2(t)
qout
 A1 y1 (t )  ku (t )  b1CD 2 gy1 (t )

 A2 y 2 (t )  b1CD 2 gy1 (t )  b2CD 2 gy2 (t )
© H. T. Hoàng - HCMUT
23
State space model of nonlinear systems

Continuous nonlinear systems can be described by
state equations:
 x (t )  f ( x (t ), u (t ))

 y (t )  h( x (t ), u (t ))
where: u(t) : input signal
y(t) : output signal
x(t) : state vector,
x(t) = [x1(t), x2(t),…,xn(t)]T
f(.), h(.) : nonlinear functions
© H. T. Hoàng - HCMUT
24
State equation of nonlinear system – Example 1

qin

u(t)
y(t)
Differential equation:
1
y (t )  ku (t )  aC D 2 gy (t )
A
qout

Denote the state variable:
x1 (t )  y (t )
 x (t )  f ( x (t ), u (t ))
 State equation: 
 y (t )  h( x (t ), u (t ))
where:
aC D 2 gx1 (t ) k
f ( x, u )  
 u (t )
A
A
h( x (t ), u (t ))  x1 (t )
© H. T. Hoàng - HCMUT
25

Mathematical model of nonlinear system – Example 2
B
(t ) 
u
l


m
1
B 
g



u
(
t
)
(
t
)
sin  (t )
2
2
ml
ml
l
State variable:
 x1 (t )   (t )


 x2 (t )   (t )
 x1 (t )  x2 (t )


1
B
g

 x2 (t )  ml 2 u (t )  ml 2 x2 (t )  l sin x1 (t )
 x (t )  f ( x (t ), u (t ))
 State equation: 
 y (t )  h( x (t ), u (t ))
 x2 (t )

 f1 ( x (t ), u (t )) 


f ( x (t ), u (t ))  1

B
g
 2 u (t )  2 x2 (t )  sin x1 (t )   f 2 ( x (t ), u (t )) 
ml
l
 ml

h( x (t ), u (t ))  x1 (t )
(2nd order nonlinear system)
© H. T. Hoàng - HCMUT
26
State equation of nonlinear system – Example 3

l
u
m
(t )  



where
Differential equation:
1
B
(t )  (ml  MlC ) g cos 

u (t )
2
2
2
( J  ml )
( J  ml )
( J  ml )
State variable:
 x1 (t )   (t )


 x2 (t )   (t )
State equation
 x (t )  f ( x (t ), u (t ))

 y (t )  h( x (t ), u (t ))
 x2 (t )


B
1
f ( x , u )   ( ml  MlC ) g
x2 (t ) 
u (t ) 
cos x1 (t ) 

2
2
2
( J  ml )
( J  ml )
 ( J  ml )

h( x (t ), u (t ))  x1 (t )
© H. T. Hoàng - HCMUT
27
Methods for analysis and design of nonlinear systems
There is no universal method that can be effectively
applied to all nonlinear systems.
 Some popular methods for analysis and design of
nonlinear systems:
 Linearization
 Phase plane analysis
 Describing function method
 Lyapunov method
 Popov criterion
 Feedback linearization control
 Sliding mode control
 Back-stepping control,…

© H. T. Hoàng - HCMUT
28
Linearized models of nonlinear systems
© H. T. Hoàng - HCMUT
29
Stationary point of a nonlinear system

Consider a nonlinear system described by the state equation:
 x (t )  f ( x (t ), u (t ))

 y (t )  h( x (t ), u (t ))

The state x is called the stationary point of the nonlinear
system if the system is at the state x and the control signal is
fixed at u then the system will stay at state x forever.

If ( x , u ) is stationary point of the nonlinear system then:
f ( x (t ), u (t )) x  x ,u u  0

Note: The stationary point with u  0 is also called the
equilibrium point of nonlinear system.
© H. T. Hoàng - HCMUT
30
Stationary point of nonlinear system – Example 1

Consider a nonlinear system described by the state equation:
 x1 (t )   x1 (t ).x2 (t )  u 
 x (t )   x (t )  2 x (t ) 
 2   1

2
Find the stationary point when u (t )  u  1
 Solution:
The stationary point(s) are the solution to the equation:
f ( x (t ), u (t )) x  x ,u u  0

 x1.x2  1  0

 x1  2 x2  0

 x1  2


2
 x2   2
or
 x1   2


2
 x2   2
© H. T. Hoàng - HCMUT
31
Stationary point of nonlinear system – Example 2
B

u
l

m

Parameters of the pendulum:
 Pendulum mass: m=0.5 (kg)
 Pendulum length: l = 0.6 (m)
 Friction constant: B = 0.1
 Gravity constant: g = 9.81 (m/s2)
Nonlinear state equation:
 x (t )  f ( x (t ), u (t ))

 y (t )  h( x (t ), u (t ))
 x2 (t )

x
f
(
(
t
),
u
(
t
))
 1
 

 1
f ( x (t ), u (t ))  
B
g

 f 2 ( x (t ), u (t ))   2 u (t )  2 x2 (t )  sin x1 (t ) 
ml
l
 ml

h( x (t ), u (t ))  x1 (t )

Find the stationary point corresponding to y     / 4
© H. T. Hoàng - HCMUT
32
Stationary point of nonlinear system – Example 2

The stationary point is the solution of the equation:
 x2

f
u
(
,
)
x
 1
 
0

f ( x, u )  
 1
 
B
g

 f 2 ( x , u )   2 u  2 x2  sin x1  0 
ml
l
 ml

With x1   / 4 , we have:
 x2  0
 
u  mgl sin x1  2.081
Then the stationary point is:
 x1   / 4 
x 

x
0

 2 
u  2.081
© H. T. Hoàng - HCMUT
33
Exercise

Consider a nonlinear system described by the state equation:
2
2
 x1   1  x2  x3  u 
 x    x  sin( x  x )
1
3 
 2  3

 x3  
x32  u

y  x1
Find the equilibrium point when u (t )  u  0
© H. T. Hoàng - HCMUT
34
Linearized model of a nonlinear system around a stationary point

Consider a nonlinear system described by the state equation:
 x (t )  f ( x (t ), u (t ))

 y (t )  h( x (t ), u (t ))

(1)
Expanding Taylor series for f(x,u) and h(x,u) around the
stationary point ( x , u ) , we can approximate the nonlinear
system (1) by the following linearized state equation:
 x~ (t )  Ax~(t )  Bu~(t )
~
~
~
 y (t )  Cx (t )  Du (t )
where:
(2)
~
x (t )  x (t )  x
u~ (t )  u (t )  u
~
y (t )  y (t )  y
( y  h( x , u ))
© H. T. Hoàng - HCMUT
35
Linearized model of a nonlinear system around an equilibrium point

The matrix of the linearized state equation are calculated as
follow:
 f1
 x
 1
 f 2
A   x1
 
 f n

 x1
f1
x2
f 2
x2

f n
x2
 h
C
 x1
h
x2




f1 
xn 

f 2 
xn 
 
f n 

xn  ( x,u )
h 


xn  ( x,u )
© H. T. Hoàng - HCMUT
 f1 
 u 
 f 
2

B  u 
 
  
 f n 
 u  ( x,u )
 h 
D 
 u  ( x,u )
36
Linearized state-space model – Example 1
The parameter of the tank:
u(t)

qin
a  1cm 2 , A  100cm 2
y(t)
qout
Nonlinear state equation:
where
k  150cm3 / sec .V , CD  0.8
g  981cm / sec2
 x (t )  f ( x (t ), u(t ))

 y (t )  h( x (t ), u(t ))
aCD 2 gx1 (t ) k
f ( x, u )  
 u (t )  0.3544 x1 (t )  0.9465u (t )
A
A
h( x (t ), u (t ))  x1 (t )
© H. T. Hoàng - HCMUT
37
Linearized state-space model – Example 1 (cont’)
Linearize the system around y = 20cm:

The equilibrium point:
x1  20
f ( x , u )  0.3544 x1  1.5u  0

© H. T. Hoàng - HCMUT
u  0.9465
38
Linearized state-space model – Example 1 (cont’)

The matrix of the linearized state-space model:
aCD 2 g
f1
A

x1 ( x,u )
2 A x1
 0.0396
( x,u )
f1
k
B

 1.5
u ( x,u ) A ( x,u )

h
C
1
x1 ( x,u )
h
D
0
u ( x,u )
The linearized state equation describing the system around
the equilibrium point y=20cm is:
aCD 2 gx1 (t ) k
f (~x , u )   ~
 u (t )
~
 x (t )  0.0396 x (t )  1.5u (t ) A
~
~ (t ) h( x (t ), u (t ))  x (t )
y
(
t
)

x

1
© H. T. Hoàng - HCMUT
A
39
Linearized state-space model – Example 2
B

u
l

m

Parameters of the pendulum:
 Pendulum mass: m=0.5 (kg)
 Pendulum length: l = 0.6 (m)
 Friction constant: B = 0.1
 Gravity constant: g = 9.81 (m/s2)
Nonlinear state equation:
 x (t )  f ( x (t ), u (t ))

 y (t )  h( x (t ), u (t ))
 x2 (t )

x
f
(
(
t
),
u
(
t
))
 1
 

 1
f ( x (t ), u (t ))  
B
g

 f 2 ( x (t ), u (t ))   2 u (t )  2 x2 (t )  sin x1 (t ) 
ml
l
 ml

h( x (t ), u (t ))  x1 (t )

Find the linearized state equation around stationary point
corresponding to y     / 4
© H. T. Hoàng - HCMUT
40
Linearized state-space model – Example 2 (cont’)
Linearize the system around the stationary point

y   / 4(rad):
Calculating the stationary point:
x1   / 4
 x2

 f1 ( x , u )  
0 

 1
 
f ( x, u )  
B
g

 f 2 ( x , u )   2 u  2 x2  sin x1  0 
ml
l
 ml

 x2  0
 
u  mgl sin x1  2.081
Then the stationary point is:
 x1   / 4 
x 

x
0

 2 
u  2.081
© H. T. Hoàng - HCMUT
41
Linearized state-space model – Example 2 (cont’)

The system matrix around the starionary point:
 a11
A
 a21
a11 
a21 
f1
x1
f 2
x1
f 2
a22 
x2
a12 
a22 
0
a12 
( x ,u )

( x ,u )
( x ,u )
f1
x2
1
( x ,u )
g
 11.56
cos x1 (t )
l
( x ,u )
B
 2
ml
 0.56
( x ,u )
 x2 (t )

 f1 ( x (t ), u (t ))  


f ( x (t ), u (t ))  
1
B
g
 
x
(
(
),
(
))
f
t
u
t
u (t )  2 x2 (t )  sin x1 (t ) 
 2

2
ml
l
 ml

© H. T. Hoàng - HCMUT
42
Linearized state-space model – Example 2 (cont’)

The input matrix around the equilibrium point:
 b1 
B 
b2 
b1 
f1
u
f 2
b1 
u
0
( x ,u )
 5.56
( x ,u )
 x2 (t )

 f1 ( x (t ), u (t ))  

f ( x (t ), u (t ))  

1
B
g
 
f
(
(
t
),
u
(
t
))
x
u (t )  2 x2 (t )  sin x1 (t ) 
 2

2
ml
l
 ml

© H. T. Hoàng - HCMUT
43
Linearized state-space model – Example 2 (cont’)

The output matrix around the equilibrium point:
C  c1 c2 
h
1
c1 
x1 ( x,u )
D  d1
d1 
c2 
h
x2
0
( x,u )
h
0
u ( x,u )
~
x (t )  Ax~ (t )  Bu~ (t )
 Then the linearized state equation is:  ~
~ (t )  Du~ (t )
y
(
t
)

C
x

1 
 a11 a12   0
A



a
a

11.56

0.56

 21 22  
 b1   0 
B 

b
5.56

 2 
C   c1 c2   1 0
© H. T. Hoàng - HCMUT
D0
h( x , u )  x1 (t )
44
Linearized state-space model – Example 3
The parameters of the robot:
l
u
l  0.5m, lC  0.2m, m  0.1kg
m
M  0.5kg , J  0.02kg.m 2

B  0.005, g  9.81m / sec2

Nonlinear state equation :
where:
 x (t )  f ( x (t ), u (t ))

 y (t )  h( x (t ), u (t ))
 x2 (t )


B
1
f ( x , u )   ( ml  MlC ) g
x2 (t ) 
u (t )
cos x1 (t ) 

2
2
2
( J  ml )
( J  ml )
 ( J  ml )

h( x (t ), u (t ))  x1 (t )
© H. T. Hoàng - HCMUT
45
Linearized state-space model – Example 3 (cont’)
Linearize the system around the equilibrium point y = /6 (rad):

Calculating the equilibrium point:
x1   / 6
 x2

0
B
1
f ( x , u )   (ml  MlC ) g
x2 
u
cos x1 

2
2
2
( J  ml )
( J  ml ) 
 ( J  ml )
 x2  0
 
u  1.2744
Then the equilibrium point is:
 x1   / 6
x 

x
0

 2 
u  1.2744
© H. T. Hoàng - HCMUT
46
Linearized state-space model – Example 3 (cont’)

The system matrix around the equilibrium point:
f1
0
a11 
x1 ( x,u )
 a11 a12 
A

a
a
 21 22 
f1
a12 
x2
1
( x,u )
f 2
(ml  MlC )

a21 
sin x1 (t )
2
x1 ( x,u ) ( J  ml )
( x,u )
f 2
a22 
x2
( x,u )
B

( J  ml 2 ) ( x,u )
 x2 (t )


B
1
f ( x , u )   ( ml  MlC ) g
x2 (t ) 
u (t ) 
cos x1 (t ) 

2
2
2
( J  ml )
( J  ml )
 ( J  ml )

© H. T. Hoàng - HCMUT
47
Linearized state-space model – Example 3 (cont’)

The input matrix around the equilibrium point:
 b1 
B 
b2 
f1
0
b1 
u ( x,u )
f 2
b2 
u
( x,u )
1

J  ml 2
 x2 (t )


B
1
f ( x , u )   ( ml  MlC ) g
x
t
x
t
u
t

cos
(
)

(
)

(
)


1
2
2
2
2
J
ml
J
ml
J
ml
(

)
(

)
(

)


© H. T. Hoàng - HCMUT
48
Linearized state-space model – Example 3 (cont’)

The output matrix around the equilibrium point:
C  c1 c2 
h
c1 
1
x1 ( x,u )
D  d1
d1 
c2 
h
x2
0
( x,u )
h
0
u ( x,u )
~
x (t )  Ax~ (t )  Bu~ (t )
 Then the linearized state equation is:  ~
~ (t )  Du~ (t )
y
(
t
)

C
x

1 
0
A

a
a
 21 22 
0
B 
b2 
C  1 0
D0
h( x , u )  x1 (t )
© H. T. Hoàng - HCMUT
49
Exercise
qin
u(t)
y1(t)
b1=2, b2=1(cm2) cross area of output valves
A1=100, A2=150 (cm2) cross area of the tank
g=981 m/s2 gravity acceleration constant
K=60 (cm3/s/V): pump power constant
CD=0.8 discharge constant
y2(t)
qout
 A1 y1 (t )  Ku (t )  b1CD 2 gy1 (t )

 A2 y 2 (t )  b1CD 2 gy1 (t )  b2CD 2 gy2 (t )
Find the linearized model of the system around the stationary point
corresponding to y2  50 (cm)
© H. T. Hoàng - HCMUT
50
Regulating nonlinear system around equilibrium point

Drive the nonlinear system to the neighbor of the equilibrium
point (the simplest way is to use an ON-OFF controller)

Around the equilibrium point, use a linear controller to maintain
the system around the equilibrium point.
r(t)
+

e(t)
Linear
control
ON-OFF
u(t) Nonlinear
system
y(t)
Mode
select
© H. T. Hoàng - HCMUT
51
Describing function method
© H. T. Hoàng - HCMUT
52
An example of control system with two-state relay

Consider the following control system:
r(t)=0
+
e(t)
u(t)
y(t)
G(s)
10
Transfer function of the plant: G ( s ) 
s (0.2 s  1)(2 s  1)
u=f(e)
6
e
Two-state relay characteristic:
6
© H. T. Hoàng - HCMUT
53
An example of control system with two-state relay
© H. T. Hoàng - HCMUT
54
An example of control system with two-state relay


The system exhibits a self-excited oscillation
How to predict or calculate this self-excited oscillation?
© H. T. Hoàng - HCMUT
55
Describing function method




Describing function method is an approximate procedure for
analyzing oscillation (limit cycle) in nonlinear systems.
It is based on the approximation of nonlinear systems by linear
time-invariant transfer functions that depend on the
amplitude of the input waveform.
Nyquist criterion is used to analyze the oscillation.
Describing function method is applied to analyze the selfexcited oscillation in the system consisting of a nonlinear
element connected in series with a linear object:
r(t)=0
+
e(t)
u(t)
N(M)
u(t)
y(t)
G(s)
© H. T. Hoàng - HCMUT
56
Response of nonlinear system to sinusoidal input
e(t )  M sin(t )
r(t)=0

+
u (t )  u1 (t )  u2 (t )  ...
N(M)
y (t )  Y1 sin(t  1 )
G(s)
To investigate the existence of steady oscillation in the system,
a sinusoidal input is applied to nonlinear element:
e(t )  M sin(t )

The output of the
nonlinear element is
not a sinusoidal signal.
For example: two state
relay has square
waveform output signal
u(t)
u1(t)
u4(t)
u3(t)
u2(t)
© H. T. Hoàng - HCMUT
57
Harmonic components

The output of the nonlinear element is not a sinusoidal signal.
Fourier analysis shows that u(t) composes of fundamental
component at frequency  and other components at higher
frequencies 2, 3...
B0 
u (t ) 
  [ Ak sin(kt )  Bk cos(kt )]
2 k 1
The Fourier coefficents are calculated as:

1
B0   u (t )d (t )

Ak 
Bk 

1

1

 u (t ) sin(kt )d (t )


u (t ) cos(kt )d (t )

 
© H. T. Hoàng - HCMUT
58
Response of nonlinear system to sinusoidal input (cont.)

In practice, in most of the cases G(s) is a lowpass filter, the
high frequency components in the output of the linear object
are negligible comparing to the fundamental component. Then
the output of the linear object can be approximated as:
y (t )  Y1 sin(t  1 )
motor
furnace
© H. T. Hoàng - HCMUT
59
Describing function concept

Consider the nonlinear element:
e(t )  M sin(t )

N(M)
u (t )
When the input to the nonlinear element is a sinusoidal
function e(t )  M sin(t, ) the output of the nonlinear element
can be approximated by the fundamental component:
u (t )  u1 (t )  A1 sin(t )  B1 cos(t )

So it is possible to consider the nonlinear
element as an amplifier with the gain:

Generally, N(M) is a complex function, so it is called the
complex gain of the nonlinear element. N(M) is also called the
describing function of the nonlinear element.
© H. T. Hoàng - HCMUT
N (M ) 
A1  jB1
M
60
Describing function definition

The describing function (or also called the complex gain) of a
nonlinear element is the ratio between the fundamental
component of its output and the sinusoidal input:
A1  jB1
N (M ) 
M

1
1 
A1   u (t ) sin(t )d (t )
B1   u (t ) cos(t )d (t )





In the above formulas, u(t) is the output of the nonlinear
element when the input is Msin(t). If u(t) is an odd function
then:
A1 
2

u (t ) sin(t )d (t )


B1  0
0
© H. T. Hoàng - HCMUT
61
Describing function of common nonlinear element
Two-state relay
Describing function
4Vm
N (M ) =
pM
© H. T. Hoàng - HCMUT
62
Describing function of common nonlinear element
Two-state relay (cont.)
Because u(t) is an odd function, we have
B1  0
A1 

2
u (t ) sin(t )d (t )


2
0

Vm sin(t )d (t )


0

2Vm


cos(t )

t  0
4Vm

Then the describing function of the two-state relay is:
A1  jB1 4Vm

N (M ) 
M
M
© H. T. Hoàng - HCMUT
63
Describing function of common nonlinear element
Three-state relay
Describing function
4Vm
D2
N (M ) =
1- 2
pM
M
( M > D)
© H. T. Hoàng - HCMUT
64
Describing function of common nonlinear element
Three-state relay (cont.)
Because u(t) is an odd function: B1  0
A1 
2
u (t ) sin(t )d (t )


0
2  
2Vm

cos(t )
 Vm sin(t )d (t )  



 

t 
4Vm

cos
D
D2
From the plot we have: D  M sin   sin    cos  1  2
M
M
 A1 
4Vm

D2
1 2
M
A1  jB1 4Vm
D2
Then the describing function
N (M ) 

1 2
of the three-state relay is:
M
M
M
© H. T. Hoàng - HCMUT
65
Describing function of common nonlinear element
Saturation amplifier
Describing function
Vm
[2a + sin(2a)]
N (M ) =
pD
D
sin a =
, ( M > D)
M
© H. T. Hoàng - HCMUT
66
Describing function of common nonlinear element
Saturation amplifier (cont.)
Because u(t) is an odd function: B1  0
A1 
2

4  /2
 u (t ) sin(t )d (t )   u (t ) sin(t )d (t )

0
0
 /2

4  Vm M
2
sin (t )d (t )   Vm sin(t )d (t )
 
 0 D


 /2 
4 Vm M 
sin(2t )  
 
 Vm cos(t )d (t )
 t 


  2D 
2
t  
 t 0
4 Vm M 
sin(2 ) 
 M
 
 
  Vm cos  

  2D 
2 

Vm



2

sin(
2
)


 D

Then the describing function of the saturation amplifier is:
N (M ) 
A1  jB1 Vm
2  sin(2 )

M
D
© H. T. Hoàng - HCMUT
D

sin




M

67
Describing function of common nonlinear element
Dead-zone amplifier
Describing function
æ 2a + sin(2a ) ö÷
N ( M ) = K çç1÷÷
çè
ø
p
D
sin a =
, ( M > D)
M
© H. T. Hoàng - HCMUT
68
Describing function of common nonlinear element
Dead-zone amplifier (cont.)
Because u(t) is an odd function: B1  0
A1 
4  /2
 u (t ) sin(t )d (t )   K [ M sin(t )  D] sin(t )d (t )
2


0

 /2
4 KM 
sin(2t )  D


cos(

)

t

t




 
2
 M

 2  sin(2 ) 
 KM 1 





Then the describing function of the dead-zone amplifier is:
A1  jB1
 2  sin 2 
 K 1 
N (M ) 

M



27 August 2022
© H. T. Hoàng - ÐHBK TPHCM
D

 sin   
M

69
Describing function of common nonlinear element
Two-state relay with hysteresis
Describing function
4Vm
N (M ) =
(cos a - j sin a)
pM
D
sin a =
, ( M > D)
M
© H. T. Hoàng - HCMUT
70
Describing function of common nonlinear element
Two-state relay with hysteresis (cont.)
1 2 
2  
4Vm
A1 
u
(
t
)
sin(

t
)
d
(

t
)

V
sin(

t
)
d
(

t
)
cos 


 m





1 2 
2  
4Vm
B1 
u
(
t
)
cos(

t
)
d
(

t
)


 Vm cos(t )d (t )   sin 





Then the describing function of the dead-zone amplifier is:
A1  jB1 4Vm
N (M ) 

(cos   j sin  )
M
M
© H. T. Hoàng - HCMUT
D

 sin   
M

71
Review: Frequency response definition

For linear system, if the input is a sinusoidal signal then the
output signal at steady-state is also a sinusoidal signal with
the same frequency as the input, but different amplitude and
phase.
u (t)=Umsin (j)
U (j)

G(s)
y (t)=Ymsin (j+)
Y (j)
Definition: Frequency response of a system is the ratio
between the steady-state output and the sinusoidal input.
Y ( j )
Frequency response 
U ( j )
It is proven that: Frequency response  G ( s ) s  j  G ( j )
© H. T. Hoàng - HCMUT
72
Review: Graphical representation of frequency response

Bode diagram: is a graph of the frequency response of a
linear system versus frequency plotted with a log-frequency
axis. Bode diagram consists of two plots:
 Bode magnitude plot expresses the magnitude response
gain L() versus frequency  .
L( )  20 lg M ( )
[dB]
phase plot expresses the phase response ()
versus frequency .
 Bode

Nyquist plot: is a graph in polar coordinates in which the
gain and phase of a frequency response G(j) are plotted
when  changing from 0+.
© H. T. Hoàng - HCMUT
73
Graphical representation of frequency response (cont’)
Bode diagram
Nyquist plot
Gain margin
Gain margin
Phase margin
Phase margin
© H. T. Hoàng - HCMUT
74
Review: Stability Conditions
R(s)
+
G(s)
Y(s)

Characteristic equation: 1  G ( s )  0

Stability condition:
 If all the poles of the system lie in the left-half s-plane then
the system is stable.
 If any of the poles of the system lie in the right-half s-plane
then the system is unstable.
 If some of the poles of the system lie in the imaginary axis
and the others lie in the left-half s-plane then the system is
at the stability boundary.
© H. T. Hoàng - HCMUT
75
Review: Stability Conditions
y(t)
Stable system
y(t)
System at
stability boundary
y(t)
Unstable
system
 :1  G ( j )  0
© H. T. Hoàng - HCMUT
76
Review: Nyquist stability criterion

Consider a unity feedback system shown below, suppose
that the open loop system is stable and the Nyquist plot of the
open loop system G(j) is known, the problem is to determine
the stability of the closed-loop system Gcl(s).
R(s)

+
G(s)
Y(s)
Nyquist criterion: The closed-loop system Gcl(s) is stable if
and only if the Nyquist plot of the open-loop system G(s) does
not encircle the critical point (1, j0).
© H. T. Hoàng - HCMUT
77
Review: Nyquist stability criterion – Example

Consider an unity negative feedback system, whose openloop system G(s) is stable and has the Nyquist plots below
(three cases). Analyze the stability of the closed-loop system.
© H. T. Hoàng - HCMUT
78
Review: Nyquist stability criterion – Example

Solution
The number of poles of G(s) lying in the right-half s-plane is 0
because G(s) is stable. Then according to the Nyquist
criterion, the closed-loop system is stable if the Nyquist plot
G(j) does not encircle the critical point (1, j0)

Case : G(j) does not encircle (1, j0)
 the close-loop system is stable.
Case : G(j) pass (1, j0)
 the close-loop system is at the stability
boundary;
Case : G(j) encircles (1, j0)
 the close-loop system is unstable.


© H. T. Hoàng - HCMUT
79
Analysis of harmonic oscillation in nonlinear system

Consider the following nonlinear system:
r(t)=0

+
e(t)
N(M)
u(t)
G(s)
The condition for the existence of oscillation in the system is:
1
1  N ( M )G ( j )  0  G ( j )  
N (M )


y(t)
(*)
The above equation is called “harmonic balance equation”.
This equation is used to calculate the amplitude and
frequency of the harmonic oscillation in the nonlinear system.
If (M*, *) is a solution to the equation (*) then the nonlinear
system has the harmonic oscillation at frequency * and with
amplitude M*.
© H. T. Hoàng - HCMUT
80
Analysis of harmonic oscillation in nonlinear system (cont.)
Graphically, the solution (M*, *) to the equation (*) is the
intersection between the Nyquist plot G(j) of the linear object
and the characteristic curve 1/N(M) of the nonlinear element.
 The oscillation in the
nonlinear system is
Im
Stable oscillation
stable if moving in the
(M 2,2)
Re
increasing direction of
G(j)
the characteristic curve
B2
 1/N(M) of the
C2
A2
1/N(M)
nonlinear element leads
M2 > M1
to switching from the
A1
unstable region to the
B1
stable region of the
C1
Nyquist plot G(j) of the
Unstable oscillation
linear object.
(M 1,1)

© H. T. Hoàng - HCMUT
81
Procedure for analysis of the oscillation in nonlinear systems



Step 1: Determine the describing function of the nonlinear
element (if the nonlinear element is not a basic element).
Step 2: Condition of existence of oscillation in the system: the
Nyquist plot G(j) intersects the characteristic curve 1/N(M)
Step 3: Amplitude and frequency of the oscillation (if existing),
are the solution of the equation:
1
(*)
G ( j )  
N (M )
If N(M) is a real function, then:
The frequency of the oscillation is the phase crossover
frequency  of the linear object G(j). G ( j )  
 Amplitude of the oscillation is the solution of the equation:
1
 G ( j )
N (M )
© H. T. Hoàng - HCMUT
82
Analysis of the oscillation in nonlinear system - Example 1

Consider the following nonlinear system:
r(t)=0
+
e(t)
u(t)
y(t)
G(s)
The transfer function of the linear object:
10
G ( s) 
s (0.2s  1)(2s  1)
The nonlinear element is a
two-state relay with Vm=6.
Calculate the amplitude and
frequency of the oscillation in the
system, if existing.
© H. T. Hoàng - HCMUT
f(e)
Vm
e
 Vm
83
Analysis of the oscillation in nonlinear system - Example 1
Solution

The describing function of the two-state relay: N ( M ) 

Harmonic balance equation:
4Vm
M
1
G ( j )  
N (M )
G ( j )  


1
 G ( j )  N ( M )

© H. T. Hoàng - HCMUT
84
Analysis of the oscillation in nonlinear system - Example 1

The frequency of the oscillation is the phase crossover
frequency of G(j) :


10
G ( j )  arg 
  
 j (0.2 j  1)(2 j  1) 


   arctan(0.2 )  arctan(2 )    arctan(0.2 )  arctan(2 ) 
2
2
(0.2 )  (2 )

   1  (0.2 ).(2 )  0    1.58 (rad / sec)
1  (0.2 ).(2 )

The amplitude of the oscillation is the solution of the equation:
1
10
 G ( j ) 
 1.82
2
2
N (M )
1.58 1  (0.2  1.58) 1  (2  1.58)
M

 1.82  M  13.90
4Vm

Conclusion: The oscillation in the system is:
y (t )  13.90 sin(1.58t )
© H. T. Hoàng - HCMUT
85
Analysis of the oscillation in nonlinear system - Example 2

Consider the following nonlinear system with a three-state relay
r(t)=0
.
+
e(t)
u(t)
y(t)
G(s)
f(e)
The transfer function of the linear object:
10
G ( s) 
s (0.2s  1)(2s  1)
1. Determine the condition for
the existence of the oscillation in
the system.
2. Calculate the amplitude and
frequency of the oscillation when
Vm=6, D=0.1.
© H. T. Hoàng - HCMUT
Vm
e
D
D
V m
86
Analysis of the oscillation in nonlinear system - Example 2
Solution

The describing function of the three-state relay:
D2
4Vm
N (M ) 
1 2
M
M

The condition for the
existence of the oscillation
in the system is that the
Nyquist plot G(j) must
intersect the characteristic
curve 1/N(M). This
happens if:
1

 G ( j )
N (M )
Im

1/N(M)
© H. T. Hoàng - HCMUT
Re
G(j)
87
Analysis of the oscillation in nonlinear system - Example 2

The phase crossover frequency of G(j) is (see example 1 for
detailed calculation)
  1.58 (rad / sec)

In order to have oscillation, the neccesary and sufficient
condition is the existence of M such that
1
10

 G ( j ) 
 1.82
2
2
N (M )
1.58 1  (0.2  1.58) 1  (2  1.58)
 N ( M )  0.55

(*)
According to Cauchy’s inequality:
2
2


2
2


D
D
4V
2V  D 
2V
N ( M )  m 1  2  m     1  2    m
M
D  M  
M
M   D


© H. T. Hoàng - HCMUT
88
Analysis of the oscillation in nonlinear system - Example 2


Then the condition (*) is satisfied when:
2Vm
V
 0.55  m  0.864
D
D
So the condition for the existence of the oscillation is:
Vm
 0.864
D
 The amplitude of the oscillation is the solution of the equation:
2
1
V
D
4

 G ( j )  1.82  N ( M )  0.55  m 1  2  0.55
N (M )
M
M

When Vm=6, D=0.1, solve the above equation, we have:
M  13.90

Conclusion: The oscillation in the system is y (t )  13.90 sin(1.58t )
© H. T. Hoàng - HCMUT
89
Exercise 1

Consider the following nonlinear system:
r(t)=0
+
e(t)
u(t)
y(t)
G(s)
The transfer function of the linear object:
40
G (s) 
( s  2)3
The nonlinear element is a
two-state relay with Vm=10.
Calculate the amplitude and
frequency of the oscillation in the
system, if existing.
© H. T. Hoàng - HCMUT
f(e)
Vm
e
 Vm
90
Exercise 2

Consider the following nonlinear system:
r(t)=0
+
e(t)
u(t)
y(t)
G(s)
The transfer function of the linear object:
20e 0.1s
G (s) 
3s  1
The nonlinear element is a
two-state relay with Vm=12.
Calculate the amplitude and
frequency of the oscillation in the
system, if existing.
© H. T. Hoàng - HCMUT
f(e)
Vm
e
 Vm
91
Exercise 3

Consider the following nonlinear system with a three-state relay
r(t)=0
+
e(t)
u(t)
y(t)
G(s)
f(e)
The transfer function of the linear object:
.
30
G (s) 
s ( s  4) 2
Calculate the amplitude and
frequency of the oscillation when
Vm=10, D=0.1.
© H. T. Hoàng - HCMUT
Vm
e
D
D
V m
92
Exercise 4

Consider the following nonlinear system:
r(t)=0
+
e(t)
u(t)
y(t)
G(s)
The transfer function of the linear object:
50
G (s) 
s ( s  1)( s  4)
The nonlinear element is a
saturation amplifier with Vm=12,
D=1
Calculate the amplitude and
frequency of the oscillation in the
system, if existing.
© H. T. Hoàng - HCMUT
f(e)
Vm
D
D
e
 Vm
93
Example of analysis the oscillation in ON-OFF control system

Consider an ON-OFF temperature control system as follow:
r(t)=150
e(t)
+
ON-OFF
u(t)
G(s)
y(t)
300e 3s
The transfer function of the thermal process: G ( s) 
(10s  1)
The ON-OFF control rules are as follow:
 If
e(t)>100C then u(t) = 1 (100% power is supplied)
 If
e(t)< 100C then u(t) = 0 (no power is supplied)
 If
100C < e(t)< +100C then u(t) is kept unchanged
Analyze the response of the system.
© H. T. Hoàng - HCMUT
94
Example of analysis the oscillation in ON-OFF control system

Solution: The block diagram of the control system:
r(t)=150
+
e(t)
u(t)

y(t)
G(s)
u=f(e)
The ON-OFF control rules can be
described the a two-state relay with
hysteresis as follow
 e(t)>100C
 e(t)<
: u(t) = 1
100C : u(t) = 0
 |e(t)|<
1
100C : u(t) is unchanged
© H. T. Hoàng - HCMUT
e
10
0
10
95
Example of analysis the oscillation in ON-OFF control system

The describing function of the two-state relay with hysteresis:
u=f(e)
1
10
e
0
10
A1  jB1 4Vm
N (M ) 

(cos   j sin  )
M
M
D

sin




M

with: Vm  0.5; D  10
© H. T. Hoàng - HCMUT
96
Example of analysis the oscillation in ON-OFF control system

Steady-state response of the system is an oscillation about
the setpoint.

We have:
4Vm
N (M ) 
(cos   j sin  )
M
300e 3s
G (s) 
10 s  1

4Vm  j
N (M ) 
e
M

300e 3 j
G ( j ) 
10 j  1
© H. T. Hoàng - HCMUT
97
Example of analysis the oscillation in ON-OFF control system

Amplitude and frequency of the oscillation are the solution of
the equation:

1
G ( j )  
1
N (M )

 G ( j )  
N (M )


argG ( j )  arg  1 
 N (M ) 



300
M


(1)

2
4Vm
100

1

 
 tan 1 (10 )  3        sin 1  D 
(2)

M 
D D 100 2  1
(3) 4V
(1) 

N ( M )  m e  j
M
300  4Vm
M
2

 3 j
e
1
1  D 100  1300

(2) & (3)   tan (10 )  3    sin 
G ( j )  
1200
Vm 10

 j  1
© H. T. Hoàng - HCMUT
98
Example of analysis the oscillation in ON-OFF control system

Solve the equation, we have   0.5(rad / s )

Substitute  into (1), we have: M  37.45

Conclusion: The steady-state response of the system is an
oscillation with the fundamental harmonic being:
y1 (t )  37.45 sin(0.5t   )
© H. T. Hoàng - HCMUT
99
Lyapunov stability theory
© H. T. Hoàng - HCMUT
100
Introduction

The Lyapunov method provides a sufficient condition
to analyze the stability of nonlinear systems.

The Lyapunov method can be applied to any
nonlinear systems

It is possible to use Lyapunov theory to design
controllers for nonlinear system.

Lyapunov method has been widely used to analyze
and design nonlinear systems.
© H. T. Hoàng - HCMUT
101
Equilibrium points of nonlinear systems

Consider a nonlinear system described by the state
x  f ( x , u )
equation:

A state xe is called equilibrium point if the system is in
the state xe and there is no external input then the
system will remain in the state xe forever.

It is obviously that the equilibrium points are the
solution to the equation: f ( x , u ) x  xe ,u 0  0

A nonlinear system may have several equilibrium
points or doesn’t have any equilibrium point. This fact
is different from linear system; a linear system always
has 1 equilibrium point at xe = 0.
© H. T. Hoàng - HCMUT
102
Example: Equilibrium point of nonlinear system

u


0
+
l
Consider a pendulum system described
by the following differential equations:
ml 2(t )  B(t )  mgl sin   u (t )
m

Determine the equilibrium points of the
system (if any)

 x1 (t )   (t )
Denote: 

 x2 (t )   (t )

State equation: x (t )  f ( x (t ), u (t ))
where
 x2 (t )


f ( x, u )   g
B
1
 sin x1 (t )  2 x2 (t )  2 u (t ) 
ml
ml
 l

© H. T. Hoàng - HCMUT
103
Example: Equilibrium point of nonlinear system

The equilibrium point (if any) is the solution of the equation:
x  f ( x , u ) x  xe ,u 0  0



 x2 e  0

 g sin x  B x  0
1e
2 2e
 l
ml
 x2 e  0

 x1e  k
2k 
xe  

0


Conclusion: The pendulum system
( 2k  1) 
xe  
has many equilibrium points.

0
 x2 (t )


k 

f ( x, u )   g
B
1
xe   
 sin x1 (t )  2 x2 (t )  2 u (t ) 

0
 
ml
ml
 l

© H. T. Hoàng - HCMUT
104
Simulation: Equilibrium point of pendulum
© H. T. Hoàng - HCMUT
105
Simulation: Equilibrium point of pendulum
xe  [0;0]T
© H. T. Hoàng - HCMUT
xe  [ ;0]T
106
Stability at equilibrium point


Definition: A system is said to be stable at an equilibrium point
xe if after a small intermediate perturbation push the system to
the state x0 in a neighbour of xe then the system will come
back to the equilibrium point xe.
Remark: the stability of nonlinear system must be considered
at a specific equilibrium point. It is possible that a nonlinear
system is stable at one equilibrium point but isn’t stable at
another equilibrium point.
Example
Stable equilibrium point
Unstable equilibrium point
© H. T. Hoàng - HCMUT
107
Simulation: Stability at equilibrium point
x0  [ / 6;0]T
Stable
x0  [5 / 6;0]T
Unstable
© H. T. Hoàng - HCMUT
108
Lyapunov stability

Given an autonomous nonlinear system described by:
x  f ( x , u ) u 0
(1)
Assume that the system has an equilibrium point at xe = 0.

The system is said to be
Lyapunov
stable
at
the
equilibrium point xe = 0 if given
 > 0 there is a  > 0 dependent
on  such that the solution x(t)
of the equation (1) with the
intitial condition x(0) satisfies:
x ( 0)  

x (t )   , t  0
© H. T. Hoàng - HCMUT
109
Lyapunov asymptotic stability

Given an autonomous nonlinear system described by:
x  f ( x , u ) u 0
(1)
Assume that the system has an equilibrium point at xe = 0.

The system is said to be
Lyapunov asymptotically stable at
the equilibrium point xe = 0 if
given  > 0 there is a  > 0
dependent on  such that the
solution x(t) of the equation (1)
with the intitial condition x(0)
satisfies:
x (0) < d

lim x (t ) = 0
t¥
© H. T. Hoàng - HCMUT
110
Lyapunov stability vs asymptotic stability
Lyapunov stability
27 August 2022
Lyapunov asymptotic stability
© H. T. Hoàng - ÐHBK TPHCM
111
Lyapunov linearization method

Given a nonlinear system described by the state equation:
x  f ( x , u )
(1)
Assume that the system has an equilibrium point xe , the
system (1) can be linearized about the equilibrium point xe :
~
(2)
x  A~
x  Bu~

Theorem:
 If
the linearized system (2) is stable then the nonlinear
system (1) is stable at the the equilibrium point xe .
 If the linearized system (2) is unstable then the nonlinear
system (1) is unstable at the the equilibrium point xe .
 If the linearized system (2) is marginally stable then the
stability of the nonlinear system (1) at the equilibrium point
xe can not be concluded.
© H. T. Hoàng - HCMUT
112
Notes

The matrix of the linearized state equation are calculated as
follow:
 f1
 x
 1
 f 2
A   x1
 

 f n
 x1
f1
x2

f 2
x2


f n
x2


f1 
xn 

f 2 
xn 

 

f n 
xn  x= xe
u 0
© H. T. Hoàng - HCMUT
 f1 
 u 
 
 f 2 
B   u 
 
  
 f n 
  x= x
 u  u 0 e
113
Lyapunov linearization method – Example

Consider a pendulum given by the equation:
x (t )  f ( x (t ), u (t ))
u



0
+
l
where:
m

 x2 (t )

B
f ( x, u )   g
1
 sin x1 (t )  2 x2 (t )  2 u (t ) 
ml
ml

 l
Analyze the stability of the system at the equilibrium points:
(a)
0 
xe   
0 
(b)
© H. T. Hoàng - HCMUT
 
xe   
0
114
Lyapunov linearization method – Example (cont.)

Linearized model around the equilibrium point xe = [ 0 0 ]
T
~
x  Ax~  Bu~

f1
a11 
0
x1 ( x 0,u 0)
f1
a12 
x2
g
g
f 2
a21 
  cos x1 (t )

l
l
x1 ( x 0,u 0)
( x 0,u 0 )
a22 
 0
A g
 l
f 2
x2
1
( x 0,u 0 )

( x 0,u 0 )
B
ml 2
1 
B 
 2
ml 
 Characteristic equation:
1 
s
B
g
2
Bx2(t) 0
det( sI  A)  det  g
 B s  12 s   0
s



g
f
x
u
(
,
)
l
ml
2
 l
ml
x
t
x
t
u
t

sin
(
)

(
)

(
)


1
2 2
2
ml
ml
 l

Conclusion: The system is stable (according to Hurwitz criterion)
© H. T. Hoàng - HCMUT
115
Lyapunov linearization method – Example (cont.)
Linearized model around the equilibrium point xe  

~
x  Ax~  Bu~
f1
x2
f
0
a11  1
x1 ( x    ,u 0)
a12 
g
f
g
  cos x1 (t )

a21  2
 
l
x1 ( x   ,u 0)
l
( x    ,u 0 )
f 2
a22 
x2
0
 
0
 

0
A  g
 l
0
 
( x    ,u 0 )
0
 
( x    ,u 0 )
0
0
T
1
B
 2
ml
1 
B 
 2
ml 
 Characteristic equation:
1 
 s
g
B
2
x
t
(
)

g
B


 0 (*)
s
s
2
0 
det( sI  A)  det 
2
l 1
ml

B
u )2  g
 l fs(x ,ml
 sin x1 (t )  2 x2 (t )  2 u (t ) 
l satisfy necessary
ml
ml
 not

Conclusion: The system is unstable ((*) do
conditions)
© H. T. Hoàng - HCMUT
116
Lyapunov direct method – Stability theorem

Lyapunov stability theorem: Given an autonomous nonlinear
system:
x  f ( x , u ) u 0
(1)
Assume that the system has an equilibrium point at xe = 0.
If there exists the function V(x) such that in the set Dn
containing the equilibrium point V(x) satisfies:
i) V ( x )  0, x  D \ {0}
ii)
V ( 0)  0
iii)
V ( x )  0, x  D
Then the system (1) is Lyapunov stable at the equilbrium point.
If V ( x )  0, x  0 then the system is Lyapunov asymptotically
stable at the equlibrium point)

Note: The function V(x) is usually chosen to be a quadratic
function of state variables.
© H. T. Hoàng - HCMUT
117
Quadratic Lyapunov function
x  f ( x , u ) u 0
V ( x )  k1 x12  k2 x22  ...  k2 xn2
i) V ( x )  0
( ki  0)
(x  0)
ii ) V (0)  0
iii ) V ( x )  2k1 x1 x1  2k2 x2 x2  ...  2kn xn xn
If V ( x )  0,
 V ( x) 
 x0
(x  0)
(x  0)
© H. T. Hoàng - HCMUT
118
Notes
V ( x)  0, x  D ,(D  n )
globally Lyapunov stable
V ( x)  0, x  D \ {0},(D  n )
globally asymptotically stable
V ( x)  0, x  D ,(D  n )
locally Lyapunov stable
V ( x)  0, x  D \ {0},(D  n ) locally asymptotically stable
© H. T. Hoàng - HCMUT
119
Lyapunov direct method – Instability theorem

Lyapunov instability theorem: Given an autonomous nonlinear
system:
x  f ( x , u ) u 0
(1)
Assume that the system has an equilibrium point at xe = 0.
If there exists the function V(x) such that in the set Dn
containing the equilibrium point V(x) satisfies:
i)
V ( x )  0, x  D \ {0}
V ( 0)  0
iii) V ( x ) > 0, "x Î D
ii)
Then the system (1) is unstable at the equilbrium point.
© H. T. Hoàng - HCMUT
120
Lyapunov direct method – Example 1

Consider an pendulum described by:
u



0
+
x (t )  f ( x (t ), u (t ))
l
in which:
m
 x2 (t )


1
B
f ( x, u )   g
 sin x1 (t )  2 x2 (t )  2 u (t )
ml
ml
 l

Analyze the stability of the system at the equilibrium points:
(a)
0 
xe   
0 
(b)
© H. T. Hoàng - HCMUT
 
xe   
0
121
Lyapunov direct method – Example 1 (cont.)

(a)
0 
xe   
0 
Choose Lyapunov function:
V ( x )  2sin 0.5 x1 

It is obvious that:
V ( x )  0, x
2
l 2

x2
2g
V ( x )  0 when x  0

Consider V ( x )
l

V ( x )  2 x1 sin 0.5 x1 cos0.5 x1   x2 x2
g
l  g
B

 x2 sin  x1   x2  sin  x1   2 x2 
g  l
ml

 V ( x )  
B 2
x 2  0, x
mgl
 x2 (t )


1
, u )   gstable in at Bthe equilibrium
 Conclusion: The system fis( xglobally
 sin x1 (t )  2 x2 (t )  2 u (t )
T
ml
ml
 l

point xe   0 0
© H. T. Hoàng - HCMUT
122
Lyapunov direct method – Example 1 (cont.)
(b)
 
xe   
0

Hint: Choose an appropriate
Lyapunov function to prove that the
system is unstable
 x2 (t )


1
B
f ( x, u )   g
 sin x1 (t )  2 x2 (t )  2 u (t )
ml
ml
 l

© H. T. Hoàng - HCMUT
123
Lyapunov direct method – Example 2

Consider a nonlinear system described by the state equations:
 x1   x1  x2  x2 ( x12  x22 )

2
2




(

x
x
x
x
x
x
2
1
2
1

1
2)

Determine the equilibrium point of the system and analyze
the stability of the system at the equilibrium point.

Solution

The equilibrium point is the solution to the equation:
 x1  x2  x2 ( x12  x22 )  0

2
2



(

x
x
x
x
x
2)  0
 1 2 1 1

© H. T. Hoàng - HCMUT
 x1e  0
x  0
 2e
124
Lyapunov direct method – Example 2 (cont.)

Choose Lyapunov function:
1 2
V ( x )  ( x1  x22 )
2

We have:
V ( x )  0, x  0
V ( 0)  0
V ( x )  x x  x x
1 1
2 2
 x1[ x1  x2  x2 ( x12  x22 )]  x2 [ x1  x2  x1 ( x12  x22 )]
  x12  x22
 V ( x )  0, x  0
 The system is globally asymptotically
 x1  stable
x1  x2 atx2the
( x12  x22 )

2
2
equilibrium point.
x
x
x
x
x
x




(

2
1
2
1
1
2)

© H. T. Hoàng - HCMUT
125
Lyapunov direct method – Example 3

Consider a nonlinear system describled by the state
equations:
 x1  x2  x1 ( x12  x24 )

2
4
x
x
x
x
x



(

2
1
2

1
2)

Determine the equilibrium point of the system and analyze
the stability of the system at the equilibrium point.

Solution

The equilibrium point is the solution to the equation:
 x2  x1 ( x12  x24 )  0

2
4


(

x
x
x
x
2)  0
 1 2 1

© H. T. Hoàng - HCMUT
 x1e  0
x  0
 2e
126
Lyapunov direct method – Example 3 (cont.)

Choose Lyapunov function:
1 2
V ( x )  ( x1  x22 )
2

We have:
V ( x )  0, x  0
V ( 0)  0
V ( x )  x x  x x
1 1
2 2
 x1[ x2  x1 ( x12  x24 )]  x2 [ x1  x2 ( x12  x24 )]
 ( x12  x22 )( x12  x24 )
 V ( x )  0, x  0
 The system is ustable at the equilibrium xpoint.
 x  x ( x2  x4 )
1
2
1
1
2

2
4



(

x
x
x
x
x
2
1
2

1
2)
© H. T. Hoàng - HCMUT
127
Lyapunov direct method – Example 4

Consider a nonlinear system describled by the state
equations:
 x1  x1 ( x12  x22  1)  x2

2
2



(

x
x
x
x
x
 2
1
2
1
2  1)

Analyze the stability of the system at the equilibrium point
[0,0]T.

Solution
© H. T. Hoàng - HCMUT
128
Lyapunov direct method – Example 4 (cont.)


Choose Lyapunov function:
We have:
1 2
V ( x )  ( x1  x22 )
2
 x1  x1 ( x12  x22  1)  x2

2
2



(

x
x
x
x
x
 2
1
2
1
2  1)
V ( x )  0, x  0
V ( 0)  0
V ( x )  x1 x1  x2 x2
 x1[x1 ( x12 +x22  1)  x2 ]+x2 [x1  x2 ( x12 +x22  1)]
 ( x12 +x22 )( x12 +x22  1)

Consider the set D such that: D   x  2 : x12 +x22  1

It is obviously that: V ( x )  ( x12 +x22 )( x12 +x22  1)  0, x  D
The system is locally asymptotically stable at the equilibrium point
© H. T. Hoàng - HCMUT
129
Feedback linearization control
© H. T. Hoàng - HCMUT
130
Problem statement

Consider a SISO nonlinear system of order n described by:
 x  f ( x )  g ( x )u

 y  h( x )
in which:
x  x1
(1)
(2)
x2  xn    n : state vector of the system
T
u   : input signal
y   : output signal
f ( x )   n , g ( x ) n , h( x )   : smooth functions describing the
system dynamics

The problem is to control the output signal y(t) tracking the
reference input yd(t)
© H. T. Hoàng - HCMUT
131
Idea to design feedback linearization controller
yd(t)
Tracking
control
v
Feedback
linearizarion
u
y
Nonlinear
system
x

Two control loops
 Inner control loop: Feedback linearizarion controller
transforming the nonlinear system into a virtual linear
object.

Outer control loop: Tracking controller designed based on
classical linear control theory.
© H. T. Hoàng - HCMUT
132
Input – output relationship of nonlinear systems

If the nonlinear system has the relative degree of n, by taking
the derivative of the Equ (2) n times, the input-output
relationship of the system can be described by:
y ( n )  a ( x )  b( x )u
a( x )  Lnf h( x )
in which:
b( x )  Lg Lnf1h( x )  0
 h( x )
h( x ) 
h( x )
T


f
x
f
x
L f h( x ) 
. f ( x)  
,,
(
),

(
)
n
 1
x
x


x
1
n 

(Lie derivative of function h(x) along thr vector f(x))
Lkf h( x ) 
Lkf1h( x )
Lg Lkf h( x ) 
. f ( x)
x
Lkf h( x )
x
.g ( x )
© H. T. Hoàng - HCMUT
133
Example 1

u



0
+

l
State variables: x1 (t )   (t ); x2 (t )  (t )
The state equation describing the dynamics
of the pendulum:
 x1 (t )  x2 (t )

 x2 (t )  u (t )  bx2 (t )  mgl sin x1 (t )
y (t )  x1 (t )
m
Taking the derivatives of the output signal:
y (t )  x1 (t )  x2 (t )

y (t )  x2 (t )  u (t )  bx2 (t )  mgl sin x1 (t )

Denote a ( x )  bx2 (t )  mgl sin x1 (t ) and b( x )  1

y (t )  a ( x )  b( x )u (t )
© H. T. Hoàng - HCMUT
134
Example 2
Given a system described by the state equation:
 x1  x2

 x2  2sin( x1 )  3 x3

2
2




(1
x
x
x
3
1 )u
 3
y  x1
Take the derivatives of the output signal:
y  x1  x2

y  x2  2sin( x1 )  3 x3

y  2 x1 cos( x1 )  3 x3  2 x2 cos( x1 )  3[ x32  (1  x12 )u ]
 2 x2 cos( x1 )  3 x32  3(1  x12 ) u  a( x )  b( x )u


 
b( x )
a( x )
© H. T. Hoàng - HCMUT
135
Feedback linearization control law

Feedback linearization control law:
v
y
1
 a( x )  v(t )
u( x) 
b( x )
u (n)
1
[a ( x )  v]
u
y  a ( x )  b( x )u
b( x )
x
(n)
 y (n)
y
 1

(a ( x )  v(t )) 
 a ( x )  b( x )u  a ( x )  b( x ) 
 b( x )

 v(t )
© H. T. Hoàng - HCMUT
136
Feedback linearization control law

1
 a( x )  v(t )
u( x) 
b( x )
Feedback linearization control law:
v
v
u (n)
1
[a ( x )  v]
u
y  a ( x )  b( x )u
b( x )
x
y
(n)
v
y
V(s)
1
sn
y
Y(s)
 The nonlinear system with input u(t) is transformed into a
linear object with input v(t)
 Design tracking controller the for linear object
© H. T. Hoàng - HCMUT
137
Tracking controller for the linearized object
sn
Yd(s)
+
E(s)
k1s
n 1
 k2 s
n2
 ...  k n
V(s) 1
+
+
sn

Error: e  yd  y

Tracking controller: v  y d( n )  [k1e ( n 1)  k 2 e ( n 2 )  ...  k n e]
Y(s)
y ( n )  v(t )
 y ( n )  yd( n )  [k1e( n1)  k2e( n  2)  ...  kn e]
 e( n )  k1e( n 1)  k2e( n 2)  ...  kn e  0
 s n E ( s )  k1s n 1E ( s )  k1s n  2 E ( s )  ...  kn E ( s )  0
 [ s n  k1s n1  k1s n  2  ...  kn ]E ( s )  0
© H. T. Hoàng - HCMUT
138
Tracking controller for the linearized object
sn
Yd(s)
+
E(s)
k1s
n 1
 k2 s
n2
 ...  k n
V(s) 1
+
+
sn

Error: e  yd  y

Tracking controller: v  y d( n )  [k1e ( n 1)  k 2 e ( n 2 )  ...  k n e]
Y(s)
Assumption: The ref. signal has bounded derivative of order n
( s n  k1s n 1  k 2 s n  2  ...  k n ) E ( s)  0

Error dynamics:

Charateristic polynomial: ( s)  s n  k1s n 1  k 2 s n  2  ...  k n
Chose ki (i=1,n) such that (s) being Hurwitz, meaning that
all the roots of (s) = 0 are in the left half s-plane.
 The closed loop system is stable and e(t)0 when t.

© H. T. Hoàng - HCMUT
139
Notes

The roots of (s)=0 determines the transient response when
e(t) comes to zero.

The tracking control signal v(t) requires the reference signal
yd(t) having bounded derivative up to order n.

Square reference signal: the derivative at the time instants
when the signal changing level is infinitive. In this case, the
square reference signal should go through a low pass filter of
order n to have a new reference signal with bounded derivative.
However, the low pass filter could slow down the response of
the system.

The control result is not good, or even the system is unstable if
the mathematical model used in the feedback linearization
design does not describe exactly the dynamics of the nonlinear
system.
© H. T. Hoàng - HCMUT
140
Procedure to design feedback linearization controllers

Step 1: Represent the input-output relationship of the nonlinear
system in the form: y ( n )  a ( x )  b( x )u

Step 2: Write the feedback linearization control law:
u( x) 
1
 a( x )  v(t )
b( x )

Step 3: Write the tracking control law:
v  y d( n )  [k1e ( n 1)  k 2 e ( n 2 )  ...  k n e]
with: e  yd  y

Step 4: Chose the parameters of the tracking controller so that
( s)  s n  k1s n 1  k 2 s n  2  ...  k n
is a Hurwitz polynomial, and satisfied desired performances.

Step 5: Design a low pass filter for the reference signal to
ensure that yd(t) has bounded derivative up to order n.
© H. T. Hoàng - HCMUT
141
Feedback linearization control – Example 1




Given a nonlinear system described by the state equations:
 x1  2 x1  3 x2  sin( x1 )

 x2   x2 cos( x1 )  u cos(2 x1 )
y  x1
Design a feedback linearization controller such that the closedloop system has a pair of poles at  3  j 3
Solution:
Step 1: Take the derivative of the output signal:
y  x1
 y  2 x1  3x2  sin( x1 )
y  2 x1  3x2  x1 cos( x1 )  (2  cos( x1 )) x1  3x2
 y  (2  cos( x1 ))(2 x1  3x2  sin( x1 ))  3x2 cos( x1 )  3u cos(2 x1 )
 y  4 x1  6 x2  2 sin( x1 )  2 x1 cos( x1 )  sin( x1 ) cos( x1 )  3u cos(2 x1 )
© H. T. Hoàng - HCMUT
142
Feedback linearization control – Example 1 (cont.)

(1)
y  a( x )  b( x ).u
with a ( x )  4 x1  6 x2  2 sin( x1 )  2 x1 cos( x1 )  sin( x1 ) cos( x1 )
b( x )  3 cos(2 x1 )

Step 2: Write the feedback linearization control law:
u

1
(a( x )  v)
b( x )
(2)
Step 3: Write the tracking control law:
v  yd  (k1e  k 2 e)
(3)
with e  yd  y
y  4 x1  6 x2  2 sin( x1 )  2 x1 cos( x1 )  sin( x1 ) cos( x1 )  3u cos(2 x1 )
© H. T. Hoàng - HCMUT
143
Feedback linearization control – Example 1 (cont.)

Step 4: Calculate the parameters of the tracking controller:
The charateristic equation of the error dynamics:
s 2  k1s  k 2  0
(4)
The desired characteristic equation:
( s  3  j 3)(s  3  3 j )  0
 s 2  6s  18  0
(5)
Balancing (4) and (5), we have:
k1  6
k 2  18

1
Step 5: Design the low pass filter: GF ( s) 
(TF  1)2
with TF  0.1
© H. T. Hoàng - HCMUT
144
Feedback linearization control – Example 1 (cont.)
Simulation of feedback linearization control system
© H. T. Hoàng - HCMUT
145
Feedback linearizarion control – Example 1 (cont.)
Simulation of the feedback linearizarion control block
© H. T. Hoàng - HCMUT
146
Feedback linearizarion control – Example 1 (cont.)
Simulation of the tracking control block
© H. T. Hoàng - HCMUT
147
Feedback linearizarion control – Example 1 (cont.)
Control result when the input is a square signal
© H. T. Hoàng - HCMUT
148
Feedback linearizarion control – Example 1 (cont.)
Control result when the input is a sinusoidal signal
© H. T. Hoàng - HCMUT
149
Feedback linearization control – Example 2

u




0
ml 2(t )  B(t )  mgl sin   u (t )
l


m
+
Consider a pendulum system described by:
Design a feeback linearization controller
such that the response to step input
satisfying POT<10%, ts < 0.3 (5% criterion)
Solution:
Chose the state variables x1   ; x2   , output signal: y    x1
Step 1: Take the derivative of the output signal:
 y  x2
y  x1
y  x2
g
l
 y   sin( x1 ) 
B
1
x  2u
2 2
ml
ml
© H. T. Hoàng - HCMUT
150
Feedback linearization control – Example 2 (cont.)

(1)
y  a( x )  b( x ).u
1
b( x )  2
ml
B
g
with a ( x )   sin( x1 )  2 x2
l
ml

Step 2: Write the feedback linearization control law:
1
u
(a( x )  v)
b( x )

(2)
Step 3: Write the tracking control law for 2nd order system:
v  yd  (k1e  k 2 e)
(3)
with e  yd  y
y  
© H. T. Hoàng - HCMUT
1
B
g
sin( x1 )  2 x2  2 u
l
ml
ml
151
Feedback linearization control – Example 2 (cont.)

Step 4: Calculate the parameters of the tracking controller
The characteristic equation of the error dynamics:
s 2  k1s  k 2  0
(4)
From the desired performance:
  
POT  exp
 1  2

ts 
4
n
 0.3

  0.1    0.59


 Chose   0.7
 n  19.05  Chose n  25
© H. T. Hoàng - HCMUT
152
Feedback linearizarion control – Example 2 (cont.)
The desired characteristic equation:
s 2  2n s  n2  0
 s 2  35s  625  0
(5)
Balancing (4) and (5), we have:
k1  35
k 2  625

Step 5: Design the low pass filter for the reference signal
1
GLF ( s) 
(0.1s  1) 2
© H. T. Hoàng - HCMUT
153
Feedback linearization control – Example 2 (cont.)
Simulation of the feedback linearization control system
© H. T. Hoàng - HCMUT
154
Feedback linearization control – Example 2 (cont.)
Simulation result when the reference input is a square signal
© H. T. Hoàng - HCMUT
155
Feedback linearization control – Example 2 (cont.)
Simulation result when the reference input is a sinusoidal signal
© H. T. Hoàng - HCMUT
156
Feedback linearization control – Example 3
Magnetic leviation system
R,
L
u(t)
y(t)
0.4m

M
i(t)
d=0.03
m
u(t): voltage applied to the coil [V]
(input signal)
y(t): position of the ball [m] (output)
i(t): current in the coil [A]
M = 0.01 kg mass of the ball
g = 9.8 m/s2 gravitational constant
R = 30  resistance of the coil
L = 0.1 H inductance of the coil
Mathematical model of the magnetic leviation system:
 d 2 y (t )
i 2 (t )
 Mg 
M
2
y (t )
dt

 L di (t )  Ri(t )  u (t )
 dt

Design a feedback linearization controller to control the position
of the ball tracking a square or sinusoidal reference signal
© H. T. Hoàng - HCMUT
157
Feedback linearization control – Example 3 (cont.)

Solution:

Chose the state variables: x1 (t )  y (t ), x2 (t )  y (t ), x3 (t )  i (t )
x1  x2
 The state equations:

x32
x2  g 
Mx1
R
1
x3   x3  u (t )
L
L
Step 1: Take the derivatives of the output signal, we have:
y (t )  x1 (t )  x2 (t )
x32
y(t )  x2 (t )  g 
 d 2 y (t )
i 2 (t )
M
 Mg 
Mx1
2
1
 R
 
2
y (t )
 2 x3   x3  u (t )  x1  x3dt
x2
2
 2 x3 x3 x1  x3 x1
di(t )
L
L



L
 Ri(t )  v(t )
y(t ) 

2
2

 dt
Mx1
Mx1
© H. T. Hoàng - HCMUT
158
Feedback linearization control – Example 3 (cont.)

(1)
y  a( x )  b( x ).u
x32 (2 Rx1  Lx2 )
with a ( x ) 
MLx12

2 x3
b( x )  
MLx1
Step 2: Write the feedback linearization control law:
1
u
(a( x )  v)
b( x )

(2)
Step 3: Write the tracking control law for 3rd order system:
v  yd  (k1e  k 2 e  k3e)
(3)
with e  yd  y
27 August 2022
© H. T. Hoàng - ÐHBK TPHCM
159
Feedback linearization control – Example 3 (cont.)

Step 4: Calculate the parameters of the tracking controller
Characteristic equation of the error dynamics:
s 3  k1s 2  k 2 s  k3  0
(4)
Chose the roots of the charateristic equation at 20:
( s  20)3  0
 s 3  60s 2  1200s  8000  0
(5)
Balancing (4) and (5), we have:
k1  60, k 2  1200, k3  8000

Step 5: Design a 3rd low pass filter for the reference signal:
1
GLF ( s) 
(0.1s  1)3
© H. T. Hoàng - HCMUT
160
Feedback linearization control – Example 3 (cont.)
Simulation of the feedback linearization control
of the magnetic leviation system
© H. T. Hoàng - HCMUT
161
Feedback linearization control – Example 3 (cont.)
0.4
y(t)
0.3
0.2
y d(t)
0.1
y(t)
0
0
2
4
6
8
10
12
14
16
18
20
0
2
4
6
8
10
12
14
16
18
20
8
u(t)
6
4
2
0
Simulation result: the position of the ball follows
the square reference signal
© H. T. Hoàng - HCMUT
162
Feedback linearization control – Example 3 (cont.)
0.4
y d(t)
y(t)
0.3
y(t)
0.2
0.1
0
0
2
4
6
8
10
12
14
16
18
20
0
2
4
6
8
10
12
14
16
18
20
6
u(t)
4
2
0
Simulation result: the position of the ball follows
the sinusoidal reference signal
© H. T. Hoàng - HCMUT
163
Sliding Mode Control
© H. T. Hoàng - HCMUT
164
Problem statement

Consider a SISO nonlinear system of order n described by:
 x  f ( x )  g ( x )u

 y  h( x )
in which:
x  x1
(1)
(2)
x2  xn    n : state vector of the system
T
u   : input signal
y   : output signal
f ( x )   n , g ( x )  n , h( x )   : smooth functions describing the
system dynamics

The problem is to control the output signal y(t) tracking the
reference input yd(t)
© H. T. Hoàng - HCMUT
165
Input – output relationship of nonlinear systems

If the nonlinear system has the relative degree of n, by taking
the derivative of the Equ (2) n times, the input-output
relationship of the system can be described by:
y ( n )  a ( x )  b( x )u
a( x )  Lnf h( x )
in which:
b( x )  Lg Lnf1h( x )  0
 h( x )
h( x )
h( x ) 
T


L f h( x ) 
. f ( x)  
,,
f
(
x
),

f
(
x
)
n
 1
x


x
x
n 
1

(Lie derivative of function h(x) along thr vector f(x))
Lkf h( x ) 
Lkf1h( x )
Lg Lkf h( x ) 
. f ( x)
x
Lkf h( x )
x
.g ( x )
© H. T. Hoàng - HCMUT
166
Sliding mode control concept
e(t )  yd (t )  y (t )

Error:

  e ( n 1)  k1e ( n  2 )  ...  k n  2 e  k n 1e
Denote:
in which ki are chosen such that ( s)  s n 1  k1s n  2  ...  k n  2 s  k n 1
is a Hurwitz polynomial; the location of the roots of (s) = 0
determine the transient response of e(t)0 when  = 0
σ =0 is called the sliding surface,
(s) is the characteristic polynomial of the sliding surface
σ(s)

1
s n 1  k1s n  2  ...  k n  2 s  k n 1
E(s)
The problem of controlling the output signal y(t) tracking the
reference signal yd(t) is converted to the problem of finding
the control signal u(t) such that σ  0
© H. T. Hoàng - HCMUT
167
Lyapunov function
1 2
 Chose Lyapunov function:
V 
2
 Derivative of the Lyapunov function: V  

In order to have σ  0, the control signal u(t) could be chosen
such that V  0

Because   e ( n 1)  k1e ( n  2 )  ...  k n  2 e  k n 1e
  e ( n )  k1e ( n 1)  ...  k n  2 e  k n 1e
then
   yd( n )  y ( n )  k1e ( n 1)  ...  k n  2 e  k n 1e

Note that:
y ( n )  a ( x )  b( x )u
   yd( n )  a ( x )  b( x )u  k1e ( n 1)  ...  k n  2 e  k n 1e
© H. T. Hoàng - HCMUT
168
Sliding mode control law

Chose u(t) such that:
 u

   Ksign ( )

(K>0)
1
 a ( x )  yd( n )  k1e ( n 1)  ...  k n  2 e  k n 1e  Ksign ( )
b( x )

With the above control signal, we have:
V     Ksign ( )   K 
 V  0   0
σ0
e0
  yd( n )  a ( x )  b( x )u  k1e ( n 1)  ...  k n  2 e  k n 1e
© H. T. Hoàng - HCMUT
169
Phase trajectory of sliding mode control system
 0
e
 0
e
Ideally, phase trajectory
moves along the sliding
surface to the origin
e
e
Practically, phase trajectory
oscillates about the sliding
surface causing chattering
phenomenon
© H. T. Hoàng - HCMUT
170
Procedure to design sliding mode controllers

Step 1: Represent the input – output relationship of the system
in the form:
y ( n )  a ( x )  b( x )u

Step 2: Chose the sliding surface   e ( n 1)  k1e( n  2)  ...  kn 1e
in which ki are chosen such that ( s)  s n1  k1s n2  ...  kn2 s  kn1
is a Hurwitz polynomial; the further the roots of ( s)  0 from
the imaginary axis, the faster response e(t)0 when  = 0


Step 3: Write the sliding mode control law:
1
u
 a ( x )  yd( n )  k1e ( n 1)  ...  k n  2 e  k n 1e  Ksign ( )
b( x )


in which K>0; the larger the value of K, the faster the response
 0
Step 4: Design the low pass filter for the reference input to
ensure that yd(t) has bounded derivative up to order n.
© H. T. Hoàng - HCMUT
171
Note 1

It is possible to replace the sign() function by sat()
function or other smooth function to reduce the
chattering phenomenon
sign(x)
1
sat(x)
1
1
x
© H. T. Hoàng - HCMUT
1
x
172
Note 2

There are different versions of sliding mode controllers
depending on the mathematical model of nonlinear
systems and control requirement

Basic principles in designing sliding mode controllers:
 Define sliding surface being a function of tracking
error or system states.
 Chose a Lyapunov function being a quadratic
function of sliding surface

Chose sliding control signal such that the time
derivative of the Lyapunov function is negative.
© H. T. Hoàng - HCMUT
173
Sliding mode control – Example 1

u




0
+
Consider a pendulum system described by:
ml 2(t )  B(t )  mgl sin   u (t )
l
m

with m  0.1( kg) l  1( m ) B  0.01(N.m.s/rad )
Design a sliding mode controller to control
the angle of the pendulum tracking a
reference signal.
Solution:
Define the state variables x1   ; x2  , output signal y    x1
Step 1: Take the derivatives of the output signal:
y  x1
y  x1  x2
g
B
1
 y   sin( x1 )  2 x2  2 u
ml
ml
l

© H. T. Hoàng - HCMUT
174
Sliding mode control – Example 1 (cont.)

(1)
y  a( x )  b( x ).u
1
b( x )  2
ml
B
g
with a ( x )   sin( x1 )  2 x2
l
ml

Step 2: Sliding surface:
with e  yd  y
  e  k1e
Characteristic function of the sliding surface: s  k1  0
Chose the pole of the sliding surface at 500, then: k1  500

Step 3: The sliding control law

1
u
 a ( x )  yd  k1e  Ksign ( )
b( x )
Chose: K  1000
y  
© H. T. Hoàng - HCMUT

1
B
g
sin( x1 )  2 x2  2 u
l
ml
ml
175
Sliding mode control – Example 1 (cont.)

Step 4: Design the low pass filter for the reference signal
Chose a second order low pass filter to ensure that yd(t) has
bounded derivatives up to order 2. The transfer function of the
low pass filter is:
1
GLF ( s) 
(0.03s  1) 2
© H. T. Hoàng - HCMUT
176
Sliding mode control – Example 1 (cont.)
Simulation of the sliding mode control system
© H. T. Hoàng - HCMUT
177
Sliding mode control – Example 1 (cont.)
Simulation of the sliding mode control law
© H. T. Hoàng - HCMUT
178
Sliding mode control – Example 1 (cont.)
Simulation result when the input is a square signal

The output of the system y(t) tracks the reference signal yd(t)
very well
© H. T. Hoàng - HCMUT
179
Sliding mode control – Example 1 (cont.)
Simulation result when the input is a square signal

Sliding mode control is robust to modelling error. When the
mass of the pole increases 10 times (=1kg), control
performance is nearly unchanged
© H. T. Hoàng - HCMUT
180
Sliding mode control – Example 1 (cont.)
Simulation result when the input is a square signal

The main drawback of the sliding mode control is the chattering
phenomenon (i.e. control signal switches at high frequency). The
phenomenon could reduces the lifetime of mechanical components.
© H. T. Hoàng - HCMUT
181
Sliding mode control – Example 1 (cont.)
Simulation result when the input is a square signal

When replacing the sign() by the sat() function, the chattering
phenomenon is eliminated while the robustness and performances
of the sliding mode control system are still ensured.
27 August 2022
© H. T. Hoàng - ÐHBK TPHCM
182
Sliding mode control – Example 2
Magnetic leviation system
R,
L
u(t)
y(t)
0.4m

M
i(t)
d=0.03
m
u(t): voltage applied to the coil [V]
(input signal)
y(t): position of the ball [m] (output)
i(t): current in the coil [A]
M = 0.01 kg mass of the ball
g = 9.8 m/s2 gravitational constant
R = 30  resistance of the coil
L = 0.1 H inductance of the coil
Mathematical model of the magnetic leviation system:
 d 2 y (t )
i 2 (t )
 Mg 
M
2
y (t )
dt

 L di (t )  Ri(t )  u (t )
 dt

Design a sliding mode controller to control the position of the
ball tracking a square or sinusoidal reference signal
© H. T. Hoàng - HCMUT
183
Sliding mode control – Example 2 (cont.)

Solution:

Chose the state variables: x1 (t )  y (t ), x2 (t )  y (t ), x3 (t )  i (t )
x1  x2
 The state equations:

x32
x2  g 
Mx1
R
1
x3   x3  u (t )
L
L
Step 1: Take the derivatives of the output signal, we have:
y (t )  x1 (t )  x2 (t )
x32
y(t )  x2 (t )  g 
 d 2 y (t )
i 2 (t )
 Mg 
M
Mx1
2
1
 R
 
2
y (t )
 2 x3   x3  u (t )  x1  x3dt
x2
2
 2 x3 x3 x1  x3 x1
di (t )
L
L



 Ri (t )  v(t )
L
y(t ) 

2
2

 dt
Mx1
Mx1
© H. T. Hoàng - HCMUT
184
Sliding mode control – Example 2 (cont.)

(1)
y  a( x )  b( x ).u
x32 (2 Rx1  Lx2 )
with a ( x ) 
MLx12

Step 2: Sliding surface
with e  yd  y
2 x3
b( x )  
MLx1
  e  k1e  k 2 e
2
Characteristic equation of the sliding surface: s  k1s  k 2  0

Chose the roots of the characteristic equation at 10, 10
 k1  20, k 2  100
Step 3: Sliding mode control law
1
1
R

u
 a ( x )  yd  k1e k22xe3 Ksign
x3 ( ) u (t )  x1  x32 x2
b( x )
L
 L

y 
2
Mx
Chose: K  50
1


© H. T. Hoàng - HCMUT
185
Sliding mode control – Example 2 (cont.)

Step 4: Design low pass filter for reference signal
Chose a third order low pass filter to ensure that yd(t) has
bounded derivatives up to order 3. The transfer function of the
low pass filter is:
1
GLF ( s ) 
3
(0.1s  1)
© H. T. Hoàng - HCMUT
186
Sliding mode control – Example 2 (cont.)
Simulation of the sliding mode control
of the magnetic leviation system
© H. T. Hoàng - HCMUT
187
Sliding mode control – Example 2 (cont.)
Simulation of the sliding mode control block
© H. T. Hoàng - HCMUT
188
Sliding mode control – Example 2 (cont.)
Simulation result when the input is a square signal
0.4
y(t)
0.3
0.2
y d(t)
0.1
y(t)
0
0
5
10
15
20
25
30
35
40
0
5
10
15
20
25
30
35
40
8
u(t)
6
4
2
0

The position y(t) of the ball follows the reference signal yd(t)
very well
© H. T. Hoàng - HCMUT
189
Sliding mode control – Example 2 (cont.)
Simulation result when the input is a square signal
8
u(t)
6
4
2
0
0
5
10
15
20
25
30
35
40
u(t)
3.5
3
2.5
23.52 23.54 23.56 23.58

23.6
23.62 23.64 23.66 23.68
23.7
The main drawback of the sliding mode control is the chattering
phenomenon (i.e. control signal switches at high frequency).
© H. T. Hoàng - HCMUT
190
Sliding mode control – Example 2 (cont.)
Simulation result when the input is a square signal
0.4
y(t)
0.3
0.2
y d(t)
0.1
y(t)
0
0
5
10
15
20
25
30
35
40
0
5
10
15
20
25
30
35
40
8
u(t)
6
4
2
0

When replacing the sign() by the sat() function, the chattering
phenomenon is eliminated while the robustness and performances
of the sliding mode control system are still ensured.
© H. T. Hoàng - HCMUT
191
Sliding mode control – Example 2 (cont.)
Simulation result when the input is a sinusoidal signal
0.4
y d(t)
y(t)
0.3
y(t)
0.2
0.1
0
0
5
10
15
20
25
30
35
40
0
5
10
15
20
25
30
35
40
6
u(t)
4
2
0

The ball follows the reference signal yd(t) very well, the chattering
phenomenon does not appear when the sat() function is used to
replace the sign() function
© H. T. Hoàng - HCMUT
192
Learning outcomes
After finishing chapter 2, students should be able to:
 Analyze oscillation modes in nonlinear systems
 Analyze the stability of nonlinear systems using Lyapunov
theorem
 Design feedback linearization controllers
 Design sliding mode controllers
© H. T. Hoàng - HCMUT
193
Download