Vessel Trajectory Prediction at Inner Harbor Based on Deep Learning Using AIS Data
Abstract
:1. Introduction
2. Literature Review
3. Data Collection and Preprocessing
3.1. Data Collection
3.2. Data Preprocessing
4. Methodology
4.1. Recurrent Neural Network (RNN)
4.2. Long Short-Term Memory (LSTM)
4.3. Gated Recurrent Unit (GRU)
4.4. Proposed Model Architecture and Training Process
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) |
4.5. Testing Procedure and Performance Evaluation Metrics
5. Results and Discussion
5.1. Identification of the Critical Prediction Area for VTSO
5.2. Performance Evaluation of Trajectory Prediction Models for a Representative Vessel
- (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).
- (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.
6. Conclusions
- (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.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Appendix A
Methods | Criteria | Sequence Length | |||
---|---|---|---|---|---|
1 | 2 | 3 | 4 | ||
RNN | MAE (m) | 283.3 | 295.1 | 387.5 | 488.4 |
RMSE (m) | 342.6 | 379.7 | 450.5 | 584.2 | |
LSTM | MAE (m) | 227.2 | 345.4 | 458.2 | 433.7 |
RMSE (m) | 256.1 | 351.9 | 499.0 | 518.2 | |
Bi-LSTM | MAE (m) | 247.2 | 289.2 | 488.9 | 508.8 |
RMSE (m) | 257.1 | 354.0 | 508.7 | 665.2 | |
GRU | MAE (m) | 241.9 | 308.0 | 435.2 | 396.6 |
RMSE (m) | 247.2 | 327.6 | 467.9 | 503.7 | |
Bi-GRU | MAE (m) | 242.3 | 314.5 | 613.4 | 494.4 |
RMSE (m) | 266.0 | 373.9 | 664.1 | 620.7 |
Methods | Criteria | Sequence Length | |||
---|---|---|---|---|---|
1 | 2 | 3 | 4 | ||
RNN | MAE (m) | 216.0 | 212.6 | 468.5 | 409.9 |
RMSE (m) | 251.7 | 250.0 | 512.7 | 490.4 | |
LSTM | MAE (m) | 131.1 | 229.9 | 347.8 | 480.4 |
RMSE (m) | 140.0 | 291.9 | 382.5 | 586.0 | |
Bi-LSTM | MAE (m) | 220.7 | 346.6 | 504.7 | 483.9 |
RMSE (m) | 295.2 | 380.2 | 578.0 | 550.9 | |
GRU | MAE (m) | 174.4 | 254.9 | 598.7 | 448.9 |
RMSE (m) | 205.8 | 270.5 | 648.0 | 565.4 | |
Bi-GRU | MAE (m) | 156.3 | 299.0 | 477.7 | 480.2 |
RMSE (m) | 184.1 | 318.4 | 555.3 | 508.2 |
References
- 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]
- 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]
- Van Westrenen, F.; Praetorius, G. Maritime traffic management: A need for central coordination. Cogn. Technol. Work 2014, 16, 59–70. [Google Scholar] [CrossRef]
- 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]
- 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]
- Schuster, M.; Paliwal, K.K. Bidirectional recurrent neural networks. IEEE Trans. Signal Process. 1997, 45, 2673–2681. [Google Scholar] [CrossRef]
- 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]
- 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]
- 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]
- 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]
- Wang, S.; He, Z. A prediction model of vessel trajectory based on generative adversarial network. J. Navig. 2021, 74, 1161–1171. [Google Scholar] [CrossRef]
- 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]
- 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]
- 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]
- 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]
- Elman, J.L. Finding structure in time. Cogn. Sci. 1990, 14, 179–211. [Google Scholar] [CrossRef]
- Graves, A. Supervised Sequence Labelling with Recurrent Neural Networks; Springer: Berlin/Heidelberg, Germany, 2012; ISBN 978-3-642-24797-2. [Google Scholar]
- 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]
- 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]
- 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]
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef]
- 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]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Graves, A.; Schmidhuber, J. Framewise phoneme classification with bidirectional LSTM and other neural network architectures. Neural Netw. 2005, 18, 602–610. [Google Scholar] [CrossRef]
- 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]
- 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]
- 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]
- 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]
- Sinnott, R.W. Virtues of the Haversine. Sky Telesc. 1984, 68, 159. [Google Scholar]
- 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]
- 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]
- Shukla, S.N.; Marlin, B.M. Interpolation-Prediction Networks for Irregularly Sampled Time Series. arXiv 2019, arXiv:1909.07782. [Google Scholar]
Container Terminal | ||||
---|---|---|---|---|
Pier No. 1 | Pier No. 2 | Pier No. 3 | Pier No. 4 | |
Vessel type | Semi-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 area | Ocean-going | Ocean-going | Coastal/Ocean-going | Ocean-going |
Gross tonnage (ton) | 496–52,320 | 8101–24,053 | 1128–51,917 | 4822–71,786 |
LOA (m) | 50–200 | 117–180 | 72–193 | 97–294 |
Number of times berthing | 46 | 156 | 18 | 142 |
Vessel’s Dynamic Conditions | Nominal Reporting Interval |
---|---|
Ship at anchor or moored and not moving faster than 3 knots | 3 min |
Ship at anchor or moored and moving faster than 3 knots | 10 s |
Ship 0–14 knots | 10 s |
Ship 0–14 knots and changing course | 3 1/3 s |
Ship 14–23 knots | 6 s |
Ship 14–23 knots and changing course | 2 s |
Ship > 23 knots | 2 s |
Ship > 23 knots and changing course | 2 s |
Category | Details |
---|---|
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 system | Windows 10 × 64 |
Deep-learning framework | Tensorflow 2.10.0 |
Hyperparameter | Value |
---|---|
Units | 64 |
Drop rate | 0.2 |
Batch size | 8192 |
Epochs | 1000 |
Optimizer | Adam |
Loss function | Mean Squared Error |
Activation function (Dense layer) | ReLU |
Methods | Criteria | Sequence Length | |||
---|---|---|---|---|---|
1 | 2 | 3 | 4 | ||
RNN | MAE (m) | 409.9 | 571.5 | 566.4 | 602.2 |
RMSE (m) | 487.9 | 708.5 | 714.3 | 696.1 | |
LSTM | MAE (m) | 121.9 | 429.5 | 453.3 | 555.1 |
RMSE (m) | 130.6 | 465.0 | 564.8 | 579.3 | |
Bi-LSTM | MAE (m) | 258.7 | 507.0 | 565.7 | 695.4 |
RMSE (m) | 277.9 | 528.6 | 640.5 | 772.1 | |
GRU | MAE (m) | 258.9 | 519.4 | 383.1 | 685.9 |
RMSE (m) | 322.8 | 540.6 | 462.9 | 745.6 | |
Bi-GRU | MAE (m) | 188.2 | 474.8 | 464.2 | 830.9 |
RMSE (m) | 211.2 | 638.9 | 526.1 | 900.4 |
Trajectory Point | Distance 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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
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
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 StyleShin, 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
APA StyleShin, G. -H., & Yang, H. (2024). Vessel Trajectory Prediction at Inner Harbor Based on Deep Learning Using AIS Data. Journal of Marine Science and Engineering, 12(10), 1739. https://doi.org/10.3390/jmse12101739