1. Introduction
As a ship navigates in open waters, it becomes subject to a range of environmental elements, including winds, waves, and currents. Under certain conditions, a large roll motion will occur, which seriously threatens the navigation safety of the ship. In order to guarantee ship navigation safety at sea, precise anticipation of ships’ nonlinear roll movements is imperative. For this purpose, three kinds of method have been successively put forward [
1]. The first kind of prediction method is based on ship hydrodynamics theory. The mathematical model of roll motion is established according to ship hydrodynamics, and the damping coefficients in the mathematical model are obtained by means of model tests or CFD simulations. Hashimoto et al. [
2] and Kianejad et al. [
3] forecasted the roll motion by the motion model with the obtained damping coefficients. In order to predict the ship roll motion, Kianejad et al. [
4] used the CFD method to calculate the damping coefficients; Liu et al. [
5] used CFD to predict the parametric roll characteristics; and Chen et al. [
6] used the CFD method to establish a numerical model of ship motion coupled with fluid motion.
The second kind of prediction method is based on the time series model. By regression analysis of historical time series data of ship roll motion, time series models of ship roll motion in waves was used to predict ship roll motion. Jiang et al. [
7] and Selvaraj et al. [
8] used the auto-regressive model (AR model) and auto-regressive integrated moving average model (ARIMA model) to predict ship roll motion, respectively. The third kind of prediction method is the data-driven prediction method based on machine learning techniques. By means of machine learning algorithms, the inherent mechanism of ship roll motion is learned from the collected mass of ship roll motion data, and the nonparametric black-box model of ship roll motion is constructed. For example, Yin et al. [
9] and Huang et al. [
10] applied the variable structure RBF neural network and wavelet neural network to predict ship roll motion, respectively. Chen et al. [
11] applied the support vector machine to identify the mathematical model of ship roll motion in shallow water. Suhermi et al. [
12] combined the deep forward neural network and ARIMA model to predict ship roll motion.
In recent years, deep neural networks have been applied to solve pattern recognition, function fitting, etc. Xue et al. [
13] applied the convolutional neural network to pattern recognition. Belomestny et al. [
14] applied deep neural networks to approximate the nonlinear function and its derivatives simultaneously. Rithani et al. [
15] discussed the benefits and drawbacks of various deep neural networks for big data analysis. The most common deep neural networks include deep recurrent neural network (RNN) and convolutional neural network (CNN). In contrast to the traditional RNN, the long-short-term memory (LSTM) neural network, a derivative of RNN, reduces the risk of gradient explosion/disappearance during neural network training. Hochreiter et al. [
16] achieved this by incorporating an architecture comprising input gate, forgetting gate, output gate, and state storage unit, which effectively regulates neuron states. In the field of ship motion attitude prediction, machine learning has a stronger ability to extract complex nonlinear features and map them to output, compared with mathematical models and statistical models. Therefore, it was applied to predict ship motion by some researchers. Huang et al. [
10] established a ship roll motion prediction model, which fully utilizes the fitting ability of conventional neural networks. Zhang et al. [
17], Zhang et al. [
18] and Wei et al. [
19] conducted prediction studies on ship roll motion by the LSTM neural network, respectively. Jiang et al. [
20] applied the LSTM neural network to a non-parametric identification model and prediction of ship maneuvering motion. Wang et al. [
21] proposed a ship roll angle prediction method based on bidirectional long short-term memory network and temporal pattern attention mechanism combined deep learning model to improve the accuracy of ship roll angle prediction. Sun et al. [
22] combined LSTM and Gauss process regression technology to predict ship roll motion and pitch motion, respectively. However, there is relatively little research using convolutional neural network to predict ship roll motion in waves. Further validation is required to assess the effectiveness and robustness of ship roll motion prediction technology by using deep neural networks.
In this paper, CNN is used to predict ship roll motion in the short term. Firstly, CNN is used to predict the free roll decay motion in still water. Secondly, the roll motion in regular waves is predicted by CNN. Thirdly, the roll motion excited by six different irregular wave spectra are respectively simulated, and then the simulation data are learned by CNN. To demonstrate the prediction effect, the prediction results of CNN are compared with that of the LSTM neural network. Through this study, it can be found that the CNN model can predict complex nonlinear phenomena through reasonable training. In addition, the method is not limited by the physical model and has strong prediction performance.
2. Convolutional Neural Network
Convolutional neural network (CNN) is a kind of deep feed-forward neural network, including convolutional computation, and is used especially to process data, similarly to grid structures. By using the gradient descent method, CNN realizes layer-by-layer reverse adjustment of the weight parameters in the network. The prediction accuracy of CNN is improved by iterative training. At present, several deep learning models based on convolutional neural networks, such as AlexNet [
23], VGG [
24], GoogLeNet [
25] and ResNet [
26] have been proposed successively and have been widely used in image processing and pattern recognition.
Typically, three types of neuron layers, convolutional layer, pooling layer and fully connected layer, together make up the CNN structure. It extracts data features through multi-level nonlinear modules, connects adjacent nodes of the same level through convolution calculation, and carries out feature extraction step by step from low level to high level, so as to construct complex features with multiple levels of abstraction.
Figure 1a depicts the computational principle of CNN. The convolution kernel of CNN slides on the time series data. Since the data it processes each time is in a time window, instead of the data at a certain moment, CNN can extract the changing relationship of the sequence data reflected in the time dimension.
Figure 1b simply shows the convolution operation principle of convolution kernel: the
matrix on the left is the input original data, the
matrix in the middle is the convolution kernel, and on the right is the output data. The convolution kernel is a sliding window that moves with a fixed step from left to right and from top to bottom on the original data. Each element in the convolution kernel has a fixed weight and bias. The operation rule adopted by the convolution calculation in CNN is that the original data is multiplied by the convolution kernel and then added, which is expressed as:
where
is the element whose coordinate is
in the output data of the n convolution layer;
is the element whose coordinate is
in the input data of the n − 1 convolution layer;
k is the number of channels;
w is the width of the convolution kernel;
h is the height of the convolution kernel;
s is the convolution step;
is the bias parameter of the n convolution layer;
p is the number of fills;
is the width of
; and
is the height of
.
As mentioned above, the convolution kernel slides on the same layer of data and shares a set of convolution kernel parameters during data feature extraction at each position, meaning that the CNN model features sparse connections and parameter sharing. Compared with the fully connected neural network, the number of parameters of CNN is greatly reduced and the learning rate is accelerated. Moreover, the pooling layer of CNN divides the data into several regions and outputs the maximum or average value of the data in each sub-region. This approach trims the amount of data processing and retains the valuable information, and thus improves the processing efficiency and reduces overfitting. After several operations of the convolution layer and pooling layer, the output of CNN is obtained by the calculation of the fully connected layer.
When applied CNN to predict ship roll motion, the basic steps are as follows (see
Figure 2).
Firstly, based on the obtained data sample set, the training sample set and the test sample set were constructed. In this article, the data sample set was obtained by numerical simulation according to ship roll motion equation. Then, the sample set was split into the training sample set and the test sample set according to a ratio of 0.7. The first 70% of the data was the training sample set, and the last 30% of the data was the testing sample set.
Secondly, a convolutional neural network predicted model was established. Therein, the input and output dimensions of the CNN, the hyper-parameters, number of convolutional layers, pooling method, learning rate and activation function, etc., were determined in advance.
Thirdly, use the training sample set to train the established CNN model and evaluate the training result by the learning loss, and determine whether adjustment of the CNN parameters was needed.
Finally, based on the trained model, the test sample set was predicted, and the predicted error was also calculated to evaluate the predicted accuracy.
3. Roll Motion Equation of Ships
According to ship hydrodynamics, the roll motion equation of a ship in waves can be described by a second-order nonlinear differential equation:
where
is the angle of roll (rad);
is the roll moment of inertia
;
is the additional moment of inertia
;
is roll damping
;
is roll restoring moment
; and
F is the wave excitation moment
.
For the purpose of achieving precise prediction of ship roll motion, the key is to accurately determine the damping of roll motion in waves. According to Ikeda’s theory [
27], roll damping is mainly composed of friction damping, vortex damping, lift damping, wave damping and bilge keel damping. However, each part is coupled together, and it is difficult to determine each part separately in practice. To predict roll damping, it is usually expanded as a function of roll angular rate:
where
are linear or nonlinear damping coefficients. In practical applications, the nonlinear roll damping of ships is commonly represented by combining linear components with quadratic or cubic terms:
The restoring moment of ship roll is expressed as an odd function of roll angle:
where
are linear or nonlinear restoring moment coefficients:
By introducing Equations (3) and (5) into Equation (2), the rolling motion equation of a ship in waves can be written:
Perform division on both sides of Equation (6) by
, and the ship roll motion equation can be normalized as:
where
;
.
When a ship performs free roll attenuation motion in still water, the wave excitation is zero. The equation describing the free roll decay motion can be formulated as:
When a ship rolls in regular waves, the moment generated by wave excitation can be expressed as:
where
is the amplitude of wave excitation moment;
is the wave encounter frequency of ship roll motion; and
is the phase difference;
;
.
By substituting Equation (9) into rolling motion Equation (7), the equation depicting the rolling motion of a ship in regular waves can be expressed as:
As a ship navigates through irregular waves, the wave excitation moment and the roll motion are also irregular. According to the superposition principle, the irregular wave excitation can be interpreted as the cumulative effect of multiple regular wave excitations, characterized by different amplitudes, frequencies and random phases:
where
is the frequency of each component; and
is the phase of each component, uniformly distributed in the interval [0, 2π].
By substituting Equation (11) into Equation (7), the equation governing the roll motion of a ship under irregular waves can be formulated as:
5. Results and Discussion
In order to validate the applicability and effectiveness of CNN in ship roll motion prediction, it is applied to analyze free roll attenuation motion in still water, roll motion in a regular wave and roll motion in an irregular wave, respectively. Meanwhile, the learning prediction effect of convolutional neural network is compared with that of long short-term memory neural network, which is widely used at present.
5.1. Prediction of Roll Motion in Still Water
In this subsection, CNN is used to model and predict the free roll decay motion of ships in still water. The prediction results of CNN are shown in
Figure 11, and a comparison is conducted between the prediction values of CNN and those generated by LSTM neural network. The five-step prediction errors of the two neural networks are shown in
Table 5.
Table 6 shows the increase of error generated by each additional step in the multi-step forecast.
From
Figure 11, it can be concluded that CNN and LSTM can be used for short-term prediction of free roll decay motion in still water. In
Table 5, since the data for free roll attenuation at the late stage of movement is infinitely close to 0, the calculated value of the determination coefficient R
2 is too large to have practical reference significance, and not given. According to MAE, RMSE and MSE in
Table 5, it can be seen that the forecast accuracy of CNN is the same as that of LSTM neural network. The forecast error increase in
Table 6 shows that LSTM neural network has a large error increase, i.e., the multi-step forecast effect of CNN is better than that of LSTM neural network.
5.2. Prediction of Roll Motion in Regular Waves
On the basis of the obtained simulation data for the nonlinear roll motion in regular waves, the training set and test set of CNN are constructed according to the format in
Table 1 and
Table 2. The training set is employed to train CNN, and the training and learning effect is verified by the test set. At the same time, the LSTM neural network is also used to predict the roll motion. The prediction results of the test set by CNN are displayed in
Figure 10. Therein, the prediction results of CNN are shown in
Figure 12a, and the predicted results of LSTM neural network are shown in
Figure 12b.
Table 7 and
Table 8 present the predicted discrepancies between CNN and LSTM neural networks, along with the incremental changes in forecast errors at each step.
According to the above results, it can be seen that both CNN and LSTM can carry out short-term forecasts of ship roll motion in regular waves, and the forecast error increase for CNN is lower than that for LSTM, i.e., the short-term forecast effect for CNN is better than that for LSTM.
5.3. Prediction of Roll Motion in Irregular Waves
In this subsection, regarding the accuracy and applicability of CNN for prediction of the nonlinear roll motion in irregular waves, this paper applies CNN to analyze the random roll motion data excited by six irregular wave spectra, namely white noise spectrum, P-M spectrum, JONSWAP spectrum, Neumann spectrum, ITTC spectrum and dual parameter spectrum. At the same time, the LSTM neural network is also used to predict the nonlinear roll motion excited by the six irregular wave spectra, and the prediction results are compared with that of CNN.
5.3.1. Predicted Results for Roll Motion under White Noise Excitation
Using CNN and LSTM neural network to predict the nonlinear roll motion excited by the white noise spectrum, the comparison results between CNN and LSTM neural network are shown in
Figure 13. Moreover,
Table 9 and
Table 10 give the predicted errors of CNN and LSTM under white noise spectrum excitation and the error growth of each step in the five-step prediction.
Combining the prediction comparison in
Figure 13 and the predicted evaluation indicators given in
Table 9 and
Table 10, it can be founded that both models performed well under the four evaluations. The indicators of the CNN model under the four evaluations were smaller than those of the LSTM model, which illustrates that the prediction performance of CNN model is better than that of LSTM model. The error increase at each step in the five-step prediction of the CNN model is lower than that of LSTM, indicating that the CNN model has higher accuracy.
5.3.2. Predicted Results of Roll Motion under P-M Spectrum Excitation
The CNN and LSTM neural network was used to predict the nonlinear roll motion excited by the P-M spectrum, and the comparison results between CNN and LSTM neural networks are shown in
Figure 14. Moreover,
Table 11 and
Table 12 demonstrate the predicted errors of CNN and LSTM under P-M spectrum excitation and the error growth of each step in the five-step prediction.
From the prediction results in
Figure 14,
Table 11 and
Table 12, it can be seen that both models performed well under the four evaluations. The MAE, MSE and RMSE evaluation indicators of the CNN model are smaller than those of the LSTM model, and the
R2 evaluation index is close to 1, which shows that the CNN model has better prediction performance. The error increase for each step of the CNN is higher than that of the LSTM model. Therefore, the CNN model is more accurate in the short-term prediction of the roll motion excited by the P-M spectrum, and the LSTM model has higher accuracy in the long-term prediction.
5.3.3. Predicted Results of Roll Motion under JONSWAP Spectrum Excitation
Using CNN and LSTM neural network to predict the nonlinear roll motion excited by the JONSWAP spectrum, the comparison results between CNN and LSTM neural networks are shown in
Figure 15.
Table 13 and
Table 14 give the predicted errors of CNN and LSTM under JONSWAP spectrum excitation and the error growth of each step in the five-step prediction.
From
Figure 13,
Table 13 and
Table 14, it can be seen that both models performed well under the four evaluations. The MAE, MSE and RMSE evaluation indicators of the CNN model are smaller than those of the LSTM model, and there is no hysteresis in the prediction curve of the CNN model, which shows that the CNN model has better prediction performance. However, the CNN model has poor prediction results at wave peaks and troughs, indicating that the performance in complex conditions needs to be further improved.
5.3.4. Predicted Results for Roll Motion under Neuman Spectrum Excitation
Using CNN and LSTM neural networks to predict the nonlinear roll motion excited by the Neuman spectrum, the comparison results between CNN and LSTM neural network are shown in
Figure 16. Moreover, the predicted errors for CNN and LSTM under Neuman spectrum excitation and the error growth of each step in the five-step prediction are given in
Table 15 and
Table 16, respectively.
Combining the prediction results in
Figure 16 and evaluation indicators shown in
Table 15 and
Table 16, it can be discerned that both models performed well under the four evaluations. The MSE, MAE and RMSE evaluation indicators for the CNN model are smaller than those for the LSTM model, which shows that the CNN model has better prediction performance. The error increase in each step of the CNN is lower than that of the LSTM model. Therefore, the CNN model is more accurate in the short-term prediction of the roll motion excited by the Neuman spectrum.
5.3.5. Predicted Results of Roll Motion under ITTC Spectrum Excitation
The nonlinear roll motion excited by the ITTC spectrum was predicted by using CNN and LSTM neural networks, and the comparison results between CNN and LSTM neural network are shown in
Figure 17.
Table 17 and
Table 18 give the forecast errors for CNN and LSTM under ITTC spectrum excitation and the error growth for each step in the five-step prediction.
From
Figure 17,
Table 17 and
Table 18, it can be discerned that the prediction curves of the CNN and LSTM models are close to the real curves and basically consistent with the trend of the real curves. Both models performed well under the four evaluations. The MSE and RMSE evaluation indicators for the CNN model are smaller than those for the LSTM model, which shows that the CNN model has better prediction performance.
5.3.6. Predicted Results of Roll Motion under Double-Parameter Spectrum Excitation
The nonlinear roll motion excited by the double-parameter spectrum was predicted by, respectively, using the CNN and LSTM neural networks, and the comparison results between CNN and LSTM neural networks are shown in
Figure 18. Moreover, the predicted errors for CNN and LSTM under double-parameter spectrum excitation and the error growth for each step in the five-step prediction are given in
Table 19 and
Table 20, respectively. From
Figure 18,
Table 19 and
Table 20, it can be clearly seen that both models performed well under the four evaluations. It can be seen from the evaluation index that the performance of the LSTM model is better than that of the CNN model. The CNN model’s short-term accuracy in predicting the roll motion under double-parameter spectrum excitation is lower than that of the LSTM model, but it can still meet expectations.
Through the above analysis, it can be seen that CNN can achieve accurate prediction of roll motion through learning from the simulation data under external excitation of six irregular spectra, respectively. Moreover, the comparison results demonstrate that CNN has the same prediction precision as that of LSTM neural network. Considering that, in the field of ship motion prediction, irregular waves are mainly approximated by the above six irregular wave spectra, the research results may demonstrate that CNN can be used to predict the nonlinear roll motion in the short term at sea.
6. Conclusions
In this study, CNN is applied to predict the roll motion of ships in the short term. In order to validate the applicability and effectiveness of CNN in the prediction of ship roll motion, free roll decay motion in still water, roll motion in regular waves, and irregular roll motion under excitations of six different wave spectra are predicted, respectively. Meanwhile, the prediction results of CNN are compared with those of LSTM neural network. The comparison results demonstrate that CNN can be applied to predict the roll motion accurately, and it has the same prediction accuracy as that of LSTM neural network. With reasonable training, the model can predict complex nonlinear phenomena. Moreover, this method is not limited by the physical model and has strong prediction performance.
In the present study, only the simulated historical data of ship roll motion is considered as the learning samples set. However, the ship usually suffers from six degree of freedom oscillating motion during navigation, and the measured historical motion data is contaminated by different levels of noise. The efficiency and robustness of the proposed prediction model can be improved by incorporating more useful information. In this paper, the authors focused on the application of CNN to the analysis of ship real multi-freedom measurement data.