Real-Time Prediction of Ship Motion Based On Improved Empirical Mode Composition and Dynamic Residual Neural Network
Real-Time Prediction of Ship Motion Based On Improved Empirical Mode Composition and Dynamic Residual Neural Network
Ocean Engineering
journal homepage: www.elsevier.com/locate/oceaneng
Research paper
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.
* 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
3
N. Gao et al. Ocean Engineering 292 (2024) 116528
( ) ( )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
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
mt = ((1 − Zt ) ⋅ ht− 1 + Zt ⋅ ̃
ht ) ∗ WP (23)
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.
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.
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. 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
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.
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
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
14
N. Gao et al. Ocean Engineering 292 (2024) 116528
Fig. 20. Error distribution of the prediction value of the four models.
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
17