Modelling of Ship’s Motion U sing Artificial Neural...

6
Modelling of Ship’s Motion Using Artificial Neural Networks BOGDAN ZAK, ZYGMUNT KITOWSKI, JOZEF MALECKI Department of Mechanical and Electrical Engineering Polish Naval Academy 81-103 Gdynia, ul. Smidowicza 69 POLAND Abstract: - In the paper using of the artificial neural networks for determination of coefficients of state equations of ship’s motion in a horizontal plane is presented. The recurrent optimisation network is used to identify parameters of the ship’s dynamics. A structure and the operating principle of the network and results of computer simulation of ship’s motion along a desired trajectory are described. Values of state variables generated by a differential linear model and a neural model are inserted. Key-Word: - Ship, Neural Network, Modelling, Identification, Control 1. Introduction A problem of mathematical modelling of dynamic objects is one of the most important task in during designing of control systems. Theoretical and practical researches were focused on problems of mathematical modelling and especially on methods of parametric identification were developed. Those methods were very efficient for both linear statically and dynamical objects but not for non-linear ones. In recent years the neural networks have been The results of research were many methods which allow to model the linear both static and dynamic object but non-linear object because of its difficulty were modelling only by approximation methods. In this case to model the non-linear object in last year more often is use the neural network. The attractive of use the neural network in modelling is approximation of any curve and to tune the structure basely on experimental and another data. 2. Mathematical model of ship’s dynamic Dynamical equations of ship’s motion regarded as control object can be formulated as follow [3]: ) . ( ) ( ) ( ) ( . t x C t Bu t Ax t x = (1) where: u(t) – control vector, x(t) – state vector, A – state matrix, B – control matrix, C(x,t) – vector of external disturbances. The equation (1) in discrete form can be written as: ( [ ] ) , ( ) ( ) ( ) ( ) ( ) ( 1 t x C T N kT u T G kT X T T k X Φ = (2) where: Φ(T) – state matrix, G(T) – control matrix, X(kT)- state vector, N(T) – disturbance matrix, u(kT) – control signal, but this value are defined as: ! ... ! 3 ! 2 ) ( 3 3 2 2 n T A T A T A AT I T n n = Φ (3) where: I – identity matrix, , )! 1 ( ... ! 3 ! 2 ) ( 1 3 2 2 = n T B A T B A T AB IBT T G n n (4) , )! 1 ( ... ! 3 ! 2 ) ( 1 3 2 2 = n T A T A T A IT T N n n (5) Sequence of control signal u(kT) must take into consideration the physical limit of maximal values of stern plane saturation and stern angel speed ( ° 35 kT u . (6) 3. A Neural network for modelling ship’s dynamics A task of the neural network is to calculated the values of matrix Φ(T) and G(T), in such way that the neural model of ships will behave as real ships described by equation (1). The identification is

Transcript of Modelling of Ship’s Motion U sing Artificial Neural...

Page 1: Modelling of Ship’s Motion U sing Artificial Neural …wseas.us/e-library/conferences/tenerife2001/papers/448.pdfModelling of Ship’s Motion U sing Artificial Neural Networks BOGDAN

Modelling of Ship’s Motion Using Artificial Neural Networks

BOGDAN ZAK, ZYGMUNT KITOWSKI, JOZEF MALECKI

Department of Mechanical and Electrical Engineering

Polish Naval Academy

81-103 Gdynia, ul. Smidowicza 69

POLAND

Abstract: - In the paper using of the artificial neural networks for determination of coefficients of state equations of ship’s motion in a horizontal plane is presented. The recurrent optimisation network is used to identify parameters of the ship’s dynamics. A structure and the operating principle of the network and results of computer simulation of ship’s motion along a desired trajectory are described. Values of state variables generated by a differential linear model and a neural model are inserted. Key-Word: - Ship, Neural Network, Modelling, Identification, Control

1. Introduction A problem of mathematical modelling of dynamic objects is one of the most important task in during designing of control systems. Theoretical and practical researches were focused on problems of mathematical modelling and especially on methods of parametric identification were developed. Those methods were very efficient for both linear statically and dynamical objects but not for non-linear ones. In recent years the neural networks have been The results of research were many methods which allow to model the linear both static and dynamic object but non-linear object because of its difficulty were modelling only by approximation methods. In this case to model the non-linear object in last year more often is use the neural network. The attractive of use the neural network in modelling is approximation of any curve and to tune the structure basely on experimental and another data. 2. Mathematical model of ship’s

dynamic Dynamical equations of ship’s motion regarded as control object can be formulated as follow [3]:

).()()()(.

txCtButAxtx ++= (1) where: u(t) – control vector,

x(t) – state vector, A – state matrix,

B – control matrix, C(x,t) – vector of external disturbances.

The equation (1) in discrete form can be written as:

( )[ ] ),()()()()()(1 txCTNkTuTGkTXTTkX ++Φ=+ (2)

where: Φ(T) – state matrix, G(T) – control matrix, X(kT)- state vector, N(T) – disturbance matrix, u(kT) – control signal,

but this value are defined as:

!...

!3!2)(

33

22

n

TA

TA

TAATIT

nn+++++=Φ (3)

where: I – identity matrix,

,)!1(

...!3!2

)(13

22

+++++=

+

n

TBA

TBA

TABIBTTG

nn (4)

,)!1(

...!3!2

)(13

22

+++++=

+

n

TA

TA

TAITTN

nn (5)

Sequence of control signal u(kT) must take into consideration the physical limit of maximal values of stern plane saturation and stern angel speed

( ) °≤ 35kTu . (6)

3. A Neural network for modelling ship’s dynamics

A task of the neural network is to calculated the values of matrix ΦΦ(T) and G(T), in such way that the neural model of ships will behave as real ships described by equation (1). The identification is

Page 2: Modelling of Ship’s Motion U sing Artificial Neural …wseas.us/e-library/conferences/tenerife2001/papers/448.pdfModelling of Ship’s Motion U sing Artificial Neural Networks BOGDAN

made by minimisation the energetic function F(φφ,g) which is defined for this model as below:

F(φφ,g) = 0.5 εεΤ ε ε F(φφ,g) = ε1

2+ ε22+ ε3

2+ ε42 + ε5

2+ ε62+ ε7

2, (7)

The total error ε ε is a difference between values of the state vectors xo - generated by analytical model and state vector xm - generated by neural model, for every step of an iteration:

ε ε = xo - xm= [ε1, ε2, ε3, ε4, ε52, ε6

2, ε72]Τ (8)

After substituting equation (2) and (8) the energetic function F(φφ,g) can be written as follows:

F(φφ,g) = 0.5 ( xo - φφx - gu)T( xo - φφx - gu) (9)

A gradient method is used to minimise this function. After calculation the partial derivative of F(φφ,g) by φφ and g, and equal them to zero we have the mathematical prescription which is a rule of teaching the neural network:

( )[ ] ( ) ( )( )[ ] ( ) ( )kTuUkTgTkg

kTxUkTTk

iijij

jiijij

ε

εφφ

−=+

−=+

1

1 (10)

where U is the coefficient of teaching from partition of 0 to 1. This coefficient is defined experimental. The equation (10) describe the method of modification of values of coefficients φij and gi that guaranty the minimisation of energetic function in every step of iteration. A such method assures that parameters of neural model will approach to the parameters of identified object.

Fig.1 The teaching of neural network for of ship’s

move.

In the figure 2 the elements of Hopfield’s recurrent neural network are presented. The basic elements are: block of data selection, block of preliminary solution, block of improvement of solution, block of comparison vector and block of parameters modification. A block of data selection is analyses state vectors and eliminates the vectors which are restricted, because this vectors has the false information which not permit to precision identification of matrix Φ, Φ, G..

Fig.2 Hopfield’s recurrent network Block of preliminary solution calculates values of φ, φ, g of the neural model’s approximation. It is realised by analytic solution of matrix equations based on selected status vectors from the block of data selection. Receive in this way neural model is improved. Block of improvement of solution consists of 8 neurones which works on loop back. The results operation this block are new parameters of the status vector xm. The parameters are new input data for the neural network for next iteration. In a block of parameters modification take effect modification importance network φij and gi, according to the rule of teaching. Values of εε is the basic modification importance.

u(kT)

xm.[(k+1)T] NEURAL NETWORK

xo[(k+1)T] MATHEMATICAL MODEL OF SHIP

Φ, Φ, G

εε

NEURAL MODEL φ, φ, g

TEACHING ALGORYTHM

xm

xo

BLOCK OF COMPARISON

VECTORS xo i xm.

BLOCK

OF DATA SELECTION

BLOCK OF PRELIMINARY

SOLUTION

DATA

COLLECTION xo

BLOCK OF PARAMETERS

MODIFICATION φφ i g

εε

BLOCK OF

IMPROVEMENT OF SOLUTION

Page 3: Modelling of Ship’s Motion U sing Artificial Neural …wseas.us/e-library/conferences/tenerife2001/papers/448.pdfModelling of Ship’s Motion U sing Artificial Neural Networks BOGDAN

Block of comparison vectors calculate total error εε between the state vectors xo - generated by analytical model and state vector xm - generated by neural model, for every step of an iteration.

4. The results of model research For a ship described in equations (2) was generated 500-elements set of state vectors being input data for neural network. Verification of the neural model for ship standard manoeuvring trials was performed; for Kempf manoeuvres zig-zag test and spiral test. The testes were made for the neural and mathematical models of minesweeper for speed 15 knots. The trajectories and coordinates vector states for both models for Kempf test are presented in Fig.3 to Fig.10 without disturbances and Fig.11 to Fig.18 with disturbances (black colour – mathematical model, red colour – neural model).

Fig.3 Trajectory of ship for Kempf test

Fig.4 Course of schip for Kempf test

Fig 5. Speed of ship for Kempf test

Fig.6 Engine’s rototional speed for Kempf test

Fig.7 Speed turn of ship for Kempf test.

Page 4: Modelling of Ship’s Motion U sing Artificial Neural …wseas.us/e-library/conferences/tenerife2001/papers/448.pdfModelling of Ship’s Motion U sing Artificial Neural Networks BOGDAN

Fig.8 Drift angel of ship for Kempf test

Fig.9 Angel put out of steer for Kempf test

Fig.10 Speed put out of steer for Kempf test

Fig.11 Trajectory of ship for Kempf test

Fig. 12 Course of ship for Kempf test

Fig.13 Speed of ship for Kempf test

Page 5: Modelling of Ship’s Motion U sing Artificial Neural …wseas.us/e-library/conferences/tenerife2001/papers/448.pdfModelling of Ship’s Motion U sing Artificial Neural Networks BOGDAN

Fig.14 Engine’s rototional speed for Kempf test

Fig.15 Speed turn of ship for Kempf test.

Fig.16 Drift angel of ship for Kempf test

Fig.17 Angel put out of steer for Kempf test

Fig.18 Speed put out of steer for Kempf test

Fig.19 Trajectory for spiral test without

disturbances.

Page 6: Modelling of Ship’s Motion U sing Artificial Neural …wseas.us/e-library/conferences/tenerife2001/papers/448.pdfModelling of Ship’s Motion U sing Artificial Neural Networks BOGDAN

Fig.20, Trajectory for spiral test with disturbances. In Fig.19 to fig.22 are presented trajectories for spiral test. The test were made for speed 15 knots for without and with disturbance. In two first figures lay the rudder was 35o, and in the next 20o.

Fig.21 Trajectory for spiral test without

disturbances.

Fig.22, Trajectory for spiral test with disturbances.

5. Conclusion The results of simulation show a big efficacy of the presented neural network for modelling of ship’s dynamics. The relative error between state vectors generated by ship and its neural model is smaller then 1%. In presented method exist the strong dependence between preciseness neural model and the value coefficient teaching U, that’s why important problem is strategy selection and modification value coefficient U in the iteration process

References: [1] W.T. Miller, R.S. Sutton, P.J Werbos, Neural

Networks for Control, The MIT Press, 1990 [2] K.S. Narendra, K Parthsarathy, Identification

and Control of Dynamical Systems Using Neural Networks, IEEE Trans Neural Networks, Vol.1,No.1,1990, pp. 4-27.

[3] J.Garus, J.Ma³ecki, B. ak , Application of Network Hopfield’s for Modelling of Motion Ship, XIII Polish Automation Conference, Poland, Opole, Vol.2, 1999, pp. 211-214, (in polish).

[4] J. urada, Introduction to Artificial Neural Systems, West Publishing Company, USA 1992.

[5] J.Hertz, A.Krogh, R.G.Palmer, Introduction to The Theory of Neural Computation, Addision-Wesley Publishing Company, Inc. 1991.