Dynamic Model of Maneuverability Using Recursive Neural Networks

download Dynamic Model of Maneuverability Using Recursive Neural Networks

of 29

Transcript of Dynamic Model of Maneuverability Using Recursive Neural Networks

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    1/29

    Ocean Engineering 30 (2003) 16691697

    www.elsevier.com/locate/oceaneng

    Dynamic model of manoeuvrability usingrecursive neural networks

    L. Moreira , C. Guedes Soares

    Instituto Superior Tecnico, Unit of Marine Technology and Engineering, Technical University ofLisbon, 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 forsurface ships. Inputs to the simulation are the orders of rudder angle and ships speed andalso the recursive outputs velocities of sway and yaw. This model is used to test the capabilities

    of artificial neural networks in manoeuvring simulation of ships. Two manoeuvres are simu-lated: tactical circles and zigzags. The results between both simulations are compared in orderto analyse the accuracy of the RNN. The simulations are performed for the Marinerhull. Thedata generated to train the network are obtained from a manoeuvrability model performingthe simulation of different manoeuvring tests. The RNN proved to be a robust and accuratetool for manoeuvring simulation.

    2003 Elsevier Science Ltd. All rights reserved.

    Keywords:Manoeuvrability; Recursive neural networks; Simulation model

    1. Introduction

    The Artificial Neural Networks (ANNs) have been successfully applied recentlyto a variety of problems related with naval architecture. In fact ANNs interpolationand in some cases extrapolation capability is very powerful particularly when map-ping a multi-dimensional input data space to a multi-dimensional output data spaceas demonstrated in Roskilly and Mesbahi (1996a). It is common for empirical datato be used directly for marine design and analysis. The non-linear functional mappingproperties 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

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    2/29

    1670 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697

    significant disturbance to the previous structure are also important factors whichmake them particularly useful for the modelling and identification of dynamic sys-tems as shown in Roskilly and Mesbahi (1996b).

    For instance, simulations using ANNs have been created using data from bothmodel 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 identification of ship coupled heavepitch motionsusing 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 randomwaves 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 fins controlled by a neural network (Liut et al., 2000). Here theperformance of the fins is improved by adding an active controller. The controllercommands the rotations of the fins about a span-wise axis in order to further reducethe rolling motion. The rotations are commanded by a neural network controller. Adifferent 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 raisedrecently 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 developingtime-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 manoeuvringsimulators that use traditional mathematical models, which are function of the hydro-

    dynamic forces and moment derivatives. These values are normally achieved from

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    3/29

    1671L. 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 parametersare 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 thefirst simulator. The purpose of this is to validate the modeland to show that it is an accurate predictive tool and is able to fit the results achievedwith other formulation.

    The simulation data describing a series of manoeuvres with varying rudder deflec-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 ship s 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 first-orderdifferential equation is considered to describe the steering gear dynamics.

    The orthogonal coordinates system (Euler coordinates) is the most widely used.

    The standard body axis Gxy 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 theseaxes will coincide with the inertia axis Oxh. The instantaneous position of the ship

    is described by the coordinates of the centre of mass x and h, as well as by theheading 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= (u2 + v2)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 dR isassumed 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 mathematicalmodel but will be calculated to allow the observation of its behaviour along the time.

    It is defined as being equal to

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    4/29

    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 Izzr (2)

    where the dots mean the derivatives with respect to time, m the ships mass, and Izzis the moment of inertia of the ship in relation to the centre of mass.

    The mass can be represented by

    m r

    2mL2T (3)

    where m is the non-dimensional mass, L the length of the ship and Tis 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 toIzz 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 vcosy j r (5)

    The governing equation is

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    5/29

    1673L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697

    dR 1

    TR(ddR) (6)

    where TR 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:

    dRdm (7)

    ddm (8)

    dRem (9)

    where dm is the maximum rudder angle and m is the maximum deviation rate. The

    standard values are 35 for dm and 21

    3/ s for m.

    Initially, it is required to unify the hydrodynamic forces of surge and sway with theacceleration-independent-inertial terms and to consider the acceleration-dependent-

    inertial hydrodynamic forces through the added masses m11 and m22. Thus, thedynamic equations can be rewritten as follows:

    X (m m11)u Y (m m22)v N (Izz m66)r (10)

    where X = mvr + X+m11u; Y = mur+ Y+m22v, and N = N+m66r.The modified surge force X at u0 can be represented as follows:

    X (m Cmm22)vr TE(u,n) CRu2

    r2LTXddu

    2d2R (11)

    where Cm is the Inoue coefficient (Crane et al., 1989) TE the effective thrust, CR theresistance factor, and Xdd is the dimensionless hydrodynamic derivative.

    TheCRfactor is dimensional and can be expressed through the dimensionless drag

    coefficient CTL as follows (Van Mannen and Van Oossanen, 1989):

    CR m

    LCTL (12)

    The modified sway force Y is given by

    Y murr

    2LTV2Y (13)

    where Y is the sway force coefficient and the yaw moment is given by

    N r

    2L2TV2N (14)

    with N representing the yaw moment coefficient.

    The mathematical models for the sway force and yaw moment coefficients includethe numerical values for the hydrodynamic derivatives and other constant parameters

    related with the forces components that act in the hull and rudder.

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    6/29

    1674 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697

    The sway force and yaw moment coefficients are described by conventional poly-nomial regression models

    Y Yvv Yrr Yvvvv3

    Yvvrv2

    r YddR Yvvdv2

    dR N (15) Nvv Nrr Nvvvv

    3 Nvvrv

    2r NddR Nvvdv2dR

    where Yv, , Nvvdare hydrodynamic derivatives and v and r are non-dimensional

    kinematical parameters usually defined as being equal to:

    v v/V r rL/V (16)

    In order to make the ship mathematical model more flexible it was assumed thatthe linear hydrodynamic derivatives are dependent of the trim and the well-knownformulas of Inoue (Crane et al., 1989) were used to take this fact into account:

    Yv (1 b1d)Yv0 Yr (1 b2d)Yr0 Nv (1 b3d)Nv0 Nr (17)

    (1 b4d)Nr0

    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 b1, , b4 are

    b1 0.6667 b2 0.8 b3 0.27Yv0/Nv0 b4 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 wasdemonstrated that the first method is of a general nature and that can be applied toany mathematical model in order to obtain realistic estimations.

    Considering the original polynomial expressions presented in Crane et al. (1989),

    the regressors vd2R, d3R 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 influence they show to be of norelevant importance.

    The numerical values of the hydrodynamic derivatives Yv, , Nvvd, the non-

    dimensional added masses k11 = m11/m, k22 = m22/m and k66 = m11/Izz 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 theneighbourhood of any current values of state variables but this, firstly, will lead tounstable linearised mathematical models in some cases and secondly will be an over-

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    7/29

    1675L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697

    Table 1

    Values of the dimensionless parameters that define the hydrodynamic forces of the Mariner ship

    Parameter Symbol Value

    Relative added masses K11 0.03

    K22 0.9

    K66 0.63

    Drag coefficient CTL 0.07

    Inoues coefficient Cm 0.625

    Hydrodynamic derivatives Xdd 0.02

    Yv 0.244

    Yr 0.067

    Yvvv 1.702

    Yvvr 3.23

    Yd 0.0586Yvvd 0.25

    Nv 0.0555

    Nr 0.0349

    Nvvv 0.345

    Nvvr 1.158

    Nd 0.0293

    Nvvd 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 finite domain in state-space. Thisapproach has the advantage of being used just once in the initialisation state, and

    its most important benefit is the ability to obtain a stable linearised mathematicalmethod even in the case of directionally unstable ships.

    It is assumed that the surge motion has little influence 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 ismore convenient to operate them in the dimensionless form. The kinematic para-

    meters v and r were already introduced and now will appear the non-dimensionalstandard time t that is defined as dt = dt(V/L). Then, the sway and yaw equationsappear as

    m22v fY(v,r,dR) m66r fN(v,r,dR) (19)

    where the dots above the symbols mean the derivative with respect to non-dimen-

    sional time; the non-dimensional coefficients of inertia are

    m22 2(m m22)

    rL2T m66

    2(Izz m66)

    rL4T (20)

    and the second member of the equations

    fN(v,r,dR) Nvv Nrr Nvvvv3 Nvvrv

    2r NddR

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    8/29

    1676 L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697

    Yvvdv2dRfY(v,r,dR) Yvv (Yrm)r Yvvvv

    3 Yvvrv2r (21)

    YddR Yvvdv2dR

    where the non-dimensional mass of the ship is given by

    m 2m

    rL2T (22)

    A set of linear equations will be considered instead of non-linear Eqs. (19)

    m22v CvYv C

    rYr C

    dYdR m66r C

    vNv C

    rNr C

    dNdR (23)

    where the linearised hydrodynamic derivatives CvY, ..., CdNin the second members of

    the equations are determined by the least square principle:

    (CvY,CrY,C

    dY) arg min

    rL

    rLvL

    vL

    dL

    dL

    [fY(v,r,dR)(CvYv C

    rYr

    CdYdR)]2 dr dv ddR (C

    vN,C

    rN,C

    dN) arg min

    rL

    rL

    vL

    vL

    dL

    dL

    [fN(v,r,dR)(24)

    (CvNv CrNr C

    dNdR)]

    2 dr dv ddR

    where vL, rL and dL are parameters that define the dimensions and area of thelinearisation 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 obtainthe most consistent linearised model.

    Eq. (24) lead to the following sets of normal equations (similar for both Y and

    N components):

    rL

    rL

    vL

    vL

    dL

    dL

    [fY,N(v,r,dR)(CvY,Nv C

    rY,Nr C

    dY,NdR)]v dr dv ddR 0

    rL

    rL

    vL

    vL

    dL

    dL

    [fY,N(v,r,dR)(CvY,Nv C

    rY,Nr C

    dY,NdR)]r dr dv ddR 0 (25)

    rL

    rL

    vL

    vL

    dL

    dL

    [fY,N(v,r,dR)(CvY,Nv C

    rY,Nr C

    dY,NdR)]dRdr dv ddR 0

    For this particular non-linear regression model for sway force and yaw moment

    coefficients the triple integrals are easily calculated explicitly and the resulting equa-tions for the linearised hydrodynamic derivatives appear simply in the following

    form:

    CvY Yv 3

    5Yvvvv

    2L C

    rY Yrm

    1

    3Yvvrv

    2L C

    dY Yd

    1

    3Yvvdv

    2L C

    vN (26)

    Nv 3

    5Nvvvv

    2L C

    rN Nr

    1

    3Nvvrv

    2L C

    dN Nd

    1

    3Nvvdv

    2L

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    9/29

    1677L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697

    The resulting formulation does not contain rL and dL. It is obvious that when vLtends 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 infinitesimal domain.

    It is more convenient to rewrite the linearised Eqs. (23) for further transformations

    in the following way:

    m22v CvYv C

    rYr C

    dYdR m66r C

    vNv C

    rNr C

    dNdR (27)

    where

    CvY CvY, C

    rY C

    rY, C

    vN C

    vN, C

    rN C

    rN (28)

    The set of Eqs. (27) can be transformed in the yaw equivalent second-order Nom-oto equation:

    T1T2r (T1 T2)r r K(dR T3dR) (29)

    which can be approximated by the first-order Nomoto equation:

    Tr r KdR (30)

    The non-dimensional time lags T1, T2, T3 and T, as well as the gain of the ship

    K are related with the previously defined parameters of set (28) through the follow-

    ing equalities:

    T1 1

    p1, T2

    2

    p2, T3

    E

    F, T T1 T2T3, K

    F

    Cp1

    B

    Ap2, p2

    BB24AC2A

    A m22m66, B m22CrN (31)

    m66CvY, C C

    vYC

    rNC

    vNC

    rY, E m22C

    dN, F C

    vYC

    dNC

    vNC

    dY

    where p1 and p2 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.

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    10/29

    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 becausetheir 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 correspondsto either a velocity of sway or yaw in the instant tand 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 simplified mathematical model described in Section 2 was implemented usingthe 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 completeblock 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.

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    11/29

    1679L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697

    Fig.

    3.

    Completeblockdiagram

    ofthemanoeuvrabilitymodel.

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    12/29

    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 infull-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 thisfield has been developed and an improved RNN manoeuvring simulation toolfor 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 ANNsare 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 typicallyvery 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 blockdiagram. 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 defined by

    y(x) 1

    1 ex (32)

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    13/29

    1681L. 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 ineach 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 soon. 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 finally 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 extraweighted 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 first time step, when no outputs are available, theseinputs are filled 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 eachtime 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

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    14/29

    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 files containing time histories of tactical circlesand 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 predictedoutput 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

    files must be used. These test data files then demonstrate the predictive capabilitiesof the network.

    Two neural networks were trained in this manner to predict tactical circles and

    zigzags. In each case about 70% of the data files comprised the training set with30% set aside as cross-validation files. The networks were trained for 65,500 iter-ations (epochs). In each iteration, the time series are presented for all inputs and

    outputs for allfiles in the training set. During this training process, training is pausedevery 10 iterations, and the network is tested for its ability to generalise. To carry

    this out, all of the files in the training set are combined with the cross-validationfiles and the entire set is presented to the network.

    After training has concluded, one examines the error measures as a function ofthe 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 boundedby 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 classification of the sway and yaw

    velocities of the ship to several rudder angles and advance speed. Sampling periodused was 1 s and 22 runs of simulated data are available, i.e. 16 tactical circles and

    six zigzags.

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    15/29

    1683L. 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 35V (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 bejust to use the rudder angle and the advance speed of the ship as inputs. One difficulty

    that could happen with this option would be that this leads to a higher variablenumber 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 evolvedin the tactical circles network.

    Table 3 shows the ranges of variation of the parameters values evolved in thezigzags 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 15v (m/s) 0.56 0.56

    r (rad/s) 0.013 0.013

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    16/29

    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% Max11 Circle 50% Max 50% Max

    12 Circlea 25% Max 50% Max

    13 Circlea Max 25% Max

    14 Circlea 75% Max 25% Max

    15 Circlea 50% Max 25% Max

    16 Circlea 25% Max 25% Max

    17 Circleb 70% Max Max

    18 Circleb 60% Max Max

    19 Circleb 30% Max 50% Max

    20 Circleb Max 35% Max

    21 Circleb 95% Max 30% Max

    22 Circleb 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.

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    17/29

    1685L. 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 encodingThe 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 finite 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) forthe 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.

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    18/29

    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 themomentum awas 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 final network selected was that with better accuracy through the validationset. The final accuracy obtained was measured through a separated test set differentfrom the training and cross-validation sets.

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    19/29

    1687L. 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 five set aside for cross-validation. A set of six tacticalcircles 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 obtainedthrough 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 deflection 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 the11 manoeuvres used for training, one of the five validation runs and three separatedcircles used for test. The two training runs that are shown represent a mixture of

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    20/29

    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.

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    21/29

    1689L. 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

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    22/29

    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 first number in each cell is anerror averaged over all 22 manoeuvres, whereas the second number is the erroraveraged 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, yawand 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.

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    23/29

    1691L. 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 firstnumber 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.00718rad/s and an average peak-to-peak heading variation of 32.

    To make some estimates of precision error manoeuvres with the same rudder

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    24/29

    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 Zigzaga 50% Max 20 to 20

    21 Zigzagb 70% Max 10 to 10

    22 Zigzagb 70% Max 20 to 20

    a Zigzags used for cross-validation.b Zigzags used for test.

    deflection and approach speeds were compared. For the tactical circles, the steadysway velocity in the turn varied by 0.00250.0624 m/s or 210.5%, the steady yawvelocity in the turn by 0.00007240.0015 rad/s or 310.8% and the turning diameterdiffered by 6220 m or 18%. For the zigzags the steady sway velocity in themanoeuvre varied by 0.00260.23 m/s or 141%, the steady yaw velocity in themanoeuvre 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%

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    25/29

    1693L. 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 of20% or less and the test manoeuvres decreased the errors to 13% or less.

    The most difficult predictions for the zigzag manoeuvres were for the rudder

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    26/29

    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 testruns. RNNs have demonstrated ability as a robust and accurate manoeuvring simul-

    ation tool.

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    27/29

    1695L. 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 Yv

    Fig. 26. Test #22-Time histories for sway, yaw and headingzigzag 20 to 20; 70% max speed.

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    28/29

    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 Identification and

    Simulation of Ship Manoeuvring Characteristics, funded jointly by the Foundationthe Portuguese Universities and the Ministry of Defence under the Programme TheOceans 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. Efficient techniques in time-domain motion simul-

    ation based on artificial 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 identification of manoeuvring models for ships. Int.

    Shipbuilding Prog. 46 (445), 527.Haddara, M.R., Xu, J., 1999. On the identification 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 fins 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 artificial neural networks in marine design and modelling.

    In: Proceedings of the Workshop on Artificial 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.

  • 8/10/2019 Dynamic Model of Maneuverability Using Recursive Neural Networks

    29/29

    1697L. Moreira, C. Guedes Soares / Ocean Engineering 30 (2003) 16691697

    In: Guedes Soares, C., Beirao Reis, J. (Eds.), O Mar e os Desafios do Futuro (The Sea and the Future

    Challenges). Edicoes Salamandra, Lisbon, pp. 167184 (In Portuguese).

    Roskilly, A.P., Mesbahi, E., 1996a. Artificial neural networks for marine system identification and model-

    ling. Trans. IMarE 108 (Pt. 3).Roskilly, A.P., Mesbahi, E., 1996b. Marine system modelling using artificial 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 simplified 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.