Next Article in Journal
Spatial Difference in the Marine Algal Community of Yeongil Bay Inner and Outer Areas on the East Coast of Korea
Next Article in Special Issue
Model for Wastage Allowance and Strength Properties of Pipe Piles Exposed to Marine Corrosion
Previous Article in Journal
Illumination Adaptive Multi-Scale Water Surface Object Detection with Intrinsic Decomposition Augmentation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Ship Trajectory Prediction: An Integrated Approach Using ConvLSTM-Based Sequence-to-Sequence Model

1
School of Navigation, Wuhan University of Technology, Wuhan 430063, China
2
Hubei Key Laboratory of Inland Shipping Technology, Wuhan University of Technology, Wuhan 430063, China
3
State Key Laboratory of Maritime Technology and Safety, Wuhan University of Technology, Wuhan 430063, China
*
Author to whom correspondence should be addressed.
J. Mar. Sci. Eng. 2023, 11(8), 1484; https://doi.org/10.3390/jmse11081484
Submission received: 30 June 2023 / Revised: 18 July 2023 / Accepted: 18 July 2023 / Published: 25 July 2023
(This article belongs to the Special Issue New Insights into Safety of Ships and Offshore Structures)

Abstract

:
Maritime transportation is one of the major contributors to the development of the global economy. To ensure its safety and reduce the occurrence of a maritime accident, intelligent maritime monitoring and ship behavior identification have been drawing much attention from industry and academia, among which, the accurate prediction of ship trajectory is one of the key questions. This paper proposed a trajectory prediction model integrating the Convolutional LSTM (ConvLSTM) and Sequence to Sequence (Seq2Seq) models to facilitate simultaneous extraction of temporal and spatial features of ship trajectories, thereby enhancing the accuracy of prediction. Firstly, the trajectories are preprocessed using kinematic-based anomaly removal and Hierarchical Density-Based Spatial Clustering of Applications with Noise (HDBSCAN) to improve the data quality for the training process of trajectory prediction. Secondly, the ConvLSTM-based Seq2seq model is designed to extract temporal and spatial features of the ship trajectory and improve the performance of long-time prediction. Finally, by using real AIS data, the proposed model is compared with the Seq2Seq and Bidirectional LSTM based on attention mechanism (Bi-Attention-LSTM) models to verify its effectiveness. The experimental results demonstrate that the proposed model achieves excellent performance in predicting turning trajectories, good predictive accuracy on straight line motions, and greater improvement in prediction accuracy compared to the other two benchmark models. Overall, the proposed model represents a promising contribution to improving ship trajectory prediction accuracy and may enhance the safety and quality of ship navigation in complex and volatile marine environments.

1. Introduction

With the growth of international trade, maritime transportation has become one of the most critical trade transportation modes. However, in the waterways where the navigation environment is complex and high traffic density occurs, the behavior of ships tended to be complicated and poses an increasing risk of maritime accidents. Navigation safety is one of the challenges faced by smart ship applications [1]. To prevent and manage potential risks, it is essential to employ intelligent ship management and monitoring strategies that enable reliable identification of ship behavior and intentions in specific areas, within which the accurate prediction of ship behavior and trajectories have been drawing much attention from both academia and industry.
At present, various scholars have carried out research work on ship trajectory prediction. Rong et al. [2] proposed a probabilistic trajectory prediction model, which decomposed ship motion prediction into two directions, horizontal and vertical, and calculated position probabilities along these two directions. There are also studies, e.g., [3], which applied machine learning technique to infer commonalities of related trajectory segments. Subsequently, the trajectory associated with that pattern was predicted. Yang et al. [4] combined Density-Based Spatial Clustering of Applications with Noise (DBSCAN) and Long Short-Term Memory (LSTM) models for trajectory prediction. In general, the research on ship trajectory prediction based on AIS data could be divided into methods based on statistics and methods based on Neural Networks and Deep Learning.
The ship trajectory prediction method based on statistics constructs the mathematical model of the trajectory through the historical data of the ship. According to the literature following this approach, the major statistic methods for trajectory prediction are as follows: Kalman filter [5,6], hidden Markov model [7,8], Bayesian network [9,10], Gaussian process [2], and Gaussian mixture model [11]. Most of the ship trajectory prediction methods based on statistics have the advantages of simplicity, unbiasedness, and fast calculation, such as Kalman filter and GMM models. However, in non-linear mid-to-long-term scenarios, statistical-based forecasting methods no longer have good applicability, and there is a problem of low forecasting accuracy. For example, the Kalman filter has linear characteristics and cannot achieve the optimal estimation effect in non-linear scenarios. On the other hand, HMM can only utilize contextual information by building a high-level model. Therefore, it is necessary to find more suitable prediction methods for non-linear scenarios.
The emergence of deep learning (DL) provides a promising solution to precisely address this problem. From the research framework of trajectory prediction based on neural networks and deep learning, trajectory prediction research involves three major procedures: Data Processing, Model Structure design, and Model Optimization.
In terms of data processing, data filtering can use machine learning methods such as clustering and filtering to process ship trajectory data to obtain training data sets. For example, Suo et al. [12] used the DBSCAN algorithm to cluster trajectories to construct a training dataset for ship trajectory prediction. Some scholars have carried out more detailed research on the basis of dividing the data into four datasets: straight line, turning, acceleration, and deceleration; Gao et al. [13] used cubic spline interpolation and median filtering to process AIS data to eliminate the measurement error and time interval inconsistency of AIS data. These machine-learning-based practices help to build reliable datasets for deep learning models and improve the prediction accuracy of the models. In addition, semantic representation is also used to divide ship trajectories. Semantic representation of ship behavior using autoencoding and other methods, e.g., [14], have been used in the construction of training data sets. From the work aforementioned, one can see that constructing a trajectory set with rich and significant ship behavior characteristics is a necessary basis for ship trajectory prediction.
In terms of model structure design, Zhang et al. [15] used recurrent neural networks, a variant of LSTM networks, to model ship trajectories. And Suo et al. [12] used GRU for modeling. Although ship trajectory points all have behavioral characteristics, trajectory points such as turning, acceleration, and deceleration have a greater impact on subsequent trajectory behavior than ordinary straight-line points. Sekhon and Fleming [16] used spatial attention and temporal attention to optimize the model on the LSTM model so that the model could consider the influence of historical trajectory space and time on the future trajectory. In [17], a ship trajectory prediction model based on a multi-head attention mechanism and bidirectional gated recurrent unit (MHA-Bi-GRU) was proposed. In addition, due to the need to maintain a large distance between ships, many researchers believe that the behavior of other ships will also affect the prediction of ship behavior. Liu et al. [18] used the ship traffic conflict situation model generated by dynamic AIS data and social force concept to embed it into the LSTM network.
In order to obtain the good performance of different models, some researchers have combined the models for trajectory prediction research. In [19], a method of combining GRU with AM by a multi-scale convolutional neural network (MSCNN) and performing parallel collection with an autoregressive (AR) model is proposed. Abebe et al. [20] decomposed the AIS data into linear and nonlinear by using the moving average filter (MA) and applied ARIMA and LSTM to model the ship trajectory, respectively. To enhance the accuracy of long-term trajectory prediction, Forti et al. [21] employed a sequence-to-sequence neural network underpinned by a long short-term memory (LSTM) encoder-decoder framework to model the temporal dependencies in longer ship trajectory sequences. In [22], Wang proposed a generative adversarial network with an attention module and an interaction module, which could simultaneously infer the future trajectories of all ships in the same area. Considering the advantages of the attention mechanism and the Seq2Seq model, [23] used the Transformer model to build a ship trajectory prediction model, which consisted of self-attention to form a codec, making the model more efficient and accurate.
With the development of the graph convolutional neural network, Liu et al. [24] proposed a trajectory prediction framework based on spatio-temporal, multi-graph convolutional networks. The graphs used in the framework included the time to the nearest point and the size of surrounding ships according to the social force model.
The optimization of models can be categorized into parameter optimization and output optimization. Parameter optimization refers to the tuning of neural network hyperparameters through heuristic algorithms and other techniques [25]. In [26], a Genetic Algorithm (GA) was used to optimize the hyper-parameters of the trajectory prediction framework LSTM. Model output optimization uses other models to optimize the output results of the neural network model to obtain a more accurate and realistic ship prediction trajectory. Ref. [27] cascades the data-driven predictor through the Kalman filter and the motion estimation model and uses the output of the data-driven predictor as the input of the filter to optimize the predicted trajectory. In [28], model predictive control is used to modify the output of the trajectory prediction model to ensure that the predicted trajectory satisfies the kinematic constraints.
While many machine learning methods have been used in the data processing part, researchers have found that the conventional ship trajectory processing methods are insufficient in integrating trajectory characteristics for ship trajectories in densely navigated waters. At the same time, due to the significant temporal relationship in the context of trajectory sequences, most studies focus more on extracting temporal features of ship trajectories while ignoring the spatial connections between trajectory points. Although some researchers have introduced graph convolution methods from roads to extract the spatial features of ship trajectories, the application of graph convolutional networks to ship trajectory prediction is not without challenges. One such difficulty is the inherent difficulty in modeling ship trajectories with graph networks as road networks possess well-defined nodes and edges, unlike the complex spatial features of ship trajectories.
All in all, extracting the spatio-temporal features of ship trajectories to obtain more accurate trajectories is of great significance for the identification of ship navigation intention and, therefore, improving the intelligent supervision of ships. The purpose of this study is to propose an accurate prediction method for ship trajectory in complex waters based on the spatio-temporal characteristics of ship trajectory. Compared with previous work, this paper uses different data repair and cluster analysis methods and tries to use a ConvLSTM unit to simultaneously extract temporal and spatial features of ship trajectories, rather than a spatial attention mechanism or graph neural network. The contribution of this work is as follows: 1. After data processing steps such as kinematics-based anomaly detection and Hierarchical Density-Based Spatial Clustering of Applications with Noise (HDBSCAN), ship trajectory clusters with stronger correlations are obtained. It helps to improve the accuracy of trajectory prediction; 2. Expand the ship trajectory into a graph-like format and use the Seq2Seq model based on ConvLSTM to model the ship trajectory so that the model can extract the temporal and spatial characteristics of the trajectory.
The rest of the paper is organized as follows: Section 2 introduces the basic principles of related methods and models; Section 3 introduces data preparation and model details; Section 4 uses real-world trajectory data as a case to experiment with the model; Section 5 discusses the results of the proposed model; Section 6 summarizes and discusses the main innovations of this study and suggests possible directions for further research.

2. Methodology

2.1. Overall Design

The purpose of this study was to propose an accurate prediction method for ship trajectory in complex waters based on the spatio-temporal characteristics of ship trajectory. To achieve this goal, the following two components need to be conducted: (1) Data preprocessing: First, the historical AIS data were extracted and preprocessed to remove the outliers from the trajectory data, using a trajectory anomaly detection method based on kinematic interpolation, to ensure the accuracy of the trajectory data; Second, the Douglas–Peucker (DP) compression algorithm was used to compress the outlier-removed trajectories without losing the characteristics. Then, the HDBSCAN method was used to perform the cluster analysis on the compressed trajectory data, and the trajectory data were effectively classified according to the characteristics to facilitate the subsequent feature extraction and learning of the model. Finally, the classified trajectory data are interpolated at equal intervals using the cubic spline interpolation method to obtain trajectory data with the same time interval. (2) Ship trajectory prediction based on sequence-to-sequence model and ConvLSTM: On the basis of the data preprocessing, the ConvLSTM network was applied to extract the features of the trajectory data from two aspects of time and space to improve the feature extraction ability of the model. Combining the ConvLSTM network and the Seq2Seq model, a sequence-to-sequence ship trajectory prediction model with stronger spatiotemporal feature extraction and reconstruction capabilities was established. The preprocessed data were used to train the model, and a ship trajectory prediction method with the advantage of trajectory spatiotemporal feature extraction ability was obtained. This section describes the model used in this method in detail, and the overall framework flow of the model is shown in Figure 1.

2.2. Data Pre-Processing Methods

2.2.1. Abnormal Data Removal

Due to the fact that the original ship AIS data could contain various outliers, which would greatly affect the applicability of AIS data in trajectory prediction tasks, this study adopted a trajectory anomaly detection method that comprehensively utilized ship kinematics information in AIS data to remove the potential abnormal data points. This method could identify both position anomalies and velocity anomalies and showed better performance than traditional methods that only considered the problem from the perspective of position [29]. The trajectory anomaly detection method based on kinematics information could effectively remove the outliers of trajectory data and provide basic support for trajectory classification and model feature extraction. The trajectory anomaly detection method based on kinematics information processed trajectory data in three steps: (1) Kinematics estimation model of AIS data. (2) Anomaly detection of AIS data based on error clustering. (3) Iteration based on loop detection with termination condition.

2.2.2. HDBSCAN for Trajectory Clustering

Cluster analysis of trajectory data can preliminarily identify and classify different motion behaviors of ships. It is helpful for the neural network model to extract and learn features of similar ship trajectories. In this study, a density clustering method based on HDBSCAN was used to cluster the trajectory data. This method could not only identify the noisy data but also cluster ship trajectories with different densities. It was more efficient in identifying ship-intensive waters, especially complex confluence waters [30]. Although density-based methods could cluster trajectories of arbitrary shape, classical density-based algorithms are poor at clustering data clusters with different density distributions in the detection density space. By introducing the hierarchical clustering structure of the data, HDBSCAN based on DBSCAN has the ε (ε is used to judge whether other points are in the neighborhood of the current point) value of the stable function. The calculation process of the HDBSCAN algorithm could be described as: (1) Build a minimum spanning tree based on a similarity measure. (2) Build a hierarchical cluster structure. (3) Compression Clustering Hierarchy Based on Minimal Clusters. (4) Classification using spanning trees. (5) Generate clustering results.

2.2.3. Cubic Spline Interpolation

The Cubic spline interpolation method is commonly used in space–time trajectory synchronization. When the space–time trajectory of the ship was missing, the cubic spline interpolation method had a good repair and synchronization effect. Normally, due to various factors, the time interval between the trajectory points of AIS data was usually inconsistent, and the trajectory data could be interpolated to obtain ship trajectory data at equal intervals as required, which helped to extract the temporal features of different ship trajectories. In this study, a cubic spline interpolation method was used to interpolate the trajectory data. The cubic spline function was defined as follows:
Set on the interpolation interval [ a , b ] , given n + 1 interpolation nodes x i ( a = x 0 < x 1 < < x n 1 < x n = b ) , the function value y i = f ( x i ) ( i = 0 , 1 , , n ) at the node x i . If the interpolation function s ( x ) satisfies the condition:
(1)
s ( x i ) = f ( x i ) = y i , i = 0 , 1 , , n ;
(2)
s ( x ) is a cubic polynomial s i ( x ) on [ x i , x i + 1 ] ( i = 0 , 1 , , n 1 ) between each cell;
(3)
s ( x ) is second-order continuous differentiable on [ a , b ] , i.e., s ( x ) C 2 [ a , b ] ;
Then, s ( x ) is called the cubic spline interpolation function of f ( x ) .

2.3. ConvLSTM-AI Network

In this study, the ConvLSTM network is used for feature extraction of trajectory data. ConvLSTM can not only establish a temporal relationship similar to LSTM but also have the ability to extract spatial features similar to CNN. The original purpose of this model is to solve the problem of precipitation forecasting. The problem of precipitation forecasting is usually regarded as a time-series problem, but a simple LSTM cannot use spatial data features through pictures. Ship trajectory prediction is also a prediction problem of a set of time-space sequences, and neither time nor space sequences only can fully represent the characteristics of ship trajectory data. Therefore, ConvLSTM is introduced to solve this problem.
ConvLSTM is a variant of LSTM. The difference between it and LSTM is that it uses convolution calculations instead of weight calculations, which is to say that a convolution operation process is added to each gate of the LSTM unit so that feature extraction can be performed through convolution operations in multidimensional data [31]. In the ConvLSTM model, all of its inputs X 1 X t , cell outputs C 1 C t , hidden states H 1 H t , and gates i t , f t , and o t are 3D tensors, where the last two dimensions represent the spatial dimensions (rows and columns). The key equations of ConvLSTM model are shown in Equations (1)–(5), and the calculation of the convolution operation is shown in Figure 2.
i t = σ ( W x i x t + W h i H t 1 + W c i C t 1 + b i )
f t = σ ( W x f x t + W h f H t 1 + W c f C t 1 + b f )
C t = f t C t 1 + i t tanh ( W x c x t + W h c H t 1 + b c )
o t = σ ( W x o x t + W h o H t 1 + W c o C t + b o )
H t = o t tanh ( C t )
In all the above formulas: i t is the state retention probability of the output gate; σ is the Sigmoid activation function; tanh is the Hyperbolic Tangent (tanh) activation function; x t is the input at time t; is the Hadamard product; is the convolution operator; f t is the state retention probability of the forgetting gate; C t is the unit state at time t; o t is the output probability of the output gate at time t; H t is the output of the hidden layer at time t; W x i and b i are the weight and threshold of the input gate, respectively; W x f and b f are the weight and threshold of the forget gate, respectively; W x c and b c are the weight and threshold of the state gate, respectively; W x o and b o are the weight and threshold of the output gate, respectively.

3. Model Design

3.1. Ship Trajectory

The ship trajectory sequence is generally represented as a space-time sequence, which consists of multiple tuples such as spatial coordinates and timestamps. A space-time sequence can be formally expressed as:
T r a j = x 0 j , y 0 j , t 0 j , , x n j , y n j , t n j
Among them, T r a j ( j = 1 N ) , N is the total number of ship trajectories, T r a ( j ) representing the j-th sub-trajectory; t i j ( i = 0 , , n ) , n is the total number of trajectory points, t i ( j ) indicating the i-th timestamp of the j-th sub-trajectory; and x i j , y i j indicates the j-th sub-trajectory. The longitude and latitude of the ship at the moment.

3.2. Trajectory Data Preprocessing

This step is mainly to preprocess the trajectory data obtained from AIS and screen out trajectory clusters with the same characteristics. The first step is to eliminate abnormal data.
(1)
Trajectory anomaly detection method based on kinematics information to process trajectory data.
(1.1)
Estimate the data points of the ship’s trajectory according to the kinematic characteristics of the ship’s speed and heading.
(1.2)
A modified k-means method is used to identify the details of the anomalies estimated by the AIS kinematics.
(1.3)
All outliers in the trajectory data are detected by repeating the motion estimation and error clustering process, and the clustering performance is evaluated with the silhouette coefficient as the termination condition.
(2)
Mercator transformation, using the Mercator projection to transform the latitude and longitude of the spherical coordinates into Mercator projection coordinates.
(3)
Trim the trajectory using a threshold. By analyzing the AIS data with abnormal points removed, the following three phenomena can be found in the trajectory data. For example, although the time difference between two trajectory points of a ship is relatively large, they are considered as one trajectory. A ship with a short trajectory is not meaningful for research. A ship’s Speed Over Ground (SOG) and Course Over Ground (COG) exhibit different values than normal trajectories. In order to remove this effect, the time threshold, trajectory points threshold, and SOG and COG thresholds are used to differentiate these data. A ship trajectory is segmented into discrete voyages when the temporal gap between consecutive data points surpasses a predefined threshold. For trajectories containing data points less than the preset threshold, they will be considered noise and removed from the data set. A preliminary trajectory data cleaning is also conducted by removing the data points with abnormal SOG and COG.
The second is HDBSCAN clustering: (1) Compressed data. Based on the Douglas–Peucker compression algorithm, the trajectory can be compressed without losing shape features. The algorithm compresses the curve graphics from the overall point of view and determines the final point sequence to be retained by finding the key points of each segment in the curve. This algorithm is based on connecting a straight line between the first and last points of each trajectory and then calculating the distance between all points and the straight line. The maximum distance value d max is then identified. If d max is less than the tolerance value d , all intermediate points on the curve are discarded. On the other hand, if d max is greater than or equal to d , the coordinate point corresponding to d max is kept. The curve is then divided into two parts at this point, and the same process is repeated for each part. (2) HDBSCNA clustering trajectory. The algorithm has two input parameters: min cluster size and min samples. The former represents the minimum size of the cluster and is the core parameter of HDBSCAN. The larger this parameter is, the fewer species will be clustered in the final cluster, and points less than this will be considered as ‘noise’. The latter is min samples, which defines the number of samples a point has in its neighborhood. To determine the values of the two parameters of the clustering algorithm, a comprehensive evaluation method that combines the Silhouette Coefficient (SC) and Davies–Bouldin index (DBI) is used to evaluate the clustering performance. This evaluation method involves calculating the clustering performance for different parameter values and selecting the parameter value that corresponds to the clustering result with the best performance. For details on setting the parameters of HDBSCAN and DP algorithm to specific values, please refer to Section 4.1.
The last is cubic spline interpolation. The cubic spline interpolation function can obtain the cubic spline interpolation of the time–longitude trajectory and the time–latitude trajectory, respectively, and the ship’s navigation trajectory can be obtained by combining the above two cubic spline curves. Cubic spline interpolation can effectively provide equidistant data by interpolating trajectory data.

3.3. Trajectory Prediction

The conventional LSTM method has better performance on the prediction of time series data than that of spatial data. The data of the LSTM model is usually represented by two dimensions: one represents the stack of time steps, and the other represents the characteristics of the current time step. To overcome the shortcomings of LSTM in processing spatial information, ConvLSTM was developed. For the data at each moment, ConvLSTM replaces the fully connected operation of each gate in LSTM with a convolution operation, i.e., matrix multiplication becomes a convolution calculation. Based on previous experiments, this paper replaces the activation function of the input information (default tanh) and current hidden state output (default tanh) in the ConvLSTM model with Rectified Linear Unit (ReLU) to achieve better results. At the same time, this approach has been verified in RNN [32]. The unit structure of ConvLSTM with ReLU activation function is shown in Figure 3.
The asterisk ‘*’ in the figure indicates convolution calculation, and the others are the same as in Section 2.3. In this way, it captures the underlying spatial features by performing convolution operations in multidimensional data, allowing ConvLSTM to make predictions from the current input and the past states of local neighbors. This approach enables ConvLSTM not only to establish a temporal relationship similar to LSTM but also to have a spatial feature extraction capability similar to CNN. Experiments have proved that ConvLSTM has a better effect than LSTM in acquiring spatio-temporal relationships [31].
The ConvLSTM model in this research consists of a ConvLSTM-based encoder layer, a decoder layer, and a separate convolutional layer, respectively. The structure of the model is shown in Figure 4.
As shown in Figure 4, for each input sample original trajectory sequence, the data format conversion is performed first, and the longitude and latitude of the ship trajectory are, respectively, used as the characteristics of the two dimensions. Thus, the latitude and longitude of the ship trajectory become a point in the two-dimensional grid, which has a spatial relationship. The specific form is shown in Figure 5.
Then, generate a trajectory sequence x 1 , x 2 , , x t with a number of t, and, at the same time, t also represents the length of the input trajectory sequence. Then, the trajectory sequence is used as the input of the encoder layer, and the ConvLSTM network encodes the trajectory sequence in a many-to-many form. For the ConvLSTM unit, the longitude and latitude of the trajectory are no longer regarded as two features in one dimension, but as the values corresponding to the two dimensions. Therefore, the encoding of the trajectory sequence has both the temporal relationship of the input sequence and the spatial feature relationship of the input sequence. The encoder layer exports the encoding result and hidden feature matrix h at the same time. The decoded layer outputs the decoding sequence, which is then passed through a convolutional layer to produce the predicted trajectory sequence. In the training phase, the decoder layer also uses the input sequence for decoding auxiliary training to help the network model learn quickly. In the prediction stage, the decoder uses the output of the previous time step of the ConvLSTM unit as its decoding aid. Finally, the predicted trajectory sequence is converted into a trajectory sequence, and the output is a predicted trajectory sequence y t + 1 , y t + 2 , , y t + q with a number of q.

3.4. Evaluation Function

In this paper, Root Mean Square Error (RMSE) is used to evaluate the overall performance of the model, and the Mean Distance Error (MDE) between the predicted data and the real AIS data are used to evaluate the prediction results. The specific calculation method is as follows:
R M S E = 1 P i = 1 p Y i y i 2
M D E = 1 P i = 1 p L a t i l a t i 2 + L o g i l o g i 2
Among them, P is the total data volume of AIS, Y i is the predicted value of the network model, and y i is the expected output value. L a t i is the predicted value of the latitude of the network model, and l a t i is the expected output value of the latitude. L o g i is the longitude prediction value of the network model, and log i is the longitude expected output value. These predicted values and expected output values are the longitude and latitude values under the Mercator transformation.

4. Case Study

In this section, a case study on trajectory prediction of the proposed ConvLSTM-based Seq2Seq ship trajectory prediction model was carried out to verify the effectiveness of the method. The data utilized in this study were real historical data. The case study area was within the following boundaries: Latitude: 31.08° N to 31.00° N; Longitude: 122.0° E to 122.4° E. In order to prove the effectiveness of the proposed prediction model and avoid the influence of AIS data on ships with special nature of work, this case excluded the AIS data of small working boats, pilot boats, and fishing boats. The details of the case study are shown in Table 1, and the initial ship trajectories in the study waters are shown in Figure 6.

4.1. AIS Data Preprocessing

According to the geographical information and the set boundaries of the study area, this article selected the AIS data on 1 May 2019, and used the trajectory data elimination method in Section 3.2 to obtain 280 ship trajectory sets. First, the initial AIS data are read, and trajectory estimation points are generated according to the kinematic characteristics of the ship. Then, position and velocity errors between estimated points and trajectory data are analyzed. After that, the kinematic-based anomaly detection proposed by Guo et al. [29] is used to identify the error data. And, by repeating the above steps, abnormality detection is realized. The trajectory data after removing abnormal data are shown in Figure 7.
After applying trajectory anomaly detection, as seen in Figure 7, the anomalies in the original data that deviate from the expected kinematic characteristics of the ship are removed. This step ensures that the remaining trajectories accurately represent the ship’s true trajectory.
Due to the large number of trajectories, this article uses the DP algorithm to reduce the amount of ship trajectory data to accelerate the clustering process, and 100 m was utilized as the threshold of each trajectory to maintain the shape characteristics of the trajectory. The trajectory data were then clustered by the HDBSCAN algorithm. For its two parameters, this article used an adaptive method (Loop to find the optimal value) to receive the optimal values of min cluster size = 9 and min samples = 8. Finally, this article used cubic spline interpolation to complete the space between trajectory data and performed 20 s equidistant interpolation. An example of the interpolation effect is shown in Figure 8.
As shown in Figure 8, the cubic spline interpolation method demonstrates excellent performance in interpolating the trajectories of ships with large, curved sections, as well as general ship trajectories. The resulting interpolated ship trajectories are generally smooth and accurately represent the ship’s actual movement.
After performing several data preprocessing operations, this article obtained a total of 184 ship trajectories. These trajectories were then organized into six distinct clusters, as shown in Figure 9.
As exhibited in Figure 9, after a series of preprocessing operations, the trajectory data within the selected area were clustered into six groups. In comparison to Figure 7, some trajectory data without clear characteristics were excluded as noise, whereas small missing pieces of ship trajectory data were interpolated to create a continuous trajectory. The trajectory exhibited in Figure 9 was partitioned into three distinct datasets according to the characteristics of the clusters. The first dataset consisted of black and red trajectory clusters, which exhibited numerous curved segments. The second dataset included the yellow and blue trajectory clusters, which had a relatively significant single curved segment. The final dataset contained the green and pink trajectory clusters, which were relatively straight in comparison to the other clusters.
In order to make model training more efficient and accurate, the min–max normalization method was used to normalize the data, and the min–max normalization was given by the following formula:
z i = z i min z m i n max z m a x min z m i n
In the formula: 1 i n , m a x z m a x is the maximum value of the sample data, min z m i n is the minimum value of the sample data, and the converted data are all within [0,1].
Then, the training sample is divided by the sliding window method. For a trajectory, the trajectory points T r a i , T r a i + 1 , T r a p 1 , T r a p of the first p consecutive time steps is used as the input sample, and the trajectory points of the subsequent q consecutive time steps are used as the predicted trajectory T r a p + 1 , , T r a q 1 , T r a q . This experiment will predict the trajectory data of the ship in the next 10, 15, and 20 min.

4.2. Trajectory Prediction

This study involves two different testing methods on three datasets, each serving a different purpose. The data set is divided into a training set and a test set according to the ratio of 8:2, and a trajectory is randomly extracted from the test set as the target trajectory. Firstly, the performance of the model is tested on the trajectory with clear maneuvering behavior and the long straight trajectory to verify its validity. For this purpose, Dataset 2 and Dataset 3 were selected, and a target prediction length of 20 min was chosen. Secondly, the ability of the model to monitor ship behavior was examined by analyzing its performance on trajectories that indicated different characteristics for an extended period of time. To achieve this, Dataset 1 was selected, and a target forecast length of 60 min for this trajectory was chosen. This approach allowed for a comprehensive analysis of the model’s predictive capabilities across the three different datasets.
The operating system used in this experiment was Windows 10, the programming software was Pycharm, and the deep learning framework was tensorflow v2.3.0. In this experiment, the training model structure consisted of ConvLSTM layers with 64 output units and a 1 × 2 convolutional nuclear unit. The Convolutional layer had one output unit with a 1 × 2 convolutional nuclear unit. The setting of the convolution kernel was to perform convolution operations on the latitude and longitude data. The model was trained using the ADAM optimizer with a learning rate of 0.001 and a training loss function of Mean Squared Error. A batch size of 36 was used. During the prediction stage, the model predicted the trajectory in the form of accumulated errors, whereby all input data, except for the first historical data input, were predicted data from the model’s previous output.
To assess the influence of input and output lengths on the model, the input and output were set to p and q = 5, 10, 15, 20, and 25 with a total input and output length, respectively. Each model length was consistent with other settings, except for the epoch. To reduce randomness and improve the accuracy of the experiment, the RMSE and MDE of each model were averaged over five experiments, and the maximum and minimum RMSE and MDE were recorded for each group. Prediction results for different input and output lengths were tabulated in Table 2, Table 3 and Table 4, and prediction result icons were illustrated in Figure 10, Figure 11 and Figure 12.
Regarding Figure 10 and Figure 12, both the trajectories at p = 20, q = 20 and the original trajectories closely resemble the trend and length. In Figure 10, there is noticeable bending in all five trajectories, with the trajectories at p = 25 and q = 25 exhibiting a soft reverse trend, and each trajectory demonstrating a gentler cornering trend towards the middle of the turn. In Figure 11, the five trajectories are significantly longer than the original trajectory, and the trajectories corresponding to p = 5, q = 5; p = 10, q = 10; and p = 15, q = 15 appear to be jittering and not smooth enough. When p = 20, q = 20 and p = 25, q = 25, the trajectory jitter is alleviated and smoother.
As illustrated in Figure 12, the trajectory at p = 25, q = 25 closely resembles the trend and length of the original trajectory, with the distance between the mark points remaining relatively consistent. Conversely, the trajectory at p = 15, q = 15 exhibits a shorter length than the original trajectory, and the trend differs the most from the raw trajectory. The remaining trajectories are all longer than the raw trajectory, and the distance between points is larger than that in the original trajectory.
As demonstrated by Table 2, Table 3 and Table 4, the length of the input and output parameters in the model affects its performance. For both Dataset 2 and Dataset 3, the models with p = 20 and q = 20 have the smallest average RMSE and MDE values, whereas p = 15 and q = 15 lead to the highest values of both metrics. Specifically, when predicting a 20 min trajectory, the average RMSE and MDE values for Dataset 2 are 148.71 and 180.84, respectively, with p = 20 and q = 20, whereas the corresponding numbers for p = 15 and q = 15 are 249.13 and 338.81. When p = 20 and q = 20, the average MDE was 106.54 for a 10 min trajectory but increased to 180.84 for a 20 min trajectory, representing a 69.74% increase in MDE within the 10 min of trajectory prediction.
Similar trends can be observed for Dataset 3, where the average RMSE and MDE values with p = 20, q = 20 for 20 min trajectory prediction are 174.51 and 229.19, respectively, whereas they are 318.17 and 398.91 when p = 15 and q = 15. Additionally, when p = 20 and q = 20, the average MDE was 155.76 for a 10 min trajectory and increased to 229.19 for a 20 min trajectory, indicating a 45.96% increase in MDE for the 10 min of trajectory prediction.
According to Table 4 for Dataset 1, models with p = 25 and q = 25 have the lowest average RMSE and average MDE, whereas those with p = 15 and q = 15 have the highest. For example, when predicting a trajectory of 60 min, the model with p = 25 and q = 25 has an average RMSE of 222.23 and an average MDE of 281.75, whereas the model with p = 15 and q = 15 has an average RMSE of 758.16 and an average MDE of 969.62, indicating better performance for the former model. Moreover, when p = 25 and q = 25, the average MDE was 115.61 for a 10 min trajectory, 123.13 for a 20 min trajectory, and 281.75 for a 60 min trajectory. Within the 10 min of prediction, the average MDE increased by 6.50%, and it increased by 143.77% within an extra 50 min of prediction.

4.3. Model Performance Comparison

To validate the proposed method, this paper compares some other prediction methods. The use of the dataset is consistent with Section 4.2. Please be noted that the results of the comparison are based on the parameter settings of each method that obtains the best performance on trajectory prediction; therefore, the parameter settings for each method may not be consistent under each testing scenario. The comparing methods are as follows:
(1)
Bi-attention-LSTM: The Bi-LSTM model can learn the characteristics of future moment information while using the data information of the past moment and perform recursion and feedback on it. At the same time, adding the attention mechanism will help the Bi-LSTM model to further optimize the ability of data information feature extraction and improve the accuracy of the model prediction. The model adopts the form of single-step prediction cumulative error, takes the trajectory points of the first five consecutive time steps as input, and predicts the trajectory points at the next moment.
(2)
LSTM-Seq2Seq: Sequence to Sequence consists of three parts: encoder, intermediate vector, and decoder. The composition of the encoder and the decoder is basically the same, and this paper uses LSTM as its cycle unit. The model adopts the form of multi-step prediction cumulative error, takes the trajectory points of the first 20 continuous time steps as input, and predicts the trajectory points of the last 20 continuous time steps.
(3)
ConvLSTM-Seq2Seq: The ConvLSTM-Seq2Seq model utilized the same set of parameters as described in Section 4.3. Additionally, for Dataset 1, the model took as input the trajectory points of the first 25 consecutive time steps and predicted the trajectory points of the next 25 time steps. For Datasets 2 and 3, the model took as input the trajectory points of the first 20 consecutive time steps and predicted the trajectory points of the next 20 time steps.
The experimental parameters of the three models are shown in Table 5.
For the performance of the three models on dataset 2 (Figure 13), the trajectory generated by the ConvLSTM-Seq2Seq (ours) model closely resembles the original trajectory (blue trajectory), with the two almost overlapping. The trajectory of LSTM-Seq2Seq delivers comparable outcomes. For the performance of the models on Dataset 3 (Figure 14), the trajectory of LSTM-Seq2Seq outperforms the others by being the closest to the original trajectory, followed by the trajectory of our model. The performance of the Bi-LSTM model is much worse than those of the other two. As depicted in Figure 15, the trajectory of our model (orange trajectory) is the most similar to the trend and length among the three models and exhibits a similar trend as the original ship trajectory. Although the trajectory of Bi-LSTM (red trajectory) also shows high similarity to the real ship trajectory, its second half is not as close as that of our model’s trajectory, which indicates the performance on long time prediction of our model is better. The trajectory of LSTM-Seq2Seq (green trajectory) is the most different from other results and exceeds the length of results of our model and Bi-LSTM model trajectories. To recap, the trajectory of our model is the most effective when compared with the original trajectory across all three figures. The trajectory of LSTM-Seq2Seq provides the second-best performance, whereas the trajectory of Bi-LSTM performs the worst. And, in each picture, the initial position of the trajectory of Bi-LSTM has shifted.
Table 6 shows the results for 20 min trajectory predictions using Dataset 2. From the figure, one can see that the ConvLSTM-based Seq2seq proposed in this paper has the lowest average RMSE and MDE among the three models, which is followed by the LSTM-Seq2Seq model, and the Bi-LSTM (Attention) model has the worst performance. In the meantime, with the increment of the prediction time, the performance of all models started to deteriorate and show higher prediction errors, whereas our model still maintains the best performance. From the analysis, our model has an evident advantage on prediction of curved trajectories. As for the prediction on straight trajectories, the model with the lowest errors is LSTM-Seq2Seq, followed by the ConvLSTM-Seq2Seq model, and the Bi-LSTM (Attention) model has the worst performance. This could be explained by the LSTM-Seq2seq having an advantage when learning the short-term characteristics of the data series. The detailed analysis could be referred to Section 6. As for the trajectory with continuous and small changes (Table 6), the results reveal the results for 60 min trajectory predictions using Dataset 1. The model with the lowest errors is ConvLSTM-Seq2Seq, followed by the Bi-LSTM (Attention) model, whereas the LSTM-Seq2Seq model performs the worst. Overall, the ConvLSTM-Seq2Seq model outperforms other models for predicting trajectory in Dataset 1.

5. Discussion

Ship trajectory prediction plays a very important role in regional ship intelligent collision avoidance and supervision, as it could facilitate the identification and prediction of ship intentions in the region. This paper proposes a ship trajectory prediction model ConvLSTM-based Seq2Seq. Compared with other models in the experiment, the effectiveness of our proposed model is verified. In data preprocessing, our preprocessing method divides trajectory clusters into six clusters, each with unique characteristics.
Experiments were conducted across different datasets, input and output lengths, and prediction lengths. The results revealed that the optimal parameters for the ConvLSTM-Seq2Seq model were p = 25 and q = 25 on Dataset 1, and p = 20 and q = 20 on Datasets 2 and 3, under which conditions this model achieved the best performance. Our observations of Figure 10, Figure 11 and Figure 12 and Table 2, Table 3 and Table 4 demonstrate that the accuracy of our model’s predictions is significantly influenced by different input and output lengths. Interestingly, in all three datasets, the models with p = 15 and q = 15 exhibited the greatest errors, indicating that as p and q lengths increase, prediction errors initially increase and then decrease slightly, with p = 15 and q = 15 representing a peak in prediction errors. Furthermore, due to the cumulative effect of errors, as the length of the prediction time increases, the prediction error of the model also continues to increase. This is evident from the data records corresponding to the trajectory in Figure 15 and the trajectory in Table 6. In Figure 15, the three trajectories initially closely follow the original trajectory. However, as the length of the forecast time increases, they deviate to varying degrees from the original trajectory, with the trajectory of LSTM-Seq2Seq being longer and the trajectory of Bi-LSTM and our model being slightly shorter. Additionally, as indicated in Table 6, the model error increases by 143.71%, 259.03%, and 413.45% within a time range of 50 min. These findings highlight the fact that prediction errors increase with the increase in predictive length. Therefore, by selecting appropriate input and output lengths and increasing the form of the forecasting step, the error can be reduced within the selected time range, and cumulative error can be minimized. The convLSTM-Seq2Seq model exhibits excellent performance when the input and output length is either 20 or 25.
The ConvLSTM-Seq2Seq model exhibits the best performance out of the three models, particularly on the training sets with Dataset 1 and Dataset 2. Although its performance is slightly weaker than the LSTM-Seq2Seq model on Dataset 3, it still produces good results. This superiority may be attributed to the convolutional structure of the ConvLSTM unit, which extracts further information on the relationship between the longitude and latitude of the trajectory data, thereby increasing its accuracy and significantly improving its predictive ability for trajectories with long-time trajectories compared to the other two models. On the other hand, the Bi-LSTM (Attention) model performs poorly among the three models, possibly because it uses a many-to-one prediction approach that outputs the trajectory data of the next time step, leading to multiple accumulated errors that increase its errors. However, in Dataset 3, the LSTM-Seq2Seq model exhibits higher prediction error, almost five times that of the ConvLSTM-Seq2Seq model, whereas the Bi-LSTM (Attention) model’s error is three times that of the ConvLSTM-Seq2Seq model. One of the reasons could be that in the Dataset 3 training set, each small training set has significantly different features, making it difficult for the LSTM-Seq2Seq model to learn these characteristics effectively. In contrast, the attention mechanism of the Bi-LSTM (Attention) model enables it to learn more features from the Dataset 3 training set. Although the ConvLSTM-Seq2Seq model does not have an attention mechanism, its stronger feature extraction ability allows it to learn the features of Dataset 3 as well. However, the improved prediction accuracy of the ConvLSTM-Seq2Seq model comes at the expense of longer computational runtime. To quantify this trade-off, the inference times of the ConvLSTM-Seq2Seq, LSTM-Seq2Seq, and Bi-LSTM (Attention) models were benchmarked by measuring the duration taken to estimate 60 min ship trajectories using Dataset 1. The results, tabulated in Table 7, demonstrate that the ConvLSTM-Seq2Seq architecture exhibits substantially higher time consumption relative to the baseline LSTM-Seq2Seq and Bi-LSTM(Attention) models.
In summary, the ConvLSTM-Seq2Seq model performs best overall due to its powerful feature extraction capabilities, which allow it to learn the characteristics of trajectories with curves effectively.

6. Conclusions

This paper proposed a high-precision trajectory prediction method that combines ConvLSTM and Seq2Seq models to address the long-term ship trajectory prediction problem. To alleviate potential defects of AIS equipment in receiving and sending ship information, this paper preprocessed the AIS data using methods such as abnormal data elimination, HDBSCAN clustering, and cubic spline interpolation to enable subsequent feature extraction through the proposed model. As the ConvLSTM model was effective in extracting spatial-related features, this paper combined it with the Seq2Seq model to develop a ship trajectory prediction model. The research explored the appropriate input and output lengths of the proposed model and compared it with the LSTM-Seq2Seq and Bi-LSTM (Attention) models. The experimental results revealed that the ConvLSTM-Seq2Seq model proposed in this paper exhibited excellent accuracy for turning trajectories. In direct trajectory prediction, the accuracy of the proposed model was slightly lower (by about 10% when predicting 20 min ahead) than that of the LSTM-Seq2Seq baseline model. However, the proposed model still demonstrated decent performance overall. Moreover, by setting the ratio of the number of input trajectory points to output trajectory points at p = 20, q = 20, the proposed model performed optimally in the dataset of straight and curve trajectories. When p = 25, q = 25, the proposed model performed better in datasets with long-time trajectories. Nevertheless, it should be noted that increasing the length of the input and output does not always guarantee a significant improvement in model accuracy. In fact, there exists a trend where accuracy may first increase and then decrease as the lengths are extended. In comparison experiments with other models, the proposed model showed the best results in two of the datasets and also had good accuracy in the other dataset. Furthermore, the cumulative error accumulation of long-term prediction (60 min) on the trajectory was significantly smaller than those of other models. Therefore, the proposed model could be regarded as an effective method for more accurate ship trajectory predictions in a wider range of scenarios. The proposed ship trajectory prediction method could enable accurate risk avoidance, intelligent management and monitoring of ships, aligning with the development trends in future intelligent vessels. Specifically, the method allowed the discovery of abnormal ship behaviors by comparing predicted and actual trajectories and early warning generation. Additionally, precise trajectory forecasts assisted autonomous navigation systems in identifying collision risks and making sensible route-planning decisions. Overall, this work represented a noteworthy contribution to the field of ship trajectory prediction and could help bolster the safety and efficiency of ship navigation in complex marine environments.
In future work, other factors that may affect ship trajectory prediction, such as Speed Over Ground (SOG), Course Over Ground (COG), and environmental information, can be added to the process of spatial extraction of trajectory to further improve the accuracy of the trajectory prediction model. Additionally, when predicting trajectories, incorporating the influence of surrounding vessels into the prediction model could be explored to develop a ship trajectory forecasting approach with enhanced practicality and fidelity to real-world navigation.

Author Contributions

Conceptualization, Methodology, Formal analysis, Investigation, Visualization, Writing—Original manuscript W.W.; Conceptualization, Methodology, Supervision, Writing—Review and Editing P.C.; Methodology, Visualization, Funding acquisition, Writing—Review L.C.; Methodology, Resources, Supervision, Funding acquisition J.M. All authors have read and agreed to the published version of the manuscript.

Funding

This work is financially supported by the National Natural Science Foundation of China under grants 52101402, 52271367, and 52271364. The historical AIS data are provided by the Wuhan University of Technology.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data available on request due to restrictions of privacy.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Liu, J.; Yan, X.; Liu, C.; Fan, A.; Ma, F. Developments and Applications of Green and Intelligent Inland Vessels in China. J. Mar. Sci. Eng. 2023, 11, 318. [Google Scholar] [CrossRef]
  2. Rong, H.; Teixeira, A.P.; Soares, C.G. Ship trajectory uncertainty prediction based on a Gaussian Process model. Ocean Eng. 2019, 182, 499–511. [Google Scholar] [CrossRef]
  3. Murray, B.; Perera, L.P. Ship behavior prediction via trajectory extraction-based clustering for maritime situation awareness. J. Ocean Eng. Sci. 2022, 7, 1–13. [Google Scholar] [CrossRef]
  4. Yang, C.-H.; Lin, G.-C.; Wu, C.-H.; Liu, Y.-H.; Wang, Y.-C.; Chen, K.-C. Deep Learning for Vessel Trajectory Prediction Using Clustered AIS Data. Mathematics 2022, 10, 2936. [Google Scholar] [CrossRef]
  5. Perera, L.P.; Oliveira, P.; Soares, C.G. Maritime Traffic Monitoring Based on Vessel Detection, Tracking, State Estimation, and Trajectory Prediction. IEEE Trans. Intell. Transp. Syst. 2012, 13, 1188–1200. [Google Scholar] [CrossRef]
  6. Burger, C.N.; Grobler, T.L.; Kleynhans, W. Discrete Kalman Filter and Linear Regression Comparison for Vessel Co-ordinate Prediction. In Proceedings of the 21st IEEE International Conference on Mobile Data Management (MDM), Versailles, France, 30 June–3 July 2020; pp. 269–274. [Google Scholar]
  7. Zhang, X.; Liu, G.; Hu, C.; Ma, X. Wavelet Analysis Based Hidden Markov Model for Large Ship Trajectory Prediction. In Proceedings of the 2019 Chinese Control Conference (CCC), Guangzhou, China, 27–30 July 2019; pp. 2913–2918. [Google Scholar] [CrossRef]
  8. Liu, C.; Guo, S.; Feng, Y.; Hong, F.; Huang, H.; Guo, Z. L-VTP: Long-Term Vessel Trajectory Prediction Based on Multi-Source Data Analysis. Sensors 2019, 19, 4365. [Google Scholar] [CrossRef] [Green Version]
  9. Wen, Y.; Zhang, Y.; Huang, L.; Zhou, C.; Xiao, C.; Zhang, F.; Peng, X.; Zhan, W.; Sui, Z. Semantic Modelling of Ship Behavior in Harbor Based on Ontology and Dynamic Bayesian Network. ISPRS Int. J. Geo-Inform. 2019, 8, 107. [Google Scholar] [CrossRef] [Green Version]
  10. Hao, Y.; Wang, Y.; Han, Z. Automatic planning method of seawater navigation trajectory based on AIS big data. Desalination Water Treat. 2022, 269, 221–227. [Google Scholar] [CrossRef]
  11. Dalsnes, B.R.; Hexeberg, S.; Flaten, A.L.; Eriksen, B.-O.H.; Brekke, E.F. The Neighbor Course Distribution Method with Gaussian Mixture Models for AIS-Based Vessel Trajectory Prediction. In Proceedings of the 21st International Conference on Information Fusion (FUSION), Cambridge, UK, 10–13 July 2018; pp. 580–587. [Google Scholar] [CrossRef] [Green Version]
  12. Suo, Y.; Chen, W.; Claramunt, C.; Yang, S. A Ship Trajectory Prediction Framework Based on a Recurrent Neural Network. Sensors 2020, 20, 5133. [Google Scholar] [CrossRef] [PubMed]
  13. Gao, D.-W.; Zhu, Y.-S.; Zhang, J.-F.; He, Y.-K.; Yan, K.; Yan, B.-R. A novel MP-LSTM method for ship trajectory prediction based on AIS data. Ocean Eng. 2021, 228, 108956. [Google Scholar] [CrossRef]
  14. Murray, B.; Perera, L.P. An AIS-based deep learning framework for regional ship behavior prediction. Reliab. Eng. Syst. Saf. 2021, 215, 107819. [Google Scholar] [CrossRef]
  15. Zhang, Z.; Ni, G.; Xu, Y. Ship Trajectory Prediction based on LSTM Neural Network. In Proceedings of the IEEE 5th Information Technology and Mechatronics Engineering Conference (ITOEC), Chongqing, China, 12–14 June 2020; pp. 1356–1364. [Google Scholar]
  16. Sekhon, J.; Fleming, C. A spatially and temporally attentive joint trajectory prediction framework for modeling vessel intent. In Proceedings of the 2nd Conference on Learning for Dynamics and Control, Online, 11–12 June 2020; pp. 318–327. [Google Scholar]
  17. Bao, K.; Bi, J.; Gao, M.; Sun, Y.; Zhang, X.; Zhang, W. An Improved Ship Trajectory Prediction Based on AIS Data Using MHA-BiGRU. J. Mar. Sci. Eng. 2022, 10, 804. [Google Scholar] [CrossRef]
  18. Liu, R.W.; Liang, M.; Nie, J.; Lim, W.Y.B.; Zhang, Y.; Guizani, M. Deep Learning-Powered Vessel Trajectory Prediction for Improving Smart Traffic Services in Maritime Internet of Things. IEEE Trans. Netw. Sci. Eng. 2022, 9, 3080–3094. [Google Scholar] [CrossRef]
  19. Zhang, L.; Zhang, J.; Niu, J.; Wu, Q.M.J.; Li, G. Track Prediction for HF Radar Vessels Submerged in Strong Clutter Based on MSCNN Fusion with GRU-AM and AR Model. Remote Sens. 2021, 13, 2164. [Google Scholar] [CrossRef]
  20. Abebe, M.; Noh, Y.; Kang, Y.-J.; Seo, C.; Kim, D.; Seo, J. Ship trajectory planning for collision avoidance using hybrid ARIMA-LSTM models. Ocean. Eng. 2022, 256, 111527. [Google Scholar] [CrossRef]
  21. Forti, N.; Millefiori, L.M.; Braca, P.; Willett, P. Prediction of vessel trajectories from ais data via sequence-to-sequence recurrent neural networks. In Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP), Barcelona, Spain, 4–8 May 2020; pp. 8936–8940. [Google Scholar]
  22. Wang, S.; He, Z. A prediction model of vessel trajectory based on generative adversarial network. J. Navig. 2021, 74, 1161–1171. [Google Scholar] [CrossRef]
  23. Kang, K.; Zhang, C.; Guo, C. Ship trajectory prediction based on transformer model. In Proceedings of the 4th International Conference on Data-driven Optimization of Complex Systems (DOCS), Chengdu, China, 28–30 October 2022; pp. 1–5. [Google Scholar]
  24. Liu, R.W.; Liang, M.; Nie, J.; Yuan, Y.; Xiong, Z.; Yu, H.; Guizani, N. STMGCN: Mobile Edge Computing-Empowered Vessel Trajectory Prediction Using Spatio-Temporal Multigraph Convolutional Network. IEEE Trans. Ind. Informatics 2022, 18, 7977–7987. [Google Scholar] [CrossRef]
  25. Ma, S.; Liu, S.; Meng, X. Optimized BP neural network algorithm for predicting ship trajectory. In Proceedings of the IEEE 4th Information Technology, Networking, Electronic and Automation Control Conference (ITNEC), Chongqing, China, 12–14 June 2020; pp. 525–532. [Google Scholar] [CrossRef]
  26. Qian, L.; Zheng, Y.; Li, L.; Ma, Y.; Zhou, C.; Zhang, D. A New Method of Inland Water Ship Trajectory Prediction Based on Long Short-Term Memory Network Optimized by Genetic Algorithm. Appl. Sci. 2022, 12, 4073. [Google Scholar] [CrossRef]
  27. Liu, X.; Yuan, H.; Xiao, C.; Wang, Y.; Yu, Q. Hybrid-driven vessel trajectory prediction based on uncertainty fusion. Ocean Eng. 2022, 248, 110836. [Google Scholar] [CrossRef]
  28. Feng, H.; Cao, G.; Xu, H.; Ge, S.S. IS-STGCNN: An Improved Social spatial-temporal graph convolutional neural network for ship trajectory prediction. Ocean Eng. 2022, 266, 112960. [Google Scholar] [CrossRef]
  29. Guo, S.; Mou, J.; Chen, L.; Chen, P. An Anomaly Detection Method for AIS Trajectory Based on Kinematic Interpolation. J. Mar. Sci. Eng. 2021, 9, 609. [Google Scholar] [CrossRef]
  30. Wang, L.; Chen, P.; Chen, L.; Mou, J. Ship AIS Trajectory Clustering: An HDBSCAN-Based Approach. J. Mar. Sci. Eng. 2021, 9, 566. [Google Scholar] [CrossRef]
  31. Shi, X.; Chen, Z.; Wang, H.; Yeung, D.-Y.; Wong, W.-k.; Woo, W.-c. Convolutional LSTM Network: A Machine Learning Ap-proach for Precipitation Nowcasting. In Proceedings of the 29th Annual Conference on Neural Information Processing Systems (NIPS), Montreal, Canada, 7–12 December 2015. [Google Scholar]
  32. Le, Q.V.; Jaitly, N.; Hinton, G.E. A simple way to initialize recurrent networks of rectified linear units. arXiv 2015, arXiv:1504.00941. [Google Scholar]
Figure 1. Overall model design flow chart.
Figure 1. Overall model design flow chart.
Jmse 11 01484 g001
Figure 2. Structure of ConvLSTM [31].
Figure 2. Structure of ConvLSTM [31].
Jmse 11 01484 g002
Figure 3. ConvLSTM cell structure with ReLU activation function.
Figure 3. ConvLSTM cell structure with ReLU activation function.
Jmse 11 01484 g003
Figure 4. Trajectory prediction model structure.
Figure 4. Trajectory prediction model structure.
Jmse 11 01484 g004
Figure 5. Trajectory Sequence.
Figure 5. Trajectory Sequence.
Jmse 11 01484 g005
Figure 6. The raw AIS trajectory data in the research area.
Figure 6. The raw AIS trajectory data in the research area.
Jmse 11 01484 g006
Figure 7. Abnormal data removal.
Figure 7. Abnormal data removal.
Jmse 11 01484 g007
Figure 8. Cubic Spline Interpolation: (a) Interpolation of ship trajectory in a curvilinear section. (b) Interpolation of ship trajectory in a rectilinear section.
Figure 8. Cubic Spline Interpolation: (a) Interpolation of ship trajectory in a curvilinear section. (b) Interpolation of ship trajectory in a rectilinear section.
Jmse 11 01484 g008
Figure 9. Trajectory preprocessing results.
Figure 9. Trajectory preprocessing results.
Jmse 11 01484 g009
Figure 10. Prediction Results of Dataset 2 (20 min): (a) Predicted trajectory with 5 input and output points; (b) Predicted trajectory with 10 input and output points; (c) Predicted trajectory with 15 input and output points; (d) Predicted trajectory with 20 input and output points; (e) Predicted trajectory with 25 input and output points.
Figure 10. Prediction Results of Dataset 2 (20 min): (a) Predicted trajectory with 5 input and output points; (b) Predicted trajectory with 10 input and output points; (c) Predicted trajectory with 15 input and output points; (d) Predicted trajectory with 20 input and output points; (e) Predicted trajectory with 25 input and output points.
Jmse 11 01484 g010
Figure 11. Prediction Results of Dataset 3 (20 min): (a) Predicted trajectory with 5 input and output points; (b) Predicted trajectory with 10 input and output points; (c) Predicted trajectory with 15 input and output points; (d) Predicted trajectory with 20 input and output points; (e) Predicted trajectory with 25 input and output points.
Figure 11. Prediction Results of Dataset 3 (20 min): (a) Predicted trajectory with 5 input and output points; (b) Predicted trajectory with 10 input and output points; (c) Predicted trajectory with 15 input and output points; (d) Predicted trajectory with 20 input and output points; (e) Predicted trajectory with 25 input and output points.
Jmse 11 01484 g011
Figure 12. Prediction Results of Dataset 1 (60 min): (a) Predicted trajectory with 5 input and output points; (b) Predicted trajectory with 10 input and output points; (c) Predicted trajectory with 15 input and output points; (d) Predicted trajectory with 20 input and output points; (e) Predicted trajectory with 25 input and output points.
Figure 12. Prediction Results of Dataset 1 (60 min): (a) Predicted trajectory with 5 input and output points; (b) Predicted trajectory with 10 input and output points; (c) Predicted trajectory with 15 input and output points; (d) Predicted trajectory with 20 input and output points; (e) Predicted trajectory with 25 input and output points.
Jmse 11 01484 g012
Figure 13. Comparison of three models in Dataset 2 (20 min).
Figure 13. Comparison of three models in Dataset 2 (20 min).
Jmse 11 01484 g013
Figure 14. Comparison of three models in Dataset 3 (20 min).
Figure 14. Comparison of three models in Dataset 3 (20 min).
Jmse 11 01484 g014
Figure 15. Comparison of three models in Dataset 1 (60 min).
Figure 15. Comparison of three models in Dataset 1 (60 min).
Jmse 11 01484 g015
Table 1. Description of the case study.
Table 1. Description of the case study.
ItemConfiguration
BoundaryLatitude: 31.08° N to 31.00° N;
Longitude: 122.0° E to 122.4° E
The number of research ship trajectories297
Trajectory data sourcesYangtze River Estuary, China on 1 May 2019, provided by Wuhan University of Technology
Ship typeCargo ship
Table 2. Prediction results of different input and output lengths (Dataset 2).
Table 2. Prediction results of different input and output lengths (Dataset 2).
Number of Forecast PointsStatistics10 min15 min20 min
RMSE (m)MDE (m)RMSE (m)MDE (m)RMSE (m)MDE (m)
p = 5, q = 5Max195.06256.71210.20282.92259.30341.88
Min188.36248.52201.71272.09242.09321.90
Average192.24253.22206.79278.54252.90334.33
p = 10, q = 10Max217.43275.87240.82316.18235.36315.85
Min200.40256.83225.06297.29227.10303.64
Average209.81267.38232.89306.61232.53311.21
p = 15, q = 15Max261.06339.06293.67390.96296.98401.48
Min181.24244.43183.46250.83181.67250.33
Average230.01302.37249.58335.13249.13338.81
p = 20, q = 20Max85.91116.67133.61167.49232.79266.50
Min82.54100.52102.60129.93100.09129.89
Average84.97106.54116.34145.86148.71180.84
p = 25, q = 25Max187.44231.06201.19260.47197.98261.40
Min166.73208.19157.41201.25138.19165.34
Average175.38217.98174.50224.54160.32199.75
Table 3. Prediction results of different input and output lengths (Dataset 3).
Table 3. Prediction results of different input and output lengths (Dataset 3).
Number of Forecast PointsStatistics10 min15 min20 min
RMSE (m)MDE (m)RMSE (m)MDE (m)RMSE (m)MDE (m)
p = 5, q = 5Max127.33160.95175.32221.89218.77277.57
Min113.05143.50149.94191.50180.35231.94
Average122.16154.68164.78209.57200.92256.98
p = 10, q = 10Max130.49164.63218.60263.42334.31390.71
Min107.25135.07154.50193.59188.44238.95
Average116.55147.41185.86226.97269.00320.75
p = 15, q = 15Max184.69237.85266.52337.20347.15435.87
Min157.80205.44227.40289.18303.13379.35
Average167.34217.09241.04306.09318.17398.91
p = 20, q = 20Max152.74199.42183.67242.85228.63297.36
Min99.57133.12116.29156.30139.45185.24
Average93.29155.76143.92190.99174.51229.19
p = 25, q = 25Max253.34325.15349.54446.14435.78555.88
Min115.50150.49128.99172.11128.93174.43
Average184.82237.88241.77311.64287.52370.67
Table 4. Prediction results of different input and output lengths (Dataset 1).
Table 4. Prediction results of different input and output lengths (Dataset 1).
(a)
Number of Forecast PointsStatistics10 min20 min30 min
RMSE (m)MDE (m)RMSE (m)MDE (m)RMSE (m)MDE (m)
p = 5, q = 5Max166.55198.59355.21427.97508.93626.28
Min140.91168.30315.06376.50463.87565.63
Average151.37181.13334.73401.07482.96592.04
p = 10, q = 10Max175.72225.64329.58414.10435.70555.30
Min89.68117.93162.99204.12267.03323.13
Average140.79181.43263.97331.01362.97457.40
p = 15, q = 15Max372.15454.76647.31808.10830.741060.70
Min304.96372.04532.25663.55664.89852.49
Average343.30418.77597.21745.12758.16969.62
p = 20, q = 20Max106.79141.18226.54274.99397.81468.70
Min96.26125.90209.63252.36371.95435.78
Average100.47131.70216.39261.39380.12447.02
p = 25, q = 25Max93.63120.15103.83130.85162.63199.12
Min88.91111.2493.65120.22131.64166.96
Average91.17115.6196.98123.13144.29179.45
(b)
Number of Forecast PointsStatistics40 min50 min60 min
RMSE (m)MDE (m)RMSE (m)MDE (m)RMSE (m)MDE (m)
p = 5, q = 5Max599.18756.47687.53877.23788.011004.33
Min551.12690.75626.67797.20686.61882.84
Average564.82712.10644.09822.05730.71933.67
p = 10, q = 10Max515.62663.51641.42810.95790.99981.05
Min357.77433.98457.55553.70504.88624.31
Average436.55554.88545.67683.54656.93814.07
p = 15, q = 15Max960.361243.811081.471409.731203.831572.02
Min726.16951.30781.091034.44852.121131.05
Average859.781118.01954.121250.291055.591385.70
p = 20, q = 20Max517.27623.83587.19727.59612.97777.79
Min481.48579.37545.68675.32571.59724.41
Average491.82593.12557.21690.65581.28737.78
p = 25, q = 25Max191.65240.25231.56290.34240.50307.04
Min141.79184.00180.27227.18212.96267.11
Average163.55208.05202.58254.39222.23281.75
Table 5. Experimental parameter settings of the three models.
Table 5. Experimental parameter settings of the three models.
ModelParameter NameOptimal Parameters
Bi- LSTM (Attention)Hidden size80
Batch size36
Activation functionReLU
Loss functionMean Squared Error
Learning rate0.001
LSTM-Seq2SeqHidden size64
Batch size36
Activation functionReLU
Loss functionMean Squared Error
Learning rate0.001
ConvLSTM-Seq2Seq (ours)Hidden size64
Kernel size(1,2)
Batch size36
Activation functionReLU
Loss functionMean Squared Error
Table 6. Experimental results of three models in different data sets.
Table 6. Experimental results of three models in different data sets.
(a)
Data SetMethodParameter10 min15 min20 min
Avg RMSE (m)Avg MDE (m)Avg RMSE (m)Avg MDE (m)Avg RMSE (m)Avg MDE (m)
2Bi-LSTM (Attention)p = 5,
q = 1
183.56222.14277.30336.85368.53450.04
LSTM-Seq2Seqp = 20,
q = 20
138.01180.94207.68276.98197.40265.07
ConvLSTM-Seq2Seq (ours)p = 20,
q = 20
69.4795.5275.67101.06124.89149.89
3Bi-LSTM (Attention)p = 5,
q = 1
228.87295.07281.78368.91295.13393.91
LSTM-Seq2Seqp = 20,
q = 20
57.4069.0793.37111.67125.76151.13
ConvLSTM-Seq2Seq (ours)p = 20,
q = 20
93.29120.10140.15183.48133.54177.47
(b)
Data setMethodParameter10 min20 min30 min
Avg RMSE (m)Avg MDE (m)Avg RMSE (m)Avg MDE (m)Avg RMSE (m)Avg MDE (m)
1Bi-LSTM (Attention)p = 5,
q = 1
141.34174.09323.16384.94494.73597.08
LSTM-Seq2Seqp = 20,
q = 20
340.12441.99608.23773.33826.141052.91
ConvLSTM-Seq2Seq (ours)p = 25,
q = 25
91.17115.6196.98123.13144.29179.45
Data setMethodParameter40 min50 min60 min
Avg RMSE (m)Avg MDE (m)Avg RMSE (m)Avg MDE (m)Avg RMSE (m)Avg MDE (m)
1Bi-LSTM (Attention)p = 5,
q = 1
648.16791.26719.93902.54703.63893.86
LSTM-Seq2Seqp = 20,
q = 20
1026.191309.251156.041491.861211.701586.89
ConvLSTM-Seq2Seq (ours)p = 25,
q = 25
163.55208.05202.58254.39222.23281.75
Table 7. Estimated time consumed by different models.
Table 7. Estimated time consumed by different models.
MethodData SetPrediction Time (min)
Bi- LSTM(Attention)10.14249
LSTM-Seq2Seq0.19131
ConvLSTM-Seq2Seq (ours)0.19599
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wu, W.; Chen, P.; Chen, L.; Mou, J. Ship Trajectory Prediction: An Integrated Approach Using ConvLSTM-Based Sequence-to-Sequence Model. J. Mar. Sci. Eng. 2023, 11, 1484. https://doi.org/10.3390/jmse11081484

AMA Style

Wu W, Chen P, Chen L, Mou J. Ship Trajectory Prediction: An Integrated Approach Using ConvLSTM-Based Sequence-to-Sequence Model. Journal of Marine Science and Engineering. 2023; 11(8):1484. https://doi.org/10.3390/jmse11081484

Chicago/Turabian Style

Wu, Wenxiong, Pengfei Chen, Linying Chen, and Junmin Mou. 2023. "Ship Trajectory Prediction: An Integrated Approach Using ConvLSTM-Based Sequence-to-Sequence Model" Journal of Marine Science and Engineering 11, no. 8: 1484. https://doi.org/10.3390/jmse11081484

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop