0% found this document useful (0 votes)
7 views17 pages

Real-Time Prediction of Ship Motion Based On Improved Empirical Mode Composition and Dynamic Residual Neural Network

This research paper presents a novel prediction model for ship motion using an improved empirical mode decomposition (IEMD) and a dynamic residual recurrent neural network with a time pattern attention mechanism (TPA-Bi-DRRNN). The model is optimized using a dynamic adaptive beetle swarm antennae search (DABSAS) algorithm, which enhances prediction accuracy and robustness under severe sea conditions. Performance tests demonstrate that the proposed model significantly outperforms traditional algorithms, providing real-time and accurate predictions essential for maritime safety.

Uploaded by

haohaoxuexi2207
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views17 pages

Real-Time Prediction of Ship Motion Based On Improved Empirical Mode Composition and Dynamic Residual Neural Network

This research paper presents a novel prediction model for ship motion using an improved empirical mode decomposition (IEMD) and a dynamic residual recurrent neural network with a time pattern attention mechanism (TPA-Bi-DRRNN). The model is optimized using a dynamic adaptive beetle swarm antennae search (DABSAS) algorithm, which enhances prediction accuracy and robustness under severe sea conditions. Performance tests demonstrate that the proposed model significantly outperforms traditional algorithms, providing real-time and accurate predictions essential for maritime safety.

Uploaded by

haohaoxuexi2207
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Ocean Engineering 292 (2024) 116528

Contents lists available at ScienceDirect

Ocean Engineering
journal homepage: www.elsevier.com/locate/oceaneng

Research paper

Real-time prediction of ship motion based on improved empirical mode


composition and dynamic residual neural network
Nan Gao , Zhenju Chuang *, Ankang Hu **
School of Naval Architecture and Ocean Engineering, Dalian Maritime University, No.1 Linghai Street, China

A R T I C L E I N F O A B S T R A C T

Handling Editor: Prof. A.I. Incecik Ship motion attitude data have strong random and non-stationary characteristics under severe sea states. Real-
time and accurate prediction of the ship’s motion attitude can significantly improve the safety of navigation.
Keywords: Therefore, this article proposes a prediction model based on the improved empirical mode decomposition (IEMD)
The improved empirical mode composition and the dynamic residual recurrent neural network with bidirectional structure and time pattern attention
Ship motion
mechanism (TPA-Bi-DRRNN), and proposes a new algorithm: dynamic adaptive beetle swarm antennae search
Dynamic bidirectional residual recurrent
(DABSAS) algorithm to optimise the initial weight and threshold of the prediction model. The input data are
neural network
Dynamic adaptive beetle swarm antennae adaptively composed into multiple intrinsic mode functions (IMFs) containing their frequency characteristics
search algorithm using IEMD, and a prediction is made for each IMF using TPA-Bi-DRRNN. The model structure can be regulated
Time pattern attrition in real time according to the sliding window. The destroyer DTMB5415 is used as an example to conduct a
performance test of the hybrid prediction model and DABSAS. The results show that no mode mixing occurred in
the IMFs, the noise in each IMF was significantly reduced, thus dramatically reducing the difficulty of using the
input data for prediction; and the optimization performance of DABSAS in applying the TPA-Bi-DRRNN is much
better than that of the traditional algorithms. Compared with other models, the difference in the predictive
accuracy of TPA-Bi-DRRNN under each condition is the smallest, suggestings that it has extremely high
robustness and will always be able to maintain much higher accuracy than other models over a long period, thus
meeting the needs for real-time accurate prediction of ship motion attitude.

1. Introduction which makes it have highly non-linear characteristics and strong


randomness, and difficult to predict. After the 1980s, a series of related
The ocean environment is complex and constantly changing, envi­ improved algorithms based on the Kalman filter such as the extended
ronmental factors such as currents and waves cause drastic variations in Kalman filter (Song et al., 2022; Mu et al., 2022) and unscented Kalman
a ship’s motion, resulting in adverse effects, that are likely to lead to filter (Peng et al., 2019; Zheng et al., 2022), and they all have been
damage to the main mechanical components of the vessel and major widely used. However, all the above theories can only predict time series
accidents, resulting in substantial losses of property and casualties with weak non-linear characteristics, which is not suitable for the ship’s
among the ship’s personnel. Therefore, accurate prediction of the motion under severe sea state, that is why they all have enormous lim­
movement attitude of a ship during a period of severe sea conditions can itations in engineering applications.
significantly improve maritime safety, protect the safety of the crew and After the 1990s, with the rapid development of machine learning and
the ship, and avoid the occurrence of dangerous events such as a ship artificial intelligence, which has the advantages of fast response and the
capsizing or anchoring. sufficient fitting ability for non-linear data, many scholars have applied
In the early stages of the research, the static model based on linear it in predicting ship motion (Sivaraj et al., 2022; Gupta et al., 2022; Lin
equations such as the Kalman filter method (Kaplan, 1969; Jose F, 1989) et al., 2022). Support Vector Machine (SVM) (Luo and Zou, 2009; Cao
and linear autoregressive model (Jiang et al., 2020; Wang et al., 2018) et al., 2015; Zhu et al., 2017) and Extreme Learning Machine (ELM) (Yin
have been widely applied. However, the ship’s motion is significantly et al., 2014; Guan et al., 2018) are the most representative theory.
influenced by some environmental factors such as waves and winds, However, their poor accuracy and long calculation periods are not

* Corresponding author.
** Corresponding author.
E-mail address: [email protected] (Z. Chuang).

https://doi.org/10.1016/j.oceaneng.2023.116528
Received 25 September 2023; Received in revised form 6 November 2023; Accepted 4 December 2023
Available online 14 December 2023
0029-8018/© 2023 Elsevier Ltd. All rights reserved.
N. Gao et al. Ocean Engineering 292 (2024) 116528

enough to predict time series with high complexity. In recent years, SVM and DABSAS algorithms and the operating mechanism of the prediction
and ELM gradually been replaced by deep learning theory, which has model are described in Section 2. In Section3, the destroyer DTMB5415
become increasingly mature, for its stronger fitting ability. Gated is taken as an example to conduct a validity experiment and perfor­
Recurrent Unit (GRU) (Li et al., 2022; Guo et al., 2022), and Long Short mance tests, and the container ship KCS is taken as a test object to verify
Term Memory neural network (LSTM) (Ma et al., 2021; Liu et al., 2022) the robustness of the TPA-Bi-DRRNN algorithm. Finally, the a summary
become the most commonly used deep learning models in predicting of the previous article and suggestions for future are presented in Section
ship motions, but they all have the problem of gradient vanish or 4.
overfitting, meaning that they have significant limitations for engi­
neering applications. 2. Methodology
To achieving the real-time prediction, some scholars proposed a
method combining the dynamic neural network and sliding data win­ In this part, the mathematic theory of IEMD and the structure of the
dow (Yin et al., 2018; Zhu et al., 2020), which significantly improves the hybrid model will be represented, the theory of the DABSAS and how it
prediction stability of prediction compared with static neural network. optimizes the prediction model will be explained, and finally, the gen­
However, the current dynamic neural network generally has only one eration of the test data used in Section 3 will be described.
hidden layer, which makes it has the insufficient fitting ability, that is
the reason why it is not suitable for real-time predicting ship motion 2.1. The improved empirical mode decomposition IEMD
under the harsh sea states. In addition, the initial weights and thresholds
of these models are completely randomly generated, making them very EMD is one of the common algorithms for decomposing non-
likely to fall into the local optimum during the training process, and stationary time series data, which can decompose the input data into
making it difficult to further improve accuracy. multiple IMFs and a residual according to its characteristics. However,
In addition to improving the model structure, some scholars reduce the low SNR of each IMF makes it challenging to predict. In addition, too
the prediction difficulty by preprocessing the input sequence (Wei et al., many abnormal values in the original signal will lead to uneven distri­
2022; Duan et al., 2015; Geng et al., 2023) to improve the model’s bution of extreme points, which causes the problem of mode mixing in
prediction accuracy. One of the most representative algorithms used to the IMFs and even makes some IMFs lose their physical meaning.
decompose time series is the empirical mode decomposition (EMD) Therefore, the IEMD is proposed in this study, which uses the new
(Huang et al., 1998). Although the EMD can adaptively decompose the comprehensive evaluation index: I to investigate the noise from the
input signal into multiple intrinsic mode functions (IMFs), when there approximation information and the detail information and make it more
are too many outliers are in the original signal, the problems of mode accurate to determine the boundary point between noise and signal, that
mixing and noise propagation will occur in IMFs, which will cause some is, the difference to the EMD which uses the correlation coefficient as the
lose their physical meaning. Therefore, its decomposition effect for ship only index to select the boundary IMF. Compared with EMD, the IEMD
motion under extremely rough sea state is poor. significantly improves the noise reduction effect and avoids the occur­
Focusing on the problems in previous studies, this article proposes a rence of mode mixing, thus reducing the difficulty of prediction.
hybrid prediction model based on improved empirical mode decompo­ In EMD’s comprehensive evaluation index, I is composed of root
sition (IEMD) and bidirectional dynamic residual recurrent neural mean square error (RMSE), mean absolute error (MAE), and smooth­
network with time pattern attention (TPA-Bi-DRRNN). ness: r. Their definitions are shown in Eq. (1) ~ Eq. (3), respectively:
The first advantage of the hybrid model is that the IEMD algorithm √̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
accurately determines the demarcation point between noise and valu­ √ N− 1
√1 ∑
able information and separates the different frequency characteristics of RMSE = √ (IMFk (t) − x(t))2 (1)
N t=0
the input signal into IMFs, which significantly improves the SNR (signal-
to-noise ratio) of each IMF, and the occurrence of mode mixing is
avoided, which dramatically reduces the prediction difficulty of vessel 1 ∑
N− 1
MAE = |IMFk (t) − x(t)| (2)
motion data. The second advantage is that the residual connection N t=0
dramatically expands the longitudinal depth of the model, which
significantly enhances the model’s fitting ability for complex data while ∑2
N−
(IMFk (t+1) − IMFk (t))2
avoiding the vanishing gradient problem and overfitting at the.
r= t=0
(3)
Furthermore, the input data are multivariate time series, that contains ∑2
N−

environmental factors in addition to the ship motion data, meaning that (x(t+1) − x(t))2
t=0
the model needs to take into account the influence of multiple factors on
the output at the same time. The combination of TPA and sliding data In Eq. (1) ~ Eq. (3): IMFk is the kth IMF, k = 1, 2, ⋯, m + 1, and m is the
window approaches enables the model to adjust the reference weight of number of the IMFs. In this article, the residual is regarded as the last
each input variable in real-time and dynamically, so that the model can component, so the maximum value of k is m + 1, and N is the number of
predict the ship motion from a more comprehensive perspective; the sampling points for each component. When I is used to determine the
third advantage is that the Dynamic Adaptive Beetle Swarm Antennae boundary of IMF, the coefficient of variation weighting method is used
Search approach can be used to optimise the initial weights and to determine the weight of each index. The coefficient of variation of
threshold in the hybrid model, thus avoiding falling into the local op­ each index is shown in Eq. (4) ~ Eq. (6):
timum during the training process which can lead to premature
σ pRMSE
convergence. Compared to other models, the hybrid model proposed in CVpRMSE = (4)
μpRMSE
this article significantly improves the accuracy of prediction of ship
motion under rough sea states, as it can maintain extremely high ac­ σ pMAE
curacy over the entire prediction period and has very high computa­ CVpMAE = (5)
μpMAE
tional stability. The difference in accuracy of prediction of motion
attitude under different heading angles is slight, indicating that the σ pr
CVpr = (6)
model has extremely high robustness and can achieve real-time, accu­ μpr
rate, and stable prediction of ship motion attitude, which is of great
significance for improving navigation safety. CV is the coefficient of variation, σ and μ are the standard deviation and
The content of this article is as follows. The principles of the IEMD the mean value, respectively, PRMSE , PMAE and Pr are the normalized

2
N. Gao et al. Ocean Engineering 292 (2024) 116528

algorithm can easily falls into the local optimum, thus leading to pre­
mature convergence.
The search process of the individual agnet in the DABSAS is shown in
Fig. 1.
In Fig. 1, t is the number of iterations, all agents are divided into
three categories: Pti ba , Pti we and Pti be , fit ba , fit we and fit be are their fitness
respective values, respectively. The update strategy of γd and γ δ of each
kind of agents is as follows:
①: For the agents in Pti ba , the update strategies of γ d and γδ are shown
in Eq. (12):
1
γd t = γ d1 − (γd1 − γd2 )
1 + exp(σ)
(12)
1
γδ t = γ δ1 − (γδ1 − γ δ2 )
1 + exp(σ)

γ d1 , γ d2 , γδ1 and γδ2 are the upper and lower limits of γd and γδ
respectively, γd t and γδ t are the values of γ d and γ δ at the tth iteration,
Fig. 1. The optimization process of DABSAS. the exp function ensures that the γ d and γ δ of the agents with inferior
performance gradually approach γ d1 and γδ1 with the increases of iter­
value of RMSE, MAE and r, respectively. The weighting process of each ations, which means that the agents in poor positions can quickly
index is shown in Eq. (7) ~ Eq. (9): approach the location of the global optimal solution, γ d1 = γδ1 = 0.95,
γ d2 = γ δ2 = 0.75.
WpRMSE =
CVpRMSE
(7) ②: For the agents in pti we , the update strategies of γd and γδ are shown
CVpRMSE + CVpMAE + CVpr in Eq. (13):
[ ( )2 ]
CVpMAE 2t t
WpMAE = (8) γd t = γ d2 + (γd2 − γd3 ) × −
CVpRMSE + CVpMAE + CVpr Imax t Imax t
[ ( )2 ] (13)
CVpr 2t t
Wpr = (9) γδ t = γ δ2 + (γδ2 − γ δ3 ) × −
CVpRMSE + CVpMAE + CVpr Imax t Imax t

In Eq. (7) ~ Eq. (9): W is the weight of each index determined based on The performance of the agents of pti we is relatively general, Imax t is
the coefficient of variation weighting method. Finally, I is shown in eq. the maximum number of iterations, γd3 and γ δ3 are the lower limits of γ d
(10), the smaller the value of I, the less the noise there is in the IMF. and γ δ of these agents, respectively. The adjusted factors of them are
determined by t and Imax t , which makes these intelligences can take into
I = WpRMSE × pRMSE + WpMAE × pMAE + Wpr × pr (10)
account both fast global search and precise local search. In this study,
The threshold used to distinguish between signal and noise is after balancing the calculation speed and the optimization effect, γ d3 =
described in Eq. (11): γ δ3 = 0.55.
⃒ ⃒ ③: For the agents in pti be , the update strategies of γd and γδ is shown
⃒Ik− 1 ⃒
Mk− 1 = ⃒⃒ ⃒ (11) in Eq. (14):
Ik ⃒
⃒ t t

⃒f − fmean ⃒
In Eq. (11): k≥ 2, when Mk− 1 satisfies: 1 ≤ Mk− 1 ≤ 3 for the first time, γd t = γ d3 − (γd3 − γd4 ) × ⃒⃒ i be we ⃒

σ
which indicates that a significant difference occurs in the SNR of the k − ⃒ t ⃒ (14)
t
⃒fi be − fmean we ⃒
1th IMF and that of the kth IMF, therefore, k− 1 is the critical value for ⃒
γδ t = γ δ3 − (γδ3 − γ δ4 ) × ⃒ ⃒

σ
distinguishing between signal and noise, which means the kth IMF and
IMFs after that will be regarded as the signal, and the components before The agents of pti be
are at the closest position to the optimal solution,
the kth IMF will be regarded as noise, the time series after noise reduction which should gradually approach the optimal solution with a smaller
⃒ ⃒
will be reconstructed based on all IMFs. ⃒f t − f t ⃒
search step, ⃒⃒ i be σmean we ⃒⃒ compares the difference between each agent and

the optimal agent, which enhances their local precise search ability and
2.2. The dynamic adaptive beetle swarm antennae search algorithm avoids missing the global optimal position. After multiple tests, the
(DABSAS) algorithm values of γ d4 and γδ4 with the best optimization effect are both 0.45.
γδ and γd control the search step size (γt ) and the whiskers length of
Beetle Antennae Search BAS (BAS) is a new bionic algorithm based each agent (dt ) in the t th iteration, as shown in Eq. (15):
on a single intelligent body. However, due to its utterly random search
direction and too few agents, it has the disadvantages of slow conver­ γt = γδ ⋅γt− 1
(15)
gence speed and easily falling into local optimum, which leads it to poor dt = d0 + γd ⋅dt− 1

optimization efficiency when solving the optimization problem of high-


In eq. (15): d0 is the length of the initial beetle whisker. After updating
dimensional functions. In order to solve the problem, a new Dynamic
the γ d and γδ of each agent, their centroid will be updated according to
Adaptive Beetle Swarm Antennae Search algorithm is proposed in this
the strategy as follows as Eq. (16):
study. The optimization is based on the beetle swarm with a size of N,
and two adaptive factors: γd and γδ are set to dynamically adjust the rand(D, N) ( )
xtic = xt−ic 1 + γ t sign filt− 1 − firt− 1 (16)
length of the beetle’s whiskers and the search step size of each agent, ‖rand(D, N)‖
which determines whether it is necessary to carry out a precise local
search according to its location, to solve the problem that the BAS In eq. (15), is the search step size of ith agent in the tth iteration, xic is the

3
N. Gao et al. Ocean Engineering 292 (2024) 116528

2.3. Dynamic bidirectional residual recurrent neural network based on


time pattern attention mechanism (TPA-Bi-DRRNN)

2.3.1. Time pattern attention mechanism


The input sequence of the hybrid model at each time step not only
has the time sequence data of roll angle and pitch angle but also contains
the environmental variables, such as wave slope angle and wave height,
which together constitute a time series with multivariate variables.
However, the multivariate time series will cause too much computa­
Fig. 2. The mechanism of TPA. tional burden on the neural network model, which makes it impossible
to accurately predict in real-time. Therefore, the Dynamic Residual
Recurrent Neural Network (DRRNN) based on Time Pattern Attention
(TPA) is proposed in this article. TPA extracts the local features of each
time series in the hidden layer of the residual module by the convolution
operation and mins the internal relationship of multivariate time series,
reduces unnecessary processes, and improves the calculation speed and
accuracy. Combined with the dynamic residual recurrent neural
network, the hybrid model can finally achieve long-term stable and
accurate prediction of ship motion attitude.
The operating mechanism of the TPA is shown in Fig. 2.
In Fig. 2: ht− w ∼ ht are the hidden state output of the last residual
block, w is the length of the sequence, C is the convolution kernel, j is the
number of the convolution kernels, and f is the evaluation function used
to evaluate the correlation between multivariate sequences. The math­
ematical expressions of the convolution operation and evaluation
functions are shown in Eq. (12) and Eq. (13):

w
Hi,jC = Hi,(t− w+l) ∗ Cj,T− w+l (18)
l=1

( ) ( )T
f HiC , ht = HiC Wa ht (19)

In which: HCi,j is the feature value extracted by the ith row vector through
the jth convolution kernel whose length is T − w + l, ∗ is the convolution
operation, l is the filling length in the convolution operation, T is the
maximum weight extracted by the convolution kernel, which is gener­
ally taken as w, and Wa is the weight parameter matrix, The weight
matrix calculation of the attention mechanism is shown in Eq. (20):
( ( ))
αi = sigmoid f HiC , ht i = 1, 2⋯m (20)

Fig. 3. The structure of Bi-RGRU and Bi-LSTM. In Eq. (20): sigmoid is used as the activation function of the weight
matrix calculation, HC is the time pattern matrix, HCi is the row vector of
centroid position of the ith agent, rand is the random function used to the former, αi is the parameter weight of HCi , and m is the feature number
generate a random number located in [ − 1, 1], D is the number of var­ of multivariate time series. The calculation of the attention matrix is
iables, sign is the symbol function, fil and fir are the respective fitness shown in Eq. (15):
values of the left and right whiskers (xil and xir ) of the ith agent, and xil ∑
m

and xir are updated according to Eq. (17): vt = αi HiC (21)


i=1


⎪ t t− 1 t rand(D, N) The hidden state: ht and the attention matrix: vt are summed after the
⎨ xil = xil + d ‖rand(D, N)‖

(17) linear mapping operation; the predicted value of the output model is

⎪ t
⎪ rand(D, N) shown in eq. (16), Wh′ , Wh and Wv are the weights in the matrix in this
⎩ xir = xt−ir 1 − dt
‖rand(D, N)‖ model.

Unlike in the random search strategy of BAS, each agent in ADBSAS yt− 1 = Wh′ (Wh ht + Wv vt ) (22)
has a different search step and whiskers length in each iteration ac­
cording to the values of its adaptive factors, and all agents in each 2.3.2. Dynamic Residual Bidirectional Recurrent Neural Network (Bi-
iteration are divided into three kinds according to their performance, DRRNN)
different kinds of agents have different update strategies for γd and γ δ , The sample space has to be updated in real-time to maintain the
which means that the algorithm can balance the rapid global search and correlation between the initial sample space of the prediction model and
precise local search to avoid falling into the local optimum. the future motion data at a high level. However, the neural network with
the static structure cannot maintain the adaptability of the model
structure to the data in the sample space for a long time, which results in
the prediction accuracy gradually decreasing over time. In addition, the
ship motion attitude has strong reciprocation, but the one-way recurrent
neural network cannot train the impact of future data on the current

4
N. Gao et al. Ocean Engineering 292 (2024) 116528

Fig. 6. The updated algorithm of the model structure.

hidden state. In order to solve these problems, the Dynamic Residual


Bidirectional Recurrent Neural Network is proposed in this study.
The residual bidirectional recurrent neural network is composed of
several residual blocks, the space-time residual connection greatly im­
proves the depth of the model, significantly enhances the fitting ability
of the model, and avoids the gradient disappearance or gradient ex­
plosion. A Bidirectional Residual Gate Recurrent Unit (Bi-RGRU) and a
Bidirectional Residual Long Short Term Memory (Bi-RLSTM) constitute
a residual block. Their structure is shown in Fig. 2, (a) and (b) are the
structure of Bi-RGRU and Bi-RLSTM, respectively. In Fig. 2: l is the serial
number of the residual block, t is the time step, Bi-RGRU and Bi-RLSTM
are composed of a forward RGRU and RLSTM and a reverse RGRU and
RLSTM respectively, the time series are input into the forward and
reverse units respectively, and the predicted value is composed of the
results of both.
Fig. 4. The cell structure of RGRU and RLSTM. The structure of each RGRU and RLSTM in Fig. 3 is shown in Fig. 3
(a) and (b), respectively. RELU is the unit’s activation function, in (a): rt
and Zt are the reset gate and update gate respectively, in (b): Ct , ft and it
are long-term memory, forget gate, and input gate. In Fig. 4: xt and ht are
input data and hidden state.
Compared with the GRU, the RGRU adds the residual term as shown
in eq. (17), the sequence is input into the residual block after being
calculated by the traditional GRU.

mt = ((1 − Zt ) ⋅ ht− 1 + Zt ⋅ ̃
ht ) ∗ WP (23)

Wp is the dimension scaling matrix, which plays a role in reducing the


parameters in the network, the ht output by RGRU is shown in eq. (18):
ht =Q⋅(mt + xt ⋅ Wh ) (24)

As the scale parameter, Q, plays a role in adjusting the network


output and avoiding overfitting. The residual connection of RLSTM is
realised by adding the original hidden state directly with ht− 1 to form a
new hidden state.
The space residual connection is shown in Fig. 5. l is the number of
hidden layers, t is the time step. yl− 1 is the output of the lth − 1 residual
block, ylast is the hidden state output by the last residual block, and
ylRLSTM = F(yl− 1 ) is the output of RLSTM in each residual block, in which:
F is the mapping relationship, so the output of the lth residual block is:
yl = yl− 1 + FRGRU
l l
(FRLSTM (yl− 1 )).
Fig. 5. Residual space connection.
2.3.3. The time-varying structure of the residual recurrent neural network
The prediction model based on the time-varying structure proposed
in this study can adaptively increase or decrease the number of residual
modules according to the suitability between the data in the sliding

5
N. Gao et al. Ocean Engineering 292 (2024) 116528

window and the current structure. The definition of the sliding data
window is as shown in eq. (19):
P = [(xt , yt ), (xt− 1 , yt− 1 )…(xt− d+1 , yt− d+1 )] (25)

In eq. (19): t is the time step, x and y are the multivariate time series and
label, d is the length of the window., the number of the residual blocks: n
changes in the interval: [α, β] to reduce the computation redundancy, the
initial value of n is α, the index: errorn and the threshold: δ are set to
evaluate whether the structure needs to be updated, the definition of the
former is shown in eq. (20), finally, the model structure will be adjusted
Fig. 7. The structure of the hybrid model. according to the algorithm shown in Fig. 6.
⃒ ⃒
⃒ypre − ylabel ⃒
errorn = ⃒⃒ ⃒ (26)
ylabel ⃒
Table 1
The parameters of DTMB5415.
In eq. (20): ypre is the prediction value of the model with the current
Parameter value structure, ylabel is the label value of the sample, n is the number of the
Length Overall(m) 142.18 residual blocks, the updated algorithm of the model structure is shown
Draft/m 6.15 in Fig. 4:
Displacement/t 8424.4
Height of the Center of Gravity/m 7.555
Block coefficient 0.505 2.4. The hybrid prediction model

The hybrid model consists of two parts. In the stage of data pre-
processing, the input data in the sliding data window is decomposed
into multiple IMFs that are easier to predict by the IEMD algorithm,
which improves the SNR of each IMF and significantly reduces the dif­
ficulty of neural network; the second stage is the IMFs prediction and
signal reconstruction stage, a prediction model is established for each
component, and the model structure is adjusted in real-time according to
the adaptability between the data in the sliding window and the model
structure in each time step. Finally, the signal reconstruction is con­
ducted based on the predicted value of each IMF to output the predicted
value of ship motion at the corresponding time. The structure of the
hybrid model is shown in Fig. 7, εpre (t) is the predicted value of it, IMFn is
the intrinsic mode function of the input sequence composed by IEMD.

2.5. The ship motion simulation model

In this part, a ship motion attitude simulation model is established


based on the ship roll and pitch motion response equations and the ITTC
two-parameter spectrum.
The destroyer DTMB5415 is taken as the experiment object in this
article. The data of roll and pitch angle when the navigation angle is 30◦ ,
90◦ , and 150◦ , respectively, under the sea state of four, five, and six, is
used as the test data in Section 3, the simulation time is 1500s, the
sampling frequency is 2HZ and a total of 3000 sample data. The main
parameters of DTMB5415 are shown in Table 1.

3. Performance tests of the model

The ship motion data of the first 1200 s in the simulation results are
used as the sample space, and the rest of the results are used as the test
data. The model in this study is developed based on the environment of
python3.9 and pytorch1.12. The validity of the IEMD and DABSAS will
be verified, and the prediction performance test of the prediction model
will be executed.

3.1. Validity experiment of IEMD


Fig. 8. Each component of the ship rolling time series data decomposed by
In this study, the Gaussian noise was added to all simulation data to
IEMD and EMD.
make it more relevant to the motion data measured under actual sea
conditions. When the ship is under the sea state of six and the navigation
angle is 90◦ , the ship’s rolling motion data wiil have the most significant
nonstationary characteristics, which is the reason these conditions were
chosen in selecting the test data used for the validity experiment for
IEMD, and the EMD is taken as the reference object.

6
N. Gao et al. Ocean Engineering 292 (2024) 116528

Fig. 9. The residual of ship rolling time series data decomposed by IEMD and EMD.

Fig. 10. Amplitude spectrum of IMF1-IMF6 decomposed by IEMD and EMD.

Fig. 11. The prediction error of each IMF decomposed by IEMD and EMD.

7
N. Gao et al. Ocean Engineering 292 (2024) 116528

Table 2
The eight test functions.
Number Formula Value interval Theoretical optimum

f1 f(x) =
∑49
x2i )
2 2
+ (xi − 1) ] [ − 30, 30] 0
i=1 [100(xi+1 −
∑50
f2 f(x) = i=1 (⌊xi +0.5⌋)
2 [ − 100, 100] 0
∑ ∏50
f3 f(x) = 50 i=1 |xi | + i=1 |xi |
[ − 10, 10] 0
∑50 2
f4 f(x) = i=1 xi [ − 100, 100] 0
f5 1 ∑50 2 ∏ 50 ( )
xi [ − 600, 600] 0
f(x) = xi − cos √̅ + 1
4000 i=1
i=1 i
∑n
f6 f(x) = i=1 [x2i − 10cos(2πxi ) + 10] [ − 5.12, 5.12] 0
f7 f(x)= 0.1(sin2 (3πx1 )+ [ − 50, 50] 0
∑ 50
(xi − 1)2 [1 + sin2 (3πxi +1)] + (xn − 1)2 [1 + sin2 (2πxn )]
i=1
f8 π, ∑49 50
∑ [ − 50, 50] 0
f(x) = {10 sin(πy1 ) + (yi − 1)2 [1 + 10sin2 (πyi+1 )] + (yn − 1)2 } + u(xi , 10, 100, 4)
n i=1 i=1

xi +1
yi = 1+
4

⎪ k(xi − a)m xi > a


u(xi , a, k, m) = 0 − a < xi < a



k(− xi − a)m xi < − a

Fig. 12. The optimization results of the four algorithms in unimodal function.

The EMD algorithm has the disadvantages of modal mixing and low The IMFs and residuals decomposed by IEMD and EMD are shown in
SNR of the IMFs. The main reason for the former is that there is too much Fig. 8 and Fig. 9, respectively. In Fig. 8, (a) and (b)are the IMFs resulting
noise in the original data, which makes the extreme points of it change from the decomposition of ship rolling data by IEMD and EMD,
so that the obtained envelope obtained is a combination of the local respectively. In Fig. 9, (a) and (b)are the residuals of IEMD and EMD,
envelope of the abnormal value and the actual signal envelope, or the respectively. In Figs. 8 and 9, the vertical axis is the function value of
frequency of each IMF of the original signal is close. Mode mixing is each IMF.
mainly presented in an IMFs containing IMFs with different frequencies, It can be seen from the results in (b) that the noise in the IMF1, IMF2,
which will cause the subsequent decomposed IMF to lose their physical and IMF3 components generated by the EMD algorithm decomposition
meaning. of the rolling data is much greater than in the other IMFs; their SNR is so

8
N. Gao et al. Ocean Engineering 292 (2024) 116528

Fig. 13. The optimization results of the four algorithms in multimodal function.

low that it dramatically increases the difficulty of prediction of the the decomposition results of EMD not accurately capturing the local
hybrid model. In addition, each IMF still has strong non-stationary characteristics of the input signal, resulting in a significant error in the
characteristics, weak periodicity, and large amplitude, which will lead predicted value of the model. In contrast to the IEMD, each IMF has only
to a significant deviation. The IMFs decomposed by IEMD have smaller one frequency component and the IMFs are independent of each other
amplitudes and more significant periodic characteristics compared with and can intuitively and accurately capture the local characteristics of the
the IMFs decomposed by EDM. Their non-stationary characteristics have input signal, which indicates that the mode mixing phenomenon does
been significantly weakened, which indicates that the former has a not occur in the IMFs. The frequency distribution of the amplitude
higher SNR, and the difficulty of prediction of each component has been spectrum of each IMF is more concentrated which demonstrate that
noticeably reduced, which proves that the IEMD can effectively reduce there is less noise in the IMFs, it is since the comprehensive evaluation
the noise in the signal. Comparing the two groups of IMFs that represent index allows the IEMD to find the boundary point of noise and signal
the high-frequency and low-frequency components in the input data: more accurately, which significantly improves the SNR of each IMF, and
IMF1-IMF3 and IMF4-IMF6, it can be seen that the difference between avoids the propagation of noise between IMFs, thus eventually consid­
the amplitude and frequency of each IMF composed by IEMD and EMD erably reduceing the prediction difficulty of each IMF and indirectly
gradually increases, which means that the advantage of IEMD over EMD improving the prediction accuracy.
in decomposition efficiency gradually expands with the increase of the To further compare the prediction difficulty of each IMF decomposed
number of IMFs. Furthermore, it can be known from Fig. 9 that the re­ by IEMD and EMD, the IMFs decomposed by them are all predicted by
sidual of IEMD is much smaller than that of EMD, indicating that the TPA-Bi-RRNN, the prediction period is 180s, and the evaluation index is
former has a better feature extraction effect on the input signal. shown in Eq. (21):
Fig. 10 shows the amplitude spectrum of each IMF decomposed by √̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
IEMD and EMD, in which (a) ~ (f) are the respective amplitude spectra 1∑ n
RMSEpre = (yi − Yi )2 (27)
of IMF1-IMF6. n i=1
It can be seen from Fig. 10 that the problem of mode mixing occurred
in each IMF decomposed by EMD; there are the frequency components of In Eq. (21): yi is the predicted value of TPA-Bi-RRNN, Yi is the sample
8Hz in IMF1, IMF2, and IMF3; 5Hz frequency components in IMF1, value, and n is the length of the sequence, in this study, n = 75. The error
IMF2, and IMF4; 2Hz frequency components are distributed in IMF1, of the two groups of IMFs in the 180s are shown in Fig. 9, in which the
IMF3, and IMF5; and the frequency components of 1Hz are distributed in horizontal axis is time and the vertical axis is the value of RMSE.
IMF5 and IMF6. This phenomenon causes the frequency components in The results shown in Fig. 11 demonstrate that the prediction error of
each IMF to interfere with each othe and overlap with each other, the IMFs decomposed by IEMD is significantly smaller than that of EMD
frequency characteristics in each IMF are too blurred. Moreover, the when using a model with the same structure to predict. The prediction
amplitude spectrum of each IMF decomposed by EMD is relatively errors of IMFs in both groups gradually decrease from IMF1 to IMF6,
distracted, which demonstrates that each IMF contains much noise and according to Fig. 8. It can be known that this is because the amplitude,
has an excessively low SNR. This is because the mode mixing causes randomness, and nonstationary characteristics of the IMFs gradually
noise to propagates between the IMFs caused by mode mixing, and EMD declined, and the periodicity gradually increased, thus, the prediction
does not have a noise reduction mechanism, which ultimately leads to difficulty and the error decrease progressively. However, the prediction
error of the IMFs decomposed by EMD is always in a state of violent

9
N. Gao et al. Ocean Engineering 292 (2024) 116528

Table 3
The parameters of the model used in the validity experiment of the TAP-Bi-
DRRNN.
Parameter TPA-Bi- TPA- Bi- LSTM
DRRNN DRRNN DRRNN

Number of input feature 3 3 1 1


Number of residual [1,15] [1,15] [1,15] 0
blocks
Hidden neurons 16,32 16,32 16,32 16,32
Length of the sliding 20 20 20 20
window
Number of iterations 2000 2000 2000 2000
Optimization algorithm DABSAS DABSAS DABSAS DABSAS
Activation Function ReLU ReLU ReLU ReLU
Batch size 45 45 45 45
Optimizer Adam Adam Adam Adam
Number of output 1 1 1 1
variables

The input data of TPA-Bi-DRRNN and TPA-DRRNN are multivariate time series,
and the wave slope and wave height are also in the input sequence in addition to
the ship motion data for the TPA-Bi-DRRNN and TPA-DRRNN, and the predic­
tion period of all the models is 60s.

most, and the fluctuation range and frequency of the errors are signifi­
cantly smaller than those of the latter, which indicates that the
randomness of each IMF decomposed by IEMD was weakened, and their
SNR is improved substantially. According to Fig. 10, this can be attrib­
uted to the fact that the IEMD algorithm accurately separates the
effective features and noise in the input signal so that each IMF can
accurately characterize the local features of the input signal and avoid
the mode mixing problem. When the prediction period was 180s, the
calculation time of IEMD and EMD were 2.25s and 2.23s, respectively,
and the calculation time for each time step is 0.0125s and 0.0124s,
respectively, which demonstrates that the two algorithms can both
realize the real-time prediction.
In summary, the input data can be decomposed into multiple inde­
Fig. 14. Flow chart of DABSAS optimizes the TPA-Bi-DRRNN model. pendent IMFs, which can accurately capture their local characteristics
by IEMD. Compared with the EMD, it solves the problem of mode mixing
occurring in IMFs and accurately separates the effective information and
noise in the input sequence. Thus, the propagation of noise between
IMFs is avoided, and the SNR of each IMF can be noticeably improved.
Eventually, the prediction difficulty of the model is significantly
reduced. Furthermore, the calculation time needed for a single time step
is extremely short, meaning that it is possible to real time prediction.

3.2. Optimization performance experiment of DABSAS

The optimization performance experiment of DABSAS consisted of


two parts. In the first part, eight test functions were used as experimental
objects to compare the optimization results of the DABSAS algorithm
against those of the BAS algorithm, BSAS algorithm, and PSO algorithm
under the same test function to preliminarily verify its validity prelim­
inarily; in the second part, the TPA-Bi-DRRNN was taken as the object to
investigate the optimization efficiency of DABSAS on complicated deep
learning models.

3.2.1. Evaluation of the validity of DABSAS


Fig. 15. The results of the four algorithms to optimise the TPA-Bi- The eight test functions in this experiment are four unimodal func­
DRRNN model. tions and four multimodal functions. The expression of each test func­
tion, its value range and search dimension are shown in Table 2; f1 ∼ f4
fluctuation over the whole period. Although the fluctuation range are unimodal functions, f5 ∼ f8 are multimodal functions. The same
gradually decreases as the number of IMFs increases, it is still disad­ random seed is used to generate the initial positions of each algorithm of
vantageous for the subsequent signal reconstruction. In general, making each test function to avoid the differences between the results caused by
prediction using the model is still very difficult. However, in contrast, random initialisation. The search dimension of each function is 50, and
the errors of the IMFs decomposed by IEMD are always at an extremely the number of agents of BSAS, DABSAS, and PSO each had 20 agents.
low level, compared to those of EMD, which were reduced by 43.86 % at Finally, to make each algorithm converge to the optimal solution to the
greatest possible extent, the number of iterations of each experiment is

10
N. Gao et al. Ocean Engineering 292 (2024) 116528

Fig. 16. The contrast curves of motion attitude when the navigation angle
is 30◦ . Fig. 17. The contrast curves of motion attitude when the navigation angle
is 90◦ .

set at 6000.
The test results of the four algorithms on the unimodal function are much smaller than that of the other three algorithms, which is the most
shown in Fig. 12, where (a) ~ (d) are the results of f1 ∼ f4 , respectively. obvious in f1 and f2 . In terms of optimization speed, the other three al­
The results shown in Fig. 12 demonstrate that the optimization gorithms spent at least 3526, 2085, 962 and 1687 iterations on f1 ~f4 ,
performance of the DABSAS algorithm on a unimodal function is much respectively, but the DABSAS only needs 2034,1785,655 and 998 iter­
higher than that of the other three algorithms. From the final optimi­ ations, respectively, to complete the search, which reduced the calcu­
zation results, we know that the convergence fitness value of DABSAS is lation times by 42.31%, 14.39%, 31.91%, and 40.84%. Those two

11
N. Gao et al. Ocean Engineering 292 (2024) 116528

advantages indicate that the optimization efficiency of DABSAS for


unimodal functions is obviously higher than that of the traditional al­
gorithms. This can be attributed to the extremely fast search speed of
DABSAS at the beginning of the optimization, which gradually decreases
over iterations; when closing in on the optimal solution, it approaches 0.
This is because that γd and γδ adaptively adjust the search step size at
each iteration according to the position of the different kinds of agents in
the swarm. At the beginning of the process of optimization, most of the
agents in the swarm are at the post away from the optimal solution with
poor performance, and the values of the adjustment factors γd and γδ of
these agents are positively correlated with the number of iterations,
which makes them leave their awkward position as soon as possible and
try to get closer to the optimal solution region; at the later stage of the
optimization, agents with better performance account for a higher
proportion of the population, and their positions are close to the optimal
solution, γd and γ δ adaptively reduce the search range of the left and
right whiskers according to the difference of position between the in­
dividual and the optimal agent, making these agents conduct a more
precise local search, to avoid the optimal solution.
Fig. 13 shows the results of the four algorithms on the multimodal
functions, (a) ~ (d) are the optimization results of f5 ∼ f8 respectively,
demonstrating that the optimization performance of the DABSAS algo­
rithm on multimodal functions is still much better than that of three
traditional algorithms. Unlike in the unimodal function experiment,
there is a short stagnation period in the optimization process. This is
because is that the multimodal function has multiple local optimal so­
lutions, when the swarm falls into one of them, it is necessary to perform
a significant number of iterations are needed to perform to leave the
local optimal region. Of the four algorithms, the DABSAS algorithm has
the least number of falling into local optimal solutions the least number
of times on the four algorithms on the same test function, and the
showed shortest stagnation period each time, which is much faster than
the other three algorithms. In terms of the result, the DABSAS only
needed 446 and 910 iterations to achieve the theoretical optimal values
on f5 and f6 , respectively; however, the fastest of the other three algo­
rithms need 1020 and 1907 iterations, which decrease of 56.27% and
52.28%, respectively. Although the DABSAS does not reach the theo­
retical optimal solution on f7 and f8 , the optimization results of them are
1.242 × 10− 10 and 8.399 × 10− 11 which takes 1778 and 2603 iterations,
respectively, and the optimization results of the other three algorithms
are 1.068 × 10− 9 and 2.010 × 10− 10 which takes 3186 and 3755 itera­
tions, respectively, to calculate. Therefore, it is evident that the opti­
mization result of DABSAS is much better than that of the other three
algorithm, and the difference with the theoretical optimal value is
minimal; on the other hand, the optimization speed is also significantly
higher than the others, which is reflected in the fact that the number of
iterations are decreased by 44.20% and 30.68%, respectively, which
should be attributed to the dynamic adaptive ability of DABSAS, which
can adjust the search strategy of an individual agent in real time ac­
cording to the difference in performance between each agent and the
optimal one, which not only makes the agent at the local optimal posi­
tion ababdon it as soon as possible, but also enhanced the local search
ability of an agent that is close to the optimal position. Above all, the
optimization efficiency of the DABSAS in optimizing the complex
multimodal functions with high dimensions is significantly higher than
Fig. 18. The contrast curves of motion attitude angle when the navigation
angle is 150◦ . that of traditional algorithms.

Table 4
The comparison of the correlation of the coefficient of the four models when the navigation angle is 30◦ .
Ship motion LSTM Bi-DRRNN TPA-DRRNN TPA-Bi-DRRNN

Lv 5 Lv 6 Lv 7 Lv 5 Lv 6 Lv 7 Lv 5 Lv 6 Lv 7 Lv 5 Lv 6 Lv 7

Roll 0.933 0.917 0.909 0.947 0.942 0.934 0.958 0.953 0.950 0.994 0.992 0.989
Pitch 0.942 0.938 0.929 0.955 0.952 0.946 0.966 0.963 0.962 0.997 0.996 0.993
surge 0.948 0.940 0.934 0.957 0.954 0.950 0.968 0.965 0.964 0.998 0.997 0.995

12
N. Gao et al. Ocean Engineering 292 (2024) 116528

Table 5
The comparison of the correlation of the coefficient of the four models when the navigation angle is 90◦ .
Ship motion LSTM Bi-DRRNN TPA-DRRNN TPA-Bi-DRRNN

Lv 5 Lv 6 Lv 7 Lv 5 Lv 6 Lv 7 Lv 5 Lv 6 Lv 7 Lv 5 Lv 6 Lv 7

Roll 0.922 0.909 0.898 0.936 0.928 0.916 0.951 0.943 0.932 0.990 0.987 0.986
Pitch 0.947 0.945 0.941 0.959 0.957 0.954 0.972 0.970 0.967 0.997 0.997 0.995
surge 0.950 0.949 0.945 0.964 0.963 0.961 0.976 0.975 0.974 0.998 0.998 0.997

Table 6
The comparison of the correlation of the coefficient of the four models when the navigation angle is 150◦ .
Ship motion LSTM Bi-DRRNN TPA-DRRNN TPA-Bi-DRRNN

Lv 5 Lv 6 Lv 7 Lv 5 Lv 6 Lv 7 Lv 5 Lv 6 Lv 7 Lv 5 Lv6 Lv7

Roll 0.934 0.916 0.908 0.949 0.944 0.936 0.956 0.954 0.949 0.995 0.993 0.989
Pitch 0.943 0.940 0.938 0.953 0.950 0.948 0.965 0.962 0.958 0.996 0.995 0.993
surge 0.947 0.941 0.940 0.956 0.953 0.951 0.967 0.966 0.964 0.997 0.996 0.996

3.2.2. The optimization test of a deep learning model based on the DABSAS a local optimum, leading to premature convergence; BSAS and PSO both
It can be seen from Sections 2.3 and 2.4 that the TPA-Bi-DRRNN has a have the problem of lacking the ability to dynamically adjust the search
complicated time-varying structure, a large number of initial weights step of the agent, which makes them take too many iterations to reach
and thresholds to be optimized when the network is updated, it is likely convergence, meaning that they are unable to meet the requirements for
to cause the model to move into the local optimal region during the real-time prediction.
training process, if the parameters are generated entirely randomly, In summary, the performance of DABSAS in optimizing single-peak
resulting in an unsatisfactory convergency result which leads to a sig­ functions, multi-peak functions, and TPA-Bi-DRRNN is much better
nificant deviation in the prediction value. The initial weight and than that of traditional algorithms, with a faster search speed, that meets
threshold of TPA-Bi-DRRNN will be optimized based on DABSAS to solve the requirements of TPA-Bi-DRRNN for real-time prediction.
this problem. The process of it is shown in Fig. 14.
To investigate the optimization efficiency of the DABSAS algorithm
3.3. TPA-Bi-DRRNN prediction performance test
for the TPA-Bi-DRRNN model, the convergence curves of fitness values
of the PSO, BSAS, BAS, and DABSAS algorithms in the process of opti­
In this section, a roll angle, pitch angle, and surge value prediction
mizing the TPA-Bi-DRRNN model are taken as references. As shown in
experiment on DTMB5415 and a roll angle prediction test on KCS will be
Fig. 15, all algorithms are set to 7500 iterations, the swarm size of PSO,
conducted; the main parameters of DTMB5415 are shown in Table 1.
BSAS and DABSAS is 25 each, and the initial search step size of all al­
Considering the high correlation between the ship motion and the
gorithms is 0.45, and each algorithm is initialized based on the same
navigation angle, in this study, the test of predicting the vessel rolling
random seed to avoid the influence of random initialisation on the
angle, pitch angle, and surge based on TPA-Bi-DRRNN will be conducted
resulst.
under the sea states of five, six, and seven when the navigation angle is
The number of parameters that need to be optimized is much more
30◦ , 90◦ , and 150◦ , respectively, and the ship speed is 30Kn. To inves­
significant than the dimensions of f1 ∼ f8 , and the mapping relationship
tigate the validity of TPA and the structure of bidirectional neural net­
between the input and output of the model is much more complex than
works, Bi-DRRNN, TPA-DRRNN, and LSTM (a classical recurrent neural
that of the test function, which makes the differences in optimization
network that is commonly used in predicting time series) are taken as a
performance difference between the algorithms more obvious. As shown
contrast.
in Fig. 15, in terms of the results, the convergence value of the fitness
value of the DABSAS algorithm is 0.077, and those of the BSAS, PSO, and
3.3.1. Setting of model parameters
BAS are 0.110, 0.100 and 0.209, respectively, meaning that they were
To exclude the influence of non-modelled structural factors, the
slower by 30%, 23%, and 63.2%, respectively. Thus, it can be seen that
input data will be decomposed and restructured by IEMD, the activation
the optimization result of the DABSAS algorithm on TPA-Bi-DRRNN is
functions, optimizers, and hyperparameters of each model are the same,
much better than that of the three traditional algorithms. In terms of the
as shown in Table 3. The deep learning model used in this section is
optimization process, the DABSAS takes 4254 iterations, respectively, to
developed in Python 3.9 and Pytorch 1.12 environment. To ensure that
complete the optimization, while the BSAS, PSO, and BAS take 6,302,
each model can converge at the end of model training, the number of
6371 and 5940 iterations to complete it, which indicates that DABSAS
iterations is 2000 which is slightly larger than the number of iterations
improves the optimization speed by 32.5%, 33.2% and 28.4%, respec­
used in practice. Considering that predicting the ship motion about 10s
tively and ensure the best result at the same time. This can be attributed
in advance can give the crew have enough reaction time and the
to the fact that DABSAS falls into the local optimum fewer times when
calculation time is relatively short, so the length of the sliding window is
optimizing the complex mapping relationship with a shorter stagnation
set at 20s. The method for setting the number of neurons is currently
period, which helps it quickly abandon the local optimal position. The
uncertain, the model setting in this study refers to related research.
adjustment factors can dynamically adjust the balance between fast
global search and precise local search according to the position of the
3.3.2. The test of prediction performance
agents, which makes the swarm rapidly approach to the optimal solution
The predicted value and the simulated value of the model, when the
region at the early stage of the optimization. This is reflected in the fact
navigation angle is 30◦ , 90◦ , and 150◦ are shown in Figs. 16–18, in
that the convergence speed of the DABSAS is much higher than that of
which (1), (2), and (3) are the contrast curves of rolling angle, pitch
the other three algorithms at the beginning, and the precise search will
angle, and surge value, respectively, and (a), (b) and (c) are corre­
be conducted to avoid the optimal solution when the swarm is close to it.
sponding to the sea states of five, six and seven, respectively.
BAS relies on a single intelligent body to search for the optimal solution,
The correlation coefficients of each working condition in Figs. 16–18
it has the advantage of rapid search speed, but it is too easy for it fall into
are shown in Tables 4–6. In which the Lv 5, Lv 6, and Lv 7 correspond to

13
N. Gao et al. Ocean Engineering 292 (2024) 116528

the sea state of five, six, and seven, respectively.


It can be seen from the results that the TPA-Bi-DRRNN model can
realize the accurate prediction of the ships’ roll, pitch, and surge motion
under severe sea conditions and that its accuracy and robustness of
which are obviously higher than those of LSTM, Bi-DRRNN, and TPA-
DRRNN. The correlation coefficient of the predicted value of LSTM
under each working condition is much lower than the other three
models, especially for the roll angle when the navigation angle is 90◦ . As
the sea conditions gradually deteriorate, the descent range of the cor­
relation coefficient of the LSTM is much lower than that of the other
three models. On the one hand, this is because, when the navigation
angle is 90◦ , the influence of waves on the ship’s rolling motion is the
most obvious, and the rolling angle data have strong nonstationary
characteristics, making it difficult to predict. The LSTM only has high
accuracy in predicting ship surge motion. This is due to the frequency
and amplitude of surge being significantly lower than that of roll and
pitch, which makes it easier to be predicted. It is also the working
condition where the accuracy gap between it and the other three models
is the smallest. On the other hand, because of the sequential connection
of LSTM, the LSTM only has only a few hidden layers to avoid the ex­
ploding or vanishing gradient problems in the training process, meaning
that it lacks sufficient ability to fit time series data with highly non-
linear and non-stationary characteristics. The above results indicate
that the LSTM is only suitable for predicting the data without strong
nonstationary such as surge, but it cannot be used in predicting roll and
pitch motion under harsh sea state. In addition, it can be seen from
Figs. 16–18 that the prediction accuracy of LSTM gradually decreases
with time. The prediction accuracy of the four models is not significantly
different at the beginning of the prediction. However, after about 20 s,
the accuracy of LSTM is much lower than that of the other three models,
which is due to its static structure. The data in the first 20s are highly
compatible with the model structure, and the LSTM has sufficient fitting
ability, however, with the update of the sample space, the adaptability
between the model structure and the data declines continuously, which
makes the accuracy of LSTM decreases significantly with a gradually
accelerating decline rate of decline; In comparison, the other three
models can adaptively increase or delete the residual blocks according to
the data in the sliding window because of the time-varying structure,
which makes the adaptability between the model structure and the data
maintained at a high level in the prediction period. Above all, the time-
varying structure, meaning that the model maintain extremely high
accuracy over the period, and the number of residual blocks changes
within a specific interval, thus avoiding computational redundancy.
The accuracy of Bi-DRRNN, TPA-DRRNN, and TPA-Bi-DRRNN is
significantly higher than that of LSTM not only because the time-varying
structure improves the stability of prediction but also because the space-
time residual connection substantially improves the nonlinear fitting
ability of each model while avoiding the vanishing gradient. Compared
with LSTM, the maximum increase in the correlation coefficient of the
other models at different working conditions is 9.56%, demonstrating
that the model with space-time residual connection structure has a
significantly higher ability than LSTM to fit time series data with highly
nonlinear characteristics than LSTM. In summary, the dynamic neural
network model with a space-time residual connection in this article can
maintain a high predictive accuracy over a long period.

3.3.3. The error analysis of the models


To further compare the performance differences between LSTM, Bi-
DRRNN, TPA-DRRNN, and TPA-DRRNN, the rolling data under the sea
state of seven is taken as the experimental object, as data of this type
have the strongest randomness, which should lead to the maximum
performance differences between models. The correlation coefficients
between the predicted values and the simulated values of the three
models under the navigation angles of 30◦ , 90◦ , and 150◦ are shown in
Fig. 19. Correlation analysis between prediction and simulated value of the
four models at sea level 7. Table 6, and a correlation analysis of them at each navigation angle is
shown in Fig. 19.

14
N. Gao et al. Ocean Engineering 292 (2024) 116528

Fig. 20. Error distribution of the prediction value of the four models.

From the distribution of the predicted values of each model in


Table 7 Fig. 19, it can be seen that the correlation between the predicted values
The main parameters of KCS. of TPA-Bi-DRRNN and the simulated values is significantly higher than
Parameter Value that of Bi-DRRNN, TPA-DRRNN, and LSTM when predicting time series
Length of perpendicular/m 230 with a high degree of randomness. The results in Table 4-Table 6 show
Draft/m 10.8 that compared with the other three models, the correlation coefficients
Displacement/t 52030 of the TPA-Bi-DRRNN prediction values are increased by at least 8.80 %,
Breadth/m 32.2 9.79 %, and 8.92 %, respectively, under three different navigation an­
Depth/m 19.0
gles when the sea state is Lv7, in particular, the maximum increase is
Center of Gravity height/m 13.66
seen when the navigation angle is 90◦ . This shows that the performance
advantage of TPA-Bi-DRRNN gradually becomes more obvious as the sea
state level increase; on the other hand, the prediction accuracy of LSTM
is the lowest in all working conditions, which demonstrates that the
traditional static structure recurrent neural network cannot achieve
accurate prediction of ship motion under severe sea state. At the sea
state of Lv7, the influence of wave on ship roll motion is the most
obvious under all working conditions, and the change of roll angle has
the strongest randomness, which indicates that the performance
advantage of TPA-Bi-DRRNN becomes more evident as the difficulty of
input data prediction increases. In addition, when the navigation angle
is 90◦ , there is a noticeable difference in the decrease of the correlation
coefficient between the predicted values of each model under the sea
state of five and seven, the TPA-Bi-DRRNN model only decreases by 0.40
%, while the Bi-DRRNN and TPA-DRRNN decreased by 2.14 % and 1.99
%, respectively, which demonstrates that the correlation between the
performance of TPA-Bi-DRRNN and the sea state level is much lower
than that of the latter two, meaning that the ability to fit highly non-
linear data of TPA-Bi-DRRNN is much better than the last two, which
makes it can better able to adapt to an actual sea surface with complex
and changeable environmental factors. To further investigate the
computational stability of TPA-Bi-DRRNN, the distribution of the rela­
tive error of each model under the sea state of seven with different
navigation angles is shown in Fig. 20.
Fig. 21. Correlation analysis between prediction and simulated value of the
four models. The results in Fig. 20 show that even in very harsh sea conditions, the
relative error of TPA-Bi-DRRNN at different navigation angles is
distributed in 0.75%–1.8%, which is concentrated in 1%–1.4%, and the
error distribution under different working conditions is basically the

15
N. Gao et al. Ocean Engineering 292 (2024) 116528

Fig. 22. Error distribution of the prediction value of the four models.

same. In comparison; the percentage errors of Bi-RRNN and TPA- When the navigation angle is 90◦ , the amplitude and frequency of the
DRRNN are distributed in 4 %–11 % and 3 %–9 %, respectively, rolling angle are the largest, which gives this navigation angle the
which are concentrated in 6 %–9 % and 5 %–7 %, respectively; the strongest nonlinear characteristics, and makes its prediction difficulty is
percentage error of LSTM are distributed in 4%–13.5% range and significantly higher than that of any other motion. Therefore, the rolling
concentrated in 9%–11% range. It can thus be seen that the predictive angle of KCS under the sea state of level 7 when the navigation angle is
accuracy of LSTM for the ship motion under severe sea state is extremely 90◦ is taken as the test data (calculated by the model mentioned in
unstable, it is further verified that an RNN with static structure is section 2.5), and the LSTM, Bi-DRRNN and TPA-DRRNN are taken as the
insufficient in predicting time series with high nonstationary charac­ reference. The correlation analysis between the predicted and simulated
teristics. The above results demonstrate that the calculation accuracy value of these models is shown in Fig. 21.
and stability of the TPA-Bi-DRRNN model in predicting data with a high It can be seen from the predicted value of each model in Fig. 21 that
degree of randomness and highly non-stationary characteristics are the rolling angles predicted by the TPA-Bi-DRRNN are almost
much higher than those of the other three models. This can be attributed completely distributed near the perfect regression line, which demon­
to the fact that the prediction of TPA-Bi-DRRNN is based on a multi­ strates that the correlation between the roll angle predicted by TPA-Bi-
variate time series; except for the rolling data, the environmental fac­ DRRNN and the simulated value is extremely high. Compared with the
tors, such as wave slope angle and wave height, are also used as the input results in Fig. 19, the correlation of the predicted value of TPA-Bi-
variables except for the rolling data, which makes the model capable of DRRNN for DTMB5415 and KCS are basically the same, which proves
taking multiple factors that correlated with rolling motion into account the model has extremely strong robustness; in contrast to other models,
at the same time in the prediction process. Combined with the data the distance between their predicted value and the perfect regression
sliding data window and TPA, the process of weighting the multi- line is significantly further than that of the TPA-Bi-DRRNN, especially
dimensional inputs can be conducted in real-time, the variables with for the LSTM, which indicates that their predictive performance is far
high correlation to output will be given more weight, and the variables lower than that of TPA-Bi-DRRNN, and the errors of some predicted
with low correlations to the output will be assigned less weight. The value of these models are too large which demonstrates that the
weight of each variable is continuously adjusted with the update of the robustness of LSTM, Bi-DRRNN and TPA-DRRNN is insufficient. The
data in the sliding window, which makes the model more robust over a distribution of the relative error of each model for predicting the rolling
long prediction period; on the other hand, the bidirectional residual angle of KCS under the sea state of Lv7 when the navigation angle is 90◦
recurrent neural network has two layers of RGRU and RLSTM with is shown in Fig. 22.
opposite directions, which makes the model capable of extracting the It can be known from the results shown in Fig. 22 that the percentage
features of data from the positive and negative directions so that the error of TPA-Bi-DRRNN is distributed in the 1.0%–1.75% range and
model can predict the output of each time step based on the data of the concentrated in 1.35%–1.5% range. The error distribution is basically as
past and future moments, which means that it has sufficient ability to fit same as that of predicting DTMB5415, which indicates that the
the long complex time series data and has higher prediction accuracy robustness of TPA-Bi-DRRNN is extremely high; the error value is
compared to the model based on unidirectional connection. significantly lower than that of other models, and its distribution range
is smaller; in contrast to the other models, the percentage error distri­
3.3.4. Validation test of the robustness of TPA-Bi-DRRNN bution range of LSTM is too wide, being concentrated in the 8%–12%
To further verify the robustness of the TPA-Bi-DRRNN, the container range, and the percentage error of Bi-DRRNN and TPA-DRRNN are
ship: KCS, which has major difference in terms of its main parameters concentrated in the 7%–9% and 5%–8% range, respectively, both of
from DTMB5415 is taken as the experimental object to conduct the which considerably are wider than that of TPA-Bi-DRRNN. The above
robustness test of TPA-Bi-DRRNN, the model setting is consistent with results demonstrate that the accuracy of TPA-Bi-DRRNN can still be
Table 3. The main parameters of KCS are presented in Table 7. maintain at an extremely high level when predicting the motion of KCS,

16
N. Gao et al. Ocean Engineering 292 (2024) 116528

proving that it has strong robustness. China (52301311); Fundamental Research Funds for the Central Uni­
In summary, the prediction accuracy of TPA-Bi-DRRNN under versities (3132023516); Fundamental Research Funds for Liaoning
different sea conditions and for different navigation angles is signifi­ Provincial Department of Education (LJKMZ20220365).
cantly higher than that of the TPA-DRRNN, Bi-DRRNN, and LSTM
models. The advantage of the former is more evident as the increase in Appendix A. Supplementary data
data prediction difficulty; its accuracy of it under different working
conditions is basically the same and can be maintained at an extremely Supplementary data to this article can be found online at https://doi.
high level over the entire period. When predicting the motion of KCS, org/10.1016/j.oceaneng.2023.116528.
the error of TPA-Bi-DRRNN is basically the same as that in predicting
DTMB5415, which is obviously better than the other models; therefore, References
its robustness is demonstrated. The above all prove the feasibility, val­
idity, and robustness of TPA-Bi-DRRNN. Cao, J., Zhuang, J.Y., Xu, F., Yin, J.C., Zou, Z.J., Yu, H., Xiao, T., Yang, L.C., 2015.
Parametric estimation of ship maneuvering motion with integral sample structure for
identification. Appl. Ocean Res. 52, 212–221.
4. Conclusion Duan, W.Y., Huang, L.M., Han, Y., Zhang, Y.H., Huang, S., 2015. A hybrid AR-EMD-SVR
model for the short-term prediction of non-linear and non-stationary ship motion.
J. Zhejiang Univ. - Sci. 16 (7), 562–576.
In this article, a ship motion prediction model based on improved Geng, X.Y., Li, Y.B., Sun, Q., 2023. A novel short-term ship motion prediction algorithm
empirical mode decomposition (IEMD), dynamic adaptive beetle based on EMD and adaptive PSO–LSTM with the sliding window approach. J. Mar.
antennae search algorithm (DSBSAS), and dynamic bidirectional resid­ Sci. Eng. 11 (3), 466.
Guan, B.L., Yang, W., Wang, Z.B., Tang, Y.G., 2018. Ship roll motion prediction based on
ual recurrent neural network (DRRNN) is proposed. The results of the ℓ1 regularized extreme learning machine. PLoS One 13 (10), e0206476.
experiments indicate that the IEMD solves the problem of mode mixing Guo, X.X., Zhang, X.T., Lu, W.Y., Tian, X.L., Li, X., 2022. Real-time prediction of 6-DOF
between IMFs, the frequency characteristics and noise in the original motions of a turret-moored FPSO in harsh sea state. Ocean Eng. 265, 112500.
Gupta, P., Rasheed, A., Steen, S., 2022. Ship performance monitoring using machine-
signal are accurately separated, which improves the SNR of IMFs and
learning. Ocean Eng. 254, 111094.
significantly reduces their prediction difficulty of IMFs; the optimization Huang, N.E., Sheng, Z., Long, S.R., Wu, M.C., Shih, H.H., Zheng, Q.A., Yen, N.C., Tung, C.
efficiency of the DABSAS algorithm on unimodal function, multimodal C., Liu, H.H., 1998. The empirical mode decomposition and the Hilbert spectrum for
function and TPA-Bi-DRRNN is substantially higher than that of the non-linear and nonstationary time series analysis. Proc. Math. Phys. Eng. Sci. 454
(1971), 903–995.
traditional algorithms, meaning that it successfully avoids TPA-Bi- Jiang, H., Duan, S.L., Huang, L.M., Han, Y., Yang, H., Ma, Q.W., 2020. Scale effects in AR
DRRNN falling into the local optimum which can lead it to premature model real-time ship motion prediction. Ocean Eng. 203, 107202.
convergence; the TPA-Bi-DRRNN can maintain extremely high accuracy Kaplan, P., 1969. A study of prediction techniques for aircraft carrier motions at sea.
J. Hydronautics 3 (3), 121–131.
over the entire period even under the extremely rough sea conditions, Li, M.W., Xu, D.Y., Geng, J., Hong, W.C., 2022. A hybrid approach for forecasting ship
and the precision under different working conditions is basically the motion using CNN–GRU–AM and GCWOA. Appl. Soft Comput. 114, 108084.
same; the error of the TPA-Bi-DRRNN when predicting different ships’ Lin, J.F., Han, Y., Guo, C.Y., Su, Y.M., Zhong, R.F., 2022. Intelligence ship anti-rolling
control system based on a deep deterministic policy gradient algorithm and the
motion can be maintained at an extremely low level, which proves it has Magnus effect. Phys. Fluids 34 (5), 057102.
strong robustness. The results of all the experiments indicate that the Liu, X., Yuan, H.W., Xiao, C.S., Wang, Y.F., Yu, Q., 2022. Hybrid-driven vessel trajectory
TPA-Bi-DRRNN solves the problems of insufficient predictive accuracy, prediction based on uncertainty fusion. Ocean Eng. 248, 110836.
Luo, W.L., Zou, Z.J., 2009. Parametric identification of ship maneuvering models by
low robustness, and slow calculation speed in many previous studies, using support vector machine. J. Ship Res. 53 (1), 19–30.
and realises the accurate and stable prediction of ship motion attitude Ma, J., Jia, C.F., Shu, Y.Q., Liu, K.Z., Zhang, Y., Hu, Y.L., 2021. Intent prediction of
under harsh sea conditions in real-time. Finally, this study should help vessels in intersection waterway based on learning vessels motion patterns with
early observations. Ocean Eng. 232, 109154.
reduces the risk of navigation, which is of great engineering significance.
Mu, X.K., Yue, G., Zhou, Nan, Chen, C.C., 2022. Occupancy grid-based AUV slam method
In future work, to further improve the performance of the model, more with forward-looking sonar. J. Mar. Sci. Eng. 10 (8), 1056.
environmental factors will be used as the input variables, and the Peng, X.Y., Zhang, B., Rong, L.H., 2019. A robust unscented Kalman filter and its
filtering algorithm will be further improved to reduce prediction application in estimating dynamic positioning ship motion states. J. Mar. Sci.
Technol. 24 (4), 1265–1279.
difficulty. Sivaraj, S., Rajendran, S., Prasad, L.P., 2022. Data driven control based on Deep Q-
Network algorithm for heading control and path following of a ship in calm water
CRediT authorship contribution statement and waves. Ocean Eng. 259, 111802.
Song, C.Y., Zhang, X.K., Zhang, G.Q., 2022. Attitude prediction of ship coupled heave-
pitch motions using non-linear innovation via full-scale test data. Ocean Eng. 264,
Nan Gao: Conceptualization, Methodology, Writing – original draft, 112524.
Validation, Formal analysis, Data curation. Zhenju Chuang: Software, Wang, X.Y., Tong, M., Du, L., 2018. Multi-step prediction AR model of ship motion based
on constructing and correct error. In: IEEE, CSAA Guidance, Navigation and Control
Writing – review & editing, Visualization, data presentation. Ankang Conference, Xiamen, China.
Hu: Supervision, Project administration. Wei, Y.Y., Cheng, Z.Z., Zhao, C., Chen, X., Yang, R., He, J.H., Zhang, C.Y., Wu, S.T., 2022.
Deterministic and probabilistic ship pitch prediction using a multi-predictor
integration model based on hybrid data preprocessing, reinforcement learning and
Declaration of competing interest improved QRNN. Ocean Eng. 54, 101806.
Yin, J.C., Zou, Z.J., Xu, F., Wang, N.N., 2014. Online ship roll motion prediction based on
The authors declare that they have no known competing financial grey sequential extreme learning machine. Neurocomputing 129, 168–174.
Yin, J.C., Perakis, A.N., Wang, N., 2018. A real-time ship roll motion prediction using
interests or personal relationships that could have appeared to influence
wavelet transform and variable RBF network. Ocean Eng. 160, 10–19.
the work reported in this paper. Zheng, J., Yan, D.W., Yan, M., Li, Y., Zhao, Y.B., 2022. An unscented Kalman Filter online
identification approach for a non-linear ship motion model using a self-navigation
Data availability test. Machines 10 (5), 312.
Zhu, M., Hahn, A., Wen, Y.Q., Bolles, A., 2017. Identification-based simplified model of
large container ships using support vector machines and artificial bee colony
The authors are unable or have chosen not to specify which data has algorithm. Appl. Ocean Res. 68, 249–261.
been used. Zhu, X.M., Sun, L.P., Li, B., 2020. Dynamic analysis of vessel/riser/equipment system for
deep-sea mining with RBF neural network approximations. Mar. Georesour.
Geotechnol. 38 (2), 174–192.
Acknowledgments

This research was funded by National Natural Science Foundation of

17

You might also like