Super-parameter self-optimization bidirectional time sequence capture ship motion forecasting method and device
Through the method of ultra-parameter self-optimized bidirectional timing capture, combined with Fourier transform and chaotic quantum adaptive whale optimization algorithm, the ship motion forecasting network is optimized, and the problem of insufficient ship motion forecasting accuracy in the existing technology is solved, and higher forecasting accuracy and network generalization performance are achieved.
Patent Information
- Application Number
- CN202411733473.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-14
AI Technical Summary
The existing ship motion forecasting methods are difficult to accurately simulate the nonlinear dynamic system and network hyperparameter determination, resulting in insufficient forecasting accuracy in high-precision scenarios.
The method of superparameter-optimized bidirectional timing capture is adopted to preprocess data through Fourier transform, and the network hyperparameters are optimized using the chaotic quantum adaptive whale optimization algorithm. The Dropout and l2 regularization mechanisms are introduced based on the Bi-LSTM network to build a ship motion forecasting network.
It effectively reduces the noise of ship motion data, improves forecasting accuracy, enhances the generalization performance of the network, solves the problem of super-parameter adjustment and meets the forecasting needs in high-precision scenarios.
Smart Images

Figure CN119622260A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a ship motion prediction method and device for super-parameter self-optimization bidirectional time series capture, and specifically belongs to the technical field of ships. Background Art
[0002] Ship motion prediction is of great significance for assisting ship navigation and ensuring ship operations. However, due to the coupling of wind, wave and current factors, ship motion has a strong time-varying property, which brings great challenges to improving the accuracy of ship motion prediction.
[0003] With the continuous improvement of the accuracy of ship motion prediction, the requirements for the ability to capture the time domain characteristics of ship motion are also gradually increasing. Due to the problems of long-range dependence and gradient explosion, the existing methods are limited in update and iteration, and it is difficult to meet the accuracy requirements in high-precision scenarios. Summary of the invention
[0004] The purpose of the present invention is to provide a ship motion prediction method and device with hyper-parameter self-optimization bidirectional time series capture to solve the problem that traditional methods cannot accurately simulate the nonlinear dynamic system of ship motion and the difficulty in determining network hyper-parameters.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention includes:
[0006] Step 1: Data collection and segmentation to construct a ship motion dataset;
[0007] Step 2: Preprocessing the ship motion data based on Fourier transform to obtain preprocessed ship motion data;
[0008] Step 3: Optimize the hyperparameters of the ship motion prediction network based on the chaotic quantum adaptive whale optimization algorithm;
[0009] Step 4: training and saving the ship motion prediction network with the optimal hyper-parameter combination;
[0010] Step 5: Use the saved trained ship motion prediction network with the optimal hyper-parameter combination for the ship motion prediction task;
[0011] The data collected in step 1 are six degrees of freedom data of the ship, including motion information of six degrees of freedom: time, roll, pitch, bow roll, sway, surge and heave. The ship motion data set is divided into a training set, a validation set and a test set in a ratio of 8:1:1.
[0012] Furthermore, the training set is used to train the established ship motion prediction network, the validation set is used to determine whether overfitting or underfitting occurs, and the test set is used to test the prediction performance of the finally constructed ship motion prediction network.
[0013] The ship motion data preprocessing in step 2 includes the following four steps:
[0014] 301: Convert from time domain to frequency domain through Fourier transform. The conversion expression is as follows:
[0015]
[0016] In formula (1), f(t) is time domain data, F(ω) is frequency domain data, i represents a complex number, e represents a natural base, ω represents frequency, and t represents time;
[0017] 302: By setting the cut-off frequency, the low-frequency band is filtered to eliminate the noise of the ship motion data;
[0018] 303: Based on the inverse Fourier transform, the data is converted back to the time domain to complete the data denoising; the conversion expression is:
[0019]
[0020] 304: Use the maximum and minimum normalization method to eliminate the influence of dimension. The maximum and minimum normalization method expression is:
[0021]
[0022] In formula (3), x represents a single data, x' represents the value of a single data, min is the minimum value of the data set, and max is the maximum value of the data set;
[0023] The hyperparameter optimization in step 3 includes five steps:
[0024] 401: Initialize the chaotic quantum adaptive whale optimization algorithm and set the population size and number of iterations;
[0025] 402: Initialize the population using chaotic mapping and generate the latest position for each individual whale;
[0026] 403: Based on the training set and the validation set, the ship motion prediction network corresponding to each individual whale is trained through the hyper-parameter optimization process;
[0027] 404: Calculate the RMSE of each trained whale individual on the test set as the objective function value of the chaotic quantum adaptive whale optimization algorithm, and determine whether the optimal individual of the whale population meets the iteration number requirement. If not, use the chaotic quantum adaptive whale optimization algorithm to iteratively optimize the whale population, update the population position, and return to step 403;
[0028] 405: Output the optimal whale position, that is, the optimal hyperparameter combination;
[0029] The initialized chaotic quantum adaptive whale optimization algorithm in 401 is a new optimization algorithm proposed based on chaotic mapping, quantum computing and adaptive influence factors; the optimization algorithm specifically includes:
[0030] 401-1: Whale population initialization; Whale population initialization is based on Cat chaos mapping, which increases the disorder of the initial points of the whale population. The specific application formula is as follows:
[0031] x=x min +Cat-Chaos×(x max -x min ) (4)
[0032] In formula (4): x min With x max Respectively represent the lower limit and upper limit of the independent variable value; Cat_Chaos is the chaos factor generated by the Cat mapping function;
[0033] Determined according to the Cat mapping matrix expression:
[0034]
[0035] In formula (5): |C|=1, mod operation means taking only the decimal part;
[0036] 401-2: Whale population location update;
[0037] 401-3: Sudden change in the location of whale populations;
[0038] The whale population location update in 401-2 includes three stages:
[0039] 401-21: Surrounding predation;
[0040] The expression for simulating whale circling predation behavior is as follows:
[0041]
[0042] In formulas (6) to (9), t is the current iteration number; The target location for predation; is the encirclement step length; is the current position vector of the whale; is the coefficient vector; is a random vector between [0,1]; t max is the maximum number of iterations; a is called the convergence factor, and its value decreases from 2 to 0 with the number of iterations;
[0043] In order to improve the algorithm's early global perturbation ability and later local search ability, a convergence factor a based on nonlinear weight is proposed, and the formula is as follows:
[0044]
[0045] 401-22: Bubble Net Attack;
[0046] The expression for simulating the whale bubble attack stage is as follows:
[0047]
[0048] In formulas (11) to (12), is the distance between the whale and its prey; b is the logarithmic spiral shape constant; l is a random number between [-1,1];
[0049] 401-23: Food search;
[0050] The expression for simulating the food search phase is as follows:
[0051]
[0052] In formulas (13) to (14), is the random search step size, is the randomly obtained reference whale position vector;
[0053] Whales randomly perform circling predation, food searching or bubble attack. To simulate the actual predation process of whales, the following position update formula is established:
[0054]
[0055] In formula (15), p is a random number between [0,1], and the random number p determines whether the whale performs spiral orbiting or contraction and encirclement movement;
[0056] Based on the quantum revolving door, the search speed of whale population is increased. The improved whale population update formula is as follows:
[0057]
[0058]
[0059] In formulas (16) to (19), Transform the previous phase for the quantum rotating gate; is the phase after the quantum rotating gate transformation; Δφ is the phase rotation radian of the quantum rotating gate;
[0060] The sudden change of the position of the whale population is based on the quantum NOT gate to reduce the impact of falling into the local optimal solution. First, the transition probability is set to p m, each whale generates a random number between [0,1] during each iteration. If the number is greater than p m , the position changes according to the following formula:
[0061]
[0062] In formula (20), The phase before the quantum NOT gate transformation; The phase after the quantum rotating gate transformation;
[0063] Furthermore, by focusing on the bottleneck of new network hyperparameter optimization and targeting the inherent defects of the whale optimization algorithm, a new chaotic quantum adaptive whale optimization algorithm is proposed for hyperparameter optimization of new networks, and a new hyperparameter self-optimization bidirectional time series capture ship motion prediction method is constructed.
[0064] The ship motion prediction network in step 3 is affected by both the preceding time and the following time. Combined with the characteristics of ship motion time series data, a new ship motion prediction network structure is established based on the Bi-LSTM network, using the Dropout and l2 regularization mechanisms.
[0065] The established ship motion prediction network consists of four layers, the first layer is the input layer, the second layer is the Bi-LSTM layer, the third layer is the fully connected layer, and the fourth layer is the output layer. In the second layer, two regularization methods, Dropout mechanism and l2 regularization norm, are introduced. The optimizer adopts the Adam optimization algorithm, the loss function adopts, and the evaluation index adopts the RMSE on the test set. The training results of the Bi-LSTM network are spliced by the forward and backward LSTM network training results, and the expression is as follows:
[0066] f t =σ(W f ·[h t-1 ,x t ]+b f ) (twenty one)
[0067] i t =σ(W f ·[h t-1 ,x t ]+b i ) (twenty two)
[0068]
[0069] o t =σ(W o ·[h t-1 ,x t ]+b o ) (25)
[0070] h t =o t *tanh(C t ) (26)
[0071] In formulas (21) to (26): W f is the weight coefficient of the forget gate, W i is the weight coefficient of the input gate, W C is the weight coefficient of the state update unit, W o is the weight coefficient of the output gate; b f is the bias of the forget gate, b i is the bias of the input gate, b C is the bias of the state update unit, b o is the bias of the output gate;
[0072] Furthermore, based on Fourier transform, the influence of ship motion time series data noise on prediction performance is reduced, a bidirectional long short-term memory neural network (Bi-LSTM) is used to simulate the nonlinear dynamic system of ship motion, and the Dropout mechanism and l2 regularization method are used to improve the generalization performance of the network, and a new ship motion prediction network is established.
[0073] The module structure of the device includes a data acquisition and segmentation module, a data preprocessing module, a hyperparameter optimization module, a network training and storage module, and an online prediction module;
[0074] The data acquisition and segmentation module is used to collect ship motion data and segment the data set;
[0075] The data preprocessing module performs smoothing on the ship motion data based on Fourier transform;
[0076] The hyperparameter optimization module is used to optimize the hyperparameters of the ship motion prediction network using the chaotic quantum adaptive whale optimization algorithm;
[0077] The network training and saving module is used to train the network with the optimal hyperparameter combination;
[0078] The online prediction module is used to predict future ship motion;
[0079] The signal flow between the modules is that the data acquisition and segmentation module, data preprocessing module, hyperparameter optimization module, network training and storage module and online prediction module are connected in series in sequence. Each module must be executed in sequence. The output of the previous module is the input of the next module, and the final output is the ship motion prediction result.
[0080] Furthermore, based on the new hyper-parameter self-optimizing bidirectional time series capture ship motion prediction method, new ideas are proposed in the composition and structure of ship motion devices, which can provide users with ship motion prediction results and provide technical support for ship navigation and operations.
[0081] The beneficial effects of the present invention are:
[0082] 1. Preprocessing ship motion data using Fourier transform can effectively reduce the noise of ship motion data and reduce the difficulty of prediction.
[0083] 2. Based on the BiLSTM network, the ship motion prediction network constructed by introducing Dropout and l2 regularization mechanism can better capture the time series characteristics of ship motion in both directions, has high generalization performance, and improves the accuracy of ship motion prediction.
[0084] 3. Based on the chaotic quantum adaptive whale optimization algorithm, a network hyperparameter optimization method is proposed, which can effectively solve the problem of difficult and time-consuming manual parameter adjustment of the ship motion prediction network. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] Figure 1 It is a schematic flow chart of the main steps of the ship motion prediction method of the present invention;
[0086] Figure 2 The present invention takes the pitch data set as an example, and shows the data set division and result diagram;
[0087] Figure 3 This is a comparison chart of the processed data and the original data, taking the pitch data set as an example;
[0088] Figure 4 It is a flow chart of the chaotic quantum adaptive whale optimization algorithm of the present invention;
[0089] Figure 5 It is a structural diagram of a ship motion prediction network established by the present invention;
[0090] Figure 6 It is a prediction comparison diagram of the present invention compared with other prediction networks. DETAILED DESCRIPTION
[0091] The following will be combined with the attached Figure 1-6 , clearly and completely describe the technical solutions in the embodiments. Figure 1 As shown, the specific steps of the ship motion prediction method include:
[0092] Step 1: Data collection and segmentation to construct a ship motion dataset;
[0093] Step 2: Preprocessing the ship motion data based on Fourier transform to obtain preprocessed ship motion data;
[0094] Step 3: Optimize the hyperparameters of the ship motion prediction network based on the chaotic quantum adaptive whale optimization algorithm;
[0095] Step 4: training and saving the ship motion prediction network with the optimal hyper-parameter combination;
[0096] Step 5: Use the saved trained ship motion prediction network with the optimal hyper-parameter combination for the ship motion prediction task;
[0097] Taking the pitch data set as an example, the data set division and results are as follows: Figure 2 As shown; the data collected in step 1 are six degrees of freedom data of the ship, including motion information of six degrees of freedom: time, roll, pitch, bow roll, sway, surge and heave. The ship motion data set is divided into a training set, a validation set and a test set at a ratio of 8:1:1 to obtain the training set, the validation set and the test set. The training set is used to train the established ship motion prediction network, the validation set is used to determine whether overfitting or underfitting occurs, and the test set is used to test the prediction performance of the finally constructed ship motion prediction network;
[0098] Taking the pitch data set as an example, the comparison between the processed data and the original data is shown in the figure below: Figure 3 As shown; the method mainly includes four parts. The first key is the data preprocessing process based on Fourier transform in step 2, which includes the following four steps:
[0099] 301: Convert from time domain to frequency domain through Fourier transform. The conversion expression is as follows:
[0100]
[0101] In formula (1), f(t) is time domain data, F(ω) is frequency domain data, i represents a complex number, e represents a natural base, ω represents frequency, and t represents time;
[0102] 302: By setting the cut-off frequency, the low-frequency band is filtered to eliminate the noise of the ship motion data;
[0103] 303: Based on the inverse Fourier transform, the data is converted back to the time domain to complete the data denoising; the conversion expression is:
[0104]
[0105] 304: Use the maximum and minimum normalization method to eliminate the influence of dimension. The maximum and minimum normalization method expression is:
[0106]
[0107] In formula (3), x represents a single data, x' represents the value of a single data, min is the minimum value of the data set, and max is the maximum value of the data set;
[0108] The second key is to focus on the bottleneck of new network hyperparameter optimization in step 3, and propose a new chaotic quantum adaptive whale optimization algorithm for the hyperparameter optimization of the new network to address the inherent defects of the whale optimization algorithm, and construct a new hyperparameter self-optimization bidirectional time series capture ship motion prediction method; hyperparameter optimization includes five steps:
[0109] 401: Initialize the chaotic quantum adaptive whale optimization algorithm and set the population size and number of iterations;
[0110] 402: Initialize the population using chaotic mapping and generate the latest position for each individual whale;
[0111] 403: Based on the training set and the validation set, the ship motion prediction network corresponding to each individual whale is trained through the hyper-parameter optimization process;
[0112] 404: Calculate the RMSE of each trained whale individual on the test set as the objective function value of the chaotic quantum adaptive whale optimization algorithm, and determine whether the optimal individual of the whale population meets the iteration number requirement. If not, use the chaotic quantum adaptive whale optimization algorithm to iteratively optimize the whale population, update the population position, and return to step 403;
[0113] 405: Output the optimal whale position, that is, the optimal hyperparameter combination;
[0114] like Figure 4 The algorithm flow chart shown in FIG. 4 shows, in which the initialization chaos quantum adaptive whale optimization algorithm in 401 is a new optimization algorithm proposed based on chaos mapping, quantum computing and adaptive influence factor; the optimization algorithm is divided into three steps:
[0115] 401-1: Whale population initialization; Whale population initialization is based on Cat chaos mapping, which increases the disorder of the initial points of the whale population. The specific application formula is as follows:
[0116] x=x min +Cat - Chaos×(x max -x min ) (4)
[0117] In formula (4): x min With x max Respectively represent the lower limit and upper limit of the independent variable value; Cat_Chaos is the chaos factor generated by the Cat mapping function;
[0118] Determined according to the Cat mapping matrix expression:
[0119]
[0120] In formula (5): |C|=1, mod operation means taking only the decimal part;
[0121] 401-2: Whale population location update;
[0122] 401-3: Sudden change in the location of whale populations;
[0123] The whale population location update in 401-2 mainly includes three stages:
[0124] 401-21: Surrounding predation;
[0125] The expression for simulating whale circling predation behavior is as follows:
[0126]
[0127] In formulas (6) to (9), t is the current iteration number; The target location for predation; is the encirclement step length; is the current position vector of the whale; is the coefficient vector; is a random vector between [0,1]; t max is the maximum number of iterations; a is called the convergence factor, and its value decreases from 2 to 0 with the number of iterations;
[0128] In order to improve the algorithm's early global perturbation ability and later local search ability, a convergence factor a based on nonlinear weight is proposed, and the formula is as follows:
[0129]
[0130] 401-22: Bubble Net Attack;
[0131] The expression for simulating the whale bubble attack stage is as follows:
[0132]
[0133] In formulas (11) to (12), is the distance between the whale and its prey; b is the logarithmic spiral shape constant; l is a random number between [-1,1];
[0134] 401-23: Food search;
[0135] The expression for simulating the food search phase is as follows:
[0136]
[0137] In formulas (13) to (14), is the random search step size, is the randomly obtained reference whale position vector;
[0138] Whales randomly perform circling predation, food searching or bubble attack. To simulate the actual predation process of whales, the following position update formula is established:
[0139]
[0140] In formula (15), p is a random number between [0,1], and the random number p determines whether the whale performs spiral orbiting or contraction and encirclement movement;
[0141] Based on the quantum revolving door, the search speed of whale population is increased. The improved whale population update formula is as follows:
[0142]
[0143]
[0144] In formulas (16) to (19), Transform the previous phase for the quantum rotating gate; is the phase after the quantum rotating gate transformation; Δφ is the phase rotation radian of the quantum rotating gate;
[0145] The sudden change of the position of the whale population is based on the quantum NOT gate to reduce the impact of falling into the local optimal solution. First, the transition probability is set to p m , each whale generates a random number between [0,1] during each iteration. If the number is greater than p m , the position changes according to the following formula:
[0146]
[0147] In formula (20), The phase before the quantum NOT gate transformation; The phase after the quantum rotating gate transformation;
[0148] Optimized comparison network hyperparameter combination
[0149]
[0150] Table 1
[0151] Table 1 shows the hyperparameter combination of the comparison prediction network after the chaotic quantum adaptive whale optimization algorithm;
[0152] The third key is to build a ship motion prediction network based on the BiLSTM network and introduce Dropout and l2 regularization mechanisms. The ship motion prediction network is affected by both the preceding time and the following time. Combined with the characteristics of ship motion time series data, a new ship motion prediction network structure is established based on the Bi-LSTM network and using Dropout and l2 regularization mechanisms.
[0153] like Figure 5 As shown in the figure, the established ship motion prediction network consists of four layers, the first layer is the input layer, the second layer is the Bi-LSTM layer, the third layer is the fully connected layer, and the fourth layer is the output layer; in which, two regularization methods, Dropout mechanism and l2 regularization norm, are introduced in the second layer, the optimizer adopts Adam optimization algorithm, the loss function adopts (Mean Square Error, MSE), and the evaluation index adopts RMSE (Root Mean Square Error) on the test set;
[0154] The training results of the Bi-LSTM network are concatenated from the forward and backward LSTM network training results, and the expression is as follows:
[0155] f t =σ(W f ·[h t-1 ,x t ]+b f ) (twenty one)
[0156] i t =σ(W f ·[h t-1 ,x t ]+b i ) (twenty two)
[0157]
[0158] o t =σ(W o ·[h t-1 ,x t ]+b o ) (25)
[0159] h t =o t *tanh(C t ) (26)
[0160] In formulas (21) to (26): W f is the weight coefficient of the forget gate, W i is the weight coefficient of the input gate, W C is the weight coefficient of the state update unit, W ois the weight coefficient of the output gate; b f is the bias of the forget gate, b i is the bias of the input gate, b C is the bias of the state update unit, b o is the bias of the output gate;
[0161] The Dropout mechanism is used to randomly discard connections in non-time dimensions, reducing the impact of overfitting while avoiding damage to the memory ability of the Bi-LSTM network in the time dimension. For a neural layer y = f(Wx + b), a masking function mask(·) is introduced so that y = f(Wmask(x) + b). The masking function mask(·) is defined as:
[0162]
[0163] In formula (27): m∈{0,1} D is the discard mask, which is randomly generated by Bernoulli distribution with probability p;
[0164] The l2 regularization norm is added into the backpropagation function, and the expression is as follows:
[0165]
[0166] In formula (28), L(·) is the loss function, N is the number of training samples, f(·) is the neural network with learning, θ is its parameter, λ is the regularization coefficient, l2 is the two-norm function, and its expression is:
[0167]
[0168] The loss function MSE and the evaluation index RMSE are expressed as follows:
[0169]
[0170] In formulas (30) and (31): f(x) is the predicted value, y is the target value;
[0171] Selected comparative prediction network
[0172]
[0173] Table 2
[0174] Table 2 shows the comparative prediction network selected by the ship motion prediction network constructed based on the BiLSTM network and the introduction of Dropout and l2 regularization mechanism;
[0175] Prediction network comparison results
[0176]
[0177] Table 3
[0178] Table 3 shows the RMSE comparison results between the prediction comparison network and the real data for the next 30 seconds;
[0179] Based on Fourier transform, the influence of ship motion time series data noise on prediction performance is reduced. Bidirectional long short-term memory neural network (Bi-LSTM) is used to simulate the nonlinear dynamic system of ship motion. Dropout mechanism and l2 regularization method are used to improve the generalization performance of the network. A new ship motion prediction network is established. Compared with previous methods for ship motion prediction, it can better capture the bidirectional time dependency of ship motion time series data and improve training accuracy.
[0180] The fourth key is a ship motion prediction device with self-optimization of hyperparameters and bidirectional time series capture; the module structure of the device includes data acquisition, data segmentation, data preprocessing, hyperparameter optimization, network training, and online prediction; and the hardware system of the device includes a ship six-degree-of-freedom sensor, a data storage card, and a computer system. The software system is implemented in Python and consists of various modules; the modules specifically include: data acquisition and segmentation module, data preprocessing module, hyperparameter optimization module, network training and storage module, and online prediction module;
[0181] The data acquisition and segmentation module is used to collect ship motion data and segment the data set; the data preprocessing module smoothes the ship motion data based on Fourier transform; the hyperparameter optimization module is used to optimize the hyperparameters of the ship motion prediction network using the chaotic quantum adaptive whale optimization algorithm; the network training and storage module is used to train the network with the optimal hyperparameter combination; the online prediction module is used to predict the future ship motion; the signal flow between the modules is that the data acquisition and segmentation module, the data preprocessing module, the hyperparameter optimization module, the network training and storage module and the online prediction module are connected in series in sequence, and each module must be executed in sequence. The output of the previous module is the input of the next module, and finally the ship motion prediction result is output;
[0182] Based on the new hyper-parameter self-optimization bidirectional time series capture ship motion prediction method, a new idea is proposed in the composition and structure of the ship motion device, which can provide ship motion prediction results for users and provide technical support for ship navigation and operation;
[0183] like Figure 6 As shown, it can be seen that the proposed ship motion prediction method and device with hyper-parameter self-optimization bidirectional time series capture can have better prediction performance than the selected comparison network.
[0184] The above is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent replacement and improvement made to the above embodiments without departing from the content of the technical solution of the present invention, based on the technical essence of the present invention, within the spirit and principles of the present invention, still fall within the protection scope of the technical solution of the present invention.
Claims
1. A ship motion prediction method based on super-parameter self-optimization bidirectional time series capture, characterized in that: The specific steps include: Step 1: Data collection and segmentation to construct a ship motion dataset; Step 2: Preprocessing the ship motion data based on Fourier transform to obtain preprocessed ship motion data; Step 3: Optimize the hyperparameters of the ship motion prediction network based on the chaotic quantum adaptive whale optimization algorithm; Step 4: training and saving the ship motion prediction network with the optimal hyper-parameter combination; Step 5: Use the saved trained ship motion prediction network with the optimal hyper-parameter combination for the ship motion prediction task.
2. According to claim 1, a method for predicting ship motion by self-optimizing bidirectional time series capture based on super parameters, characterized in that: The data collected in step 1 are the six degrees of freedom data of the ship, including the motion information of six degrees of freedom: time, roll, pitch, bow roll, sway, surge and heave. The ship motion data set is divided into a ratio of 8:1:1 to obtain the training set, validation set and test set.
3. The method for predicting ship motion by super-parameter self-optimization bidirectional time series capture according to claim 1, characterized in that: The ship motion data preprocessing process in step 2 includes the following steps: 301: Convert from time domain to frequency domain through Fourier transform. The conversion expression is as follows: In formula (1), f(t) is time domain data, F(ω) is frequency domain data, i represents a complex number, e represents a natural base, ω represents frequency, and t represents time; 302: By setting the cut-off frequency, the low-frequency band is filtered to eliminate the noise of the ship motion data; 303: Based on the inverse Fourier transform, the data is converted back to the time domain to complete the data denoising; the conversion expression is: 304: Use the maximum and minimum normalization method to eliminate the influence of dimension. The maximum and minimum normalization method expression is: In formula (3), x represents a single data, x' represents the value of a single data, min is the minimum value of the data set, and max is the maximum value of the data set.
4. The method for predicting ship motion by self-optimizing bidirectional time series capture based on super parameters according to claim 1, characterized in that: The optimization of hyperparameters in step 3 includes the following steps: 401: Initialize the chaotic quantum adaptive whale optimization algorithm and set the population size and the number of iterations; the optimization algorithm specifically includes: 401-1: Whale population initialization; Whale population initialization is based on Cat chaos mapping, which increases the disorder of the initial points of the whale population. The specific application formula is as follows: x=x min +Cat-Chaos×(x max -x min ) (4) In formula (4): x min With x max Respectively represent the lower limit and upper limit of the independent variable value; Cat_Chaos is the chaos factor generated by the Cat mapping function; Determined according to the Cat mapping matrix expression: In formula (5): |C|=1, mod operation means taking only the decimal part; 401-2: Whale population location update; The whale population position update consists of three stages: 401-21: Surrounding predation; The expression for simulating whale circling predation behavior is as follows: In formulas (6) to (9), t is the current iteration number; The target location for predation; is the encirclement step length; is the current position vector of the whale; is the coefficient vector; is a random vector between [0,1]; t max is the maximum number of iterations; a is called the convergence factor, and its value decreases from 2 to 0 with the number of iterations; The formula for the convergence factor a is as follows: 401-22: Bubble Net Attack; The expression for simulating the whale bubble attack stage is as follows: In formulas (11) to (12), is the distance between the whale and its prey; b is the logarithmic spiral shape constant; l is a random number between [-1,1]; 401-23: Food search; The expression for simulating the food search phase is as follows: In formulas (13) to (14), is the random search step size, is the randomly obtained reference whale position vector; Whales randomly perform circling predation, food searching or bubble attack. To simulate the actual predation process of whales, the following position update formula is established: In formula (15), p is a random number between [0,1], and the random number p determines whether the whale performs spiral orbiting or contraction and encirclement movement; Based on the quantum revolving door, the search speed of whale population is increased. The improved whale population update formula is as follows: In formulas (16) to (19), Transform the previous phase for the quantum rotating gate; is the phase after the quantum rotating gate transformation; Δφ is the phase rotation radian of the quantum rotating gate; 401-3: Sudden change in the location of whale populations; The sudden change of the position of the whale population is based on the quantum NOT gate to reduce the impact of falling into the local optimal solution. First, the transition probability is set to p m , each whale generates a random number between [0,1] during each iteration. If the number is greater than p m , the position changes according to the following formula: In formula (20), The phase before the quantum NOT gate transformation; The phase after the quantum rotating gate transformation; 402: Initialize the population using chaotic mapping and generate the latest position for each individual whale; 403: Based on the training set and the validation set, the ship motion prediction network corresponding to each individual whale is trained through the hyper-parameter optimization process; 404: Calculate the RMSE of each trained whale individual on the test set as the objective function value of the chaotic quantum adaptive whale optimization algorithm, and determine whether the optimal individual of the whale population meets the iteration number requirement. If not, use the chaotic quantum adaptive whale optimization algorithm to iteratively optimize the whale population, update the population position, and return to step 403; 405: Output the optimal whale position, that is, the optimal hyperparameter combination.
5. The method for predicting ship motion by super-parameter self-optimization bidirectional time series capture according to claim 1, characterized in that: The ship motion prediction network in step 3 is affected by both the preceding time and the following time. Combined with the characteristics of ship motion time series data, a new ship motion prediction network structure is established based on the Bi-LSTM network, using the Dropout and l2 regularization mechanisms. The established ship motion prediction network consists of four layers: the first layer is the input layer, the second layer is the Bi-LSTM layer, the third layer is the fully connected layer, and the fourth layer is the output layer. Two regularization methods, the Dropout mechanism and the l2 regularization norm, are introduced in the second layer. The optimizer adopts the Adam optimization algorithm, the loss function adopts, and the evaluation index adopts the RMSE on the test set.
6. The method for ship motion prediction based on super-parameter self-optimization bidirectional time series capture according to claim 5, characterized in that: The training results of the Bi-LSTM network are concatenated from the forward and backward LSTM network training results, and the expression is as follows: In formulas (21) to (26): W f is the weight coefficient of the forget gate, W i is the weight coefficient of the input gate, W C is the weight coefficient of the state update unit, W o is the weight coefficient of the output gate; b f is the bias of the forget gate, b i is the bias of the input gate, b C is the bias of the state update unit, b o is the bias of the output gate.
7. The method for ship motion prediction based on super-parameter self-optimization bidirectional time series capture according to claim 5, characterized in that: The loss function MSE and the evaluation index RMSE are expressed as follows: In formulas (30) and (31), f(x) is the predicted value and y is the target value.
8. A ship motion prediction device with hyperparameter self-optimization bidirectional time series capture, comprising a data acquisition and segmentation module, a data preprocessing module, a hyperparameter optimization module, a network training and storage module and an online prediction module; The data acquisition and segmentation module is used to collect ship motion data and segment the data set; The data preprocessing module performs smoothing on the ship motion data based on Fourier transform; The hyperparameter optimization module is used to optimize the hyperparameters of the ship motion prediction network using the chaotic quantum adaptive whale optimization algorithm; The network training and saving module is used to train the network with the optimal hyperparameter combination; The online prediction module is used to predict future ship motion; The signal flow between the modules is that the data acquisition and segmentation module, the data preprocessing module, the hyperparameter optimization module, the network training and storage module and the online prediction module are connected in series in sequence. Each module must be executed in sequence. The output of the previous module is the input of the next module, and finally the ship motion prediction result is output.