Vessel Track Prediction Based on Fractional Gradient Recurrent Neural Network with Maneuvering Behavior Identification

To improve the accuracy of ship track prediction, a fractional-order gradient descent method is adopted into a recurrent neural network (RNN). +e convergence of the proposed algorithm is proved. Identification of ship maneuvering behavior, atmospheric information, and oceanographic information is considered in vessel tack prediction. +e ship track of Xiamen Port is predicted using the new algorithm. Error analysis is made with different factional orders and traffic busy degrees. Results show that the testing and training error differs with different fractional orders. +e predicted track results can not only improve the efficiency of marine traffic management but also prevent and warn the safety accidents, so as to avoid accidents.


Introduction
Ship trajectory prediction is to predict the ship's future navigation position by analyzing the history and current trajectory law of the target ship under the premise of considering the external environment around the target ship and the performance of the ship's own equipment. Ship track prediction uses the current navigation state of the ship, combined with the operation of the pilot, the surrounding environment information and the ship's maneuverability, and other constraints to predict the future position of the ship. is is a basic technology of marine traffic management and a necessary condition to realize the automation and intelligence of marine traffic management. e predicted track results can not only improve the efficiency of marine traffic management but also prevent and warn the safety accidents, so as to avoid accidents.
A long short-term memory network (LSTM) deep learning model was proposed [1]. Vessel trajectory prediction using historical AIS data was presented [2]. Gaussian process model was studied [3]. e research of ship track prediction adopts a variety of advanced artificial intelligence optimization algorithms, such as neural network. In 1990, the first fully connected recurrent neural network (RNN), namely, Elman network, was proposed [4]. In 1997, a bidirectional RNN with deep structure was proposed [5]. In 1997, LSTM was proposed [6]. However, due to the problems of gradient vanishing and gradient exploding, RNN training is very difficult and its application is very limited. An adaptive optics prediction algorithm based on LSTM was proposed [7]. An adaptive PSO optimized LSTM network was proposed [8]. A modified atom search optimization-based deep RNN was proposed for epileptic seizure prediction [9].
However, gradient descent sometimes has some disadvantages, such as fluctuation. erefore, its improvement such as the introduction of fractional-order calculus is needed. e variable-order fractional discrete-time neural network was proposed [10]. A fractional-order complex-valued RNN was designed [11]. A fractional-order memristive RNN was proposed [12].
In the intelligent maritime traffic system, some research achievements have been made. A ship trajectory and navigation state prediction method based on AIS data was proposed, with properly designed learning, motion modelling, and knowledge base-assisted particle filtering processes [13]. A density-based clustering and bidirectional long short-term memory-(BLSTM-) based supervised learning were proposed for vessel trajectory reconstruction [14]. Douglas Peucker (DP) and kernel density estimation (KDE) algorithms were used for the compression and visualization of large ship trajectory and the acceleration of GPU [15]. A continuous berth scheduling problem was solved with the objective of minimizing the total operating cost [16].
However, due to the problems of gradient vanishing and gradient exploding, RNN training is sometimes very difficult. is paper adopts fractional order. e influence of fractional order and learning rate on the algorithm performance is analyzed. e main contributions of this paper are as follows: (1) Fractional-order calculus is applied to gradient descent for training recurrent neural network (2) e convergence of fractional gradient recurrent neural network is proved (3) Identification of ship maneuvering behavior, atmospheric information, and oceanographic information is considered in vessel tack prediction e remainder of this paper can be divided into the following four parts. Section 2 mainly proposes the related work. e vessel track prediction based on fractional gradient recurrent neural network 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.

Identification of Ship Maneuvering Behavior.
ere are three types of ship maneuvering: keeping current course, changing course, and changing speed. Sample three points. P i is the i-th trajectory point in the trajectory. e time interval between the adjacent points P (i−1) and P (i+1) is Δt. V (i) is the velocity from P (i) to P (i−1) . V (i+1) is the vector velocity from P (i) to P (i+1) : C represents the course of the ship and V is the speed of the ship. a s is the ship speed change rate and a c is the course change rate: Four threshold parameters are set to divide the ship maneuvering behavior mode: where a Weak is weak yaw with changing course, a Sharp is the strong yaw with changing course, V Zero is the speed threshold of berthing, and a Acceleration is the variable speed threshold. e identification model of ship maneuvering mode is set according to different kinematic constraints. e identification rules are as follows: (a) If V (i) < V Zero and V (i+1) < V Zero , P i belongs to staying (b) If a s < 0 and |a s | > a Acceleration , P i belongs to deceleration navigation behavior (c) If a s > 0 and |a s | > a Acceleration , P i is considered to be accelerated and |a c | < a Weak , P i belongs to keeping direction and speed (e) If a c < 0 and a Weak < |a c | < a Sharp , P i belongs to weak yaw with left rudder (f ) If a c > 0 and a Weak < |a c | < a Sharp , P i belongs to weak yaw with right rudder (g) If a c < 0 and |a c | > a Sharp , P i belongs to strong yaw with left rudder (h) If a c > 0 and |a c | > a Sharp , P i belongs to strong yaw with right rudder

Recurrent Neural Network. RNN establishes weighted connections between neurons in layers.
With the continuous progress of the sequence, the former hidden layer will affect the later hidden layer. o represents the output. y represents the value given by the neurons, and L represents the loss function.
x is the input vector. w denotes the weight of the neural network. e loss function is accumulated with sequence. Since the weights are shared in RNN, weights in RNN are the same. e error is defined as follows: e loss function is defined as follows: Denote

Fractional-Order Calculus.
e Riemann-Liouville definition of fractional calculus is as follows.
where α is the fractional order, whose real part is positive.Γ(x) is the gamma function defined as follows: Definition 2. For the absolute integrable function x(t) in the interval [t 0 , t], its Riemann-Liouville differential is defined as follows: where α ∈ [m − 1, m).m is a positive integer.

Vessel Track Prediction Based on Neural
Network. e neural network model is used to learn the current navigation conditions and the driving habits of the ship drivers. e navigation state of the next moment is predicted by the historical speed, course, and meteorological and hydrological information. us, the navigation state of the ship in the future is predicted by recursive iteration. e position of the ship at the next moment is predicted by the longitude and latitude, speed, course of the ship, and the interference of the current marine environment at the last moment. Take the historical dynamic navigation data and the historical sea wind and current data as the input of the neural network. Take the expected ship position as output, and the neural network is trained by comparing the difference between the real position and output position. e trained neural network can predict the position change of the ship through the dynamic data of the ship's current navigation and the interference of sea wind and current. Fractional-order training is adopted to further improve the prediction accuracy of the model. e dynamic data of ship navigation, sea wind, and current interference are as follows: where Vs is the speed of the ship, Cs is the course of the ship, Vw is the speed of sea wind around the ship, Cw is the direction of the wind around the ship, Hw is the height of the wave around the ship, and Ht is the height of the tidal around the ship. e number of input layer nodes is 6, and the number of output layer nodes is 2. e hidden layer is defined as one layer. Figure 1 shows the track prediction method by neural network.

FRNN Algorithm.
e weight is updated using the gradient: e fractional-order derivative of L(t) is as follows: e derivative of L(t) is as follows: Substituting (16) into the first item of (15) yields Substituting (18) into the first item of (8) yields Substituting (19) into the first item of (17) yields

Lemma 1.
e loss function L is monotonically decreasing,

Trajectory Prediction Based on FRNN.
e process of the FRNN algorithm for ship track prediction is shown as follows: Step 1: initialize the neural network model Step 2: input training samples Step 3: calculate the hidden layer Step 4: calculate the output layer Step 5: calculate the output error Step 6: if the learning requirement is satisfied, turn to step 2 until the training results meet the requirements Step 7: initialize the neural network with the optimal weights Step 8: input data needed for prediction into the trained neural network and output prediction results

Datasets.
e AIS data used for prediction are the ship track data of Xiamen port. e original data should remove the wrong AIS data in the pretreatment. e records of obvious errors in AIS data include the following three types: (1) e length of the ship's code is not 9 digits or unreasonable record (2) e longitude and latitude of the ship exceed the reasonable range, for example, longitude >180 or latitude >90 or negative longitude and latitude (3) e ship's speed and course exceed the reasonable range, for example, course >360 or speed <0

Constant Speed
Mode. Table 1 lists information of MSC Bilbao ship, which belongs to constant speed mode. e trajectory is plotted in Figure 2.

Acceleration
Mode. Table 2 lists information of HAIYANG989 ship, which belongs to acceleration mode. e trajectory is plotted in Figure 3.  Table 3 lists information of SANTA LAURA ship, which belongs to deceleration mode. e trajectory is plotted in Figure 4. Table 4 lists information of SOFIE MAERSK ship, which belongs to turning slightly to the left mode. e trajectory is plotted in Figure 5.

Turn
Slightly to the Right. Table 5 lists information of HAIYANG989 ship, which belongs to turning slightly to the right mode. e trajectory is plotted in Figure 6.        Table 6 lists information of KAPITAN AFANASYEV ship, which belongs to turning sharply to the left mode. e trajectory is plotted in Figure 7. Table 7 lists information of KAPITAN AFANASYEV ship, which belongs to turning sharply to the right mode. e trajectory is plotted in Figure 8. Figure 9 shows the ship track prediction with MMSI 413705970. Figure 10 shows the longitude prediction error of the ship with MMSI 413705970 on December 30, 2019. Figure 11 shows its prediction error of latitude with MMSI 413705970. Figure 12 shows the ship track prediction with MMSI 412600383. Figure 13 shows its prediction error of longitude. Figure 14 shows the prediction error of latitude with MMSI 412600383. e above figures show that the new algorithm can accurately predict the ship track.

Results with Different Fractional Orders.
e test and training accuracy with different fractional orders and batch sizes are listed in Table 8. e maximal iteration is 100. Table 8 shows that the testing and training error differs with different fractional orders. e maximum training accuracy is obtained when the fractional order is 0.3. When the fractional order is 0.3, the test accuracy is the highest. e test accuracy with different fractional orders and batch sizes is shown in Figure 15.      Scientific Programming e train accuracy with different fractional orders and batch sizes is shown in Figure 16. Figure 17 shows the loss function curve. Figure 18 shows the accuracy curve. Figure 19 shows the neural network weight curve.

Comparison.
e proposed algorithm is compared with RNN and FRNN without maneuvering behavior identification (MBI). e errors of longitude of the ship with MMSI 413705970 are shown in Figure 20.         Figure 21. Figures 20 and 21 show that the performance of the proposed algorithms is better than that of RNN and FRNN without maneuvering behavior identification.

Conclusion
is paper utilizes fractional gradient descent to improve RNN. e proposed algorithm can adaptively learn the optimal weights. It complies with the literature review compared with RNN and FRNN without maneuvering behavior identification, which can improve prediction accuracy. e academic implications are applying fractional-order calculus to gradient descent for training recurrent neural network. e convergence of fractional gradient recurrent neural network is proved. e limitations of the paper are not able to predict long time track. In future studies, the input data of the track prediction model will include the dynamic information of the surrounding ships and the constraint information of the geographical environment, so as to achieve the long-term prediction of the ship's track or under some sudden or extreme conditions. e kinematic model of the ship will be considered. e influence of different time intervals on the ship's trajectory will be measured.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest.   10 Scientific Programming