Next Article in Journal
Mean Drift Wave Forces on Arrays of Bodies Surrounded by Thin Porous Surfaces
Previous Article in Journal
Effects of Quartz Precipitation on the Abundance and Preservation of Organic Matter Pores in Cambrian Marine Shale in South China
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Research into Ship Trajectory Prediction Based on An Improved LSTM Network

1
Faculty of Information Science and Engineering, Ocean University of China, Qingdao 266100, China
2
Network Information Management Office, Qingdao Agricultural University, Qingdao 266109, China
3
North China Sea Data and Information Service of State Oceanic Administration, Qingdao 266061, China
*
Author to whom correspondence should be addressed.
J. Mar. Sci. Eng. 2023, 11(7), 1268; https://doi.org/10.3390/jmse11071268
Submission received: 9 May 2023 / Revised: 14 June 2023 / Accepted: 21 June 2023 / Published: 22 June 2023
(This article belongs to the Section Ocean Engineering)

Abstract

:
The establishment of ship trajectory prediction is critical in analyzing trajectory data. It serves as a critical reference point for identifying abnormal behavior and potential collision risks for ships. Accurate and real-time ship trajectory prediction is essential during navigation. Since the timing of automatic identification system (AIS) data is irregular, traditional methods usually use time calibration to simulate the data of uniform sequencing before analysis. Inevitably, this increases the chances of error and time delays. To address this issue, we propose a time-aware LSTM (T-LSTM) single-ship trajectory model combined with the generative adversarial network (GAN) to predict multiple ship trajectories. These analysis methods are capable of directly analyzing AIS data and have demonstrated better performance in both single-ship and multi-ship trajectories. Our experimental results show that the proposed method achieves high accuracy and can meet the practical navigation requirements of ships.

1. Introduction

As maritime activities become increasingly complex, the management of maritime traffic and the protection of maritime infrastructure face serious challenges. The complex navigational environment poses potential obstacles and challenges to the stable development of the maritime shipping industry [1,2,3,4,5]. Ship trajectory prediction can provide reliable data support to ensure the safety and efficiency of maritime traffic management and the protection of offshore infrastructure. By utilizing advanced prediction models, maritime authorities can identify potential risks and take precautionary measures to avoid accidents. In response to the problem of ship trajectory prediction, many scholars have conducted relevant research. For example, John Smith [6] proposed a method for vessel trajectory prediction using recurrent encoder–decoder networks and uncertainty estimation. This method handles the temporal characteristics of vessel trajectory data by effectively capturing long-term dependencies and dynamic patterns in the trajectory data using recurrent encoder–decoder networks. It also introduces uncertainty estimations, providing confidence estimates for the prediction results, which is particularly important in complex and uncertain environments. Yang et al. [7] proposed an ECA-BIGRU ship-track-prediction algorithm. The algorithm is based on the BiGRU model and uses the ECA attention mechanism to optimize the algorithm, which realizes the ship-track prediction. The experiment uses Beidou data to predict the trajectory of 112 ships running continuously for 20 days, and obtains a higher real-time and more accurate trajectory prediction effect than BiGRU and LSTM algorithms. Liu et al. [8] proposed a spatiotemporal multi-graph convolutional network method for ship trajectory prediction based on the mobile edge computing paradigm. This method integrates the data on the nearest time of the ship and proposes an attention mechanism to improve feature-extraction efficiency, thereby realizing the fusion data trajectory prediction. Yang et al. [9] proposed a Bi-LSTM for ais-based intelligent vessel trajectory prediction. In this method, AIS data are cleaned using a moving average model and standardized to form uniformly distributed time series data. The algorithm adds a layer of bidirectional LSTM on the basis of the Bi-LSTM network structure, and then realizes the ship trajectory prediction using the cleaned AIS data. Murray B. et al. [10] proposed an automatic ship-trajectory-prediction method based on the clustering of single-point neighborhood search and multi-trajectory extraction. The data-driven method used historical AIS data within a time range of 5–30 min to predict ship trajectories and estimated ship trajectory paths through multi-trajectory extraction methods. Capobianco S. et al. [11] proposed an encoder–decoder-based recurrent neural network method for ship-trajectory prediction, which analyzes historical AIS data and learns maritime ship trajectory patterns and trajectory distributions. An attention-based aggregation layer is used to connect the encoder and decoder networks, which more effectively captures spatiotemporal dependencies in the data, resulting in improved prediction accuracy. Kanazawa M. et al. [12] proposed a ship trajectory prediction method based on a multi-output hybrid predictor (MHP). The method utilizes onboard sensor data and combines black box error compensation with an LSTM neural network to form a multi-output hybrid prediction method, which can predict ship positions 30 s after. Despite achieving good prediction results, precise predictions remain a challenging task for these methods. First, these methods either use regular ship trajectory data or require data processing and have a limited ability to handle irregular data types. Interpolation and standard model are used to predict ship irregularity data, which may not accurately reflect the real-time trajectories of ships and impact the analysis results. Additionally, pre-processing depending on the size of the dataset can take a significant amount of time, further delaying the analysis. Then, the trajectory trajectory of multiple targets needs to be considered in the case of multiple ships, which will increase the difficulty and complexity of the prediction. The current research is mainly focused on the trajectory of a single ship, and there are few studies on the analysis and prediction of the simultaneous trajectory of multiple ships. This article uses deep learning methods to analyze and study the trajectory of a single ship and multiple ships. For the single ship, a T-LSTM method is proposed by introducing time awareness to process data with different time intervals, which can realize the direct analysis and prediction of the raw AIS data. The T-LSTM unit can effectively process the time difference between the continuous AIS data points through the time-aware module that integrates the time, thereby capturing the time of the ship’s trajectory. This enables the T-LSTM model to learn the dependence of various data information, such as latitude, speed, direction, and time interval, and adjust its predictions to changes in time and space. For multiple ships, the combination of a double-layered LTSM with adversarial neural networks, using multiple T-LSTM as input for data processing, has achieved simultaneous prediction of multiple ship trajectories. The GAN’s generator uses a layer of multi-dimensional T-LSTM to process the original AIS data, which corresponds to a layer of multi-dimensional LSTM to predict ship trajectories. The discriminator learned the relative position relationship of the real-time trajectories of multiple ships by fighting training, making the prediction of multiple ship trajectories more accurate.
The main contributions of this paper are as follows:
  • A novel time-aware T-LSTM neural network architecture is proposed, which solves the problem that traditional network methods cannot directly analyze the original data. This method integrates time interval information to make the ship’s trajectory prediction analysis more accurate.
  • A GAN neural network model with the T-LSTM model is proposed, which can effectively achieve multiple ship trajectory predictions. The model adopts the method of individual predictions to fully consider the relative position relationship of the more ship trajectories at the same time, making the prediction results more accurate.

2. Materials and Methods

2.1. LSTM Algorithm

Long short-term memory (LSTM) is a type of recurrent neural network (RNN) model with gate mechanisms that can effectively solve the problem of gradient vanishing/exploding [13,14,15]. The traditional RNN model achieves information transmission and processing by recursively updating the hidden state. However, the backpropagation of the model has problems, which can easily result in vanishing or exploding gradients, making the model difficult to train. The LSTM model introduces the concepts of input gate, forget gate, and output gate to address this issue. The core component of the LSTM model is the LSTM unit, whose structure is shown in Figure 1. The input gate and forget gate control the input and forgetting of the information, while the output gate controls the output of information [16,17,18,19]. These gates include parameters such as weights and biases, which are learned through the backpropagation process to solve these problems. LSTM models have been widely used in natural language processing, speech recognition, and image recognition, and have become one of the most prominent models in the field of deep learning [20,21].

2.2. Single-Ship Trajectory Prediction Algorithm

In the Automatic Identification System, each ship device sends AIS messages at regular time intervals, which contain basic information, navigation status, and ship position, forming a time series of ship trajectory data [22,23,24]. The time records of ship trajectory data are unevenly distributed, with time intervals ranging from several tens of minutes to a few minutes. The irregularity between adjacent data points can directly affect the speed and position prediction of ship trajectories.
The standard LSTM unit consists of a forget gate, input gate, output gate, and memory cells. It assumes that the time between sequence elements is uniformly distributed and cannot handle irregular time series. For ship trajectory tasks, the time interval between two consecutive AIS messages is an important factor affecting the prediction results. Therefore, we propose a time-aware LSTM (T-LSTM) neural network structure, and its network architecture is shown in Figure 2.

2.3. T-LSTM Unit

The T-LSTM unit decomposes the process of a time step into a long-term memory and a short-term memory. Short-term memory encodes the past status in a short period of time to capture short-term changes in ship navigation. Long-term memory encodes the status of a long period of time to capture the overall trend of changes in the ship’s navigation. The core task of T-LSTM is to introduce a time-aware module to process time-interval variable data. The time difference weight generated by the module will be integrated into the input gate structure, directly affecting the short-term memory of T-LSTM. The update of long-term memory depends on the short-term memory of each time step, and the weight of time can indirectly affect long-term memory. The detailed mathematical expression of the T-LSTM unit is as follows:
f t = σ ( W f x t + U f h t 1 + b f ) ( forget   gate )
i t = σ ( W i x t + U i h t 1 + b i ) ( input   gate )
o t = σ ( W o x t + U o h t 1 + b o ) ( output   gate )
C t ˜ = tan   h ( W c x t + U c h t 1 + b c ) ( time   memory )
h ˜ t = C t ˜ + i t   ( hidden   features )
x t   trepresents the input to the current hidden layer, h t 1 represents the previous time step Information, W f , U f , b f , W i , U i , b i , W o , U o , b o   and   W c , U c , b c are the network parameters for the forget gate, input gate, output gate, and candidate memory. If there is a large time gap between time step t and t−1, this indicates that the ship has not recorded new information for a long period of time. The short-term memory of the output at the current time step should not be overly dependent on the current status, but needs to be adjusted proportionally to the time span between time steps t and t−1. The formula is as follows:
h t S = tanh ( W d h ˜ t + b d ) ( current   status   information )
h ^ t S = h t S × D t ( weighted   current   state )
h t 1 t = h ˜ t h t S ( the   previous   time   step   information )
h t * = h t 1 t + h ^ t S ( long - term   memory )
W d ,   b d is the network parameter. The input candidate value of the current time step depends on the short-term memory of the previous time step and the information input of the current time step. When adjusting the received information of input candidate values, the information retained in the short-term memory of the previous time step should not be affected. The current state information h t S from the input candidate is extracted and the information h t 1 t from the previous time step is separated. The current status information is weighted and fused with the time difference weight to obtain the weighted state information h ^ t S . Short-term memory h t * is obtained by reintegrating separated h t 1 t and h ^ t S . The hidden status output at the current time step and the update of the long-term memory is formulated as follows:
C t = tanh ( h t * + o t C t 1 ) ( long - term   memory )
h t = o t tanh ( C t ) ( current   hidden   status )
C t 1 is the memory cell from the previous time step. The time difference weight helps to maintain the validity of short-term memory; therefore, T-LSTM can more accurately reflect the importance and changing trend of historical information.

2.4. The Time-Aware Module

In ship trajectory data, the time interval between adjacent time steps can be highly irregular. For example, the time interval between several times receiving AIS data from the base station may be several seconds, several minutes, or even tens of minutes. When the time interval between adjacent time steps is too large, the output of the current time step should not be overly dependent on the current status, and the signal strength of the current time step input should be reduced. The time-aware module can effectively capture the information on hidden features in the data of irregular time series, and the structure is shown in Figure 3.
The main components of the attention layer structure are used to extract features from the input time step sequence, mapping them to a status that can correctly reflect the degree of influence of the time step on the T-LSTM unit. Firstly, a linear normalization is applied to the input time interval sequence   Δ T = Δ t 1 , Δ t 2 , , Δ t n :
Δ t = Δ t min ( Δ T ) max ( Δ T ) min ( Δ T ) ( linear   normalization )
Then, a decay function is constructed to balance the impact of excessively long or short time intervals on the T-LSTM unit output. Specifically, when the time interval is long, the long-term and short-term memory information from the previous time step is attenuated, and when the time interval is short, the long-term and short-term memory information from the previous time step is preserved. The formula for the decay function is as follows:
g ( x ) = 1 log ( e + Δ t ) ( decay   function )
Δ t = g ( Δ t ) ( Balance   Interval )
g x is an attenuation function that reduces the impact of short-term memory as time increases; e represents the natural number; Δt is the time interval between two ship trajectory points. Finally, multiple convolutional layers perform deep feature extraction on the balanced time interval sequence to obtain time difference weights that can accurately reflect the strength of the input signal.

2.5. The Multiple Ship Trajectory Prediction Algorithm

Multi-ship trajectory analysis refers to the analysis and prediction of the trajectory trajectories, speeds, headings, and other information of multiple ships. This paper proposes a new method that integrates the generative adversarial network (GAN) and time-aware LSTM model for this purpose, as shown in Figure 4. GAN consists of a generator network and a discriminator network: the generator network generates simulated data, while the discriminator network determines whether the input data are real or generated [24,25]. The generator network is continuously optimized to confuse the discriminator network, while the discriminator network is simultaneously optimized to accurately identify generated data and real data.
When predicting multiple ship trajectories simultaneously, the beats of the time series presented by the AIS message data of multiple ships are inconsistent, resulting in the loss of practical significance of the predicted data points. The commonly used method proposed by researchers is to interpolate or shift the trajectory points with different timestamps to align all the trajectory points in time. It is only necessary to align the last time step of the time series for all ships in the time dimension, which minimizes errors and ensures the authenticity of the data.
First, assume, in a ship track label sequence X = x 1 , x 2 , , x i , , x n Y = y 1 , y 2 , , y i , , y n ,   X represents the longitude coordinate sequence and Y represents the latitude coordinate sequence. In the latest message, the information on all ships is received by the base station the ship whose message sending time T is located in the median of all ships is selected as the benchmark. The time difference between the base station’s latest reception of the other ship’s message-sending time and the reference ship’s time is Δ t = T t n .
Let   R i = x i x i 1 , y i y i 1   ;   R i is the displacement vector, and R i is the algebraic value of the displacement vector. To reflect the size and direction of the displacement vector, the sine and cosine values R i and X of the angle between the displacement vector cos R i , i and sin R i , i represent the direction of the displacement R i ; v i is the velocity of the ship at the i-th time step. The turning rate and angle of the route are the average of the last two time steps. The iterative formula of latitude and longitude coordinates of track points after regularization is as follows:
x i = x i 1 + R i cos R i , i 2 Δ t ( t i t i 1 ) y i = y i 1 + R i sin R i , i 2 Δ t T ( t i t i 1 ) v i = v i 1 + Δ t ( v i v i 1 ) ( t i t i 1 ) d v i = d v i 1 + Δ t ( d v i d v i 1 ) ( t i t i 1 ) d i = d i 1 + Δ t ( d i d i 1 ) ( t i t i 1 )
This paper uses two-layer multi-dimensional T-LSTM and LSTM networks to generate ship trajectory information instead of generating simulated data. First, the input data are input into the multidimensional T-LSTM to encode the trajectory features of the ship, and the output of each time step is combined in a sequential feature sequence H = h 1 , h 2 , , h n . Then, the temporal feature H is input into a multi-dimensional LSTM, and LSTM will decode to generate the trajectory sequence of the ship. Through the interaction between T-LSTM and LSTM, the input data are abstracted and feature-extracted. At the same time, the error of single-layer LSTM is reduced through the weighted average operation, and the robustness and generalization of the model are improved. Ideally, the data generated by the generation network should be accurate and regular, and the discriminant network uses one-dimensional convolution to extract and distinguish the trajectory information features generated by the generation network. When the traditional GAN trains the network, all loss calculations are performed at the output of the discriminator. The output of the discriminator is usually a true/false judgment of the input data. Generally, the binary cross-entropy function is used to calculate the overall loss. The definition of the loss function is as follows:
min G   max D   E x ~ p d a t a [ log D ( x ) ] + E z ~ p x [ log ( 1 D ( G ( z ) ) ) ]
During the training process of GAN, many difficulties are posed, such as training instability, mode collapse, gradient disappearance, gradient explosion, and other problems. When training GAN, the pre-training strategy is used to pre-train the generator and the discriminator separately, and then joint training is performed. This strategy helps to improve the stability and convergence speed of the model and solves common problems in GAN training.

3. Experimental Data Sets and Result Analysis

3.1. Experimental Data Sets

This article uses the AIS data sets of ships in the Bohai Sea area, which contain 5000-time series information, each with 40 multidimensional trajectory data of different time steps. In the single ship-trajectory task, we save the first 30-point trajectory data of each time series without processing and use the sliding window difference method to interpolate the last 10 data points to obtain 10 data with a fixed time interval of three minutes as real data. In the multi-ship trajectory task, GAN performs a trajectory analysis on ten-time series at the same time. We keep the first 29 trajectory data without processing, and the 30th trajectory data are calibrated according to the method proposed in Section 2.5. The sliding window difference method is used to interpolate the data with a time interval of three minutes for the last 10 data as the real data of the current sample. During the experimental test, we used 70% of each set of data as a training set, 20% as a test set, and 10% as a validation set.

3.2. Experimental Results and Analysis

In this research, we thoroughly evaluated a variety of deep learning models to solve the problem of single-ship-trajectory prediction, including LTSM, RNN, PhasedLSTM, Temporal Conv Net (TCN), Gated Recurrent Unit (GRU), and T-LSTM. We use the same data set to train 50 batches and the loss effect is shown in Figure 5. We found that the loss functions of LTSM, RNN, and PhasedLSTM methods do not converge; TCN, GRU, and T-LSTM can converge. This means that LTSM, RNN, and PhasedLSTM cannot deal with irregular data, but TCN, GRU, and the T-LTSM method can handle irregular data. Compared with other new methods, the convergence speed of T-LSTM is fast, the losses of the average square error are the lowest, and the performance of the network model is the best.
The evaluation criteria of the model are mean square error (MSE) [26] and dynamic time warping (DTW) [27]. MSE is used to measure the average value of predicting trajectory information and the true value of the sample; DTW is used to measure the similarity between the predicted trajectory and the real trajectory [28]. We used DTW to compare the similarity of time series. The experiment analyzes the predictive effect of the model from the longitude, latitude, speed, direction, and turning rate dimension, and the results are shown in Table 1.
After comparing the predictive results of the calibration and actual data, it was found that the prediction errors of the three models were within an acceptable range. The T-LSTM model stood out, with lower equity errors in predicting various ship-trajectory data, higher prediction accuracy, and the ability to accurately capture the characteristics of irregular data. Moreover, it was found that the T-LSTM predictive trajectory had the lowest DTW distance compared to the real trajectory, indicating a similar shape and changing trend. The model could accurately capture the significant changes in the real trajectory while maintaining a higher level of accuracy when predicting the trajectory. Although the GRU and TCN models also performed well, the DTW distance between their predictive and real trajectories was considerably higher, leading to greater deviation at multiple steps. The T-LSTM model’s predictive ability regarding the trend of the ship’s track trajectory was considerably more accurate, and its overall predictive effect on ship trajectory outperformed that of GRU and TCN.
The critical parts of the proposed method add a new time interval variable Δt and introduce the time-aware module. To evaluate the effectiveness of the T-LSTM component, we conducted a series of ablation studies, and the results are shown in Table 2. These experiments showed that increasing the time interval variables and time perception modules enabled our model to process irregular data and improve prediction accuracy.
To illustrate the generalization ability of various hidden-layer dimensions, the number of T-LSTM’s hidden layers was set as 10, 15, 20 and 25. The testing effect is shown in Figure 6. Since changing the total number of input time steps would affect the number of parameters, calculation time, and the memory consumption of the model, the number of parameters of the linear layer in the T-LSTM input gate, forget gate and output gate were appropriately increased when dealing with short time steps to evaluate its performance. The Adam optimizer was selected as the training optimizer and the training cycle was 120. The learning rate was initially set at 0.01, which was reduced to half of the original rate every 40 times.
Generally speaking, increasing the hidden layer of LSTM can enhance the memory capacity of the model and better learn the laws and relationships in the sequence data. However, it may also cause a certain degree of overfitting. It can be seen from Figure 6 that as the number of hidden layers decreases, the convergence speed becomes faster. This indicates that the model is more stable when the number of hidden layers is small. When the hidden layer is set to 10, the learning ability of T-LSTM is limited, but it shows higher accuracy. This shows that fewer hidden layers allow for the model to pay more attention to the global model and the overall trends in the data, rather than overpaying attention to local details and noises. Therefore, the T-LSTM was set as having 10 hidden layers.
In this research, representative sea area data were selected to test the T-LSTM model under various trajectory conditions, such as straight sailing, zigzagging sailing, turning, and turning around; the test effect is shown in Figure 7. The experimental results show that the T-LSTM model has an excellent performance in the four tasks, particularly in the straight task, where its prediction accuracy is remarkably high. The prediction accuracy of the T-LSTM model can maintain a certain level of accuracy, even in the case of the ship’s fast turning, which can effectively capture the ship’s trajectory characteristics. These results show that the T-LSTM model has good application prospects and can provide an effective solution for ship-trajectory prediction, making a significant contribution to the development of related fields.
In order to test the effect of the model, multiple test sets were used for testing, and the error results are shown in Table 3. Overall, T-LSTM performed well in predicting the latitude and longitude position of ships, with an average deviation of 0.00021 and 0.00014. In terms of speed and turning rate prediction, the error value was compared with the value of the experimental data, and the actual proportion of the error was also small. Due to the irregularities in time intervals, there was a certain error in the prediction of T-LSTM for the direction angle, but this remained at a lower level. The prediction errors of the trajectory characteristics of ship trajectory, latitude, turning speed, and speed of forecasting, latitude, turning speed, and speed were within the acceptable range. The accuracy of the prediction results could meet the needs of the actual application.
In addition to the previous sea area dataset, data from another sea area were also selected to test the T-LSTM model. The predicted data and the original data in the dataset were analyzed and compared. The results, presented in Figure 8, show that the T-LSTM model’s predicted trajectory is consistent with the track of the actual irregular data, indicating its ability to accurately predict ship trajectories in various sea areas. This further demonstrates the strong performance of the T-LSTM model and its potential practical applications in ship-trajectory prediction.
In the research on multi-ship trajectories, the generative adversarial network (GAN) was adopted, which used multi-dimensional T-LSTM and LSTM as generators to generate multi-time step trajectory sequences in line with reality. In contrast, a convolutional neural network (CNN) was adopted as a discriminator to judge whether the generated trajectory was natural and regular. Before training the GAN, the generator and discriminator were pre-trained, followed by joint training. In the experiment, it was found that generator losses began to rise, and discriminator losses began to fall at around batch 500. Around the 600th batch, the two reached an approximate balance and eventually converged to a fair value, with the loss effect shown in Figure 9. This indicates that the discriminator can no longer accurately identify the difference between generated sequences and natural sequences, while the generator can accurately generate actual trajectory sequences.
During the model testing phase, areas No. 1–4 from the Bohai Sea were divided into test sites and various ships of different sizes, including small, medium, and large ships, were selected as experimental objects. To predict the simultaneous trajectory of multiple ships, the GAN model was employed, and its accuracy and reliability were evaluated using the DTW and MSE indicators. The results of the experiments are presented in Table 4. It was discovered that the predictive accuracy of the GAN model for different types of ships was different. The predictiveness of large ships was higher, and the prediction accuracy of small ships was relatively low due to the more intricate trajectory characteristics of small ships. Additionally, the GAN model exhibited dissimilar prediction accuracies in various seas due to the diverse trajectory characteristics in different seas, leading to fluctuations in the GAN model’s predictive accuracy. Our analysis revealed that the GAN model demonstrated high accuracy and reliability across different types of ships and sea environments.
Furthermore, to thoroughly evaluate the versatility and reliability of the GAN model, data obtained from another sea region were used to test the model’s predictions. The simultaneous prediction results of multiple ships by the GAN model are shown in Figure 10. The green star point represents the input data at the last moment after space–time calibration, while the increasing number of prediction points indicates the time offset based on the green star in minutes. Our experimental results demonstrated that the GAN model could accurately predict the relative position information of multiple ships in a multi-ship prediction task. The predicted results were reliable and versatile, suggesting that the GAN model could be successfully utilized in various practical applications.
In this article, ship trajectories were tested using the original AIS data. Whether a single-ship trajectory or multi-ship trajectory at the same time, this model could capture the latitude, speed, direction, and steering information of the ship’s trajectory by point. The data predicted by the model were compared with the corrected data and the original data, respectively. Combined with the trajectory of the ship’s trajectory, it is concluded that this model has high predictive accuracy. This article used different data for the robust test of the T-LSTM and GAN, and the method also achieved a good experimental effect.

4. Discussion and Conclusions

According to the characteristics of AIS data, this paper proposes a method for the real-time prediction of ship trajectory. For the trajectory of a single ship, a time-aware T-LTSM neural network method was designed. Compared with the traditional LTSM, this method adds a new variable, time interval input, and introduces a time-aware module. T-LSTM uses the time perception module to process the time step-long data, which determines the effects of the time interval on the T-LTSM unit of each layer, and then realizes the direct use of irregular data. T-LSTM uses the time-aware module to process the time step-long data, which determines the effects of the time interval on the T-LTSM unit of each layer, and then realizes the direct use of irregular data. By comparing the error of the predictive values and real navigation data, the T-LSTM model is shown to be able to resolve the defects that traditional LSTM and RNN cannot handle irregular data, and their prediction accuracy is higher than that of GRU and TCN. For the trajectory of multiple ships, this paper proposes a prediction method based on the GAN. The generator part uses the double-layer structure of T-LSTM and LTSM to predict the ship data and obtain the relative position relationship of the ship by the confrontation of learning network parameters. It can be seen from the trajectory diagram of the experimental prediction that the GAN model can predict multiple shipments at the same time and the prediction effect is good. By demonstrating the effectiveness of the ship-trajectory models designed in this paper, this study contributes to the advancement of a technology that can improve the efficiency and accuracy of maritime transportation, promoting the effects of maritime traffic management and infrastructure protection.
In future research, we will select the practical applications of multi-source fusion data such as radar, AIS and Beidou in the detection of abnormal ship behavior. The algorithm will directly predict the trajectory of a ship according to the original fusion data input, and overcome the limitations of current single-source ship data technology. At present, abnormal-behavior detection based on multi-source fusion data has not been included in the literature, so the proposed algorithm is expected to further improve the prediction accuracy of ship trajectory. In addition, to further improve the performance of the algorithm, expanding the impact of AIS data sets would be considered to reduce interpolation. The prediction accuracy of the T-LSTM can continue to be improved. Next, optimization algorithms will be used to further optimize the parameters of the T-LSTM model to improve the predictive accuracy of the ship’s trajectory values.

Author Contributions

J.Z. and J.D. conceived the review and designed its outline; J.D. wrote the Introduction, Discussion, and Conclusion sections; H.W. provided the hardware equipment and relevant experimental environment; Y.L. tested the experimental model; F.C. and Z.L. provided the experimental data and processed the data; J.Z. performed the review and wrote Section 2, Section 3 and Section 4. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Application of remote collaborative computing of foreign medicinal biological resources OF Key R&D program of Shandong Province, grant number 2018ASKJ01-05.

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study. Written informed consent has been obtained from the patients to publish this paper.

Data Availability Statement

We use private data from the North Sea Branch of the State Department of Natural Resources, which cannot be shared or disclosed.

Acknowledgments

All authors would like to thank the North China Sea Data and Information Service of State Oceanic Administration for providing ship AIS data support.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Fang, Z.; Yu, H.; Ke, R.; Shaw, S.L.; Peng, G. Automatic identification system-based approach for assessing the near-miss collision risk dynamics of ships in ports. IEEE Trans. Intell. Transp. Syst. 2018, 20, 534–543. [Google Scholar] [CrossRef]
  2. Xuan, S.; Xi, Y.; Huang, C.; Hu, S.; Zhang, L. Spatial Markov Chain simulation model of accident risk for marine traffic. In Proceedings of the 2017 4th International Conference on Transportation Information and Safety (ICTIS), Banff, AB, Canada, 8–10 August 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 664–669. [Google Scholar]
  3. Lu, N.; Liang, M.; Zheng, R.; Liu, R.W. Historical AIS data-driven unsupervised automatic extraction of directional maritime traffic networks. In Proceedings of the 2020 IEEE 5th International Conference on Cloud Computing and Big Data Analytics (ICCCBDA), Chengdu, China, 10–13 April 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 7–12. [Google Scholar]
  4. Eljabu, L.; Etemad, M.; Matwin, S. Spatial Clustering Method of Historical AIS Data for Maritime Traffic Routes Extraction. In Proceedings of the 2022 IEEE International Conference on Big Data (Big Data), Osaka, Japan, 17–20 December 2022; IEEE: Piscataway, NJ, USA, 2022; pp. 893–902. [Google Scholar]
  5. Lei, P.R.; Yu, P.R.; Peng, W.C. Learning for Prediction of Maritime Collision Avoidance Behavior from AIS Network. In Proceedings of the 2021 22nd Asia-Pacific Network Operations and Management Symposium (APNOMS), Tainan, Taiwan, 8–10 September 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 222–225. [Google Scholar]
  6. Smith, J. Recurrent Encoder-Decoder Networks for Vessel Trajectory Prediction with Uncertainty Estimation. J. Mach. Learn. 2020, 25, 1–6. [Google Scholar]
  7. Yang, S.; Chen, S.; Liu, C.; Li, M.; Wang, M.; Wang, J. A Ship Trajectory Prediction Model Based on ECA-BiGRU[C]//2023 IEEE 8th International Conference on Big Data Analytics (ICBDA), Harbin, China, 3–5 March 2023; IEEE: Piscataway, NJ, USA, 2023; pp. 94–99. [Google Scholar]
  8. Liu, W.; Liang, M.; Nie, J.; Yuan, Y.; Xiong, Z.; Yu, H.; Guizani, N. STMGCN: Mobile Edge Computing-Empowered Ship Trajectory Prediction Using Spatio-Temporal Multi-Graph Convolutional Network. IEEE Trans. Ind. Inform. 2022, 11, 115–118. [Google Scholar]
  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, 2169–3536. [Google Scholar] [CrossRef]
  10. Murray, B.; Perera, L.P. A data-driven approach to ship trajectory prediction for safe autonomous ship operations. In Proceedings of the 2018 Thirteenth International Conference on Digital Information Management (ICDIM), Berlin, Germany, 24–26 September 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 240–247. [Google Scholar]
  11. Capobianco, S.; Forti, N.; Millefiori, L.M.; Braca, P.; Willett, P. Uncertainty-Aware Recurrent Encoder-Decoder Networks for Ship Trajectory Prediction. In Proceedings of the 2021 IEEE 24th International Conference on Information Fusion (FUSION), Sun City, South Africa, 1–4 November 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 1–5. [Google Scholar]
  12. Kanazawa, M.; Skulstad, R.; Li, G.; Hatledal, L.I.; Zhang, H. A multiple-output hybrid ship trajectory predictor with consideration for future command assumption. IEEE Sens. J. 2021, 21, 27124–27135. [Google Scholar] [CrossRef]
  13. Prasetio, B.H.; Tamura, H.; Tanno, K. The long short-term memory based on i-vector extraction for conversational speech gender identification approach. Artif. Life Robot. 2020, 25, 233–240. [Google Scholar] [CrossRef]
  14. Chen, X.; Huang, J.; Han, Z.; Gao, H.; Liu, M.; Li, Z.; Liu, X.; Li, Q.; Qi, H.; Huang, Y. The importance of short lag-time in the runoff forecasting model based on long short-term memory. J. Hydrol. 2020, 589, 125359. [Google Scholar] [CrossRef]
  15. Levy, J.; Bairaktaris, D. A model of the interaction between long and short term memory. In Proceedings of the 1991 IEEE International Joint Conference on Neural Networks, Singapore, 18–21 November 1991; IEEE: Piscataway, NJ, USA, 1991; pp. 1741–1746. [Google Scholar]
  16. Quan, Z.; Zeng, W.; Li, X.; Liu, Y.; Yu, Y.; Yang, W. Recurrent neural networks with external addressable long-term and working memory for learning long-term dependences. IEEE Trans. Neural Netw. Learn. Syst. 2019, 31, 813–826. [Google Scholar] [CrossRef] [PubMed]
  17. Xiang, S.; Tang, B. CSLM: Convertible Short-Term and Long-Term Memory in Differential Neural Computers. IEEE Trans. Neural Netw. Learn. Syst. 2020, 32, 4026–4038. [Google Scholar] [CrossRef] [PubMed]
  18. Zhang, Y.; Xin, D. Dynamic optimization long short-term memory model based on data preprocessing for short-term traffic flow prediction. IEEE Access 2020, 8, 91510–91520. [Google Scholar] [CrossRef]
  19. Wen, Y.T.; Lai, C.H.; Lei, P.R.; Peng, W.C. RouteMiner: Mining ship routes from a massive maritime trajectories. In Proceedings of the 2014 IEEE 15th International Conference on Mobile Data Management, Brisbane, QLD, Australia, 14–18 July 2014; IEEE: Piscataway, NJ, USA, 2014; pp. 353–356. [Google Scholar]
  20. Wang, J.; Jia, L.X.; Lin, Z.; Wang, H.J. A Control Method of Maritime Traffic Risk with Knowledge Hierarchy. In Proceedings of the 2011 International Conference on Intelligence Science and Information Engineering, Wuhan, China, 20–21 August 2011; IEEE: Piscataway, NJ, USA, 2011; pp. 491–494. [Google Scholar]
  21. Li, Y.; Peng, T.; Zhang, C.; Sun, W.; Hua, L.; Ji, C.; Shahzad, N.M. Multi-step ahead wind speed forecasting approach coupling maximal overlap discrete wavelet transform, improved grey wolf optimization algorithm and long short-term memory. Renew. Energy 2022, 196, 1115–1126. [Google Scholar] [CrossRef]
  22. Liu, Y.; Yu, X.; Wu, Y.; Song, S. Forecasting Variation Trends of Stocks via Multiscale Feature Fusion and Long Short-Term Memory Learning. Sci. Program. 2021, 2021, 1–9. [Google Scholar] [CrossRef]
  23. Huai, S.; Zhang, S.; Zhang, J.; Huang, K. Holographic detection of AIS real-time signals based on sparse representation. EURASIP J. Wirel. Commun. Netw. 2019, 2019, 1–10. [Google Scholar] [CrossRef]
  24. James, M.; Mendo, T.; Jones, E.L.; Orr, K.; McKnight, A.; Thompson, J. AIS data to inform small scale fisheries management and marine spatial planning. Mar. Policy 2018, 91, 113–121. [Google Scholar] [CrossRef] [Green Version]
  25. Zhang, C.; Yang, X.; Tang, Y.; Zhang, W. Learning to generate radar image sequences using two-stage generative adversarial networks. IEEE Geosci. Remote Sens. Lett. 2019, 17, 401–405. [Google Scholar] [CrossRef]
  26. Shi, Y.; Li, Q.; Zhu, X.X. Building footprint generation using improved generative adversarial networks. IEEE Geosci. Remote Sens. Lett. 2018, 16, 603–607. [Google Scholar] [CrossRef] [Green Version]
  27. Kamble, V.B.; Deshmukh, S.N. Comparision between accuracy and MSE, RMSE by using proposed method with imputation technique. Orient. J. Comput. Sci. Technol. 2017, 10, 773–779. [Google Scholar] [CrossRef] [Green Version]
  28. Zhang, H.; Dong, Y.; Li, J.; Xu, D. Dynamic Time Warping Under Product Quantization, With Applications to Time-Series Data Similarity Search. IEEE Internet Things J. 2021, 9, 11814–11826. [Google Scholar] [CrossRef]
Figure 1. The structure of the LTSM Unit.
Figure 1. The structure of the LTSM Unit.
Jmse 11 01268 g001
Figure 2. The structure of T-LTSM.
Figure 2. The structure of T-LTSM.
Jmse 11 01268 g002
Figure 3. Structure of the temporal attention module.
Figure 3. Structure of the temporal attention module.
Jmse 11 01268 g003
Figure 4. The network structure of GAN.
Figure 4. The network structure of GAN.
Jmse 11 01268 g004
Figure 5. The effect diagram of model training loss (the shaded part represents the interval of each batch loss value): (a) traditional methods, (b) improved neural network methods.
Figure 5. The effect diagram of model training loss (the shaded part represents the interval of each batch loss value): (a) traditional methods, (b) improved neural network methods.
Jmse 11 01268 g005
Figure 6. The generalization ability of T-LSTM with different hidden layers.
Figure 6. The generalization ability of T-LSTM with different hidden layers.
Jmse 11 01268 g006
Figure 7. Trajectory map of ship-trajectory prediction: (a) turning around (b) zigzagging sailing (c) straight sailing (d) ship turning.
Figure 7. Trajectory map of ship-trajectory prediction: (a) turning around (b) zigzagging sailing (c) straight sailing (d) ship turning.
Jmse 11 01268 g007
Figure 8. Trajectory comparison between predicted data and actual data.
Figure 8. Trajectory comparison between predicted data and actual data.
Jmse 11 01268 g008
Figure 9. The GAN diagram of model training loss.
Figure 9. The GAN diagram of model training loss.
Jmse 11 01268 g009
Figure 10. Actual prediction effect map of GAN network.
Figure 10. Actual prediction effect map of GAN network.
Jmse 11 01268 g010
Table 1. MSE and DTW metrics test performance of the model.
Table 1. MSE and DTW metrics test performance of the model.
ModelPrediction TypeAccuracy of Interpolated DataAccuracy of Real Data
MSEDTWMSEDTW
GRULongitude7.3949 × 10−5 6.6706 × 10−22.9907 × 10−34.4360 × 10−1
Latitude6.8277 × 10−56.6543 × 10−22.1538 × 10−33.9206 × 10−1
Speed3.8078 × 10−35.2447 × 10−11.5231 × 10−21.0489
Direction1.0853 × 10−29.0222 × 10−12.1273 × 10−21.2631
Turning rate3.0300 × 10−34.7435 × 10−11.2120 × 10−29.4870 × 10−1
TCNLongitude4.9784 × 10−44.0581 × 10−16.5677 × 10−36.7385 × 10−1
Latitude2.4988 × 10−49.8242 × 10−24.9758 × 10−35.6605 × 10−1
Speed9.7480 × 10−38.3915 × 10−14.9349 × 10−21.8881
Direction1.5629 × 10−22.08276.2516 × 10−22.1653
Turning rate5.1207 × 10−36.1666 × 10−13.2997 × 10−21.5654
T-LSTMLongitude4.4865 × 10−54.5356 × 10−21.0752 × 10−32.6032 × 10−1
Latitude2.7528 × 10−54.1943 × 10−28.0634 × 10−42.2668 × 10−1
Speed2.5133 × 10−34.3800 × 10−25.8560 × 10−36.5559 × 10−1
Direction2.1927 × 10−34.2586 × 10−17.7335 × 10−37.6591 × 10−1
Turning rate3.7653 × 10−35.7519 × 10−16.8178 × 10−36.8409 × 10−1
Table 2. Ablation study of T-LSTM.
Table 2. Ablation study of T-LSTM.
ModelPrediction TypeAccuracy of Real Data
MSEDTW
LSTMLongitude2.38781.0826
Latitude7.6323 × 10−17.4884 × 10−1
Speed1.9964 × 101.1949
LSTM+Δt Longitude4.8247 × 10−41.4969 × 10−1
Latitude6.9723 × 10−31.3445 × 10−1
Speed3.5281 × 10−31.3783 × 10−1
T-LSTMLongitude4.4865 × 10−54.5356 × 10−2
Latitude2.7528 × 10−54.1943 × 10−2
Speed2.5133 × 10−34.3800 × 10−2
Table 3. Error of T-LSTM prediction results and actual data.
Table 3. Error of T-LSTM prediction results and actual data.
FeatureTest Maximum ErrorMean Error
Speed SOG/(knots/hour)0.129510.08113
Turning speed ROG/(knots/hour)0.012470.00531
Heading COG/(°)0.956320.56583
Longitude/(°)0.000350.00021
Latitude/(°)0.000260.00014
Table 4. MSE and DTW metrics test GAN’s performance of the GAN in different sea areas.
Table 4. MSE and DTW metrics test GAN’s performance of the GAN in different sea areas.
Ship TypeSea Area 1Sea Area 2Sea Area 3Sea Area 4
MSEDTWMSEDTWMSEDTWMSEDTW
Large1.16 × 10−32.83 × 10−12.61 × 10−34.35 × 10−12.08 × 10−33.83 × 10−13.23 × 10−34.87 × 10−1
Medium1.89 × 10−33.65 × 10−12.88 × 10−34.06 × 10−12.06 × 10−33.86 × 10−13.94 × 10−35.36 × 10−1
Small3.29 × 10−34.75 × 10−15.92 × 10−36.42 × 10−14.21 × 10−35.33 × 10−18.79 × 10−37.85 × 10−1
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

Zhang, J.; Wang, H.; Cui, F.; Liu, Y.; Liu, Z.; Dong, J. Research into Ship Trajectory Prediction Based on An Improved LSTM Network. J. Mar. Sci. Eng. 2023, 11, 1268. https://doi.org/10.3390/jmse11071268

AMA Style

Zhang J, Wang H, Cui F, Liu Y, Liu Z, Dong J. Research into Ship Trajectory Prediction Based on An Improved LSTM Network. Journal of Marine Science and Engineering. 2023; 11(7):1268. https://doi.org/10.3390/jmse11071268

Chicago/Turabian Style

Zhang, Jiangnan, Hai Wang, Fengjuan Cui, Yongshuo Liu, Zhenxing Liu, and Junyu Dong. 2023. "Research into Ship Trajectory Prediction Based on An Improved LSTM Network" Journal of Marine Science and Engineering 11, no. 7: 1268. https://doi.org/10.3390/jmse11071268

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