Ship motion posture prediction method based on multiple combinations
By optimizing the GRU neural network using the whale optimization algorithm and combining it with complete ensemble empirical mode decomposition, the problems of low accuracy and computational complexity in ship attitude prediction in existing technologies are solved, and higher accuracy ship motion attitude prediction is achieved.
Patent Information
- Application Number
- CN202211561922.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-06
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-12-06
AI Technical Summary
Existing ship attitude prediction algorithms require a large amount of historical data and cumbersome mathematical calculations, and are limited in practical applications with low prediction accuracy.
A multi-combination-based ship motion attitude prediction method is adopted. The GRU neural network is optimized using the whale optimization algorithm and the original ship attitude data is decomposed by combining complete ensemble empirical mode decomposition to train a CWGRU combined prediction model.
It improves the accuracy of ship motion attitude prediction, reduces root mean square error and mean absolute percentage error, increases the correlation coefficient, and adapts to nonlinear and non-stationary ship motion characteristics.
Smart Images

Figure CN115994481B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of neural networks and heuristic optimization methods, and particularly relates to a ship motion posture prediction method based on multiple combinations. BACKGROUND
[0002] When a ship is sailing on the sea, it is easily affected by the weather environment such as sea wind and sea wave, and thus produces six degrees of freedom motion in the directions of cross-sway, longitudinal sway, vertical sway, roll, pitch and yaw. Since the actual sea condition is more complex, the six kinds of rolling motions are superimposed on each other in actual sailing, and form a more complex motion. The unstable posture will affect the sailing of the ship, and serious accidents such as capsizing may occur. It can be seen that the prediction of the ship motion posture is of great significance to the sailing safety of the ship.
[0003] Ship motion posture prediction has been widely concerned. The common prediction methods at present mainly include statistical prediction method, Kalman filter method, grey theory method, time series analysis method, neural network method and combination prediction method. The statistical prediction method needs to filter the data to obtain the power spectrum similar to the input signal, then a series of complex calculations are performed on the input data, the integral equation is analyzed, and finally the prediction value of the output is obtained. The prediction accuracy of this method decreases with the increase of time length. Therefore, this method is suitable for short-term prediction and is limited in ship posture prediction. The Kalman filter method is widely used. The prediction value is obtained through the state equation of the ship, the covariance between the prediction value and the measured value is calculated, and the optimal posture estimation value is finally obtained by recursive. This method needs to know the state equation of the ship motion and perform mathematical modeling, but when the sea condition changes, the prediction accuracy will be affected. The grey theory method uses grey theory to establish a grey differential model, uses limited information to find the rules between data for effective prediction. This method requires smooth original data and the training sample cannot be too much. In the study of ship motion posture prediction, this method has too many limitations. The time series analysis method has small calculation amount and low cost, but it is commonly used for short-term prediction. It requires that the data must be stationary, normally distributed and linearly represented by historical data. When there is interference, the prediction error is large and cannot meet the needs of ship posture prediction. Due to the complexity of ship posture data, it has the characteristics of nonlinearity and non-stationarity, so the above methods are limited in ship posture prediction. With the rapid development of artificial intelligence, neural network method has been widely used in time series processing. This method can save many complex data processing processes and does not need to know the specific relationship between input data and output data. It has obvious advantages in processing large-scale, nonlinear and complex structure system prediction problems. However, since the initial structure parameters of neural network are often determined by experience, the prediction accuracy of single neural network method still cannot meet the needs of practical application. The combination prediction method combines different prediction methods and their respective advantages to obtain a new combination prediction model. Compared with single prediction method, the combination prediction method can make more accurate prediction. Based on this, a multi-combination ship posture prediction method is proposed. SUMMARY
[0004] The purpose of the present application is to provide a multi-combination ship motion posture prediction method, which solves the problem that the existing ship posture prediction algorithm needs a large amount of historical data and complex mathematical calculation, which is limited in practical application.
[0005] The technical scheme adopted by the present application is: a multi-combination ship motion posture prediction method, the specific operation steps are as follows:
[0006] Step 1, the number of hidden layer nodes, the initial learning rate, the maximum training times are selected as the hyperparameters of the neural network to be optimized, the initialization parameters of the whale optimization algorithm are determined, and the fitness function is determined;
[0007] Step 2, the whale optimization algorithm is used to train the GRU neural network, and the optimized WGRU neural network model is obtained;
[0008] Step 3, the original ship attitude data is decomposed by using complete set empirical mode decomposition, and the decomposed data is used to train the WGRU network, and the trained CWGRU combined prediction model is obtained;
[0009] Step 4, the trained CWGRU combined prediction model is used to predict the ship motion attitude.
[0010] The characteristics of the application also lie in,
[0011] The parameters of the whale optimization algorithm in step 2 include the search population, the iteration number, the variable dimension, and the upper and lower limits of the hidden layer node number, the initial learning rate and the maximum training times; the search population size is 50, the iteration number is 10, the variable dimension is 3, the range of the hidden layer node number is [10, 200, the initial learning rate is [0.0001, 0.01, and the maximum training times is [200, 600.
[0012] In step 1, the mean absolute percentage error MAPE is selected as the fitness function of the whale optimization algorithm, and the fitness function is defined as shown in formula (1):
[0013]
[0014] Wherein, is the i th predicted value in the prediction result, y i is the i th real value in the data sample, and n is the number of prediction samples, it can be seen that the closer the predicted value is to the real value, the smaller the fitness function value is.
[0015] Step 2 is as follows:
[0016] Step 2.1: initialize the topology structure of the GRU neural network model, initialize the population size, the maximum iteration number, the upper and lower limits of the parameters to be optimized and the convergence factor of the whale algorithm, assign the initialized values as the historical optimal values to the parameters of the GRU and train;
[0017] Step 2.2: calculate the individual fitness value according to formula (1), find the position of the individual with the optimal fitness value in the population, and take it as the optimal individual position; the specific steps are as follows:
[0018] A whale colony with N individuals is randomly generated in a D-dimensional space, the maximum iteration number is T, each individual represents a solution to the problem, and the position of the ith individual in the tth generation is:
[0019]
[0020] The optimal position of the entire population at the tth generation is:
[0021]
[0022] In the surrounding prey stage: when an individual in the population searches for a target in a certain space, individuals close to the target will gradually approach the target from the current position through a random route, and other individuals will indirectly approach the optimal target with the individual as the target. The specific mathematical formulas are (4) and (5):
[0023]
[0024]
[0025] Where: t is the current iteration number, is the updated position vector, is the current best position, || is the modulo operation, is the difference between the best position and the current position of the individual, and are coefficient vectors, whose expressions are (6) and (7):
[0026]
[0027]
[0028]
[0029] In equations (6) and (7) and are random vectors with values in [0, 1]; T is the maximum iteration number; is the convergence factor, which decreases linearly from 2 to 0 as the iteration number increases;
[0030] In the shrinking surrounding stage: individuals in the population attack the target in a spiral shrinking manner, which can be modeled by equation (9):
[0031]
[0032]
[0033] In the formula, represents the distance of the ith individual from the target. Since the individual's behavior of updating the position and reducing the search space occurs simultaneously, at the time of position updating, the individual's current behavior is determined by taking the probability p = 0.5 as the threshold value. According to different probabilities, the corresponding iteration mode is selected, and the specific expression is as follows formula (11):
[0034]
[0035] In the formula, p is a random number in [0, 1], b is a constant of the logarithmic spiral shape, and l is a random number in [-1, 1].
[0036] In the prey search stage: the above two stages are carried out under the premise of knowing the target position (prey). At this time, |A| < 1. If |A| ≥ 1, the population has not found the target position, and the particles need to search for prey through different random ways. This process is the stage of searching for the target, and its mathematical expression is as follows (12) and (13):
[0037]
[0038]
[0039] In the formula, is a position vector randomly selected from the current population;
[0040] Step 2.3: Update the vector parameters of the coefficients in the whale optimization algorithm and Randomly generate a probability p, p ∈ (0, 1), update the strategy according to the parameter p, and select the way of whale surrounding predation to update the position of the whale individual;
[0041] Step 2.4: Determine whether the whale optimization algorithm meets the termination condition, i.e. reaches the maximum number of iterations or the fitness value tends to be stable. When the algorithm termination condition is met, output the optimal hidden layer node number, initial learning rate, and maximum training number to the GRU neural network. Thus, the optimized WGRU network structure is obtained. Otherwise, jump to step 2.2.
[0042] Step 3 is as follows:
[0043] Step 3.1: Obtain the ship motion attitude sequence, and normalize the original attitude sequence using formula (2),
[0044]
[0045] In the formula, x i is the input data, where i = 1, 2, …, m, x max is the maximum value in the original data, and x min is the minimum value in the data, Xi is the normalized ship attitude data;
[0046] Step 3.2: Add a set of positive and negative noise signals to the normalized ship attitude data, and the amplitude of the added new noise signals is equal, as shown in equation (3) and equation (4),
[0047]
[0048]
[0049] wherein x(t) is the original signal, is the positive noise; is the negative noise.
[0050] Step 3.3: Find all extreme values in the signal s(t) to obtain the upper envelope u(t) and the lower envelope v(t) of s(t), and calculate the mean value m1(t) of the upper and lower envelopes:
[0051]
[0052] Step 3.4: Remove m1(t) from the signal s(t), and let the difference be 1(t):
[0053] h1(t) = (t) - 1(t) (6)
[0054] Step 3.5: Determine whether 1(t) satisfies the condition for the end of IMF decomposition, if not, let 1(t) be the new signal amount s(t); repeat the above steps until 1(t) satisfies the condition for the end of IMF decomposition; then, the first component of IMF can be represented by c1(t):
[0055] c1(t) = h1(t) (7)
[0056] After the original signal s(t) is subtracted by c1(t), the remaining component can be represented by r1(t):
[0057] r1(t) = (t) - 1(t) (8)
[0058] Step 3.6: Use the remaining component r1(t) as the new original signal, and repeat the above process, and other IMF components of s(t) can be obtained, i.e., c n (t).
[0059] Step 3.7: After the above decomposition, the original signal s(t) can be represented by the IMF components and the remaining component;
[0060]
[0061] wherein c i(t) and r n The expression of (t) is shown in formula (10) and (11).
[0062]
[0063]
[0064] Wherein, c ni is the IMF component superimposed with positive noise, c -ni is the IMF component superimposed with negative noise;
[0065] Step 3.8: input each IMF component c i (t) and the remaining component r n (t) into the optimized WGRU neural network in step 2.4 for training, calculate the loss function, and continuously adjust the weight value of the neural network using the back propagation algorithm, and when the maximum training times are reached, the optimized CWGRU neural network model can be obtained;
[0066] Step 3.9: in the ship attitude data prediction stage, the CWGRU model obtained in step 3.8 is used to predict the ship attitude data to be predicted, and steps 3.1 to 3.8 are decomposed, and each IMF component and the remaining component r n (t) are predicted respectively to obtain each predicted component The predicted value of the ship attitude can be obtained by superimposing each component
[0067] Generally, the ship motion attitude changes abnormally complex, and has obvious randomness and rich feature information, and is a nonlinear non-stationary signal. According to the characteristics of the signal, the commonly used signal decomposition methods are wavelet analysis method WA, Fourier transform method FT, empirical mode decomposition method EMD and the like. Compared with the EMD algorithm, the complete ensemble empirical mode decomposition CEEMD has better adaptability to non-stationary signal analysis, and can avoid the occurrence of signal aliasing phenomenon, so the CEEMD is used for signal decomposition in the application. The whale optimization algorithm WOA can dynamically change the parameters of the algorithm to find the position of the target, so that each particle can find the optimal solution.
[0068] The beneficial effects of the application are that the prediction results of the CWGRU combined prediction model of the application are the smallest in the root mean square error and the average absolute percentage error, and the correlation coefficient is the highest, which shows that the prediction accuracy of the CWGRU combined prediction model is generally higher than that of the other two models. Since the CEEMD algorithm is used to decompose the original ship attitude data in the application, the algorithm has better prediction effect for the ship motion attitude with non-stationary and nonlinear characteristics. BRIEF DESCRIPTION OF DRAWINGS
[0069] Figure 1 is a WGRU model training flowchart of the present application;
[0070] Figure 2 is a CWGRU model training flowchart of the present application;
[0071] Figure 3(a) is a comparison chart of heave displacement prediction results of the present application and GRU, WGRU models;
[0072] Figure 3(b) is a comparison chart of errors of the prediction results of Figure 3(a);
[0073] Figure 4(a) is a comparison chart of roll angle prediction results of the present application and GRU, WGRU models;
[0074] Figure 4(b) is a comparison chart of errors of the prediction results of Figure 4(a);
[0075] Figure 5(a) is a comparison chart of pitch angle prediction results of the present application and GRU, WGRU models;
[0076] Figure 5(b) is a comparison chart of errors of the prediction results of Figure 5(a); DETAILED DESCRIPTION
[0077] In order to make the purpose, technical scheme and advantages of the present application clearer, the embodiments of the present application will be further described in detail below in combination with the drawings of the specification.
[0078] Step 1, selecting the number of hidden layer nodes, initial learning rate and maximum training times as the hyperparameters of the neural network to be optimized, determining the initialization parameters of the whale optimization algorithm and the fitness function;
[0079] The mean absolute percentage error MAPE is selected as the fitness function of the whale optimization algorithm, and the fitness function is defined as shown in formula (1):
[0080]
[0081] wherein, is the i-th predicted value in the prediction results, y i is the i-th true value in the data samples, and n is the number of prediction samples. It can be seen that the closer the predicted value is to the true value, the smaller the fitness function value is.
[0082] Step 2, training the GRU neural network by using the whale optimization algorithm to obtain the optimized WGRU neural network model;
[0083] The parameters of the whale optimization algorithm include the search population, the number of iterations, the variable dimension, and the number of hidden layer nodes, the initial learning rate, and the upper and lower limits of the maximum training number; the search population size is 50, the number of iterations is 10, the variable dimension is 3, the number of hidden layer nodes ranges from 10 to 200, the initial learning rate ranges from 0.0001 to 0.01, and the maximum training number ranges from 200 to 600.
[0084] Step 2.1: Initialize the topology structure of the GRU neural network model, initialize the population size, the maximum number of iterations, the upper and lower limits of the parameters to be optimized, and the convergence factor of the whale algorithm, and assign the initialized values as the historical optimal values to the parameters of the GRU and train them.
[0085] Step 2.2: Calculate the individual fitness value according to formula (1), find the individual position with the optimal fitness value in the population, and take it as the optimal individual position; the specific process is as follows:
[0086] Suppose a whale population of N individuals is randomly generated in a D-dimensional space, with a maximum number of iterations T, and each individual represents a solution to the problem, then the position of the ith individual in the tth generation is:
[0087]
[0088] The optimal position of the entire population at the tth generation is:
[0089]
[0090] In the surrounding prey stage: when an individual in the population searches for a target in a certain space, the individual that is close to the target will gradually approach the target from the current position through a random route, and other individuals will indirectly approach the optimal target by approaching the individual, the specific mathematical formulas are (4) and (5):
[0091]
[0092]
[0093] where t is the current iteration number, is the updated position vector, is the current best position, || is the modulo operation, is the difference between the best position and the current position of the individual, and are coefficient vectors, their expressions are (6) and (7):
[0094]
[0095]
[0096]
[0097] In formula (6) and (7), and is a random vector with values [0,1]; T is the maximum number of iterations; is a convergence factor, which decreases linearly from 2 to 0 with the increase of the number of iterations;
[0098] In the shrinkage phase: the individuals in the population attack the target in a spiral shrinkage manner, which can establish a mathematical model of formula (9):
[0099]
[0100]
[0101] In the formula, represents the distance of the ith individual from the target, since the individual's behavior of spiral updating position and shrinking search space occurs simultaneously, at the position update, the current behavior of the individual is determined by taking the probability p=0.5 as the threshold, according to different probabilities to select the corresponding iteration mode, the specific expression is as follows formula (11):
[0102]
[0103] In the formula, p is a random number in [0,1], b is a constant of logarithmic spiral shape, and l is a random number in [-1,1].
[0104] In the prey search phase: the above two stages are carried out under the premise of known target position, at this time |A|<1, if |A|≥1, at this time the population has not found the target position, the particle needs to search the prey through different random ways, this process is the stage of searching the target, its mathematical expression is as follows (12) and (13):
[0105]
[0106]
[0107] In the formula, is a randomly selected position vector from the current population;
[0108] Step 2.3: update the vector parameters of the coefficients in the whale optimization algorithm and Randomly generate a probability p, p∈(0,1), update the strategy according to the parameter p, select the way of whale surrounding predation, and update the position of whale individuals;
[0109] Step 2.4: Determine whether the whale optimization algorithm meets the termination condition, i.e. reaches the maximum number of iterations or the fitness value tends to be stable, when the algorithm termination condition is met, output the optimal hidden layer node number, initial learning rate, maximum training number to GRU neural network, thus the optimized WGRU network structure is obtained; otherwise, jump to step 2.2.
[0110] Step 3, decompose the original ship attitude data by using complete set empirical mode decomposition, use the decomposed data to train the WGRU network, and obtain the trained CWGRU combined prediction model;
[0111] Step 3.1: Obtain the ship motion attitude sequence, normalize the original attitude sequence by using formula (2),
[0112]
[0113] In the formula, x i is the input data, where i = 1, 2, …, m, x max is the maximum value in the original data, x min is the minimum value in the data, and X i is the normalized ship attitude data.
[0114] Step 3.2: Add a set of positive and negative opposite noise signals to the normalized ship attitude data, and the amplitude of the new noise signal is equal, as shown in formula (3) and formula (4),
[0115]
[0116]
[0117] In the formula: x(t) is the original signal, is the positive noise; is the negative noise.
[0118] Step 3.3: Find all extreme values in the signal s(t), get the upper envelope line u(t) and the lower envelope line v(t) of s(t), and calculate the mean value m1(t) of the upper and lower envelopes:
[0119]
[0120] Step 3.4: Delete m1(t) from the signal s(t), and let the difference be 1(t):
[0121] h1(t) = (t) - 1(t) (6)
[0122] Step 3.5: Determine whether 1(t) satisfies the condition for the end of IMF decomposition, if not, let 1(t) as the new signal amount s(t); repeat the above steps until 1(t) satisfies the condition for the end of IMF decomposition; then, the first component of IMF can be expressed as c1(t):
[0123] c1(t) = h1(t) (7)
[0124] After the original signal s(t) is subtracted by c1(t), the remaining component can be expressed as r1(t):
[0125] r1(t) = s(t) - c1(t) (8)
[0126] Step 3.6: Use the remaining component r1(t) as the new original signal, and repeat the above process, and the other IMF components of s(t) can be obtained, i.e., c n (t).
[0127] Step 3.7: After the above decomposition, the original signal s(t) can be expressed by the IMF components and the remaining component;
[0128]
[0129] where the expressions of c i (t) and r n (t) are shown in equations (10) and (11).
[0130]
[0131]
[0132] Step 3.8: Input each IMF component c i (t) and the remaining component r n (t) into the optimized WGRU neural network in step 2.4 for training, calculate the loss function, and use the backpropagation algorithm to continuously adjust the weights of the neural network, when the maximum training times are reached, the optimized CWGRU neural network model can be obtained;
[0133] Step 3.9: In the ship attitude data prediction stage, use the CWGRU model obtained in step 3.8 to perform steps 3.1 to 3.8 on the to-be-predicted ship attitude data, and predict each IMF component and the remaining component r n (t) respectively, to obtain each predicted component The predicted value of the ship attitude can be obtained by superimposing each component
[0134] Step 4, the ship motion posture is predicted by using the trained CWGRU combination prediction model.
[0135] The prediction results and errors of the CWGRU model of the application and the traditional GRU or WOA-GRU model are as follows:
[0136] Table 1 heave displacement error statistical results
[0137]
[0138] Table 2 roll angle error statistical results
[0139]
[0140] Table 3 pitch angle error statistical results
[0141]
[0142]
[0143] As can be seen from Tables 1-3, the CWGRU model relative to the GRU model and the WGRU model: in the prediction of heave displacement, the root mean square error (RMSE) of the prediction result is reduced by 0.0571 m and 0.0362 m, respectively, and the mean absolute percentage error (MAPE) is reduced by 9.38% and 7.17%, respectively; in the prediction of roll angle, the RMSE is reduced by 0.0991° and 0.0508°, respectively, and the MAPE is reduced by 6.83% and 3.73%, respectively; in the prediction of pitch angle, the RMSE is reduced by 0.0752° and 0.0229°, respectively, and the MAPE is reduced by 9.24% and 3.70%, respectively. From the R 2 value, the CWGRU model has a value closer to 1 relative to other models, and the comprehensive analysis of the three indicators shows that the CWGRU model is a more effective ship motion posture prediction method. 2
[0144] As can be seen from Figure 1 , the prediction results of the three models are basically consistent with the change curve of the actual value, and can reflect the change law of the data. Relative to the other two models, the prediction result of the CWGRU combination prediction model has the smallest root mean square error and mean absolute percentage error, indicating that its prediction accuracy is generally higher than that of the other two models, and has better prediction effect on the ship motion posture with non-stationary and nonlinear characteristics.
[0145] It can be seen that the neural network prediction model CWGRU based on the combination of the complementary set empirical mode decomposition and the whale optimization of the gated recurrent unit (GRU) is used for predicting the heave displacement, roll angle and pitch angle in the ship motion attitude data. In order to verify the prediction effectiveness of the model, the measured ship motion attitude data are selected in the experiment, and are compared with the GRU and WGRU network models. The results show that the correlation coefficient of the CWGRU network model in the ship motion attitude prediction is up to 0.9897.
[0146] The whale optimization algorithm is introduced to optimize the hyperparameters of the gated recurrent unit neural network, considering the nonlinear characteristics of the ship attitude data, the complete set empirical mode decomposition method is used for decomposing the original data, and finally the heave displacement, roll angle and pitch angle in the ship navigation attitude data are predicted. The algorithm solves the problems of low prediction accuracy, high model complexity, large amount of historical data and tedious mathematical calculation in the prior art.
[0147] Although the embodiments of the present application have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and should not be construed as limiting the present application, and any technical solutions falling within the concept of the present application are within the protection scope of the present application. It should be pointed out that those skilled in the art can make changes, modifications, replacements and deformations to the above-mentioned embodiments within the scope of the present application.
Claims
1. A method for predicting the motion posture of a ship based on multiple combinations, characterized in that, The specific operation steps are as follows: Step 1, selecting the number of hidden layer nodes, the initial learning rate and the maximum training times as the hyperparameters of the neural network to be optimized, determining the initialization parameters of the whale optimization algorithm and the fitness function; Step 2, training the GRU neural network using the whale optimization algorithm to obtain the optimized WGRU neural network model; the specific steps are as follows: Step 2.1: initialize the topology structure of the GRU neural network model, initialize the population size, the maximum iteration number, the upper and lower limits of the parameters to be optimized and the convergence factor of the whale optimization algorithm, assign the initialized values as the historical optimal values to the parameters of the GRU and train them; Step 2.2: calculate the individual fitness value according to formula (1), find the individual position with the optimal fitness value in the population, and take it as the optimal individual position; the specific steps are as follows: A whale colony of N individuals is randomly generated in a D-dimensional space, with a maximum number of iterations of G. Each individual represents a solution to the problem, and the position of the Nth individual in the Gth generation is: In the first generation the optimal position for the entire population is: In the surrounding prey stage: when the individuals in the population search for the target in a certain space, the individuals close to the target will gradually approach the target from the current position through a random route, and the other individuals will approach the optimal target indirectly by taking the individual as the target, and the specific mathematical formula is shown in (4) and (5): where: is the current iteration number, is the updated position vector, is the current best position, is the modulo operation, is the difference between the best position and the current position of the individual, and are the coefficient vectors whose expressions are (6) and (7): In formulas (6) and (7), and is a random vector with values ; is the maximum number of iterations; is a convergence factor that linearly decreases from 2 to 0 as the number of iterations increases. In the shrinkage surrounding stage: the individuals in the population attack the target in a spiral shrinkage manner, and this behavior can be modeled by formula (9): where d represents the distance of the individual to the target Since the individual's behavior of spiral updating position and reducing search space occurs simultaneously, at the position updating time, the individual will choose the corresponding iteration mode according to the different probabilities, and the specific expression is as follows (11): The threshold value is used to determine the current behavior of the individual, and the corresponding iteration mode is selected according to the different probabilities, and the specific expression is as follows (11): (11) wherein is a random number, is a constant of logarithmic spiral shape, is a random number; In the prey search stage: the above two stages are carried out under the premise of known target position, at this time If At this time, the population has not found the target position, and the particles need to search for prey through different random ways. This process is the stage of searching for the target, and its mathematical expressions are as follows (12) and (13): wherein is a position vector randomly selected from the current population; Step 2.3: Update the vector parameter of the coefficient in the whale optimization algorithm and , randomly generate the probability , according to the parameter update strategy, select the way of whale surrounding hunting, update the position of whale individual; Step 2.4: determine whether the whale optimization algorithm meets the termination condition, i.e. reaches the maximum iteration number or the fitness value tends to be stable, when the algorithm termination condition is met, output the optimal hidden layer node number, initial learning rate and maximum training times to the GRU neural network, thus obtaining the optimized WGRU network structure; otherwise, jump to step 2.2; Step 3, decompose the original ship attitude data using complete set empirical mode decomposition, and train the WGRU network using the decomposed data to obtain the trained CWGRU combined prediction model; Step 4, use the trained CWGRU combined prediction model to predict the ship motion attitude.
2. The multi-combination based ship motion posture prediction method according to claim 1, characterized in that, The parameters of the whale optimization algorithm in step 2 include a search population, the number of iterations, the variable dimension, the number of hidden layer nodes, the initial learning rate, and the upper and lower limits of the maximum training number; the search population size is 50, the number of iterations is 10, the variable dimension is 3, the number of hidden layer nodes ranges from , the initial learning rate is , and the maximum training number is .
3. The multi-combined based ship motion posture prediction method according to claim 2, wherein, In the step 1, the mean absolute percentage error is selected As the fitness function of whale optimization algorithm, the fitness function is defined as shown in formula (1): wherein, is the i-th predicted value in the prediction result, is the i-th true value in the data sample, is the i-th predicted value in the prediction result, is the i-th true value in the data sample, is the number of prediction samples, it can be seen that the closer the predicted value is to the true value, the smaller the fitness function value is.
4. The multi-combined based ship motion posture prediction method according to claim 2, wherein, The specific steps of step 3 are as follows: Step 3.1: obtain the ship motion attitude sequence, normalize the original attitude sequence using formula (2), wherein is the input data, wherein , is the maximum value in the original data, is the minimum value in the data, is the normalized ship attitude data; Step 3.2: add a set of positive and negative noise signals to the normalized ship attitude data, and the amplitude of the new noise signal is equal, as shown in formula (3), formula (4), wherein: is the original signal, is the positive noise; is the negative noise; Step 3.3: Finding the signal of all the extrema, get the upper envelope and the lower envelope and compute the mean of the upper and lower envelopes : Step 3.4: Delete from the signal , let the difference be : Step 3.5: judging whether the condition for the end of the IMF decomposition is met, and if not, setting a new signal ; repeating the above steps until the condition for the end of the IMF decomposition is met; then, the first component of the IMF can be expressed as original signal subtracting After that, the remaining component can be expressed as : Step 3.6: Use the remaining components as the new original signal and repeat the above procedure, and so on. other IMFs components, i.e. ; Step 3.7: After the decomposition described above, the original signal may be expressed in terms of the IMF components and the residual component; wherein and The expressions of (10), (11) are seen in the formula Step 3.8: input each IMF component and the residual component into the optimized WGRU neural network in step 2.4 for training, calculate the loss function, and continuously adjust the weights of the neural network using the backpropagation algorithm. When the maximum number of training times is reached, the optimized CWGRU neural network model is obtained. Step 3.9: In the ship attitude data prediction stage, the CWGRU model obtained in step 3.8 is used to predict the decomposed IMFs and the residual obtained in steps 3.1 to 3.8, and the predicted values of the ship attitude are obtained by superimposing the predicted values of the respective components .
Citation Information
Patent Citations
Wind wing attack angle optimization control method and system considering ship stability and energy efficiency
CN112591037A
Unmanned ship control motion forecasting method
CN115421483A