A Container Ship Track Prediction Method Based on EMD-PSO-GRU-RBFNN
By adaptively decomposing and optimizing container ship track data using the EMD-PSO-GRU-RBFNN method, the complex characteristics of track data are addressed, achieving high-precision and stable track prediction and supporting reliable applications of smart shipping.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-29
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies are unable to effectively address the strong time-varying, non-stationary, and highly nonlinear characteristics of container ship track data, resulting in low prediction accuracy, poor stability, and weak environmental adaptability, which fails to meet the high-precision requirements of intelligent shipping.
A container ship trajectory prediction method based on EMD-PSO-GRU-RBFNN is adopted. The radial basis function neural network and gated recurrent unit network are optimized by particle swarm optimization algorithm. The trajectory residual signal is adaptively decomposed by empirical mode decomposition to construct high-frequency and mid-to-low frequency component prediction models, perform multi-scale feature modeling and residual compensation.
It achieves high-precision and stable prediction of container ship tracks, can adapt to the dynamic maritime environment, provides reliable track prediction data support, and improves the reliability of ship collision avoidance, port scheduling and maritime traffic management in intelligent shipping.
Smart Images

Figure CN121598173B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent shipping technology, and in particular to a method for predicting the trajectory of container ships based on EMD-PSO-GRU-RBFNN. Background Technology
[0002] Against the backdrop of global trade integration and the intelligent development of the shipping industry, container ships, as the core carriers of transoceanic cargo transportation, directly impact the stable operation of the global supply chain through their navigation safety and scheduling efficiency. Track prediction technology, as a key support for intelligent shipping systems, can predict the future position and route trends of ships based on historical navigation data. This provides crucial information for maritime traffic management, collision avoidance decisions, port berth scheduling, and emergency response, making it one of the core technologies for achieving smart ports and safe shipping.
[0003] However, during actual navigation, container ships' track data are affected by multiple complex factors, exhibiting significant characteristics of strong time-varying, non-stationarity, and high nonlinearity, posing a huge challenge to accurate prediction. On the one hand, marine environmental factors such as sea winds, waves, and ocean currents continuously interfere with the ship's motion, causing high-frequency random fluctuations in track data. On the other hand, the ship's own handling characteristics (such as steering inertia and power system response delay) and navigation task adjustments (such as deceleration when entering or leaving ports and avoiding other ships) cause the track to exhibit multi-scale dynamic changes, further increasing the complexity of the data.
[0004] Traditional ship trajectory prediction methods are ill-equipped to effectively address the aforementioned complex characteristics and have significant technical limitations, primarily in the following categories:
[0005] Physical model-based prediction methods rely on ship dynamics equations and environmental parameters (such as wind speed and current speed) to construct prediction models. These methods require precise acquisition of physical parameters such as ship draft, main engine power, and hull drag coefficient. However, in the actual marine environment, environmental parameters change dynamically in real time and are difficult to measure accurately. Ship physical parameters may also change due to factors such as cargo load and hull wear, leading to a significant decrease in model prediction accuracy and poor adaptability.
[0006] Single machine learning model prediction methods:
[0007] Methods based on BP neural networks (backpropagation neural networks) can fit certain nonlinear relationships, but they suffer from problems such as gradient vanishing and easy getting trapped in local optima. They are also weak in capturing long-term time-series dependencies and abrupt changes (such as port entry / exit turns) in track data, and the predicted curves are prone to lag, with significant errors at track inflection points.
[0008] The method based on unoptimized RBF neural networks (radial basis function neural networks) has stronger local fitting ability and faster training speed compared to BP neural networks. However, it does not consider the multi-scale features of track data and can only model the main trend of the data. It cannot effectively extract high-frequency fluctuation information, resulting in insufficient prediction accuracy for complex track details.
[0009] Traditional signal processing and model-based methods: Some methods attempt to preprocess track data using signal processing techniques such as Fourier transform and wavelet transform. However, Fourier transform cannot handle non-stationary signals, and wavelet transform relies on preset wavelet basis functions, making it difficult to adaptively match the dynamic characteristics of track data. Therefore, it cannot fundamentally solve the prediction problems caused by data non-stationarity and multi-scale.
[0010] In summary, existing technologies generally suffer from low prediction accuracy, poor stability, and weak environmental adaptability due to their inability to fully adapt to the complex characteristics of container ship track data. This makes it difficult to meet the practical needs of intelligent shipping for high-precision and high-reliability track prediction. Therefore, there is an urgent need for a container ship track prediction method that can adaptively handle the non-stationarity and multi-scale characteristics of track data, accurately capture temporal dynamic changes, and improve model performance through parameter optimization. This would overcome the current technological bottlenecks and provide more reliable technical support for intelligent shipping and maritime traffic management. Summary of the Invention
[0011] The purpose of this invention is to propose a container ship track prediction method based on EMD-PSO-GRU-RBFNN, which solves the problems of low prediction accuracy, poor stability and weak environmental adaptability caused by the strong time-varying, non-stationary and highly nonlinear characteristics of track data in existing container ship track prediction technologies, thereby improving the accuracy and stability of container ship track prediction.
[0012] To achieve the above objectives, this invention proposes a container ship trajectory prediction method based on EMD-PSO-GRU-RBFNN, the specific steps of which are as follows:
[0013] Step S1: Obtain the AIS data of the container ship, which includes time, longitude, latitude, speed and heading angle information;
[0014] Step S2: Preprocess the AIS data and divide the preprocessed data into training set and test set according to time order; the preprocessing includes processing abnormal data and normalizing the data to construct time series data;
[0015] Step S3: The diffusion factor and the number of hidden layer neurons of the radial basis function neural network (RBFNN) are optimized using the particle swarm optimization algorithm (PSO), and a trajectory prediction model is constructed based on the optimized RBFNN.
[0016] Step S4: Train the trajectory prediction model based on the training set, use the trained trajectory prediction model to predict the training set and the test set, obtain the predicted value corresponding to the training set and the predicted value corresponding to the test set, and calculate the difference between the predicted value of the training set and the actual ship position coordinates to obtain the residual signal.
[0017] Step S5: The residual signal is decomposed using Empirical Mode Decomposition (EMD) to adaptively decompose the residual signal into... m One intrinsic mode component and one residual component;
[0018] Step S6: Based on the characteristic frequencies of the intrinsic mode components and residual components, a high-frequency component prediction model is constructed using a gated recurrent unit network (GRU) optimized by PSO. The high-frequency component prediction model is used to predict the high-frequency components in the intrinsic mode components. A mid-to-low frequency component prediction model is constructed using a radial basis function neural network (RBFNN) optimized by PSO. The mid-to-low frequency components and residual components in the intrinsic mode components are predicted based on the mid-to-low frequency component prediction model.
[0019] Step S7: Add the predicted values of the high-frequency components, the low-frequency components, and the residual components to obtain the predicted value of the residual components;
[0020] Step S8: Add the predicted value corresponding to the test set to the predicted value of the residual to obtain the corrected test set output;
[0021] Step S9: Based on standard deviation (SD), mean error (ME), and coefficient of determination (R) 2 The mean square error (MSE) and root mean square error (RMSE) are used to evaluate the performance of the corrected test set output.
[0022] Preferably, in step S2, data preprocessing includes data cleaning and data normalization; wherein, data cleaning includes filling trajectory breakpoints, removing outliers by combining kinematic constraints and statistical methods, filtering outlier data that deviates from the trajectory, reducing noise by using Kalman filtering, and unifying data granularity through equal-time resampling; data normalization uses the max-min scaling method to map AIS data to the [0,1] interval, as shown in the following formula:
[0023] ;
[0024] in, These are the feature values of the original data. The global maximum value of the feature parameters. The global minimum value of the feature parameters. These are the normalized feature values of the data.
[0025] Preferably, in step S3, the inputs to the trajectory prediction model include the time interval, longitude, latitude, speed, and heading angle information at the current moment, and the output of the trajectory prediction model is the ship's position coordinates at the next moment.
[0026] Preferably, in step S4, the residual signal is calculated using the following formula:
[0027] ;
[0028] in, For residual signals, For the actual ship position coordinates, These are the predicted values corresponding to the training set.
[0029] Preferably, in step S5, empirical mode decomposition (EMD) is used to analyze the residual signal. Decomposed into m Each intrinsic mode component and residual components ,in, For high-frequency components, It consists of low to mid-frequency components.
[0030] Preferably, in step S8, the predicted values corresponding to the test set are... With residual prediction Add them together to obtain the corrected test set output, as shown in the following formula:
[0031] ;
[0032] in, This is the output of the corrected test set.
[0033] Therefore, this invention proposes a container ship trajectory prediction method based on EMD-PSO-GRU-RBFNN, which has the following advantages:
[0034] (1) This invention effectively extracts intrinsic mode components of different frequencies by adaptively decomposing the track residual signal through EMD, thereby reducing the nonstationarity and complexity of the data. By combining the strong time-series modeling capability of GRU for high-frequency components and the efficient nonlinear fitting capability of RBFNN for mid- and low-frequency components, it achieves accurate characterization of the full-band features of the track and solves the problem that traditional single models are difficult to adapt to the strong time-varying and highly nonlinear features of the track.
[0035] (2) This invention uses the PSO algorithm to perform global optimization of key hyperparameters of GRU and RBFNN (such as the number of hidden units in GRU, the diffusion factor of RBFNN, etc.) to avoid the model getting trapped in local optima. Then, by superimposing the residual compensation mechanism, the prediction error is significantly reduced.
[0036] (3) This invention is based on measured AIS data verification, does not rely on complex ship dynamic parameters, and can adapt to the dynamic marine environment; it can output high-precision trajectory prediction results, providing reliable data support for ship collision avoidance, port scheduling, and maritime traffic management in intelligent shipping, and has good application and promotion value.
[0037] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0038] Figure 1 This is a flowchart of a container ship trajectory prediction method based on EMD-PSO-GRU-RBFNN according to the present invention.
[0039] Figure 2 This is a schematic diagram of the RBFNN structure in this invention;
[0040] Figure 3 This is a schematic diagram of the GRU structure in this invention;
[0041] Figure 4 This is a schematic diagram of the decomposition of the longitude residual sequence by EMD in an embodiment of the present invention;
[0042] Figure 5 This is a schematic diagram of the decomposition of the latitudinal residual sequence by EMD in an embodiment of the present invention;
[0043] Figure 6 This is a comparison chart of longitude residual prediction results in an embodiment of the present invention;
[0044] Figure 7 This is a comparison chart of latitude residual prediction results in an embodiment of the present invention;
[0045] Figure 8 This is a comparison chart of actual longitude and predicted longitude in an embodiment of the present invention; wherein, (a) is a comparison chart of the overall longitude, and (b) is a comparison chart of the longitude of a partially enlarged area;
[0046] Figure 9 This is a comparison diagram of actual latitude and predicted latitude in an embodiment of the present invention; wherein, (a) is a latitude comparison diagram of the whole, and (b) is a latitude comparison diagram of a partially enlarged area;
[0047] Figure 10 This is a schematic diagram comparing the longitude prediction errors under different models in an embodiment of the present invention;
[0048] Figure 11 This is a schematic diagram comparing latitude prediction errors under different models in an embodiment of the present invention;
[0049] Figure 12 The longitude evaluation indices SD, ME, MSE, RMSE, and R under different models in the embodiments of this invention are:2 A comparison diagram;
[0050] Figure 13 The latitude evaluation indices SD, ME, MSE, RMSE, and R under different models in the embodiments of this invention are: 2 A comparison diagram;
[0051] Figure 14 This is a comparison chart of the predicted trajectory and the actual trajectory of the PSO-BP model in an embodiment of the present invention;
[0052] Figure 15 This is a comparison chart of the predicted trajectory and the actual trajectory of the PSO-RBFNN model in an embodiment of the present invention;
[0053] Figure 16 This is a comparison chart of the predicted trajectory and the actual trajectory of the EMD-PSO-GRU-RBFNN model in an embodiment of the present invention. Detailed Implementation
[0054] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below. The described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of the present invention.
[0055] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.
[0056] Example
[0057] like Figure 1 As shown, this invention provides a container ship trajectory prediction method based on EMD-PSO-GRU-RBFNN, comprising the following steps:
[0058] Step S1: Obtain the AIS data of the container ship, which includes time, longitude, latitude, speed and heading angle information;
[0059] Step S2: Preprocess the AIS data and divide the preprocessed data into training set and test set according to time order; the preprocessing includes processing abnormal data and normalizing the data to construct time series data;
[0060] Data preprocessing includes data cleaning and data normalization. Data cleaning includes filling in trajectory breakpoints, removing outliers using kinematic constraints and statistical methods, filtering outlier data deviating from the trajectory, reducing noise using Kalman filtering, and unifying data granularity through equal-time resampling. Data normalization uses the max-min scaling method to map AIS data to the [0,1] interval, as shown in the following formula:
[0061] ;
[0062] in, These are the feature values of the original data. The global maximum value of the feature parameters. The global minimum value of the feature parameters. These are the normalized feature values of the data.
[0063] Step S3: The diffusion factor and the number of hidden layer neurons of the radial basis function neural network (RBFNN) are optimized using the particle swarm optimization algorithm (PSO), and a trajectory prediction model is constructed based on the optimized RBFNN.
[0064] The inputs to the trajectory prediction model include the current time interval, longitude, latitude, speed, and heading angle. The output of the trajectory prediction model is the ship's position coordinates at the next moment.
[0065] The calculation process of the Particle Swarm Optimization (PSO) algorithm is as follows:
[0066] Assume the search space is Dimension, the The position of each particle is represented by a vector. The corresponding speed is :
[0067] Initialization: Randomly initialize the initial positions and velocities of all particles within the search space, as shown in the following formula:
[0068] ;
[0069] Fitness evaluation: By substituting the position of each particle into the objective function, its current fitness value is calculated to measure its search quality.
[0070] Individual and Global Optimal Position Updates: Each particle records the best position it has searched so far, using the following formula:
[0071] ;
[0072] in, For the first n The optimal position of each particle;
[0073] Meanwhile, the position of the particle with the best fitness value in the entire population is considered the global extreme point. , denoted as:
[0074] ;
[0075] in, Let be the objective function. This represents the total number of particles.
[0076] Velocity and position update: In each iteration, the particle adjusts its flight speed and current position based on both individual and collective experience, as shown in the following formula:
[0077] ;
[0078] in, It is the inertia weight, used to control the search range and convergence speed; These are individual learning factors and group learning factors, respectively. A random number within the interval [0, 1]; index Indicates the first One particle, Indicates the first Each latitude.
[0079] like Figure 2 As shown, the structure of the Radial Basis Function Neural Network (RBFNN) is as follows:
[0080] , , ..., These are the input values for the RBFNN. , , ..., These are the predicted values from RBFNN. N and l These represent the number of nodes in the input layer and the output layer, respectively. , ,… It is the data center of the hidden layer nodes, and P is the number of hidden layer nodes.
[0081] The output values of the hidden layer nodes in RBFNN are obtained through radial basis functions for a set of feature vectors. The formula for calculating the output value of the hidden layer nodes is as follows:
[0082] ;
[0083] in, This is the output value of the p-th hidden layer node. For radial basis functions, Let p be the data center of the p-th hidden layer node.
[0084] Using the Gaussian function as the radial basis function, its calculation formula is as follows:
[0085] ;
[0086] in, The distance from the feature vector to the data center. δ This is an extension constant.
[0087] The formula for calculating the output value of RBFNN is as follows:
[0088] ;
[0089] in, Let be the weight of the p-th hidden layer node relative to the output layer node.
[0090] Step S4: Train the trajectory prediction model based on the training set, use the trained trajectory prediction model to predict the training set and the test set, obtain the predicted value corresponding to the training set and the predicted value corresponding to the test set, and calculate the difference between the predicted value of the training set and the actual ship position coordinates to obtain the residual signal.
[0091] The formula for calculating the residual signal is as follows:
[0092] ;
[0093] in, For residual signals, For the actual ship position coordinates, These are the predicted values corresponding to the training set.
[0094] Step S5: The residual signal is decomposed using Empirical Mode Decomposition (EMD) to adaptively decompose the residual signal into... m One intrinsic mode component and one residual component;
[0095] The residual signal is adaptively decomposed using Empirical Mode Decomposition (EMD) to obtain... m Each intrinsic mode component and a residual component Based on the frequency characteristics of the intrinsic mode components, they are grouped into a high-frequency component group and a mid-to-low-frequency component group. The high-frequency component group is used to characterize the disturbance components with a relatively fast change rate, while the mid-to-low-frequency component group and the residual components are used to characterize the trend components with a relatively slow change rate.
[0096] Let the original time series be The core decomposition steps of EMD are as follows:
[0097] 1. Detect all local maxima and minima in the signal, and generate upper envelopes respectively through interpolation. and .
[0098] 2. Calculate the local mean As the average of the upper and lower envelopes, it is shown in equation (1):
[0099] ;
[0100] The mean is removed from the original signal to obtain the initial components. :
[0101] ;
[0102] 3. If the current component If the signal does not meet the IMF criteria (i.e., the difference between the number of zero-crossing points and the number of extreme points does not exceed 1, and the local mean is 0), then it is treated as a new signal, and steps 1 and 2 are repeated until convergence. The convergence criterion can be expressed as:
[0103] ;
[0104] in, Indicates the sample length. For the number of iterations, It is an empirically set threshold, usually between 0.2 and 0.3.
[0105] 4. Repeat the above iterative process to gradually extract all IMF components that meet the conditions from the original signal until only the residual terms remain. The entire EMD decomposition can be represented as:
[0106] ;
[0107] in, Indicates the first One intrinsic mode function.
[0108] Step S6: Based on the characteristic frequencies of the intrinsic mode components and residual components, a high-frequency component prediction model is constructed using a gated recurrent unit network (GRU) optimized by PSO. The high-frequency component prediction model is used to predict the high-frequency components in the intrinsic mode components. A mid-to-low frequency component prediction model is constructed using a radial basis function neural network (RBFNN) optimized by PSO. The mid-to-low frequency components and residual components in the intrinsic mode components are predicted based on the mid-to-low frequency component prediction model.
[0109] like Figure 3 As shown, the GRU structure introduces two gating mechanisms: the update gate and the reset gate, which control the way the hidden state information is retained and updated, respectively. Unlike LSTM, GRU combines the input gate and forget gate in LSTM, thus simplifying the structure.
[0110] GRU at time step The key calculation formula is as follows:
[0111] 1. Update Gate: Controls how much of the current state comes from past states. The formula is as follows:
[0112] ;
[0113] 2. Reset Gate: Determines how to combine new inputs with past states, as shown in the following formula:
[0114] ;
[0115] 3. Candidate Hidden State: Generates new candidate state values, using the following formula:
[0116] ;
[0117] 4. Final Hidden State Update: The old state and candidate states are weighted and combined using the following formula:
[0118] ;
[0119] in, This is the input vector for the current time step; This is the hidden state from the previous time step; , These are for updating the door and resetting the door, respectively. The current candidate is in a hidden state; This is the current final hidden state; These are the learnable weight matrix and bias terms of the network; This represents the sigmoid activation function, with output between (0, 1); This indicates element-wise multiplication (Hadamard product).
[0120] Step S7: Add the predicted values of the high-frequency components, the low-frequency components, and the residual components to obtain the predicted value of the residual components;
[0121] The prediction results of high-frequency intrinsic mode components, mid- and low-frequency intrinsic mode components, and residual components obtained in step S6 are reconstructed. Specifically, the predicted values of high-frequency intrinsic mode components, mid- and low-frequency intrinsic mode components, and residual components are superimposed on the same time scale to obtain the residual prediction value for the corresponding time step.
[0122] By using the above reconstruction method, the prediction results obtained by modeling at different frequency scales are fused together, so that the information at each scale in the residual signal can be completely recovered, thereby obtaining the overall prediction result of the residual signal.
[0123] Step S8: Add the predicted values corresponding to the test set to the predicted residual values to obtain the corrected test set output, as shown in the following formula:
[0124] ;
[0125] in, This is the output of the corrected test set.
[0126] Step S9: Based on standard deviation (SD), mean error (ME), and coefficient of determination (R) 2 The mean square error (MSE) and root mean square error (RMSE) are used to evaluate the performance of the corrected test set output.
[0127] Among them, SD measures the degree of error fluctuation, ME reflects the overall direction and magnitude of the deviation between the predicted and actual values, while MSE and RMSE are mainly used to assess the degree of numerical deviation between the model's predictions and the actual values. R 2 Used to comprehensively evaluate the model's forecasting performance. The smaller the values of SD, ME, MSE, and RMSE, the smaller the model's prediction error and the better its prediction performance. 2 The closer the value is to 1, the higher the model's prediction accuracy.
[0128] The calculation expressions for each evaluation indicator are as follows:
[0129] ;
[0130] ;
[0131] ;
[0132] ;
[0133] ;
[0134] in, For the first The true value at any given moment. This is the actual value. For sample values, For the sample size, This is the average of the actual values. For the first The prediction error for each sample. The prediction error for the sample, The total number of samples, For the first The true value of each sample For the true value The average value, For the first One sample in Observations in direction For the first One sample in Observations in direction.
[0135] The invention will be further illustrated below through specific implementation examples.
[0136] AIS data of container ships entering and leaving ports from 22:44 on March 22, 2025 to 10:48 on March 23, 2025 were selected as validation samples to empirically analyze the predictive performance of the proposed model. Experimental data included longitude, latitude, time, speed, heading, and course relative to land. To ensure the objectivity of the experiment and the stability of the trajectory prediction, this invention selected a non-confrontational, regular-course commercial vessel as the research object. The tested vessel was a standard container ship, whose basic information included important parameters such as ship name, call sign, length, beam, draft, MMSI, and IMO.
[0137] Ship AIS data was divided into training and testing sets in an 8:2 ratio to ensure sufficient model training and objective evaluation of predictive performance. Five features—time interval Δtime, longitude increment Δlon, latitude increment Δlat, speed increment ΔSOG, and heading angle increment ΔCOG—were used as model inputs to predict the longitude increment Δlon at the next moment. t+1 and latitude increment Δlat t+1 The model accuracy is evaluated by calculating the residuals between the predicted and actual values in the training set.
[0138] EMD was used to decompose the longitude and latitude residual data of the ship, obtaining multiple intrinsic mode components (IMFs) and residual components. Specifically, the longitude residual was decomposed into 7 IMFs and 1 residual component; the latitude residual was decomposed into 6 IMFs and 1 residual component. The EMD decomposition results of the longitude and latitude residual sequences are shown below. Figure 4 , Figure 5 As shown in the figure, by comparing the subsequence diagrams after decomposition, it can be observed that the nonlinearity of the obtained IMF components and residuals is significantly reduced, providing a more stable input basis for subsequent modeling and prediction.
[0139] To achieve effective modeling of different frequency components, different prediction strategies were employed for each IMF component. For IMF components with significant high-frequency characteristics, a PSO-optimized GRU model was constructed for training and prediction; while for mid- and low-frequency IMF components, a PSO-optimized RBFNN was used for separate modeling. The prediction results of each component model on the test set were then superimposed to obtain the predicted residual values. Figure 6 and Figure 7 As shown in the figure, the effects of the two sets of experiments on residual prediction are demonstrated. It can be seen from the figure that the hybrid modeling method of the present invention shows a certain predictive ability in overall trend fitting, which verifies its effectiveness in residual compensation.
[0140] To improve the predictive performance of the models, PSO was used to automatically optimize the key hyperparameters of RBFNN and GRU, respectively. In the RBFNN model, the diffusion factor and the number of hidden layer neurons were selected as optimization parameters. The diffusion factor controls the smoothness of the Gaussian kernel function, with a search range of [0.1, 2.0]; the number of hidden layer neurons determines the structural complexity of the model, with a search range of [5, 80]. The relevant parameters of PSO were set as follows: inertia weights... =0.7, population size is 20, and maximum number of iterations is 50. In the GRU model, PSO is used to optimize two key hyperparameters: the number of hidden units and the initial learning rate. The former determines the model's memory and expressive capabilities, while the latter affects the weight update speed and convergence stability during model training. The corresponding search ranges are set to [32, 256] and [0.001, 0.01], respectively, with a particle swarm size of 100 and a maximum number of iterations of 100. Finally, by comparing the performance metrics on the validation set, the parameter combination that optimizes the model's prediction performance is selected as the final configuration.
[0141] This invention performs multi-model comparative prediction of ship track longitude, covering PSO-BP, PSO-RBF, and using an EMD-PSO-GRU-RBFNN hybrid model, with actual tracks as the reference standard. The prediction results are as follows: Figure 8 (a) Figure 9 As shown in (a) of the diagram.
[0142] Taking longitude as an example, the measured longitude curve exhibits a sharp "V" shape, first decreasing and then increasing, requiring a high level of ability to characterize non-stationarity and nonlinearity in the model. PSO-BP can only follow the overall trend, lagging significantly at inflection points and steep slopes, with a peak-to-valley error close to 0.04°, revealing the BP network's poor adaptability to abrupt changes and its tendency to get trapped in local optima. After replacing BP with RBFNN, the phase of PSO-RBFNN is largely synchronized with the measured curve, and the maximum error is reduced to 0.02°, but the rising segment still shows slight underfitting, indicating that a single-scale RBFNN cannot cover all frequency band information. Introducing EMD to decompose latitude and longitude residuals to improve signal stability, and then superimposing GRU memory sequence dependence, finally forming the EMD-PSO-GRU-RBFNN combined model, whose predicted curve almost coincides with the actual track in the magnified window, with local errors controlled within 0.01° and a smooth distribution.
[0143] Overall, all prediction models are able to follow the direction of change of the actual flight path, but there are significant differences in prediction accuracy. Figure 8 (b) and Figure 9 (b) in the figure is a magnified area, which can more clearly show the detailed performance of each model. The PSO-BP model deviates significantly from the true value at multiple nodes, especially at trajectory inflection points and locations with rapid changes, where the predicted trajectory is significantly lagging, indicating that it has certain limitations in processing complex nonlinear time series data.
[0144] In comparison, the PSO-RBF model showed a significant improvement in fitting performance, with its predicted curve more closely matching the actual trajectory, especially in the stable transition regions, where the model performed robustly. However, slight deviations remained in the local steep transition regions, indicating that its response to high-frequency features was still limited. The EMD-PSO-GRU-RBFNN model demonstrated the best overall performance, with its predicted curve almost perfectly matching the actual trajectory. Particularly in the magnified inset region, its response speed and trajectory accuracy were superior to other models, validating the effectiveness of EMD latitude and longitude residual decomposition in denoising and feature extraction. Furthermore, the combination of GRU and RBFNN enhanced the model's comprehensive modeling ability for temporal and nonlinear features.
[0145] like Figure 10 , Figure 11 As shown, comparing the prediction errors of longitude and latitude demonstrates that EMD can effectively isolate multi-scale sea state disturbances; GRU can capture the long- and short-term correlations caused by steering and inertia; and PSO global optimization improves the approximation accuracy of RBFNN. From the perspective of overall accuracy and robustness, EMD-PSO-GRU-RBFNN is significantly superior to the other two methods and is the better solution for predicting the longitude and latitude of ships in the sea area.
[0146] The evaluation uses five indicators from Tables 1 and 2 (standard deviation SD, mean error ME, mean square error MSE, root mean square error RMSE, and coefficient of determination R). 2 A comprehensive comparison clearly shows that the EMD-PSO-GRU-RBFNN model exhibits the best overall performance in container ship trajectory prediction. Compared with the PSO-BP and PSO-RBFNN models, the EMD-PSO-GRU-RBFNN model achieves significant optimization in all indicators: in longitude prediction, the R-value of the EMD-PSO-GRU-RBFNN model is significantly higher. 2 The value reached 0.999831, an improvement of 2.56% compared to 0.9749 in the PSO-BP model and 0.72% compared to 0.992648 in the PSO-RBF model, thus improving trajectory fitting accuracy and model reliability. Meanwhile, ME decreased to 0.000556, a reduction of 88.18% and 85.03% compared to PSO-BP (0.0047) and PSO-RBF (0.003714), respectively; MSE was 0.00008, a reduction of 46.67% compared to PSO-BP (0.00015) and 38.46% compared to PSO-RBF (0.00013); RMSE was 0.000555, a reduction of 91.46% and 84.85% compared to PSO-BP (0.0065) and PSO-RBF (0.003666), respectively. In latitude prediction, the EMD-PSO-GRU-RBFNN model also demonstrates excellent performance, with its R... 2 The mean squared error (MSE) reached 0.995787, representing improvements of 0.65% and 0.47% compared to PSO-BP (0.9894) and PSO-RBF (0.991086), respectively. Regarding error metrics, ME decreased to 0.00262, representing reductions of 31.05% and 30.36% compared to PSO-BP (0.0038) and PSO-RBF (0.003763), respectively; MSE was 0.00007, a decrease of 65.00% compared to PSO-BP (0.0002) and 50.00% compared to PSO-RBF (0.00014); and RMSE was 0.002579, a decrease of 32.11% and 31.26% compared to PSO-BP (0.0038) and PSO-RBF (0.003751), respectively. The results above demonstrate that the EMD-PSO-GRU-RBFNN model exhibits significantly superior performance in terms of error control, fitting accuracy, and stability.
[0147] Table 1 Comparison of Longitude Prediction Errors for Each Model
[0148]
[0149] Table 2 Comparison of Latitude Prediction Errors for Each Model
[0150]
[0151] like Figure 12 , Figure 13 As shown in the visualization results of the evaluation metrics, among all models, the trajectory fitted by EMD-PSO-GRU-RBFNN is closest to the real trajectory, with the smallest error distribution, and the most stable and continuous fitting of the temporal characteristics of complex trajectories. In contrast, although the PSO-BP and PSO-RBF models have achieved some accuracy improvement after introducing the particle swarm optimization algorithm, they are still significantly inferior to the combined model that introduces EMD residual decomposition and GRU structure in terms of error control, dynamic modeling, and generalization ability.
[0152] pass Figure 14 , Figure 15 , Figure 16 The trajectory comparison images show that the PSO-BP model deviates significantly in areas of rapid trajectory change, with large discrepancies between the predicted and actual trajectories, indicating its limited ability to handle complex nonlinear features. The PSO-RBFNN model performs relatively well in most areas, exhibiting stronger nonlinear fitting capabilities compared to PSO-BP, but still shows some error at inflection points and transition segments. In contrast, the EMD-PSO-GRU-RBFNN model proposed in this application demonstrates the best fitting effect, with the predicted trajectory highly consistent with the actual trajectory throughout the entire time period, maintaining excellent continuity and accuracy, especially at trajectory transition points. This application does not directly decompose the original latitude and longitude sequence, but only performs EMD on the latitude and longitude prediction residuals, effectively extracting detailed features from the residuals and using them to construct a multi-level prediction structure. By modeling high-frequency residual information with GRU, processing low-frequency trends with RBFNN, and optimizing key hyperparameters with PSO, the overall model outperforms traditional methods in both prediction accuracy and stability. Comprehensive image comparison and error index analysis further verify the significant advantages of the proposed method in trajectory prediction tasks.
[0153] Therefore, this invention provides a container ship trajectory prediction method based on EMD-PSO-GRU-RBFNN. By integrating EMD, PSO, GRU, and RBFNN, it achieves multi-algorithm synergistic enhancement: On the one hand, EMD can adaptively decompose the trajectory residual signal to extract different frequency feature components, reducing the non-stationarity and complexity of the data. Combined with GRU's strong time-series modeling capability for high-frequency components and RBFNN's efficient nonlinear fitting capability for mid- and low-frequency components, it effectively solves the problem that traditional single models are difficult to adapt to the strong time-varying and highly nonlinear characteristics of trajectories. On the other hand, the PSO algorithm performs global optimization of the key hyperparameters of GRU and RBFNN, avoiding the model from getting trapped in local optima. After superimposing the residual compensation mechanism, the prediction accuracy and stability are greatly improved, providing reliable support for scenarios such as ship collision avoidance, port scheduling, and maritime traffic management in intelligent shipping, and has good practicality and promotion value.
[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A container ship trajectory prediction method based on EMD-PSO-GRU-RBFNN, characterized in that, The specific steps are as follows: Step S1: Obtain the AIS data of the container ship, which includes time, longitude, latitude, speed and heading angle information; Step S2: Preprocess the AIS data and divide the preprocessed data into training set and test set according to time order; the preprocessing includes processing abnormal data and normalizing the data to construct time series data; Step S3: The diffusion factor and the number of hidden layer neurons of the radial basis function neural network (RBFNN) are optimized using the particle swarm optimization algorithm (PSO), and a trajectory prediction model is constructed based on the optimized RBFNN. Step S4: Train the trajectory prediction model based on the training set, use the trained trajectory prediction model to predict the training set and the test set, obtain the predicted value corresponding to the training set and the predicted value corresponding to the test set, and calculate the difference between the predicted value of the training set and the actual ship position coordinates to obtain the residual signal. Step S5: The residual signal is decomposed using Empirical Mode Decomposition (EMD) to adaptively decompose the residual signal into... m One intrinsic mode component and one residual component; Step S6: Based on the characteristic frequencies of the intrinsic mode components and residual components, construct a high-frequency component prediction model using a gated recurrent unit network (GRU) optimized by PSO, and predict the high-frequency components in the intrinsic mode components based on the high-frequency component prediction model. A mid-to-low frequency component prediction model is constructed using a radial basis function neural network (RBFNN) optimized by PSO. Based on the mid-to-low frequency component prediction model, the mid-to-low frequency components and residual components in the intrinsic mode components are predicted. Step S7: Add the predicted values of the high-frequency components, the low-frequency components, and the residual components to obtain the predicted value of the residual components; Step S8: Add the predicted value corresponding to the test set to the predicted value of the residual to obtain the corrected test set output; Step S9: Based on standard deviation (SD), mean error (ME), and coefficient of determination (R) 2 The mean square error (MSE) and root mean square error (RMSE) are used to evaluate the performance of the corrected test set output.
2. The container ship trajectory prediction method based on EMD-PSO-GRU-RBFNN according to claim 1, characterized in that, In step S2, data preprocessing includes data cleaning and data normalization. Data cleaning includes filling in trajectory breakpoints, removing outliers using kinematic constraints and statistical methods, filtering outlier data deviating from the trajectory, reducing noise using Kalman filtering, and unifying data granularity through equal-time resampling. Data normalization uses the max-min scaling method to map AIS data to the [0,1] interval, as shown in the following formula: ; in, These are the feature values of the original data. The global maximum value of the feature parameters. The global minimum value of the feature parameters. These are the normalized feature values of the data.
3. The container ship trajectory prediction method based on EMD-PSO-GRU-RBFNN according to claim 1, characterized in that, In step S3, the inputs to the trajectory prediction model include the time interval, longitude, latitude, speed, and heading angle information at the current moment, and the output of the trajectory prediction model is the ship's position coordinates at the next moment.
4. The container ship trajectory prediction method based on EMD-PSO-GRU-RBFNN according to claim 1, characterized in that, In step S4, the formula for calculating the residual signal is as follows: ; in, For residual signals, For the actual ship position coordinates, These are the predicted values corresponding to the training set.
5. The container ship trajectory prediction method based on EMD-PSO-GRU-RBFNN according to claim 1, characterized in that, In step S5, Empirical Mode Decomposition (EMD) is used to analyze the residual signal. Decomposed into m Each intrinsic mode component and residual components ,in, For high-frequency components, It consists of low to mid-frequency components.
6. The container ship trajectory prediction method based on EMD-PSO-GRU-RBFNN according to claim 1, characterized in that, In step S8, the predicted values corresponding to the test set are... With residual prediction Add them together to obtain the corrected test set output, as shown in the following formula: ; in, This is the output of the corrected test set.
Citation Information
Patent Citations
Long-distance ship track prediction method and device based on T-GRU
CN119047644A
Ship trajectory prediction method based on local wandering activity scene
CN120596854A