Objective The berthing motion of azimuth stern-drive (ASD) tugs is characterized by strong nonlinearity, multi-modal behavior, and inherent uncertainty. Conventional deterministic trajectory-prediction models are unable to capture multiple possible future motion trajectories and often lack robustness. To improve trajectory-prediction accuracy under complex port-operation conditions and quantify motion uncertainty, a probabilistic multi-step trajectory-prediction model integrating a Transformer encoder-decoder architecture with a mixture density network (MDN) is proposed.
Methods Real-world ship berthing datasets are used to develop and evaluate the proposed model. Ship position, heading and speed are taken as state variables, while port and starboard rudder angles and propeller rotational speeds are selected as control variables. The Transformer encoder captures long-range temporal dependencies in the input time series. The decoder employs an autoregressive teacher-forcing strategy to generate latent temporal features for future states. The MDN maps the decoder outputs to the parameters of multi-dimensional Gaussian-mixture distributions, enabling joint probabilistic prediction of position, heading and speed. The model is trained by minimizing the negative log-likelihood loss while incorporating geometric regularization constraints on heading angles. Baseline models, including LSTM, vanilla Transformer, and MDN-LSTM, are developed for comparison. Quantitative performance is evaluated using the ADE, RMSE, MAE and Z-score probabilistic-calibration metrics. Visual verification is further conducted under representative berthing scenarios: straight-line approach, large-angle turning and deceleration.
Results The proposed model achieves a five-step heading MAE of 2.610°. Compared with LSTM, it reduces the single-step ADE by 57.7 % and the five-step heading MAE by 54.92 %. Compared with the vanilla Transformer, it reduces the five-step position RMSE by 2.04 %. Compared with MDN-LSTM, it reduces the five-step position RMSE, ADE and heading MAE by 4.6 %, 8.8 % and 26.8 %, respectively. Z-score calibration demonstrates that standardized residuals approximately follow a zero-mean normal distribution, indicating good probabilistic calibration. Visual results under representative scenarios further demonstrate the model’s good generalization capability for unsteady berthing motions.
Conclusion The proposed model improves the accuracy of multi-step trajectory prediction while effectively quantifying motion uncertainty during tug berthing. It can provide probabilistic trajectory references to support intelligent maneuvering decision-making for port-operation tugs.