Model reference control using sliding mode with Hamiltonian dynamics
R. J. Stonier J. Zajaczkowski
∗(Received 11 December 2000; revised 24 February 2003)
Abstract
Model reference control and model reference adaptive control has since its inception, found application in a wide range of applications from the control of simple mechanical structures to the more complex robotic manipulators. Sliding mode techniques largely simplify the task of tracking the reference model and are capable of accommodat- ing the uncertainties present in the dynamics of the system. In this paper we are concerned with model tracking in finite time for plant and reference model which are given in Hamiltonian format. The method is applied to nonlinear plant and linear model, with partic- ular application to robot control. We also include the addition of a stabilising supervisory controller in terms of the Hamiltonian of the reference model.
∗School of Mathematics and Decision Science, Central Queensland University, Rockhampton, Queensland 4702, Australia. mailto:[email protected]
Seehttp://anziamj.austms.org.au/V45/E056/home.htmlfor this article, c Aus- tral. Mathematical Soc. 2003. Published December 14, 2003 ISSN 1446-8735
Contents
1 Introduction E2
2 Model reference control
MRCE5
2.1 Assumptions . . . . E5 2.2 Control law —
MRC. . . . E6 2.3 Robot illustration —
MRC. . . . E8 2.4 Control law for robotic example —
MRC. . . . E12 3 Model reference adaptive control —
MRACE16 3.1 Control and adaptation law in
MRAC. . . . E17 3.2 Convergence . . . . E18 3.3 Robot illustration —
MRAC. . . . E19 3.4 Control and adaptation law . . . . E20
4 Stability E24
4.1 Supervisory controller . . . . E24 4.2 Stable controller for sliding mode . . . . E26 4.3 Robot illustration . . . . E31 4.4 Computer simulation with supervisory controller . . . . E35 4.5 Asymptotic stability versus sliding mode . . . . E35
5 Conclusions E39
References E40
1 Introduction
Model reference control (mrc) and model reference adaptive control (mrac)
has a wide range of applications from the control of simple mechanical struc-
tures to the control of complex robotic manipulators. Specifically, it has
proven its practicality in control systems with constant or slowly-varying pa- rameters. A whole range of different formalisms may be used to synthesise an adaptation mechanism. Sliding mode techniques largely simplify the task of tracking the reference model and are capable of accommodating the uncer- tainties present in the dynamics of the system. We use the Lyapunov method and sliding mode dynamics to determine controllers for (adaptive) tracking in finite time and also give sufficient conditions to ensure that the resulting system is stable.
Using the Hamiltonian formulation immediately provides a control system in standard state space format. Further, position and momentum coordinates are conjugate variables and the Hamiltonian itself is related to the energy of the system (in conservative systems it represents directly total energy of the system). Model reference control in Hamiltonian formulation [3] uses a Hamiltonian function and Lyapunov asymptotic stability techniques for mrc with no reference to sliding mode. (An earlier formulation has been presented by Skowronski [2].)
We begin by setting the Hamiltonian structure for the plant and model.
The plant is described by Hamiltonian canonical equations:
˙
q
i= ∂H
p(q, p, a)
∂p
i,
˙
p
i= − ∂H
p(q, p, a)
∂q
i+ Q
Di(q, p, d) + Q
Fi(q, p, a, u) , (1) where i = 1, . . . , n (we assume that n = 2) and H
pis the Hamiltonian of the system, Q
Diis a damping force, Q
Fiis an external force, u is a control vector, and a = [a
1, . . . , a
k], k ≤ n , is a vector of adjustable plant parameters.
For technical reason we expand the vector a to a dimension n by assuming
a
j= 0 for n ≥ j > k . We also assume that damping coefficients represented
by vector d = [d
1, . . . , d
n] may be polluted by uncertainty, and thus not
known in exact form. The output state is x = [ q p ]
T. In mrc we assume
no uncertainty present in the system, and no adaptation parameters.
The reference model is designed as another Hamiltonian system with Hamiltonian H
m, and output x
m= [ q
mp
m]
T. In this model the damping force and external force are assumed to be known functions of time and are such that the reference model is Lagrange stable, that is, the model output is bounded:
˙
q
mi= ∂H
m(q
m, p
m)
∂p
mi,
˙
p
mi= − ∂H
m(q
m, p
m)
∂q
mi+ Q
Dmi
(q
m, p
m, d
m) + Q
Fmi
(q
m, p
m, u
m). (2) Define the state error vector e = [ e
qe
p]
Tas
e
qi(t) = q
i(t) − q
mi(t) ,
e
pi(t) = p
i(t) − p
mi(t) , i = 1, . . . , n . (3) The rate of change of e is
˙
e
qi= ∂H
p(q, p, a)
∂p
i− ∂H
m(q
m, p
m)
∂p
mi,
˙
e
pi= − ∂H
p(q, p, a)
∂q
i+ ∂H
m(q
m, p
m)
∂q
mi+ Q
Di(q, p, d)
− Q
Dmi
(q
m, p
m, d
m) + Q
Fi(q, p, a, u) − Q
Fmi
(q
m, p
m, u
m) , i = 1, . . . , n . Note that error dynamics are not given in standard (canonical) Hamiltonian format as described in Skowronski [2].
To attempt to design control and adaptation laws in such a general form
as shown above would be impractical and so we consider a special form of the
dynamic Equations (1) and (2) which holds reasonable generality, in order
to find a suitable control and adaptation law in both mrc and mrac. We
begin first with Model Reference Control (without adjustable parameters a).
2 Model reference control
MRCLet us define the sliding mode variable s for our second order system:
s
i= ˙e
qi+ λe
α/βqi
, i = 1, . . . , n , where α and β are odd positive integers, α < β .
Consider the traditional Lyapunov function as a quadratic form of sliding mode variables:
V (s) = 1 2
n
X
i=1
s
2i. (4)
Denote by E
qi, E
pithe right-hand side of the Equation (1) and by E
qmi, E
pmithe right-hand side of the Equation (2). Then by definition
˙e
qi= E
qi− E
qmi,
¨
e
qi= E ˙
qi− ˙ E
qmi, i = 1, . . . , n . (5)
2.1 Assumptions
Reference model has its equilibria in the origin. The dynamics of the system satisfies
˙
q
i= g
i(q)p
i,
˙
q
mi= g
mi(q
m)p
mi, i = 1, . . . , n , (6) where each g
i(·), g
mi(·), for i = 1, . . . , n is a known bounded positive function.
Let us make a further assumption that ˙ E
qican be expressed as a linear function of E
pi, i = 1, 2, with coefficient functions f
i1and f
i2:
E ˙
qi= f
i1(q, p)E
pi+ f
i2(q, p) , i = 1, . . . , n , (7)
and where each f
i1(·), for i = 1, . . . , n is a known bounded positive function:
0 ≤ |f
i1(q, p)| ≤ B , (8)
and B is a positive constant. A wide range of mechanical systems satisfy condition (6) and condition (7). Note that the control force is incorporated in E
piterms, see Equation (1).
2.2 Control law —
MRCNow we calculate the time derivative of the Lyapunov function in order to extract the control law:
V (s) = ˙
n
X
i=1
s
i˙s
i=
n
X
i=1
s
i¨ e
qi+ α
β λ ˙e
qie
α/β−1qi
!
=
n
X
i=1
s
ihf
i1(q, p)E
pi+ f
i2(q, p) − ˙ E
qmi+ α
β λe
α/β−1qiE
qi− E
qmi#
=
n
X
i=1
s
i"
f
i1(q, p) − ∂H
p(q, p)
∂q
i+ Q
Di(q, p, d) + Q
Fi(q, p, u)
!
+ f
i2(q, p) − ˙ E
qmi+ α
β λe
α/β−1qiE
qi− E
qmi#
. (9)
The control laws are designed as follows:
Q
Fi= ∂H
p∂q
i− Q
Di(q, p, d)
− 1
f
i1f
i2(q, p) − ˙ E
qmi+ α
β λe
α/β−1qi
E
qi− E
qmi!
− K
f
i1sgn(s
i) , i = 1, . . . , n , (10)
where K > 0 is constant.
Substituting for Q
Fifrom the control law (10) into Equation (9), see that the control law selection makes the Lyapunov derivative semi-negative definite:
V (s) = − ˙
n
X
i=1
s
iKsgn(s
i) = −K
n
X
i=1
|s
i| ≤ −K
n
X
i=1
s
2i!1/2
= − √
2KV
1/2≤ 0 . (11)
Obviously ˙ V = 0 only if s = 0 . This implies that V reaches the sliding surface in finite time T . Indeed, integrating inequality (11), we find that T must satisfy the inequality:
T ≤ t
0+
√ 2 (V (t
0))
1/2K .
Given the expression (9) for ˙ V , to show that s → 0 it is sufficient to show that ˙ V → 0 . First, we establish that s and ˙s are bounded (that in turn shows that ¨ V remains bounded and according to Barbalat’s lemma we have ˙ V → 0). Given Equation (11) obviously s and ˙s are bounded, see also expression (9). Thus s → 0 as t → ∞ . This in turn implies that error trajectories e
qi, i = 1, . . . , n , tend to 0 as t → ∞ . Now, from (6) and the fact that ˙e
qi, i = 1, . . . , n , tend to 0 as t → ∞ (see definition of s), we see that also e
pi, i = 1, . . . , n , tend to 0 as t → ∞ . The latter comes from
˙e
qi= g
i(q)p
i− g
mi(q
m)p
mi, i = 1, . . . , n , Because p
i= p
mi+ e
pisee that
g
i(q)e
pi= ˙e
qi− (g
i(q)p
i− g
mi(q
m)) p
mi, i = 1, . . . , n , (12)
and this proves e
pi, i = 1, . . . , n , tend to 0 as t → ∞ as the equilibria of the
reference model are at the origin, which requires p
mi→ 0 . We have shown
more: namely that s → 0 in finite time.
2.3 Robot illustration —
MRCTo illustrate the method consider now the control of a cylindrical robotic manipulator [1], which has one revolute joint and two prismatic joints, see Figure 1.
The arm has length ` and its mass per unit is constant m
a/` . The length of the prismatic radial link changes when it slides through the hub. A force opposes the motion of the link and is modelled as a spring with an adjustable parameter k
s(we denote it ˆ k
s) which imposes zero force at r = 2`/3 . We ignore the vertical motion along the hub. Denote q
1= r and q
2= θ . The Hamiltonian describing the dynamics of the manipulator is
H(q, p) = 1 2
1 m
a+ m
`p
21+ 1
C(q
1) p
22+ k
s
q
1− 2 3 `
2!
,
where C(q) =
m4`a(q
3+ (` − q)
3) + m
`q
2+ I ; and I is the effective moment of inertia of the rotating masses excluding m
aand m
`. We introduce the canonical transformation (q, p) → (Q, P ) .
q
1= Q
1√ m
a+ m
`+ 2
3 ` ; p
1= √
m
a+ m
`P
1; q
2= Q
2; p
2= P
2.
After the canonical transformation the Hamiltonian H(Q, P ) = 1
2 P
12+ 1
C(Q
1/ √
m
a+ m
`+
23`) P
22+ k
sm
a+ m
`Q
21!
. Without loss of generality, we return to the original notation keeping in mind that (p, q) denotes now the new coordinates (P, Q). The dynamics of the manipulator are now
˙
q
1= p
1,
(a)
(b)
Figure 1: Cylindrical robot manipulator: (a) top view; (b) side view.
˙
q
2= p
2C(q
c) ,
˙ p
1=
3
4 m
a+ m
`
q
1m
a+ m
`+
1
8 m
a+ 2 3 m
`
`
√ m
a+ m
`#
p
2C(q
c)
!2
− k
s(m
a+ m
`) q
1+ Q
D1+ Q
F1,
˙
p
2= Q
D2+ Q
F2, (13)
where
C(q
c) = m
a4`
q
c3+ (` − q
c)
3+ m
lq
c2+ I , q
c= q
1√ m
a+ m
`+ 2
3 ` . (14)
Damping forces are defined by Q
Di(q, p) = −d
ip
i, i = 1, 2 , and d
iare the positive damping coefficients.
Consider a reference model with dynamics
˙
q
m1= p
m1,
˙
q
m2= p
m2,
˙
p
m1= − k
smm
ma+ m
m`q
m1+ Q
Dm1
+ Q
Fm1
,
˙
p
m2= −s
mq
m2+ Q
Dm2+ Q
Fm2, (15) where analogously Q
Dmi(q
m, p
m) = −d
mip
mi, i = 1, 2 , and d
miare positive damping coefficients. The term s
mq
m2represents spring forces. The equilibria of the model coincide with the original system, except that q
me2= 0 , unlike the systems’ q
2ethat can be arbitrary.
With the given Lyapunov function (4), we find its time derivative
V ˙ = = s
1˙s
1+ s
2˙s
2= s
1e ¨
q1+ α
β λe
α/β−1q1˙e
q1!
+ s
2¨ e
q2+ α
β λe
α/β−1q2˙e
q2!
. In this case
˙e
q1= ˙ q
1− ˙q
m1= p
1− p
m1= e
p1˙e
q2= p
2C(q
c) − p
m2. Now we calculate ˙ C(q
c) noting that ˙ q
c=
√mq˙1a+m`
. C(q ˙
c) = m
a4`
3q
2cq ˙
c− 3(` − q
c)
2q ˙
c+ 2m
`q
cq ˙
c= 3 4
m
aq ˙
1√ m
a+ m
`2q
1√ m
a+ m
`+ 1 3 `
!
+ 2m
`q
1q ˙
1m
a+ m
`+ 4m
`` ˙ q
13 √
m
a+ m
`. (16)
In the above formula ˙ q
1can be replaced by p
1. For notational convenience, denote by E
ithe right-hand side of the system Equations (13), and by M
ithe right-hand side of the model (15), i = 1, . . . , 4 . Then
˙e
qi= E
i− M
i, i = 1, 2
˙e
pj−2= E
j− M
j, j = 3, 4
¨
e
q1= E
3− M
3,
¨
e
q2= E ˙
2− M
4, where
E ˙
2= C(q
c) ˙ p
2− ˙ C(q
c)p
2C
2(q
c) . Now, rewrite the expression (9) for ˙ V as
V (s) = s ˙
1E
3− M
3+ α
β λe
α/β−1q1e
p1!
+ s
2E ˙
2− M
4α
β λe
α/β−1q2
(E
2− M
2)
!
= s
1E
3− M
3+ α
β λe
α/β−1q1e
p1!
(17) + s
2E
4C(q
c) − C(q ˙
c)p
2C
2(q
c) − M
4+ α
β λe
α/β−1q2
(E
2− M
2)
!
.
2.4 Control law for robotic example —
MRCThe control force is now incorporated in E
p1and E
p2-terms. We identify, from (9) and (17), the following terms in (10)
f
11= 1.0 , f
12= 0 , f
21= 1
C(q
c) , f
22= − C(q ˙
c)
C
2(q
c) p
2, (18) and
E
qm1= p
m1, E
qm2= p
m2,
E ˙
qm1= E
pm1= − k
smm
ma+ m
m`q
m1+ Q
Dm1+ Q
Fm1,
E ˙
qm2= E
pm2= −s
mq
m2+ Q
Dm2+ Q
Fm2. (19) Note that
∂H
p∂q
1= −
"
3
4 m
a+ m
`
q
1(m
a+ m
`) +
1
8 m
a+ 2 3 m
`
`
√ m
a+ m
`#
p
2C(q
c)
!2
+ k
s(m
a+ m
`) q
1,
∂H
p∂q
2= 0 .
Then the control laws according to (10) are:
Q
F1= −
"
3
4 m
a+ m
`
q
1(m
a+ m
`) +
1
8 m
a+ 2 3 m
`
`
√ m
a+ m
`#
p
2C(q
c!2
+ k
s(m
a+ m
`) q
1− Q
D1− 1
f
11−E
pm1+ α
β λe
α/β−1q1e
p1!
− K
f
11sgn(s
1) , (20)
Q
F2= −Q
D2− 1
f
21−E
pm2− C(q ˙
c)p
2C
2(q
c) + α
β λe
α/β−1q2(E
q2− E
qm2)
!
− K
f
21sgn(s
2) . (21)
Substituting the control law (20) and (21) into Equation (17) we obtain:
V ˙ = −s
1Ksgn(s
1) − s
2Ksgn(s
2) = −K (|s
1| + |s
2|)
≤ −K
s
21+ s
221/2= − √
2KV
1/2≤ 0 .
In our computer simulations we assumed the following parameter values for the plant and model: m
a= 10.0 , m
ma= 10.5 , m
`= 1.25 , m
m`= 1.5 ,
` = 1.0 , `
m= 1.3 , I = 1.0 , k
s= 100.0 , k
sm= 110.0 , d
1= 5.0 , d
m1= 6.5 , d
2= 0.001 , d
m2= 0.8 , and s
m= 9.1 . The values for the constants were chosen as: K = 4 , λ = 2 , α = 3 and β = 5 . The initial conditions:
q
1= 0.1 , q
2= 3.0 , p
1= 0.0 , p
2= 0.0 , q
m1= 0.6 , q
m2= 0.1 , p
m1= 4.0 , and p
m2= 3.2 .
The error trajectory and controller time history for the simulations are
shown on Figure 2. The time history of the Lyapunov and its derivative,
together with the sliding mode variables are shown in Figure 3.
(a)
(b)
Figure 2: (a) Error convergence for mrc (b) Controller for mrc
(a)
(b)
Figure 3: (a) Lyapunov function and its derivative (b) Sliding mode vari-
ables
The convergence times of the error trajectories to within an -envelope of the origin (which is defined as a set of all states that lie within distance of from the origin) are: T
c= 9.47 for = 0.1 and T
c= 9.74 for = 0.05 .
3 Model reference adaptive control —
MRACSimilarly we define a Lyapunov function for the adaptive case as a quadratic form of sliding mode variables plus its adaptive terms:
V (s, a, d) = 1 2
n
X
i=1
s
2i+ 1 2γ
n
X
i=1
˜ a
2i+ 1
2γ
n
X
i=1
d ˜
2i, (22)
where γ > 0 is constant and
˜
a
i= ˆ a
i− a
∗i, d ˜
i= ˆ d
i− d
∗i,
and where ˆ a
iand ˆ d
iare our estimates of uncertain parameters whereas a
∗iand d
∗iare their true values (but they may be unknown). We assume that condition (7 ) holds for mrac. Again we calculate the time-derivative of Lyapunov function in order to extract the control law:
V (s, a, d) = ˙
n
X
i=1
"
s
i˙s
i+ 1
γ ˙˜a
i˜ a
i+ 1 γ
d ˙˜
id ˜
i#
=
n
X
i=1
"
s
i¨ e
qi+ α
β λ ˙e
qie
α/β−1qi!
+ 1
γ ˙˜a
i˜ a
i+ 1 γ
d ˙˜
id ˜
i#
=
n
X
i=1
s
i
f
i1(q, p)E
pi+ f
i2(q, p) − ˙ E
qmi+ α
β λe
α/β−1qi
E
qi− E
qmi!
+ 1
γ ˙˜a
i˜ a
i+ 1 γ
d ˙˜
id ˜
i#
=
n
X
i=1
"
f
i1(q, p) − ∂H
p(q, p, a)
∂q
i+ Q
Di(q, p, d)
+ Q
Fi(q, p, a, u)
+ f
i2(q, p) − ˙ E
qmi(23) + α
β λe
α/β−1qi
E
qi− E
qmi#
+ 1 γ
n
X
i=1
˙˜a
i˜ a
i+ d ˙˜
id ˜
i
. We assume that plant dynamics can be linearly parametrised in terms of the unknown parameters a
i. Note: the damping force Q
Di(for all practical purposes) is linear in its damping coefficient. Let us denote
∂H
p(q, p, a)
∂q
i= a
i∂H
p`(q, p)
∂q
i,
Q
Di(q, p, d) = d
iQ
D`i(q, p) , (24) where superscript ` indicates function after linear parametrisation.
3.1 Control and adaptation law in
MRACWe design the control law in mrac version:
Q
Fi= ˆ a
i∂H
p`∂q
i− ˆ d
iQ
D`i(q, p)
− 1
f
i1− ˙ E
qmi+ α
β λe
α/β−1qiE
qi− E
qmi
!
− f
i2(q, p) − K
f
i1sgn(s
i) , i = 1, . . . , n . (25) After substituting from Equation (25) into Equation (23) we obtain
V (s, a, d) = ˙
n
X
i=1
s
i"
(ˆ a
i− a
i) ∂H
p`∂q
i−
d ˆ
i− d
iQ
D`i(q, p)
#
−
n
X
i=1
s
iKsgn(s
i) + 1 γ
n
X
i=1
˙˜a
i˜ a
i+ d ˙˜
id ˜
i
=
n
X
i=1
"
˜
a
is
i∂H
p`∂q
i+ 1 γ ˙ˆa
i!
+ ˜ d
i−s
iQ
D`i(q, p) + 1 γ
d ˙ˆ
i!#
−
n
X
i=1
s
iKsgn(s
i) . (26)
We now define the adaptation law ˆ ˙
a
i= − Kγ
√ γ sgn(˜ a
i) − γs
i∂H
p`∂q
i− γK
√ γ sgn(˜ a
i) , (27) d ˙ˆ
i= − Kγ
√ γ sgn( ˜ d
i) + γs
iQ
D`i− γK
√ γ sgn( ˜ d
i) . (28)
3.2 Convergence
Now we can return to our evaluation of ˙ V and prove it to be negative semi- definite, and consequently securing asymptotic tracking convergence. Sub- stituting control (25) and adaptation laws (27) and (28) into Equation (26), and using a simple algebraic inequality [4], we obtain
V (s, a, d) = −K ˙
n
X
i=1
"
√ 1
γ ˜ a
isgn(˜ a
i) + 1
√ γ
d ˜
isgn( ˜ d
i) + s
isgn(s
i)
#
= −K
n
X
i=1
"
√ 1
γ |˜ a
i| + 1
√ γ | ˜ d
i|) + s
isgn(s
i)
#
= −K
n
X
i=1
|s
i| ≤ −K
n
X
i=1
s
2i!1/2
≤ − √
2KV
1/2≤ 0 . (29)
Obviously ˙ V = 0 only if s = 0 . This implies that V reaches the origin in a finite time T , that is, V (T ) = 0 ; indeed, integrating inequality (29) see that
T ≤ t
0+
√ 2V
1/2(t
0)
K . (30)
Analogously, as in mrc section, we show that given the expression ( 23) we have s → 0 . It is sufficient to show that ˙ V → 0 . Clearly s and ˙s are bounded, this in turn shows that ¨ V remains bounded and according to Barbalat’s lemma we have ˙ V → 0 . Given Equation (29) obviously s and ˙s are bounded, see also Equation (23). Thus s → 0 as t → ∞ . This in turn implies that error trajectories e
qi, i = 1, . . . , n , tend to 0 as t → ∞ . By the same argument as in mrc section we can show that also e
pi, i = 1, . . . , n , tend to 0 as t → ∞ . And again s → 0 in finite time, see Equation (30).
3.3 Robot illustration —
MRACWe consider the same example of robotic manipulator as in the mrc exam- ple but now we consider the damping forces as uncertain due to unknown damping coefficients. Damping forces are defined by Q
Di(q, p, d) = −d
ip
i, i = 1, 2 , and d
iare the positive damping coefficients of unknown value, and thus replaced in our control law by adjustable damping coefficients ˆ d
1and ˆ d
2. Similarly k
sis of uncertain value and thus subject to adaptation mechanism.
We modify the previous Lyapunov function to introduce adaptive terms V (s, d
1, d
2, k
s) =
2
X
i=1
s
2i+ 1 2γ
k ˜
s2+ 1
2γ ( ˜ d
21+ ˜ d
22) . Its time derivative is
V ˙ = s
1˙s
1+ s
2˙s
2+ 1
γ ˙˜k
s˜ k
s+ 1 γ
2
X
i=1
d ˙˜
id ˜
i= s
1¨ e
q1+ α
β λe
α/β−1q1
˙e
q1!
+ s
2e ¨
q2+ α
β λe
α/β−1q2˙e
q2!
+ 1
γ ˙˜k
s˜ k
s+ 1 γ
2
X
i=1
d ˙˜
id ˜
i. (31)
Now, rewrite the expression for ˙ V using definitions and notation from the mrc section:
V (s) = s ˙
1E
p1− E
pm1+ α
β λe
α/β−1q1
e
p1!
+ s
2E ˙
q2− E
pm2α
β λe
α/β−1q2(E
q2− E
qm2)
!
+ 1
γ ˙˜k
s˜ k
s+ 1 γ
2
X
i=1
d ˙˜
id ˜
i= s
1E
p1− E
pm1+ α
β λe
α/β−1q1e
p1!
+ s
2E
p2C(q
c) − C(q ˙
c)p
2C
2(q
c) − E
pm2+ α
β λe
α/β−1q2
(E
q2− E
qm2)
!
+ 1
γ ˙˜k
s˜ k
s+ 1 γ
2
X
i=1
d ˙˜
id ˜
i. (32)
3.4 Control and adaptation law
Again, the control force is incorporated in E
p1and E
p2-terms. According to (25) our control law is
Q
F1= −
3
4 m
a+ m
`
q
1m
a+ m
`+
1
8 m
a+ 2 3 m
`
`
√ m
a+ m
`#
p
2C(q
c!2
+
ˆ k
s(m
a+ m
`) q
1− ˆ Q
D1− 1
f
11−E
pm1+ α
β λe
α/β−1q1e
p1!
− K
f
11sgn(s
1) , (33)
Q
F2= − ˆ Q
D21
f
21−E
pm2− C(q ˙
c)p
2C
2(q
c) + α
β λe
α/β−1q2(E
q2− E
qm2)
!
− K
f
21sgn(s
2) , (34)
where K is a positive constant, and ˆ k
s, ˆ Q
D`i= ˆ d
iQ
D`i, i = 1, 2 , are our estimates of uncertain functions. Other terms are defined as in mrc case.
Substituting the control law (33) and (34) into Equation (32):
V ˙ = s
1k ˜
sq
1m
a+ m
`+ s
1d ˜
1p
1+ s
2d ˜
2p
2C(q
c)
− s
1Ksgn(s
1) − s
2Ksgn(s
2) + 1
γ ˙ˆk
sk ˜
s+ 1 γ
2
X
i=1
d ˙ˆ
id ˜
i. (35)
Then we formulate our adaptation law:
d ˙ˆ
1= − Kγ
√ γ − γs
1p
1, d ˙ˆ
2= − Kγ
√ γ − γs
2p
2C(q
c) , ˆ ˙
k
s= − Kγ
√ γ − γs
1q
1m
a+ m
`. (36)
Then after substituting from Equation (36) into Equation (35) see that V ˙ = s
1k ˜
sq
1m
a+ m
`+ s
1d ˜
1p
1+ s
2d ˜
2p
2C(q
c) − s
1Ksgn(s
1)
− s
2Ksgn(s
2) + 1 γ
−γs
1q
1m
a+ m
`k ˜
s+ 1
γ [−γs
1p
1] ˜ d
1+ 1 γ
"
−γs
2p
2C(q
c)
#
d ˜
2= −K(|s
1| + |s
2|) ≤ −K
s
21+ s
221/2≤ − √
2KV
1/2. (37)
In our computer simulations we assumed the parameter values as in mrc,
and we also set ˜ k
s= 0.0 , ˜ d
1= 0.0 , ˜ d
2= 0.0 . The values for the constants
were chosen as K = 4 , γ = 2 , λ = 2 , α = 3 and β = 5 . Initial conditions
are the same as in mrc case. Error trajectory and controller time-history
(a)
(b)
Figure 4: (a) Error convergence for mrac (b) Controller for mrac
(a)
(b)
Figure 5: (a) Lyapunov function and its derivative (b) Sliding mode vari-
ables
are shown on Figure 4. The time history of the Lyapunov and its derivative, together with the sliding mode variables are shown in Figure 5.
The convergence times to the -envelope of the origin are T
c= 9.47 for
= 0.1 and T
c= 10.65 for = 0.05 . In some cases the convergence times are even shorter than in non-adaptive case despite uncertainty introduced to the system. It shows robustness of the adaptive scheme.
4 Stability
The sliding mode controller that we used up to now does not guarantee stability. We require a new control law that secures stability of the system.
4.1 Supervisory controller
Consider the two level control system with supervisory controller, illustrated on Figure 6.
The idea is to introduce a second-level controller designed to guarantee stability and take advantage of the properties of the sliding mode controller as the main controller without compromising its performance. The second- level controller acts as a supervisory controller, that is, when the sliding mode controller leads to instability of the system, it starts working to return stability of the system. Otherwise it remains idle.
We show here how develop the supervisory controller for mrc, as the controller for mrac would be the same with adaptive terms added.
Denote our control law (10) as u
smi(x) = Q
Fi(x) . Our task then is to de-
sign the second level controller that would guarantee that the control system
Figure 6: Two level control system.
is globally stable, that is
kxk ≤ B for every t > 0 ,
where B > 0 is an arbitrary constant chosen by design. To this end we append the sliding mode controller u
smi, i = 1, . . . , n , with a supervisory controller u
Si(x), i = 1, . . . , n , which is zero inside the ball B
x= {x : kxk ≤ B} and is activated only when the system’s trajectory reaches the boundary of B
x. Define the two-level controller as
u
i= u
smi(x) + I
s(x)u
Si(x) , i = 1, . . . , n , (38) where
I
s(x) =
(
1 , for kxk ≥ B , 0 , otherwise.
We design u
Sisuch that kxk ≤ B for all t > 0 .
4.2 Stable controller for sliding mode
Assume that the system and model are defined by (1) and (2), and that the model Hamiltonian has the form
H
m(q
m, p
m) = 1 2
n
X
i=1
a
mip
2mi+ f
m(q
m) , (39) where a
mi> 0 is a constant, f
m(·) is a known function, equivalent to a potential energy function. For the plant Hamiltonian H, the state equation for
˙
q
i= p
i/C
i(q) , (40)
where functions C
i(q) 6= 0 and such that there exist estimation functions f
esti(e
q, q) satisfying
∂H
m(e)
∂e
qip
iC
i(q) − a
mip
mi!
≤ f
estie
pi. (41)
Furthermore, the plant’s momenta are in the following form:
˙
p
i= −f
pi(p, q, a) + Q
Di+ Q
Fi, (42) where f
pi(·) is a known nonlinear function polluted by uncertainty.
Then the plant dynamics for i = 1, . . . , n are
˙
q
i= p
iC
i(q) ,
˙
p
i= − ∂H
p(q, p)
∂q
i+ Q
Di(q, p) + Q
Fi(q, p, u) . (43) The reference model for i = 1, . . . , n is
˙
q
mi= a
mip
mi,
˙
p
mi= − ∂f
m(q
m)
∂q
mi+ Q
Dmi(q
m, p
m, d
m) + Q
Fmi(q
m, p
m, u
m) . (44) Equations (43) and (44) give the following error dynamics:
˙
e
qi= p
iC
i(q) − a
mip
mi,
˙
e
pi= − ∂H
p(q, p)
∂q
i+ ∂f
m(q
m)
∂q
mi+ Q
Di(q, p)
−Q
Dmi(q
m, p
m) + Q
Fi(q, p, u)
− Q
Fmi
(q
m, p
m, u
m) , i = 1, . . . , n . (45) Consider explicitly the terms of the controller u
i, see (10):
u
i= ∂H
p∂q
i− Q
Di(q, p, d)
− 1
f
i1f
i2(q, p) − ˙ E
qmi+ α
β λe
α/β−1qi
E
qi− E
qmi!