become a feasibility study. To determine the optimal
value N
opt
for each different initial state z
0
and steady
state (x
c,des
, y
c,des
) in an efﬁcient way, we have im-
plemented a simple binary search algorithm.
4 NEURAL NETWORK
Since the time required for the optimization makes
time-optimal control not suitable for fast systems, we
propose an off-line computation of the control law us-
ing a neural network. We assume the existence of
a function that maps the state to the optimal control
action, and this function is continuous. Continuous
functions can be approximated to any degree of ac-
curacy on a given compact set by feedforward neural
networks based on sigmoidal functions, provided that
the number of neural units is sufﬁciently large. How-
ever, this assumption is only valid if the solution to the
optimization problem is unique. After the neural net-
work controller has been constructed off-line, it can
then be used in an on-line mode as a feedback control
strategy. Because the network will always be an ap-
proximation, it cannot be guaranteed that constraints
are not violated. However, input constraints, which
are the only constraints we consider, can always be
satisﬁed by limiting the output of the network.
Training of the neural network
We have covered the workspace of the crane as can
be seen in Table 1. We have considered all initial
Table 1: Values of x
0
and x
des
x
t
0
= 0 [m]
x
t,des
= {0, 5, 10, . . . , 60} [m]
l
0
= {5, 10, 15, . . . , 50} [m]
l
des
= {5, 10, 15, . . . , 50} [m]
speeds zero, i.e. ˙x
t
0
,
˙
θ
0
,
˙
l
0
as well as the swing an-
gle θ
0
are zero. The initial state for the trolley, x
t
0
, is
always zero, and the steady state is within the range
0 ≤ x
t,des
≤ 60 m , with steps of 5 m. The dynamical
behavior of the crane depends on the distance of the
trolley travelling x
t
− x
t,des
and not on its position.
This explains why we only consider x
t
0
= 0 m.
We don’t consider simulations where we start and
end in the same states, or in other words, where we
stay in equilibrium. Thus the total amount of different
combinations of initial states x
0
and steady states x
des
is 13 × 10 × 10 − 10 = 1290.
It is of utmost importance to keep the number of
inputs and outputs of the neural network as low as
possible. This to avoid unnecessary complexity with
respect to the architecture of the neural network. No-
tice that most of the steady states we use for the con-
trol problem, are always zero and can be disregarded
for the input signal of the neural network. The only
exceptions are x
t,des
and l
des
. Furthermore, we can
reduce the number of inputs by taking the distance of
the trolley travelling x
t
− x
t,des
, while still providing
the same dynamic behavior. We cannot reduce the
number of the outputs, hence for the minimum num-
ber of inputs (z) and outputs (y) we have:
z =
x
t
− x
t,des
˙x
t
θ
˙
θ
l
˙
l
l
des
, u =
u
1
u
2
We can reduce the dimension of the input vector
even more by using principal component analysis as a
preprocessing strategy. We eliminate those principal
components which contribute less than 2 percent. The
result is that the total number of inputs now is 6 in
stead of 7.
We have trained the neural network off-line with
the Levenberg-Marquardt algorithm. We have used
one hidden layer and we have used Bayesian regu-
larization to determine the optimal setting of hidden
neurons. For more detail about Bayesian regulariza-
tion we refer to (Mackay, 1992) and (Foresee and Ha-
gan, 1997).
Table 2: Bayesian regularization results for a 6-m
1
-2 feed-
forward network
m
1
E
T r
E
T st
E
V al
E
w
W
eff
5 42318 26759 14182 176 46.9
10 34463 29379 11568 226 90.6
20 24796 32502 8425 2164 180
30 24318 32819 8270 1219 268
40 21636 33573 7411 1099 357
50 18726 34617 6420 2270 445
60 19830 34152 6831 813 535
70 3462 7315 1424 1453 618
80 3599 7350 1473 828 704
90 3337 7459 1409 1232 793
100 3404 7473 1459 923 875
110 3225 7371 1401 1100 964
120 3237 7401 1437 1005 1046
130 3512 7281 1415 982 977
For the results we refer to Table 2 where m
1
de-
notes the number of neurons of the ﬁrst (and only)
hidden layer, E
T r
, E
T st
and E
V al
denote the sum of
squared errors on the training subset, test subset and
on the validation subset respectively. The sum of
ICINCO 2005 - INTELLIGENT CONTROL SYSTEMS AND OPTIMIZATION
42