Prediction of ship trajectory based on deep learning

The rapid development of computer technology strongly promotes the study of maritime traffic safety. The application of artificial intelligence technology makes the ship’s trajectory prediction not limited to complex physical models, and improves the generality of ship’s track prediction. To address the problems of relatively poor prediction accuracy in existing ship trajectory prediction research and high coupling of algorithms during ship navigation while the prediction model needs to be improved, this paper combines grey forecast prediction model and long and short-term memory (LSTM) neural network to establish a neural network model for ship trajectory prediction. This model can effectively increase the number of messages in LSTM model, and reduce the loss value of the model and improve the accuracy of ship track prediction. The prediction method in this paper is verified by AIS data of a ship. The results show that compared with other time series prediction algorithms, this algorithm has higher prediction accuracy.


Introduction
Ship trajectory prediction involves interdisciplinary problems of transportation engineering and intelligent science and technology, and has an extremely important research value on water intelligent traffic supervision and abnormal detection of behaviour.Vessel trajectory prediction is to use historical data, mining the historical position information and navigation habits of ships, and calculate the future position and behaviour dynamics of ships through algorithms.An effective ship trajectory prediction algorithm can reduce the probability of accidents and save time.Facing the complex maritime traffic environment, accurate and reliable ship trajectory prediction is the basis for reducing the occurrence of water traffic accidents.
The rapid development of artificial neural network technology has led to a new way in solving complex ship trajectory prediction problems.
x is the series of (0) () xk , (1) z is the average sequence of (1) x . ( The variable a represents the development coefficient, and b refers to the grey action volume.

BPNN
BPNN was first proposed by Rummerhart in 1986.The algorithm has two parts: forward transmission of information and backward error propagation, respectively.The classical BPNN has three or more layers of forward network with high efficiency and intelligence.BPNN is a supervised neural network.The prediction is trained and updated using the gradient descent method layer by layer.This training process imbues the network with memory and prediction ability through training.Figure 1 shows the standard BPNN structure, which contains input layer, hidden layer, and output layer.The input layer is composed of n neuron nodes.The input vector is denoted as 12 ( , , , ) . The hidden layer consists of l neuron nodes.The output layer has k neuron nodes.

LSTM
The LSTM model is composed of interconnected memory modules.One or more autocorrelated kernel elements are contained in each module.The control of information flow into the storage cells is facilitated by additional cells.There exist three important gates in this process: input gate, output gate and the forget gate.The three gates are nonlinear aggregation cells.
The activation of the core unit cell is controlled through the subsidiary nodes.Figure 2 shows the internal structure of the LSTM at one point in time.
Cell is a memory storage place where the information is saved until the next moment.a is the output of this moment.f and g represent activation functions.The activation functions commonly used in LSTM are tanh and sigmoid .Z is a value obtained by stitching the input parameter t X that moment and the hidden layer 1 t h − information vector stored in the memory cell at the previous moment.Then, dotting the product with the weight parameter vector W . Finally, the value is obtained by the activation function tanh .

( [ , ]
) ) ) i Z is the gating device of the input gate by splicing it with the t X and 1 t h − vectors and then dotting it with i W .After processing by the activation function sigmoid , a number between 0 and 1 is finally obtained and used as the control signal for the input gates.

GF-LSTM
AIS data transmission is intermittent.Therefore, AIS data need to be judged.If the time interval for receiving AIS data is greater than 3 minutes, the grey prediction model is adopted to supplement and add an AIS data.If the interval of time is less than 3 minutes, data are not added.
Then, the new data set input LSTM model for training.Finally, the ship trajectory is predicted.

Data preprocessing
The data uses AIS information of a ship.It includes MMSI (maritime mobile service identity), receiving time, longitude, latitude, speed and other parameters.The parameters of the ship are as follows: Table 1.Ship parameters

Ship length 330m
Ship width 60m Draft 19.6m The characteristic of () Yt , the trajectory defined at time t is able to be represented as follow: ( ) { , , , } Y t lon lat v c = (7) lon means longitude.lat means latitude.v means speed and c means course.To minimize errors introduced by the different magnitudes of input data, the min-max normalization is utilized as the data normalization, and its processing is shown below: X represents the regularized data.The initial data is denoted by * X .The maximum and minimum values in the initial set of data are denoted by x X and n X , respectively.The standardized data eliminates the influence of data range and preserves the relationships existing in the original data.

Evaluation Criteria
This paper evaluates the ship trajectory forecast model using mean square error (MSE).The MSE is a statistical metric that measures the expectation value of the squared difference between the actual value of parameter t y and the predicted value of parameter ˆt y . 2 M represents the number of samples.The accuracy of the trajectory forecast model increases as the value of MSE decreases.

Results
Considering the long sending frequency of AIS data, to improve the accuracy of ship track forecast, the gray-scale forecast model is firstly used for supplementing the AIS data, and the results are shown in figure 4 and figure 5.Although some data points may turn out to be noisy points, these noises can effectively enhance the stability of the model to enhance the model forecast accuracy.The three algorithms are trained separately for each case.The training set includes 400 data points, and the test set is composed of 50 data points.The parameters are set to 1 hidden layer.Learning rate is 2 1 10 −  .The count of hidden nodes is 11.Once trained, the model makes predictions on the same test set used for training.Although the training of GF-LSTM model takes more time from table 2, the prediction accuracy is higher after the supplementary data.The internal structure of BPNN is relatively simple, but the accuracy of prediction is not high.Figure 6 shows that the GF-LSTM model is effective in predicting the trajectory of the ship.BPNN prediction accuracy is small.The accuracy of LSTM predicts the trajectory is higher than that of BPNN, but the volatility of the predicted trajectory is larger than GF-LSTM.

fZ
is the gating device of the forgetting gate.o Z is the gating device of the output gate.The range of 1].The number 1 signifies that the gate is open and the number 0 means the gate is closed.

Figure 7 .Figure 8 .
Figure 7. GF-LSTM convergence process graph Neural networks take historical trajectory data of ships as input variables, establishing function mapping relationships to predict trajectories.Deep learning is developed from neural networks, but the prediction accuracy and classification accuracy of deep learning for data has far exceeded that of traditional neural networks.This study improves a ship track forecast model through a deep learning algorithm.The feature variables are extracted from data collected by the automatic identification system (AIS) while the ship is traveling.Then, the track forecast is realized by the GF-LSTM model.By comparing this prediction model with the commonly used a long and short-term memory (LSTM) and error back propagation training neural network (BPNN) models, the improved model represented in this paper is shown to be more accurate.

Table 2 .
Model prediction precisionTherefore, compared with other time series prediction algorithms, GF-LSTM has a higher prediction accuracy due to the normalization of the data.The range of the data is [0,1].