Ship Track Prediction Based on DLGWO-SVR

To improve the accuracy of ship track prediction, the improved Grey Wolf Optimizer (GWO) and Support Vector Regression (SVR) models are incorporated for ship track prediction. *e hunting strategy of dimensional learning was used to optimize the move search process of GWO and balance exploration and exploitation while maintaining population diversity. Selection and updating procedures keep GWO from being stuck in locally optimal solutions. *e optimal parameters obtained by modified GWO were substituted into the SVR model to predict ship trajectory. Dimension Learning Grey Wolf Optimizer and Support Vector Regression (DLGWO-SVR), Grey Wolf Optimized Support Vector Regression (GWO-SVR), and Differential Evolution Grey Wolf Optimized Support Vector Regression (DEGWO-SVR) model trajectory prediction simulations were carried out. A comparison of the results shows that the trajectory prediction model based on DLGWO-SVR has higher prediction accuracy and meets the requirements of ship track prediction.*e results of ship track prediction can not only improve the efficiency of marine traffic management but also prevent the occurrence of traffic accidents and maintain marine safety.


Introduction
To introduce unmanned vessels into commercial shipping lanes, an effective collision avoidance system must be built to ensure the level of safety required for unmanned vessel autonomy. Ship track prediction is the prediction of a ship's future navigation state based on the target ship's history and current trajectory. e results of ship track prediction can be used to evaluate collision risk, promote active collision avoidance, serve as a reference for ship collision avoidance decisions, and enhance the ability of situational awareness at sea.
Ship track prediction methods can be classified into three categories: Prediction methods based on a statistical model, probability graph model, and machine learning model. e prediction methods based on the statistical model include Gaussian regression [1], Kalman filter [2] and Bayesian network [3], etc., whose characteristics are as follows: In the modeling, the influence of wind, current, and other environments on the ship movement generally need to be considered. e establishment of the ship kinematics equation will increase the complexity of the model. As the experiment goes on, the error increases. e prediction methods based on the probability graph model include the Markov model [4] and grey model [5]. eir characteristics are as follows: It combines probability theory and graph theory, abstruse knowledge in different fields into probability model, and reduces problems in application to the calculation of probability distribution of probability model variables. Under the condition of a large amount of data, the grey model has low performance and long-running time, but the improved prediction effect is better than that of the least square method. is method improves the prediction accuracy to some extent, but it is still not ideal. Prediction methods based on the machine learning model include recurrent neural network [6], backpropagation neural network [7], long and short time memory network [8], and Support Vector Regression (SVR) [9]. With the following characteristics: As data amount increases, gradient explosion or gradient disappearance may occur, and the convergence rate is slow, which leads to the decrease of prediction accuracy and the low efficiency of sample training. SVR needs to choose parameters independently, which is subjective, and the prediction time is short, but the prediction accuracy needs to be further improved.
With the rise and widespread application of intelligent optimization algorithms, an increasing number of researchers have introduced optimization algorithms into prediction tasks, such as Particle Swarm Optimization (PSO) [10], Differential Evolution (DE) [11], Artificial Bee Colony (ABC) [12], Gravitational Search Algorithm (GSA) [13], Genetic Algorithm (GA) [14], and Ant Colony Optimization (ACO) [15], and other algorithms are also proposed for combinatorial optimization. ese algorithms can explore the search space continually and find the best or relatively close answer in a reasonable time.
Compared to algorithms such as PSO, GSA, DE, ABC, ACO, and the GWO method produces superior outcomes in unknown space. ere are several characteristics. First, the GWO algorithm showed superior exploitation. Second, the exploration ability of GWO was confirmed. ird, the GWO showed high local optima avoidance to some extent. Finally, the convergence analysis of GWO confirmed the convergence of this algorithm [16]. GWO requires fewer control parameters and is easy to implement. It has been used in many disciplines to address various optimization issues, such as parameter estimation [17], economic scheduling [18], pattern recognition [19], feature selection [20], and wind speed prediction [21].
In terms of prediction, GWO has not been found to be used in the research of ship track prediction. e GWO search procedure is carried out by α wolf, β wolf, and δ wolf in each iteration, ensuring that the algorithm is convergent. At the same time, it has several limitations, such as lack of population variety, a disparity between exploration and exploitation, local optimization, and premature convergence.
To balance the exploration and exploitation of GWO, Malik et al. [22] proposed Weighted Distance Grey Wolf Optimizer (WDGWO) to calculate the weighted average of the optimal solution. Long et al. [23] proposed Random Opposition-Based Learning Grey Wolf Optimizer (ROL-GWO) by modifying parameter C, which increased the searching ability of the algorithm. N. Singh and S. B. Singh [24] proposed an improved Grey Wolf Optimization algorithm to solve the economic dynamical load scheduling problem, which can both increase the global search and local search simultaneously. is step can coordinate the behavior of grey wolves, global and local random search, and opposition learning. Jayabarathi et al. [18] solved the economic scheduling problem by incorporating HGWO into GWO via variation and crossover operations. It performs well in solving the constrained nonkernel solution problem, although it does not achieve the proper balance of global search and local search. Gaidhane and Nigam [25] proposed GWO-ABC, a hybrid that combines the benefits of GWO and ABC. GWO adopted the information-sharing strategy of ABC to improve the global search capability while retaining the original hunting strategy of grey wolves for local search. Saxena et al. [26] proposed Equipped Grey Wolf Optimizer (E-GWO), which used sinusoidal function bridging, tournament selection, crossover, and mutation operations in the position update stage. e sinusoidal bridging mechanism and evolutionary operation assist the grey wolf in achieving greater accuracy and avoiding the local optimal solution. It shows good searchability in local scenes, but the lack of local search effect remains the main issue in crossover operations with a single peak problem and unbalanced search.
Many scholars enhanced GWO by modifying the GWO mechanism to avoid it falling into local optimality. Mittal et al. [27] developed Modified GWO (MGWO), which is based on a nonlinear control parameter approach and focuses on the right balance of global and local search, and this method may avoid the difficulties of the local optimal solution and premature convergence. Long et al. [28] proposed Exploration Enhanced GWO (EEGWO) to guide the search of new candidates by applying random individuals in the population for a location update. Nonlinear control parameters were employed to grow linearly during the iteration phase to balance the global and local searches of GWO. However, the primary issues remain falling into a local optimum and early convergence. Nasrabadi et al. [29] improved GWO by combining oppositional learning and parallelization to improve the convergence speed and the accuracy of the final result. However, in some cases, the convergence performance of the algorithm was not good. N. Singh and S. B. Singh [24] proposed Hybrid GWOSCA (HGWOSCA) to update the position of α in GWO by using the position update equation of the Sine Cosine Algorithm (SCA), which improved the global convergence and searchability of GWO when dealing with single-mode problems. But its global searching ability in multimode function is limited, and the combinatorial function balance problem persists. Alomoush et al. [30] proposed Harmony Search with Grey Wolf Optimizer (GWO-HS) Algorithm to solve global optimization problems by using opposing learning strategies. Meng et al. [31] proposed a hybrid Crisscross Search-Based Grey Wolf Optimizer (CS-GWO) algorithm, which used two crossover operators to improve the global search ability of α, β and δ wolves while maintaining the population diversity, but the algorithm convergence occurred too soon.
To solve the problem of poor population diversity and slow convergence rate of GWO, a hybrid Grey Wolf Optimizer based on Elite Opposition (EOGWO) was proposed by introducing the elite opposition-based learning strategy and simplex method into GWO [32]. Inspired by the hierarchical social pyramid of the GWO, Rodrguez et al. [33] proposed to introduce hierarchical operators into GWO to simulate the search process and gives five variations. e cellular automata (CA) concept is embedded into the GWO. A Cellular Grey Wolf Optimizer (CGWO) with a topological structure is proposed [34]. CGWO with a topological structure can also help to improve the diversity of the population. To solve the hybrid flow shop scheduling problem considering noise pollution, Lu et al. [35] proposed a Multiobjective Cellular Grey Wolf Optimizer (MOCGWO) algorithm, which integrates the merits of cellular automata for diversification and variable neighborhood search for intensification.
However, GWO is easy to fall into the local optimal solution, and the balance exploration and exploitation remains to be solved. Meanwhile, the selection parameters of the SVR model are subjective.
Alaa and Abdel [36] explore the advantages of the GWO algorithm in estimating the software reliability growth model's parameters with the objective of minimizing the difference between the estimated and the actual number of failures of the software system. Almazini and Mahamud [37] proposed an enhanced binary grey wolf optimization (EBGWO) algorithm for feature selection in anomaly detection by controlling the balancing parameter. is method focused on obtaining a value for a parameter that controlled the trade-off between exploration and exploitation.
Using the GWO, which was inspired by the previous research, the problem of SVR parameter selection can be solved. Improving the accuracy of ship track prediction for real-time data training and modeling is critical for better collision avoidance guidance at sea. A vessel trajectory prediction model based on Grey Wolf Optimized Support Vector Regression (GWO-SVR), which fully utilizes SVR's advantage of maintaining higher precision in the case of nonlinearity and small samples. However, the model has certain setbacks. e GWO model suffers from the lack of population diversity, the imbalance between exploitation and exploration, and premature convergence. us, if the previously trained model is still used, the accuracy of prediction decreases.
e main purpose of this study is to overcome the above deficiency of GWO and improve the effect of ship track prediction. e Dimensional Learning Hunting (DLH) strategy was used to improve the search performance of GWO and track the prediction accuracy of DLGWO-SVR. e DLH search approach is based on individual wolf hunting behavior in nature, and it expands the global search domain by using multineighbors learning. e DLGWO then uses both candidate wolves created by the DLH and GWO search algorithms to move the wolf X i from its current location to a better one in each iteration. In addition, the DLGWO employs a separate selecting and updating process in each iteration to determine the winner candidate wolf and update the current position for the following iteration. e main work of this paper is as follows: (1) Analyze the GWO and SVR models, apply the improved GWO in the training process of the SVR model, and establish the model of ship trajectory prediction. (2) e hunting search strategy based on dimensional learning is used to improve the search effect of grey wolves. In each iteration, candidate wolves are generated by the search strategy of DLH and GWO. (3) Select and update operations are used in each iteration to select the winning candidate wolf to update the position of the grey wolf in the next iteration. (4) e prediction experiment was carried out with AIS data, and the experimental results of GWO-SVR, Differential Evolution Grey Wolf Optimized Support Vector Regression (DEGWO-SVR), and DLGWO-SVR models were compared and analyzed. e remainder of this paper can be divided into the following four parts. Section 2 mainly proposes the SVR and GWO related principles. e vessel track prediction based on DLGWO-SVR is then presented in Section 3. Extensive experiments are carried out in Section 4. We end this work by summing up the main contributions in Section 5.

The Related Principles
2.1. Principle of SVR. SVR nonlinear mapping of the original data to high-dimensional feature space for linear regression. Figure 1 shows the structure of the SVR model in the data regression. K(x i , y i ) represents the kernel function.
In the SVR model, given the data set (x i , y i ) N i�1 ∈ R, where x i is the input vector of the SVR model and y i is the true output value. N is the total number of data points used. e output of the SVR model is as follows: is called the feature. e parameters ω and b are the weight and deviation of the support vector machine, respectively. In the feature space, the input vector x is mapped to the high-dimensional kernel-induced feature space vector φ(x), and the nonlinear regression is transformed into linear regression. ese parameters are calculated by minimizing the regular risk function: In equation (2), R(ω) is a regular weight vector representing the complexity of the SVR model. Equation (3) represents the estimated vector. Parameter λ and ε is a userdefined parameter, is within the error range ε, the loss is equal to 0. For other predicted points outside the range of the error ε, the loss is equal to the dimension of the difference between the predicted value and the error ε.
e regular parameter λ ensures that a good SVR model is generated. Increasing regularization parameters can penalize larger estimation errors. e estimation error can also be reduced by increasing the weight vector norm of the first expression in equation (2). However, an increase in the weight vector norm does not guarantee the generation of the SVR model.
In classical SVR, the appropriate value of the insensitive parameter ε is difficult to determine in advance. e regular risk function of the minimization equation (2) is equivalent to the minimization constrained risk function: Constraints are as follows:  (1) is derived as follows: Under the Karush-Kuhn-Tucker complementary condition, the parameters w and b are calculated. Parameter K is the kernel function, which is expressed as follows: e Lagrange multiplier a i and a i * are used to express the coefficient β i . In this study, the SVR model uses the following radial basis kernel functions: A solution is obtained in equation (6) where the coefficient β i is nonzero only for a subset of the training data.

Principle of GWO.
e grey wolf was inspired by social hierarchy and hunting behavior. Initialize α, β and δ wolves as the optimal solution, and guide the rest of ω wolves to find the optimal solution. Starting from randomly generating the initial wolves in the search space, the fitting function estimated the position of the wolves and repeated the hunting process of the grey wolves until the predefined number of iterations so as to determine the optimal hunting position, namely the position of α wolves.
ere are three main stages in the hunting process: encircling, hunting, and attacking prey.

Encircling Prey.
Grey wolves encircle prey during the hunt. Encircling prey is modeled as follows: where t indicates the current iteration, Xp is the prey position, and X is the position vector of a grey wolf. A and C represent coefficient vectors. r1, r2 ∈ [0, 1].a decreases linearly from 2 to 0.

Hunting.
e hunting behavior of grey wolves was modeled on the assumption that α, β and δ wolves knew the location of prey. e following formulas are proposed in this view: where X α , X β , X δ represent the positions of α, β and δ wolves in the t iteration, respectively. X 1 , X 2 and X 3 represent the positions of α, β and δ wolves in the t + 1 iteration, respectively.

Attacking Prey.
e prey ceases to move and the hunt ends. e wolves began to attack their prey. e next position of a search agent can be in any position between its current position and the position of the prey. is process is carried out by linear reduction of the iterative curve of local and global search.
Each iteration a updates within the range of [2,0], half of which is used for global search to achieve a smooth transition effect. e rest is used as a local search, updating the  Figure 1: Structure of the support vector regression (SVR) model. location of the optimal solution to the location of the prey and the current location of the wolf.

DLGWO Model.
In GWO, α, β, δ and ω wolves move toward the search region for the global optimal solution. is behavior could result in a locally optimal solution. Furthermore, the decrease of population diversity makes it easy for grey wolves to fall into local optimum. To address this issue, grey wolf employs dimension learning hunting search strategy to determine candidates and then improves grey wolf algorithm through selection, update, and other operations [38].
Improvements are made in the steps of initialization, movement, and selection and update.

Initialization.
In the search space composed of [l j , u j ], N wolves are randomly distributed.
e position of the i th Wolf in the t-th iteration is expressed as X i (t) � x i1 , x i2 , . . . , x i D . In this case, D represents the dimension of the problem, and the entire population of grey wolves will be stored in a matrix with N rows and D columns. e fitting value of X i (t) is calculated by the fitting function f(X i (t)).

Movement.
Individual hunting of wolves is considered that is learned by its neighbors, the grey wolf in the neighborhood teaches its neighbor to become another candidate for the new position of X i (t).
e position of X α , X β and X δ determines the position of prey. e first candidate set for the new position of the grey wolf X i (t) is called X i − GWO(t + 1), and this value is calculated by the traditional GWO search strategy.
Each dimension of the new position of the grey wolf X i (t) is calculated by learning its neighbors and then using equation (14). Another candidate set for the new position of grey wolf X i (t) forms a DLH search strategy, called X i − DLH(t + 1), R i (t) is solved by calculating the Euclidian distance between the current position X i (t) and the candidate position X i − GWO(t + 1).
rough equation (13), considering R i , D i is the Euclidian distance between X i (t) and X j (t), the neighbors of X i (t) are denoted as N i (t).
e neighbors of X i (t) are constructed, and the neighbor X n,d (t) of the D dimension is randomly selected from N i (t), and the wolf X r,d (t) is randomly selected from the population. Multineighbor learning is performed through equation (14).

Selection and Update.
By comparing the fitting values of X i − GWO(t + 1) and X i − DLH(t + 1), the optimal solution is selected.
Finally, after all the individuals have completed this step, the iteration counter is incremented by 1, and the next iteration is searched until the predefined number of iterations is reached.

DLGWO-SVR Model.
e improved GWO is used to establish the ship trajectory prediction model based on DLGWO-SVR. Figure 2 shows the flow chart of the DLGWO-SVR prediction model. e detailed experimental steps of DLGWO-SVR are as follows: Step 1: Initialize the position of N wolves and the relevant parameters of the grey wolf model.
Step 2: Calculate the positions of α, β and δ wolves, input the SVR model for training, and calculate the optimal solution.
Step 3: Update the position of the grey wolf according to the optimal solution.
Step 4: Calculate the distances of α, β and δ wolves to prey, and the positions of α, β and δ wolves, respectively, and calculate the first candidate set X i − GWO(t + 1) for the new position of X i (t).
Step 5: Calculate the Euclidian distance between the candidate position X i − GWO(t + 1) and the current position X i (t), denote as radius R i (t).
Step 6: Build the neighborhood N i (t) of X i (t), and calculate another candidate set X i−DLH,d (t + 1) by using the random neighbors of the d dimension.
Step 7: Select and update operations. By comparing the function values of the candidate set, the position of the next iteration of the grey wolf is determined from (X i − GWO(t + 1), X i − DLH(t + 1)).

Scientific Programming
Step 8: Repeat Steps 2-7 until the preset number of iterations is reached. e experiment is terminated and the predicted results are returned.

Datasets.
e experiment was modeled and simulated with the help of MATLAB toolbox libsvm-3.24. In this experiment, the AIS data used for prediction are from September to October 2018 of Gulei Port in Zhangzhou, Fujian.
e raw data should remove the wrong in the pretreatment and then carry out prediction and verification experiments. ere are three types of errors in AIS data.
(1) e MMSI code of the ship is not 9 digits, or it is an unreasonable record. (2) e longitude and latitude of the ship are beyond the reasonable range. For example, the longitude is greater than 180°, the latitude is greater than 90°, or the value of the longitude and latitude is negative. (3) e ship's speed and course are beyond the reasonable range, such as the course is greater than 360 or the speed is less than 0. Table 1 randomly lists part of the AIS data of September 2018. ese data are sample data after preprocessing.

Prediction Results for Different MMSI Ships.
Input different sample data to the prediction model for the experiment. e predicted experimental results are shown below. Figure 3 shows the prediction result of MMSI 259681317. Figure 4 shows the prediction result of MMSI 412444715. Figure 5 shows the prediction result of MMSI 412358490. Figure 6 shows the prediction result of MMSI 412445837. Figure 7 shows the prediction result of MMSI 600003568.
As can be seen from the above figures, the predicted trajectory is basically coincident with the original trajectory, or is parallel to the original trajectory with a very small distance difference near the original trajectory. However, the small distance difference will not affect the actual operation of the staff but is helpful to judge the traffic situation and greatly avoid the occurrence of maritime traffic accidents. erefore, the above figures show that the new model can accurately predict the ship's trajectory.

Prediction Errors for Different MMSI Ships.
To further verify the prediction accuracy of the proposed model, the following is a comparison of the six experimental error curves for trajectory prediction. In the following figure, the num represents the number of track points, and the vertical axis represents the value of the prediction error. Figure 8 shows the prediction error of MMSI 259681317. Figure 9 shows the prediction error of MMSI 412444715. Figure 10 shows the prediction error of MMSI 412358490. Figure 11 shows the prediction error of MMSI 412445837. Figure 12 shows the prediction error of MMSI 600003568.
As can be seen from Figures 8-12, the prediction error basically fluctuates around the value of 0. Unlike the others, the error curves in Figure 10 are mostly below 0 and remain within 0.01°. However, they all meet the needs of the nautical practice.

Model Evaluation.
e prediction model is evaluated by means of mean square error, mean absolute error, and mean absolute percentage error. Assume that the true value y � y 1 , y 2 , . . . , y n , y ′ � y 1 ′ , y 2 ′ , . . . , y n ′ , then the evaluation index is expressed as follows: e E MAE , E MSE , and E MAPE of six trajectories are recorded in Table 2. e prediction error of each trajectory is very small, and the prediction accuracy of the model proposed in this paper can meet the requirements of ship track prediction.

Error Comparison before and after Model Improvement.
To further verify the prediction accuracy of the proposed model, the prediction errors of DLGWO-SVR and GWO-   SVR models were compared. In the following figure, num represents the number of track points, and the vertical axis represents the value of the prediction error. Figure 13 shows the model error comparison of MMSI 259681317. Figure 14 shows the model error comparison of MMSI 412444715. Figure 15 shows the model error comparison of MMSI 412358490. Figure 16 shows the model error comparison of MMSI 412445837. Figure 17 shows the model error comparison of MMSI 600003568. Figures 13-17 show that the overall prediction error of DLGWO-SVR is smaller than that of GWO-SVR, and the prediction error of DLGWO-SVR fluctuates less. On the whole, the performance of the proposed method is better than that of GWO-SVR.

Error Comparison between the DLGWO-SVR and Other
Models. To further verify the prediction accuracy of the proposed model, it was compared with DEGWO-SVR and GWO-SVR model. As the initial population of GWO is randomly generated, the grey wolf individuals lack diversity in the search space and are prone to fall into the local optimum. DE algorithm maintains population diversity through mutation and selection operations to improve the performance of GWO in local and global search. Figure 18 shows that the prediction error of the proposed prediction model and DEGWO-SVR model. Table 3     performs better than DE in balancing global and local search, the proposed model performs better than DE and has higher prediction accuracy. As a result, the suggested model in this work meets the prediction requirements and increases the accuracy of the GWO-SVR model greatly.

Conclusions
In this paper, we use a DLH strategy to improve GWO for ship track prediction experiments. e improved optimization model can well balance the exploration and exploitation capabilities of GWO while maintaining the diversity of the population to avoid GWO falling into the local optimal solution, thus improving the accuracy of trajectory prediction.
By conducting prediction experiments on ship trajectories with different MMSI and different lengths, it is not difficult to see that the prediction accuracy of the DLGWO-SVR model meets the requirements of marine ship trajectories prediction and improves the prediction accuracy of ship trajectories. Compared with other methods, DLGWO-SVR can maintain high prediction accuracy in small sample data.  Future research can be combined with the information of surrounding ships and geographical environment to predict the sailing state of ships, and more state information of ships can also be considered for ship track prediction. Furthermore, it is necessary to make a realtime prediction of the trajectory of the target ship sailing in the ocean.
In addition, there are many optimization algorithms not mentioned in this paper, such as Monarch Butterfly Optimization (MBO), earthworm optimization algorithm, Elephant Herding Optimization (EHO), moth search algorithm, slime mould algorithm, and Harris Hawks Optimization (HHO). ese optimization algorithms are very effective when dealing with certain problems. MBO and HHO can be used in combination with other machine learning algorithms to deal with issues such as numerical optimization and feature selection. For example, the butterfly optimization algorithm can be combined with ACO and ABC algorithm. EW algorithm can be combined with a GA, PSO, and DE algorithm to deal with specific problems. EHO and SVM sets are better than GA and grid search in classification accuracy. e hybrid optimization algorithm shows better convergence and higher accuracy and lowers computational complexity when solving some suitable problems.
Data Availability e data that support the findings of this study are available from the corresponding author upon reasonable request.

Conflicts of Interest
e authors declare no conflicts of interest.