You are on page 1of 29

Ocean Engineering 30 (2003) 16691697

www.elsevier.com/locate/oceaneng
Dynamic model of manoeuvrability using
recursive neural networks
L. Moreira

, C. Guedes Soares
Instituto Superior Tecnico, Unit of Marine Technology and Engineering, Technical University of
Lisbon, Av. Rovisco Pais, Lisbon 1049-001, Portugal
Received 14 May 2002; received in revised form 21 August 2002; accepted 10 October 2002
Abstract
This paper presents a Recursive Neural Network (RNN) manoeuvring simulation model for
surface ships. Inputs to the simulation are the orders of rudder angle and ships speed and
also the recursive outputs velocities of sway and yaw. This model is used to test the capabilities
of articial neural networks in manoeuvring simulation of ships. Two manoeuvres are simu-
lated: tactical circles and zigzags. The results between both simulations are compared in order
to analyse the accuracy of the RNN. The simulations are performed for the Mariner hull. The
data generated to train the network are obtained from a manoeuvrability model performing
the simulation of different manoeuvring tests. The RNN proved to be a robust and accurate
tool for manoeuvring simulation.
2003 Elsevier Science Ltd. All rights reserved.
Keywords: Manoeuvrability; Recursive neural networks; Simulation model
1. Introduction
The Articial Neural Networks (ANNs) have been successfully applied recently
to a variety of problems related with naval architecture. In fact ANNs interpolation
and in some cases extrapolation capability is very powerful particularly when map-
ping a multi-dimensional input data space to a multi-dimensional output data space
as demonstrated in Roskilly and Mesbahi (1996a). It is common for empirical data
to be used directly for marine design and analysis. The non-linear functional mapping
properties of ANNs and their capability to learn a new set of input patterns without

Corresponding author.
0029-8018/03/$ - see front matter 2003 Elsevier Science Ltd. All rights reserved.
doi:10.1016/S0029-8018(02)00147-6
1670 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
signicant disturbance to the previous structure are also important factors which
make them particularly useful for the modelling and identication of dynamic sys-
tems as shown in Roskilly and Mesbahi (1996b).
For instance, simulations using ANNs have been created using data from both
model and full-scale submarine manoeuvres. The incomplete data measured on the
full-scale vehicle were augmented by using feedforward neural networks as virtual
sensors to intelligently estimate the missing data (Hess et al., 1999). The creation
of simulations at both scales permitted the exploration of scaling differences between
two vehicles, which is described in Faller et al. (1998).
A predictive method for the estimation of the hydrodynamic characteristics for a
Mariner class ship performing certain standard manoeuvres is outlined in Haddara
and Wang (1999). The method uses ANNs to predict the hydrodynamic parameters
of the ship and the training data were obtained using a simulation program.
Another example of marine application of ANNs is made in catamarans or trimar-
ans with unusual underwater shape, which experience great non-linearities when the
vessel motions are large in magnitude. Then ANN techniques can be used to manage
complex database with a multitude of parameters and ANNs have been used to assist
a time-domain numerical model for prediction of pitch and heave motions of a con-
cept catamaran (Atlar et al., 1997) and the UK MoD concept trimaran frigate in
regular head seas (e.g. Atlar et al., 1998; Mesbahi and Atlar, 1998).
Other study concerning the identication of ship coupled heavepitch motions
using neural networks can be seen in Haddara and Xu (1999), where the experimental
data were obtained using an icebreaker ship model heaving and pitching in random
waves and it is shown that the ANNs produces good results when the system is
lightly damped. Still other important studies regard the reduction of roll in ships by
means of active ns controlled by a neural network (Liut et al., 2000). Here the
performance of the ns is improved by adding an active controller. The controller
commands the rotations of the ns about a span-wise axis in order to further reduce
the rolling motion. The rotations are commanded by a neural network controller. A
different type of application is the wind loading on ships, a model that can become
of interest to manoeuvring problems under wind conditions (Haddara and Guedes
Soares, 1999).
This brief review of the literature shows the great interest that ANN has raised
recently in connection to applications in ship dynamics. However, the review also
shows that the applications have been made of ANNs, which are basically static
models that cannot account for the changes that the system may have with time.
A Recursive Neural Network (RNN) is a computational technique for developing
time-dependent non-linear equation systems that relate input control variables to out-
put state variables. A recursive network is one that employs feedback; namely, the
information stream issuing from the outputs is redirected to form additional inputs
to the network. For this application, the RNNs are used to predict the time histories
of the manoeuvring variables velocities of sway and yaw.
The objective of the new predictive tool is an alternative to the usual manoeuvring
simulators that use traditional mathematical models, which are function of the hydro-
dynamic forces and moment derivatives. These values are normally achieved from
1671 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
experiments performed with models in tanks. This procedure is time consuming and
costly, requiring exclusive use of a large specialised purpose built facility. Another
disadvantage of this method is the intrinsic scale effect model-real ship. Anyway,
this is the unique valid method that can be used in the design stage of a ship.
The alternative RNN model presented in this paper represents an implicit math-
ematical model for ships, which time histories of manoeuvring motions are pre-
viously known. The input of this model will be just the time histories of the motions
of sway and yaw and also the required advance speed of the ship and respective
rudder angle. The main advantage of this method consists in that these parameters
are easily obtained from full-scale trials of ships existing, making this procedure
easier to perform and less expensive.
This paper shows the results of the comparison between simulations with a math-
ematical model and the simulations made with the RNN model after the training of
data obtained through the rst simulator. The purpose of this is to validate the model
and to show that it is an accurate predictive tool and is able to t the results achieved
with other formulation.
The simulation data describing a series of manoeuvres with varying rudder deec-
tion angles and approach speeds have been acquired for the Mariner ship hull (Crane
et al., 1989) and these data have been used to train and validate two neural networks,
one for each type of manoeuvre: tactical circles or zigzags.
2. Description of the ship mathematical model
It is assumed that the planar motion of the ship is not affected by the ships roll;
this assumption makes it possible to eliminate the roll equation. On this model will
not be inserted the equations referred to the propeller thrust and torque equations.
Therefore, this model will be easily connected to the propulsion simulation model
described in Moreira et al. (2000). Also, symmetry in relation to midship plane is
considered here, which is typical for ships with just one shaft line. A rst-order
differential equation is considered to describe the steering gear dynamics.
The orthogonal coordinates system (Euler coordinates) is the most widely used.
The standard body axis G
xy
have the origin in the centre of mass of the ship G, the
x-axis is directed forward and the y-axis to the starboard. At certain instant t these
axes will coincide with the inertia axis O
xh
. The instantaneous position of the ship
is described by the coordinates of the centre of mass x and h, as well as by the
heading angle between the axis x and x with the positive direction being clockwise.
The motion of the ship is decomposed in surge velocity u, sway velocity v and yaw
angular velocity r (positive clockwise). The speed of the ship can be given in the
following form: V = (u
2
+ v
2
)
1/ 2
. The hydrodynamic forces that act in the hull result
in a surge force X, a sway force Y and a yaw moment N. The rudder angle d
R
is
assumed to be positive when is directed to starboard.
The frames and kinematical parameters that are standard in ship manoeuvrability
are shown in Fig. 1. The drift angle b is not required to appear in the mathematical
model but will be calculated to allow the observation of its behaviour along the time.
It is dened as being equal to
1672 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Fig. 1. Frames of reference and main parameters.
b arcsin(v/ V) (1)
and is positive for the right side.
The equation of dynamics can be written in its standard form as following:
X m(uvr) Y m(v ur) N I
zz
r (2)
where the dots mean the derivatives with respect to time, m the ships mass, and I
zz
is the moment of inertia of the ship in relation to the centre of mass.
The mass can be represented by
m
r
2
mL
2
T (3)
where m is the non-dimensional mass, L the length of the ship and T is the draught
of the ship. The gyration radius is assumed to be equal to L/4 (value usually assumed)
and the moment of inertia can be estimated as being equal to
I
zz
0.0625mL
2
(4)
And the main characteristics of the Mariner ship (Crane et al., 1989) are
L 100 m
B 15 m
T 5 m
The kinematical equations are
x

u cosyv siny h u siny v cosy j r (5)


The governing equation is
1673 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
d

1
T
R
(d

d
R
) (6)
where T
R
is the steering gear time lag (it is assumed as being equal to 5 s) and d

is the rudder order requested.


Simultaneously, the following inequalities must be respected:
d
R
d
m
(7)
dd
m
(8)
d
R
e
m
(9)
where d
m
is the maximum rudder angle and
m
is the maximum deviation rate. The
standard values are 35 for d
m
and 2
1
3
/ s for
m
.
Initially, it is required to unify the hydrodynamic forces of surge and sway with the
acceleration-independent-inertial terms and to consider the acceleration-dependent-
inertial hydrodynamic forces through the added masses m
11
and m
22
. Thus, the
dynamic equations can be rewritten as follows:
X

(m m
11
)u Y

(m m
22
)v N

(I
zz
m
66
)r (10)
where X

= mvr + X+m
11
u; Y

= mur + Y+m
22
v, and N

= N+m
66
r.
The modied surge force X

at u0 can be represented as follows:


X

(m C
m
m
22
)vr T
E
(u,n) C
R
u
2

r
2
LTX
dd
u
2
d
2
R
(11)
where C
m
is the Inoue coefcient (Crane et al., 1989) T
E
the effective thrust, C
R
the
resistance factor, and X
dd
is the dimensionless hydrodynamic derivative.
The C
R
factor is dimensional and can be expressed through the dimensionless drag
coefcient C
TL
as follows (Van Mannen and Van Oossanen, 1989):
C
R

m
L
C
TL
(12)
The modied sway force Y

is given by
Y

mur
r
2
LTV
2
Y (13)
where Y is the sway force coefcient and the yaw moment is given by
N


r
2
L
2
TV
2
N (14)
with N representing the yaw moment coefcient.
The mathematical models for the sway force and yaw moment coefcients include
the numerical values for the hydrodynamic derivatives and other constant parameters
related with the forces components that act in the hull and rudder.
1674 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
The sway force and yaw moment coefcients are described by conventional poly-
nomial regression models
Y Y
v
v Y
r
r Y
vvv
v
3
Y
vvr
v
2
r Y
d
d
R
Y
vvd
v
2
d
R
N (15)
N
v
v N
r
r N
vvv
v
3
N
vvr
v
2
r N
d
d
R
N
vvd
v
2
d
R
where Y
v
, , N
vvd
are hydrodynamic derivatives and v and r are non-dimensional
kinematical parameters usually dened as being equal to:
v v/ V r rL/ V (16)
In order to make the ship mathematical model more exible it was assumed that
the linear hydrodynamic derivatives are dependent of the trim and the well-known
formulas of Inoue (Crane et al., 1989) were used to take this fact into account:
Y
v
(1 b
1
d

)Y
v0
Y
r
(1 b
2
d

)Y
r0
N
v
(1 b
3
d

)N
v0
N
r
(17)
(1 b
4
d

)N
r0
where d

= d/ T is the relative trim; the absolute trim d is positive by stern and the
subscript 0 is referred to null trim values. The parameters b
1
, , b
4
are
b
1
0.6667 b
2
0.8 b
3
0.27Y
v0
/ N
v0
b
4
0.3 (18)
The method of accounting for trim was derived from other mathematical model of
forces applied in the hull, but through the comparison with other estimation method
of Fedyaevsky and Sobolev (1964) and with basis on the slender body theory it was
demonstrated that the rst method is of a general nature and that can be applied to
any mathematical model in order to obtain realistic estimations.
Considering the original polynomial expressions presented in Crane et al. (1989),
the regressors vd
2
R
, d
3
R
must be eliminated from the polynomial regression models
(15) as well as the constant terms that take into account with the asymmetry in
relation to the centre-plane because estimating their inuence they show to be of no
relevant importance.
The numerical values of the hydrodynamic derivatives Y
v
, , N
vvd
, the non-
dimensional added masses k
11
= m
11
/ m, k
22
= m
22
/ m and k
66
= m
11
/ I
zz
and other
constant parameters are given in Table 1.
The mathematical model of the ship is obviously non-linear. Therefore, a linear
system was chosen to start implementing to observe how it behaves. This means
that the non-linear basic model has to be linearised, it is necessary to synthesise a
controller for the linearised system and then to test its applicability to the original
non-linear dynamic system.
The usual method of linearisation implicates the removal of all non-linear terms
of the dynamic equations of motion. The resulting linearised mathematical model is
valid but just in the absence of disturbances to the motion because in the course
changing manoeuvres, in general, variations in the kinematical parameters of no
negligible value exist. In principle, it is possible to conclude the linearisation in the
neighbourhood of any current values of state variables but this, rstly, will lead to
unstable linearised mathematical models in some cases and secondly will be an over-
1675 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Table 1
Values of the dimensionless parameters that dene the hydrodynamic forces of the Mariner ship
Parameter Symbol Value
Relative added masses K
11
0.03
K
22
0.9
K
66
0.63
Drag coefcient C
TL
0.07
Inoues coefcient C
m
0.625
Hydrodynamic derivatives X
dd
0.02
Y
v
0.244
Y
r
0.067
Y
vvv
1.702
Y
vvr
3.23
Y
d
0.0586
Y
vvd
0.25
N
v
0.0555
N
r
0.0349
N
vvv
0.345
N
vvr
1.158
N
d
0.0293
N
vvd
0.1032
load of additional calculations as explained in Sutulo (1997) and Sutulo et al. (2002).
On this case, it was decided to linearise the original non-linear mathematical model
by the least mean square method in a reasonable nite domain in state-space. This
approach has the advantage of being used just once in the initialisation state, and
its most important benet is the ability to obtain a stable linearised mathematical
method even in the case of directionally unstable ships.
It is assumed that the surge motion has little inuence in the transversal motion
(sway + yaw). This makes it possible to linearise just of the sway and yaw equations
where the surge velocity uV. When using linearised mathematical models, it is
more convenient to operate them in the dimensionless form. The kinematic para-
meters v and r were already introduced and now will appear the non-dimensional
standard time t that is dened as dt = dt(V/ L). Then, the sway and yaw equations
appear as
m

22
v f
Y
(v,r,d
R
) m

66
r f
N
(v,r,d
R
) (19)
where the dots above the symbols mean the derivative with respect to non-dimen-
sional time; the non-dimensional coefcients of inertia are
m
22

2(m m
22
)
rL
2
T
m
66

2(I
zz
m
66
)
rL
4
T
(20)
and the second member of the equations
f
N
(v,r,d
R
) N
v
v N
r
r N
vvv
v
3
N
vvr
v
2
r N
d
d
R
1676 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Y
vvd
v
2
d
R
f
Y
(v,r,d
R
) Y
v
v (Y
r
m)r Y
vvv
v
3
Y
vvr
v
2
r (21)
Y
d
d
R
Y
vvd
v
2
d
R
where the non-dimensional mass of the ship is given by
m
2m
rL
2
T
(22)
A set of linear equations will be considered instead of non-linear Eqs. (19)
m
22
v C

v
Y
v C

r
Y
r C
d
Y
d
R
m
66
r C

v
N
v C

r
N
r C
d
N
d
R
(23)
where the linearised hydrodynamic derivatives C

v
Y
, ..., C
d
N
in the second members of
the equations are determined by the least square principle:
(C

v
Y
,C

r
Y
,C
d
Y
) arg min

r
L
r
L

v
L
v
L

d
L
d
L
[f
Y
(v,r,d
R
)(C

v
Y
v C

r
Y
r
C
d
Y
d
R
)]
2
dr dv dd
R
(C

v
N
,C

r
N
,C
d
N
) arg min

r
L
r
L

v
L
v
L

d
L
d
L
[f
N
(v,r,d
R
) (24)
(C

v
N
v C

r
N
r C
d
N
d
R
)]
2
dr dv dd
R
where v
L
, r
L
and d
L
are parameters that dene the dimensions and area of the
linearisation domain. They are correlated with the expected variations of the kinem-
atic parameters but in fact their values might be empirically set in order to obtain
the most consistent linearised model.
Eq. (24) lead to the following sets of normal equations (similar for both Y and
N components):

r
L
r
L

v
L
v
L

d
L
d
L
[f
Y,N
(v,r,d
R
)(C

v
Y,N
v C

r
Y,N
r C
d
Y,N
d
R
)]v dr dv dd
R
0

r
L
r
L

v
L
v
L

d
L
d
L
[f
Y,N
(v,r,d
R
)(C

v
Y,N
v C

r
Y,N
r C
d
Y,N
d
R
)]r dr dv dd
R
0 (25)

r
L
r
L

v
L
v
L

d
L
d
L
[f
Y,N
(v,r,d
R
)(C

v
Y,N
v C

r
Y,N
r C
d
Y,N
d
R
)]d
R
dr dv dd
R
0
For this particular non-linear regression model for sway force and yaw moment
coefcients the triple integrals are easily calculated explicitly and the resulting equa-
tions for the linearised hydrodynamic derivatives appear simply in the following
form:
C

v
Y
Y
v

3
5
Y
vvv
v
2
L
C

r
Y
Y
r
m
1
3
Y
vvr
v
2
L
C

d
Y
Y
d

1
3
Y
vvd
v
2
L
C

v
N
(26)
N
v

3
5
N
vvv
v
2
L
C

r
N
N
r

1
3
N
vvr
v
2
L
C

d
N
N
d

1
3
N
vvd
v
2
L
1677 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
The resulting formulation does not contain r
L
and d
L
. It is obvious that when v
L
tends to zero, the linearised generalised hydrodynamic derivatives become similar to
the linear derivatives in the polynomial expansion. This means that the linearisation
technique follows the usual linearisation (differential) and its particular case corre-
sponds to the linearisation in the innitesimal domain.
It is more convenient to rewrite the linearised Eqs. (23) for further transformations
in the following way:
m
22
v C
v
Y
v C
r
Y
r C
d
Y
d
R
m
66
r C
v
N
v C
r
N
r C
d
N
d
R
(27)
where
C
v
Y
C

v
Y
, C
r
Y
C

r
Y
, C
v
N
C

v
N
, C
r
N
C

r
N
(28)
The set of Eqs. (27) can be transformed in the yaw equivalent second-order Nom-
oto equation:
T
1
T
2
r (T
1
T
2
)r r K(d
R
T
3
d

R
) (29)
which can be approximated by the rst-order Nomoto equation:
Tr r Kd
R
(30)
The non-dimensional time lags T
1
, T
2
, T
3
and T, as well as the gain of the ship
K are related with the previously dened parameters of set (28) through the follow-
ing equalities:
T
1

1
p
1
, T
2

2
p
2
, T
3

E
F
, T T
1
T
2
T
3
, K
F
C
p
1

B
A
p
2
, p
2

BB
2
4AC
2A
A m
22
m
66
, B m
22
C
r
N
(31)
m
66
C
v
Y
, C C
v
Y
C
r
N
C
v
N
C
r
Y
, E m
22
C
d
N
, F C
v
Y
C
d
N
C
v
N
C
d
Y
where p
1
and p
2
are, obviously, the poles of the linearised model and the remainder
variables are of auxiliary character.
3. Structure of the simulation model
The learning problem through neural networks described here will consist of simu-
lating the velocities of sway, v(t), and yaw, r(t), assuming that input parameters are
the rudder angle, d(t), and the ships speed, V(t). The neural network inputs will be
the rudder angle, d(t), and the ships speed, V(t) and also the velocities of sway,
v(t1), and yaw, r(t1). All these data will be obtained from manoeuvrability simul-
ations with the manoeuvrability model implemented in a block diagram in Simulink.
1678 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
The network outputs will be the velocities of sway, v(t), and yaw, r(t).
The kinematical equations used for the trajectories calculation are the ones referred
in Eqs. (5). The RNN will be trained to imitate the parameters of sway and yaw
resulting from the simulations for different speeds and rudder angles requested.
Fig. 2 illustrates the representation used in this version of the RNN simulator and
shows the type of typical representation of many systems of ANNs. Each node
(circle) in the network diagram corresponds to the output of a unit and the lines that
input the node from left are its inputs. As can be seen, there are 10 units that receive
inputs directly from the achieved data. These units are called hidden units because
their output is valid just inside the network and are not valid as part of the global
network output. Each one of these 10 hidden units computes a single real output
based on a weighted combination of their inputs. These outputs of the hidden units
are then used as inputs of a second layer of two output units. Each output corresponds
to either a velocity of sway or yaw in the instant t and these outputs will again input
the network (cyclic) as being the inputs sway and yaw in the instant t1.
This network structure is typical of many ANNs. Here the individual units are
interconnected in layers. In general, ANNs can have with many other types of struc-
turesacyclics or cyclics, directs or indirects. In this paper will be used the approxi-
mation with ANNs more common and practical, which is based in the Backpropag-
ation algorithm.
The simplied mathematical model described in Section 2 was implemented using
the software MatLab and its toolbox Simulink. This software was chosen due to
its interface capability with the user and due to the easy visualisation and comprehen-
sion of the system. The Simulink has several algorithms to solve differential equa-
tions, and for this particular case was chosen the RungeKutta method. The complete
block diagram of the model is illustrated in Fig. 3. Although this model is a variation
of a more complex model that allows obtaining the ships trajectory with good accu-
racy (e.g. Sutulo, 1997; Sutulo et al., 2002), this has the advantage to allow a rapid
visualisation of the manoeuvres because it allows a reasonable interface with the user.
Fig. 2. RNN to simulate ships manoeuvrability.
1679 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
F
i
g
.
3
.
C
o
m
p
l
e
t
e
b
l
o
c
k
d
i
a
g
r
a
m
o
f
t
h
e
m
a
n
o
e
u
v
r
a
b
i
l
i
t
y
m
o
d
e
l
.
1680 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
4. Validation of the learning through ANNs to the case study
ANN training methods are adequate even for those problems where the training
data correspond to noisy data, as can be the case of the data achieved on board in
full-scale manoeuvring trials.
One of the potential capabilities of the model described in this paper will be the
simulation of the motions using training data obtained from full-scale tests. Work
in this eld has been developed and an improved RNN manoeuvring simulation tool
for surface ships, trained and validated with data acquired from two ships operating
in the open ocean, is described in Hess and Faller (2000).
The Backpropagation algorithm is the most widely used learning technique for
ANNs. It can be used in problems with the following characteristics:
The training examples can contain errors. The learning methods through ANNs
are quite robust to noise in the training data.
Long training timings are acceptable. Typically the network training algorithms
require long training timings. The training timing can vary between some seconds
and many hours, depending of factors such as the number of weights in the net-
work, the number of considered training examples and the assumed values for
the learning algorithm parameters.
A quick evaluation of the target (desired) function learned can be required.
Although the training timings of the ANN can be long, the evaluation of the
learned network, in such a way to apply it to a subsequent example, is typically
very fast.
The ability of human understanding the learned target function is not important.
The learned weights through neural networks are usually hard to interpret by
human.
5. Network elements
Data for training, cross-validation and testing the neural networks were acquired
from simulations performed with the manoeuvrability model implemented in a block
diagram. Because the manoeuvring simulations exhibit similar turning characteristics
for both right and left turns, the simulation performed were just for positive rud-
der angles.
The architecture of the neural network is illustrated schematically in Fig. 4. The
network consists of three layers: an input layer, one hidden layer and an output layer.
Within each layer are nodes, which contain a non-linear transfer function that oper-
ates on the inputs to the node and produces a smoothly varying output.
The binary sigmoid function was used for this work; for an input x it produces
the output y, which varies from 0 to 1 and is dened by
y(x)
1
1 e
x
(32)
1681 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Fig. 4. Recursive neural network.
Note that the nodes in the input layer simply serve as a means to couple the inputs
to the network; no computations are performed within these nodes. The nodes in
each layer are fully connected to those in the next layer by weighted links. As data
travel along a link to a node in the next layer and are multiplied by the weight
associated with that link.
The weighted data on all links terminating at a given node are then summed and
forms the input to the transfer function within that node. The output of the transfer
function then travels along multiple links to all the nodes in the next layer, and so
on. So, as shown in Fig. 4, an input vector at a given time step travels from left to
right through the network where it is operated on many times before it nally pro-
duces an output vector on the output side of the network. Not shown in Fig. 4 is
the fact that most nodes have a bias; this is implemented in the form of an extra
weighted link to the node. The input to the bias link is the constant 1, which is
multiplied by the weight associated with the link and then summed along with the
other inputs to the node.
An RNN has feedback; the output vector is used as additional inputs to the network
at the next time step. For the rst time step, when no outputs are available, these
inputs are lled with initial conditions. The network described here has four inputs.
The hidden layer contains 10 nodes and each of these nodes uses a bias. The output
layer consists of two nodes, and also uses bias units. The network contains 16 compu-
tational nodes and a total of 72 weights and biases. The input vector consists of the
rudder angle and advance speed of the ship, and the network then predicts at each
time step the sway velocity component v and the yaw velocity component r. These
velocity predictions are then used to compute at each time step the heading angle
1682 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
and the trajectory components. Recursed outputs from the prior step are used as two
additional contributions to the input vector. The collection of input and corresponding
target output vectors comprise a training set, and these data are required to prepare
the network for further use. Data les containing time histories of tactical circles
and zigzag manoeuvres formed the training sets.
After the neural network has been successfully trained using cross-validation, the
weights that provide the minimum error to the network are saved. Thus, the network
may be presented with an input vector similar to the input vectors in the training
set (i.e. drawn from the same parameter space), and it will then produce a predicted
output vector. This ability to generalise, i.e. to produce reasonable outputs for inputs
not encountered in training is what allows neural networks to be used as simulation
tools. To test the ability of the network to generalise, a separated subset of test data
les must be used. These test data les then demonstrate the predictive capabilities
of the network.
Two neural networks were trained in this manner to predict tactical circles and
zigzags. In each case about 70% of the data les comprised the training set with
30% set aside as cross-validation les. The networks were trained for 65,500 iter-
ations (epochs). In each iteration, the time series are presented for all inputs and
outputs for all les in the training set. During this training process, training is paused
every 10 iterations, and the network is tested for its ability to generalise. To carry
this out, all of the les in the training set are combined with the cross-validation
les and the entire set is presented to the network.
After training has concluded, one examines the error measures as a function of
the number of iterations at which training should have ceased and where minimum
absolute errors and maximums in the measures occur. The best performance for the
tactical circle network was achieved at epoch 23,003 for the cross-validation set and
at epoch 65,500 for the training set and the best performance for the zigzag network
was achieved at epoch 65,500 for both cross-validation and training sets.
Summarising, two neural networks were trained to predict tactical circles and zig-
zags using the procedure described in this section. The results of these simulations
are detailed in Section 6.
The non-linear activation function used in this case is the sigmoid function that
has saturation values of (0.1). Presenting a data set whose values are not bounded
by the saturation range will force the neurone to its saturation point and it will no
longer respond to changes in input. In this case study was chosen to normalise the
data between 0.2 and 0.8.
6. Case study: simulation of the manoeuvrability characteristics of ships
In the following case study, the results achieved using RNNs and conventional
mathematical models built in a form of block diagram are compared.
The learning objective in this case evolves the classication of the sway and yaw
velocities of the ship to several rudder angles and advance speed. Sampling period
used was 1 s and 22 runs of simulated data are available, i.e. 16 tactical circles and
six zigzags.
1683 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Table 2
Range of variation of the tactical circle network parameters
Variable Min Max
d (deg) 0 35
V (knots) 3.7 15
v (m/s) 0 0.99
r (rad/s) 0.023 0
Two target functions will be trained through the data obtained in the manoeuvr-
ability simulations. Given as input the rudder angle, the advance speed of the ship,
sway and yaw at the instant t1, the RNN can be trained to produce as outputs the
sway and yaw velocities at the instant t.
6.1. Modelling options
6.1.1. Input encoding
Given that the input of the RNN will be a representation of the order of manoeuvr-
ing of the ship, a modelling key is how to encode this order. One option could be
just to use the rudder angle and the advance speed of the ship as inputs. One difculty
that could happen with this option would be that this leads to a higher variable
number of manoeuvring characteristics (velocities of sway and yaw) for each instant
of manoeuvre. Taking as inputs the rudder angle, the advance speed of the ship and
also the velocities of sway and yaw at the instant t1 the possible number of vari-
ables will be decreased in the learning of the velocities of sway and yaw at the
instant t. Table 2 shows the ranges of variation of the parameters values evolved
in the tactical circles network.
Table 3 shows the ranges of variation of the parameters values evolved in the
zigzags network. All these values were normalised between 0.2 and 0.8 in order that
the inputs of the network have values in the same range that the activation of the
hidden unit and output unit.
Table 3
Range of variation of the zigzags network parameters
Variable Min Max
d (deg) 20 20
V (knots) 4.5 15
v (m/s) 0.56 0.56
r (rad/s) 0.013 0.013
1684 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Table 4
Tactical circles-simulation runs executed for training, cross-validation and test
No. Test Approach speed Rudder angle (deg)
(knots)
1 Circle Max Max
2 Circle 75% Max Max
3 Circle 50% Max Max
4 Circle 25% Max Max
5 Circle Max 75% Max
6 Circle 75% Max 75% Max
7 Circle 50% Max 75% Max
8 Circle 25% Max 75% Max
9 Circle Max 50% Max
10 Circle 75% Max 50% Max
11 Circle 50% Max 50% Max
12 Circle
a
25% Max 50% Max
13 Circle
a
Max 25% Max
14 Circle
a
75% Max 25% Max
15 Circle
a
50% Max 25% Max
16 Circle
a
25% Max 25% Max
17 Circle
b
70% Max Max
18 Circle
b
60% Max Max
19 Circle
b
30% Max 50% Max
20 Circle
b
Max 35% Max
21 Circle
b
95% Max 30% Max
22 Circle
b
40% Max 25% Max
a
Circles used for cross-validation.
b
Circles used for test.
Fig. 5. Test 6: Time histories for sway and yaw75% max rudder angle; 75% max speed.
1685 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Fig. 6. Test 6: Ships trajectory75% max rudder angle; 75% max speed.
Fig. 7. Test 9: Time histories for sway and yaw50% max rudder angle; max speed.
6.1.2. Output encoding
The RNN must provide as output values the sway and yaw velocities for each
instant t. The output values were also normalised between 0.2 and 0.8. If one tries
to train the network to tune the desired values exactly equal to 0 and 1, the gradient
descent will force the weights to grow without limit. On the other hand, the values
0.2 and 0.8 are obtained using a sigmoid unit with nite weights.
6.1.3. Network structure
For this work a standard structure of an RNN, using two layers of sigmoid units
(one hidden layer and one output layer), was selected. Using 16 manoeuvres, the
training time was approximately 3 h and 10 min using a Pentium III (450 MHz) for
the tactical circles network. For the zigzag network we used six manoeuvres and the
training time was approximately 1 h and 20 min using the same processor.
1686 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Fig. 8. Test 9: Ships trajectory50% max rudder angle; max speed.
Fig. 9. Test 12: Time histories for sway and yaw50% max rudder angle; 25% max speed.
6.1.4. Other parameters of the learning algorithm
On this learning experiences the learning rate h was settled equal to 0.1 and the
momentum a was chosen equal to 0.7. The weights of all network units were ran-
domly initialised. The 65,500 iterations were used because in the software used for
training it was not possible to establish a stopping criterion. The data available were
separated in two different groups: one set for training and another set for validation.
After 10 iterations the network performance was evaluated through the validation
set. The nal network selected was that with better accuracy through the validation
set. The nal accuracy obtained was measured through a separated test set different
from the training and cross-validation sets.
1687 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Fig. 10. Test 12: Ships trajectory50% max rudder angle; 25% max speed.
Fig. 11. Test 17: Time histories for sway and yawmax rudder angle; 70% max speed.
6.2. Results
Beginning with the RNN to simulate the tactical circles, the network was trained
using 11 tactical circles with ve set aside for cross-validation. A set of six tactical
circles was also used for test. All these manoeuvres are described in Table 4. Figs.
516 depict the time histories for sway and yaw and the circle trajectories obtained
through the RNN simulation superimposed upon the time histories and the circle
trajectories obtained through the simulation with the previous model. In each case
the only information provided to the trained network were the time histories for the
rudder deection angle and for the advance speed of the ship and the initial con-
ditions of the vehicle. The training runs that are shown are comprised by two of the
11 manoeuvres used for training, one of the ve validation runs and three separated
circles used for test. The two training runs that are shown represent a mixture of
1688 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Fig. 12. Test 17: Ships trajectorymax rudder angle; 70% max speed.
Fig. 13. Test 18: Time histories for sway and yawmax rudder angle; 60% max speed.
Fig. 14. Test 18: Ships trajectorymax rudder angle; 60% max speed.
1689 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Fig. 15. Test 20: Time histories for sway and yaw35% max rudder angle; max speed.
Fig. 16. Test 20: Ships trajectory35% max rudder angle; max speed.
two different rudder angles and two different approach speeds. The test manoeuvres
comprise a mixture of two different rudder angles with three different approach
speeds. Solid lines represent the simulation using the RNN and the dashed lines are
used for the previous predictions. In all the cases the circles are simulated with input
for the rudder angle a step function at 20 s.
The predictions for the training circles are quite good. The trained network has
learned how to perform a tactical circle manoeuvre. This is evident by the perform-
ance of the network on the test circles. Recall that the test runs were never used to
modify the weights during training, and in this sense, have never been used by
the network.
The RNN has been successfully able to generalise, i.e. to make predictions for
manoeuvres different from, but similar to those represented in the training set. To
1690 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Table 5
Tactical circles error measures averaged over all manoeuvres/averaged over test runs only
Variable Absolute error %
v 0.0182/0.0171 m/s 4.9/4.6
r 0.00042/0.00041 rad/s 4.8/4.7
x 90/86 m 5.7/5.5
y 90/86 m 5.7/5.5
quantify the convergence of the RNN, averaged errors of the tactical circles have
been tallied in Table 5 for the four critical variables: v, r, x and y.
Figs. 17 and 18 depict the errors for a set of training and cross-validation data
runs for complete and steady manoeuvres, respectively. Figs. 19 and 20 show the
errors for the set of test manoeuvres. In Table 5 the rst number in each cell is an
error averaged over all 22 manoeuvres, whereas the second number is the error
averaged over the six test circles only. To give some percentage errors, the absolute
errors were normalised by the following scales: average sway velocity in the turn
0.375 m/s, average yaw velocity in the turn of 0.00876 rad/s and an average turning
diameter of 1577 m.
The zigzag RNN was trained using three zigzags with one set aside for cross-
validation. A set of two zigzags was also used for test. All these manoeuvres are
described in Table 6. Figs. 2126 depict the predicted time histories for sway, yaw
and heading using the RNN and the previous model. The four training runs that are
shown represent a mixture of two different rudder checking angles and two different
approach speeds. The test manoeuvres comprise two different rudder checking angles
and one approach speed.
Fig. 17. Comparison between methods for complete manouverstraining and cross-validation data runs.
1691 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Fig. 18. Comparison between methods for steady manouvertraining and cross-validation data runs.
Fig. 19. Comparison between methods for complete manouverstest data runs.
The zigzag manoeuvre is a more complex manoeuvre than the tactical circle and
yet the network trained satisfactory well to the data. The results for the zigzags
network are shown in Table 7 for the three critical variables: v, r and y. The rst
number in each cell is an error averaged over all eight manoeuvres, whereas the
second number is the error averaged over the two test runs only. The percentage
errors were obtained by normalising with: average steady sway velocity in the
manoeuvre of 0.3086 m/s, average steady yaw velocity in the manoeuvre of 0.00718
rad/s and an average peak-to-peak heading variation of 32.
To make some estimates of precision error manoeuvres with the same rudder
1692 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Fig. 20. Comparison between methods for steady manouvertest data runs.
Table 6
Zigzags-simulation runs executed for training, cross-validation and test
# Test Approach speed (knots) Rudder angle (deg)
17 Zigzag Max 10 to 10
18 Zigzag Max 20 to 20
19 Zigzag 50% Max 10 to 10
20 Zigzag
a
50% Max 20 to 20
21 Zigzag
b
70% Max 10 to 10
22 Zigzag
b
70% Max 20 to 20
a
Zigzags used for cross-validation.
b
Zigzags used for test.
deection and approach speeds were compared. For the tactical circles, the steady
sway velocity in the turn varied by 0.00250.0624 m/s or 210.5%, the steady yaw
velocity in the turn by 0.00007240.0015 rad/s or 310.8% and the turning diameter
differed by 6220 m or 18%. For the zigzags the steady sway velocity in the
manoeuvre varied by 0.00260.23 m/s or 141%, the steady yaw velocity in the
manoeuvre varied by 0.0000530.0055 rad/s or 0.842% and the peak-to-peak head-
ing differed by varied by 2.515.5 or 11.835.6%.
7. Conclusions
RNNs trained on tactical circle manoeuvres were able to predict sway and yaw
velocities and trajectory components with errors averaged over all the data of 6%
1693 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Fig. 21. Test 17: Time histories for sway, yaw and headingzigzag 10 to 10; max speed.
Fig. 22. Test #18-Time histories for sway, yaw and headingzigzag 20 to 20; max speed.
or less. When considering only the test manoeuvres, errors for these variables ranged
from 56%. For the more complex zigzag manoeuvre the errors were higher. The
sway and yaw velocities and heading exhibited errors averaged over all the data of
20% or less and the test manoeuvres decreased the errors to 13% or less.
The most difcult predictions for the zigzag manoeuvres were for the rudder
1694 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Fig. 23. Test #19-Time histories for sway, yaw and headingzigzag 10 to 10; 50% max speed.
Fig. 24. Test #20-Time histories for sway, yaw and headingzigzag 20 to 20; 50% max speed.
checking angles 20 to 20. This fact can be observed from both training and test
runs. RNNs have demonstrated ability as a robust and accurate manoeuvring simul-
ation tool.
1695 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Fig. 25. Test #21-Time histories for sway, yaw and headingzigzag 10 to 10; 70% max speed Y
v
Fig. 26. Test #22-Time histories for sway, yaw and headingzigzag 20 to 20; 70% max speed.
1696 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
Table 7
Zigzags error measures averaged over all manoeuvres/averaged over test runs only
Variable Absolute error %
v 0.0585/0.0395 m/s 18.9/12.8
xr 0.0014/0.00088975 rad/s 19.5/12.4
y 6/3.8 18.8/11.9
Acknowledgements
The present work was performed in the scope of the project Identication and
Simulation of Ship Manoeuvring Characteristics, funded jointly by the Foundation
the Portuguese Universities and the Ministry of Defence under the Programme The
Oceans and their Coasts.
References
Atlar, M., Kenevissi, F., Mesbahi, E., Roskilly, A.P., 1997. Alternative time domain techniques for multi-
hull motion response prediction. In: Proceedings of the Fourth International Conference on Fast Sea
Transportation (FAST97), Sydney, vol. 2.
Atlar, M., Mesbahi, E., Roskilly, A.P., Gale, M., 1998. Efcient techniques in time-domain motion simul-
ation based on articial neural networks. In: International Symposium on Ship Motions and Manoeuvr-
ability, RINA, London, UK,, pp. 123.
Crane, C.L., Eda, H., Landsburg, A., 1989. Controllability. In: Lewis, E.V. (Ed.), Principles of Naval
Architecture, vol. 3. SNAME, Jersey City, pp. 191365.
Faller, W.E., Hess, D.E., Smith, W.E., Huang, T.T., 1998. Applications of recursive neural network tech-
nologies to hydrodynamics. In: Proceedings of the 22nd Symposium on Naval Hydrodynamics, Wash-
ington, DC, vol. 3., pp. 115.
Fedyaevsky, K.K., Sobolev, G.V., 1964. Control and Stability in Ship Design. US Department of Com-
merce Translation, Washington, DC.
Haddara, M.R., Guedes Soares, C., 1999. Wind loads on marine structures. In: Marine Structures, vol.
12., pp. 199209.
Haddara, M.R., Wang, Y., 1999. On parametric identication of manoeuvring models for ships. Int.
Shipbuilding Prog. 46 (445), 527.
Haddara, M.R., Xu, J., 1999. On the identication of ship coupled heavepitch motions using neural
networks. Ocean Eng. 26, 381400.
Hess, D.E., Faller, W.E., Smith, W.E., Huang, T.T., 1999. Neural networks as virtual sensors. In: Proceed-
ings of the 37th AIAA Aerospace Sciences Meeting,, pp. 110 (Paper 99-0259).
Hess, D., Faller, W., 2000. Simulation of ship manoeuvres using recursive neural networks. In: Proceed-
ings of 23rd Symposium on Naval Hydrodynamics, Val de Reuil, France,
Liut, D.A., Mook, D.T., VanLandingham, H.F., Nayfeh, A.H., 2000. Roll reduction in ships by means
of active ns controlled by a neural network. Ship Technol. Res. 47, 7991.
MATLAB High-Performance Numeric Computation and Visualisation Software, The Math Works Inc.
Narick. Mass. USA, 1992; p. 29.
Mesbahi, E., Atlar, M., 1998. Applications of articial neural networks in marine design and modelling.
In: Proceedings of the Workshop on Articial Intelligence and Optimisation for Marine Applications,
Hamburg, Germany,, pp. 3141.
Moreira, L., Francisco, R.A., Guedes Soares, C., 2000. Dynamic simulation of marine propulsion systems.
1697 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697
In: Guedes Soares, C., Beirao Reis, J. (Eds.), O Mar e os Desaos do Futuro (The Sea and the Future
Challenges). Edicoes Salamandra, Lisbon, pp. 167184 (In Portuguese).
Roskilly, A.P., Mesbahi, E., 1996a. Articial neural networks for marine system identication and model-
ling. Trans. IMarE 108 (Pt. 3).
Roskilly, A.P., Mesbahi, E., 1996b. Marine system modelling using articial neural networks: an introduc-
tion to the theory and practice. Trans. IMarE 108 (Pt. 3).
SIMULINK Users Guide, The MathWorks, Inc., Narick, Mass. 1993. p. 29.
Sutulo, S., 1997. Development of a simplied mathematical model for simulating controlled manoeuvring
motion of a surface displacement ship. Korea Research Institute of Ships and Ocean Engineering/Korea
Institute of Machinery and Materials (KRISO), Technical Report UCK390-2070-D, pp. 67194.
Sutulo, S., Moreira, L., Guedes Soares, C., 2002. Mathematical models for ship path prediction in man-
oeuvring simulation systems. Ocean Eng. 29 (1), 119.
Van Mannen, J.D., Van Oossanen, P., 1989. Resistance. In: Lewis, E.V. (Ed.), Principles of Naval Archi-
tecture, vol. 2. SNAME, Jersey City, pp. 1126.

You might also like