Adaptive Neural Network Control of Underactuated System
Andrzej Burghardt and Zenon Hendzel
Department of Applied Mechanics and Robotics, Rzeszow University of Technology, W.Pola 2, 35-959 Rzeszow, Poland
Keywords:
Neural Network, Underactuated Systems, Adaptive Control.
Abstract:
The article presents a synthesis of the control system of an underactuated object of ball-beam type. Based on a
mathematical description of the object, we proposed an adaptational control algorithm, ensuring stabilization
of the ball position on the beam. The synthesis of the control system was conducted on the basis of Lyapunov’s
stability theory, using artificial neural networks in the adaptation process. The proposed solution was simulated
with Matlab/Simulink software and verified on the real object.
1 INTRODUCTION
Control and modelling of non-linear mechanical sys-
tems, where the number of independent control
signals is smaller than the number of degrees of
freedom (underactuated systems, US) is often an-
alyzed, among others, in these works (Blajer and
Kolodziejczyk, 2007), (Leonard and Marsden, 2000),
(Spong, 1997). The most popular systems of US type
include: a ball rolling along a beam, a ball rolling
across a plane, inverted pendulum system (Leonard
and Marsden, 2000), two-dimensional gantry cranes
and systems of masses connected with springs (Bla-
jer and Kolodziejczyk, 2007), submarines (Leonard,
1997), helicopters, and rotor flying machines.
Analysis of the literature in the field emphasized
the fact that mathematical models used in control al-
gorithms are simplified; for example, gravitation and
friction phenomena are neglected (Levine and Mull-
haupt, 1999), (Lewis and Murray, 1995) which be-
came the impulse for research in control and mod-
elling of US type systems.
The article presents a synthesis of the control sys-
tem of the underactuated object of the non-linear ball-
beam type. The neural control of non-linear systems
relays on using neural networks to compensate sys-
tem nonlinearities and its unknown properties. The
neural control systems generally consists of the neu-
ral compensator and the classical control element like
e.g. PD controller, which generates the control sig-
nal at the beginning of the NN’s weights adaptation
process. In a case of disturbances, weights of NNs
are adapted to reduce a change of controlled system
dynamics. This approach ensure high control quality
in a case of disturbances. In the proposed control sys-
tems, based on a mathematical description of the ob-
ject, a neural control algorithm, ensuring stabilization
of the ball position on the beam, was proposed. The
synthesis of the control system was conducted on the
basis of Lyapunov’s stability theory, using artificial
neural networks in the adaptation process. The ob-
tained solution was simulated with Matlab/Simulink
software and correctness of stabilization of the ball
position on the beam was verified using rapid proto-
typing environment with a dSpace control-measuring
card and ControlDesk software.
2 LINEAR IN THE PARAMETER
NEURAL NETS
It is commonlyknown that neural networks have good
properties with regard to static mapping. The use
of neural networks for real time control may require
reproducing the full dynamics of the controlled ob-
ject, which might result in a large size of dynamic
networks. Application of linear neural networks be-
cause of their weight, such as, for example, radial
networks, B-spline type networks, and networks with
functional extensions, prevents the problem of explo-
sion of the solutions. Considering the non-linearity of
the controlled object, a linear neural network whose
first weight layer is randomly generated was used in
this work to compensate for its non-linearity.
The structure of NNs used in the control system
is very universal, where can be used many different
activation functions. In the presented control systems
505
Burghardt A. and Hendzel Z..
Adaptive Neural Network Control of Underactuated System.
DOI: 10.5220/0004113505050509
In Proceedings of the 4th International Joint Conference on Computational Intelligence (NCTA-2012), pages 505-509
ISBN: 978-989-8565-33-4
Copyright
c
2012 SCITEPRESS (Science and Technology Publications, Lda.)
W
T
x
x
x
1
2
n
hiddenlayer
outputlayer
y
y
y
r
1
2
å
å
å
S
1
(.)
S
2
(.)
S
3
(.)
S
N
(.)
Figure 1: Structure of double-layer neural network.
were applied neural networks with sigmoidal bipolar
neurons activation function, which are not local func-
tions, like RBFs. This approach leads to the smaller
size of the NNs with many inputs, in the comparison
to the RBFNs, what is more adequate in the real time
control tasks.The problems of modelling and control
of non-linear objects are very complex. Because of
the lack, so far, of a systematic approach to analysis
and synthesis of dynamic non-linear systems, artifi-
cial neural networks have become an attractive tool
applied in the theory of non-linear systems because
of the possibility of approximation of any non-linear
mappings and adaptation. Neural networks are ap-
plied, among other things, for modelling and control
of complex non-linear systems. Let us analyze the
neural network shown in fig. 1.
Mapping of entrance-exit of the network from
fig. 1 assumes the following form
y
i
=
N
j=1
{w
ij
S[
n
k=1
v
jk
x
k
+ v
vj
] + w
wi
}i = 1, .., r. (1)
Assuming the element of entrance vector x 1
and threshold value vector of [v
v1
, v
v2
, ..., v
vn
]
T
the fol-
lowing was recorded as the first column of, V
T
ma-
trix:
y(x) = W
T
S(V
T
x) (2)
where S = [S
1
(.), S
2
(.), ..., S
n
(.)]
T
constitutes a vector
of the functions describing neurons, whose first ele-
ment equals 1 while [w
w1
, w
w2
, ..., w
wn
]
T
vector con-
stitutes the first column of W
T
. From the mathemat-
ical viewpoint a double-layer network may approxi-
mate a continuous function of many variables. Any
continuous function f : D
f
R
n
R
λ
, where D
f
is a compact R
n
, sub-set, can be approximated with
any accuracy by a double-layer neural network with
properly selected weights. Which means, that for any
compact D
f
set and a positive value of approximation
error ε there exists such double-layer neural network
(fig. 1) that f(x) function can be expressed as:
f(x) = W
T
S(V
T
x) + ε (3)
for ||ε|| < ε
N
. If the first layer of V
T
network weights
is randomly designated, then W
T
weights of the sec-
ond layer define its properties, and in this case it is a
single-layer network. If we define ρ(x) = S(V
T
x)+ ε,
then we can write down the relationship (2) as:
y = W
T
ρ(x) (4)
where: x R
n
, y R
r
, ρ(.): R
n
R
N
and N is a num-
ber of neurons in the hidden layer. Such network is
linear because of W
T
weights and possesses approx-
imation properties of non-linear functions. Sigmoid
bipolar functions were assumed as the vector of basic
functions of the network for approximation of non-
linearity of the ball-beam system. Then the estimate
of non-linear function of f(x) is given by the follow-
ing equation:
ˆ
f(x) =
ˆ
W
T
S(V
T
x) (5)
where V constitutes a constant matrix of weights of
the entrance layer, randomly generated. The fol-
lowing relationship describes neuron activation func-
tions:
S(V
T
x) =
2
1+ exp(βV
T
x)
1 (6)
where coefficient β is responsible for the function
slope.
3 MODELLING AND CONTROL
OF THE BALL-BEAM SYSTE
Dynamic equations of the ball-beam, shown fig. 2,
could be recorded in the following form (Burghardt
and Giergiel, 2011b), (Burghardt and Giergiel,
2011a):
M(a, q) ¨q+C(a, q, ˙q) ˙q+ G(q) + τ
d
(t) = u (7)
where: q = [s
A
ϕ]
T
and matrices M(a, q), C(a, q, ˙q) as
well as vectors G(q), u, result from the description of
dynamics of the analyzed system using Appell trans-
formation (Blajer, 1998) and from the dynamics of
executive systems.
x
s
A
R
1
0
y
A
M
2
m
v
Ab
a
j
j
L
L
S2
a
m
1
X
A
Y
A
G
G
1
2
h
b
2
s
A
Figure 2: The ball-beam system.
The disturbance vector fulfils the restriction of
||τ
d
(t)|| < b, b = const > 0. The matrices and vec-
tors assume the following form:
IJCCI2012-InternationalJointConferenceonComputationalIntelligence
506
M(a, q) =
a
1
a
1
R
a
1
R a
1
R
2
+ a
2
+
5
7
a
1
(L s
A
)
2
,
u =
0 u
2
T
C(a, q, ˙q) =
0
5
7
a
1
(L s
A
)ϕ
5
7
a
1
(L s
A
)ϕ
5
7
a
1
(L s
A
)s
A
,
τ
d
(t) =
τ
d1
τ
d2
T
(8)
G(q) =
5
7
a
1
sin(ϕ)
a
3
gcos(ϕ) +
5
7
a
1
(L s
A
)cos(ϕ)
where: s
A
, ϕ are generalized coordinates of the an-
alyzed system, while u
2
is a moment generated by
the engine driving the beam. Parameter vector a =
[a
1
, a
2
, a
3
]
T
contains parameters resulting from ge-
ometry, mass distribution, motion resistances as well
as dynamic properties of the executive systems.The
objective of synthesis of neural control algorithm is
the determination of such a control law and network
weights adaptation law that would allow realizing the
set trajectory of q
d
= [s
Ad
, ϕ
d
] form.
f(x)
^
Ball&Beam
U
K
e
-
S
PD
q
u
1
arc(sinu)
1
d
A
s
d
j
Figure 3: Structure of neural controller.
For this purpose we shall define lag error e R
2
,
generalized error s R
2
as well as auxiliary vector
v R
2
as:
e = q
d
q, (9)
s = e+ Λe, (10)
v = q
d
+ Λe, (11)
where Λ R
2x2
is a diagonal positive-definite matrix.
In this case the equation (7) can be transformed into
the following form:
M(a, q) ˙s = [u
1
+ u
2
]
T
+
C(a, q, ˙q)s+ f(x) + τ
d
(t)
(12)
where: u
1
=
5
7
a
1
gu
1
, u
1
= sin(ϕ), u
1
is a function
of fictional control, which will be determined later,
while vector function f(x) has the following form:
f(x) =
a
1
[ ˙v
1
+ R˙v
2
+
5
7
(L s
A
)
˙
ϕv
2
]
a
1
[R˙v
1
5
7
(L s
A
)(
˙
ϕv
1
+ ˙s
A
v
2
+
gcos(ϕ))] + a
3
gcos(ϕ)+
+ ˙v
2
[a
2
+ a
1
(R
2
+
5
7
(L s
A
))]
(13)
where x = [v
T
, ˙v
T
, q
T
, ˙q
T
]
T
. Let us select control sig-
nal u = [u
1
u
2
]
T
considering compensation of the con-
trolled object’s non-linearity:
u =
ˆ
f(x) + K
D
s, (14)
where K
D
= K
T
D
> 0 is a design matrix, while the term
K
D
s is a PD controller equation:
K
D
s = K
D
˙e+ K
D
Λe. (15)
In this system, the neural network task is compen-
sation of non-linear vector function f (x) of the con-
trolled object, and the PD controller task is stabiliza-
tion of the feedback control system. A linear neural
network, described in chapter 2, was used for approx-
imation because of weights.
In this case the non-linear function approximated
by the network shall be recorded in the following
form:
f(x) = w
T
ϕ(x) + ε, (16)
where ε is approximation error fulfilling ||ε|| ε
N
,
ε
N
= const > 0 limitation. While the f(x) function
estimate shall be recorded as:
ˆ
f(x) =
ˆ
W
T
ϕ(x), (17)
where
ˆ
W is the weight estimate of the ideal neural
network. Using the relationship (17) we shall obtain
a control law in the following form:
u =
ˆ
W
T
ϕ(x) + K
D
s. (18)
By substituting equations (18) to relationship (12) we
obtained:
M ˙s+ C( ˙q)s+ K
D
s =
˜
f(x) + τ
d
(t), (19)
where
˜
f(x) function approximation error, f(x), which
is:
˜
f(x) = f(x)
ˆ
f(x) = W
T
ϕ(x)
ˆ
W
T
ϕ(x)+
+ε =
˜
W
T
ϕ(x) + ε
(20)
where
˜
W = W
ˆ
W is the estimation error of neural
network weights. Using (20) feedback control system
equation (19) was recorded as follows:
M ˙s+ C( ˙q)s+ K
D
s =
˜
W
T
ϕ(x) + ε+ τ
d
(t), (21)
Lyapunov’s stability theory was used in order to de-
rive a weight adaptation algorithm
ˆ
Wof the network.
If we select a square formula of the following form:
L =
1
2
s
T
Ms+
1
2
tr(
˜
W
T
F
1
˜
W), (22)
where F = F
T
> 0 is the design matrix, it is possible
to demonstrate, that selecting weights’ adaptation law
of neural network as:
˙
ˆ
W = Fϕ(x)s
T
, (23)
AdaptiveNeuralNetworkControlofUnderactuatedSystem
507
a derivative of square for (22) is a negative semi-
definite, if the following dependence is fulfilled:
ψ = {s : ||s|| >
ϕ
N
+ b
K
Dmin
b
s
}. (24)
This results from the formula (24) that generalized lag
error s is uniformly end-limited to ψ, set, with the
practical boundary of b
s
. By increasing K
D
matrix co-
efficients it is possible to reduce lag error s, as well as
errors e and ˙e, which are also limited. Such synthesis
of adaptational neural control allows for the correct
operation of a control system with PD controller un-
til the neural network begins to learn. The conducted
synthesis of neural control allows determination of a
fictitious control signal
u
1
=
7
5a
1
[
ˆ
f
1
(x) + K
D1
s
1
]. (25)
from which the set radius of the beam’s own rotation
ϕ
d
in the following form was determined:
ϕ
d
= arcsin(u
1
). (26)
The simulation and verification of the control algo-
rithm was conducted on the basis of the given solu-
tions.
4 COMPUTER SIMULATION
The proposed solution of a control system was simu-
lated with Matlab/Simulink software, using the con-
structed emulator of the ball-beam system. The as-
sumed values of masses and geometric sizes cor-
respond to the real structure. The following data
was assumed for simulation:a
1
= 0, 1329[kg], a
2
=
0, 0951[kgm], a
3
= 0, 0433[kgm], L = 1[m], R =
0, 015[m]. Mass moment of inertia of the beam and
laser sensor was determined during the first approx-
imation through modelling of mass distribution of
these elements with a concentrated particle. It was as-
sumed that the ball with the initial condition of s
A
=
0.02[m] should reach the set position s
Ad
= 0.5[m].
Fig. 4b presents errors accompanying realization
of the task of reaching the set position by the ball.
Figures 4c and 4d present components of the con-
trol signal, that is PD control as well as control com-
pensating non-linearity of the object. Figs. 4e, and
4f present weight values of neural networks used in
the control system. The conducted simulation tests
demonstrated the correctness of theoretical consider-
ations.
0 2 4 6 8
-0.2
0
0.2
0.4
0.6
t[s]
e
j
e
s
b)
0 2 4 6 8
-2
-1
0
1
2
3
t[s]
5K
D1
K
D2
c)
0 2 4 6 8
-0.4
0
0.4
0.8
1.2
10
3
f
(x)1
f
(x)2
d)
t[s]
0 2 4 6 8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
t[s]
W
1
e)
10
3
0 2 4 6 8
-0.8
-0.4
0
0.4
0.8
1.2
t[s]
W
2
f)
Figure 4: Results of simulation: a) desired (s
Ad
) and actual
position of the ball on the beam, beam angle ϕ
d
, b) error of
the ball position (e
s
) and the beam orientation (e
ϕ
), c) PD
control signals, d) control signals of object’s non-linarites
compensation, e) weight of the first NN, f)weight of the sec-
ond NN.
5 VERIFICATION
A mechanical system of the ball-beam type was con-
structed in order to verify the proposed control algo-
rithm.
A mechanical system of the ball-beam type was
constructed in order to verify the proposed control
algorithm. A direct current engine integrated with a
transmission and rotary-impulse transducer was used
as a drive system, while a laser distance sensor was
used to measure the ball location. ControlDesk, Mat-
lab/Simulink software and dSpace 1104 card were
used as the control-software environment. The re-
sults of verification obtained during the ball stabiliza-
tion process (fig. 5)are analogical to simulation re-
sults (fig. 4). Small differences with regard to values
and shapes of the variables result from simplifying as-
sumptions adopted during the modelling process (not
modeled dynamics of the motors with gears, not mod-
eled friction in joints) as well as non-modelled distur-
bances occurring in the real object.
IJCCI2012-InternationalJointConferenceonComputationalIntelligence
508
0 2 4 6 8 10
-0.2
0
0.2
0.4
0.6
t[s]
s
Ad
5j
s
A
a)
0 2 4 6 8 10
0
0.2
0.4
0.6
t[s]
e
j
e
s
b)
0 2 4 6 8 10
-0.4
0
0.4
0.8
1.2
1.6
2
t[s]
5K
D1
K
D2
c)
0 2 4 6 8 10
-0.4
0
0.4
0.8
1.2
10
3
f
(x)1
f
(x)2
d)
t[s]
Figure 5: Results of verification: a) desired (s
Ad
) and actual
position of the ball on the beam, beam angle ϕ
d
, b) error of
the ball position (e
s
) and the beam orientation (e
ϕ
), c) PD
control signals, d) control signals of object’s non-linarites
compensation.
6 CONCLUSIONS
A synthesis of a neural control algorithm allowing for
stabilization of the ball location on the beam was con-
ducted on the basis of mathematical model of the ball-
beam system. Correctness of the adopted simplifying
assumptions as well as correctness of the control sys-
tem description was confirmed by simulation tests and
verification conducted with the use of the object built
by the authors.
ACKNOWLEDGEMENTS
This paper is supported by Polish Government under
Cont. N N501 068838
REFERENCES
Blajer, W. (1998). Metody dynamiki ukladow wieloc-
zlonowych. Wydawnictwo Politechniki Radomskiej,
Radom.
Blajer, W. and Kolodziejczyk, K. (2007). Control of under-
actuated mechanical systems with servo-constraints.
In Nonlinear Dyn., N.4, Vol.50, pp.781-791. Springer
Science.
Burghardt, A. and Giergiel, J. (2011a). Mechatronic mod-
elling and control of a underactuated system. In 10th
Conf. on Dyn. Sys. Theory and Applications, pp. 717
722. Lodz.
Burghardt, A. and Giergiel, J. (2011b). Modelling and con-
trol of a underactuated sphere and beam system. In
Communications in Nonlinear Science and Numerical
Simulation, Vol. 16, N.5, pp. 2350–2354. Elsevier.
Leonard, M. B. N. and Marsden, J. (2000). Controlled la-
grangians and the stabilization of mechanical systems.
In The First Matching Theorem, IEEE Transactions
on Automatic Control, N. 12, Vol. 45, pp. 2253–2270.
IEEE Press.
Leonard, N. (1997). Stability of a bottom-heavy underwa-
ter vehicle. In Automatica, N.3, Vol.33, pp. 331–346.
Elsevier.
Levine, B. K. J. and Mullhaupt, P. (1999). Modelling at-
ness and simulation of a class of cranes. In Ser. El.
Eng. Vol.43 No.3 ,pp. 215–225. Periodica Polytech-
nica.
Lewis, A. D. and Murray, R. M. (1995). Configuration
controllability of simple mechanical control systems.
In SIAM Journal on Control and Optimization, N.3,
Vol.35, pp.766–790. SIAM Review.
Spong, M. (1997). Underactuated mechanical systems. In
Lecture Notes in Control and Information,Vol. 230.
Springer.
AdaptiveNeuralNetworkControlofUnderactuatedSystem
509