Extremely-short-term ship motion attitude prediction method and system under multi-dimensional coupling characteristic

Through the GRU network model and feature selection technology with integrated attention mechanism, the complexity problem of multi-dimensional coupled data processing in extremely short-term prediction of ship motion posture is solved, and the prediction accuracy and model adaptability are significantly improved.

CN120087198AInactive Publication Date: 2025-06-03HARBIN ENG UNIV

Patent Information

Application Number
CN202510135243.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-07
Publication Date
2025-06-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the extremely short-term prediction of ship motion posture, facing complex multi-dimensional coupled data processing and high computational complexity problems, traditional methods are difficult to effectively learn nonlinear and complex time series patterns, resulting in insufficient prediction accuracy.

Method used

The GRU network model with an integrated attention mechanism is used to analyze strong correlation features through Spearman coefficient and maximum information coefficient, construct input feature sequences, and reduce the amount of data trained by model through feature selection, improving the adaptability and universality of the model.

Benefits of technology

The extremely short-term prediction accuracy of ship motion posture is significantly improved, especially in the prediction of roll and pitch angles. The accuracy improvement of at least 9.6% and 17.8% was achieved in data sets 1 to 4, respectively, which enhanced the adaptability and versatility of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120087198A_ABST
    Figure CN120087198A_ABST
Patent Text Reader

Abstract

The invention provides an extremely-short-term ship motion attitude prediction method and system under a multi-dimensional coupling characteristic aiming at a multi-dimensional coupling challenge encountered in extremely-short-term ship motion attitude prediction, and relates to the field of ship motion attitude prediction. The method comprises the steps of collecting original attitude information of a ship; analyzing the relationship between each pair of variables in the original attitude information through a Spearman coefficient and a maximum information coefficient to obtain strong correlation characteristics; carrying out load correlation analysis on the strong correlation characteristics and historical data, and constructing an input characteristic sequence; training and evaluating the GRU network model of the integrated attention mechanism by adopting the input feature sequence, and adjusting network parameters of the GRU network model of the integrated attention mechanism to obtain an optimal GRU network model of the integrated attention mechanism; and predicting the attitude information of the ship by adopting the optimal GRU network model integrated with the attention mechanism to obtain a prediction result. The method is suitable for ship motion data characteristics under different sea conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of ship motion attitude prediction, and particularly to an extremely short-term ship motion attitude prediction method under multi-dimensional coupling characteristics. Background Art

[0002] For ship operations at sea, accurate motion attitude prediction provides key auxiliary decision-making information for achieving precise control and selecting the optimal operation timing, thereby enhancing the safety and efficiency of sea operations. For example, ships carrying sensitive goods can also effectively reduce losses during transportation by adjusting the route and speed. In terms of ship design and optimization, motion attitude prediction can provide reference data, and designers can reasonably optimize the hull structure, stability, and power system based on the prediction results. In addition, intelligent ships also need accurate motion attitude information to ensure that the ship can adapt to the complex and changeable marine environment in real time and successfully execute complex navigation tasks such as automatic collision avoidance and course control.

[0003] Ship motion attitude prediction is generally divided into extremely short-term prediction, short-term prediction, and long-term prediction. Extremely short-term prediction focuses on timely and deterministic estimation of ship motion attitude within minutes or even seconds; short-term prediction is used for fine optimization of ship design and route planning, where hydrodynamics and probability statistics are usually predicted in hours; long-term prediction is usually deployed in the preliminary design stage of the ship and refers to predicting the maximum motion response amplitude that the ship may experience during its entire life cycle. Among them, extremely short-term ship motion attitude prediction is a key research topic in the fields of ocean engineering and navigation, providing theoretical support and technical guarantee for the safe navigation, efficient operation, and hull design of ships. And improving the accuracy of predicting ship motion attitude is the core of this topic.

[0004] Ship motion dynamics is relatively complex, involving multiple interdependent factors, and there will be mutual influences between degrees of freedom. And some environmental factors such as sea waves, wind, and water flow will also affect the ship attitude. For example, wind causes the hull to yaw, and sea waves may affect the roll and pitch of the ship simultaneously. Multi-dimensional coupling data consists of multiple related variables, and the complex interactions between these variables provide rich information for the prediction model but also increase the complexity of the learning process. The mutual dependence and dynamic changes of features require the model to have a certain degree of adaptability. The high computational complexity in dealing with multi-dimensional non-linear coupling data is also an issue that cannot be ignored. Therefore, it is crucial to adopt an efficient feature selection method to enhance the model's processing of key feature information and also plays a key role in improving the efficiency of large-scale multi-dimensional data processing.

[0005] Reasonable and accurate short-term ship motion attitude prediction is the basis for ensuring the safe and stable operation of ships at sea. For a one-dimensional ship motion time series prediction model, the influence of other internal factors does not need to be considered. However, in complex coupled motions, the coupled motions generated by ships pose the following challenges to the prediction of roll and pitch angles: (1) the high complexity and uncertainty of actual ship sway data; (2) the effective learning ability for non-linear and complex time series patterns in high-precision prediction; (3) the limitations of traditional methods and some time series analysis methods in dealing with these complexities; (4) the need to ensure prediction accuracy in complex sea conditions. Summary of the Invention

[0006] In view of the above challenges encountered in short-term ship motion attitude prediction, the present invention proposes a short-term ship motion attitude prediction method under multi-dimensional coupling characteristics.

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] The present invention provides a short-term ship motion attitude prediction method under multi-dimensional coupling characteristics, and the prediction method includes the following steps:

[0009] Step S1: Collect the original attitude information of the ship;

[0010] Step S2: Analyze the relationship between each pair of variables in the original attitude information through the Spearman coefficient and the maximum information coefficient to obtain strongly correlated features;

[0011] Step S3: Conduct load correlation analysis on the strongly correlated features and historical data to construct an input feature sequence;

[0012] Step S4: Use the input feature sequence to train and evaluate the GRU network model with an integrated attention mechanism, adjust the network parameters of the GRU network model with an integrated attention mechanism, and obtain the optimal GRU network model with an integrated attention mechanism;

[0013] Step S5: Use the optimal GRU network model with an integrated attention mechanism to predict the attitude information of the ship and obtain a prediction result.

[0014] Further, an inertial measurement unit is used to collect the original attitude information of the ship at a sampling frequency of 20 Hz.

[0015] Further, the above attitude information is ship motion data at different speeds, including three pairs of variables, namely: roll angle under X-axis speed, pitch angle under Y-axis speed, and heading angle under Z-axis speed.

[0016] Further, the above Spearman coefficient is expressed as:

[0017]

[0018] where d i is the difference between the ranks of each observation of two variables; N is the number of observations, ranging from -1 to 1, where -1 indicates perfect negative correlation, 0 indicates no linear relationship, and 1 indicates perfect positive correlation.

[0019] Furthermore, the network parameters for adjusting the GRU network model of the above integrated attention mechanism include the learning rate, the number of neurons, the number of training epochs, and the batch size.

[0020] Furthermore, the GRU network model of the above integrated attention mechanism is:

[0021] GRU network:

[0022] r t = σ(W r · [h t-1 , x t )

[0023] z t = σ(W z · [h t-1 , x t )

[0024]

[0025] where r t is the reset gate; z t is the update gate; x t is the current input; is the sum of the current input and the previous hidden layer state; h t is the hidden layer output after updating the memory; W r and W z are the weight matrices of the reset gate and the update gate respectively; W h is the weight matrix of the hidden layer; σ and tanh are the Sigmoid activation function and the hyperbolic tangent activation function respectively;

[0026] Attention mechanism:

[0027]

[0028] where is the unnormalized attention feature of the i-th GRU network at time t; is the attention weight of the i-th GRU network; W e and b eThey are all parameters of the attention layer to be trained; the attention vector at time t is obtained by weighted summation of the outputs of each GRU.

[0029] Further, the above step S5 is specifically as follows:

[0030] Step S51: Input the input feature sequence into the GRU network model;

[0031] Step S52: Weight the output of the GRU network model using the weights learned by the attention mechanism, and perform weighted summation to generate a new feature vector;

[0032] Step S53: Integrate the new feature vector using a fully connected layer to obtain the final prediction result.

[0033] The method for predicting the very short-term ship motion attitude under multi-dimensional coupling characteristics according to the present invention can be entirely implemented by computer software. Therefore, correspondingly, the present invention also provides a system for predicting the very short-term ship motion attitude under multi-dimensional coupling characteristics. The prediction system includes a storage device, and the storage device is used to execute the method for predicting the very short-term ship motion attitude under multi-dimensional coupling characteristics described above.

[0034] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the computer program executes the method for predicting the very short-term ship motion attitude under multi-dimensional coupling characteristics described in any one of the above.

[0035] The present invention also provides a computer device, which includes a memory and a processor. A computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the method for predicting the very short-term ship motion attitude under multi-dimensional coupling characteristics described in any one of the above.

[0036] The beneficial effects of the present invention are as follows:

[0037] 1. The present invention proposes a method for predicting the very short-term ship motion attitude under multi-dimensional coupling characteristics. First, feature selection helps to remove unimportant or duplicate features in the data, reducing the amount of data to be processed during model training, thereby reducing the complexity of the model and the training time. Secondly, the attention mechanism enables the model to focus on the features that are most important for the current task, especially effective when dealing with problems with multiple input features and complex patterns.

[0038] Furthermore, through the comparative analysis of single-factor and multi-factor models of real ship data at different ship speeds, the results of the present invention emphasize the significant advantages of the proposed method in terms of prediction accuracy and reliability, achieving at least a 9.6% improvement in accuracy in the roll datasets 1 to 4. Similar results were also obtained in pitch prediction, with an accuracy improvement of at least 17.8% in datasets 1 to 4.

[0039] By comprehensively considering the correlation between variables and utilizing deep features, the present invention improves the prediction accuracy of the model and has better adaptability and generality to adapt to the characteristics of ship motion data under different sea conditions. By introducing an advanced hybrid intelligent model to enhance the model's learning ability for non-linear features, the prediction accuracy of key motion parameters such as ship roll and pitch is further improved to support safer and more stable maritime navigation activities. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is the operation block diagram of a method for predicting short-term ship motion postures under multi-dimensional coupling characteristics according to the present invention;

[0041] Figure 2 is the heat map result of Spearman correlation coefficients under different datasets according to the present invention. Among them, Figure (a) is the heat map result of Spearman correlation coefficients for dataset 1, and Figure (b) is the heat map result of Spearman correlation coefficients for dataset 2;

[0042] Figure 3 is the heat map result of P-values under different datasets according to the present invention. Among them, Figure (a) is the heat map result of P-values for dataset 1, and Figure (b) is the heat map result of P-values for dataset 2;

[0043] Figure 4 is the maximum information coefficient value between the roll angle and other ship motion variables in dataset 1 according to the present invention;

[0044] Figure 5 is the maximum information coefficient value between the roll angle and other ship motion variables in dataset 2 according to the present invention;

[0045] Figure 6 is the structural diagram of the GRU network according to the present invention;

[0046] Figure 7 is the schematic diagram of the structure of the ship motion posture predictor and the sliding input process of multi-dimensional variable data according to the present invention;

[0047] Figure 8 is the acquisition time and statistical information of different original data according to the present invention;

[0048] Figure 9It is the time series diagram of each feature quantity of the original data set 1 described in the present invention under a ship speed of 5 knots. Among them, Figure (a) is the time series diagram of the roll angle, Figure (b) is the time series diagram of the pitch angle, Figure (c) is the time series diagram of the heading angle, Figure (d) is the time series diagram of the X-axis speed, Figure (e) is the time series diagram of the Y-axis speed, and Figure (f) is the time series diagram of the Z-axis speed;

[0049] Figure 10 It is the time series diagram of each feature quantity of the original data set 2 described in the present invention under a ship speed of 24 knots. Among them, Figure (a) is the time series diagram of the roll angle, Figure (b) is the time series diagram of the pitch angle, Figure (c) is the time series diagram of the heading angle, Figure (d) is the time series diagram of the X-axis speed, Figure (e) is the time series diagram of the Y-axis speed, and Figure (f) is the time series diagram of the Z-axis speed;

[0050] Figure 11 It is the roll prediction result of different benchmark methods when considering coupling factors described in the present invention;

[0051] Figure 12 It is the average MAE roll angle prediction result of different data sets described in the present invention;

[0052] Figure 13 It is the scatter plot result between the predicted value and the actual value with a confidence interval of 95%. Among them, Figure (a) is the method proposed in the present invention, Figure (b) is the MFSG algorithm, Figure (c) is the NFSG algorithm, and Figure (d) is the MFSLA algorithm;

[0053] Figure 14 It is the scatter plot result between the predicted value and the actual value. Among them, Figure (a) is the method proposed in the present invention, Figure (b) is the MFSG algorithm, Figure (c) is the NFSG algorithm, and Figure (d) is the MFSLA algorithm;

[0054] Figure 15 It is the average MAE roll angle prediction result of different data sets described in the present invention. Specific Embodiments

[0055] The following further elaborates on the specific embodiments of the present invention with reference to the accompanying drawings. The following embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several changes and improvements can still be made, and these all fall within the protection scope of the present invention.

[0056] Embodiment 1. Refer to Figure 1To describe this embodiment, in view of the multi-dimensional coupling challenges encountered in the very short-term ship motion attitude prediction, a very short-term ship motion attitude prediction method under multi-dimensional coupling characteristics is proposed. The prediction method includes the following steps:

[0057] Step S1: Collect the original attitude information of the ship;

[0058] Step S2: Analyze the relationship between each pair of variables in the original attitude information through the Spearman coefficient and the maximum information coefficient to obtain strongly correlated features;

[0059] Step S3: Perform load correlation analysis on the strongly correlated features and historical data to construct an input feature sequence;

[0060] Step S4: Use the input feature sequence to train and evaluate the GRU network model with an integrated attention mechanism, and adjust the network parameters of the GRU network model with an integrated attention mechanism to obtain the optimal GRU network model with an integrated attention mechanism;

[0061] Step S5: Use the optimal GRU network model with an integrated attention mechanism to predict the attitude information of the ship to obtain a prediction result.

[0062] When this embodiment is actually applied, as Figure 1 shown, the prediction method goes through three main stages: feature selection, construction of a multi-dimensional predictor based on the attention mechanism, and overall performance evaluation. Among them, feature selection and the attention mechanism are crucial for data-driven models.

[0063] Among them, the feature selection stage aims to select the most influential features for prediction from the original data set to enhance the prediction accuracy and computational efficiency of the model, while reducing the possibility of overfitting. This embodiment adopts a feature selection strategy based on correlation analysis to reduce redundancy in prediction, thereby reducing the dimension and complexity of the input data.

[0064] As an inherent part of the prediction model, the attention mechanism dynamically assigns weights to each sample in the data during the training and prediction stages. In this embodiment, the attention mechanism inside the prediction model brings additional flexibility and dynamic focus points to the model, thereby optimizing the prediction performance.

[0065] The detailed process of the prediction method is as follows:

[0066] (1) Data collection: Use an inertial measurement unit to collect the original attitude information of the ship at a sampling frequency of 20 Hz. The original attitude information is the ship motion data at different speeds, including three pairs of variables, namely: the roll angle under the X-axis speed, the pitch angle under the Y-axis speed, and the heading angle under the Z-axis speed.

[0067] (2) Feature selection and data reconstruction: First, the relationship between each pair of variables is deeply analyzed through the Spearman coefficient and the Maximal Information Coefficient (MIC) to ensure a full understanding of the connection between the two variables. Then, an input feature sequence is systematically constructed based on the historical load correlation.

[0068] (3) Predictor construction: A GRU network model integrated with an attention mechanism is constructed. This mechanism enhances the model's attention to relevant sequences in the data to improve the prediction accuracy.

[0069] (4) Network parameter adjustment: The network parameters, including the learning rate, the number of neurons, the number of training epochs, and the batch size, are adjusted according to the model error to determine the optimal model parameters that can minimize the loss function.

[0070] (5) Model evaluation: Performance metrics such as the Root Mean Square Error (RMSE) and the Mean Absolute Error (MAE) are used to quantitatively evaluate the real-time prediction accuracy of the model. This process clarifies the complete path from feature selection to model evaluation, ensuring the transparency and reproducibility of the research.

[0071] Embodiment 2. Refer to Figures 2 to 5 In this embodiment, a specific description is made of the feature selection in a very short-term ship motion attitude prediction method under multi-dimensional coupling characteristics described in Embodiment 1 above;

[0072] This embodiment selects feature selection as the data preprocessing of the original ship attitude information, aiming to select the most beneficial feature subset for model training from the original feature set, reduce the computational cost, and improve the performance of the prediction model. The purpose of feature selection is to eliminate irrelevant features and redundant features and retain the features most useful for the prediction task.

[0073] For the problem of very short-term ship motion attitude prediction with multi-variable coupling, theoretically, the introduction of multi-variable time series can effectively improve the modeling effect of complex systems. However, in practical applications, the construction of multi-variable prediction models is affected by the interaction characteristics between variables, which to a certain extent affects the prediction effect of the models. Therefore, in order to solve the correlation between variables in this embodiment, the relationship between each pair of variables in the original attitude information is analyzed by using the Spearman coefficient and the Maximal Information Coefficient to obtain strongly correlated features.

[0074] Among them, the Spearman coefficient is used to analyze the strength of the monotonic relationship between variables, especially when the data does not meet the assumptions of other correlation coefficients.

[0075] The Spearman coefficient is specifically:

[0076]

[0077] where d i is the difference between the ranks of each observation of two variables; N ranges from -1 to 1, where -1 indicates a perfect negative correlation, 0 indicates no linear relationship, and 1 indicates a perfect positive correlation. The larger the absolute value of the coefficient, the stronger the correlation between the variables.

[0078] By collecting two datasets: Dataset 1 and Dataset 2, Spearman's rank coefficient analysis is performed to quantify the correlation between different features. The results of the heatmap of Spearman correlation coefficients for different datasets are obtained as shown in Figure 2 and through Figure 2 (a) and Figure 2 (b), the distribution of Spearman coefficients between variables can be observed. This analysis uses a monotonic equation to evaluate the degree of correlation between two statistical variables.

[0079] Specifically, from Figure 2 (a), it can be seen that the correlation coefficients between roll, pitch, and heading angle are 0.4 and 0.02 respectively, indicating a certain degree of correlation between them. At the same time, the correlation coefficients between roll angle and different speed features are -0.42, -0.66, and 0.35 respectively, showing a significant correlation between variables. From Figure 2 (b), it can be seen that the correlation between the ship's motion attitude angle and the linear velocity is relatively significant, while the correlation between attitude angles is relatively weak. These analysis results provide a quantitative basis for further exploring the dynamic characteristics of the ship's motion attitude and its relationship with other related variables.

[0080] Figure 3 (a) and Figure 3 (b) respectively show the corresponding p-value analysis to verify the statistical significance of the observed correlations. Specifically, Figure 3 (a) shows that there is no statistically significant association between the heading angle and the Z-axis velocity (p-value is 0.873), and the correlation between roll and heading also does not reach statistical significance (p-value is 0.312). Although the relationship between pitch and heading is close to significance, it does not meet the standard at the 0.05 significance level. In addition, the p-values of other feature pairs are all 0.000, indicating a strong statistically significant relationship between them. It should be noted that the exact p-value of 0.000 may be due to rounding, and in fact, this value should be a very small but non-zero number. In Figure 3 (b), most variables show statistically significant correlations, which implies that there may be complex interdependencies between these variables in Dataset 2. Given the variable and non-linear nature of real-world phenomena, the relationships between these data cannot be simplified into basic mathematical forms, and this analysis emphasizes the necessity of considering these complex relationships in multivariate time series prediction.

[0081] Given the complex interdependencies prevalent in the data, this embodiment evaluates the correlation between different data categories by adopting the Maximal Information Coefficient (MIC), thereby revealing diverse association types.

[0082] Among them, the maximal information coefficient is specifically:

[0083] Define X and Y as two random variables, where X = {x 1 , x 2 ,... x i}, Y = {y 1 , y 2 ,... y i}, and the mutual information between them can be calculated by the following formula:

[0084]

[0085] Among them, p(x, y) is the joint probability density function of X and Y, and p(x) and p(y) are the marginal probability density functions of variables X and Y respectively. Select the maximum value of the mutual information in different ways as the mutual information value of the x×y grid, denoted as MI(X, Y). Then normalize it to obtain the maximal information coefficient value, as shown in the following formula:

[0086]

[0087] Among them, T is the upper limit of the grid partition of x×y and increases with the number of samples included in the dataset. It is usually set to n 0.6 , where n represents the number of samples. Still based on Dataset 1 and Dataset 2, the detailed results between their respective features are as shown in Figure 4 and Figure 5 .

[0088] In the data shown in Figure 4 , the roll angle and the heading angle show the strongest correlation, followed by the Y-axis speed, and the correlation coefficient reaches 0.38. The correlation coefficient between the roll angle and the speed is 0.31, while the correlation with the Z-axis speed is relatively weak, and the correlation coefficient is only 0.19. For the pitch angle, the correlation between it and the heading angle is the most significant, reaching 0.58. In Figure 5The correlation analysis shows that the correlation between the roll angle and the heading angle remains the strongest, followed by the correlation coefficient of the Z-axis speed, which is 0.29. In contrast, the correlation between the roll angle and the Y-axis speed is the weakest, with a correlation coefficient of 0.15, and the correlation with the ship speed is also relatively low, at 0.18. Regarding the pitch angle, its correlation with the Y-axis speed is the strongest, and its correlations with the heading angle, X-axis speed, Z-axis speed, and ship speed are relatively weak, with the correlation coefficient varying between 0.17 and 0.19. It should be noted that the correlation here does not directly equal causation.

[0089] Embodiment 3. Refer to Figure 6 and Figure 7 to illustrate this embodiment. This embodiment specifically describes the GRU network model with an integrated attention mechanism described in the above embodiment;

[0090] The GRU network proposed in this embodiment includes an update gate and a reset gate. Through these two gating mechanisms, the problems of long-term dependence and gradient disappearance or explosion faced by traditional RNN networks are solved. Among them, the update gate is responsible for controlling the transmission of historical information, while the reset gate determines how to combine new inputs with past memories. These gating mechanisms work together to optimize the processing of information flow, thereby enhancing the model's learning ability for time series data and showing significant advantages in long sequence prediction. As Figure 6 shows the structure of the GRU network and clearly demonstrates the operating mechanisms of the update gate and the reset gate. Figure 6 In, the arrow direction represents the data flow in the network, and the update gate z t is mainly responsible for controlling the amount of information transmitted from the previous hidden state to the current moment, realizing the selective forgetting of old information. The reset gate r t controls the degree of combination of the current input and the previous hidden state, realizing the selective maintenance of historical information. The closer the values of these two gates are to 0, the more inclined they are to forget past information; when these values are close to 1, it means that more historical information is retained. The specific calculation process can be described in detail by the following mathematical expressions.

[0091] r t =σ(W r ·[h t-1 , x t )

[0092] z t =σ(W z ·[h t-1 , x t )

[0093]

[0094] Among them, r t is the reset gate; zt is the update gate; x t is the current input; is the sum of the current input and the previous hidden layer state; h t is the hidden layer output after updating the memory; W r and W z are the weight matrices of the reset gate and the update gate respectively; W h is the weight matrix of the hidden layer; σ and tanh are the Sigmoid activation function and the hyperbolic tangent activation function respectively.

[0095] The attention mechanism proposed in this embodiment is used to enhance the model's response ability to key information. After introducing the attention mechanism into the GRU network, the model can dynamically assign weights to the input at each time step, and optimize the processing effect of the model by weighting according to the importance of the input data. Specifically, the model applies the attention weights calculated at each time step to the corresponding input data to generate the weighted input, so as to achieve differential processing of information at different time steps. The relevant mathematical expressions are as follows:

[0096]

[0097] Among them, is the unnormalized attention feature of the i-th GRU network at time t; is the attention weight of the i-th GRU network; W e and b e are all parameters of the attention layer to be trained; the attention vector at time t is obtained by weighted summation of the outputs of each GRU. The calculation formula is as follows:

[0098]

[0099] Therefore, the GRU network model with the integrated attention mechanism proposed in the above embodiment can effectively focus on the key time steps. By introducing the attention mechanism, not only the performance of the model on a specific data set is improved, but also its generalization ability to unseen data is enhanced. This performance improvement is attributed to the model's ability to identify patterns that have a significant impact on the prediction results, rather than simply memorizing specific features in the data set. The detailed predictor structure is as Figure 7 shown.

[0100] Specifically: The GRU network model integrated with an attention mechanism weights the output of the GRU network through the learned attention weights to highlight the scale features most critical for prediction, and performs weighted summation to generate a new feature vector. Subsequently, a fully connected layer integrates these features and outputs the final prediction result. Variable selection is achieved through an independent attention mechanism, which avoids conflicts between variables during model training. Although feature selection is usually used as a preprocessing step to remove irrelevant or redundant variables before data is input into the neural network, the introduction of the attention mechanism adds dynamics to this process and functions during model operation. In this hybrid method, feature selection acts as a preliminary screening mechanism, effectively separating the key attributes in the dataset. Subsequently, the attention mechanism further optimizes these feature subsets by dynamically assigning different importance to these selected features according to their relevance to the target variable in a specific prediction context. This method fully embodies the advantages of the combination of feature selection and the attention mechanism, enhancing the accuracy and generalization ability of the model.

[0101] Embodiment 4. This embodiment analyzes the complexity of a method for predicting the short-term ship motion attitude under multi-dimensional coupling characteristics proposed in the above embodiment:

[0102] For the overall multi-variable coupling framework described above, the overall computational complexity will be affected by the feature selection process and the structure of the model itself, and can be quantified through the following process. (1) Computational complexity of feature selection. The MIC is used as the feature selection method, and the computational complexity of this part mainly depends on the number of features m and the number of samples n. For each pair of features, the complexity of calculating the MIC can be approximated as O(nlogn), which involves sorting the data and calculating the information content. If it is necessary to evaluate all possible combinations of feature pairs, the total complexity will be O(m 2 ×nlogn). (2) Computational complexity of the prediction model. The structure using the GRU layer has the advantage of improved computational efficiency compared to the LSTM because it only has an update gate and a reset gate inside, while each unit in the LSTM has an input gate, a forget gate, and an output gate, and the GRU simplifies the required number of parameters and computational steps. In terms of the number of parameters, the parameters involved in each GRU unit include the weight matrix and the bias term, and each weight matrix and bias are related to the current input x t and the previous hidden state h t-1 . For each time step, the GRU needs to calculate the activation values of two gates and a new candidate hidden state. The calculation of each gate involves dot product, addition, and activation functions. The calculation of the candidate hidden state also involves dot product, addition, and activation functions. Assuming that the dimension of the input features is n and the dimension of the hidden layer is d, the number of parameters involved in the calculation of each gate is n×d + d 2Considering there are two gates and one hidden state update, the overall computational complexity is O(3×(n×d + d 2 ))). Compared with the O(4×(n×d + d 2 )) of LSTM, the computational complexity of GRU is slightly lower. When the model includes GRU layers and the attention mechanism, the overall time complexity is approximately O(T×(k×3×(n×d + d 2 ))), where T is the number of iterations during the training process and k is the sequence length. Replacing LSTM with GRU can reduce the time complexity and improve the computational efficiency, especially in terms of the number of parameters and the operations per step. This improvement in efficiency can be particularly important when dealing with long sequences or in resource-constrained environments.

[0103] In practical applications, feature selection helps remove irrelevant or duplicate features in the data, which can reduce the amount of data to be processed during model training, thereby reducing the complexity and training time of the model. The complexity of feature selection may be relatively high, especially when the number of features is large. Once feature selection is completed, the complexity of the model training part mainly depends on the number of selected features, the length of the sequence, and the number of iterations of the model. The attention mechanism enables the model to focus on the features most important for the current task, which is particularly effective when dealing with problems with multiple input features and complex patterns. This directed attention can generally improve the prediction accuracy of the model. Compared with traditional feature selection methods, the attention mechanism can dynamically select important features at each prediction step, making the model more flexible and effective when dealing with data such as time series or in changing environments.

[0104] Embodiment 5. Refer to Figure 8 the figures to illustrate this embodiment. This embodiment conducts a performance analysis through simulation on the ultra-short-term ship motion attitude prediction method under the multi-dimensional coupling characteristics described in the above embodiment:

[0105] Experimental data preparation:

[0106] All the experimental data sets are sourced from the inertial measurement units installed on ships with a displacement of approximately 2000 tons. The IMU operates at a sampling frequency of 20 Hz and provides real-time ship motion attitude data through solid-state gyroscopes and accelerometers. To ensure the comprehensiveness and extensiveness of the research data, multiple data sets were collected under different weather conditions, time periods, and ship speeds, such as Figure 8As shown, the table contains the specific time and basic statistical characteristics of four groups of data. Each data set covers the roll, pitch, heading angle of the ship, as well as the speed data of the X-axis, Y-axis, Z-axis and the speed of the ship. The ship's motion is affected by various factors, including passive external environmental factors such as waves and wind speed, and active control factors such as speed and heading. The collected data reflects the dynamic changes and unpredictability of the marine environment, and it is challenging to accurately obtain real-time data related to external factors. This embodiment is based on multi-dimensional data obtained from sensors, and verifies its effectiveness and reliability in actual application scenarios by testing the proposed model on data reflecting the actual maritime operation environment.

[0107] Figure 9 and Figure 10 shows the characteristics of the eigenvalue changes over time in Data Set 1 and Data Set 2, and these two data sets are selected for analysis. During the construction of the prediction model, the first 80% length of the data in each data set is divided into the training set for model training and tuning, while the remaining 20% of the data is used as the test set to evaluate the prediction performance of the model.

[0108] The specific analysis of the roll angle prediction results is as follows:

[0109] This embodiment constructs and compares prediction models based on different feature sets. These models are divided into two categories: single-target variable prediction models and multi-factor coupling prediction models. The single-target variable prediction model only covers the ship roll or pitch time series in a single data set as input features, while the multi-factor coupling prediction model comprehensively considers all potential input features.

[0110] According to the above embodiment, the heading angle and Y-axis speed in Data Set 1 are identified as the most relevant features for the roll angle; for Data Set 2, the heading angle and Z-axis speed are selected to optimize the prediction performance. In the consideration of coupling factors for ship roll prediction, the multi-feature selection and integrated GRU attention mechanism framework MFSGA proposed in this embodiment is compared and analyzed with methods such as MFSLA, MFA, and MGA. As Figure 11 shown, it can be seen from the figure that LSTM with an attention mechanism can assign different weights to different parts of the input sequence, enabling the model to focus on the most relevant input information, especially when a specific paragraph of the time series has a greater impact on the prediction result. MGA provides performance similar to LSTM, but due to its simpler internal structure, that is, a more efficient learning process is achieved through the merger of the update gate and the forget gate. MFSLA focuses on identifying and utilizing the most critical features from the input data, which is particularly crucial when dealing with high-dimensional data sets or when the relationship between input features and target variables is not significant.

[0111] To further verify the robustness of the proposed algorithm, 50 repeated experiments were also conducted on the prediction of the roll angle in this embodiment, and different sequence lengths were applied to each dataset to achieve a comprehensive evaluation. Figure 12 By visualizing the average error of the model prediction, the overall situation of the model prediction consistency was shown. Specifically, a 10-fold cross-validation method was adopted, that is, the original dataset was divided into 10 subsets of equal size. In each iteration, the model was trained on 9 subsets and validated on the 10th subset. This process was repeated 50 times to ensure that each subset had a chance to be used as the validation set once. By calculating the average performance and variance of 10 iterations, it was possible to more reliably evaluate the prediction ability and stability of the model.

[0112] Datasets 1 and 2 were used as examples to show the comparison of the roll angle results between the observed values and the predicted values, which were presented respectively in Figure 13 and Figure 14 These figures showed the distribution relationship between the predicted values and the actual values through scatter plots, which helped to intuitively understand the correlation between the two. In each scatter plot, a fitted line was drawn to reveal the possible association pattern between the actual values and the predicted values. The denser the points around the fitted line, the smaller the deviation between the actual values and the predicted values, indicating a higher accuracy of the prediction model. On the contrary, the dispersion of the scatter distribution might imply insufficient accuracy of the prediction model.

[0113] Furthermore, a 95% confidence interval could be used to probabilistically evaluate the position of the true value based on the model prediction. A comprehensive analysis also involved evaluating the width of the confidence interval and the distribution of the actual values within the interval, which helped to judge the accuracy and reliability of the model. The narrowness of the confidence interval reflected the accuracy of the prediction; the narrower the interval, the smaller the uncertainty of the prediction and the higher the accuracy. And the consistency of the width change indicated the stability of the prediction accuracy, while different widths might imply the variability of the prediction accuracy. Based on the above analysis, the prediction algorithm proposed in the present invention showed significant advantages.

[0114] Figure 14 (a), 14(b), 14(c) and Figure 14 (d) intuitively showed the effectiveness of various prediction methods and clearly demonstrated the prediction accuracy achieved by each method. Obviously, integrating the attention mechanism in the neural network could significantly improve the prediction accuracy. Further, although considering multiple factors without feature selection might enhance the performance, this usually required more computing resources. By implementing the selection of original features and excluding non-critical variables, the prediction accuracy of the model was significantly improved. It was particularly worth emphasizing that the proposed model showed stable performance under different sailing conditions, as shown by its performance on Dataset 2. This reflected the adaptability and robustness of the model in different environments and conditions.

[0115] The analysis of the pitch angle prediction results is specifically as follows:

[0116] In this embodiment, the heading angle prediction experiment for each data set is repeated 50 times, and the relevant average error is shown in Figure 15 . The analysis results reveal that processing time series prediction tasks containing multiple variables is challenging because of the interdependence between the original variables. Directly using these variables as the input of the model may increase the computational burden and may affect the prediction accuracy. Nevertheless, the proposed model demonstrates good real-time performance and prediction accuracy in sea trials, verifying its ability to provide effective decision support in practical navigation applications. By integrating the optimized prediction model into the ship system, the attitude data collected by the inertial measurement unit can be processed in real time, and efficient and accurate prediction results can be provided. In summary, the experimental results verify the effectiveness of this model in selecting the input features most relevant to the prediction target, and demonstrate the practicality and superiority of the proposed method by using real data sets under different ship speeds, providing a solid theoretical and empirical basis for its further application.

[0117] In summary, this embodiment deeply studies the complexity of multi-dimensional correlated motion data input, and effectively utilizes the information of each dimension to improve the computational efficiency and ensure the prediction accuracy. In practical applications, the prediction framework proposed in this paper uses the relevant information for coupled factor analysis, and combines the gated recurrent unit and the attention mechanism to prune and screen the coupled factors of roll and pitch. First, feature selection helps to remove the unimportant or redundant features in the data, reducing the amount of data to be processed during model training, thereby reducing the complexity of the model and the training time. Second, the attention mechanism enables the model to focus on the features most important for the current task, which is particularly effective when dealing with problems with multiple input features and complex patterns. The real-time application of the proposed algorithm is verified on an experimental platform based on a real ship. Through the comparative analysis of single-factor and multi-factor models of real ship data at different ship speeds, the results emphasize the significant advantages of the proposed algorithm in terms of prediction accuracy and reliability, achieving at least a 9.6% accuracy improvement in roll data sets 1 to 4 respectively. Similar results are also obtained in pitch prediction, with the accuracy increasing by at least 17.8% in data sets 1 to 4.

[0118] The above are only the embodiments of the present invention and do not limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the scope of the claims of the present invention.

Claims

1. A very short-term ship motion attitude prediction method under multi-dimensional coupling characteristics, characterized in that: The method is: S1: Collect the original attitude information of the ship; S2: Analyze the relationship between each pair of variables in the original posture information through the Spearman coefficient and the maximum information coefficient to obtain strong correlation features; S3: Perform load correlation analysis on the strong correlation features and historical data to construct an input feature sequence; S4: using the input feature sequence to train and evaluate the GRU network model with integrated attention mechanism, adjusting the network parameters of the GRU network model with integrated attention mechanism, and obtaining the optimal GRU network model with integrated attention mechanism; S5: Use the optimal GRU network model with integrated attention mechanism to predict the ship’s posture information and obtain the prediction results.

2. The method for predicting extremely short-term ship motion attitude under multi-dimensional coupling characteristics according to claim 1 is characterized in that: The inertial measurement unit is used to collect the original attitude information of the ship at a sampling frequency of 20 Hz.

3. The method for predicting extremely short-term ship motion attitude under multi-dimensional coupling characteristics according to claim 2 is characterized in that: The original attitude information is the ship motion data at different speeds, including three pairs of variables: the roll angle at the X-axis speed, the pitch angle at the Y-axis speed, and the heading angle at the Z-axis speed.

4. The method for predicting extremely short-term ship motion attitude under multi-dimensional coupling characteristics according to claim 1 is characterized in that: The Spearman coefficient is expressed as: Among them, d i is the difference between the ranks of each observation of the two variables; N is the number of observations and ranges from -1 to 1, with -1 indicating a perfect negative correlation, 0 indicating no linear relationship, and 1 indicating a perfect positive correlation.

5. The method for predicting extremely short-term ship motion attitude under multi-dimensional coupling characteristics according to claim 1 is characterized in that: The network parameters of the GRU network model with integrated attention mechanism are adjusted, including learning rate, number of neurons, number of training rounds, and batch size.

6. The method for predicting extremely short-term ship motion attitude under multi-dimensional coupling characteristics according to claim 1 is characterized in that: The GRU network model with integrated attention mechanism is: GRU network: r t =σ(W r ·[h t-1 ,x t ]) z t =σ(W z ·[h t-1 ,x t ]) Among them, r t is the reset gate; z t is the update gate; x t is the current input; is the sum of the current input and the previous hidden state; h t is the hidden layer output after updating the memory; W r and W z are the weight matrices of the reset gate and the update gate respectively; W h is the weight matrix of the hidden layer; σ and tanh are the Sigmoid activation function and the hyperbolic tangent activation function respectively; Attention Mechanism: in, is the unnormalized attention feature of the i-th GRU network at time t; is the attention weight of the i-th GRU network; W e and b e are the parameters of the attention layer to be trained; the attention vector at time t is obtained by weighted summing the outputs of each GRU.

7. The method for predicting extremely short-term ship motion attitude under multi-dimensional coupling characteristics according to claim 6 is characterized in that: S5 is as follows: S51: Input the input feature sequence into the GRU network model; S52: Use the weights learned by the attention mechanism to weight the output of the GRU network model, and perform weighted summation to generate a new feature vector; S53: Use the fully connected layer to integrate the new feature vector to obtain the final prediction result.

8. The extremely short-term ship motion attitude prediction system under multi-dimensional coupling characteristics is characterized by: The system comprises a storage device for executing the method and steps described in claim 1.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the method for predicting the extremely short-term ship motion posture under multi-dimensional coupling characteristics as described in any one of claims 1 to 7.

10. A computer device, characterized in that: The device includes a memory and a processor, wherein a computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the extremely short-term ship motion posture prediction method under multi-dimensional coupling characteristics described in any one of claims 1-7.

Citation Information

Patent Citations

  • Ship traffic flow prediction method based on improved space-time diagram attention neural network

    CN116612664A

  • CNN-LSTM ship motion attitude prediction method based on time sequence mode attention mechanism

    CN118964836A

  • Lateral Oscillation Motion Prediction System of Ship Using Machine Learning Technique

    KR102258257B1

Cited By

  • Steady-state identification method based on multi-element and multi-dimensional characteristics of cold atom absolute gravimeter

    CN120270440A

  • Secondary network unbalance detection method, system and equipment for heat supply system

    CN120926486A

  • A secondary network imbalance detection method, system and device for a heating system

    CN120926486B