Non-linear and non-stationary extremely-short-term ship motion attitude prediction method and system
Through the combination of empirical modal decomposition and adaptive particle swarm optimization long and short-term memory network, the accuracy and stability problems of traditional methods in the prediction of nonlinear and non-stationary ship motion attitude data are solved, and more accurate and stable extremely short-term prediction is achieved.
Patent Information
- Application Number
- CN202510135244.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-05-30
AI Technical Summary
When traditional methods deal with nonlinear and non-stationary ship motion attitude data, it is difficult to achieve extremely short-term accurate predictions, especially in harsh marine environments, where prediction accuracy and stability problems exist.
The ship's motion attitude data is denoised by using an empirical modal decomposition (EMD) algorithm, split into independent subsequences, and each subsequence is predicted using a long and short-term memory (LSTM) neural network based on adaptive particle swarm optimization (APSO), and finally the comprehensive prediction results are obtained through weighting and recombination.
It improves the extremely short-term prediction accuracy of the ship's motion posture and the stability of the model, and can effectively predict the ship's motion posture under different marine environments to ensure the safe and stable operation of the ship.
Smart Images

Figure CN120057222A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ship motion attitude prediction, and particularly to an ultra-short-term ship motion attitude prediction method under non-linearity and non-stationarity. Background Art
[0002] For ship offshore operations, accurate motion attitude prediction provides key auxiliary decision-making information for achieving precise control and selecting the best operation timing, thereby enhancing the safety and efficiency of offshore 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 changing 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 ultra-short-term prediction, short-term prediction, and long-term prediction. Ultra-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, ultra-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] Among the six-degree-of-freedom oscillatory motions of a ship, rolling and pitching have particularly serious impacts on offshore operations. To ensure the safety and stability of ship offshore operations, a ship motion attitude prediction method that can make accurate predictions in a very short time is needed. Traditional prediction models based on Kalman filters have limitations in dealing with non-linear and non-stationary data, and it is difficult to meet the requirements of real-time accuracy and stability, especially in harsh marine environments. By using a single RNN data-driven prediction model, only the historical data of ship motion is required. The RNN can remember and transmit previous information to ensure the relevance of the input data, thus achieving good predictions. However, there are the following problems when using a single learning model to predict ship motion: (1) The generalization ability of a single neural network is poor. When dealing with complex ship motion data, problems such as overfitting, gradient disappearance, and unstable training may occur; (2) When dealing with large datasets, simple neural network models may perform unstably and have low accuracy; (3) Due to the non-stationary characteristics of time series data, the instability of the dataset mean and variance affects the prediction accuracy. Therefore, to obtain better prediction results, it is currently necessary to perform data preprocessing through time-frequency signal analysis methods to reduce the influence of non-stationary characteristics. Summary of the Invention
[0005] Aiming at the problems that non-linearity, non-stationarity, and noise will affect the prediction accuracy of the ship motion attitude in the very short term and the stability of the prediction model, the present invention proposes a method for predicting the ship motion attitude in the very short term under non-linearity and non-stationarity.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] The present invention provides a method for predicting the ship motion attitude in the very short term under non-linearity and non-stationarity, and the method includes the following steps:
[0008] Step S1: Obtain the non-stationary motion attitude data of the ship;
[0009] Step S2: Use the empirical mode decomposition algorithm to decompose the time series in the non-stationary motion attitude data of the ship, and split it into several independent subsequences;
[0010] Step S3: Use the long short-term memory neural network based on adaptive particle swarm optimization to predict each subsequence to obtain several prediction results;
[0011] Step S4: Perform weighted sum and data recombination on several prediction results to obtain the final comprehensive prediction result.
[0012] Further, the above step S2 is specifically:
[0013] Step S21: Find all the maximum and minimum points of the time series x(t), and then use the cubic spline function to fit the curve to obtain the upper envelope u(t) and the lower envelope l(t) of the time series x(t);
[0014] Step S22: Calculate the average value of the upper envelope u(t) and the lower envelope l(t) to obtain the average envelope m x ;
[0015] Step S23: Obtain a new time series h according to the average envelope m x ; x ;
[0016] Step S24: Determine whether the new time series h x satisfies the IMF condition. If not, repeat the above steps until the average envelope tends to zero to obtain the first intrinsic mode function imf 1 ;
[0017] Step S25: By subtracting imf from the original time series x(t) 1 , a new time series r without high frequency is obtained xn , and repeat the above steps to obtain the intrinsic modes {imf 2 , imf 3 ,..., imf n};
[0018] Step S26: When r xn cannot be decomposed, r xn is represented as the residual of x(t), and the time series x(t) after the decomposition operation is obtained.
[0019] Furthermore, the above new time series h x is expressed as:
[0020] h x = x(t) - m x .
[0021] Furthermore, the above time series x(t) after the decomposition operation is expressed as:
[0022]
[0023] where r xn represents the trend term of x(t) and does not contain high-frequency components.
[0024] Furthermore, the above method for constructing an adaptive particle swarm optimization-based long short-term memory neural network is as follows:
[0025] Step 1: Obtain the original ship motion attitude data and perform preprocessing;
[0026] Step 2: Initialize the particle swarm parameters, including determining the population size, the number of iterations, the learning factors, and the finite intervals of the particle positions and velocities;
[0027] Step 3: Initialize the long short-term memory neural network structure, including the number of neurons in each layer of the network and the number of hidden layers;
[0028] Step 4: Determine the fitness function by calculating and comparing the fitness values of each particle, and select the optimal particle fitness value;
[0029] Step 5: Calculate and evaluate the particle fitness values based on the differences in the optimal particle fitness values, so as to determine the global optimal position and the local optimal position of the particles;
[0030] Step 6: Update the velocities and positions of the particles using the velocity update formula and the position update formula of the particle swarm optimization algorithm;
[0031] Step 7: Determine whether the particles meet the iteration termination condition. If so, assign the best parameters to the long short-term memory neural network to obtain a long short-term memory neural network based on adaptive particle swarm optimization;
[0032] Step 8: If not, return to Step 3 and continue to execute until the iteration termination condition is met.
[0033] Furthermore, the velocity update formula of the above particle swarm optimization algorithm is:
[0034]
[0035] where w represents the inertia weight, c 1 and c 2 both represent learning factors, r 1 and r 2 are both independent random numbers distributed between 0 and 1, and are the velocity component, position component, individual optimal value, and group global optimal value of the i-th particle in the j-th dimension in the t-th iteration, respectively.
[0036] Furthermore, the position update formula of the above particle swarm optimization algorithm is:
[0037]
[0038] The prediction of the very short-term ship motion attitude under non-linearity and non-stationarity described in the present invention can be fully implemented by computer software. Therefore, correspondingly, the present invention also provides a very short-term ship motion attitude prediction system under non-linearity and non-stationarity. The system includes a storage device, and the storage device is used to execute the very short-term ship motion attitude prediction method under non-linearity and non-stationarity described above.
[0039] 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, it executes the method for predicting the short-term ship motion attitude under non-linearity and non-stationarity described in any one of the above items.
[0040] 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 short-term ship motion attitude under non-linearity and non-stationarity described in any one of the above items.
[0041] The beneficial effects of the present invention are as follows:
[0042] 1. The present invention aims to improve the accuracy of short-term prediction of ship roll angle and pitch angle, and designs an EMD-APSO-LSTM hybrid model combined with a sliding window technique. First, in view of the non-linear and non-stationary characteristics of ship motion time series data, the present invention uses the method based on empirical mode decomposition (EMD) for data denoising to smooth the original data. Second, by introducing the adaptive particle swarm optimization (APSO) algorithm, it aims to optimize the hidden layer structure of the long short-term memory (LSTM) network, thereby enhancing the accuracy of the prediction model.
[0043] The present invention can effectively predict the motion attitude of ships in different ocean environments, providing strong technical support for the safe and stable operation of ships. Description of the Drawings
[0044] Figure 1 is the operation block diagram of a method for predicting the short-term ship motion attitude under non-linearity and non-stationarity described in the present invention;
[0045] Figure 2 is the structural diagram of the Slim generative adversarial inpainting network described in the present invention;
[0046] Figure 3 is the schematic diagram of the sliding window data input process described in the present invention;
[0047] Figure 4 is the process diagram of expanding data described in the present invention;
[0048] Figure 5 is the flowchart of the prediction method of the long short-term memory neural network based on adaptive particle swarm optimization described in the present invention;
[0049] Figure 6 is the different original data sets described in the present invention;
[0050] Figure 7are the original roll angles and recurrence plots of the ship under different data sets of the present invention. Among them, Fig. (a) is the roll angle of data set 1, Fig. (b) is the roll angle of data set 2, Fig. (c) is the roll angle of data set 3, Fig. (d) is the recurrence plot of the roll angle of data set 1, Fig. (e) is the recurrence plot of the roll angle of data set 2, and Fig. (f) is the recurrence plot of the roll angle of data set 3;
[0051] Figure 8 are the original pitch angles and recurrence plots of the ship under different data sets of the present invention. Among them, Fig. (a) is the pitch angle of data set 1, Fig. (b) is the pitch angle of data set 2, Fig. (c) is the pitch angle of data set 3, Fig. (d) is the recurrence plot of the pitch angle of data set 1, Fig. (e) is the recurrence plot of the pitch angle of data set 2, and Fig. (f) is the recurrence plot of the pitch angle of data set 3;
[0052] Figure 9 is the test function for the performance of the adaptive PSO algorithm of the present invention;
[0053] Figure 10 are the optimization iteration results of different test functions of the present invention. Among them, Fig. (a) is the optimization iteration result of the Rosenbrock test function, and Fig. (b) is the optimization iteration result of the Griewank test function;
[0054] Figure 11 are the settings of different model parameters of the present invention;
[0055] Figure 12 are the prediction results of the roll angle training set of different model data sets 1 of the present invention. Among them, Fig. (a) is the comparison of the prediction results of the roll angle training sets of BP, ELM, and LSTM, Fig. (b) is the partial enlarged effect diagram of Fig. (a), Fig. (c) is the comparison of the prediction results of the roll angle training sets of LSTM, BiLSTM, SAELSTM, and the proposed method, and Fig. (d) is the partial enlarged effect diagram of Fig. (c);
[0056] Figure 13 are the prediction results of the roll angle test set of different model data sets 1 of the present invention. Among them, Fig. (a) is the comparison of the prediction results of the roll angle test sets of BP, ELM, and LSTM, Fig. (b) is the partial enlarged effect diagram of Fig. (a), Fig. (c) is the comparison of the prediction results of the roll angle test sets of LSTM, BiLSTM, SAELSTM, and the proposed method, and Fig. (d) is the partial enlarged effect diagram of Fig. (c);
[0057] Figure 14It is the prediction result of the pitch angle training set of the different model data sets 1 described in the present invention. Among them, Figure (a) is the comparison of the prediction results of the pitch angle training sets of BP, ELM, and LSTM. Figure (b) is the enlarged local effect diagram of Figure (a). Figure (c) is the comparison of the prediction results of the pitch angle training sets of LSTM, BiLSTM, SAELSTM, and the proposed method. Figure (d) is the enlarged local effect diagram of Figure (c). Specific implementation manner
[0058] The specific implementation manner of the present invention will be further described in detail below with reference to the accompanying drawings. The following implementation manners 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 belong to the protection scope of the present invention.
[0059] Embodiment 1. Refer to Figure 1 To illustrate this embodiment, in view of the problem that the non-linearity, non-stationarity, and noise will affect the prediction accuracy of the very short-term ship motion attitude and the stability of the prediction model, a method for predicting the very short-term ship motion attitude under non-linearity and non-stationarity is proposed.
[0060] The prediction method includes the following steps:
[0061] Step S1: Obtain the non-stationary motion attitude data of the ship;
[0062] Step S2: Use the empirical mode decomposition algorithm to decompose the time series in the non-stationary motion attitude data of the ship into several independent subsequences;
[0063] Step S3: Use the long short-term memory neural network based on adaptive particle swarm optimization to predict each subsequence to obtain several prediction results;
[0064] Step S4: Perform weighted sum and data recombination on several prediction results to obtain the final comprehensive prediction result.
[0065] In the actual application of this embodiment, considering the non-linear characteristics of the ship motion time series, the empirical mode decomposition algorithm (EMD) is used to preprocess the original time series, aiming to improve the fitting ability and accuracy of the prediction model. The prediction steps are as Figure 1 shown:
[0066] First, use the empirical mode decomposition algorithm (EMD) to perform a decomposition operation on the original time series of ship motion, and split it into several independent subsequences to reveal its inherent dynamic characteristics.
[0067] Secondly, the entire dataset is divided into a training set and a test set. For each subsequence obtained by the empirical mode decomposition algorithm (EMD), an optimized LSTM network with a sliding window mechanism is applied for independent prediction.
[0068] Finally, by integrating the prediction results of each sub-model and through appropriate weighted sum and recombination techniques, the final comprehensive prediction result is constructed.
[0069] Through the above steps, not only is the model's ability to capture the complex dynamics of the ship motion time series enhanced, but also the prediction accuracy is improved, providing an effective solution for the very short-term prediction of the ship motion attitude.
[0070] Embodiment 2. Refer to Figures 2 to 4 This embodiment will be described. This embodiment specifically describes step S1 in the method for very short-term ship motion attitude prediction under non-linearity and non-stationarity described in Embodiment 1 above;
[0071] Step S1: Obtain ship non-stationary motion attitude data;
[0072] After obtaining the ship non-stationary motion attitude data in this embodiment, data augmentation is also performed on the original observed ship attitude data using a Slim generative adversarial inpainting network to obtain an augmented dataset; secondly, the original observed ship attitude data and the augmented dataset are concatenated and feature-scaled; then, time-delay correlation analysis is performed on the feature-scaled data to determine the optimal sample data; finally, the empirical mode decomposition algorithm (EMD) is used to perform a decomposition operation on the time series in the optimal sample data.
[0073] Among them, the structure of the Slim generative adversarial inpainting network (SGAIN) is as Figure 2 shown, including a generator G (Generator) and a discriminator D (Disriminator); compared with the traditional generative adversarial inpainting network (GAIN), the difference between the SGAIN network and GAIN is that it does not include a hint generator and thus does not generate a hint matrix. Therefore, the architecture of SGAIN is more concise than GAIN, and both the generator and the recurrent neural network only contain two layers, while in GAIN, each network has three layers. The main advantage of SGAIN over GAIN in data imputation lies in its simple architecture. By eliminating the hint generator and the hint matrix, SGAIN reduces the number of parameters required to train the model, which may speed up the training process and improve efficiency. Further, the rectified linear unit (ReLU) and tanh activation functions 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 small datasets and limited computing resources, where GAIN may be too complex and have high training computational requirements.
[0074] Among them, the generator G is specifically:
[0075] 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:
[0076]
[0077] Where N is a uniformly distributed random value and ⊙ represents element-by-element multiplication.
[0078]
[0079] in, Represents the data generated by the generator. In addition, the fully connected layer of the generator is described as follows,
[0080]
[0081] 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.
[0082] The discriminator D is specifically:
[0083] 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.
[0084] 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:
[0085]
[0086] 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:
[0087]
[0088] or
[0089]
[0090] where n in ,n out respectively represent the number of neurons in the input layer and the output layer; N(·) represents a normal distribution with a mean of 0 and a variance of ; U(·) represents a uniform distribution, ranging from to .
[0091] The optimization process formulas for the generator and discriminator are as follows respectively:
[0092]
[0093] Furthermore, the training process of SGAIN is unstable and highly sensitive to the selection of hyperparameters. Therefore, in this embodiment, considering the need to ensure the computational efficiency and real-time performance of the algorithm, the Bayesian optimization method is adopted for hyperparameter selection. The principle of the Bayesian optimization method is: 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.
[0094] By using the constructed Slim-based generative adversarial inpainting network to perform data augmentation on the original observed ship attitude data, an augmented data set is obtained;
[0095] Specifically:
[0096] Adopt an adaptive sliding window length adjustment strategy to perform time series data enhancement on the original observed ship attitude data, and construct an input matrix;
[0097] The generator G is used to generate a filled data matrix from the incomplete data set, mask matrix, and random matrix in the input matrix;
[0098] The discriminator D is used to output the filled data matrix as a real data matrix or a forged data matrix, and use the real data matrix as the augmented data set.
[0099] Among them, it is generally considered that a large amount of data is beneficial to model training, but this does not mean that the more data, the better. Generally speaking, more data can provide richer information, help the deep learning model capture more complex features, reduce the risk of overfitting, and improve the generalization ability of the model. However, the benefit of increasing the data volume does not increase linearly. When the data volume reaches a certain level, additional data may have very limited improvement on the model performance. Therefore, in this embodiment, an adaptive sliding window length adjustment strategy is adopted to find the balance point between the optimal data volume and the model performance.
[0100] The adaptive sliding window length adjustment strategy is specifically as follows:
[0101] (1) Error feedback. Adjust the window length according to the prediction error of the model. If the prediction error increases, it may be necessary to increase the window length to obtain more historical information; if the error decreases, the window length can be reduced to improve the response speed of the model.
[0102] (2) Variability of data. Monitor the statistical characteristics (such as variance) of the data stream, and increase the window length when the data becomes more dynamic or unstable to stabilize the input of the model. The adaptive adjustment of the sliding window is an ongoing optimization process, which requires feedback in practical applications and analysis of the characteristics of new input data.
[0103] In this embodiment, by adopting the adaptive sliding window length adjustment strategy, the balance point between the optimal data volume and the model performance is found. While ensuring high prediction accuracy, the use of computing resources is optimized, so as to achieve the best balance between prediction accuracy and computing efficiency in complex practical application scenarios. By finely adjusting 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.
[0104] Furthermore, it is also necessary to perform time series data augmentation. Different from images, texts and other types of data in traditional data augmentation tasks, the very short-term continuous time series of ship motion postures shows adjacent relationships. Therefore, it is necessary to appropriately solve the sequence relationship between newly generated samples. Time series data is prone to the problem that it is difficult to intuitively determine whether the inherent 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, so as to improve the problem of poor model prediction performance caused by overfitting. Then, cropping operations are performed by specifying windows of different sizes or even variable widths to obtain the continuity of time series data. Sliding the cropping window on the time axis can obtain new sequence data, realizing the sample augmentation process before prediction. For a time series X = {x1, x2,... xi-1, xi, xi+1,... xl}, the window sliding process with window length WJ is as Figure 3 shown.
[0105] Based on the above content, an example of data augmentation is given:
[0106] Define the original observed ship attitude data as follows:
[0107]
[0108] where, x slis the l-th parameter of the timestamp s, The mask matrix is defined as M = (M 1 , M 2 ,.., M l ), which is consistent with the X dimension and is a random variable taking values in {0, 1} l . Therefore, the cross matrix is denoted 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. Here, M represents the observable components in X, and the data expansion process is as Figure 4 shown.
[0109] Embodiment 3: This embodiment specifically describes step S2 in a method for predicting the short-term ship motion attitude under non-linearity and non-stationarity described in Embodiment 1 above;
[0110] Step S2: Use the empirical mode decomposition algorithm to decompose the time series in the ship non-stationary motion attitude data into several independent sub-series;
[0111] Specifically, it includes the following steps:
[0112] Step S21: Find all the maximum and minimum points of the time series x(t), and then use the cubic spline function to fit the curve to obtain the upper envelope u(t) and the lower envelope l(t) of the time series x(t);
[0113] Step S22: Calculate the average value of the upper envelope u(t) and the lower envelope l(t) to obtain the average envelope m x ;
[0114] Step S23: Obtain a new time series h x according to the average envelope m x ;
[0115] Step S24: Determine whether the new time series h x satisfies the IMF condition. If not, repeat the above steps until the average envelope tends to zero to obtain the first intrinsic mode function imf 1 ;
[0116] Step S25: By subtracting imf 1 from the original time series x(t), obtain a new time series r xn without high frequency, and repeat the above steps to obtain the intrinsic modes {imf 2 , imf 3 ,..., imf n};
[0117] Step S26: When r xnWhen it cannot be decomposed, r xn is expressed as the residual of x(t), and the time series x(t) after the decomposition operation is obtained.
[0118] In actual application of this embodiment, in the measured data of ship motion, the noise introduced by various random and uncertain factors may interfere with the effective signal and mask the potential prediction pattern, thus affecting the accuracy of the prediction result. Therefore, before predicting the ship motion attitude, it is a crucial step to denoise the original data, which is directly related to the improvement of the prediction model accuracy. Therefore, this embodiment uses the empirical mode decomposition algorithm (EMD) as the data preprocessing of the original time series. By decomposing the signal into a series of intrinsic mode functions, it can adaptively decompose non-stationary and non-linear time series according to the characteristics of the data itself without relying on predefined basis functions. The decomposition process is as follows:
[0119] (1) Find all the maximum and minimum points of the time series x(t), and then use the cubic spline function to fit the curve to obtain the upper envelope and lower envelope of x(t), which can be expressed as u(t) and l(t) respectively.
[0120] (2) Calculate the average value of the upper envelope u(t) and the lower envelope l(t) to obtain the average envelope m x , as shown in the following formula:
[0121]
[0122] (3) The new time series h x can be calculated as:
[0123] h x = x(t) - m x
[0124] (4) Determine whether the new time series h x meets the IMF conditions. If not, repeat the above steps (1), (2), and (3) until the average envelope tends to zero. Then obtain the first intrinsic mode function imf 1 .
[0125] (5) By subtracting imf 1 from the original time series x(t), a new time series r x1 without high frequency is obtained. Repeating the above process, the intrinsic mode functions {imf 2 , imf 3 ,..., imf n} can be obtained. When r xn cannot be decomposed, it is expressed as the residual of x(t). After the above steps, the original time series x(t) can be expressed as:
[0126]
[0127] where r xn represents the trend term of x(t) and does not contain high-frequency components.
[0128] Furthermore, in the process of empirical mode decomposition, one of the core steps is the shifting process, which involves determining the optimal number of shifts and when to stop the decomposition to ensure the physical meaning and accuracy of the decomposition results. In addition, EMD involves two key termination criteria: the component termination condition and the decomposition termination condition, which ensure the effectiveness of the decomposition process and the reliability of the results. The shifting process is a key step in obtaining the intrinsic mode function. Its basic method includes continuously finding the local extreme points of the original signal and performing shifts according to the algorithm steps of EMD until the established stopping conditions are met. This process aims to reduce the asymmetry of the signal, making the waveform symmetric near the zero-mean line to meet the basic characteristic requirements of the IMF. Another consideration in the shifting process is the calculation of the instantaneous frequency, which is obtained through a mathematical transformation of the IMF. To ensure that the decomposition results can retain the original frequency modulation and amplitude modulation characteristics of the signal, the choice of the number of shifts is crucial. Too many shifts may lead to over-smoothing of the decomposition results, and the resulting IMF becomes a frequency modulation signal with a constant amplitude, thus losing the original physical characteristics of the signal. On the contrary, too few shifts may result in the obtained IMF not fully meeting the basic characteristics, affecting the accuracy of the instantaneous frequency and the interpretability of the results. In summary, the selection of the shifting step and the termination criteria in the EMD process play a decisive role in ensuring the effectiveness and reliability of the decomposition results. By precisely controlling the number of shifts and following strict termination criteria, it can be ensured that the EMD decomposition process can not only reflect the essential characteristics of the signal but also provide meaningful physical interpretations, laying a solid foundation for subsequent analysis and applications.
[0129] Embodiment 4. Refer to Figure 5 To illustrate this embodiment, this embodiment specifically describes the long short-term memory neural network based on adaptive particle swarm optimization in a method for predicting the extremely short-term ship motion attitude under non-linearity and non-stationarity described in Embodiment 1 above;
[0130] Non-linearity essentially means that a small change in the input may lead to a large fluctuation in the output, and non-stationarity indicates that the statistical characteristics of the data (such as the mean and variance) will change with the external environmental conditions over time. The uncertainty of the marine environment and sensor noise will further increase the prediction difficulty and reduce the accuracy and reliability of the model. To effectively address these challenges, it is required that the prediction model has a high degree of adaptability and can automatically capture and adjust the response to the dynamic changes of the data.
[0131] Therefore, in this embodiment, a long short-term memory neural network based on adaptive particle swarm optimization is used as the prediction model.
[0132] The construction method of the long short-term memory neural network based on adaptive particle swarm optimization is as follows:
[0133] Step 1: Obtain the original ship motion attitude data and perform preprocessing.
[0134] Step 2: Initialize the particle swarm parameters, including determining the population size, the number of iterations, the learning factors, and the finite intervals of the particle positions and velocities.
[0135] Step 3: Initialize the long short-term memory neural network structure, including the number of neurons in each layer of the network and the number of hidden layers.
[0136] Step 4: Determine the fitness function by calculating and comparing the fitness values of each particle, and select the optimal particle fitness value.
[0137] Step 5: Calculate and evaluate the particle fitness values according to the differences in the optimal particle fitness values, so as to determine the global optimal position and the local optimal position of the particles.
[0138] Step 6: Update the velocities and positions of the particles using the velocity update formula and the position update formula of the particle swarm optimization algorithm.
[0139] Step 7: Determine whether the particles meet the iteration termination condition. If so, assign the best parameters to the long short-term memory neural network to obtain the long short-term memory neural network based on adaptive particle swarm optimization.
[0140] Step 8: If not, return to Step 3 and continue to execute until the iteration termination condition is met.
[0141] In practical applications of this embodiment, the long short-term memory network (LSTM) is selected as the prediction model, and the adaptive particle swarm optimization algorithm is used to optimize its network parameters. In swarm intelligence algorithms, the particle swarm algorithm is selected as a tool for parameter optimization because of its simple structure, high precision, fast convergence ability, and effectiveness in dealing with the extremely short-term prediction problem of ship motion postures. In the particle swarm, the individuals of the algorithm are abstracted as particles in the search space, and they search for the optimal solution in the solution space according to a predefined fitness function. In the initialization stage, the positions and velocities of the particles are randomly generated, and then the particles update their velocities and positions based on individual experience and collective experience. Specifically, each particle not only knows its own historical optimal position but also takes into account the global optimal position in the group and uses it as a guide to dynamically adjust its search trajectory. The core of the particle swarm optimization algorithm lies in the update mechanism of the velocities and positions of the particles. Through this mechanism, the particle swarm can effectively search in the high-dimensional space and converge to the global optimal solution. The update of the particle velocity takes into account the current velocity, the relative distance from the particle to its individual historical optimal position, and the relative distance from the particle to the global optimal position, while the position update directly depends on the new velocity value. This search strategy based on swarm intelligence not only speeds up the optimization process but also increases the possibility of finding the global optimal solution, thus providing an effective method for optimizing the LSTM network parameters. To further improve the performance of the particle swarm algorithm, this embodiment improves the classical particle swarm algorithm, with the focus on the parameter tuning of the particles and the optimization of the dynamic optimization process. Through these improvement measures, it is expected to significantly improve its application effect in the short-term prediction of ship motion postures while ensuring the reliability of the algorithm. The velocity and position update formulas of the particle swarm optimization algorithm are as follows:
[0142] In the process of optimization. Through these improvement measures, it is expected to significantly improve its application effect in the short-term prediction of ship motion postures while ensuring the reliability of the algorithm. The velocity and position update formulas of the particle swarm optimization algorithm are as follows:
[0143]
[0144] where w represents the inertia weight, c 1 and c 2 both represent learning factors, r 1 and r 2 are both independent random numbers distributed between 0 and 1, and are the velocity component, position component, individual optimal value, and group global optimal value of the i-th particle in the j-th dimension in the t-th iteration respectively. The value of w affects the optimization ability of the model. To avoid the premature convergence of the model, this embodiment adopts the adaptive particle swarm algorithm and adaptively adjusts the inertia weight through the following formula:
[0145]
[0146] where w max and w minThey are the maximum and minimum values of w respectively; f is the current fitness value of the particle; f min and f avg represent the current minimum fitness and the average fitness value of all particles respectively.
[0147] In summary, in order to address the instability, non-linearity, and periodic uncertainty presented by ship motion data, this embodiment proposes an APSO-LSTM model that combines the Adaptive Particle Swarm Optimization algorithm (APSO) with the Long Short-Term Memory network. This model adjusts and optimizes the hyperparameters of the LSTM network using the Adaptive Particle Swarm Optimization algorithm, with the aim of achieving higher accuracy and stability in ship motion attitude prediction. The specific implementation process is as Figure 5 shown. The introduction of the Adaptive Particle Swarm Optimization algorithm aims to adapt to the complex characteristics of very short-term ship motion data by dynamically adjusting the search strategy, thereby effectively improving the performance of the LSTM model when processing such data.
[0148] More specifically:
[0149] (1) Preprocess the ship historical motion data and initialize the particle swarm parameters, including determining the population size, the number of iterations, the learning factors, and the finite intervals of the particle positions and velocities.
[0150] (2) Initialize the LSTM network structure, including the number of neurons in each layer of the network and the number of hidden layers.
[0151] (3) Determine the fitness function by calculating and comparing the fitness values of each particle, and select the optimal particle fitness value. The fitness value fit i of the population individual x i with LSTM model parameters is defined as the following formula:
[0152]
[0153] where M and N represent the number of training samples and validation samples respectively; y m and represent the true value and the predicted value of the training samples respectively; y n and represent the true value and the predicted value of the validation samples respectively.
[0154] (4) Calculate and evaluate the particle fitness values based on the differences in particle fitness values. The global optimal position and the local optimal position of the particle are both determined, and the velocity and position of the particle are updated based on the above formula.
[0155] (5) Determine whether the particles meet the iteration termination condition. If the maximum number of iterations is reached, assign the optimal parameters to the LSTM, and perform training and output the short-term ship motion prediction value. Otherwise, return to step 3 and continue to execute until the termination condition is met.
[0156] (6) Assign the obtained optimal result to the connection weights of the LSTM network, and train the prediction model to output the optimal solution of the time series prediction.
[0157] Embodiment 5. This embodiment conducts a complexity analysis on the hybrid LSTM prediction model based on modal decomposition and particle swarm optimization described in the above embodiment;
[0158] The computational complexity analysis of the hybrid LSTM prediction model based on modal decomposition and particle swarm optimization is a comprehensive process, which requires a detailed analysis of the computational complexity of each module and the combined effect. It can be quantified through the following process. (1) The computational complexity of EMD depends on the data length N and the number of iterations in the decomposition process. Each iteration roughly takes O(N 2 ) time, and the total number of iterations is related to the characteristics and complexity of the data, but this process is generally considered computationally intensive. (2) The sliding window method enables the LSTM to receive the data of the previous w time steps at each step by continuously selecting a window of a fixed size from the time series data as the input, where w is the window size. In this way, each input sample contains the sequence from t - w + 1 to t, and the output sample is the value at time t + 1 or the prediction of more time steps. The computational complexity of the LSTM model based on the sliding window can be expressed as ∪O(T × (k - w + 1) × w × d 2 ) using the window length w, sequence length k, hidden layer size d, the number of training samples k - w + 1, and the number of iterations T. (3) The complexity of the PSO algorithm is the LSTM training complexity of all particles multiplied by the number of iterations, that is, O(n × K × (k - w + 1) × w × d 2 ), where n is the number of particles. In summary, the overall complexity of the entire prediction model can be approximated as: O(N 2 + n × K × (k - w + 1) × w × d 2 ). In the actual use process, the selection of the window size w has an important impact on both the performance and computational requirements of the model. A too small window may not be sufficient to capture the time dependence, while a too large window may increase the unnecessary computational burden and lead to a reduction in the amount of training data. Adjusting the size of the LSTM network, selecting an appropriate window length, optimizing the values of n and K, and applying a more efficient EMD implementation can all significantly affect the efficiency of the model. In actual applications, it is necessary to carefully balance the complexity of the model and the expected performance.
[0159] Embodiment 6. Refer to Figure 6The following figures illustrate this embodiment, which performs a performance analysis on a method for predicting the short-term ship motion attitude under non-linearity and non-stationarity described in the above embodiment;
[0160] The experimental data are specifically as follows:
[0161] The data used in the experiment are sourced from an inertial measurement unit installed on a large ship. The sampling frequency of the IMU is 4 Hz. The recording time of the dataset and the basic statistical characteristics of the attitude angles are shown in Figure 6 . The data are subdivided into two major categories: static dataset and dynamic dataset. In the context of ship attitude measurement, the "static" state refers to the situation when the ship is berthed at a port, while the "dynamic" state describes the situation when the ship is sailing on the sea at a certain speed. To ensure the reliability and accuracy of the proposed algorithm, datasets covering different states and multiple time points are used in the experiment for testing and verification. This experimental design helps to comprehensively evaluate the prediction ability of the model under different ship motion states, thus ensuring the general applicability and high accuracy of the prediction results.
[0162] Figure 7 and Figure 8 show the time series characteristics of the original roll angle and pitch angle datasets of the ship under different conditions and the corresponding recurrence plots. The time series plots intuitively depict the motion characteristics of the ship under various environmental and operating states, providing the basic data for subsequent model training and verification. The main diagonal in the recurrence plot extends from the lower left to the upper right, indicating that the states in the time series repeat at certain time points. This is a basic feature of the recurrence plot. The more obvious the diagonal, the stronger the periodicity of the system. In the recurrence plot, red represents a high recurrence probability (value close to 1), and blue represents a low recurrence probability (value close to 0). Dense red regions indicate that the system frequently returns to similar states during these time periods, while sparse blue regions indicate that the system rarely returns to similar states during these time periods. The vertical and horizontal structures in the figure may indicate the existence of local stability in the system or that the state remains unchanged for a period of time. Through the analysis of these datasets, the change law of the ship motion attitude can be further understood, providing a key reference basis for the accurate prediction of the model.
[0163] Specifically, the performance analysis is as follows:
[0164] To verify the effectiveness of the adaptive particle swarm algorithm, this embodiment uses two classic test functions to compare and analyze the performance of the traditional particle swarm algorithm and the adaptive particle swarm algorithm. The specific functions are as Figure 9As shown, the Griewank function is a non - linear multimodal function with a vast search space. Due to its numerous local minima, it is an ideal choice for testing the exploration ability of particle swarm algorithms. The minimum point of this function is located at the origin of coordinates. On the other hand, the Rosenbrock function, as a non - convex function with an approximately parabolic - shaped contour, has its global minimum hidden in a narrow parabolic valley. Although it is relatively easy to find the valley, accurately locating the global minimum within the valley is quite challenging. Due to the tiny variation amplitude of the values within the valley, its global minimum is located at the point (x, y) = (1, 1) with the value f(x, y) = 0. The coefficient of the second term is sometimes different, but it does not affect the position of the global minimum.
[0165] The parameter settings in the adaptive PSO are as follows: the maximum population size is 100, and the maximum number of iterations is 100; the maximum particle velocity Vmax = 5; the learning factors are set as: c max = 2.1, c min = 0.8; the inertia weights are set as: w max = 0.9, w min = 0.4. Figure 10 The optimization experimental results for the above - mentioned test functions are shown. It can be observed that the adaptive particle swarm algorithm exhibits superior performance in locating the optimal solution, especially in two key indicators: the number of iterations and the convergence speed. These results highlight the effectiveness and efficiency of the adaptive particle swarm algorithm compared to the traditional particle swarm algorithm in dealing with complex optimization problems.
[0166] Similarly, the motion of a ship is greatly affected by the marine environment, and the motion change pattern is large. Dense and highly fluctuating data may obscure the less - fluctuating parts, resulting in missing details. Therefore, it is necessary to normalize the data to eliminate the dimensional differences between different dataset inputs and scale them in a certain proportion within a set interval. The mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE) are used to evaluate the fitting performance between the true values and the predicted values of the established model. These three evaluation indicators are shown as follows:
[0167]
[0168] The specific analysis of the roll angle prediction results is as follows:
[0169] In order to prove the effectiveness of the hybrid prediction model proposed in the present invention, APSO-LSTM and EMD-LST are selected as comparison models. In addition, BP neural network (Back Propagation Neural Network, BP), extreme learning machine (Extreme Learning Machine, ELM), LSTM and its variant BiLSTM and sparse autoencoder LSTM (SAE-LSTM) are selected to prove the effectiveness of extremely short-term ship motion attitude prediction. BP is a commonly used multi-layer feedforward neural network, which is trained by error back propagation algorithm. It consists of an input layer, a hidden layer and an output layer, calculates the output by forward propagation, and updates the weight by back propagation. However, BP neural network is prone to fall into local optimum, has a slow training speed, and is sensitive to initial values and parameter selection. ELM is a feedforward neural network with extremely fast training speed. It is similar to traditional feedforward neural networks, but the weights of its hidden layer are randomly generated and not updated, and the weights from the hidden layer to the output layer are directly calculated using the least squares method. Although ELM has a fast training speed and is not easy to fall into local optimum, it requires a larger hidden layer, and the model stability is greatly affected by the random initial weights. BiLSTM is an extended version of LSTM that can utilize the contextual information of sequence data. BiLSTM consists of two LSTM layers, one that processes the sequence forward and one that processes the sequence backward, and connects the outputs of the two. BiLSTM can capture the bidirectional dependency information of sequence data and is suitable for processing tasks that require contextual information, such as natural language processing and time series prediction. SAE-LSTM first uses a sparse autoencoder to extract low-dimensional features of the input data, and then inputs the extracted features into LSTM for time series prediction. It has the ability to effectively process high-dimensional and sparse data and improve the generalization ability and prediction accuracy of the model, but the training process is complex and the computational overhead is high. For detailed model parameter settings, see Figure 11 .
[0170] Take data set 1 as an example. Figure 12 and Figure 13 The prediction results of various methods in Dataset 1 for the roll angle training set and test set and the corresponding local magnification effect diagrams are shown respectively. Figure 12 (b) and Figure 12 (d) shows the local enlarged detail image from 100 to 106 seconds. Figure 13 (b) and Figure 13 (d) shows a local enlarged image from the 241st to the 244th second. From the above figure, we can qualitatively analyze that LSTM and its variants show better prediction performance than BP neural network and ELM, and also emphasize that the LSTM basic prediction model has certain advantages in improving accuracy. The prediction results of each LSTM variant are not much different, and LSTM has certain advantages in computational complexity.
[0171] To quantitatively analyze the prediction performance of each algorithm on the test set, the prediction error results corresponding to the Figure 13 test set in Figure 14 are summarized in -4 (°) and 9.935×10 -4 (°), showing relatively low prediction performance. In contrast, the errors of the BiLSTM and SAE-LSTM models are reduced. In particular, the RMSE of the BiLSTM model is 6.412×10 -4 (°), performing better than BP and ELM. However, the error of the LSTM model is further reduced, and the RMSE drops to 5.142×10 -4 (°), with a significant improvement in prediction performance. The LSTM model combined with empirical mode decomposition (EMD) further reduces the error, with an RMSE of 3.451×10 -4 (°), showing the advantage in processing non-stationary data. The model combining adaptive particle swarm optimization (APSO) with LSTM also performs well, with an RMSE of 3.842×10 -4 (°), but slightly inferior to the EMD-LSTM model. In summary, the algorithm proposed in the present invention shows significant advantages in predicting ship motion attitude data, especially in dealing with non-linear and non-stationary data, and can effectively improve the prediction accuracy and reduce the prediction error.
[0172] For dataset 2, the errors of BP and ELM are relatively high, reaching 1.014(°)×10 -3 and 1.146×10 -3 (°) respectively in single-step prediction, and as the prediction step increases, the errors gradually increase to 1.815×10 -3 (°) and 1.945×10 -3 (°) at 4-step prediction. BiLSTM and SAE-LSTM perform relatively better, with single-step prediction errors of 0.912×10 -3 (°) and 0.812×10 -3 (°) respectively. The single-step prediction error of LSTM is 1.042×10 -3(°), the error growth is relatively slow in multi-step prediction. EMD-LSTM and APSO-LSTM perform better than the aforementioned models in all prediction step lengths, with single-step prediction errors of 0.724×10 -3 (°) and 0.707×10 -3 (°) respectively. The algorithm proposed in the present invention performs optimally in all step lengths, with the lowest single-step prediction error of 0.594×10 -3 (°), and the four-step prediction error is only 1.134×10 -3 (°), demonstrating remarkable prediction performance. In Dataset 3, the prediction errors of BP and ELM are still relatively high. EMD-LSTM and APSO-LSTM show better stability when dealing with complex data, with single-step prediction errors of 18.453×10 -3 (°) and 18.506×10 -3 (°) respectively. The algorithm proposed in the present invention has significant advantages in predicting the ship's motion attitude under different data characteristics and environments, especially in improving prediction accuracy and stability.
[0173] Furthermore, the prediction results of the pitch angle can be analyzed. Using the same dataset as that for the roll angle prediction results analysis, it can be seen that the adaptive PSO-LSTM model is superior to the EMD-LSTM model in terms of MAE and RMSE metrics, which indicates that the adaptive PSO effectively improves the adaptability and accuracy of the model by dynamically adjusting network parameters.
[0174] Furthermore, in time series prediction, there are various different prediction modes, including one-dimensional time series single-step prediction, multi-step direct prediction, multi-step recursive prediction, and multi-dimensional recursive prediction. The single-step prediction mode means using the current and past data to predict the value at the next time point. The advantage of this method is that the model is simple and the prediction error does not accumulate, but it can only predict one time step and needs to repeatedly call the model for multi-step prediction. Multi-step direct prediction directly predicts the values at multiple future time points instead of predicting step by step. Although this method can directly predict multiple time steps and is suitable for short-term prediction, the model complexity is relatively high, error accumulation is likely to occur, and the prediction effect for long time steps is not good. Multi-step recursive prediction uses a single-step prediction model to gradually predict the values at multiple future time points. The result of each step of prediction is used as the input for the next step. The advantage of this method is that the model is simple, but due to the easy accumulation of errors, the prediction result is very sensitive to the initial input data. Multi-dimensional recursive prediction, when predicting multiple related time series, the predicted values of each time series will affect the prediction of other time series. This method can capture the mutual influence between multiple variables and is suitable for predicting complex systems, but the model complexity is high, the training and prediction processes are relatively complex, and errors are also easy to accumulate.
[0175] Therefore, the present invention applies the sliding window technique to multi-step prediction tasks. By performing sliding window processing on the data set, it is converted into a format suitable for supervised learning, so that the data in each window can be used to train and update the model. After each calculation is completed, the window moves forward along the time axis to a new position, providing new training data for the model. This method not only helps to capture the local characteristics of the time series, but also has a significant impact on the prediction accuracy of the model. The choice of window width is directly related to the amount of input data received by the model and the length of historical information it can reflect. An overly large window width will increase the computational complexity and slow down the training process of the neural network; while an overly small window may lack sufficient historical information and it is difficult to capture the periodic patterns of the time series. In particular, when using long short-term memory networks for ship motion attitude prediction, reasonably selecting the key parameters of the LSTM, such as window width, number of layers, number of neurons, etc., is crucial for improving the performance of the prediction model. At a lower sampling frequency, the time interval between each data point is relatively long, and it may not be able to accurately capture the rapidly changing dynamic features, but it can still provide a basic understanding of the system behavior. In this case, the significance and value of multi-step prediction are reflected in the following two aspects: (1) Reducing the impact of data noise. A lower sampling frequency means that each data point may more represent the average state over a longer period of time, which can naturally reduce the impact of short-term noise. In this case, multi-step prediction helps to emphasize more stable data features and may be more suitable for discovering and exploiting the main patterns and relationships in the data. (2) Improving the generalization ability of the model. When performing multi-step prediction, the model needs to learn and adapt over a longer time range, which can promote the generalization ability of the model. During training, the model is forced to learn how to respond in various possible future situations, rather than just responding to the next time point.
[0176] In summary, the present invention aims to improve the accuracy of short-term prediction of ship roll angle and pitch angle, and designs an EMD-APSO-LSTM hybrid model combined with the sliding window technique. First, aiming at the nonlinear and non-stationary characteristics of ship motion time series data, the present invention uses the method based on empirical mode decomposition (EMD) for data denoising to smooth the original data. Secondly, by introducing the adaptive particle swarm optimization (APSO) algorithm, it aims to optimize the hidden layer structure of the long short-term memory (LSTM) network, thereby enhancing the accuracy of the prediction model. In order to verify the effectiveness of the proposed model, the present invention also conducts a comprehensive evaluation using three sets of measured sea trial data. By analyzing and comparing the performance of different models in multi-step prediction tasks, the superiority of the algorithm proposed by the present invention in short-term ship motion attitude prediction is verified. First, the traditional BP and ELM models show a large error growth in multi-step prediction tasks, indicating their limitations in dealing with complex time series predictions. Secondly, deep learning models such as BiLSTM, SAE-LSTM, LSTM, and EMD-LSTM show good stability and prediction accuracy in multi-step prediction. In particular, the model combined with empirical mode decomposition technology and adaptive particle swarm optimization further improves the prediction performance. The algorithm proposed by the present invention shows the best error results in both single-step prediction and multi-step prediction tasks, verifying its effectiveness and stability in complex multi-step time series prediction tasks. Specifically, the algorithm proposed by the present invention combines data preprocessing, adaptive optimization, and deep learning technologies to ensure the robustness and generalization ability of the model while improving the prediction accuracy. The experimental results show that the model proposed by the present invention can effectively predict the motion attitude of ships in different ocean environments, providing strong technical support for the safe and stable operation of ships.
[0177] The above is only the implementation mode of the present invention and does 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 nonlinearity and non-stationarity, characterized in that: The method is: S1: Acquire the ship's non-stationary motion posture data; S2: The empirical mode decomposition algorithm is used to decompose the time series in the ship's non-stationary motion posture data into several independent subsequences; S3: Use the long short-term memory neural network based on adaptive particle swarm optimization to predict each subsequence and obtain several prediction results; S4: Weighting and data reorganization of several prediction results to obtain the final comprehensive prediction result.
2. The method for predicting extremely short-term ship motion attitude under nonlinearity and non-stationarity according to claim 1 is characterized in that: S2 is specifically: S21: Find all the maximum and minimum points of the time series x(t), and then use the cubic spline function to fit the curve to obtain the upper envelope u(t) and lower envelope l(t) of the time series x(t); S22: Calculate the average value of the upper envelope u(t) and the lower envelope l(t) to obtain the average envelope m x ; S23: According to the average envelope m x Get the new time series h x ; S24: Determine the new time series h x Whether the IMF condition is met, if not, repeat the above steps until the average envelope approaches zero, and obtain the first intrinsic mode function imf1; S25: By subtracting imf1 from the original time series x(t), we get a new time series r without high frequencies xn , and repeat the above steps to obtain the intrinsic modes {imf2, imf3, ..., imf n }; S26: When r xn When it cannot be decomposed, r xn It is expressed as the residual of x(t), and the time series x(t) after the decomposition operation is obtained.
3. The method for predicting extremely short-term ship motion attitude under nonlinearity and non-stationarity according to claim 2 is characterized in that: The new time series h x It is expressed as: H x =x(t)-m x 。 4. The method for predicting extremely short-term ship motion attitude under nonlinearity and non-stationarity according to claim 2 is characterized in that: The time series x(t) after the decomposition operation is expressed as: Among them, r xn Represents the trend term of x(t) without high-frequency components.
5. The method for predicting extremely short-term ship motion attitude under nonlinearity and non-stationarity according to claim 1 is characterized in that: The method for constructing a long short-term memory neural network based on adaptive particle swarm optimization is: Step 1: Obtain the original ship motion posture data and perform preprocessing; Step 2: Initialize the particle swarm parameters, including determining the population size, number of iterations, learning factor, and finite intervals of particle positions and velocities; Step 3: Initialize the LSTM neural network structure, including the number of neurons in each layer of the network and the number of hidden layers; Step 4: Determine the fitness function by calculating and comparing the fitness value of each particle and select the optimal particle fitness value; Step 5: Calculate and evaluate the particle fitness value according to the difference of the optimal particle fitness value, so as to determine the global optimal position and local optimal position of the particle; Step 6: Use the speed update formula and position update formula of the particle swarm optimization algorithm to update the speed and position of the particles; Step 7: Determine whether the particle meets the conditions for iteration termination. If so, assign the optimal parameters to the long short-term memory neural network to obtain a long short-term memory neural network based on adaptive particle swarm optimization; Step 8: If not reached, return to step 3 and continue executing until the iteration termination condition is met.
6. The method for predicting extremely short-term ship motion attitude under nonlinearity and non-stationarity according to claim 5 is characterized in that: The speed update formula of the particle swarm optimization algorithm is: Among them, w represents the inertia weight, c1 and c2 represent learning factors, r1 and r2 are independent random numbers distributed between 0 and 1, and are respectively the velocity component, position component, individual optimal value and group global optimal value of the ith particle in the jth dimension in the tth iteration.
7. The method for predicting extremely short-term ship motion attitude under nonlinearity and non-stationarity according to claim 6 is characterized in that: The position update formula of the particle swarm optimization algorithm is:
8. The extremely short-term ship motion attitude prediction system under nonlinearity and non-stationarity 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 extremely short-term ship motion attitude prediction method under nonlinearity and non-stationarity 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 nonlinearity and non-stationarity described in any one of claims 1-7.
Citation Information
Patent Citations
Short-term ship attitude prediction method based on empirical mode decomposition and support vector regression
CN112052623A
Ship motion forecasting method based on improved EMD-AR model
CN113378387A
Ship three-degree-of-freedom hybrid neural network model prediction method and system
CN113837454A
VMD-PSO-LSTM-based near space 80-100km atmospheric wind speed forecast modeling method
CN115964923A
Ship motion envelope forecasting method and system based on long short-term memory neural network
CN116861202A
Cited By
Ship swing analysis system and method based on deep learning
CN120397203A
Double-propeller unmanned ship model identification and evaluation method based on sparse nonlinear dynamics identification
CN121209474A
Real ship motion extremely-short-term forecasting device and method
CN121385958A