Extremely-short-term ship motion attitude prediction method and system based on data enhancement
Through the data expansion method based on Slim generation adversarial filling network, the problem of insufficient completeness of the input data of the extremely short-term prediction model of ship motion posture is solved, the data quality and model generalization performance are improved, and more accurate and flexible prediction effects are achieved.
Patent Information
- Application Number
- CN202510135242.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-06-06
AI Technical Summary
The very short-term prediction model input data is insufficient, which affects the data quality and model generalization performance.
The original observation ship attitude data is expanded by using a Slim-generated adversarial filling network. Through the adaptive sliding window length adjustment strategy and time correlation analysis, a fill data matrix is generated and the real data matrix is verified through the discriminator to form an expanded data set.
Through data augmentation technology, we ensure the data quality and time correlation of the training samples, enhance the ability to extract rich motion characteristics, and improve the accuracy and adaptability of the prediction model.
Smart Images

Figure CN120105875A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ship motion attitude prediction, and in particular to an extremely short-term ship motion attitude prediction method based on data enhancement. Background Art
[0002] For ship operations at sea, accurate motion posture prediction provides key auxiliary decision-making information for achieving precise control and selecting the best time for operations, thereby improving the safety and efficiency of maritime operations. For example, ships carrying sensitive cargo can also effectively reduce losses during transportation by adjusting routes and speeds. In terms of ship design and optimization, motion posture prediction can provide reference data, and designers can reasonably optimize the hull structure, stability and power system based on the prediction results. In addition, smart ships also need to use accurate motion posture information to ensure that the ship can adapt to the complex and changing marine environment in real time and successfully perform complex navigation tasks such as automatic collision avoidance and heading control.
[0003] Ship motion attitude prediction is generally divided into very short-term prediction, short-term prediction and long-term prediction. Very short-term prediction focuses on timely deterministic estimation of ship motion attitude within a few minutes or even seconds; short-term prediction is used for fine optimization of ship design and route planning, in which hydrodynamics and probability statistics are usually predicted in hours; long-term prediction is usually deployed in the preliminary design stage of the ship, which refers to the prediction of the maximum motion response amplitude that may occur in the entire life cycle of the ship. Among them, the very short-term prediction of ship motion attitude is a key research topic in the field of marine engineering and marine navigation, providing theoretical support and technical guarantee for the safe navigation, efficient operation and hull design of ships. Improving the accuracy of predicting ship motion attitude is the inherent core of this topic.
[0004] From a technical perspective, the short-term prediction of ship motion attitude integrates knowledge from multiple disciplines such as fluid mechanics, ship dynamics, signal processing, statistical analysis, and data science. In the prediction process, the accuracy, real-time and efficiency of the prediction algorithm must be taken into account, which is a typical complex system prediction research. In general, the research methods of short-term prediction of ship motion attitude can be divided into model-driven methods based on mechanism models and data-driven methods.
[0005] Among them, the prediction method based on the mechanism model uses the in-depth understanding of the ship dynamic model or kinematics to describe the ship dynamics, including the effect of the propeller and the influence of environmental disturbances (such as wind, waves, etc.) on the ship's motion. When the model is properly constructed and the parameter estimation is accurate, reliable predictions can usually be made. However, this may be difficult to achieve in practical applications, and parameter drift and adaptive correction with the environment need to be improved. In the model-driven method research based on the establishment of mechanism models, researchers need to participate in depth and derive the characteristics of the object based on a deep understanding of the internal mechanisms and principles of the research object. This method involves using appropriate mathematical expressions to express the causal relationship between variables according to functional requirements. Therefore, when the application scenario changes, it can be expanded by refining the model or adjusting parameters, thereby enhancing the adaptability of the model. To ensure the integrity and rationality of the model, it must be continuously optimized through long-term testing and verification. On the other hand, the construction of the mechanism model requires a large number of parameters, such as the ship's square coefficient, draft, waterline width, waterline length and other basic parameters of the ship in the hydrodynamic coefficient formula of the significant wave height, wave intensity, fluid inertia force and moment considering the wave factor. If these parameters do not match the actual situation, the output of the model will be biased and the accuracy of the model will be reduced. Therefore, how to use the acquired data to achieve effective prediction of complex systems has become a hot issue that needs to be solved urgently, and many researchers have begun to turn to data-based prediction models.
[0006] Existing data-driven very short-term forecasting models can generally be divided into the following categories: time series models, neural network models, and ensemble learning models. However, there are still many challenges in the practical application of data-driven very short-term ship motion attitude prediction technology, such as: incomplete time series data affects data integrity and quality. Incomplete data will weaken the learning effect of the prediction model, thereby limiting the model's ability to obtain comprehensive characteristics of ship motion, and may miss key abnormal situations, which are also important for adjusting the model to prevent potential risks. Similarly, noise in the data set will interfere with the model learning process and affect the accuracy of prediction. In addition, the representativeness of the data is crucial to the generalization ability of the model. Lack of representative data will lead to a decline in model performance. Therefore, ensuring the integrity and high quality of the data set is the key to the model's accurate prediction. The accuracy of real-time prediction depends on the optimal amount of sampled data selected in the window, which not only requires a trade-off between prediction accuracy and computational efficiency, but also requires the ability to flexibly adapt to the dynamic changes of the ocean environment and ship motion, which is particularly important for capturing key time series features.
[0007] In summary, one of the core challenges currently faced in the field of data enhancement for data-driven very short-term ship motion posture prediction research is how to ensure the high quality and representativeness of the training data set. The utility of model prediction depends on the wide distribution and diversity of samples, requiring the training data to fully cover the entire learning space. At the same time, for the problem of very short-term motion prediction of ships in a dynamic ocean environment, it is necessary to adapt to real-time changes in data. In addition, when processing time series data, its inherent temporal dependencies must be maintained, which poses additional challenges to the use of complex generative models such as GAN. Although GAN performs well in capturing data distribution, it has shortcomings in training stability and computing resource requirements. Summary of the invention
[0008] Aiming at the problem that the input data of the extremely short-term prediction model of ship motion attitude is insufficient and affects the data quality and model generalization performance, the present invention proposes an extremely short-term ship motion attitude prediction method based on data enhancement.
[0009] To achieve the above object, the present invention provides the following technical solutions:
[0010] The present invention proposes a very short-term ship motion attitude prediction method based on data enhancement, the method comprising the following steps:
[0011] S1: Get the original observation ship attitude data;
[0012] S2: The original observation ship posture data is augmented using the Slim-based generative adversarial filling network to obtain an augmented data set;
[0013] S3: Data concatenation and feature scaling of the original observation ship attitude data and the expanded data set;
[0014] S4: Perform time delay correlation analysis on the feature scaled data to determine the optimal sample data, and then divide the optimal sample data into a training set and a test set in proportion, and input them into the prediction model for training;
[0015] S5: Optimize the parameters of the prediction model according to the prediction values of the training set;
[0016] S6: Use the prediction model with optimized parameters to output the prediction value and perform denormalization to obtain the final prediction result.
[0017] Furthermore, the above-mentioned Slim-based generative adversarial filling network includes a generator G and a discriminator D.
[0018] Furthermore, the above step S2 is specifically as follows:
[0019] Adaptive sliding window length adjustment strategy is used to enhance the time series data of the original observation ship attitude data and construct the input matrix;
[0020] The generator G is used to generate the incomplete data set, mask matrix and random matrix in the input matrix into a filling data matrix;
[0021] The discriminator D is used to output the padded data matrix as a real data matrix or a fake data matrix, and the real data matrix is used as an augmented data set.
[0022] Furthermore, the above-mentioned adaptive sliding window length adjustment strategy is specifically: adjusting the window length through error feedback and data variability.
[0023] Furthermore, when the above data is expanded, JS divergence is used to quantify the accuracy.
[0024] Furthermore, the Adam optimizer is used to optimize the framework based on the Slim generative adversarial padding network;
[0025] Bayesian optimization is used to select hyperparameters in the Slim-based generative adversarial filling network.
[0026] Furthermore, three gating units, including a forget gate, an input gate, and an output gate, are added to the recurrent unit of the long short-term memory neural network to serve as a prediction model based on data enhancement.
[0027] The very short-term ship motion attitude prediction method based on data enhancement described in the present invention can be fully implemented using computer software. Therefore, correspondingly, the present invention also provides an very short-term ship motion attitude prediction system based on data enhancement, and the system includes a storage device, which is used to execute the very short-term ship motion attitude prediction method and steps based on data enhancement described above.
[0028] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, any one of the above-mentioned methods for extremely short-term ship motion posture prediction based on data enhancement is executed.
[0029] The present invention also provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes any one of the above-mentioned methods for extremely short-term ship motion posture prediction based on data enhancement.
[0030] The beneficial effects of the present invention are:
[0031] 1. Aiming at the problem that the input data of the extremely short-term prediction model of ship motion attitude is insufficiently complete, which affects the data quality and model generalization performance, the present invention proposes an extremely short-term ship motion attitude prediction method based on data enhancement. The prediction method enhances the ability to extract rich motion characteristics by ensuring the data quality and time correlation of training samples, and uses Jensen-Shannon Divergence (JSD) to measure the generation distribution of samples to evaluate the effectiveness of data expansion.
[0032] 2. The present invention proposes a very short-term ship motion posture prediction method based on data enhancement, which can better capture the motion characteristics of rich data. Data enhancement technology is used, and the strong correlation of the input sliding window data is ensured by setting the time correlation threshold during the enhancement process. When the data changes greatly, the window size is increased to obtain more motion characteristic information, and when the data is relatively stable, the window size is reduced to improve the response speed and calculation efficiency. Through this real-time feedback mechanism, data sampling and window settings can be continuously adjusted according to the prediction results and actual performance to adapt to the changes in data characteristics caused by changes in the environment.
[0033] The present invention is suitable for extremely short-term ship motion posture prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is an operation block diagram of a very short-term ship motion attitude prediction method based on data enhancement described in the present invention;
[0035] Figure 2 It is a pseudo code algorithm flow chart of a very short-term ship motion attitude prediction method based on data enhancement described in the present invention;
[0036] Figure 3 It is a structural diagram of the Slim-based generative adversarial filling network described in the present invention;
[0037] Figure 4 It is a pseudo code algorithm diagram of the Slim-based generative adversarial filling network described in the present invention;
[0038] Figure 5 It is a pseudo code algorithm flow chart of the Bayesian optimization SGAIN hyperparameters described in the present invention;
[0039] Figure 6 is a schematic diagram of the sliding window data input process of the present invention;
[0040] Figure 7 is a table of definitions of symbols described in the present invention;
[0041] Figure 8 is the data expansion process diagram of the present invention;
[0042] Fig. 9 It is a structural diagram of the long short-term memory neural network (LSTM) described in the present invention;
[0043] Fig.10 is a characteristic curve of the roll angle and pitch angle of the first data set of the present invention changing with time, wherein Figure (a) is a characteristic curve of the roll angle changing with time, and Figure (b) is a characteristic curve of the pitch angle changing with time;
[0044] Fig.11 is a characteristic curve of the roll angle and pitch angle of the second data set of the present invention changing with time, wherein Figure (a) is a characteristic curve of the roll angle changing with time, and Figure (b) is a characteristic curve of the pitch angle changing with time;
[0045] Fig.12 It is the time information and statistical indicators of the six groups of original data of different lengths described in the present invention;
[0046] Fig.13 It is the distribution of observed data and extended data under the 40% data or 80% data enhancement ratio of the present invention, wherein Figure (a) is the distribution under the 40% amplification ratio (DJs=0.0005), and Figure (b) is the distribution under the 80% amplification ratio (DJs=0.0003);
[0047] Fig.14 It is the distribution of observed data and extended data under the 120% data or 160% data enhancement ratio of the present invention, wherein Figure (a) is the distribution under the 120% amplification ratio (DJs=0.0004), and Figure (b) is the distribution under the 160% amplification ratio (DJs=0.0003);
[0048] Fig.15 It is the distribution of observed data and extended data under the 200% data or 260% data enhancement ratio of the present invention, wherein Figure (a) is the distribution under the 200% amplification ratio (DJs=0.00035), and Figure (b) is the distribution under the 260% amplification ratio (DJs=0.0006);
[0049] Fig.16 The MAE results of the roll angle prediction using different data filling methods described in the present invention;
[0050] Fig.17 This is the MAE result of the pitch angle prediction using different data filling methods described in the present invention. DETAILED DESCRIPTION
[0051] The specific embodiments of the present invention are further described in detail below in conjunction with 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, several changes and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
[0052] Implementation method 1, see Figure 1 and Figure 2 This embodiment describes that, in order to solve the problem that the input data of the extremely short-term prediction model of ship motion attitude is insufficient and affects the data quality and model generalization performance, this embodiment proposes an extremely short-term ship motion attitude prediction method based on data enhancement, comprising the following steps:
[0053] Step S1: Obtaining original observation ship attitude data;
[0054] Step S2: Using the Slim-based generative adversarial filling network to perform data augmentation on the original observation ship posture data to obtain an augmented data set;
[0055] Step S3: performing data splicing and feature scaling on the original observation ship attitude data and the expanded data set;
[0056] Step S4: Perform time delay correlation analysis on the feature scaled data to determine the optimal sample data, and then divide the optimal sample data into a training set and a test set in proportion, and input them into the prediction model for training;
[0057] Step S5: Optimizing the parameters of the prediction model according to the prediction values of the training set;
[0058] Step S6: Use the prediction model after parameter optimization to output the prediction value and perform denormalization processing to obtain the final prediction result.
[0059] In practical application, if Figure 1 and Figure 2 As shown, it specifically includes the following stages:
[0060] (1) Data enhancement: Data enhancement methods are used to expand the scale of training samples based on the original ship motion posture data to further enrich the data and reduce the risk of underfitting.
[0061] (2) Data splicing and feature scaling. The original data obtained in the first step and the generated data are horizontally spliced as the input data of the prediction model. Then they are normalized.
[0062] (3) Time delay correlation analysis and data segmentation. The normalized data obtained in the second step is subjected to time delay correlation analysis and the optimal sample data input amount is determined. The collected data is then divided into training sets and test sets in proportion and input into the prediction model for training and optimization.
[0063] (4) Network parameter adjustment. The network parameters are adjusted based on the mean absolute error (MAE) between the predicted values of the training set and the actual values obtained by the above neural network. These parameters include the number of neurons in each layer, the number of training iterations, and the batch size. The optimal solution of the model is determined by repeated experiments to minimize the loss function.
[0064] (5) Prediction output and error analysis: The output of the predicted value is denormalized to obtain the final prediction result and calculate the relevant error.
[0065] Implementation Method 2: See Figures 3 to 8 This embodiment is described. This embodiment is to specifically describe step S2 in the very short-term ship motion posture prediction method based on data enhancement described in the first embodiment above;
[0066] Step S2: Using the Slim-based generative adversarial filling network to perform data augmentation on the original observation ship posture data to obtain an augmented data set;
[0067] Among them, the structure of Slim Generative Adversarial Infill Network (SGAIN) is as follows Figure 3 As shown, it includes a generator G (Generator) and a discriminator D (Disriminator); compared with the traditional generative adversarial filling network (GAIN), the SGAIN network differs from GAIN in that it does not include a prompt generator and therefore does not generate a prompt matrix. Therefore, the architecture of SGAIN is more streamlined than GAIN, with both the generator and the recurrent neural network containing only two layers, while in GAIN, each network has three layers. The main advantage of SGAIN over GAIN in data interpolation lies in its simple architecture. By eliminating the prompt generator and the prompt matrix, SGAIN reduces the number of parameters required to train the model, which may speed up the training process and improve efficiency. Furthermore, the rectified linear unit (ReLU) and tanh activation function embedded in the fully connected function of the SGAIN network contribute to stable implementation. In addition, the linear architecture of SGAIN makes it more suitable for scenarios with smaller data sets and limited computing resources, where GAIN may be too complex and the training computation requirements are too high. The pseudo code of SGAIN is as follows Figure 4 shown.
[0068] Among them, the generator G is specifically:
[0069] The input of the generator is an incomplete data set. The mask matrix M and random matrix Z are used for output As shown in the following formula:
[0070]
[0071] Where N is a uniformly distributed random value and ⊙ represents element-by-element multiplication.
[0072]
[0073] in, Represents the data generated by the generator. In addition, the fully connected layer of the generator is described as follows,
[0074]
[0075] in, Represents the input of the fully connected layer; represents the output of the fully connected layer; W ii represents the weight coefficient; f is the activation function.
[0076] The discriminator D is specifically:
[0077] The main goal of the discriminator is to distinguish between inferred data and real data. Similar to the generator, the model uses a fully connected structure. The input of the discriminator is generated by the generator and represented as The output of the discriminator is either a real data matrix or a fake data matrix.
[0078] Furthermore, Adam is used as the optimization of the SGAIN framework. Similar to the generator, the fully connected layer of the network can be described by the following formula:
[0079]
[0080] in, is the input of the fully connected layer, is the output of the fully connected layer; W ii is the weight coefficient; f is the activation function. In fact, the weight coefficients of the generator and trainer are initialized using Xavier before training. Xavier initialization ensures that the output signal of each layer has a suitable variance by setting the initial value of the weight reasonably, thereby maintaining the stability of the signal throughout the network. The basic assumption behind it is that the linear transformation between input and output should keep the statistical characteristics of the signal as consistent as possible. The weight W of each layer is implemented using the following formula:
[0081]
[0082] or
[0083]
[0084] Among them, n in , n out Represents the number of neurons in the input layer and the output layer respectively; N(·) means the mean is 0 and the variance is 2 normal distribution; U(·) represents uniform distribution, ranging from arrive between.
[0085] The optimization process formulas of the generator and the discriminator are as follows:
[0086]
[0087] Furthermore, the training process of SGAIN is unstable and highly sensitive to the selection of hyperparameters. Therefore, in consideration of the need to ensure the computational efficiency and real-time performance of the algorithm, this embodiment adopts the Bayesian optimization method for hyperparameter selection. The principle of the Bayesian optimization method is to continuously update the posterior distribution of the objective function by adding new sample points. This method only needs to specify the input and output of the optimization objective function without understanding its internal structure and mathematical properties. Figure 5 shown.
[0088] Gaussian Process (GP) is usually used as a proxy model. Gaussian process is a non-parametric Bayesian model that can adapt well to complex objective functions. It is defined as follows:
[0089]
[0090] Among them, m(x) is the mean function, which is usually assumed to be zero; k(x,x′) is the kernel function, and common kernel functions include square exponential (RBF kernel):
[0091]
[0092] The original observation ship posture data is augmented by using the Slim-based generative adversarial filling network constructed above to obtain an augmented data set;
[0093] Specifically:
[0094] Adaptive sliding window length adjustment strategy is used to enhance the time series data of the original observation ship attitude data and construct the input matrix;
[0095] The generator G is used to generate the incomplete data set, mask matrix and random matrix in the input matrix into a filling data matrix;
[0096] The discriminator D is used to output the padded data matrix as a real data matrix or a fake data matrix, and the real data matrix is used as an augmented data set.
[0097] Among them, it is generally believed that more data is conducive to model training, but this does not mean that the more data, the better. Generally speaking, more data can provide richer information, help deep learning models capture more complex features, reduce the risk of overfitting, and improve the generalization ability of the model. However, the benefits of increasing the amount of data do not grow linearly. When the amount of data reaches a certain level, additional data may have a very limited effect on improving model performance. Therefore, this implementation adopts an adaptive sliding window length adjustment strategy to find the balance between the optimal amount of data and model performance.
[0098] The specific adaptive sliding window length adjustment strategy is:
[0099] (1) Error feedback. The window length is adjusted according to the prediction error of the model. If the prediction error increases, the window length may need to be increased to obtain more historical information; if the error decreases, the window length can be reduced to increase the response speed of the model.
[0100] (2) Data variability. Monitor the statistical properties of the data stream (such as variance) and increase the window length when the data becomes more dynamic or unstable to stabilize the model input. The adaptive adjustment of the sliding window is an ongoing optimization process that needs to be based on feedback from actual applications and analysis of the characteristics of new input data.
[0101] This implementation uses an adaptive sliding window length adjustment strategy to find the balance between the optimal data volume and model performance. It ensures high prediction accuracy while optimizing the use of computing resources, thereby achieving the best balance between prediction accuracy and computing efficiency in complex practical application scenarios. By fine-tuning the sliding window parameters, this design not only improves the response speed of the model, but also enhances the adaptability and accuracy of the model in a changing environment.
[0102] Furthermore, time series data enhancement is also required. Unlike images, texts and other types of data in traditional data enhancement tasks, the continuous time series of extremely short-term ship motion postures show adjacent relationships. Therefore, it is necessary to properly resolve the sequence relationship between newly generated samples. Time series data is prone to the problem of being difficult to intuitively determine whether the intrinsic information contained in the time series data has changed during the data conversion process. Therefore, it is necessary to perform correlation analysis based on the time series data to be trained to verify the rationality and effectiveness of sample expansion, thereby improving the problem of poor model prediction performance caused by overfitting. The cropping operation is then performed by specifying windows of different sizes or even variable widths to obtain the continuity of the time series data. Sliding the cropping window on the time axis can obtain new sequence data and realize the sample enhancement process before prediction. For a time series X = {x 1 ,x 2,...x i-1 ,x i ,x i+1 ,...x l}, the window length is W J The window sliding process is as follows Figure 6 shown.
[0103] Based on the above content, an example of data expansion is given:
[0104] The original observation ship attitude data is defined as follows:
[0105]
[0106] Among them, xsl is the lth parameter of timestamp s, The mask matrix is defined as M = (M1, M2, .., Ml), which is consistent with the dimension of X and is a random variable with values in {0, 1}l. Therefore, the cross matrix is recorded as Where * represents the multiplication of the corresponding components of the matrix. After the data estimation process, the new estimated data matrix X is defined in the above formula, and M represents the observable components in X. This embodiment estimates based on the observed hull motion posture data Symbol naming Figure 7 As shown in Figure 8 shown.
[0107] Implementation method three, see Fig. 9 This embodiment is described. This embodiment specifically describes the prediction model described in the first embodiment.
[0108] This implementation uses a long short-term memory neural network (LSTM) as a prediction model.
[0109] Since different neural network methods have been applied to sequence prediction tasks, recurrent neural networks (RNNs) are the most common. RNNs use recursive structures to mine temporal correlations between temporally continuous data points. RNNs and their variants have demonstrated their performance compared to most statistical-based methods. However, RNN-based models suffer from vanishing or exploding gradients, and their prediction performance decreases significantly as the sequence length increases. To address this issue, the present embodiment adds three gating units to the recurrent unit of the long short-term memory neural network, including a forget gate, an input gate, and an output gate. These gating units allow LSTM to selectively forget or retain historical information, thereby alleviating the gradient explosion problem. The structure of the LSTM unit is shown in Figure 2. Fig. 9 shown.
[0110] The specific formula is as follows:
[0111] f t =σ(Wf h t-1 +U f x t +b f )
[0112] i t =σ(W i h t-1 +U i x t +b i )
[0113]
[0114] o t =σ(W o h t-1 +U o x t +b o )
[0115] c t =f t ⊙c -1 +i t ⊙c t
[0116] Among them, W f and U f , W i and U i , W c and U c , W o and U o is the weight matrix; b f , b i , b c and b o is the bias matrix; σ is the activation function; i t Represents the output item. It is sent to the tanh function through the output gate to determine the hidden layer at the current time point h t The output value c t , that is: h t =o t ⊙tanh(c t ) where ⊙ represents the product of an element and a vector. In general, LSTM includes two hidden states: one is the slow state c that solves the gradient vanishing problem. t , and the other is a fast state h that makes complex decisions in a short period of time t .
[0117] Implementation 4: This implementation is a specific description of the feature scaling described in the above implementation 1.
[0118] In order to make full use of the time correlation characteristics of the time series, the autocorrelation function of the ship motion attitude sequence must be considered in the forecast. The calculation formula is as follows:
[0119]
[0120] Among them, X t ={x 1 ,x 2 ,···,x n-p}, X s ={x 1+p ,x 2+p ,···,x n}, x i represents one of the observed samples. p represents the lag value. m i and m s They are X t and X s The mean of σ Xt and σ Xs They are X t and X s The variance of .
[0121] Furthermore, the original data set needs to be normalized before the data is input into the network to eliminate the dimensional differences between different data set inputs, and then scaled according to a specific ratio within a set interval. The sample set and the target set should use the same normalization standard to ensure the consistency of neural network training and prediction. The normalization formula is as follows:
[0122]
[0123] Among them, X N is the normalized data, x max and x min Represents the data sequence x i The maximum and minimum values of . Here x i It can be from a to b. In this embodiment, it is set in the range of 0 to 1. After the ship motion prediction is completed, it needs to be denormalized, as shown in the following formula:
[0124] x i =(x max -x min )*X N +x min
[0125] The dataset is then divided into a training dataset and a test dataset, where 80% of the total sample size is used for training and the remaining 20% is used for testing.
[0126] Implementation mode 5: This implementation mode specifically describes the data expansion and result evaluation indicators described in the above implementation mode 1;
[0127] The augmentation process can be quantified by Jensen-Shannon (JS) divergence, and used to verify the improvement of the prediction model performance. JS divergence is a symmetric metric used to measure the difference between two probability distributions. It is calculated by the following formula. The value of JS increases with the degree of difference between the distributions, usually between 0 and 1. When the two distributions are exactly the same, JS divergence is equal to zero, and the closer the value is to 1, the greater the difference in the distributions.
[0128]
[0129] Where P(x) and Q(x) represent the generated sample distribution and the true distribution of the data, respectively. JS The smaller it is, the stronger the ability of the proposed model to learn the real sample distribution and the higher the data quality.
[0130] The root mean square error (RMSE) and mean absolute error (MAE) are used to evaluate the fitting performance of the constructed model between the true value and the predicted value. The calculation formulas of these two evaluation indicators are as follows:
[0131]
[0132] in, represents the predicted value and y represents the observed value.
[0133] In regression tasks, expected squared loss is a key metric used to measure the accuracy of model predictions. It calculates the expected value of the squared difference between the model's predicted value and the actual target value. This metric reflects the model's likely average performance when processing new data, helping us evaluate the model's effectiveness and applicability. The smaller the expected squared loss, the closer the model's predicted results are to the actual results, and the better the model's performance. In practical applications, reducing the expected squared loss is a major goal of optimizing regression models.
[0134] Expected squared loss in regression tasks:
[0135]
[0136] Among them, x is the test sample set. The second term in the above formula is independent of y(x) and originates from the inherent noise in the data. It represents the minimum achievable value of the expected loss. The first term depends on the choice of function y(x). The purpose is to find a y(x) solution that makes this term as small as possible. Because this term is non-negative, ideally its minimum value is expected to be zero. In theory, if there is unlimited data and computing resources, the regression function h(x) can be found accurately, which will be the best fit to y(x). However, in general, only a data set D containing a limited number of data points can be obtained, which forms a natural error in the regression function h(x). Considering the integrand of the first term in the above formula, for a specific data set D, it is written as:
[0137] {y(x;D)-h(x)} 2
[0138] Because this quantity depends on the specific dataset D, it is averaged over the entire set of datasets. And further expand it to get the following formula:
[0139]
[0140] The last term is 0, so the expected squared difference between y(x;D) and the regression function h(x) can be expressed as the sum of two terms. The first term, called the squared deviation, represents how different the average prediction over all datasets is from the expected regression function. The second term, called the variance, measures how much the solution for a single dataset varies around its mean, so this measures how sensitive the function y(x;D) is to the choice of a particular dataset.
[0141] Implementation method 5: See Figures 10 to 17 This embodiment is described. This embodiment is to make simulation results and performance analysis on a very short-term ship motion attitude prediction method based on data enhancement described in the above embodiment:
[0142] Experimental data:
[0143] The experimental data is collected from an inertial measurement unit (IMU) installed on a large ship. The IMU uses solid-state gyroscopes and accelerometers to provide real-time motion attitude measurement with high dynamic accuracy even during acceleration. The sampling frequency of the IMU used here is 20Hz. Fig.10 and 11 The characteristic curves of the roll angle and pitch angle changing with time in two of the data sets are given in FIG. Fig.12The time information and statistical indicators of six sets of raw data of different lengths are listed, and each data set contains the ship's roll and pitch angles. The first 80% of the data set is used as a training set, while the rest constitutes a test set. By designing extended samples of different proportions to be added to the original training data set, the parameters of the neural network model are corrected using the extended training data set to improve the accuracy of the data-driven model. The performance of the neural network model trained on the original data set and the extended data set is tested using the same data set. In addition, this embodiment adopts a cross-validation strategy to evaluate and ensure the versatility of the model on different data subsets.
[0144] Analyze the impact of different augmentation methods on prediction performance:
[0145] JS divergence can provide quantitative results to measure the distribution difference between the expanded data and the original data. Figures 13 to 15 The distribution of the observed roll data set and the expanded data set at different data augmentation rates is shown. The JS divergence value is 0.0005 at 40% augmentation; 0.0003 at 80% augmentation; 0.0004 at 120% augmentation; 0.0003 at 160%; 0.00035 at 200%; and 0.0006 at 260%. At different augmentation ratios, the distribution of the generated samples is relatively similar to that of the observed samples, indicating that the augmentation effect is good.
[0146] In order to perform a more robust evaluation, this embodiment selects spline function, RF, MICE, KNN, GAN and GAIN as benchmark models. KNN weights are based on distance, and 20 neighbor nodes are used here; RF uses 50 estimators; MICE has 50 iterations; GAN has a batch size of 128, 100 iterations, an initial learning rate of 0.001, and sigmoid and ReLU as activation functions. GAIN has two hidden layers, each with 200 units. The Adam optimizer is used with 100 iterations. The algorithm proposed in this embodiment integrates two hidden layers and is also optimized using Adam. Hyperparameter optimization is based on the Bayesian method to further improve the accuracy after data expansion.
[0147] The following is an analysis of the hyperparameter optimization results. The results show that by using 256 hidden units in the generator and discriminator networks of each hidden layer, a small batch training size of 32 and a maximum number of iterations of 1000 provide the best balance between computational efficiency and prediction accuracy. In addition, the best parameter set for the Adam optimizer is 0.001 for the generator and learning rate, 0.9 for the learning rate, and 0.999 for the learning rate. The MICE method uses a different regression model (Bayesian Ridge regression by default) to gradually approximate the value at each iteration. KNN fills the value based on the distance between similar samples. In this data set, the results of the two methods are similar. Although the application of splines is very simple, their accuracy will be affected when faced with complex data. When dealing with multivariate data estimation, RF needs to be trained for each target column to achieve better performance, which requires a lot of computing resources and time.
[0148] Fig.16 The MAE results are displayed to better compare the prediction errors under different augmentation rates. Overall, the error results have a more obvious downward trend, which indicates that the augmentation ratio is not enough to achieve the highest accuracy. As the length of the sample data increases, the performance of the roll data prediction is significantly improved. Assuming that the original sample is set to 500, the prediction model shows higher similarity and performance in some examples. It is worth noting that the error margin of the augmented data set with a 200% increase in sample size is the smallest, which is better than the prediction results of the non-amplified data set. In addition, as the data augmentation ratio increases, the error is also decreasing. However, the ratio of 260% will bring obvious error fluctuations. Overall, the algorithm proposed in the present invention is better than other algorithms with different augmentation ratios, and the overall fluctuation is also small. From the ratio of 80% to 160%, the prediction accuracy of the proposed algorithm does not change much, but it is still at least 8.4% higher than GAN, and it is improved by 14.9% when the augmentation ratio is 260%. RF and KNN perform similarly.
[0149] Similar to the roll angle experiment, the pitch angle prediction results are as follows: Fig.17 As shown. Assuming that the original samples are 600, it can be observed that when the expansion ratio varies between 120% and 240%, the prediction error slowly decreases, while the prediction accuracy has the lowest value at an expansion ratio of 300%. Methods such as KNN and MICE show comparable error results. At an expansion ratio of 60%, the performance of the proposed algorithm is 1.9% and 7.3% higher than that of GAN and KNN, respectively. Compared with the spline algorithm, the performance of the proposed algorithm is improved by 9.12%. When the expansion ratio increases from 240% to 300%, the prediction accuracy of the proposed algorithm increases by about 19.04%, and overall the performance of KNN and GAN is very close.
[0150] In summary, the extremely short-term ship motion attitude prediction method based on data enhancement proposed in the above embodiment can better capture the motion characteristics rich in data. The model utilizes data enhancement technology, and at the same time, the strong correlation of the input sliding window data is ensured by setting the time correlation threshold during the enhancement process. When the data changes greatly, the window size is increased to obtain more motion characteristic information, and when the data is relatively stable, the window size is reduced to improve the response speed and calculation efficiency. Through this real-time feedback mechanism, data sampling and window settings can be continuously adjusted according to the prediction results and actual performance to adapt to the changes in data characteristics caused by changes in the environment. This design also provides an effective solution for the data preprocessing of the extremely short-term ship motion attitude prediction model. Overall, in the experiment of the roll angle, as the expansion ratio increases, the error decreases significantly, especially at an expansion ratio of 200%, the error is the smallest, indicating that an appropriate expansion ratio is crucial to improving the prediction accuracy. However, an expansion ratio of 260% will cause error fluctuations. The algorithm proposed in the present invention performs better than other algorithms at each expansion ratio, especially in the range of 80% to 160%, and the prediction accuracy is stable. For pitch angle prediction, the algorithm proposed in the present invention performs 1.9% and 7.3% higher than GAN and KNN respectively at an expansion ratio of 60%. In the stage of increasing the expansion ratio from 240% to 300%, the prediction accuracy is improved by 19.04%, and the overall performance is better than other algorithms.
[0151] The above description is only the implementation mode of the present invention and is not limited to the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of the claims of the present invention.
Claims
1. A very short-term ship motion attitude prediction method based on data enhancement, characterized in that: The method is: S1: Get the original observation ship attitude data; S2: The original observation ship posture data is augmented using the Slim-based generative adversarial filling network to obtain an augmented data set; S3: Data concatenation and feature scaling of the original observation ship attitude data and the expanded data set; S4: Perform time delay correlation analysis on the feature scaled data to determine the optimal sample data, and then divide the optimal sample data into a training set and a test set in proportion, and input them into the prediction model for training; S5: Optimize the parameters of the prediction model according to the prediction values of the training set; S6: Use the prediction model with optimized parameters to output the prediction value and perform denormalization to obtain the final prediction result.
2. The extremely short-term ship motion attitude prediction method based on data enhancement according to claim 1 is characterized in that: The Slim-based generative adversarial filling network includes a generator G and a discriminator D.
3. The extremely short-term ship motion attitude prediction method based on data enhancement according to claim 2 is characterized in that: S2 is specifically: Adaptive sliding window length adjustment strategy is used to enhance the time series data of the original observation ship attitude data and construct the input matrix; The generator G is used to generate the incomplete data set, mask matrix and random matrix in the input matrix into a filling data matrix; The discriminator D is used to output the padded data matrix as a real data matrix or a fake data matrix, and the real data matrix is used as an augmented data set.
4. The method for extremely short-term ship motion attitude prediction based on data enhancement according to claim 3 is characterized in that: The specific strategy of adaptive sliding window length adjustment is: adjusting the window length through error feedback and data variability.
5. The method for extremely short-term ship motion attitude prediction based on data enhancement according to claim 3 is characterized in that: When data is augmented, JS divergence is used to quantify the accuracy.
6. The method for extremely short-term ship motion attitude prediction based on data enhancement according to claim 2 is characterized in that: The Adam optimizer is used to optimize the framework based on the Slim generative adversarial filling network; Bayesian optimization is used to select hyperparameters in the Slim-based generative adversarial filling network.
7. The method for extremely short-term ship motion attitude prediction based on data enhancement according to claim 1 is characterized in that: Three gating units, including a forget gate, an input gate, and an output gate, are added to the recurrent unit of the long short-term memory neural network to serve as a prediction model based on data enhancement.
8. The extremely short-term ship motion attitude prediction system based on data enhancement is characterized by: The system includes a storage device, which is used to execute the data-enhanced extremely short-term ship motion posture 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 very short-term ship motion attitude prediction method based on data enhancement 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 based on data enhancement as described in any one of claims 1 to 7.
Citation Information
Patent Citations
CNN-GRU-Attention-based ship motion attitude prediction method
CN118364238A
Cited By
Positioning method and device applied to ship environment
CN120891457A
Ship motion simulation and visualization method based on multi-source data fusion and closed-loop correction
CN121671819A
A ship motion simulation and visualization method based on multi-source data fusion and closed-loop correction
CN121671819B
