Vessel Navigation Behavior Analysis and Multiple-Trajectory Prediction Model Based on AIS Data

With the increasing application and utility of automatic identiﬁcation systems (AISs), large volumes of AIS data are collected to record vessel navigation. In recent years, the prediction of vessel trajectories has become one of the hottest research issues. In contrast to existing studies, most researchers have focused on the single-trajectory prediction of vessels. This article proposes a multiple-trajectory prediction model and makes two main contributions. First, we propose a novel method of trajectory feature representation that uses a hierarchical clustering algorithm to analyze and extract the vessel navigation behavior for multiple trajectories. Compared with the classic methods, e.g., Douglas–Peucker (DP) and least-squares cubic spline curve approximation (LCSCA) algorithms, the mean loss of trajectory features extracted by our method is approximately 0.005, and it is reduced by 50% and 30% compared to the DP and LCSCA algorithms, respectively. Second, we design an integrated model for simultaneous prediction of multiple trajectories using the proposed features and employ the long short-term memory (LSTM)-based neural network and recurrent neural network (RNN) to pursue this time series task. Furthermore, the comparative experiments prove that the mean value and standard deviation of root mean squared error (RMSE) using the LSTM are 4% and 14% lower than those using the RNN, respectively.


Introduction
Since 2007, the International Maritime Organization requested that the international vessels over 300 and noninternational vessels over 500 tons must be attached by automatic identification system (AIS) transmitters and receivers [1]. e AIS has become one of the most important broadcast systems of vessel navigational message, e.g., longitude, latitude, course, and speed via VHF. e message of the AIS can not only be transmitted from ship to shorebased center but can also be exchanged between ships. erefore, the AIS has been of great support for marine traffic tracking and management such as collision avoidance and risk evaluation [2][3][4]. With the wide use of the AIS, large volumes of AIS data are generated and stored. Simultaneously, it is increasingly becoming a challenging issue to efficiently utilize AIS data and provide vessel operators with more effective and convenient navigation services. Especially, the vessel trajectory information-based AIS data play a crucial role in the field of transportation studies for significant guidance of navigation behavior analyses [5][6][7][8][9].
In recent years, the related studies can be mainly divided into three categories. In the first category, most studies focus on collision avoidance and accident analysis, and they use AIS data to determine the parameters in the ship collision avoidance model [2][3][4]. In the second category, the studies briefly used AIS data for navigation behavior analysis and classification, and several classification methods such as the k-nearest neighbor (KNN) algorithm and other new methods were used to classify the trajectory [5,6]. Zhao and Shi focused on behavior analysis based on AIS data and proposed an improved Douglas-Peucker (DP) algorithm for compressing vessel trajectory data [7]. In the final category, scholars mostly focused on trajectory reconstruction-and prediction-based AIS data using regression analysis methods [8][9][10]. Several scholars also focus on state-of-the-art machine learning techniques for trajectory prediction [11]. Among the above research studies, trajectory prediction is the most key technique of vessel intelligent navigation systems, which can provide navigation guidance and support for vessel operators based on historical AIS data. However, the existing research studies mainly pursued one single trajectory prediction so that the model is lack of generalization ability, and a training process is required for each trajectory individually [5][6][7][8][9][10][11].
To address this issue, this article proposed a multipletrajectory prediction model. To realize predicting multiple trajectories, a novel trajectory representation method is proposed to be able to extract common features of multiple trajectories using a series of AIS data points. e proposed method is based on a hierarchical clustering approach [12,13]. In this work, we use the Euclidean metric to measure the similarity between two points (clusters) using their longitude and latitude from AIS data and sequentially combine two points (clusters) using a greedy order of minimum distance between them. Using our method, multiple trajectories can be represented as common feature points with the same optimal number. Since the new trajectory is still a classic time series data, the article employs long short-term memory (LSTM)-based network and recurrent neural network (RNN) to train the prediction model based on the new features. In the first part of numerical experiments, we compare the proposed features with the traditional features extracted by DP and leastsquares cubic spline curve approximation (LCSCA) algorithms. e loss of our features against the original trajectories is 0.005, which is reduced by 50% and 30% compared with the DP and LCSCA algorithms, respectively. In the second part of numerical experiments, we train the trajectory prediction models based on our features using the LSTM and RNN. e measures of root mean squared error (RMSE) is also used to estimate the performance of different prediction models. We found that the prediction models using both the LSTM and RNN can obtain the significantly low RMSE when the dimension of the proposed feature is set to 13. Especially, the model using the LSTM with the optimal parameters (activation function is relu, and dropout is 0.2) can obtain the minimum RMSE of 0.0009, which dramatically outperformed the models using the RNN. e experimental results also show that the mean value and standard deviation of RMSE using the LSTM are 4% and 14% lower than those using the RNN, respectively. erefore, this article makes two main contributions to the field of trajectory prediction. Firstly, the proposed representation method can extract more approximate features to the original trajectories with fewer AIS points. Secondly, this work solved the main limitation of multiple trajectory prediction accounting for the common features extraction. e models based on our features show efficiency for trajectory prediction, and especially the prediction models using the LSTM. e remainder of this paper is organized as follows. Section 2 introduces the literature review of navigation behavior analysis and trajectory prediction model. Section 3 describes the comparative experiments to evaluate the performance of the proposed trajectory representation method and trajectory prediction model. Finally, conclusions are presented in Section 4. e DP is a feature extraction algorithm that approximates the curve using a series of line segments. In the field of maritime engineering, the DP has been widely used for trajectory representation based on AIS data. Initially, the DP starts with a threshold to denote the maximum distance, and the simplification result of the trajectory can be obtained according to the following steps [14]: An improved method that uses kernel-based sparse representation to iteratively obtain a salient feature cluster was proposed in [15,16]. is method applied an approximate dependence analysis to further maintain complementarity, while eliminating redundancy among the features is selected by the nonlinear orthogonal matching pursuit.

Materials and Methods
LCSCA is also an efficient method to represent trajectory using featured points [15]. When the number of the points of the original trajectory is N, the points can be arranged as in ascending order of time. e original trajectory can be described as We set the number of representative points as p, the node vector as τ, and the parameter vector as l � (0, l 2 , . . . , l N−1 , l N ). Node vector τ can be calculated as 2 Journal of Advanced Transportation where i � 1, 2, . . . , p and j � 2, 3, 4 { }. If the coordinates of all the representative points are denoted as e control points can be obtained according to equation (3), and j is chosen to be 4 for cubic splines. us, where the matrix C of the representative points is the final result.

Review of Trajectory Analysis.
In this section, we review several related research on vessel trajectory analysis. ey can be divided into two main categories as trajectory classification analysis and trajectory prediction analysis [17]. Trajectory classification is to establish classic models to classify the trajectories according to their attributes and characteristics. Liu et al. set categories based on the direction of historical trajectories and then applied the KNN method to recognize new trajectories owing to the right category, which was regarded as the future trends [5]. In [18][19][20], researchers focused on establishing a vessel trajectory classification model in combination with regression methods and statistical methods, such as logistic regression and probability estimation methods. ese research studies included trajectory representation processes before the training classification model, which can not only dramatically save consuming time but also improve the accuracy of trajectory classification. Trajectory prediction analysis is another hot research topic in the field of vessel navigation behavior analysis, which mainly focus on trajectory reconstruction and approximation [21,22]. Zhang et al. proposed a trajectory construction model based on three sections of a single trajectory [9]. ey divided a trajectory into three sections based on the vessel navigation states, and then the spline model and linear regression model were applied to reconstruct the trajectories. Tang et al. applied historical trajectory to training LSTM models for prediction of the future position [11]. However, there is an absence of multiple trajectory prediction in the abovementioned studies.

Navigation Behavior Analysis and Trajectory Prediction
Model. e purpose of this article is to implement simultaneous prediction for multiple trajectories using a common model. Since individual trajectory presents different lengths and also contains different numbers of points, it is a challenging issue to train prediction models based on different scaling data. erefore, this article proposes an integrated framework consisting of two tasks. First, we propose a novel trajectory representation method to solve the data scaling problem, which can extract common features with the same number of points. Second, we employ the RNN and LSTM to solve the time series problem, which can train the models for simultaneous prediction based on the proposed features.

e Proposed Method for Trajectory Representation.
AIS data provides many attributes of trajectory, such as navigation time, longitude, latitude, and direction. In this article, longitude and latitude are considered as the typical attributes. If a vessel trajectory T is given as equation (1), T i denotes the position point of longitude and latitude as (x i , y i ). We use the Euclidean metric as the measure of the distance between two points in equations (6) and (7): S � l 1 , l 2 , . . . , l n−1 , Journal of Advanced Transportation where l i denotes the distance between T i and T i+1 , and S denotes the set of all distances in the original trajectory. en, the simplification process of the proposed method can be described as follows: (a) Calculate the distance l i between each neighborhood point (b) Save all the distance l i in S as the initial set (c) Merge two points (clusters) with the minimum l i into the same cluster as T i ′ (d) Recalculate the distance of T i ′ with both sides of neighborhood points (clusters) (e) Update the set S with new distance l i−1 and l i (f ) Repeat steps (c) to (e) until the number of clusters is convergent to k us, the original trajectory can be represented by a series of clusters, and we used the mean value of each cluster as the featured point (see Figure 1). e number of the featured points of the representation trajectory is determined based on the loss from the original trajectory.
e article uses the dynamic time warping (DTW) method to measure the similarity between two time series of datasets. erefore, the warp path between the original trajectory T and representation trajectory T ′ can be described as W � (w 1 , w 2 , . . . , w K ), the distance can be described as D(T, T ′ ), and the distance D(T, T ′ ) is the loss of the trajectory representation [23].

e Proposed Model for Multiple Trajectory Prediction.
Both the RNN and LSTM are based on neural networks and widely used to pursue time series prediction. e LSTM can be considered as an improved type of the RNN, which has the ability of long-term memory. e proposed model of multiple-trajectory prediction is shown in Figure 2. In the LSTM cell, the input gate uses the tanh function, the forgetting gate uses the sigmoid function, and the output gate also uses the sigmoid function. If the trajectory number is M, the memory module of the LSTM selectively remembers and forgets the input information, and its formula is as follows: T t ′ represents the representation trajectory and can be described as where T (M,t) ′ denotes the t-th point of the M-th representation trajectory as input. Notation h t−1 is the output of the hidden layer at the (t−1) point. Notation σ is the sigmoid activation function, and notations F t , W f , U f , and b f are the output, weight of W f , weight of T t ′ , and bias of the forgotten gate, respectively. e sigmoid layer determines the updated value as follows: where notations W i , U i , b i denote the weight of h t−1 , weight of T t ′ , and bias of the input gate, respectively. e tanh layer provides a candidate vector for the cell and can be described as follows: where notations W c , U c , b c denote the weight of h t−1 , weight of T t ′ , and bias, respectively. e output values of the forgotten gate and input gate update the cell state C t can be described as follows: e final output uses the new cell state to output content: where notations W o , U o , b o , and h t denote the weight of h t−1 , weight of T t ′ , bias, and the output of the hidden layer, respectively [24]. If the input is the (i−1) number points of M representation trajectories, the number of the point of the representation trajectory is K, and h i is the i number of points, the notation h t can be described as 4 Journal of Advanced Transportation en, we use root mean squared error (RMSE) as the evaluation indicator of prediction models. If h (i,t) denotes the actual point t of the trajectory i and h (i,t) ′ denotes the actual point t of this trajectory, the RMSE of the predicted value h (i,t) ′ and the actual value h (i,t) can be calculated as follows: where (x (i,t) , y (i,t) ) denotes the coordinate of h (i,t) , and (x (i,t) ′ , y (i,t) ′ ) denotes the coordinate of h (i,t) ′ .

Design of Experiments.
In this article, the vessel trajectories were collected using AISs, and the location is Dalian port as shown Figure 3. e dataset contains 33 vessels with 400 trajectories, and the frequency of points included in each trajectory is from 20 points to 380 points. Firstly, we pursue the original trajectories to extract featured points with the proposed method, DP and LCSCA. e loss of each representation trajectory was calculated and compared with the DTW. e number of extracted points using the proposed method is optimized according to the loss decline rate of DTW. Secondly, we used 90% points of 400 representation trajectories as training data and the remainder 10% as testing data. e RNN and LSTM are used to learn the prediction models, and the comparative experiments for parameters adjustment were conducted to improve the prediction accuracy.

Comparison of Trajectory Representation.
To measure the performance and effectiveness of the proposed method, the DP and LCSCA were used as the comparisons. Figure 4 shows that the mean loss of all trajectories at different values of the simplified rate (the ratio of the number of points in the representation trajectory with the number of points in the original trajectory) for the three methods. It is found that the mean loss using our method is lower than that using the DP and LCSCA methods in all situations. When the simplified rate is lower than 0.14, the mean loss of the proposed method is almost 50% lower than that of DP and LCSCA methods. It is observed that the deviation of the proposed method is always lower than that of the other two methods. en, the optimal number of extracted points is discussed in Figure 5. Figure 5 shows the line plots of the loss and loss decline rate changing with the number of representation points. It can be observed that the loss decline rate can be firstly obtained at the minimum value of 15% when the number of representation points is equal to 13. To reduce the complexity of the prediction model, we use 13-dimensional features as the representation trajectories.

Comparison of Trajectory Prediction.
According to parameter tuning, we choose relu as the active function, 0.2 as dropout, and 100 as the epoch. e RNN and LSTM initially consider that the number of input is set to 80, and two hidden layers with the number of neurons are set to 80 and 40, respectively. From the third hidden layer, the number of neurons is set to half of the prior one. Table 1 Figure 6 shows that when the RNN contains five hidden layers, the prediction model shows the best  Output Testing Set (10%) performance. Simultaneously, Figure 7 shows that the model using the LSTM containing four hidden layers can obtain the best performance. We also found that M.V. and S.D. of RMSE of best models using the LSTM were 4% and 14% lower than those of the models using RNN as shown in Figure 8.     Journal of Advanced Transportation en, we draw boxplot charts of RMSE values for the model using the LSTM with different batch sizes in Figure 9 and summarize the numerical results in Table 2. However, the best Min.V., Max.V., and S.D. of RMSE can be obtained when the batch size equals 2. e minimum M.V. of RMSE can be dramatically improved when the batch size equals 4.

Conclusions
In this article, a prediction model for multiple trajectories was demonstrated based on a novel trajectory representation method. e proposed method used a hierarchical clustering approach to extract the featured point from the original trajectory based on AIS data, and the common features of multiple trajectories can be obtained by a series of simplification line segments. Compared with traditional methods such as the DP and LCSCA, our method shows low loss from the original trajectory, and the lowest loss decline rate can be obtained at 13dimensional features based on the measures of DTW. To investigate the performance of proposed features, we used a realworld case of the Dalian port and collected the AIS data containing 400 trajectories from 33 vessels. In the experiments, the LSTM and RNN are employed to learn the trajectory prediction models, and both the LSTM and RNN show high performance on multiple trajectory prediction. Especially, the LSTM can obtain the highest performance with the parameters fine-tuning.
In the future work, we plan to improve our method in two parts. First, we will design an automatic process to combine the feature extraction and model construction, which can simultaneously obtain the optimal prediction model based on the optimal features. Second, based on the above automatic process, we will implement our model to real-time trajectory prediction in online mode of AISs.
Data Availability e data of this article are available upon request to the corresponding author.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.