Next Article in Journal
Tuft Dynamics and the Reproductive Phenology of Zostera caespitosa on the Southern Coast of Korea
Previous Article in Journal
Fault Diagnosis of Maritime Equipment Using an Intelligent Fuzzy Framework
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Vessel Trajectory Prediction at Inner Harbor Based on Deep Learning Using AIS Data

1
Graduate School, Korea Maritime and Ocean University, Busan 49112, Republic of Korea
2
Division of Maritime AI & Cyber Security, Korea Maritime and Ocean University, Busan 49112, Republic of Korea
*
Author to whom correspondence should be addressed.
J. Mar. Sci. Eng. 2024, 12(10), 1739; https://doi.org/10.3390/jmse12101739
Submission received: 26 August 2024 / Revised: 27 September 2024 / Accepted: 28 September 2024 / Published: 2 October 2024
(This article belongs to the Special Issue Maritime Artificial Intelligence Convergence Research)

Abstract

:
This study aims to improve vessel trajectory prediction in the inner harbor of Busan Port using Automatic Identification System (AIS) data and deep-learning techniques. The research addresses the challenge of irregular AIS data intervals through linear interpolation and focuses on enhancing the accuracy of predictions in complex port environments. Recurrent neural network (RNN), Long Short-Term Memory (LSTM), Bidirectional LSTM, Gated Recurrent Unit (GRU), and Bidirectional GRU models were developed, with LSTM delivering the highest performance. The primary scientific question of this study is how to reliably predict vessel trajectories under varying conditions in inner harbors. The results demonstrate that the proposed method not only improves the precision of predictions but also identifies critical areas where Vessel Traffic Service Operators (VTSOs) can better manage vessel movements. These findings contribute to safer and more efficient vessel traffic management in ports with high traffic density and complex navigational challenges.

1. Introduction

Maritime transportation plays a crucial role in global trade, with vessels of various sizes and types navigating through complex port environments daily. As the volume and complexity of maritime traffic continue to increase, the need for accurate vessel trajectory prediction becomes increasingly important for enhancing safety and efficiency in port operations. This study introduces an innovative approach to predict vessel trajectories in the inner harbor of Busan Port, one of the busiest ports in Republic of Korea, using AIS data and deep-learning techniques.
With the global economy’s persistent growth, the volume of international trade has increased dramatically, resulting in a rapid increase in vessel capacity, size, and sailing speed [1]. In particular, large ports like the Port of Busan accommodate a diverse range of vessel types and sizes from all over the world. According to the VTS statistics of South Korea, the daily average traffic volume in the Port of Busan was 522 vessels in 2023. Such dense traffic can lead to the occurrence of more complex maritime traffic situations, which involve higher risks [2,3].
To enhance the safety and efficiency of vessel traffic, which is the primary role of VTS, it is crucial to predict vessel trajectories early and prevent potential collisions. However, current vessel trajectory prediction in ports mainly relies on the Closest Point of Approach (CPA) function of RADAR Automatic Radar Plotting Aid (ARPA) and the subjective experience and judgment of VTSO. While these methods are useful, they may have limitations in providing sufficient information for VTSO to make timely and effective decisions in complex and dynamic maritime traffic situations [4].
Our research addresses these limitations by developing a data-driven, AI-powered approach to vessel trajectory prediction. We focus specifically on predicting the trajectories of inbound vessels entering specific piers within the port, an area often overlooked in existing research. This targeted approach is particularly valuable for Vessel Traffic Service Operators (VTSOs) and port authorities, as it provides crucial information for managing traffic flow and preventing collisions in the most congested and complex areas of the port.
The distinctiveness of our study lies in several key aspects. Firstly, we concentrate on the challenging environment of the inner harbor, where vessel movements are more complex and collision risks are higher. Secondly, we introduce a new feature, “destination to pier”, which significantly enhances the accuracy of our prediction model. Thirdly, our study employs and compares five recurrent neural network models: RNN, LSTM, Bi-LSTM, GRU, and Bi-GRU, allowing us to identify the most effective model for inner harbor trajectory prediction. Lastly, by utilizing AIS data from one of the world’s busiest ports, our research offers insights that are directly applicable to real-world maritime operations.
The remainder of this paper is organized as follows. First, we review related works on vessel trajectory prediction using deep learning. Next, we describe the preprocessing of AIS data used in this study, emphasizing our unique approach to feature selection. Then, we present our methodology, including the proposed model architecture and training process. After that, we discuss the results and analysis of our experiments, demonstrating the performance of our approach in the inner harbor context. Finally, we conclude the paper by highlighting the main findings and future research directions, emphasizing the potential impact of our work on maritime safety and efficiency in busy port environments.

2. Literature Review

In this part, we briefly review deep learning-based methods for predicting maritime vessel trajectories. Neural networks, also known as artificial neural networks (ANNs) or simulated neural networks (SNNs), fall under the category of machine learning and are central to deep-learning algorithms. Neural networks can efficiently learn the features of non-linear time-series data, which are widely used in machine translation [5]. Particularly, RNNs provide a very elegant way of dealing with time sequential data that embodies correlations between data points that are close in the sequence [6]. Therefore, it can be said that using RNN-based models, such as RNN, LSTM, Bi-LSTM, GRU, and Bi-GRU, is appropriate for predicting vessel trajectories using AIS data, which are a type of time sequential data. Ref. [7] combined the sequence prediction method with an LSTM model to predict the trajectories of vessels. AIS data from the port of Tianjin, China, were used to train and test the proposed model. The data period is not specified, and the input sequence length was 10 min with a prediction length also of 10 min. Thus, the proposed LSTM model can be used to observe the first 10 min of the vessel’s state to predict the location of the vessel at the 20th min. Through experimental comparison, LSTM model performs better than the Kalman filter model and the traditional backpropagation (BP) neural network in the field of long-term ship position prediction. However, compared with the Kalman filter, the initial value of the neural network has a certain influence on the prediction results, and the stability of the prediction needs to be further improved. Ref. [8] proposed a methodology for predicting future ship trajectories by applying Bi-LSTM after clustering the ship’s AIS data using the spectral clustering technique. They collected 2816 AIS trajectory data from 1351 ships over 14 days in the coastal waters near the port of Busan. The data were grouped into 29 clusters through spectral clustering based on the longest common subsequence (LCSS) distance, and the two main patterns (group A with 565 trajectories and group B with 535 trajectories), which accounted for about 39% of the total, were used for training Bi-LSTM, LSTM, and GRU models. As a result of 5-fold cross-validation, Bi-LSTM showed the best performance among the three models in terms of prediction accuracy for distance, course, and speed based on the average RMSE. For group A, the distance RMSE of Bi-LSTM, LSTM, and GRU were 101 m, 217 m, and 194 m, respectively. For group B, the distance RMSE of Bi-LSTM, LSTM, and GRU were 107 m, 191 m, and 169 m, respectively. Bi-LSTM demonstrated superior prediction performance compared to LSTM for trajectories with many course changes. Ref. [9] proposed a method for predicting vessel trajectories using a Bi-LSTM model with AIS data. They collected AIS data from more than 300 vessels in the waters around Taiwan and preprocessed the data through trajectory separation, outlier removal, and data standardization. The preprocessed AIS data were used to train and evaluate the performance of RNN, LSTM, Bi-LSTM, GRU, and Bi-GRU models. Experimental results using data from ten vessels showed that the Bi-LSTM model achieved the best prediction performance in terms of MAE, MAPE, and RMSE, with 44.8~75.8% lower error rates compared to other models. Ref. [10] proposed a method for early prediction of collision risk between vessels using an Attention-Bi-LSTM model that combines Bi-LSTM and Attention mechanism with AIS data. They preprocessed the AIS data of vessel encounters collected from the Yangtze River Estuary in China, generating 75,115 records for training and evaluation. The Attention-Bi-LSTM model takes six motion parameters as input, including relative velocity, course difference, relative distance, and azimuth, to calculate the collision risk index (CRI) and classify it into five levels (low, low–middle, middle, middle–high, and high) for predicting the collision risk. Experimental results showed that the Attention-Bi-LSTM model outperformed other models such as LSTM, Attention-LSTM, and Bi-LSTM in terms of prediction accuracy and stability. In particular, the recall rate in high-risk situations reached 87.98%, which was attributed to the more typical vessel motion behavior in high-risk collision situations. The proposed method is expected to be applicable for early warning of ship collision accidents. Ref. [11] proposed a Generative Adversarial Network with Attention Module and Interaction Module (GAN-AI) to predict the trajectories of multiple vessels simultaneously using AIS data. The model was trained and evaluated using 2600 ship trajectories collected from the intersection channel of Zhoushan Port, China, which has high traffic density and complex navigation environment. The GAN-AI model consists of a generator and a discriminator, where the generator is composed of an encoder, decoder, interaction module, attention module, and MLP. The interaction module extracts the group motion features of multiple vessels to capture their interactive behavior, while the attention mechanism emphasizes the key information relevant to the trajectory prediction task. Experimental results showed that the GAN-AI-20v20 model achieved an Average Distance Error (ADE) of less than 40.7 m and a Final Distance Error (FDE) of less than 82.4 m for a prediction duration of 180 s, outperforming the seq2seq, plain GAN, and Kalman filter models by 20%, 24%, and 72%, respectively. The proposed method has significant potential for improving vessel traffic management, intelligent ship path planning, and ship collision risk analysis. Ref. [12] proposed an innovative approach for predicting ship trajectories by leveraging AIS data in conjunction with an attribute correlation attention module (ACoAtt) and LSTM network. The methodology starts with preprocessing AIS data through encoding conversion technology to enhance representation efficiency while retaining crucial information. The ACoAtt module applies multi-head attention to capture intricate relationships between dynamic ship attributes like speed and direction, while the LSTM network adeptly models time-series data. The study utilized a historical AIS dataset encompassing 42 vessels, each with an average of 874 data points. The model achieved a mean absolute error (MAE) of 121.9 m and a root mean square error (RMSE) of 130.6 m in its optimal LSTM configuration. The proposed model outperformed the Kalman Filter, LSTM, and Transformer-based models in both accuracy and stability. This innovative approach provides accurate and reliable ship trajectory prediction, which is crucial for maritime safety. Additionally, the reviewed studies show the versatility and adaptability of deep-learning models in maritime vessel trajectory prediction. By exploring various architectures like Bi-LSTM, GRU, and GAN, researchers have tailored models to account for diverse maritime conditions and complex environments. These models address specific challenges such as collision risk and trajectory prediction in dense traffic, enhancing maritime safety and efficiency. Further research should focus on refining these models by incorporating environmental factors and human operator behavior to create even more robust predictions.

3. Data Collection and Preprocessing

3.1. Data Collection

The AIS data utilized in this study were collected from Port-MIS, a web server-based system of the Ministry of Oceans and Fisheries of Korea, over a two-month period from 20 March 2023 to 18 May 2023. The “Port-MIS system” stores information such as arrival times and ship names for vessels under control at the Port of Busan piers. Figure 1 illustrates the area of the AIS data used in this study. The spatial scope is defined by a rectangular area bounded by coordinates (35°06′25.0′′ N, 129°04′25.0′′ E), (35°06′25.0′′ N, 129°06′47.0′′ E), (35°04′45.0′′ N, 129°06′47.0′′ E), and (35°04′45.0′′ N, 129°04′25.0′′ E) in WGS-84 coordinates. A total of 105,584 AIS data points were filtered within this range.

3.2. Data Preprocessing

The process of extracting AIS data for training is as follows. First, 362 trajectories of container vessels entering container terminal piers No. 1 to No. 4 were extracted from the AIS data stored in the “Port-MIS system”. Next, as shown in Table 1, among these 362 trajectories, 156 inbound trajectories to container terminal pier No. 2 were selected. Pier No. 2 had the most frequent berthing, the least deviation in vessel type, navigation area, gross tonnage, and length overall (LOA) between vessels, and the highest number of berthings. To extract the AIS data constituting these 156 inbound trajectories, the MMSI of the berthing vessels was used to filter only the inbound data from the 105,584 AIS data points. Finally, the filtered inbound AIS data were further refined to include only the data from one hour before the berthing time at pier No. 2, resulting in 1222 AIS data points.
To utilize AIS data for developing a vessel trajectory prediction model, it is crucial to ensure the reliability, accuracy, and availability of the data through appropriate preprocessing. First, we set the minimum time interval of the trajectory to 60 min, considering that the AIS information receiving interval is generally specified to be about 5–10 min [1], and information intervals longer than 60 min are used as the next stage of navigation status. Next, we removed abnormally high-speed values (SOG values of 20 or higher). The study area is subject to a speed limit of 10 knots under the regulations of Busan Port, and when pilots board the vessel, they maintain a boarding speed of 7–8 knots for entry. Therefore, it is reasonable to consider speeds above 20 knots as abnormal, except for high-speed passenger vessels.
Additionally, we deleted data with MMSI lengths other than 9 digits, abnormal values such as 111111111 or 000000000, and COG values outside the range of 0–360 degrees. Duplicate rows were also removed, leaving only one instance. According to [13] and as shown in Table 2, a vessel’s AIS static information should be updated every 6 min or upon request, and the dynamic information should be reported at intervals between 2 s and 3 min, depending on the vessel’s speed and heading. However, in actual vessel operating environments, various factors can cause the reception interval of AIS dynamic information to be longer than the stipulated regulations. Ref. [14] found that factors affecting AIS information transmission and reception include the height of the ship’s antenna, radio interference, weather conditions, and vessel density. They specifically mentioned that in areas with high vessel density, the reception interval can be prolonged due to collisions of AIS information. Furthermore, [15] explained that the performance of AIS receivers and the location of the ship’s antenna can also influence the reception of AIS information. In cases where the receiver is outdated or the antenna installation location is inappropriate, the AIS information reception interval can become irregular. Due to these factors, AIS cannot reserve or listen to idle time slots, causing AIS information to be delayed and the trajectory data of a given ship to appear at larger intervals [9].
The original AIS data had irregular collection intervals, averaging approximately 5.6 min. This extended average interval was mainly due to two factors: delays in AIS reception cycles for low-speed vessels within the port, and the removal of erroneous data points during the data cleaning process. To enhance data consistency and improve model accuracy during training, we applied linear interpolation to convert all data to 1-min intervals. Through this process, we ultimately extracted 6873 inbound vessel trajectories for training purposes. This preprocessing improved the quality of the AIS data, providing high-quality data necessary for developing an effective vessel trajectory prediction model.
To improve the accuracy of the model, we considered eight features: latitude, longitude, SOG, COG, destination pier, ship type, ship length, and ship size, and normalized the latitude, longitude, SOG, and COG values. The inclusion of the “destination pier” feature is an approach in this study that aims to enhance the trajectory prediction accuracy of inbound vessels heading to specific destinations within the port.

4. Methodology

4.1. Recurrent Neural Network (RNN)

RNNs are neural networks designed to capture sequential information in data [16,17]. They maintain and propagate information through time by allowing connections between hidden units across different time steps. Figure 2 illustrates the structure of RNNs that learn and exploit these temporal dependencies [18,19]. The hidden state at time t, denoted as h t , is computed based on the current input, x t , and the previous hidden state, h t 1 . This computation can be expressed as follows:
h t = tan   h   ( W h h h t 1 + W x h x t + b h )
where W h h is the weight matrix for the hidden state, W x h is the weight matrix for the current input, b h is the bias term, and the hyperbolic tangent ( tan   h ) is the activation function [20].
The output at time t, denoted as y t , is computed based on the current hidden state, h t :
y t = tan   h   ( W h y h t + b y )
where W y is the weight matrix for the output, h t is the current hidden state, b y is the bias term, and tan   h is the activation function.
RNNs are trained through backpropagation through time (BPTT), which allows them to learn optimal values for weights and biases. However, they often suffer from the vanishing or exploding gradient problem, making it difficult to capture long-term dependencies [21,22]. This limitation led to the development of more advanced architectures like LSTM and GRU.

4.2. Long Short-Term Memory (LSTM)

LSTM is an advanced recurrent neural network architecture designed to address the long-term dependency problem of traditional RNNs [23]. The key innovation of LSTM is the introduction of a memory cell and three gates: input gate, forget gate, and output gate. These gates control the flow of information through the cell state, allowing the network to selectively remember or forget information over long sequences. The structure of an LSTM cell is shown in Figure 3.
The core operations of LSTM can be summarized by the following equations:
f t = σ ( W f [ h t 1 , x t ] + b f )
i t = σ ( W i [ h t 1 , x t ] b i )
c ~ t = tan   h   ( W c [ h t 1 , x t ] b c )
c t = f t × c t 1 + i t × c ~ t
o t = σ ( W o [ h t 1 , x t ] b o )
h t = o t × tan   h ( c t )
where W f , W i , W c , and W o are the weight matrices for the forget gate, input gate, cell state update, and output gate, respectively; b f , b i , b c , and b o are the corresponding bias vectors; σ is the sigmoid activation function, which outputs values between 0 and 1 to control the opening and closing of the gates; and tan   h is the hyperbolic tangent activation function.
Bi-LSTM extends the traditional LSTM model to process sequences bidirectionally, thus incorporating both past and future information [24]. Bi-LSTM utilizes two independent LSTM layers; one processes the sequence from left to right (forward LSTM), and the other from right to left (backward LSTM). At each time step, the hidden states from the forward LSTM ( h t ) and the backward LSTM ( h t ) are concatenated to form the final hidden state ( h t ). Figure 4 illustrates the structure of the Bi-LSTM.
The hidden state at time step t is computed as follows:
h t = [ h t ;   h t ]
where [;] denotes vector concatenation. The forward LSTM operations are identical to Equations (1)–(6) of LSTM, while the backward LSTM processes the sequence in reverse. Bi-LSTM can capture richer contextual information than unidirectional models, making it valuable for maritime trajectory prediction where understanding past–future relationships is crucial.

4.3. Gated Recurrent Unit (GRU)

GRU is another popular variant of recurrent neural networks, introduced by [25] as a simpler alternative to LSTM. GRU combines the forget and input gates into a single update gate and merges the cell state and hidden state, reducing complexity while maintaining effectiveness. The structure of a GRU is illustrated in Figure 5.
At each time step t, a GRU cell consists of an update gate z t and a reset gate r t . The operation process of GRU is defined as follows:
z t = σ ( W z [ h t 1 , x t ] + b z )
r t = σ ( W r [ h t 1 , x t ] + b r )
h ~ t = tan   h   ( W h [ r t × h t 1 , x t ] +   b h )
h t = ( 1 z t ) × h t 1 + z t × h ~ t  
where W z , W r , and W h are the weight matrices for the update gate, reset gate, and candidate activation, respectively; b z , b r , and b h are the corresponding bias vectors; σ is the sigmoid activation function; and tan   h is the hyperbolic tangent activation function. GRU can achieve comparable performance to LSTM while being simpler and more computationally efficient [26]. Bi-GRU, an extension of GRU, incorporates bidirectional processing similar to Bi-LSTM, capturing both past and future context. This can be beneficial for tasks such as ship trajectory prediction.
Bi-GRU is an extension of GRU that incorporates bidirectional processing, similar to Bi-LSTM [6]. By processing the sequence in both forward and backward directions, Bi-GRU can capture both past and future context, which can be beneficial for tasks such as ship trajectory prediction. The structure of a Bi-GRU is shown in Figure 6.
It consists of two independent GRU layers: a forward GRU and a backward GRU. The hidden states from both directions are concatenated at each time step to form the final hidden state:
h t = [ h t ;   h t ]
where the semicolon (;) represents the concatenation operator. The forward and backward GRUs follow the same operation process as described in Equations (1)–(4), with separate sets of weights and biases for each direction. By incorporating bidirectional processing, Bi-GRU can capture more comprehensive contextual information compared to unidirectional GRU. This can lead to improved performance in various sequence modeling tasks, including ship trajectory prediction, as demonstrated by [27].

4.4. Proposed Model Architecture and Training Process

To validate the practicality and effectiveness of the proposed trajectory prediction method, we conducted a performance comparison by training the refined data on RNN, LSTM, Bi-LSTM, GRU, and Bi-GRU models. The experiments were performed using the platform and environment specified in Table 3.
The dataset used for training and testing the prediction models was collected from the “Port-MIS system” of Ministry of Oceans and Fisheries of Korea, spanning a period of two months. The total dataset, D t o t a l , consists of 6873 data points, with 5497 (80%) used as the training dataset, D t r a i n , and 1376 (20%) used as the test dataset, D t e s t . This can be expressed mathematically, as follows:
D t o t a l = D t r a i n D t e s t
D t o t a l = 6873
D t r a i n = 5497
D t e s t = 1376
The training dataset, X t r a i n T , is defined as follows:
X t r a i n T = [ x 1 t r a i n , x 2 t r a i n , x 3 t r a i n , , x m t r a i n ] T
where m is the number of data points, and in our case, this number is 5497. Each data point, x i , is a feature vector representing the state of a vessel at time point, t, expressed as follows:
x t t r a i n = [ M M S I t t r a i n ,   t   ,   L o t t r a i n , L a t t r a i n , S O G t t r a i n , C O G t t r a i n ]
where M M S I t t r a i n is the vessel identification number, t is the time, L o t t r a i n and L a t t r a i n are the longitude and latitude, S O G t t r a i n is the speed over ground, and C O G t t r a i n is the course over ground.
To generate sequence data for model training, the time-series data are transformed into sequence data by using the data from the past n time points (t − n + 1 to t) as input to predict the position at time point t + p, where n is the sequence length, and p is the prediction period. X ^ t t r a i n represents the input sequence data to the model, consisting of data points from past time steps up to the current time, t. This sequence plays a crucial role as the input to the model for making predictions. Y ^ t + p t r a i n represents the predicted position and related characteristics at time t + p, where p denotes the prediction period, indicating the future time step to be predicted. The sequence data are represented as follows:
X ^ t t r a i n = x t n + 1 t r a i n , x t n + 2 t r a i n , , x t t r a i n
Y ^ t + p t r a i n = Lo t + p t r a i n , La t + p t r a i n , SOG t + p t r a i n , COG t + p t r a i n  
The model is trained using a training dataset with a 1-min interval to predict the vessel’s position, p, minutes ahead. The model’s prediction is expressed as follows:
Y ^ t + p t r a i n = f X ^ t t r a i n ; θ
where θ represents the model parameters learned during the training process.
For example, in the case of an LSTM model, the output, y ^ t , is calculated using the hidden state, h t , as follows:
y ^ t = w h y h t + b y
The equation for predicting the vessel’s position and related characteristics, Y ^ t + p t r a i n , 2 min ahead can be expressed as follows:
Lo t + 2 t r a i n , La t + 2 t r a i n , SOG t + 2 t r a i n , COG t + 2 t r a i n = LSTM x t n + 1 t r a i n , x t n + 2 t r a i n , , x t t r a i n ; θ  
where θ represents the learned parameters of the LSTM model, and n represents the number of past time points used for prediction. Although the model predicts four values (longitude, latitude, SOG, and COG), only the predicted longitude and latitude values were used, as they were the required outputs for our application. The hyperparameters used for training the models are listed in Table 4. These values were empirically tuned to achieve optimal performance. The models were trained using the Adam optimizer for 1000 epochs with a batch size of 8192. Mean Squared Error (MSE) was used as the loss function, and the ReLU activation function was applied in the dense layer.
The academic contributions of this study lie in several key aspects of the proposed model architecture. First, the integration of diverse input features, including not only traditional AIS data but also contextual information, such as destination pier, vessel type, and size, enhances the model’s predictive accuracy in complex inner harbor environments. Second, the model’s specialization for inner harbor movements addresses a gap in existing research, which has primarily focused on open sea trajectory prediction. Third, by training on data with 1-min intervals, the model is designed for real-time predictions in actual VTS operational environments, significantly improving its practical applicability. Lastly, the inclusion of destination pier as a feature enables the model to learn port-specific traffic patterns, allowing for adaptive learning in different port contexts.
To provide a clearer understanding of the model training process, we present the following pseudo-code in Algorithm 1, using the LSTM model as an example to outline the main steps of our approach. Algorithm 1 Stepwise pseudo-code for vessel-trajectory prediction using LSTM.
Algorithm 1 LSTM Trajectory Prediction Algorithm
1: Input: Vessel data (MMSI, Time, Lat, Long, SOG, COG)
2: Output: Predicted trajectory and performance metrics
3: Load dataset from CSV file
4: Convert Time column to timestamp and scale features (Time, Lat, Long, SOG, COG)
5: Step 1: Sequence Data Creation
6: Create sequences of length time step from the dataset
7: Apply conditions based on MMSI and Time differences to create X and Y datasets
8: Step 2: Train/Test Split
9: Split the dataset into training and testing sets (80/20 split)
10: Step 3: Model Definition
11: Define a LSTM model with 3 LSTM layers
12: Apply BatchNormalization and Dropout for regularization
13: Compile the model with Adam optimizer and MSE loss function
14: Step 4: Model Training
15: Train the model using the training data (X train, Y train)
16: Set epochs to 1000 and batch size to 8192
17: Step 5: Prediction
18: Select vessel data for specific MMSI
19: Apply time filtering to the dataset
20: Create test sequences and predict the future trajectory
21: Step 6: Performance Evaluation
22: Compute actual and predicted coordinates
23: Calculate the Haversine distance between actual and predicted points
24: Compute MAE, MSE, and RMSE for the prediction
25: Step 7: Plot Results
26: Plot the actual and predicted trajectories on a map
27: Display performance metrics (MAE, MSE, RMSE)
This pseudo-code provides a high-level overview of our methodology, from data preparation to model evaluation. It highlights key steps such as sequence data creation, model architecture, and the training process, which are crucial for reproducing our results.
The data-preparation step involves loading the AIS data and applying the preprocessing techniques discussed earlier. In the next step, creating the sequence data is a critical process that transforms the time-series data into a format suitable for our LSTM model, as explained in the relevant equations. The model definition corresponds to the LSTM architecture, with specific hyperparameters listed in the provided table. The training process uses the Adam optimizer and Mean Squared Error loss function, as previously mentioned. Finally, the evaluation step employs Haversine distance-based metrics (MAE and RMSE), providing a comprehensive assessment of our model’s performance. By following these steps, researchers can replicate our study and potentially extend it to other maritime environments or vessel types.

4.5. Testing Procedure and Performance Evaluation Metrics

The test dataset, X t e s t T , represents the data used for evaluating the performance of the trained models and is defined as follows:
X t e s t T = [ x 1 t e s t , x 2 t e s t , x 3 t e s t , , x r t e s t ] T
where r is the number of data points in the test dataset, which is 1376. Each data point, x i , is a feature vector representing the state of a vessel at time point t and is expressed as follows:
x t t e s t = [ M M S I t t e s t ,   t   ,   L o t t e s t , L a t t e s t , S O G t t e s t , C O G t t e s t ]
The actual trajectory points are represented by Y ^ t e s t t + p , which includes the actual latitude and longitude, L a t + 2 a c t u a l and L o t + 2 a c t u a l , at time t + p:
Y ^ t e s t t + p = L o t e s t t + p , L a t e s t t + p , S O G t e s t t + p , C O G t e s t t + p
These test data points are used to generate predictions, Y ^ p r e d t + p , including the predicted latitude and longitude, L a t + 2 p r e d and L a t + 2 p r e d , at time t + p:
Y ^ p r e d t + p = f X ^ t e s t t ; θ
The input to the prediction model, X ^ t e s t t is defined as follows:
X ^ t e s t t = [ x t n + 1 t e s t , x t n + 2 t e s t ,   ,   x t t e s t ]
where f represents the trained prediction model, X ^ t e s t t represents the test data point at time t, and θ represents the learned model parameters. In addition to the evaluation metrics such as MAE, MSE, and RMSE, we employ the Haversine distance formula to measure the accuracy of the predicted vessel positions. As [28] pointed out, optimization of the Haversine distance is more directly aligned with our goal of accurate vessel trajectory prediction. The Haversine distance formula is used to calculate the great-circle distance (the shortest distance over the Earth’s surface) between two points [29]. Although the Earth is not a perfect sphere, this formula is useful for computing reasonably accurate distances. The Haversine function is defined as follows:
h a v e r s i n e θ = s i n 2 ( θ 2 )
Given the latitudes ( L a t + 2 a c t u a l   a n d   L a t + 2 p r e d ) and longitudes ( L a t + 2 a c t u a l ,   L a t + 2 p r e d ) of two points, the differences in latitude and longitude are calculated as follows:
L a = L a t + 2 a c t u a l L a t + 2 p r e d   a n d   L o = L o t + 2 a c t u a l L o t + 2 p r e d
These differences are converted to radians. Using the central angle, θ (the angle between two points as seen from the center of the sphere), between the two points, the distance, d, on the surface of the sphere can be calculated as follows:
a = h a v e r s i n e L a + c o s   ( L a t + 2 p r e d ) c o s   ( L a t + 2 a c t u a l ) h a v e r s i n e L o
c = 2 · a t a n 2 ( a , 1 a )
d = R · c
where a is the value calculated by the Haversine function, based on the differences between ΔLa and ΔLo. This is computed using the differences in latitude and longitude between the two points. In addition, c is the central angle representing the angle between the two points at the center of the sphere, calculated using cosines and arctangents, considering the differences in latitude and longitude. The arctangent calculation uses the atan2(y,x) function, which returns the angle between the positive x-axis and the line from the origin to the point (x,y). The atan2 function is particularly useful because it accounts for the sign of both arguments, resulting in a more precise angle measurement between −π and π. This central angle represents the shortest distance between two points on the surface of the sphere. R is the radius of the Earth, and the final distance, d, is calculated by multiplying the central angle c by R. Therefore, the d can be expressed as follows:
d = 2 r · a r c s i n s i n 2 ( L a 2 ) + c o s   ( L a t + 2 p r e d ) c o s   ( L a t + 2 a c t u a l ) s i n 2 ( L o 2 )
In practice, since the Earth is not a perfect sphere and is closer to an ellipsoid slightly bulging near the equator, modified Haversine distance formulas considering various radii are sometimes used. However, the basic form is as described above, and in most cases, it provides sufficiently accurate distances. There are three main reasons for using the Haversine distance as a performance metric in vessel trajectory prediction.
The first is accuracy. The Haversine formula calculates the actual distance between two points, considering the Earth’s curvature. In vessel trajectory prediction, the accurate distance between two points (predicted and actual positions) is important, which is why this formula is used. The second reason is standardization. The Haversine distance is a widely used standard distance measurement method in navigation and aviation. Using it makes it easier to compare with other studies or applications. It is particularly intuitive as it can be expressed in meters or kilometers. The third reason is practicality. The Haversine distance calculation can be performed using only latitudes and longitudes, without requiring complex numerical calculations or additional data. Therefore, it can be effectively used even in real-time systems or environments with limited computational resources.
The Haversine distance formula is used to calculate the great-circle distance (the shortest distance over the Earth’s surface) between two points. In addition to the Haversine distance, which measures the great-circle distance between the predicted and actual vessel positions, this study employs three common regression metrics to evaluate the performance of the trajectory prediction models: MAE, MSE, and RMSE. It is important to note that these error metrics are calculated based on the Haversine distance between the predicted and actual vessel positions. MAE is defined as the average absolute difference between the predicted and actual Haversine distances:
MAE = 1 n i = 1 n i d ^ i
where n is the number of samples, i is the actual Haversine distance, and d ^ i is the predicted Haversine distance. MSE is the average of the squared differences between the predicted and actual Haversine distances:
MSE = 1 n i = 1 n ( i d ^ i ) 2
RMSE is the square root of the MSE:
RMSE = 1 n i = 1 n i d ^ i 2
It is important to note that these error metrics are calculated based on the Haversine distance between the predicted and actual vessel positions. These metrics provide a comprehensive assessment of the prediction models’ performance, with lower values indicating better accuracy [30]. Ref. [31] noted that MAE is less sensitive to outliers compared to MSE and RMSE, while RMSE is more sensitive to large errors due to the squared term. The use of these evaluation metrics will be further discussed in the following part, “Results and Analysis (Comparison experiment on test set vessels)”, where the performance of the various trajectory prediction methods will be compared using MAE and RMSE.

5. Results and Discussion

5.1. Identification of the Critical Prediction Area for VTSO

From the perspective of a VTSO, the most challenging area to predict is from the point where a vessel deviates from the fairway and enters the “pier vicinity area” until the vessel is considered to have arrived at the pier, i.e., when its speed drops to 0–1 knots. The pier vicinity area is illustrated in Figure 7, which shows the typical area of a vessel entering the port and approaching the pier. The red star in the figure indicates the location of pier no. 2. Predictions in this pier vicinity area are crucial for VTSO in carrying out their traffic control duties.
Therefore, the appropriate prediction period for vessel trajectory prediction should be based on the time a vessel navigates through the pier vicinity area. To determine a suitable criterion, we first calculated the average time taken and the average distance traveled by vessels from the moment they enter the pier vicinity area until they reach the pier. Before calculating the average time, let t j e n t r y be the moment when vessel j enters the pier vicinity area, and t j a r r i v a l be the moment when its speed drops between 0 and 1 knot. The time taken, T j , for each vessel, j, to arrive within the area can be calculated as follows:
T j = t j a r r i v a l t j e n t r y
The average time taken, T j , can be obtained by calculating the time differences, T ¯ , for each vessel and then taking the average of these values. Let n be the total number of observed vessels, and the average time is calculated as follows:
T ¯ = 1 n j = 1 n T j
The distance calculation for each vessel, j, is performed by calculating the distance, D j , traveled from the moment the vessel enters the pier vicinity area until its speed drops to 0–1 knot. This distance is calculated along the path between the vessel’s entry point and the point where its speed slows down. The total distance is then calculated by summing the distances traveled in each segment. The average distance calculation for all vessels is obtained by taking the average of the distances, D j , traveled by each vessel to obtain the overall average distance, D ¯ . Let n be the total number of observed vessels, and the average distance is calculated as follows:
D ¯ = 1 n j = 1 n D j
Using the above calculation method, the results showed that the average time taken for each vessel was 11.55 min, and the average distance traveled was 740.0 m. Based on these values and considering the perspective of a VTSO, it was determined that a 2 min interval is sufficient to predict a potentially dangerous situation when two moving vessels are approaching each other. Therefore, the prediction period value was set to 2 min. As mentioned earlier, the time intervals in our dataset are irregular (average 6.15 min). Ref. [32] noted that irregular sampling poses difficulties for standard deep-learning architectures, such as RNN and CNN, which assume regularly sampled input data. To address this issue, we applied linear interpolation to the dataset to obtain a regular 1 min interval between data points. The interpolated data were then used for training and testing. For testing, we randomly selected a vessel from the test set and compared the performance of various trajectory prediction methods. The methods compared were RNN, LSTM, Bi-LSTM, GRU, and Bi-GRU, and their performance was evaluated based on sequence lengths ranging from 1 to 4. The evaluation metrics used were MAE and RMSE. The prediction approach varied according to the sequence length. For a sequence length of 1, only the data from 1 min prior to the prediction target point were used to predict the value 1 min ahead. For a sequence length of 2, data up to 2 min prior to the prediction target point were used to predict the value 1 min ahead. The same approach was applied for sequence lengths of 3 and 4, using data up to 3 min and 4 min prior to the prediction target point, respectively.

5.2. Performance Evaluation of Trajectory Prediction Models for a Representative Vessel

A vessel with the MMSI number 477****** was randomly selected as a test dataset. All of our training datasets were used to train the models, and the data from the period of “11 April 2023 0:32~11 April 2023 1:30” were used to evaluate the prediction performance of the trained models. The prediction performance of the RNN, LSTM, Bi-LSTM, GRU, and Bi-GRU models was assessed using these data. Table 5 compares the performance of various models at different sequence lengths when linear interpolation is applied. Sequence length represents the time unit of past data used for prediction, and experiments were conducted by varying it from 1 to 4. For example, when the sequence length is 1, the data from 1 min prior to the current time point are used as input to predict the position at the current time point.
When the sequence length is 2, the data from 2 min and 1 min prior to the current time point are used as input to predict the position at the current time point. As shown in the table, the LSTM model achieved the best performance, with an MAE of 121.9 m and RMSE of 130.6 m when the sequence length was 1. MAE represents the average of the absolute errors between the predicted and actual values, while RMSE is the square root of the average of the squared errors, emphasizing the magnitude of the errors. The superior performance of the LSTM model compared to other models can be attributed to its gate structure, which effectively handles long-term dependencies, making it suitable for vessel trajectory prediction. However, the superior performance of LSTM compared to Bi-LSTM can be attributed to several factors beyond its gate structure. Firstly, the complexity of Bi-LSTM, with its bidirectional processing, might have led to overfitting on the given dataset, resulting in reduced generalization ability. In contrast, the simpler architecture of LSTM could have allowed it to capture the essential patterns without overfitting. Secondly, the specific characteristics of vessel trajectories in the dataset might have favored unidirectional processing. If the future trajectory heavily depends on the immediate past positions and less on the distant future, the bidirectional processing of Bi-LSTM might not provide significant benefits.
Lastly, the limited size of the dataset could have impacted the performance of Bi-LSTM more than LSTM. Bi-LSTM, with its increased complexity, might require a larger dataset to fully leverage its bidirectional processing capabilities. On the other hand, most models showed an increasing trend in MAE and RMSE as the sequence length increased. This indicates that the prediction performance may deteriorate when using data with longer time units. This phenomenon suggests that using data from a longer time range may actually degrade the prediction performance due to the increased irregularity of vessel movements over longer periods. Therefore, selecting an appropriate sequence length is crucial, and in this experiment, the best performance was observed when the sequence length was 1. Figure 8 presents a visual comparison of trajectory prediction performance for five different deep-learning models: RNN, LSTM, Bi-LSTM, GRU, and Bi-GRU. These models are commonly used in sequence prediction tasks, such as predicting vessel trajectories. The figure consists of five separate graphs, one for each model, allowing readers to easily compare their performance. In each graph, we have the following:
(1)
The solid red line represents the actual trajectory of the vessel. This is the ground truth, or the path the vessel actually took.
(2)
The four dashed lines represent predicted trajectories using different “sequence lengths”. Sequence length refers to how much historical data the model uses to make its prediction.
(2.1)
Sky-blue dashed line: prediction using 1 time step of historical data (sequence length 1).
(2.2)
Green dashed line: prediction using 2 time steps of historical data (sequence length 2).
(2.3)
Yellow dashed line: prediction using 3 time steps of historical data (sequence length 3).
(2.4)
Brown dashed line: prediction using 4 time steps of historical data (sequence length 4).
The actual trajectory and the prediction with sequence length 1 consist of five points (P1 to P5), representing five consecutive positions of the vessel. For the other sequence lengths (2 to 4), only four points (P1 to P4) are shown. This is because these longer sequence lengths require more historical data, leaving insufficient data to predict the fifth point. To interpret these graphs, keep the following in mind:
(1)
Look at how closely each colored dashed line (predicted trajectory) follows the solid red line (actual trajectory).
(2)
The closer a dashed line is to the red line, the more accurate that prediction is.
(3)
Compare the different colored lines within each graph to see which sequence length performs best for each model.
(4)
Compare across the five graphs to see which model seems to perform best overall.
These graphs allow for a visual comparison of the prediction performance of each model at different sequence lengths and the differences between the actual and predicted trajectories. A closer alignment of the predicted trajectory to the actual trajectory indicates better prediction performance for the corresponding model and sequence length combination. Figure 9 presents a comparison between the actual vessel trajectory and the predicted trajectory obtained using the LSTM method on a satellite image of the port layout. The LSTM method demonstrated the best performance among the evaluated techniques. The actual trajectory, depicted by a solid line of red points, represents the true path followed by the vessel. In contrast, the predicted trajectory, indicated by a dashed line of sky-blue points, showcases the path predicted by the LSTM model. The comparison focuses on the critical segment of the vessel’s entry process into the port, from the breakwater to the pier, providing a visual outline for the trajectories.
Figure 10 illustrates the distance error between the predicted and actual positions at each trajectory point. The x-axis represents the trajectory points, while the y-axis indicates the distance error in meters between the predicted and actual positions at the corresponding point.
Table 6 provides a summary of the distance errors at each trajectory point and the average errors for the overall trajectory and the pier vicinity area. The overall average distance error across all points is 103.9 m, while the average error in the pier vicinity area (points 3–5) is 81.6 m. This indicates that the LSTM model performed approximately 21.4% more accurate predictions in the hazardous pier vicinity area compared to the entire area. Although there are few existing studies specifically focusing on inbound vessel trajectory prediction, making a direct comparison difficult, our study introduces a novel feature tailored to predict vessel movements within the port, offering a differentiated approach from prior research. Compared to previous studies, Park et al. (2021) predicted vessel trajectories near Busan Port using Bi-LSTM, LSTM, and GRU models. Their results showed that Bi-LSTM was the most accurate model in terms of RMSE. Specifically, for Group A, the distance RMSEs of Bi-LSTM, LSTM, and GRU were 101 m, 217 m, and 194 m, respectively, and for Group B, the RMSEs were 107 m, 191 m, and 169 m, respectively. In comparison, the LSTM model in our study achieved a mean error of 81.6 m in the pier vicinity area, demonstrating superior performance in a complex port environment like Busan. Ref. [12] employed a combination of the ACoAtt attention mechanism and LSTM to manage complex relationships between vessel attributes such as speed and direction, achieving a mean absolute error (MAE) of 121.9 m and an RMSE of 130.6 m. In contrast, our LSTM model recorded an overall average error of 103.9 m and an average error of 81.6 m in the pier vicinity area, indicating improved performance in a more constrained port environment. Although the two studies were conducted in different environments, making direct comparison difficult, our research emphasizes its practical contributions to port operations by offering predictions specifically tailored to complex traffic conditions within the port.
The graph in Figure 9 highlights the pier vicinity area in light red, which corresponds to the points marked as pier vicinity area in Table 6. The average error within the pier vicinity area is 81.6 m, notably lower than the overall average distance error of 103.89 m. This suggests that the LSTM model performed more stable and accurate predictions in this hazardous area (pier vicinity area) compared to the entire area. To enhance the reliability of the model, the same performance evaluation steps were conducted for three additional vessels, as demonstrated in this part. The results of these evaluations are included in Appendix A.

6. Conclusions

This study proposed an approach for predicting vessel trajectories in the inner harbor using deep-learning techniques and AIS data. The primary focus was on predicting the trajectories of inbound vessels entering specific piers in the port, which is crucial for traffic flow management and collision prevention in complex port environments. Linear interpolation was employed to enable effective trajectory prediction even with limited AIS data, and additional features, such as destination to pier, vessel type, vessel length, and vessel size, were utilized to improve the model’s accuracy. Five recurrent neural network models, RNN, LSTM, Bi-LSTM, GRU, and Bi-GRU, were trained and evaluated using the preprocessed AIS data. Experiments conducted on a randomly selected representative vessel showed that the LSTM model achieved the best performance, with an MAE of 121.9 m and an RMSE of 130.6 m when the sequence length was 1. Furthermore, this study identified the critical prediction area for VTSO, which is from the point where a vessel deviates from the fairway and enters the “pier vicinity area” until the vessel is considered to have arrived at the pier. Notably, the prediction accuracy in the pier vicinity area was higher compared to other areas. The average error in the pier vicinity area was 81.6 m, approximately 21.4% more accurate than the overall average error of 103.89 m. The proposed approach has the potential to significantly contribute to improving the practical skills of inexperienced VTSO and harbor pilots. By accurately predicting vessel trajectories in the inner harbor, this study provides valuable insights for enhancing the safety and efficiency of vessel traffic management in ports.
Future research directions should focus on enhancing the accuracy and applicability of vessel trajectory prediction models through the following integrated approaches:
(1)
Advanced modeling techniques: Implement State-of-the-Art deep-learning models, such as transformers, to better capture long-term dependencies in complex maritime environments.
(2)
Comprehensive input features: Incorporate berthing side information (port or starboard) into model development to account for trajectory differences based on docking orientation.
(3)
Robust data utilization: Leverage larger, multi-year datasets to capture seasonal variations and long-term trends, improving the model’s predictive capabilities.
(4)
Generalization and validation: Conduct extensive experiments across various ports to ensure the model’s effectiveness in diverse harbor environments.
(5)
Real-world implementation: Perform practical testing of developed algorithms in operational settings to evaluate performance and identify areas for improvement.
By addressing these interconnected aspects, future research can significantly advance the field of vessel trajectory prediction, enhancing maritime safety and operational efficiency.

Author Contributions

Conceptualization, G.-H.S. and H.Y.; Software, G.-H.S.; Validation, G.-H.S.; Formal analysis, G.-H.S. and H.Y.; Investigation, G.-H.S.; Resources, G.-H.S.; Data curation, G.-H.S.; Writing—original draft, G.-H.S.; Writing—review & editing, H.Y.; Visualization, G.-H.S.; Supervision, H.Y.; Project administration, H.Y.; Funding acquisition, H.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Korea Institute of Marine Science & Technology Promotion (KIMST) funded by the Korea Coast Guard (RS2023-00238652, Integrated Satellite-based Applications Development for Korea Coast Guard) and the Ministry of Oceans and Fisheries (20210046/RS-2021-KS211406, Development of marine satellite image analysis application technology).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data available on request due to restrictions eg privacy or ethical. The data presented in this study are available on request from the corresponding author. The data are not publicly available due to privacy concerns.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

Table A1. Performance comparisons for various trajectory prediction methods with a 2 min prediction period (vessel with MMSI number 636******).
Table A1. Performance comparisons for various trajectory prediction methods with a 2 min prediction period (vessel with MMSI number 636******).
MethodsCriteriaSequence Length
1234
RNNMAE (m)283.3295.1387.5488.4
RMSE (m)342.6379.7450.5584.2
LSTMMAE (m)227.2345.4458.2433.7
RMSE (m)256.1351.9499.0518.2
Bi-LSTMMAE (m)247.2289.2488.9508.8
RMSE (m)257.1354.0508.7665.2
GRUMAE (m)241.9308.0435.2396.6
RMSE (m)247.2327.6467.9503.7
Bi-GRUMAE (m)242.3314.5613.4494.4
RMSE (m)266.0373.9664.1620.7
Figure A1. Comparisons for various trajectory prediction methods in various sequence length (vessel with MMSI number 636******).
Figure A1. Comparisons for various trajectory prediction methods in various sequence length (vessel with MMSI number 636******).
Jmse 12 01739 g0a1
Figure A2. Comparison of actual and predicted vessel trajectories using the LSTM method on a satellite image (vessel with MMSI number 636******).
Figure A2. Comparison of actual and predicted vessel trajectories using the LSTM method on a satellite image (vessel with MMSI number 636******).
Jmse 12 01739 g0a2
Figure A3. Distance errors at each trajectory point highlighting the pier vicinity area (vessel with MMSI number 636******).
Figure A3. Distance errors at each trajectory point highlighting the pier vicinity area (vessel with MMSI number 636******).
Jmse 12 01739 g0a3
Table A2. Performance comparisons of various trajectory prediction methods with a 2 min prediction period (vessel with MMSI number 563******).
Table A2. Performance comparisons of various trajectory prediction methods with a 2 min prediction period (vessel with MMSI number 563******).
MethodsCriteriaSequence Length
1234
RNNMAE (m)216.0212.6468.5409.9
RMSE (m)251.7250.0512.7490.4
LSTMMAE (m)131.1229.9347.8480.4
RMSE (m)140.0291.9382.5586.0
Bi-LSTMMAE (m)220.7346.6504.7483.9
RMSE (m)295.2380.2578.0550.9
GRUMAE (m)174.4254.9598.7448.9
RMSE (m)205.8270.5648.0565.4
Bi-GRUMAE (m)156.3299.0477.7480.2
RMSE (m)184.1318.4555.3508.2
Figure A4. Comparisons of various trajectory prediction methods in various sequence length (vessel with MMSI number 563******).
Figure A4. Comparisons of various trajectory prediction methods in various sequence length (vessel with MMSI number 563******).
Jmse 12 01739 g0a4
Figure A5. Comparison of actual and predicted vessel trajectories using the LSTM method on a satellite image (vessel with MMSI number 563******).
Figure A5. Comparison of actual and predicted vessel trajectories using the LSTM method on a satellite image (vessel with MMSI number 563******).
Jmse 12 01739 g0a5
Figure A6. Distance errors at each trajectory point highlighting the pier vicinity area (vessel with MMSI number 563 ******).
Figure A6. Distance errors at each trajectory point highlighting the pier vicinity area (vessel with MMSI number 563 ******).
Jmse 12 01739 g0a6

References

  1. Kaluza, P.; Kölzsch, A.; Gastner, M.T.; Blasius, B. The complex network of global cargo ship movements. J. R. Soc. Interface 2010, 7, 1093–1103. [Google Scholar] [CrossRef] [PubMed]
  2. Van Iperen, E. Detection of hazardous encounters at the North Sea from AIS data. In Proceedings of the International Workshop on Next Generation Nautical Traffic Models, Shanghai, China, 1 October 2012; pp. 1–12. [Google Scholar]
  3. Van Westrenen, F.; Praetorius, G. Maritime traffic management: A need for central coordination. Cogn. Technol. Work 2014, 16, 59–70. [Google Scholar] [CrossRef]
  4. Fang, M.-C.; Tsai, K.-Y.; Fang, C.-C. A Simplified Simulation Model of Ship Navigation for Safety and Collision Avoidance in Heavy Traffic Areas. J. Navig. 2017, 71, 837–860. [Google Scholar] [CrossRef]
  5. Mahata, S.K.; Das, D.; Bandyopadhyay, S. MTil2017: Machine translation using recurrent neural network on statistical machine translation. Int. J. Intell. Syst. 2019, 28, 447–453. [Google Scholar] [CrossRef]
  6. Schuster, M.; Paliwal, K.K. Bidirectional recurrent neural networks. IEEE Trans. Signal Process. 1997, 45, 2673–2681. [Google Scholar] [CrossRef]
  7. Tang, H.; Yin, Y.; Shen, H. A model for vessel trajectory prediction based on long short-term memory neural network. J. Mar. Eng. Technol. 2019, 21, 136–145. [Google Scholar] [CrossRef]
  8. Park, J.; Jeong, J.; Park, Y. Ship Trajectory Prediction Based on Bi-LSTM Using Spectral-Clustered AIS Data. J. Mar. Sci. Eng. 2021, 9, 1037. [Google Scholar] [CrossRef]
  9. Yang, C.H.; Wu, C.H.; Shao, J.C.; Wang, Y.C.; Hsieh, C.M. AIS-Based Intelligent Vessel Trajectory Prediction Using Bi-LSTM. IEEE Access 2022, 10, 35173–35184. [Google Scholar] [CrossRef]
  10. Ma, J.; Jia, C.; Yang, X.; Cheng, X.; Li, W.; Zhang, C. A data-driven approach for collision risk early warning in vessel encounter situations using attention-BiLSTM. IEEE Access 2020, 8, 188771–188783. [Google Scholar] [CrossRef]
  11. Wang, S.; He, Z. A prediction model of vessel trajectory based on generative adversarial network. J. Navig. 2021, 74, 1161–1171. [Google Scholar] [CrossRef]
  12. Li, M.; Li, B.; Qi, Z.; Li, J.; Wu, J. Enhancing Maritime Navigational Safety: Ship Trajectory Prediction Using ACoAtt–LSTM and AIS Data. ISPRS Int. J. Geo-Inf. 2024, 13, 85. [Google Scholar] [CrossRef]
  13. ITU. Recommendation ITU-R M.1371-5. In Technical Characteristics for an Automatic Identification System Using Time Division Multiple Access in the VHF Maritime Mobile Frequency Band; International Telecommunication Union: Geneva, Switzerland, 2014. [Google Scholar]
  14. Harati-Mokhtari, A.; Wall, A.; Brooks, P.; Wang, J. Automatic Identification System (AIS): Data reliability and human error implications. J. Navig. 2007, 60, 373–389. [Google Scholar] [CrossRef]
  15. Iphar, C.; Napoli, A.; Ray, C. Detection of false AIS messages for the improvement of maritime situational awareness. In Proceedings of the OCEANS 2015-Genova, Genoa, Italy, 18–21 May 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 1–7. [Google Scholar]
  16. Elman, J.L. Finding structure in time. Cogn. Sci. 1990, 14, 179–211. [Google Scholar] [CrossRef]
  17. Graves, A. Supervised Sequence Labelling with Recurrent Neural Networks; Springer: Berlin/Heidelberg, Germany, 2012; ISBN 978-3-642-24797-2. [Google Scholar]
  18. Mikolov, T.; Karafiát, M.; Burget, L.; Černocký, J.; Khudanpur, S. Recurrent neural network based language model. In Proceedings of the Eleventh Annual Conference of the International Speech Communication Association, Chiba, Japan, 26–30 September 2010; pp. 1045–1048. [Google Scholar]
  19. Bengio, Y.; Simard, P.; Frasconi, P. Learning long-term dependencies with gradient descent is difficult. IEEE Trans. Neural Netw. 1994, 5, 157–166. [Google Scholar] [CrossRef]
  20. Sutskever, I.; Martens, J.; Hinton, G.E. Generating text with recurrent neural networks. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), Bellevue, WA, USA, 28 June–2 July 2011; pp. 1017–1024. [Google Scholar]
  21. LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef]
  22. Pascanu, R.; Mikolov, T.; Bengio, Y. On the difficulty of training recurrent neural networks. In Proceedings of the 30th International Conference on Machine Learning, Atlanta, GA, USA, 16–21 June 2013; pp. 1310–1318. [Google Scholar]
  23. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
  24. Graves, A.; Schmidhuber, J. Framewise phoneme classification with bidirectional LSTM and other neural network architectures. Neural Netw. 2005, 18, 602–610. [Google Scholar] [CrossRef]
  25. Cho, K.; Van Merriënboer, B.; Gulcehre, C.; Bahdanau, D.; Bougares, F.; Schwenk, H.; Bengio, Y. Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv 2014, arXiv:1406.1078. [Google Scholar]
  26. Chung, J.; Gulcehre, C.; Cho, K.; Bengio, Y. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv 2014, arXiv:1412.3555. [Google Scholar]
  27. Li, Z.; Yang, Y.; Zheng, L.; Ling, Z. Ship trajectory prediction based on bidirectional gated recurrent unit. J. Mar. Sci. Eng. 2021, 9, 422. [Google Scholar] [CrossRef]
  28. Slaughter, I.; Charla, J.L.; Siderius, M.; Lipor, J. Vessel trajectory prediction with recurrent neural networks: An evaluation of datasets, features, and architectures. J. Ocean Eng. Sci. 2023, in press. [Google Scholar] [CrossRef]
  29. Sinnott, R.W. Virtues of the Haversine. Sky Telesc. 1984, 68, 159. [Google Scholar]
  30. Rong, H.; Teixeira, A.P.; Guedes Soares, C. Ship trajectory uncertainty prediction based on a Gaussian Process model. Ocean Eng. 2019, 182, 499–511. [Google Scholar] [CrossRef]
  31. Zhang, X.; Fu, X.; Xiao, Z.; Xu, H.; Qin, Z. Vessel Trajectory Prediction in Maritime Transportation: Current Approaches and Beyond. IEEE Trans. Intell. Transp. Syst. 2022, 23, 17485–17504. [Google Scholar] [CrossRef]
  32. Shukla, S.N.; Marlin, B.M. Interpolation-Prediction Networks for Irregularly Sampled Time Series. arXiv 2019, arXiv:1909.07782. [Google Scholar]
Figure 1. The area of the AIS data used in the study.
Figure 1. The area of the AIS data used in the study.
Jmse 12 01739 g001
Figure 2. Working of basic recurrent neural network (RNN) architecture.
Figure 2. Working of basic recurrent neural network (RNN) architecture.
Jmse 12 01739 g002
Figure 3. Working of Long Short-Term Memory (LSTM) architecture.
Figure 3. Working of Long Short-Term Memory (LSTM) architecture.
Jmse 12 01739 g003
Figure 4. Working of Bidirectional Long Short-Term Memory (Bi-LSTM) architecture.
Figure 4. Working of Bidirectional Long Short-Term Memory (Bi-LSTM) architecture.
Jmse 12 01739 g004
Figure 5. Working of Gated Recurrent Unit (GRU) Architecture.
Figure 5. Working of Gated Recurrent Unit (GRU) Architecture.
Jmse 12 01739 g005
Figure 6. Working of Bidirectional Gated Recurrent Unit (Bi-GRU) architecture.
Figure 6. Working of Bidirectional Gated Recurrent Unit (Bi-GRU) architecture.
Jmse 12 01739 g006
Figure 7. The pier vicinity area on a satellite image.
Figure 7. The pier vicinity area on a satellite image.
Jmse 12 01739 g007
Figure 8. Comparisons of various trajectory prediction methods in various sequence length.
Figure 8. Comparisons of various trajectory prediction methods in various sequence length.
Jmse 12 01739 g008
Figure 9. Comparison of actual and predicted vessel trajectories using the LSTM method on a satellite image.
Figure 9. Comparison of actual and predicted vessel trajectories using the LSTM method on a satellite image.
Jmse 12 01739 g009
Figure 10. Distance errors at each trajectory point highlighting the pier vicinity area.
Figure 10. Distance errors at each trajectory point highlighting the pier vicinity area.
Jmse 12 01739 g010
Table 1. Characteristics of vessels berthing at container terminals pier No.1 to No.4.
Table 1. Characteristics of vessels berthing at container terminals pier No.1 to No.4.
Container Terminal
Pier No. 1Pier No. 2Pier No. 3Pier No. 4
Vessel typeSemi-container vessel
General cargo vessel
Bulk carrier
Full-container vessel
Semi-container vessel
Full-container vessel
General cargo vessel
Full-container vessel
Car carrier
Bulk carrier
Cement carrier
Semi-container vessel
Full-container vessel
General cargo vessel
Navigation areaOcean-goingOcean-goingCoastal/Ocean-goingOcean-going
Gross tonnage (ton)496–52,3208101–24,0531128–51,9174822–71,786
LOA (m)50–200117–18072–19397–294
Number of times berthing4615618142
Table 2. Dynamic AIS information reporting intervals and their correlation with vessel speed and heading changes.
Table 2. Dynamic AIS information reporting intervals and their correlation with vessel speed and heading changes.
Vessel’s Dynamic ConditionsNominal Reporting Interval
Ship at anchor or moored and not moving faster than 3 knots3 min
Ship at anchor or moored and moving faster than 3 knots10 s
Ship 0–14 knots10 s
Ship 0–14 knots and changing course3 1/3 s
Ship 14–23 knots6 s
Ship 14–23 knots and changing course2 s
Ship > 23 knots2 s
Ship > 23 knots and changing course2 s
Table 3. Experimental platform and environment.
Table 3. Experimental platform and environment.
CategoryDetails
CPU AMD Ryzen 5 2600 Six-Core Processor 3.40 GHz
GPU NVIDIA Geforce RTX 3060 Dual OC D6 12 GB
RAM 16 GB
Language Python 3.8.18
Operating systemWindows 10 × 64
Deep-learning framework Tensorflow 2.10.0
Table 4. Hyperparameters for model training.
Table 4. Hyperparameters for model training.
HyperparameterValue
Units64
Drop rate0.2
Batch size8192
Epochs1000
Optimizer Adam
Loss function Mean Squared Error
Activation function
(Dense layer)
ReLU
Table 5. Performance comparisons for various trajectory prediction methods with a 2 min prediction period.
Table 5. Performance comparisons for various trajectory prediction methods with a 2 min prediction period.
MethodsCriteriaSequence Length
1234
RNNMAE (m)409.9571.5566.4602.2
RMSE (m)487.9708.5714.3696.1
LSTMMAE (m)121.9429.5453.3555.1
RMSE (m)130.6465.0564.8579.3
Bi-LSTMMAE (m)258.7507.0565.7695.4
RMSE (m)277.9528.6640.5772.1
GRUMAE (m)258.9519.4383.1685.9
RMSE (m)322.8540.6462.9745.6
Bi-GRUMAE (m)188.2474.8464.2830.9
RMSE (m)211.2638.9526.1900.4
Table 6. Distance errors at each trajectory point and average errors for the overall trajectory and the pier vicinity area.
Table 6. Distance errors at each trajectory point and average errors for the overall trajectory and the pier vicinity area.
Trajectory PointDistance Error (m)
Point 1 121.0
Point 2 153.7
Point 3 (pier vicinity area) 59.5
Point 4 (pier vicinity area) 111.4
Point 5 (pier vicinity area) 73.8
Avg. (overall) 103.9
Avg. (pier vicinity area) 81.6
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

Shin, G.-H.; Yang, H. Vessel Trajectory Prediction at Inner Harbor Based on Deep Learning Using AIS Data. J. Mar. Sci. Eng. 2024, 12, 1739. https://doi.org/10.3390/jmse12101739

AMA Style

Shin G-H, Yang H. Vessel Trajectory Prediction at Inner Harbor Based on Deep Learning Using AIS Data. Journal of Marine Science and Engineering. 2024; 12(10):1739. https://doi.org/10.3390/jmse12101739

Chicago/Turabian Style

Shin, Gil-Ho, and Hyun Yang. 2024. "Vessel Trajectory Prediction at Inner Harbor Based on Deep Learning Using AIS Data" Journal of Marine Science and Engineering 12, no. 10: 1739. https://doi.org/10.3390/jmse12101739

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