You are on page 1of 7

Trajectory Tracking Error Using PID Control Law for

a 2 DOF Helicopter Model via Adaptive Time-Delay


Neural Networks
Joel Perez

, Jose P. Perez
y
, Jose J. Hdz
z
, Santiago Arroyo
x
Angel Flores
{
Abstract
This paper deals with the problem of trajectory tracking for
adaptive time-delay neural networks. The tracking error is
globally asymptotically stabilized by a control law derived on
the basis of a Lyapunov-Krasovsky functional.
The main methodologies, on which the approach is based,
are time-delay neural networks and the Lyapunov-Krasovskii
functions metodology and the PID control for nonlinear sys-
tems. The proposed new control scheme is applied via simu-
lations to control a 2 DOF Helicopter model [1], [2]. Experi-
mental results show the usefulness of the proposed approach.
To verify the analytical results, an example of a dynamical
network is simulated and a theorem is proposed that ensures
the tracking of the nonlinear system.
Keywords. Adaptive Time-Delay Neural networks, Trajec-
tory tracking, Adaptive control, Lyapunov-Krasovskii func-
tion Stability and PID control.
1. Introduction
In order to solve problems in the elds of optimization,
pattern recognition, signal processing and control systems,
among others, recurrent neural networks have to be designed
with the property that there is only one equilibrium point,
and this point has be globally asymptotically stable. There-
fore analysis of this kind of stability has been intensively in-
vestigated (see [3] and references therein). In biological and
articial neural networks, time delays arise in the processing
of information storage and transmission. It is known that
+
Facultad de Ciencias Fisico Matematicas, Universidad Au-
tonoma de Nuevo Leon (UANL) Monterrey, Mexico. e-mail:
joelperezp@yahoo.com
|
Facultad de Ciencias Fisico Matematicas, Universidad Au-
tonoma de Nuevo Leon (UANL) Monterrey, Mexico. e-
mail:josepazp@gmail.com
|
Facultad de Ciencias Fisico Matematicas, Universidad Au-
tonoma de Nuevo Leon (UANL) Monterrey, Mexico. e-mail:
haggen@hotmail.com

Facultad de Ciencias Fisico Matematicas, Universidad Au-


tonoma de Nuevo Leon (UANL) Monterrey, Mexico. e-mail: san-
tiago.arroyo@heoris.com

Facultad de Ciencias Fisico Matematicas, Universidad Au-


tonoma de Nuevo Leon (UANL) Monterrey, Mexico. e-mail: ao-
resh78@hotmail.com
these delays can create oscillatory or even unstable trajecto-
ries [4]. Results regarding stability of delayed neural networks
can be found in [5], [6].
In [7], analysis of Recurrent Neural Networks for identi-
cation, estimation and control are developed, with applica-
tions to chaos control, robotics and chemical processes. Con-
trol methods that are applicable to general nonlinear systems
have been intensely developed since the early 1980s. Main
approaches include, for example, the use of dierential geom-
etry theory [8]. The passivity approach has, at the same time,
generated interest for synthesizing control laws [9]. In [10]
and [11], this methodology was modied for stabilization and
trajectory tracking of an unknown chaotic dynamical system.
The proposed adaptive control scheme is composed of a
recurrent neural identier and a controller, see g. (1),
Fig. 1 Adaptive Time-Delay Recurrent Neural Network
scheme
where the former is used to build an on-line model for the
unknown plant and the latter, to ensure that the unknown
plant tracks the reference trajectory.
Robot manipulators [12] present a practical challenge for
control purposes due to the nonlinear and variable nature
of their dynamical behavior. Motion control in joint space
is the most fundamental task in robot control; it has moti-
vated extensive research work in synthesizing dierent control
1
Congreso Nacional de Control Automtico 2013
Ensenada, Baja California, Mexico, Octubre 16-18, 2013
methods such as fuzzy computed torque control [13], PI+PD
fuzzy control [14] and static neural network control [15]. An
important problem for developing control algorithms is that
most robots models neglect practical aspects such as actuator
dynamics, sensor noise, and friction, which if are not consid-
ered in the design may cause performance deterioration.
Even though conditions of global asymptotic stability for
delayed neural networks have been established, as far as we
know, no publication presents results on trajectory tracking
of such systems. It is relevant to procure this tracking in
order to allow the implementation of important tasks for au-
tomatic control such as: high speed target recognition and
tracking, real-time visual inspection, and recognition of con-
text sensitive and moving scenes, among others, by means of
recurrent neural networks.
In this paper we present the design of a control law to
ensure tracking of a general nonlinear system by delayed re-
current neural networks.
The tracking error stability is analyzed by means of a
Lyapunov-Kraosvkii functional ([5], [16], [17]). The applica-
bility of the approach is illustrated by one example.
2. Modelling of the Plant
The unknown nonlinear plant is given by:

rp = 1p(rp, &) , )p(rp) jp(rp)& (1)


where rp, )p 2 1
n
, & 2 1
m
and jp 2 1
nxm
. rp is the plant,
& is the control input and both )p and jp are unknown. We
propose to model (1) by the time-delay neural network state
space representation

rp = r W
+
Iz[r(t t)[ U&, plus
one more term modelling error [5], [17]. is a ni matrix;
without loss of generality we can assume that = `1,
` 0. r are the neural states, giving an approximation to
the real plant by a neural network, W
+
is the weights matrix,
Iz(r) is the hyperbolic tangent and U is a ni matrix that
modies the input &.
We dene the modelling error between the time-delay
neural network and the plant by:
nper = r rp (2)
We assume the following:
Hypotheses 1. (Objective of Modelling): The modelling
error is exponentially stable, that is:

nper = Inper (3)


In this work we consider I = 1, and now, from (2) we
have

nper=

r

rp and using the hypothesis we get:

rp=

r
nper
The unknown plant can be modelled as:

rp =

r nper = r W
+
Iz[r(t t)[ nper U& (4)
W
+
are the xed weights but unknown from the time-delay
neural network. They minimize the modelling error.
3. Trajectory Tracking
We proceed now to analyze the modelling error between the
unknown plant, modelled by (4) and the reference signal de-
ned by:

rr = )r(rr, &r), with &r and rr 2 1


n
(5)
where rr are the reference states, &r is the input and )r is
a nonlinear function
For this purpose, we dene the control error between the
plant and the reference signal by:
c = rp rr (6)
whose derivative with respect to time is

c =

rp

rr= rW
+
Iz[r(tt)[nperU&)r(rr, &r) (7)
Adding and subtracting, to the right hand side of (7)
the terms
_
WIz[rr(t t)[, Ucr(t,
_
W), c, where
_
W is the
estimate of W
+
and considering that c = rp rr, we have

c = r W
+
Iz[r(t t)[ r rp U& )r(rr, &r)
_
WIz[rr(t t)[
_
WIz[rr(t t)[ Ucr(t,
_
W)
Ucr(t,
_
W) c c

c = c W
+
Iz[r(t t)[ U& )r(rr, &r)
_
WIz[rr(t t)[ Ucr(t,
_
W) (8)
Ucr(t,
_
W) c rr c r r
_
W Iz[rr(t t)[
In this part, we consider the next supposition:
The time-delay neural network will follow the reference sig-
nal, even with the presence of disturbances, if:
rr
_
WIz[rr(t t)[ rr rp Ucr(t,
_
W) = )r(rr, &r).
Then
Ucr(t,
_
W) = )r(rr, &r)rr
_
WIz[rr(tt)[ rr rp (9)
and we get

c = c W
+
Iz[r(t t)[
_
WIz[rr(t t)[ c
(1)(r rr) U(& cr(t,
_
W)) (10)
Now, adding and subtracting in (10) the term
_
W
Iz[r(tt)[ and dening Iz[r(tt)[ = I(:[r(tt)[:[rr(t
t)[) we have
2
CNCA 2013, Ensenada B.C. Octubre 16-18 142

c = c (W
+

_
W)Iz[r(t t)[
_
WI(:[r(t t)[ :[rr(t t)[) (11)
(1)(r rr) c U(& cr(t,
_
W))
We dene,
-
W = W
+

_
W and
-
& = & cr(t,
_
W) (12)
and replacing (12) in (11), we obtain

c = c
-
WIz[r(t t)[
_
WI(:[r(t t)[ :[rr(t t)[)
(1)(r rr) c U
-
&

c = c
-
WIz[r(t t)[
_
WI
(
:[r(t t)[ :[rp(t t)[
:[rp(t t)[ :[rr(t t)[
)
(13)
(1)(r rp rp rr) c U
-
&
Now we can set:
-
& = &1 &2 (14)
and dene:
U&1 =
_
WI(:[r(tt)[ :[rp(tt)[)(1)(rrp) (15)
so (13) is reduced to:

c = c
-
WIz[r(t t)[
_
WI(:[rp(t t)[ :[rr(t t)[)
(1)(rp rr) c U&2
Considering that c = rp rr, shortening notation a
little bit by setting o = Iz and dening:
c

(t t) = o(rp(t t)) o(rr(t t))


we get

c = (1)c
-
Wo[r(t t)[
_
Wc

(t t) U&2 (16)
Now, the problem is to nd the control law U&2 that
stabilizes the system (16). We will obtain the control law by
using the Lyapunov-Krasovskii methodology.
4. Stability of the Tracking Er-
ror
Once (16) is obtained, we consider its stabilization in feedfor-
ward. We note (c,
_
W )= 0 is an asymptotically stable equilib-
rium point of the undisturbed autonomous system ( = `1
and ` 0). For its stability, we propose the next PID control
law:
U&2 = 1pc1v

c1i
Z
t
0
c(t)dt !(
1
2

1
2

_
W

2
1
2

)c (17)
The parameters 1p, 1v and 1i will be determined later,
1
2

is the Lipschitz constant of c [18], ! 0. This control


law (17) is similar to the control law in [19].
We will show the feedback system is asymptotically stable.
Replacing (17) in (16) and setting o = (1 1v), we get:

c =
1
o
(1)c
1
o
-
Wo[r(t t)[
1
o
_
Wc

(t t)
1
o
1pc
1
o
1i
Z
t
0
c(t)dt
!
o
(
1
2

1
2

_
W

2
1
2

)c (18)
and assuming = `1:

c =
1
o
(` 1 1p)c
1
o
-
Wo[r(t t)[
1
o
_
Wc

(t t)
1
o
1i
Z
t
0
c(t)dt
!
o
(
1
2

1
2

_
W

2
1
2

)c (19)
If we set n =
1
a
1i
R
t
0
c(t)dt, with derivative

n =
1
a
1ic(t),
then (19) can be written as

c =
1
o
(` 1 1p)c
1
o
-
Wo[r(t t)[
1
o
_
Wc

(t t)
n
!
o
(
1
2

1
2

_
W

2
1
2

)c (20)
We will show the new state (c, n)
T
is asymptotically stable
and that the equilibrium point is (c, n)
T
= (0, 0)
T
, when
-
Wo[rr(tt)[ = 0, which is taken as an external disturbance.
Let \ be the candidate Lyapunov-Krasovskii function
([16], [17]) given by
\ =
1
2
(c
T
, n
T
)(c, n)
T

1
2o
tv

-
W
T
`
W

1
o
Z
t
t
[c
T

(c)
_
W
T _
Wc

(c)[dc (21)
The time derivative of (21) along the trajectories of (20)
is:

\ = c
T

c n
T

n
1
o
tv
8
<
:

-
W
T
-
W
9
=
;

1
o
[c
T

(t)
_
W
T _
Wc

(t) c
T

(t t)
_
W
T _
Wc

(t t)[ (22)
and using (20) we get:
3
CNCA 2013, Ensenada B.C. Octubre 16-18 143

\ = c
T
[
1
o
(` 1 1p)c
1
o
-
Wo[r(t t)[
1
o
_
Wc

(t t) n
!
o
(
1
2

1
2

_
W

2
1
2

)c[
1
o
n
T
1ic (23)

1
o
tv
8
<
:

-
W
T
-
W
9
=
;

1
o
[c
T

(t)
_
W
T _
Wc

(t)
c
T

(t t)
_
W
T _
Wc

(t t)[
In this part, we select the next learning law for the neural
network weights as in [20] and [21]:
tv
8
<
:

-
W
T
-
W
9
=
;
= c
T
-
Wo[r(t t)[ (24)
Then (23) is reduced to

\ =
1
o
(` 1 1p)c
T
c
c
T
o
_
Wc

(t t)
(1
1i
o
)c
T
n
!
o
(
1
2

1
2

_
W

2
1
2

)c
T
c (25)
1
o
[c
T

(t)
_
W
T _
Wc

(t) c
T

(t t)
_
W
T _
Wc

(t t)[
If we apply the inequality
r
T

1
2
r
T
r
1
2

T
(26)
to the second term in the right hand side of (25) then:

\
1
o
(` 1 1p)c
T
c
1
o
[
c
T
c
2

1
2
c
T

(t t)
_
W
T _
Wc

(t t)[
(1
1i
o
)c
T
n
!
o
(
1
2

1
2

_
W

2
1
2

)c
T
c
1
o
[c
T

(t)
_
W
T _
Wc

(t) c
T

(t t)
_
W
T _
Wc

(t t)[

\
1
o
(` 1 1p)c
T
c
1
o
(
1
2

1
2

_
W

2
1
2

)c
T
c
(1
1i
o
)c
T
n
!
o
(
1
2

1
2

_
W

2
1
2

)c
T
c (27)
Here, we select (1
K
i
a
) = 0, so 1V = 1i 1, and 1V 0
when 1i 1. With this selection of parameters (27) is
reduced to:

\
1
o
(`11p)c
T
c
1
o
(!1)(
1
2

1
2

_
W

2
1
2

)c
T
c (28)
In this part, if `11p 0, o 0 and !1 0, then

\
< 0, 8 c, n,
_
W 6= 0, the error tracking is asymptotically stable
and it converges to zero for every c 6= 0, i.e., the plant will
follow the reference asymptotically . Finally, the control law,
which aects the plant and the time-delay neural network, is
given by:
& = U
|
[
_
WI(:[r(t t)[ :[rp(t t)[) (1)(r rp)
1pc 1v

c 1i
Z
t
0
c(t)dt !(
1
2

1
2

_
W

2
1
2

)c
)r(rr, &r) rr
_
WIz[rr(t t)[ rr rp[ (29)
This control law gives asymptotic stability of error dynam-
ics and thus ensures the tracking of the reference signal. The
results obtained can be summarized as follows.
Theorem 1 For the unknown nonlinear system modeled by
(4), the learning law (24) and the control law (29) ensure the
tracking of the nonlinear reference model (5).
Remark 2 From (28) we have

\
1
o
(` 1 1p)c
T
c
1
o
(!1)(
1
2

1
2

_
W

2
1
2

)c
T
c < 0, 8c 6= 0, 8
_
W
and therefore \ is decreasing and bounded from below
by \ (0). Since \ =
1
2
(c
T
, n
T
)(c, n)
T

1
2a
tv

-
W
T
`
W

1
a
R
t
t
[c
T

(c)
_
W
T _
Wc

(c)[dc,
we conclude that c,
-
W 2 11; this means that the weights
remain bounded.
5. Simulations
The 2 DOF Helicopter is pivoted around the Pitch axis by
the angle 0, and around the Yaw axis by the angle [2], see
g. 2.
The plant is stated in [1],[2], and it is given by:

A1 = A3

A2 = A4

A3 =
A
heli
[
sin 2(l
2
mc
h
2
)
2
|mcIcos 20[

2
(Jeqp A
heli
(|
2
mc
I
2
))

A
heli
j(|mc cos 0 Isin 0) 1p

0 (1pp\mp 1cpp)
(Jeqp A
heli
(|
2
mc
I
2
))

(1py\my 1cpy)
(Jeqp A
heli
(|
2
mc
I
2
))
(30)

A4 =
A
heli
[sin 20(I
2
|
2
mc
) 2|mcIcos 20[

0

1y

[Jeqy A
heli
[cos
2
0(|
2
mc
I
2
) |mcIsin0 I
2
[[

(1yp\mp 1cyp) cos 0 (1yy\my 1cyy) cos 0
[Jeqy A
heli
[cos
2
0(|
2
mc
I
2
) |mcIsin 0 I
2
[[
4
CNCA 2013, Ensenada B.C. Octubre 16-18 144
Fig. 2 Two DOF Helicopter Model
With the goal of supporting the eectiveness of the pro-
posed controller we have used a Dung equation:
The time-delay neural network is modelled by the dieren-
tial equation:
` r = r Wo[r(t t)[ U&,with t = 10 sec, = `1,
1 2 1
4x4
, and ` = 20, W is estimated using the learning law
given in (24),
o[r(tt)[ = (funh[r1(tt)[, funh[r2(tt)[, ..., funh[rn(tt)[)
T
,
U =

0 0 1 0
0 0 0 1
!
T
, and the & is calculated using
(29).
The time evolution for the position angles and applied
torque are shown in Figs. 4-7. As can be seen in Figs. 4
and 5, the trajectory tracking is successfully obtained where
the plant and reference signals are the same.
We try to force this manipulator to track a reference signal
given by undamped Dung equation:
r r r
3
= 0.114 cos(1.1t); r(0) = 1, ` r(0) = 0.114 (31)
and its phase space trajectory, it is given in Fig. 3
-1.5 -1 -0.5 0 0.5 1 1.5
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
X1Plant-X1Reference
X
2
P
l
a
n
r
-
X
2
R
e
f
e
r
e
n
c
e
Fig. 3 A phase space trajectory of Dung equation.
0 20 40 60 80 100 120 140 160 180 200
-1.5
-1
-0.5
0
0.5
1
1.5
Time (Sec)
P
i
t
c
h
Time evolution for pitch position
Plant
Reference
Fig. 4 Time evolution for the angular position Pitch
(rad)
0 20 40 60 80 100 120 140 160 180 200
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time (Sec)
Y
a
w
Time evolution for taw position
Plant
Reference
Fig. 5 Time evolution for the angular position yaw (rad)
5
CNCA 2013, Ensenada B.C. Octubre 16-18 145
0 20 40 60 80 100 120 140 160 180 200
-100
-50
0
50
100
150
200
250
300
350
Time (Sec.)
T
1
Applied torque
Fig. 6 Torque (Nm) applied to the pitch
0 20 40 60 80 100 120 140 160 180 200
-12000
-10000
-8000
-6000
-4000
-2000
0
2000
Time (Sec.)
T
2
Applied torque
Fig. 7 Torque (Nm) applied to the yaw
We can see that the Recurrent Neural Controller ensures
rapid convergence of the system outputs to the reference tra-
jectory. The controller is robust in presence of disturbances
applied to the system. Another important issue of this ap-
proach related to other neural controllers, is that most neural
controllers are based on indirect control, rst the adaptive
time-delay neural network identies the unknown system and
when the identication error is small enough, the control is
applied. In our approach, direct control is considered, the
learning laws for the adaptive time-delay neural networks
depend explicitly of the tracking error instead of the iden-
tication error. This approach results in faster response of
the system.
Acknowledgements. The rst and second authors would
like to thank the support from CONACYT and the Matem-
aticas Aplicadas group of the Facultad de Ciencias Fisico-
Matematicas, Universidad Autonoma de Nuevo Leon, Mex-
ico.
6. Conclusions
We have extended the adaptive recurrent neural control pre-
viously developed in [10], [11] and [22] for trajectory tracking
control problem in order to consider less inputs than states.
Stability of the tracking error is analized via Lyapunov-
Krasovskii control functions and the control law is obtained
based on the PID approach. A 2 DOF Helicopter model with
friccion terms and unknown external disturbances is used to
verify the design for trajectory tracking, with satisfactory
performance. Research along this line will continue to imple-
ment the control algorithm in real time and to further test
it in a laboratory enviroment as well as to consider the 2
DOF Helicopter with an unknown load, see example 4.9-pp
151-154 [23].
7. References
[1] Q. Inc. Quanser 2 dof helicopter user and control manual.
2006.
[2] Edilberto Carlos Vivas Gonzalea. Director de Tesis:
Prof. Leonardo Enrique Bermeo Clavijo, "Control del Heli-
coptero 2D Usando Metodos de Control Robusto 1c" Uni-
versidad Nacional de Colombia, Facultad de Ingenieria De-
partamento de Electrica y Electronica, Bogot a, Febrero de
2011
[3] M. Forti, Necessary and sucient conditions for ab-
solute stability of neural networks, IEEE Trans. on Circuits
and Systems - I, Vol. 41, pp 491-494, 1994.
[4] P. Baldi and A. F. Atiya, How delays aect neural
dynamics and learning, IEEE Trans. on Neural Networks,
Vol. 5, pp 612-621, 1994.
[5] X. Liao, G. Chen and E. N. Sanchez, LMI-based ap-
proach for asymptotically stability analysis of delayed neural
networks, IEEE Trans. on Circuits and Systems I, Vol.
49, No. 7, pp 1033-1039, 2002.
[6] A. Yazdizadeh, K. Khorasani, "Adaptive time delay
neural network structures for nonlinear system identica-
tion", 0925-2312/02/$ - see front matter c 2002 Elsevier Sci-
ence B.V. All rights reserved.
PII: S0925-2312(01)00589-6.
[7] Rovitahkis G. A. and M. A. Christodoulou, Adap-
tive Control with Recurrent High-Order Neural Networks,
Springer Verlang, New York, USA, 2000.
[8] Isidori A. Nonlinear Control Systems, 3rd Ed., Springer
Verlang, New York, USA,1995.
[9] Hill D. J. and P. Moylan, "The Stability of nonlinear
dissipative systems", IEEE Trans. on Auto. Contr., vol. 21,
708-711, 1996.
6
CNCA 2013, Ensenada B.C. Octubre 16-18 146
[10] Sanchez E. N., J. P. Perez, L. Ricalde and G. Chen,
"Trajectory tracking via adaptive neural control", Proceed-
ing of IEEE Int. Symposium on Intelligent Control, Mexico
City, pp 286-289, September 2001.
[11] Sanchez E. N., J. P. Perez, L. Ricalde and G. Chen,
"Chaos production and synchronization via adaptive neural
control", Proceeding of IEEE Conference on Decision and
Control, Orlando, Fl, USA, December 4-7, 2001.
[12] A. Yazdizadeh, K. Khorasani, R.V. Patel, Identi
cation of a two-link Hexible manipulator using adaptive time
delay neural networks, IEEE Trans. Systems, Man and
Cybernet.Part B 30 (1) (2000) 165171.
[13] Llama M. A., R. Kelly and V. Santibaez, "Stable
Computed torque of Robot manipulators via fuzzy self- tun-
ing", IEEE Trans. on Systems, Man and Cybernetics, Vol.
30, 143-150, February, 2000.
[14] Sanchez E. N. and V. Flores, "Real-Time fuzzy PI+PD
control for an underactuade robot", Proc. of 2002 IEEE In-
ternational Workshop on Intelligent Control, Vancouver, B.
C., Canada, October 2002.
[15] Harris C. J., T. H. Lee and S. S. Ge, Adaptive Neural
Network Control of Robotic Manipulators, World Scientic
Pub., 1999.
[16] J. K. Hale and S. M. V.Lunel, Introduction to the
Theory of Functional Dierential Equations , Springer Ver-
lag, New York, USA, 1991.
[17] X. Liao, G. Chen, and E. N. Sanchez, Delay-
dependent exponential stability analysis of delayed neural
networks: an LMI approach, Neural Networks, Vol. 15, pp
855-866, 2002.
[18] H. Khalil, Nonlinear System Analysis, 2nd Ed., Pren-
tice Hall, Upper Saddle River, New Jersey, USA, 1996.
[19] R. Kelly, R. E. Haber, R.E. Haber Guerra and Fer-
nando Reyes, "Lyapunov Stable Control of Robot Manipu-
lators: a Fuzzy Self-Tuning Procedure", Intelligent Automa-
tion and Soft Computing, Vol. 5, No. 4, pp. 313-326, 1999.
[20] Rovitahkis G. A. and M. A. Christodoulou, Adap-
tive Control with Recurrent High-Order Neural Networks,
Springer Verlang, New York, USA, 2000.
[21] Petros A. Ioannou, Jing Sun, "Robust Adaptive Con-
trol", PTR Prentice-Hall, Upper Saddle River, NJ 07458.
ISBN 0-13-439100-4.
[22] Sanchez E. N., J. P. Perez and L Ricalde, "Recur-
rent neural control for robot trajectory tracking", Proceeding
of International Federation of Automatic Control, Barcelona
Spain, July, 2002.
[23] Karl Johan Astrom- Bjorn Wittenemark, Adaptive
Control, Addison-Wesley Publishing Company, ISBN 0-201-
09720-6, 1989.
7
CNCA 2013, Ensenada B.C. Octubre 16-18 147

You might also like