# Real-Time Ship Motion Prediction Based on Time Delay Wavelet Neural Network

Authors: Wenjun Zhang; Zhengjiang Liu
Journal: Journal of Applied Mathematics
 (2014)

---

## Abstract

A wavelet neural network with time delay is proposed based on nonlinear autoregressive model with exogenous inputs (NARMAX) model, and the sensitivity method is applied in the selection of network inputs. The inclusion of delayed system information improves the network’s capability of representing the dynamic changes of time-varying systems. The implement of sensitivity analysis reduces the dimension of input as well as the dimension of networks, thus improving its generalization ability. The time delay wavelet neural network was implemented to real-time ship motion prediction, simulations are conducted based on the measured data of vessel “YUKUN,” and the results demonstrate that the feasibility of the proposed method.


---

## Body

## 1. Introduction

Ship motion dynamics is related greatly to the navigational conditions such as loading and draft; the changes of dynamics also are influenced by environmental disturbances such as wind, wave, and current. Therefore, the identification and control of ship motion is complex and is being a challenge in the area of ship engineering [1]. Furthermore, the accurate identification and prediction are important issues in ship and its controller design. To overcome the problems of accuracy and adaptiveness in applying the custom methods, more and more current studies incorporate the booming artificial intelligent techniques such as neural networks and fuzzy inference [2].As a kind of data-driven approach [3–5], neural network gained much popularity in recent years attributed to its merits such as nonlinearity and adaptivity. Among various kinds of neural networks, backpropagation (BP) network is the most widely used network type. But the BP network has its drawbacks such as slow convergence speed and existence of phenomenon of local minima, which limited its practical engineering applications. Various types of neural networks and their learning algorithms have been proposed. Wavelet neural network (WNN), which was proposed in late 20th centuries, is a kind of local response type neural network and attracts many research interests in areas of intelligent computation. It makes use of wavelet function as active function instead of sigmoid function in BP network and establishes the connection between the wavelet transform and network parameters by using affine connection [6]. Wavelet has characteristics of time-frequency local and zoom ability, and neural network has characteristics of strong abilities of self-learning, robustness, and generalization. The wavelet neural networks take both advantages of wavelet transform and neural network and realizes wavelet transform by adjusting wavelet neurons adaptively. Wavelet network has been demonstrated to have good function approximation and pattern recognition capabilities, which have been utilized successfully in various areas such as adaptive control, signal filtering, and fault detection [7].Various measures have been taken to improve the approximation and prediction ability of neural networks such as raw data processing [8]. In order to represent the dynamic characteristics of time delay system more efficiently, we improve wavelet network in this study by introducing the history information of system into the network input layer, construct the wavelet network with time delays, and realize the model of nonlinear autoregressive moving average with exogenous inputs (NARMAX) [9]. The neural network with time delay possesses the same network structure as the NARMAX model and both of them take consideration of history information of system dynamics, and NARMAX has been proved to be able to represent input-output mapping of time-varying dynamics; therefore, the proposed method has the inertia ability to represent time-varying system dynamics. Sensitivity analysis method is applied for deciding the inputs of the mode to reduce the number of inputs and hence the dimension of neural network consequently, which is an important issue in improving the generalization ability of the network. To demonstrate the efficiency of the proposed wavelet network model, the measured ship motion data of motor vessel “YUKUN” is implemented for simulation experiment.


## 2. NARMAX Prediction Model Based on Time Delay WNN

### 2.1. Network Structure of Time Delay WNN

There are three layers in conventional neural network including input layer, hidden layer, and output layer. In the proposed wavelet neural network, the current input information is conveyed to the input layer of wavelet neural network together with history information of system, and the information is conducted and the results are conveyed to the output layer. The network processes the current and historical information of system simultaneously. After the learning and fitting processes of network, the acquired network is then applied for prediction of time delay system [10, 11] based on the NARMAX model. The structure of the proposed time delay WNN is depicted in Figure 1.Figure 1
Structure of time delay WNN.NARMAX model is widely used in system identification and prediction [12, 13]:
(1)
y
(
k
)
=
f
(
y
(
k
-
1
)
,
…
,
y
(
k
-
n
y
)
,
u
(
k
-
1
)
,
…
,
u
(
k
-
n
u
)
)
,
wherex andy are system input and output andn
y andn
u are the order of system output and input, respectively. It can be noted in (1) that the multidimension inputs of NARMAX model include the pastn
y system outputs andn
u system inputs.Equation (1) is the identification model of the mapping between the current system with respect to the history system inputs and outputs. When the identified model is utilized for prediction, we can replace thet in the equation with t
+
1, and we get
(2)
y
(
k
+
1
)
=
f
(
y
(
k
)
,
…
,
y
(
k
-
n
y
+
1
)
,
u
(
k
)
,
…
,
u
(
k
-
n
u
+
1
)
)
.If we need to give multistep predictions, for example, 2-step-ahead prediction, we need to replace thet in the equation witht+2 likewise:
(3)
y
(
k
+
2
)
=
f
(
y
^
(
k
+
1
)
,
y
(
k
)
,
…
,
y
(
k
-
n
y
+
2
)
,
gfdgff
u
(
k
)
,
…
,
u
(
k
-
n
u
+
1
)
y
(
k
-
n
y
+
2
)
)
,
where y
^
(
k
+
1
) is the predicted value of y
(
k
+
1
). In multistep ahead prediction process, as the value of y
(
k
+
1
) is unknown in time oft, in the cascade prediction method, the predicted value by (2) is used to substitute y
^
(
k
+
1
) required in (3) to realize the 2-step-ahead prediction.The multistep prediction process can be realized likewise. But in this cascade prediction method, the prediction accuracy of multistep prediction based much on the accuracy of the previous predicted results and all the prediction error in the previous steps are brought to the final prediction result. So, another kind of prediction, which is referred to as direct prediction, is adopted in this paper. As direct prediction, process the prediction of different steps ahead individually and avoid the accumulation of prediction error consequently.


### 2.2. Learning Algorithm of Wavelet Neural Network

#### 2.2.1. Initialization of WNN Parameters

Let the number of WNN inputs beM and the number of hidden units. In WNN, the most conventionally used wavelet active functions in hidden layer are Morlet wavelet, Harrab wavelet, and Gaussian wavelet. In this study, we make use of Morlet wavelet as the active function of WNN:
(4)
ψ
(
t
)
=
cos
⁡
(
1.75
t
)
exp
⁡
(
-
t
2
2
)
.Time delay wavelets have merits such as high resolution ratio, strong robustness, and efficient computation ability as well as low error rate [14]. The network output is computed as follows:
(5)
y
^
(
t
)
=
∑
k
=
1
K
w
k
ψ
(
t
-
b
k
a
k
)
,
wherea
k andb
k are scale factor and translation factor of basis function, respectively. Andw
k is the connection weight between thekth hidden wavelet neuron and the output neuron.


#### 2.2.2. Adjustment of WNN Parameters

The cost function of WNN learning is expressed in(6)
E
=
1
2
∑
l
=
1
L
(
y
(
t
l
)
-
y
^
(
t
l
)
)
2
,
where y
(
t
l
) is the desired output, y
^
(
t
l
) is the actual output,t
l is the sample input, andl is the number of samples. Here, let
(7)
t
l
′
=
t
l
-
b
k
a
k
.The gradient messages ofw
k,a
k, andb
k are expressed hereunder:
(8)
∂
E
∂
w
k
=
-
∑
l
=
1
L
[
y
(
t
l
)
-
y
^
(
t
l
)
]
cos
⁡
(
1.75
t
l
′
)
exp
⁡
[
-
t
l
′
2
2
]
,
(9)
∂
E
∂
a
k
=
-
∑
l
=
1
L
(
y
(
t
l
)
-
y
^
(
t
l
)
)
×
b
k
w
k
a
k
2
fdffdffdf
×
(
1.75
t
l
′
sin
(
1.75
t
l
′
)
exp
⁡
(
-
t
′
2
2
)
f
d
f
f
d
s
d
s
d
s
d
+
cos
⁡
⁡
(
1.75
t
l
′
)
exp
⁡
(
-
t
′
2
2
)
t
′
2
)
,
(10)
∂
E
∂
b
k
=
-
∑
l
=
1
L
(
y
(
t
l
)
-
y
^
(
t
l
)
)
×
w
k
a
k
fdsfdfdfff
×
(
1.75
sin
⁡
(
1.75
t
l
′
)
exp
⁡
⁡
(
-
t
l
′
2
2
)
f
d
f
d
f
d
f
d
f
d
f
+
cos
⁡
(
1.75
t
l
′
)
exp
⁡
(
-
t
l
′
2
2
)
t
l
′
)
.Based on the gradient message, the parameters are adjusted by minimizing the cost function. The iterations of adjustment should take into consideration both accuracy and training speed.


### 2.3. Selection of Network Inputs Based on Sensitivity Analysis

The method of sensitivity analysis is usually used in evaluating the influences of the changes to the model output, and it plays an important role for model construction, model simplification, and thus the generalization ability of model. It has been widely used in areas such as engineering, economics, and sociology [15, 16]. Rhee and Kim analyze the relationship between parameter sensitivity and identification accuracy [17].For the NARMAX model based on neural network, we need to establish suitable inputs for the model [18]. If there are too few inputs, the network cannot represent the input-output mapping of system with sufficient accuracy; if there are too many inputs, the network dimension will increase consequently. Both of them will deteriorate the generalization capability of the network. As there are no optimal input variables so far for ship motion prediction, it is appropriate to evaluate the importance of individual input and decide which inputs should be taken into the input layer of network.The input-output derivatives are useful indices for evaluating the network’s input to the output. There are two kinds of conclusions which can be drawn from the values of derivatives. One is the influences of tiny changes of input to the output; the other is the contribution of each input to the overall output.Morlet wavelet like (4) is implemented in this study and served as the active function of hidden neurons. According to (10), we can calculate the derivatives of output to each input and evaluate the influence of the input to the output. Negative value of the derivative shows that, with the increase of the input, the output will decrease; and the positive value of the derivative shows that the increase of the input will cause the increase of output consequently.Based on the calculation of the derivatives, the influence of input to the output can be derived accordingly. The influence can be measured by index of sum of square derivatives (SSD):(11)
SSD
=
∑
j
=
1
N
(
d
j
i
)
2
,
where
(12)
d
j
i
=
S
j
∑
h
=
1
n
h
w
h
o
I
h
j
(
1
-
I
h
j
)
w
i
h
,
whereS
j is the derivative of output with respect to input ∂
y
/
∂
b
k,I
hj is the response of thehth hidden neuron, andw
h
o andw
ih are the connection weights between the output layer to thehth hidden neuron and thehth hidden neuron to theith input, respectively.The values of SSD corresponding to each input can be used to evaluate the contribution of each input to the output. It can be noticed that the threshold of SSD for individual input can influence the selection greatly. To improve the robustness of the selection, we set up the threshold for the sum of SSD. That is, we sort the influence of inputs according to corresponding values of SSD in inverse order. The selection begins with the smallest SSD and so on till thei
Sth SSD:
(13)
∑
i
=
1
i
S
SS
D
i
≤
ρ
.The first to thei
Sth neurons are selected based on the selection of corresponding values of SSD. By this deletion process, the inputs with correlation little to the output will be deleted from network. The deletion can lead to a compact network structure and hence improve the generalization ability of network. In implementing the aforesaid pruning method, we set a larger number of inputs initially and prune those contributing less to the output.To improve the generalization ability, we need a compact network structure. However, the dimension of network involves not only the number of inputs but also the number of hidden neurons. In deciding the number of hidden neurons, we make use of Akaike information criterion (AIC) to choose the optimal neuron number when the value of AIC reaches its minimum. AIC is an index for achieving network structure with optimal generalization ability, which considers both hidden neurons number and identification accuracy [19].


## 2.1. Network Structure of Time Delay WNN

There are three layers in conventional neural network including input layer, hidden layer, and output layer. In the proposed wavelet neural network, the current input information is conveyed to the input layer of wavelet neural network together with history information of system, and the information is conducted and the results are conveyed to the output layer. The network processes the current and historical information of system simultaneously. After the learning and fitting processes of network, the acquired network is then applied for prediction of time delay system [10, 11] based on the NARMAX model. The structure of the proposed time delay WNN is depicted in Figure 1.Figure 1
Structure of time delay WNN.NARMAX model is widely used in system identification and prediction [12, 13]:
(1)
y
(
k
)
=
f
(
y
(
k
-
1
)
,
…
,
y
(
k
-
n
y
)
,
u
(
k
-
1
)
,
…
,
u
(
k
-
n
u
)
)
,
wherex andy are system input and output andn
y andn
u are the order of system output and input, respectively. It can be noted in (1) that the multidimension inputs of NARMAX model include the pastn
y system outputs andn
u system inputs.Equation (1) is the identification model of the mapping between the current system with respect to the history system inputs and outputs. When the identified model is utilized for prediction, we can replace thet in the equation with t
+
1, and we get
(2)
y
(
k
+
1
)
=
f
(
y
(
k
)
,
…
,
y
(
k
-
n
y
+
1
)
,
u
(
k
)
,
…
,
u
(
k
-
n
u
+
1
)
)
.If we need to give multistep predictions, for example, 2-step-ahead prediction, we need to replace thet in the equation witht+2 likewise:
(3)
y
(
k
+
2
)
=
f
(
y
^
(
k
+
1
)
,
y
(
k
)
,
…
,
y
(
k
-
n
y
+
2
)
,
gfdgff
u
(
k
)
,
…
,
u
(
k
-
n
u
+
1
)
y
(
k
-
n
y
+
2
)
)
,
where y
^
(
k
+
1
) is the predicted value of y
(
k
+
1
). In multistep ahead prediction process, as the value of y
(
k
+
1
) is unknown in time oft, in the cascade prediction method, the predicted value by (2) is used to substitute y
^
(
k
+
1
) required in (3) to realize the 2-step-ahead prediction.The multistep prediction process can be realized likewise. But in this cascade prediction method, the prediction accuracy of multistep prediction based much on the accuracy of the previous predicted results and all the prediction error in the previous steps are brought to the final prediction result. So, another kind of prediction, which is referred to as direct prediction, is adopted in this paper. As direct prediction, process the prediction of different steps ahead individually and avoid the accumulation of prediction error consequently.


## 2.2. Learning Algorithm of Wavelet Neural Network

### 2.2.1. Initialization of WNN Parameters

Let the number of WNN inputs beM and the number of hidden units. In WNN, the most conventionally used wavelet active functions in hidden layer are Morlet wavelet, Harrab wavelet, and Gaussian wavelet. In this study, we make use of Morlet wavelet as the active function of WNN:
(4)
ψ
(
t
)
=
cos
⁡
(
1.75
t
)
exp
⁡
(
-
t
2
2
)
.Time delay wavelets have merits such as high resolution ratio, strong robustness, and efficient computation ability as well as low error rate [14]. The network output is computed as follows:
(5)
y
^
(
t
)
=
∑
k
=
1
K
w
k
ψ
(
t
-
b
k
a
k
)
,
wherea
k andb
k are scale factor and translation factor of basis function, respectively. Andw
k is the connection weight between thekth hidden wavelet neuron and the output neuron.


### 2.2.2. Adjustment of WNN Parameters

The cost function of WNN learning is expressed in(6)
E
=
1
2
∑
l
=
1
L
(
y
(
t
l
)
-
y
^
(
t
l
)
)
2
,
where y
(
t
l
) is the desired output, y
^
(
t
l
) is the actual output,t
l is the sample input, andl is the number of samples. Here, let
(7)
t
l
′
=
t
l
-
b
k
a
k
.The gradient messages ofw
k,a
k, andb
k are expressed hereunder:
(8)
∂
E
∂
w
k
=
-
∑
l
=
1
L
[
y
(
t
l
)
-
y
^
(
t
l
)
]
cos
⁡
(
1.75
t
l
′
)
exp
⁡
[
-
t
l
′
2
2
]
,
(9)
∂
E
∂
a
k
=
-
∑
l
=
1
L
(
y
(
t
l
)
-
y
^
(
t
l
)
)
×
b
k
w
k
a
k
2
fdffdffdf
×
(
1.75
t
l
′
sin
(
1.75
t
l
′
)
exp
⁡
(
-
t
′
2
2
)
f
d
f
f
d
s
d
s
d
s
d
+
cos
⁡
⁡
(
1.75
t
l
′
)
exp
⁡
(
-
t
′
2
2
)
t
′
2
)
,
(10)
∂
E
∂
b
k
=
-
∑
l
=
1
L
(
y
(
t
l
)
-
y
^
(
t
l
)
)
×
w
k
a
k
fdsfdfdfff
×
(
1.75
sin
⁡
(
1.75
t
l
′
)
exp
⁡
⁡
(
-
t
l
′
2
2
)
f
d
f
d
f
d
f
d
f
d
f
+
cos
⁡
(
1.75
t
l
′
)
exp
⁡
(
-
t
l
′
2
2
)
t
l
′
)
.Based on the gradient message, the parameters are adjusted by minimizing the cost function. The iterations of adjustment should take into consideration both accuracy and training speed.


## 2.2.1. Initialization of WNN Parameters

Let the number of WNN inputs beM and the number of hidden units. In WNN, the most conventionally used wavelet active functions in hidden layer are Morlet wavelet, Harrab wavelet, and Gaussian wavelet. In this study, we make use of Morlet wavelet as the active function of WNN:
(4)
ψ
(
t
)
=
cos
⁡
(
1.75
t
)
exp
⁡
(
-
t
2
2
)
.Time delay wavelets have merits such as high resolution ratio, strong robustness, and efficient computation ability as well as low error rate [14]. The network output is computed as follows:
(5)
y
^
(
t
)
=
∑
k
=
1
K
w
k
ψ
(
t
-
b
k
a
k
)
,
wherea
k andb
k are scale factor and translation factor of basis function, respectively. Andw
k is the connection weight between thekth hidden wavelet neuron and the output neuron.


## 2.2.2. Adjustment of WNN Parameters

The cost function of WNN learning is expressed in(6)
E
=
1
2
∑
l
=
1
L
(
y
(
t
l
)
-
y
^
(
t
l
)
)
2
,
where y
(
t
l
) is the desired output, y
^
(
t
l
) is the actual output,t
l is the sample input, andl is the number of samples. Here, let
(7)
t
l
′
=
t
l
-
b
k
a
k
.The gradient messages ofw
k,a
k, andb
k are expressed hereunder:
(8)
∂
E
∂
w
k
=
-
∑
l
=
1
L
[
y
(
t
l
)
-
y
^
(
t
l
)
]
cos
⁡
(
1.75
t
l
′
)
exp
⁡
[
-
t
l
′
2
2
]
,
(9)
∂
E
∂
a
k
=
-
∑
l
=
1
L
(
y
(
t
l
)
-
y
^
(
t
l
)
)
×
b
k
w
k
a
k
2
fdffdffdf
×
(
1.75
t
l
′
sin
(
1.75
t
l
′
)
exp
⁡
(
-
t
′
2
2
)
f
d
f
f
d
s
d
s
d
s
d
+
cos
⁡
⁡
(
1.75
t
l
′
)
exp
⁡
(
-
t
′
2
2
)
t
′
2
)
,
(10)
∂
E
∂
b
k
=
-
∑
l
=
1
L
(
y
(
t
l
)
-
y
^
(
t
l
)
)
×
w
k
a
k
fdsfdfdfff
×
(
1.75
sin
⁡
(
1.75
t
l
′
)
exp
⁡
⁡
(
-
t
l
′
2
2
)
f
d
f
d
f
d
f
d
f
d
f
+
cos
⁡
(
1.75
t
l
′
)
exp
⁡
(
-
t
l
′
2
2
)
t
l
′
)
.Based on the gradient message, the parameters are adjusted by minimizing the cost function. The iterations of adjustment should take into consideration both accuracy and training speed.


## 2.3. Selection of Network Inputs Based on Sensitivity Analysis

The method of sensitivity analysis is usually used in evaluating the influences of the changes to the model output, and it plays an important role for model construction, model simplification, and thus the generalization ability of model. It has been widely used in areas such as engineering, economics, and sociology [15, 16]. Rhee and Kim analyze the relationship between parameter sensitivity and identification accuracy [17].For the NARMAX model based on neural network, we need to establish suitable inputs for the model [18]. If there are too few inputs, the network cannot represent the input-output mapping of system with sufficient accuracy; if there are too many inputs, the network dimension will increase consequently. Both of them will deteriorate the generalization capability of the network. As there are no optimal input variables so far for ship motion prediction, it is appropriate to evaluate the importance of individual input and decide which inputs should be taken into the input layer of network.The input-output derivatives are useful indices for evaluating the network’s input to the output. There are two kinds of conclusions which can be drawn from the values of derivatives. One is the influences of tiny changes of input to the output; the other is the contribution of each input to the overall output.Morlet wavelet like (4) is implemented in this study and served as the active function of hidden neurons. According to (10), we can calculate the derivatives of output to each input and evaluate the influence of the input to the output. Negative value of the derivative shows that, with the increase of the input, the output will decrease; and the positive value of the derivative shows that the increase of the input will cause the increase of output consequently.Based on the calculation of the derivatives, the influence of input to the output can be derived accordingly. The influence can be measured by index of sum of square derivatives (SSD):(11)
SSD
=
∑
j
=
1
N
(
d
j
i
)
2
,
where
(12)
d
j
i
=
S
j
∑
h
=
1
n
h
w
h
o
I
h
j
(
1
-
I
h
j
)
w
i
h
,
whereS
j is the derivative of output with respect to input ∂
y
/
∂
b
k,I
hj is the response of thehth hidden neuron, andw
h
o andw
ih are the connection weights between the output layer to thehth hidden neuron and thehth hidden neuron to theith input, respectively.The values of SSD corresponding to each input can be used to evaluate the contribution of each input to the output. It can be noticed that the threshold of SSD for individual input can influence the selection greatly. To improve the robustness of the selection, we set up the threshold for the sum of SSD. That is, we sort the influence of inputs according to corresponding values of SSD in inverse order. The selection begins with the smallest SSD and so on till thei
Sth SSD:
(13)
∑
i
=
1
i
S
SS
D
i
≤
ρ
.The first to thei
Sth neurons are selected based on the selection of corresponding values of SSD. By this deletion process, the inputs with correlation little to the output will be deleted from network. The deletion can lead to a compact network structure and hence improve the generalization ability of network. In implementing the aforesaid pruning method, we set a larger number of inputs initially and prune those contributing less to the output.To improve the generalization ability, we need a compact network structure. However, the dimension of network involves not only the number of inputs but also the number of hidden neurons. In deciding the number of hidden neurons, we make use of Akaike information criterion (AIC) to choose the optimal neuron number when the value of AIC reaches its minimum. AIC is an index for achieving network structure with optimal generalization ability, which considers both hidden neurons number and identification accuracy [19].


## 3. Simulation Experiment of Ship Motion Prediction

To validate the prediction capability of the proposed time delay wavelet neural network, we make use of the measurement data of motor vessel “YUKUN,” which is a training and scientific researching ship of Dalian Maritime University. The application of real measured data can also validate the antidisturbance ability because the measured data have taken the influences of wind, wave, and current.The shipboard measuring system can measure the ship’s motion status precisely which includes the wind, wave, current, and the measurement noise. The main principals of “YUKUN” are shown in Table1.Table 1
Main principles of M/V “YUKUN.”
Items
Values
Units
LOA
116
m
LBP
105
m
Breadth
18
m
Depth
8.35
m
Designed draft
5.4
m
Gross tonnage
6106
/
Designed speed
16.9
kn
Coefficient of blocks
0.5525
/
Displacement
5591.3
tThe measured data during sea voyage of “YUKUN” is adopted for the simulation experiment of ship motion prediction. The prediction model is NAMAX which is realized by time delay WNN, and the inputs are selected through sensitivity analysis method. The synchronously measured raw data include longitude, latitude, heading degrees, roll angle, pith angle, speed over ground, and speed over ground. To establish the prediction model, the contributions of inputs to the outputψ
(
t
) are firstly evaluated by the sensitivity analysis and the inputs are selected as 6 variables: ψ
(
t
-
1
), ψ
(
t
-
2
), ψ
(
t
-
3
), ψ
(
t
-
4
), φ
(
t
-
1
), and φ
(
t
-
2
), where φ is the roll angle of ship motion. The sample interval of the measurement is 1s. So thek-step-ahead prediction means prediction ofk seconds ahead. Simulation of 300 steps was conducted for each simulation.Therefore, with the selected inputs and the desired output, the ship heading angle prediction model is established as(14)
ψ
(
t
)
=
f
(
ψ
(
t
-
1
)
,
ψ
(
t
-
2
)
,
ψ
(
t
-
3
)
,
fdsfd
ψ
(
t
-
4
)
,
φ
(
t
-
1
)
,
φ
(
t
-
2
)
)
.It can be noticed that the model is NARMAX which is realized by time delay WNN. In the simulation, the samples are presented to the WNN sequentially, which is encountered in practical applications like online ship motion prediction and control. And there are two stages of computation in each step. Firstly, the presented data are used to train the WNN and the network parameters are determined accordingly; once the model is established and the parameters are decided, the achieved network will be implemented for prediction. That is, with the trained model in (14), the ship motion of 1-step-ahead is achieved:
(15)
ψ
(
t
+
1
)
=
f
(
ψ
(
t
)
,
ψ
(
t
-
1
)
,
ψ
(
t
-
2
)
,
g
f
g
g
ψ
(
t
-
3
)
,
φ
(
t
)
,
φ
(
t
-
1
)
)
.For multistep prediction, we use direct prediction instead of cascade prediction. For 2-step-ahead prediction, the input-output mapping is identified:(16)
ψ
(
t
)
=
f
(
ψ
(
t
-
2
)
,
ψ
(
t
-
3
)
,
ψ
(
t
-
4
)
,
h
g
h
g
ψ
(
t
-
5
)
,
φ
(
t
-
2
)
,
φ
(
t
-
3
)
)
.After the training process, the predictions can be made with the current available ship motion information at time oft:
(17)
ψ
(
t
+
2
)
=
f
(
ψ
(
t
)
,
ψ
(
t
-
1
)
,
ψ
(
t
-
2
)
,
f
d
s
f
ψ
(
t
-
3
)
,
φ
(
t
)
,
φ
(
t
-
1
)
)
.Likewise, the method can be generalized to conditions of multistep prediction. Fork-step-ahead prediction, the identification model and prediction model can be represented hereunder:
(18)
ψ
(
t
+
k
)
=
f
(
ψ
(
t
)
,
ψ
(
t
-
1
)
,
ψ
(
t
-
2
)
,
ψ
(
t
-
3
)
,
f
d
f
d
φ
(
t
)
,
φ
(
t
-
1
)
)
,
ψ
(
t
)
=
f
(
ψ
(
t
-
k
)
,
ψ
(
t
-
k
-
1
)
,
ψ
(
t
-
k
-
2
)
,
gfggf
ψ
(
t
-
k
-
3
)
,
φ
(
t
-
k
)
,
φ
(
t
-
k
-
1
)
)
.To evaluate the prediction ability for multistep prediction, 1-, 2-, and 3-step-ahead predictions were conducted, respectively, attributed to the nature of direct prediction where the more steps of prediction do not depend on the results of the previous less steps of prediction. The measured ship heading angle during the ship voyage is depicted in Figure2.Figure 2
Measured ship heading direction.It can be noticed from Figure2 that, as influenced by wind, wave, and current when sailing at sea, the heading degree changes violently. As stated above, ship motion is a complex process with nonlinearity, time-varying dynamics, and uncertainty and hence is hard to predict accurately. Therefore, the measured ship motion data is utilized to validate the efficiency of the proposed prediction model. For 1-step-ahead prediction, the identification error curve is depicted in Figure 3.Figure 3
Identification error for 1-step-ahead prediction using time delay WNN.The index root mean square error (RMSE) is adopted for evaluating the identification ability and the RMSE is 0.2019° for 1-step-ahead prediction. It is shown from Figure3 that the identification error is small and averaged around zero. Based on the identification, the prediction was made and the predicted heading angles together with measured ones are shown in Figure 4.Figure 4
Prediction result for 1-step-ahead prediction using time delay WNN.It can be seen from Figure4 that the predicted results coincide with the measured ones precisely. The RMSE of prediction is 0.3289° for 1-step-ahead prediction. The change of prediction error is illustrated in Figure 5.Figure 5
Prediction error for 1-step-ahead prediction using time delay WNN.For 2-step-ahead prediction, the same structure of time delay WNN is adopted and no further adjustments are made for the prediction model structure. The identification error for 2-step-ahead prediction is shown in Figure6.Figure 6
Identification error for 2-step-ahead prediction using time delay WNN.In the 300 steps of prediction, the identification RMSE is 0.2002° and the 2-step-ahead prediction result is shown in Figure7.Figure 7
Prediction result for 2-step-ahead prediction using time delay WNN.The prediction RMSE is 0.3498° and the changes of prediction error are shown in Figure8.Figure 8
Prediction error for 2-step-ahead prediction using time delay WNN.For 3-step-ahead prediction, the same WNN structure is adopted as 1-step- and 2-step-ahead prediction. The change of identification error is shown in Figure9.Figure 9
Identification error for 3-step-ahead prediction using time delay WNN.The identification of RMSE is 0.2313°. The prediction is conducted based on the identification result, and the prediction result is shown in Figure10.Figure 10
Prediction result for 3-step-ahead prediction using time delay WNN.The prediction of RMSE is 0.3727°; the prediction errors are shown in Figure11.Figure 11
Prediction error for 3-step-ahead prediction using time delay WNN.It can be noticed from simulation results that as the prediction horizon increases from 1 s to 3 s, the time delay WNN can generate prediction results with satisfactory accuracy. Prediction accuracy does not vary much with the increase of prediction horizon. This shows that the direct prediction avoids accumulation of prediction error and is an efficient method for multistep prediction. And the structure of time delay WNN remains unchanged for all the simulations, which means that the prediction method based on WNN possesses satisfactory robustness.In the process of 300 steps of simulation, the 1-step-, 2-step-, and 3-step-ahead predictions cost time of 2.68 s, 2.80 s, and 2.77 s, respectively. The average processing time of 1 step is less than 0.01 s. This shows that the time delay WNN processes fast.The simulation based on measured data demonstrates that the proposed method can generate multistep predictions with high accuracy attributed to the adaptive network structure and local response feature, and its processing speed is fast attributed to its compact network structure, which are important for its practical online applications such as online prediction and control.


## 4. Conclusions

A wavelet neural network with delayed system information is constructed and applied for online ship dynamics prediction. The sensitivity analysis is also applied to determine the inputs to the WNN, which improve the generalization ability of network. Simulations of ship motion prediction are conducted based on the real data measured during sea voyage at sea and the results demonstrate that the model has fast processing speed, satisfactory accuracy, antidisturbances ability, and robustness. Our future work will focus on the online adjustment of network dimension to adapt to the complex changes of ship dynamics. The adaptive wavelet neural network can be used for online ship motion status prediction and ship navigational safety evaluation and control.



---

*Source: 176297-2014-08-17.xml*