﻿ 基于神经网络和随机森林的船舶横摇预测
 舰船科学技术  2022, Vol. 44 Issue (9): 75-78    DOI: 10.3404/j.issn.1672-7649.2022.09.015 PDF

Research on ship roll prediction based on neural network and random forest
LI Jia-meng, CHEN Shao-hua, KANG Qian-ze
Dalian Jiaotong University, Automation and Electrical Engineering College, Dalian 116028, China
Abstract: In this paper, a random wave model is established based on the analysis of wave energy spectrum, wave inclination spectrum, effective wave inclination spectrum and ship force movement, aiming at the ship's rolling movement in the waves. Simulation experiments are carried out on the wave inclination, effective wave inclination and ship's rolling movement through Matlab. According to the experimental data, BP neural network, random forest and fusion prediction method are used to simulate and predict the ship's roll motion, through the comparative analysis of actual ship roll and prediction results, it is concluded that the combined prediction method of BP neural network and random forest is more accurate. The simulation experiment analysis lays the foundation for ship roll prediction control and ship stability platform control.
Key words: angle of ship roll     random wave     prediction model     random forest     BP neural network
0 引　言

1 随机海浪和船舶横摇模型

1.1 随机海浪模型

 $S(\omega ) = \frac{{ A}}{{{\omega ^5}}}\exp \left( - \frac{B}{{{\omega ^4}}}\right)。$ (1.1)

 $\zeta (t){\text{ = }} \sum\limits_{i = 1}^\infty {\sqrt {2Sa({\omega _i})\Delta {\omega _i}} } \cos ({\omega _i}t + {\varepsilon _i})，$ (1.2)

 ${\alpha _0}{{(t) = }} \frac{{{\omega ^2}}}{g}\sum\limits_{i = 1}^\infty {\sqrt {2Sa({\omega _i})\Delta {\omega _i}} } \cos ({\omega _i}t + {\varepsilon _i})。$ (1.3)

 ${{\textit{K}}_{\text{1}}}{\text{ = }}\exp \left( - \frac{{kd}}{2}\right)，$ (1.4)
 ${{\textit{K}}_{\text{2}}}{\text{ = }}1{ - }\sqrt {{C_W}{{\left(\frac{B}{\lambda }\right)}^2}}。$ (1.5)

 ${\alpha _{e0}}{\textit{(t)}}= {{\textit{K}}_{\text{1}}}{{\textit{K}}_{\text{2}}}{\alpha _0} = {{\textit{K}}_{\text{1}}}{{\textit{K}}_{\text{2}}}\frac{{{\omega ^2}}}{g}\sum\limits_{i = 1}^\infty {\sqrt {2Sa({\omega _i})\Delta {\omega _i}} } \cos ({\omega _{ei}}t + {\varepsilon _i})。$ (1.6)

 图 1 海浪波能谱 Fig. 1 Wave energy spectrum of ocean waves

 图 2 海浪波倾角 Fig. 2 Wave inclination angle
1.2 船舶横摇模型

 $({J_\theta }{\text{ + }}\Delta {J_\theta })\frac{{{{\rm{d}}^2}\theta }}{{{\rm{d}}{t^2}}} + 2{N_\theta }\frac{{{\rm{d}}\theta }}{{{\rm{d}}t}} + Dh\theta = {M_\theta }。$ (1.7)

 ${M_\theta } = \Delta {J_\theta }\frac{{{{\rm{d}}^2}{\alpha _{e0}}}}{{{\rm{d}}{t^2}}} + 2{N_\theta }\frac{{{\rm{d}}{\alpha _{e0}}}}{{{\rm{d}}t}} + Dh{\alpha _{e0}}，$ (1.8)

 $G(s) = \frac{{\theta (s)}}{{{\alpha _{e0}}(s)}} = \frac{{{\omega _\theta }^2\left(\dfrac{{\Delta {J_\theta }}}{{Dh}}{s^2} + \dfrac{{2{\zeta _\theta }}}{{{\omega _\theta }}}s + 1\right)}}{{{s^2} + 2{\zeta _\theta }{\omega _\theta }s + {\omega _\theta }^2}}。$ (1.9)

 图 3 船舶横摇角 Fig. 3 Ship roll angle
2 基于多模型融合的预测

2.1 BP神经网络预测

BP神经网络作为当下广泛应用的神经网络模型之一，是一种通过误差逆传播算法训练的多层前馈网络。应用最速下降法作为其学习规则，在训练时权值和阈值会通过反向传播不断调整促使得到最小的网络的误差平方和[5]。针对BP神经网络预测，本文选取1500个船舶横摇随时间变化的历史数据，其中训练集用前1000个数据作为样本，测试集用后500个数据作为样本。其预测仿真结果如图4所示。

 图 4 BP神经网络预测 Fig. 4 BP neural network prediction
2.2 随机森林预测

 图 5 随机森林预测 Fig. 5 Random forest prediction
2.3 多模型组合预测

 $\begin{split} & {y_1}(x) = func1(x)，\\ & {y_2}(x) = func2(x)。\end{split}$ (2.1)

 $yC{\text{omb}}(x){\text{ = }}\sum\limits_{i = 1}^2 {w(i)yi(x)}，$ (2.2)

 $\sum\limits_{i = 1}^2 {w(i)} {\text{ = 1}}。$ (2.3)

 ${\min }\;\;E{\text{mse = }}\dfrac{1}{m}\displaystyle\sum\limits_{k = 1}^m \left[\displaystyle\sum\limits_{i = 1}^n w(i)yi(x{\rm{cross}}^k) - y{\rm{real}}(x{\rm{cross}}^k)\right]^2。$ (2.4)

 图 6 融合算法预测 Fig. 6 Fusion algorithm prediction

3 结　语

 [1] 刘鹏, 籍艳, 漆随平, 等. 基于MATLAB的海浪及船舶横摇仿真模型研究[J]. 山东科学, 2012, 25(6): 87-89. [2] 张文桥. 动态海浪建模与仿真的关键技术研究[D]. 哈尔滨: 哈尔滨工程大学, 2017. [3] 夏义. 船舶横摇运动仿真与减摇鳍控制系统的研究[D]. 大连: 大连海事大学, 2015. [4] NOVRI S, SUHARTONO, DEDY D P, et al. Roll motion prediction using a hybrid deep learning and ARIMA model[J]. Procedia Computer Science, 2018, 144. [5] 孙珊珊. 小波神经网络舰船运动受扰力预测模型[J]. 舰船科学技术, 2021, 43(8): 4-6. [6] 方匡南, 吴见彬, 朱建平, 等. 随机森林方法研究综述[J]. 统计与信息论坛, 2011, 26(3): 32-38. DOI:10.3969/j.issn.1007-3116.2011.03.006 [7] 王明瑞. 大型舰船运动交互预测中的多维度AR算法研究与仿真[J]. 舰船科学技术, 2021, 43(4): 10-12. [8] 李建平. 数据挖掘的高动态范围船舶横摇预测[J]. 舰船科学技术, 2018, 40(20): 20-22.