Ship rolling motion extremely-short-term forecasting method based on whale algorithm optimized BP neural network

The parameters of the BP neural network are optimized through the whale optimization algorithm, and the local optimal solution and initial weight sensitivity problems of traditional BP neural networks in ship roll motion prediction are solved, which achieves higher prediction accuracy and faster convergence speed, and improves the accuracy and stability of ship motion prediction.

CN120509111APending Publication Date: 2025-08-19LUDONG UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510602086.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

Traditional BP neural networks are prone to fall into local optimal solutions in ship roll motion prediction, have a long training time and are sensitive to initial weights, which affects prediction accuracy and efficiency.

Method used

The Whale Optimization Algorithm (WOA) is used to optimize the parameters of the BP neural network, combine the efficient global search ability of the whale algorithm, optimize network weights and biases, and build a WOA-BP model to improve prediction accuracy and convergence speed.

Benefits of technology

It effectively avoids local optimal solutions, reduces sensitivity to initial weights, improves the accuracy and training efficiency of ship roll motion prediction, and provides new theoretical basis and technical support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509111A_ABST
    Figure CN120509111A_ABST
Patent Text Reader

Abstract

The invention discloses a ship rolling motion extremely-short-term forecasting method based on a whale algorithm optimized BP neural network, and relates to the field of ship safety. Comprising the following steps: acquiring ship rolling motion data as sample data, and performing normalization processing; constructing a multilayer feedforward BP neural network model, and optimizing parameters of the BP neural network model by using a whale optimization algorithm to obtain a WOA-BP model; training the WOA-BP model by using the sample data until the prediction precision is met; and carrying out extremely short-term forecasting on the ship rolling motion by using the trained model. According to the method, the precision of ship rolling motion prediction is improved, and a new theoretical basis and technical support are provided for ship motion prediction and control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of ship safety, and more particularly to an extremely short-term prediction method for ship rolling motion based on a whale algorithm-optimized BP neural network. Background Art

[0002] Predicting ship roll motion is a key research topic in marine engineering and ship design. It has a crucial impact on ship safety, economy, and crew comfort. While sailing at sea, ships are affected by a variety of factors, such as waves, current velocity, the ship's structure, and operation. These factors combine to cause the ship to roll. Accurately predicting a ship's roll motion, especially in adverse sea conditions, can help crew members accurately understand the ship's future motion characteristics and take appropriate emergency measures, significantly improving ship safety.

[0003] Existing methods for predicting ship roll motion primarily include analytical methods based on mathematical models, empirical formulas, and data-driven machine learning. Analytical methods rely on theories of ship dynamics and fluid mechanics to construct mathematical models to predict ship motion. While these methods have a strong theoretical foundation, the models are often complex and difficult to adapt to the variability of the actual marine environment. Empirical formulas, which analyze historical data to establish empirically based prediction models, are simple and easy to implement, but their accuracy is limited by data quality and the generalizability of the empirical formulas.

[0004] In recent years, with the development of big data and machine learning technologies, data-driven machine learning methods, particularly neural network-related technologies, have been widely applied to ship motion prediction due to their powerful data processing and pattern recognition capabilities, achieving remarkable results. However, traditional BP (Back Propagation) neural networks are prone to problems in ship roll prediction, such as long training time, random weight and bias initialization, and a tendency to fall into local optimal solutions. These issues limit the effectiveness of these neural networks in ship roll prediction. Summary of the Invention

[0005] In view of this, the present invention provides an extremely short-term prediction method for ship roll motion based on the whale algorithm to optimize the BP neural network. On the basis of the traditional BP neural network, the efficient global search capability of WOA is integrated to optimize the network parameters, thereby improving the accuracy and convergence speed of the prediction. The innovation of the WOA-BP model is that it not only utilizes the efficient global search capability of the whale optimization algorithm to optimize the parameters of the BP neural network, but also optimizes the BP neural network through the whale algorithm to train and predict the ship roll motion. This process effectively circumvents the problem that the traditional BP neural network is prone to falling into the local optimal solution during the training process, and at the same time reduces the sensitivity to the initial weight setting. The optimization strategy of WOA enables the network to quickly converge to the optimal learning parameter combination. This method not only improves the accuracy of ship roll motion prediction, but also provides a new theoretical basis and technical support for ship motion prediction and control.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] A method for extremely short-term prediction of ship rolling motion based on a BP neural network optimized by a whale algorithm comprises the following steps:

[0008] Obtain the ship's rolling motion data as sample data and perform normalization processing;

[0009] A multi-layer feedforward BP neural network model is constructed, and the parameters of the BP neural network model are optimized using the whale optimization algorithm to obtain the WOA-BP model;

[0010] The WOA-BP model is trained using sample data until the prediction accuracy is met;

[0011] Use the trained model to make very short-term forecasts of ship rolling motion.

[0012] Optionally, the sample data includes roll angle, roll angular velocity, and roll angular acceleration.

[0013] Optionally, the normalized expression is as follows:

[0014]

[0015] Among them, X * represents the normalized result of the data; X refers to the original form of the data; and x min with x max They correspond to the minimum and maximum values in the original data set, respectively.

[0016] Alternatively, the whale optimization algorithm simulates the hunting behavior of humpback whales and uses three strategies: encirclement, spiral ascent, and random search to find the global optimal weight and bias.

[0017] Optionally, the BP neural network model includes an input layer, a hidden layer, and an output layer, and the number of neurons and the hidden layer are set.

[0018] Optionally, 70% of the samples in the training group of the sample data are used to train the network, and 30% of the samples are used as a validation group to independently test the performance of the trained network; the network is debugged according to the error, wherein the training rule adopts the Levenberg-Marquardt algorithm, and the BP neural network model and the WOA-BP model are constructed using the Matlab environment, and the number of neurons is set to 10 and the hidden layer is set to 5 layers; in the model training, the Adam optimization algorithm is selected, the learning rate is set to 0.1, and the maximum training cycle is specified to be 1000 rounds.

[0019] Optionally, in the initial settings of the whale optimization algorithm: the number of whales is set to 50, the number of iterations is capped at 100, and the position of each whale is limited to the interval [-3, 3]; the whale optimization algorithm is used to optimize the search process of the BP neural network.

[0020] The above technical solution demonstrates that, compared to existing technologies, this invention provides a very short-term prediction method for ship roll motion based on a BP neural network optimized with a whale algorithm. By simulating the feeding behavior of humpback whales, the WOA algorithm employs three strategies: encirclement, spiral ascent, and random search. This effectively searches the parameter space to find the global optimal weights and biases, and combines this with the BP neural network to improve the model's prediction accuracy and convergence speed. The WOA-BP algorithm can quickly find the global optimal solution, reducing training time and improving training efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0022] Figure 1 It is a schematic diagram of the algorithm flow of the present invention;

[0023] Figure 2 The geometric structure diagram of the ship in the AQWA of the present invention;

[0024] Figure 3 is the time domain roll motion response diagram of the present invention;

[0025] Figure 4 It is the WOA-BP algorithm iteration curve diagram of the present invention;

[0026] Figure 5ais a training set prediction error graph of the present invention;

[0027] Figure 5b is the test set prediction error graph of the present invention;

[0028] Figure 6a is the training set response spectrum error diagram of the present invention;

[0029] Figure 6b is the test set response spectrum error diagram of the present invention;

[0030] Figure 7a It is the BP linear regression analysis diagram of the present invention;

[0031] Figure 7b This is the WOA-BP linear regression analysis diagram of the present invention;

[0032] Figure 8 Comparison of the results of the ship rolling motion prediction model of the present invention;

[0033] Figure 9 Comparison of the ship roll angular velocity prediction model results of the present invention;

[0034] Figure 10 The figure shows the comparison of the ship roll angular acceleration prediction model results of the present invention. DETAILED DESCRIPTION

[0035] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0036] Example 1

[0037] The BP algorithm is mainly divided into two steps: forward propagation and back propagation.

[0038] In the forward propagation, data is passed from the input layer through the hidden layer to the output layer. Each layer of neurons maps the input data to output through the activation function:

[0039] α (l+1) =f(W(l)α (l) +b (l) ) (1)

[0040] α(l) is the output of layer l (the input of layer l+1), W(l) is the weight matrix of layer l, b (l)is the bias of layer l, and f is the activation function. Weights and biases are usually initialized to small random numbers that are uniformly distributed in a certain range, such as [-1, 1] or [0, 1].

[0041] The final output of the forward propagation is compared with the true label through the loss function L, and the error (loss value) is calculated:

[0042] L= / textloss( / haty,y) (2)

[0043] Backpropagation is mainly about calculating the gradient of the error with respect to the weights. Using the chain rule, the BP algorithm calculates the partial derivatives (gradients) of the loss function with respect to the weights and biases of each layer layer by layer, and updates the network parameters to minimize the error. The specific steps are as follows:

[0044] Calculate the error of the output layer: For the output layer, the error is defined as the partial derivative of the loss function with respect to the output:

[0045]

[0046] Calculate the error of the hidden layer: The error is propagated forward layer by layer, and the error of the hidden layer is calculated according to the chain rule:

[0047] δ(l)=(W (l+1) ) T δ(l+1)·f′(z (l) ) (4)

[0048] Update weights and biases: Use the gradient descent algorithm to update weights and biases according to the learning rate η:

[0049]

[0050] The above are the steps for randomly initializing the weights and thresholds of the BP neural network. This process may cause a series of problems: improper weight initialization may cause gradient explosion or disappearance, affecting the convergence of the model; some neurons may saturate in the early stages of training due to improper initialization; the network may fall into a local minimum; the training process may become unstable, requiring more iterations to converge, or may even fail to converge; in addition, when training data is limited, improper weight initialization may also cause the model to overfit.

[0051] In order to solve the above technical problems, the embodiment of the present invention discloses a very short-term prediction method for ship rolling motion based on whale algorithm optimization BP neural network, such as Figure 1 As shown, the following steps are included:

[0052] Obtain the ship's rolling motion data as sample data and perform normalization processing;

[0053] A multi-layer feedforward BP neural network model is constructed, and the parameters of the BP neural network model are optimized using the whale optimization algorithm to obtain the WOA-BP model;

[0054] The WOA-BP model is trained using sample data until the prediction accuracy is met;

[0055] Use the trained model to make very short-term forecasts of ship rolling motion.

[0056] Specifically, the WOA-BP algorithm combines the advantages of the WOA algorithm and the BP neural network to form an efficient ship roll motion prediction model. It can effectively improve prediction accuracy and generalization ability, and provide new ideas and methods for ship motion prediction and control. The detailed technical solution includes:

[0057] 1. Data preparation: Collect sample data of roll motion through experiments or simulations to obtain high-quality ship roll motion data, including roll angle, roll angular velocity, and roll angular acceleration.

[0058] 2. Data preprocessing: Normalize the collected data to eliminate dimensionality effects and accelerate convergence.

[0059] 3. BP Neural Network Construction: Build a multi-layer feedforward BP neural network model, including input, hidden, and output layers. Set the number of neurons and hidden layers, and select the Levenberg-Marquardt algorithm as the training algorithm.

[0060] 4. WOA algorithm optimization: Adjust the parameters of the WOA algorithm, such as the number of whale groups and the upper limit of the number of iterations, use the WOA algorithm to optimize the weights and thresholds of the BP neural network, find the best parameter combination, and improve the prediction accuracy and convergence speed of the model.

[0061] 5. Model training: Use 70% of the training data for model training and 30% of the validation data for model validation. Adjust the model parameters until the model achieves satisfactory prediction accuracy.

[0062] 6. Model prediction: Use the trained model to make very short-term predictions of the ship's roll motion, including roll angle, roll angular velocity, roll angular acceleration, etc., and perform denormalization on the data.

[0063] Example 2

[0064] Using AQWA, a ship hydrodynamic analysis software based on potential flow theory, a time domain simulation of a 17,000 DWT oil tanker in an empty state was performed to collect the data required for the WOA-BP model. The specific parameters of the ship are shown in Table 1. The rolling motion duration data of the oil tanker in the empty state was obtained through the AQWA time domain calculation module. The data sampling interval was 0.1s, each set of data was 5,000, and the total duration was 500s for WOA-BP model training and prediction. The geometric model of the oil tanker is as follows: Figure 2 As shown in the figure, the irregular wave spectrum type is selected as JONSWAP spectrum, and the time domain rolling motion response obtained under the given wave parameter conditions is as follows: Figure 3 shown.

[0065] Table 1 Oil tanker type parameters

[0066] Main scale value <![CDATA[Initial metacentric height GM T / m]]> 3.25 Draft / m 5.709 Displacement / t 14345.7 Center of gravity height / m 7.022 Roll inertia radius / m 7.956

[0067] Data preparation stage:

[0068] The normalization method is used to process the sample data so that all data are in the range of [0,1], eliminating the dimension effect and accelerating convergence. The normalization mathematical expression is as follows:

[0069]

[0070] Among them, X * represents the normalized result of the data; X refers to the original form of the data; and x min with x max They correspond to the minimum and maximum values in the original data set, respectively.

[0071] Configure model parameters:

[0072] In this simulation, 70% of the training set samples were used to train the network, while 30% served as the validation set to independently test the performance of the trained network. The network was then debugged based on its error. The training algorithm used the Levenberg-Marquardt algorithm. A BP neural network model and its improved WOA-BP model were constructed using the Matlab environment, with 10 neurons and 5 hidden layers. The Adam optimization algorithm was used for model training, with a learning rate of 0.1 and a maximum training cycle of 1000 epochs.

[0073] In the initial settings of the WOA algorithm: the number of whales is set to 50, the upper limit of the number of iterations is 100, and the position of each whale is limited to the interval [-3,3]. Figure 4The fitness curves shown show that the WOA algorithm, when optimizing the BP neural network search process, reached its lowest point of 0.010343885 during the fifth iteration. Within a relatively short number of iterations, the algorithm successfully found the optimal learning parameter combination and achieved a low fitness value. This demonstrates the algorithm's high efficiency, enabling it to quickly achieve good optimization results while consuming relatively few computing resources.

[0074] WOA-BP model training and prediction results analysis:

[0075] According to the set function and weighting parameters, the fitting results of the WOA-BP neural network are shown in Table 2 and Figure 5a and Figure 5b As shown, high prediction accuracy is achieved on both training and test datasets, meeting the requirements of engineering applications. Figure 6a and Figure 6b Table 2 further shows the comparison of the frequency response spectra between the WOA-BP model predictions and the AQWA calculation results, showing that the frequency response curves of the two have a high degree of fit and a small peak error, indicating that the WOA-BP model has a high frequency resolution for the ship motion response spectrum and can accurately capture the dynamic characteristics of the system, thereby ensuring the accuracy and reliability of the ship roll prediction.

[0076] Table 2 WOA-BP neural network performance indicators

[0077]

[0078] Figure 7a 、 Figure 7b and Figure 8 The linear regression analysis graph shows the network output for the training, validation, and test sets. Ideally, the points in the graph should be closely surrounded by a 45-degree straight line (i.e., the line where the predicted value is equal to the actual value), with a correlation coefficient of 1, indicating that the model's predictions are very accurate. The circle represents the true value; the fitted line is the relationship between the predicted value and the actual value fitted by the model based on the input data; the dotted line represents the ideal prediction line, i.e., Y = T, where Y is the model predicted value and T is the target value. The dotted line is a 45-degree straight line, which represents the situation when the predicted value is exactly equal to the target value. As shown in Table 3, in this simulation, the WOA-BP neural network surpassed the traditional BP neural network in all given prediction accuracies, with the highest accuracy reaching 0.99759, which is the highest value among all the listed data.

[0079] Table 3 Comparison of prediction accuracy of linear regression analysis

[0080]

[0081] The prediction results and prediction errors of the WOA-BP and BP ship roll motion prediction models proposed in this invention are as follows: the WOA-BP model effectively avoids the problem that the traditional BP neural network is prone to falling into local optimality and being sensitive to initial weights, enhances the robustness of the network model, and has a significant improvement in prediction accuracy compared to the BP ship roll motion prediction model. After denormalizing the results obtained after training, the error value between the results and the standard results is calculated, and the error between the predicted value and the true value is compared, as shown in Table 4. The table shows the mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), and determination coefficient (R) of the two models after predicting ship roll motion. 2 .

[0082] Table 4 Comparison of roll angle prediction accuracy

[0083]

[0084]

[0085] As shown in Table 4, the prediction errors of the BP model and the BP model optimized by the WOA algorithm are compared and analyzed. The WOA-BP prediction model reduces the prediction error percentage by about 99.85%, the RMSE is reduced by about 88.97%, and the MAE is reduced by about 96.76% compared with the BP model. 2 An increase of approximately 86.54%.

[0086] After verifying the accuracy of the WOA-BP model in roll angle prediction, it was applied to the prediction of roll angular velocity and acceleration to further verify the model's generalization and practicality. Roll angular velocity and acceleration are key indicators for ship dynamic stability analysis and are crucial for assessing a ship's response performance in complex sea conditions. In this simulation, a dataset of roll angular velocity and acceleration corresponding to roll angle was selected. The BP model and the WOA-BP model were retrained on this data to adapt them to the roll angular velocity and acceleration prediction tasks.

[0087] Table 5 Comparison of roll angular velocity prediction accuracy

[0088]

[0089] By comparison Figure 9 The prediction results of the WOA-BP model and the original BP model are shown in Table 5. The WOA-BP model shows higher accuracy than the traditional BP model in the prediction of roll angular velocity. According to statistical indicators, the MSE, RMSE, and R 2The MAE and the BP model are lower than those of the BP model, indicating that it has better performance in the roll angular rate prediction task.

[0090] Table 6 Comparison of ship roll angular acceleration prediction accuracy

[0091]

[0092]

[0093] like Figure 9 、 Figure 10 As shown in Table 6, in the field of roll angular acceleration prediction, the proposed model surpasses the traditional BP model in both prediction accuracy and frequency response resolution, showing higher accuracy and stability.

[0094] Combining the prediction results for roll angle, velocity, and acceleration, the WOA-BP model not only surpasses the traditional BP model in roll angle prediction accuracy but also demonstrates superior performance and generalization in the prediction of roll angular velocity and acceleration. Using the roll motion response spectrum calculated by AQWA as the target value, the WOA-BP model's prediction results demonstrate a higher degree of fit than the original BP model.

[0095] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0096] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for extremely short-term prediction of ship rolling motion based on whale algorithm optimized BP neural network, characterized in that: The following steps are involved: Obtain the ship's rolling motion data as sample data and perform normalization processing; A multi-layer feedforward BP neural network model is constructed, and the parameters of the BP neural network model are optimized using the whale optimization algorithm to obtain the WOA-BP model; The WOA-BP model is trained using sample data until the prediction accuracy is met; Use the trained model to make very short-term forecasts of ship rolling motion.

2. The method for extremely short-term prediction of ship rolling motion based on whale algorithm optimized BP neural network according to claim 1 is characterized in that: The sample data includes roll angle, roll angular velocity and roll angular acceleration.

3. The method for extremely short-term prediction of ship rolling motion based on whale algorithm optimized BP neural network according to claim 1, characterized in that: The normalized expression is as follows: Among them, X * represents the normalized result of the data; X refers to the original form of the data; and x min with x max They correspond to the minimum and maximum values in the original data set, respectively.

4. The method for extremely short-term prediction of ship rolling motion based on whale algorithm optimized BP neural network according to claim 1, characterized in that: The BP neural network model includes input layer, hidden layer and output layer, and sets the number of neurons and hidden layers.

5. The method for extremely short-term prediction of ship rolling motion based on whale algorithm optimized BP neural network according to claim 1, characterized in that: The whale optimization algorithm simulates the hunting behavior of humpback whales and uses three strategies: encirclement, spiral ascent, and random search to find the global optimal weight and bias.

6. The method for extremely short-term prediction of ship rolling motion based on whale algorithm optimized BP neural network according to claim 1, characterized in that: In the sample data, 70% of the samples in the training group were used to train the network, and 30% of the samples were used as the validation group to independently test the performance of the trained network. The network was debugged according to the error, and the training rule adopted the Levenberg-Marquardt algorithm. The BP neural network model and the WOA-BP model were constructed using the Matlab environment, with the number of neurons set to 10 and the hidden layer to 5. In the model training, the Adam optimization algorithm was selected, the learning rate was set to 0.1, and the maximum training cycle was set to 1000 rounds.

7. The method for extremely short-term prediction of ship rolling motion based on whale algorithm optimized BP neural network according to claim 1, characterized in that: In the initial settings of the whale optimization algorithm, the number of whales is set to 50, the upper limit of the number of iterations is 100, and the position of each whale is limited to the interval [-3,3]. The whale optimization algorithm is used to optimize the search process of the BP neural network.

Citation Information

Patent Citations

  • Ship motion attitude prediction method based on multiple combinations

    CN115994481A

  • WOA-based low-permeability oil field single well yield prediction method and device

    CN117875494A

  • Interval prediction method for hot rolling coiling temperature

    WO2022105294A1