﻿ 基于VMD-SSA-GRU的船舶运动姿态预测
 舰船科学技术  2022, Vol. 44 Issue (23): 60-65    DOI: 10.3404/j.issn.1672-7649.2022.23.012 PDF

Prediction of ship motion attitude based on VMD-SSA-GRU model
ZUO Si-yu, ZHAO Qiang, ZHANG Bing, PAN Meng-ting, ZHOU Meng-meng
School of Electronic Information , Jiangsu University of Science and Technology, Zhenjiang 212100, Chian
Abstract: The accurate prediction of ship motion attitude is of great significance to ship motion compensation. Therefore, a ship motion attitude prediction model based on variational modal decomposition (VMD) and sparrow search algorithm (SSA) to optimize the gated recurrent unit (GRU) is proposed. Firstly, the ship motion attitude data is decomposed into several eigenmode components by VMD, Then, the ssa-gru prediction model is established for each eigenmode component to predict, and finally the prediction results are accumulated. Through the verification of the ship motion attitude data simulated by the real ship, the experiment shows that the prediction accuracy of this prediction model is improved compared with ssa-gru and Gru prediction models, and the effectiveness of this prediction model in the prediction of ship motion attitude data is verified.
Key words: ship motion attitude prediction     variational mode decomposition     sparrow search algorithm     gated recurrent unit
0 引　言

1 变分模态分解 1.1 基本原理

1.2 VMD求解步骤

 $\begin{array}{*{20}{c}} {{{\min }_{\left\{ {{u_k}} \right\},\left\{ {{\omega _k}} \right\}}}\left\{ {\displaystyle\sum\limits_k {\left\| {{\partial _t}\left[ {\left( {\delta (t) + \dfrac{j}{{\text{π} t}}} \right)*{u_k}(t)} \right]{e^{ - j{\omega _k}t}}} \right\|} _2^2} \right\}} \text{。}\\ {{\text{ s}}{\text{.t}}{\text{. }}\displaystyle\sum\limits_k {{u_k}} = f} \end{array}$ (1)

 $\begin{array}{*{20}{c}} {\mathcal{L}\left( {\left\{ {{u_k}} \right\},\left\{ {{\omega _k}} \right\},\lambda } \right): = \alpha \mathop \sum \limits_k \left\| {{\partial _t}\left[ {\left( {\delta (t) + \dfrac{j}{{\text{π} t}}} \right) * {u_k}(t)} \right]{e^{ - j{\omega _k}t}}} \right\|_2^2} +\\ { \left\| {f(t) - \mathop \sum \limits_k {u_k}(t)} \right\|_2^2 + \left\langle {\lambda (t),f(t) - \mathop \sum \limits_k {u_k}(t)} \right\rangle }\text{。}\\[-18pt] \end{array}$ (2)

 $u_k^{n + 1} \leftarrow \mathop {\arg \min }\limits_{{u_k}} \mathcal{L}\left( {\left\{ {u_{i < k}^{n + 1}} \right\},\left\{ {u_{i \geqslant k}^n} \right\},\left\{ {\omega _i^n} \right\},{\lambda ^n}} \right)\text{，}$ (3)
 $\omega _k^{n + 1} \leftarrow \mathop {\arg \min }\limits_{{\omega _k}} \mathcal{L}\left( {\left\{ {u_i^{n + 1}} \right\},\left\{ {\omega _{i < k}^{n + 1}} \right\},\left\{ {\omega _{i \geqslant k}^n} \right\},{\lambda ^n}} \right) \text{，}$ (4)
 ${\lambda }^{n+1}\leftarrow {\lambda }^{n}+\tau \left(f-\sum _{k}{u}_{k}^{n+1}\right) \text{，}$ (5)
 $\sum _{k}{u}_{k}^{n+1}-{u}_{k}^{n}{}_{2}^{2}/{u}_{k}^{n}{}_{2}^{2} < \varepsilon \text{。}$ (6)

 ${\widehat{u}}_{k}^{n+1}(\omega )=\dfrac{\widehat{f}(\omega )-\displaystyle\sum _{i\ne k}{\widehat{u}}_{i}(\omega )+\dfrac{\widehat{\lambda }(\omega )}{2}}{1+2\alpha {\left(\omega -{\omega }_{k}\right)}^{2}}\text{，}$ (7)
 ${\omega }_{k}^{n+1}=\dfrac{{\displaystyle\int }_{0}^{\infty }\omega {\left|{\widehat{u}}_{k}(\omega )\right|}^{2}{\rm{d}}\omega }{{\displaystyle\int }_{0}^{\infty }{\left|{\widehat{u}}_{k}(\omega )\right|}^{2}{\rm{d}}\omega }\text{。}$ (8)
2 SSA-GRU 2.1 麻雀搜索算法

 $X_{ij}^{t + 1} = \left\{ {\begin{array}{*{20}{c}} {X_{i,j}^t \cdot \exp \left(\dfrac{{ - i}}{{\alpha \cdot ite{r_{\max }}}}\right)}\text{，}&{{\text{if }}{R_2} < ST}\text{，} \\ {X_{i,j}^t + Q \cdot L}\text{，}&{{\text{if }}{R_2} \geqslant ST} \text{。} \end{array}} \right.{\text{ }}$ (9)

${R}_{2}$ < $ST$ ，这意味着没有捕食者，生产者进入广泛搜索模式。如果 ${R}_{2}$ $ST$ ，说明麻雀发现了捕食者，所有的麻雀需要迅速另一个安全区域。

 $X_{ij}^{t + 1} = \left\{ {\begin{array}{*{20}{c}} {Q \cdot \exp \left(\dfrac{{x_{{\rm{worst}}}^t - X_{ij}^t}}{{{\beta ^2}}}\right)}\text{，}&{{\rm{if}}{\text{ }}i > n/2}\text{，} \\ {X_p^{t + 1} + |X_{ij}^t - X_p^{t + 1}| \cdot {A^ + } \cdot L}\text{，}&{{\rm{otherwise}}} \text{。} \end{array}} \right.$ (10)

 $X_{ij}^{t + 1} = \left\{ {\begin{array}{*{20}{c}} {X_{{\text{best }}}^t + \beta \cdot\left| {X_{ij}^t - X_{{\text{best }}}^t} \right|}\text{，}&{{\text{ if }}{f_i} > {f_g}} \text{，}\\ {X_{ij}^t + K\cdot\left( {\dfrac{{\mid X_{i,j}^t - X_{{\text{worst }}}^t}}{{\left( {{f_i} - {f_w}} \right) + \varepsilon }}} \right)}\text{，}&{{\text{ if }}{f_i} = {f_g}}\text{。} \end{array}} \right.$ (11)

2.2 GRU神经网络模型

GRU是循环神经网络的一种[13]，该网络模型将长短期记忆神经网络（long-short term memory，LSTM）[14]的输入门、遗忘门、输出门改变为成更新门、重置门，使GRU只需要一个更新门就可以实现数据的遗忘和记忆，训练时间相较于LSTM缩短。LSTM通过门控机制不仅能够记忆过去的信息，并且同时可以选择性的忘记一些不重要信息以及无关信息，从而实现数据的建模。GRU在基于LSTM网络的基础上进行改动，不再保留长期序列同时也减少了梯度问题，提高了网络的训练速度。

GRU内部结构如图1所示。

 图 1 GRU内部结构图 Fig. 1 Internal structure of GRU

GRU网络的前项传播算法如下：

 ${z_t} = \sigma \left\{ {{W_z}\left[ {{h_{t - 1}},{x_t}} \right]} \right\}\text{。}$ (12)

 ${r_t} = \sigma \left\{ {{W_r}\left[ {{h_{t - 1}},{x_t}} \right]} \right\}\text{。}$ (13)

GRU不再使用单个的内存单元来存储记忆信息，而是直接利用隐藏单元记录历史状态。利用重置门 ${r_t}$ 控制当前信息和记忆信息的数据量，并生成新的记忆信息继续向前传递。

 ${\bar h_t} = \tanh \left\{ {W\left[ {{r_r}{h_{t - 1}},{x_t}} \right]} \right\} \text{。}$ (14)

 ${h_t} = \left( {1 - {z_t}} \right){h_{t - 1}} + {z_t}{\bar h_t} \text{。}$ (15)

2.3 SSA-GRU流程

 图 2 数据散点图 Fig. 2 Scatter diagram of ship data
3 VMD-SSA-GRU船舶运动姿态预测模型

 图 3 VMD分解结果 Fig. 3 VMD decomposition results
4 基于船舶运动姿态数据的预测

 图 4 数据散点图 Fig. 4 Scatter diagram of ship data

4.1 VMD分解

 图 5 VMD分解结果 Fig. 5 VMD decomposition results

 图 6 EMD分解结果 Fig. 6 EMD decomposition results

 ${x^\prime } = {\dfrac{{x - \min (x)}}{{\max (x) - \min (x)}}_t}\text{。}$

4.2 初始化

 ${\text{RMSE}} = \sqrt {\dfrac{{\displaystyle\sum\limits_{i = 1}^n {{{\left( {{x_i} - {{\hat x}_i}} \right)}^2}} }}{n}} \text{，}$
 $MAE = \frac{1}{n}\mathop \sum \limits_{i = 1}^n \left| {{{\hat x}_i} - {x_i}} \right| \text{。}$
4.3 结果及分析

 图 7 预测结果 Fig. 7 Prediction results

5 结　语

 [1] 翁震平, 顾民, 刘长德. 基于二阶自适应Volterra级数的船舶运动极短期预报研究[J]. 船舶力学, 2010, 14(7): 732-740. [2] 彭秀艳, 赵希人, 高奇峰. 船舶姿态运动实时预报算法研究[J]. 系统仿真学报, 2007(2): 267-271. [3] NOVRI, SUHERMI, SUHARTONO, et al. Roll motion prediction using a hybrid deep learning and ARIMA model[J]. Procedia Computer Science, 2018, 144: 251-258. DOI:10.1016/j.procs.2018.10.526 [4] 沈继红. 灰色系统理论预测方法研究及其在舰船运动预报中的应用[D]. 哈尔滨: 哈尔滨工程大学, 2002 [5] YIN J C, ZOU Z J, FENG X. On-line prediction of ship roll motion during maneuvering using sequential learning RBF neuralnetworks[J]. Ocean Engineering, 2013, 61(Mar. 15): 139–147. [6] 王国栋, 韩斌, 孙文赟. 基于 LSTM 的舰船运动姿态短期预测[J]. 舰船科学技术, 2017, 39(7): 69-72. [7] YIN Jianchuan, PERAKIS A N, WANG Ning. A real-time ship roll motion prediction using wavelet transform and variable RBF network[J]. Ocean Engineering, 2018, 160: 10-19. DOI:10.1016/j.oceaneng.2018.04.058 [8] 杨震, 王岩, 原新. 一种分解策略的船舶横摇运动姿态在线预报方法[J]. 船舶力学, 2018, 22(8): 915-925. [9] 张彪, 彭秀艳, 高杰. 基于ELM-EMD-LSTM组合模型的船舶运动姿态预测[J]. 船舶力学, 2020, 24(11): 1413-1421. [10] 张泽国, 尹建川, 柳成. 基于自适应变异PSO-BP算法的船舶横摇运动预测[J]. 舰船科学技术, 2016, 38(23): 69-73. [11] DOMINIQUE, ZOSSO, KONSTANTIN, et al. Variational Mode Decomposition[J]. IEEE Transactions on Signal Processing A Publication of the IEEE Signal Processing Society, 2014, 62(3): 531-544. [12] XUEJ, SHEN B. A novel swarm intelligence optimization approach: sparrow search algorithm[J]. Systems Science & Control Engineering an Open Access Journal, 2020, 8(1): 22–34. [13] CHO K, MERRIENBOER B V, GULCEHRE C, et al. Learning phrase representations using RNN encoder-decoder for statistical machine translation[J]. Computer Sci-ence, 2014. [14] HOCHREITER S, SCHMIDHUBER J. Long short-term memory[J]. Neural Computation, 1997, 9(8): 1735-1780. DOI:10.1162/neco.1997.9.8.1735