22
022
022
sin
sincos
coscos
θ
θθ
LP
LP
LP
z
y
x
=
=
=
(7)
X
Z
Y
2
θ
0
θ
2
L
Figure 6: Configuration of ARTISAN Robot.
4.1 Test Results and Validation
Test results of the proposed PSO-NN algorithm are
presented in this section. The input values of the
joints (θ
2
, L
2
) are applied to the network as the input
1 and the input 2. Similarly, the responses of joints
are accepted as output1 and output 2. Different test
trajectories are employed to show validation of
results. In order to normalize the experimental data
to the range [0, 1], the value y(x) at each (x) point
was normalized to according to the equation given
for all input and output points.
minmax
min
)(
yy
yy
xy
−
−
=
(8)
Where; y(x) is the normalized value (between 0
and 1), y is the reference value, y
min
is the minimum
allowed value {taken as (-18 degrees for the output1,
θ
2
), (69cm for the output2, L
2
)}, y
max
is the
maximum allowed value {taken as (18 degrees for
the output1), (154cm for the output2)}
Two examples are implemented and presented
for the validation stage here. A population of 45
particles is used for the PSO-NN algorithm.
Numbers of particles and hidden layers have been
tried on the system in different in various training.
Learning factors c
1
and c
2
are set to 2.0. Both the
PSO-NN and BP-NN algorithm is trained for 5000
iterations. Learning rate and momentum rate is
chosen between 0 and 1. The initial weight values
have importance on training results if a priori
knowledge is available for weights. Initial weights
of the both algorithms are chosen between -1 and 1
randomly. Both algorithms are started with the same
initial weight values. The performance of the
proposed algorithm is tried with many different
initial weights. However, the convergence rate of the
algorithm did not change. The algorithms are coded
in C and run on a P4 with 2.4 GHz. After training
the network with the training values, the chosen test
values are fed into the trained algorithms. The
performances of PSO-NN algorithm and BP-NN
algorithm are compared with respect to the mean
squared error.
In the first example, 120 data have been recorded
experimentally in total. It represents an arbitrary
trajectory chosen for identification purpose. Half of
these data have been used for training and the rest of
the data have been used in the test session. The
position curves for the electro-hydraulic robot on the
rotational coordinate, θ
2
and the translational
coordinate, L
2
with the given signal and the output
values obtained for the test values by PSO-NN and
BP-NN algorithm are given in Figures 7(a) and 7(b).
One axis, the rotational is shown by radians and the
other axis is shown by meters, in 2 degrees of
freedom configuration (RP).
In the second example, 240 data have been
recorded experimentally. A circular trajectory is
traced in the second test by giving the coordinates of
a circle to a hydraulic robot, again representing RP
configuration. Similar to the above example, half of
these data have been used for the training and the
rest of the data have been used in the test session
Test values for circular trajectory are given in
Figures 8(a) and 8(b). In both results, Figures 7 and
8 show the reference signal with the tested
controller. The system follows the reference signal
with some error at some points. It can be seen that
PSO-NN algorithm produces better output values
than BP-NN algorithm in both examples. This error
can obviously be reduced by using more training
data, yielding increase in computation in the
network
The overall correction rate of the test results of
PSO-NN and BP-NN algorithms can be seen in
Table 2. Average rates are represented in Table 2,
additionally; PSO-NN gives better results in most
cases. The proposed PSO-NN algorithm converges
faster than BP-NN algorithm during the tests on the
electro-hydraulic system according to the reference.
Table 2 can be explained as the following. The value
of total error rate is found as 0.010995 for PSO-NN;
however total error rate of BP-NN algorithm is
0.042751 at the end of the 5000 iteration. In an
overall view, PSO-NN passed the total value of BP-
IDENTIFICATION AND CONTROL OF AN ELECTRO HYDRAULIC ROBOT PARTICLE SWARM
OPTIMIZATION-NEURAL NETWORK(PSO-NN) APPROACH
53