J Navig Port Res > Volume 48(2); 2024 > Article
Vu, Nguyen, and Yoon: Prediction of Motion State of a Docking Small Planing Ship using Artificial Neural Network


Automatic docking of small planing ship is a critical aspect of maritime operations, requiring accurate prediction of motion states to ensure safe and efficient maneuvers. This study investigates the use of Artificial Neural Network (ANN) to predict motion state of a small planing ship to enhance navigation automation in port environments. To achieve this, simulation tests were conducted to control a small planing ship while docking at various heading angles in calm water and in waves. Comprehensive analysis of the ANN-based predictive model was conducted by training and validation using data from various docking situations to improve its ability to accurately capture motion characteristics of a small planing ship. The trained ANN model was used to predict the motion state of the small planing ship based on any initial motion state. Results showed that the small planing ship could dock smoothly in both calm water and waves conditions, confirming the accuracy and reliability of the proposed method for prediction. Moreover, the ANN-based prediction model can adjust the dynamic model of the small planing ship to adapt in real-time and enhance the robustness of an automatic positioning system. This study contributes to the ongoing development of automated navigation systems and facilitates safer and more efficient maritime transport operations.

1. Introduction

In recent years, small planing ship have constituted an increasing share of ship traffic in ports. The focus on small planing ship allows for more controlled testing and analysis, facilitating the development and validation of predictive models using simulated data and actual data. Furthermore, choosing small planing ship as a research topic enables researchers to address specific challenges and opportunities in navigation automation. In addition, small planing ship are often maneuverability and exhibit different motion characteristics than larger ships, making them suitable subjects for studying motion state prediction. Docking small planing ship in crowded port environments has become a top concern in maritime operations. Traditional ship docking methods often rely on manual intervention, which causes errors and inefficiencies. Therefore, there is growing interest in the use of Artificial Neural Networks (ANN) to automate and optimize the docking process. ANN, a subset of artificial intelligence, offers a potential solution for predicting motion behavior when maneuvering a small planing ship. The predictive power of an ANN stems from its ability to analyze and learn relationships in a complex data set, making it suitable for modeling the dynamic and nonlinear features of ship motion. Such predictive models have enormous potential to revolutionize maritime operations by automating operations, minimizing human error, and improving overall safety.
In the past, researchers have studied motion prediction during ship docking using neural network algorithms in supervised machine learning. Ship trajectory during docking using simulation data in both wind and no wind conditions were predicted (Ahmed et al., 2012). Simulation data was collected by controlling the ship docking using the ANN algorithm and a Proportional Derivative controller. The ANN prediction model was further researched and developed using experimental data from the turning circle test (Ahmed et al., 2013). Ship motion states during docking were predicted using control simulation data in scenarios with no wind, constant wind, and dynamic wind (Shuai et al., 2019). Most recently, the ship's trajectory when docking was predicted using a long-short-term memory model in a supervised machine learning model (Robert et al., 2020). In addition, the ANN method was used to model nonlinear response models and linear hydrodynamic models of ship maneuvering motion (Lou et al., 2016). ANN method was also applied to model the maneuverability characteristics of a scaled model ship using experimental data (Moreira et al., 2023).
In our study, control simulation tests are conducted at various initial heading angles in calm water and waves. A mathematical model of ship maneuvering is used to simulate ship motion in three degrees of freedom (DOF). Rudder angle and propeller revolution are two variables used to control the ship, achieved by adjusting the control adjustment bars in the simulation interface. Control simulation results including x0 coordinate, y0 coordinate, heading angle, rudder angle, and propeller revolution, which are used as both training data and testing data for the ANN model. Once the ANN model is trained on the training data, validation is performed using the testing data. By inputting the initial ship motion state (x0 coordinate, y0 coordinate and heading angle) into the trained and validated ANN model, the next ship motion state (rudder angle and propeller revolution) is predicted. The x0 coordinate, y0 coordinate and heading angle in the next state are calculated using a mathematical model of ship maneuvering. The predicted ship states are continuously updated as input values of the ANN model. These predicted ship states are then compared to the final ship state at the dock. The prediction process ends when the error between the predicted state and the target state is within 5% in calm water and 10% in waves.

2. Docking problem and simulation model

2.1 Ship docking problem

According to the ITTC recommendation, high-speeds ships are defined as ships with a Froude number above 0.45, and/or a speed above 3.7∇1/6 (m/s), where ∇ in m3 (ITTC, 2008). Small planing ship is often designed to operate at high speeds. However, the situation required operating at much lower speeds to ensure safe and precise maneuvering of ships docked in ports. This poses an interesting challenge for researchers who want to investigate the motion behavior of small planing ship. Therefore, adapting to the demands of low-speeds docking operations required careful consideration and adjustment of navigation strategies. Two requirements have been proposed for captains in maneuvering ships when docked (Kose et al., 1989). First, the ship's final docking location must be some distance from the dock, not entirely at the dock. Secondly, the captain must have enough time to plan the maneuvering of the ship in an emergency. Therefore, two phases of the ship docking process were proposed (Shuai et al., 2019), as depicted in Fig. 1. These phases include the ballistic phase and the side-push phase. In the ballistic phase, the ship is maneuvered to change course, speed and stops using the main propulsion and rudder. In the side-push phase, the ship is docked using tunnel thrusters to provide side thrust. In Fig. 1, two right-handed coordinate systems were used in ship maneuvering. The earth-fixed coordinate system (Oxy) was assumed to be at the midship at time t0. The body-fixed coordinate system (O0x0y0) was assumed to be at the midship. The heading angle is defined as the angle between the directions of the x0-axis and the x-axis.
In our study, the first phase of the docking operation was conducted. The ship departed from the stationary state and maneuvered toward the port at low speed at various initial heading angles. The ship docked at the final position of the ballistic phase (xn, yn). The final position was considered the error range between the predicted motion state and the final target state, which is within 5% in calm water and 10% in waves. The range of the final position of the ballistic phase is depicted in Fig. 2. In addition, a leisure boat is a small planing ship that was chosen to study the ship maneuvering behavior in port. The principal dimensions of the ship which is considered the target ship are described in Table 1.

2.2 Ship mathematical model

During maneuvering, ship motion is described by 6DOF including surge, sway, heave, roll, pitch and yaw. For surface ships, ship motion is simplified into 3DOF, including surge, sway and yaw. The ship motion equation for small planing ship was described as Eq. (1) (Katayama et al., 2009).
where, m, xG and Iz are the ship mass, the longitudinal center of gravity in the body-fixed coordinate system and the moment of inertia in yaw motion, respectively. u, v and r are the velocities on the x-axis, y-axis, and z-axis, respectively. u˙, v˙ and r˙ are the accelerations on the x-axis, y-axis, and z-axis, respectively. H, P and W are symbols representing the hull, propeller and wave, respectively. X, Y and N are denoted for the hydrodynamic forces acting on the ship's hull as the x-axis, y-axis, and z-axis, respectively. Applying the Taylor-series expansion extended to the 3rd-order function, these hydrodynamic forces acting on the ship's hull are described by Eq. (2). In Eq. (2), the 3rd-order polynomial function is replaced by a 2nd-order polynomial function and the absolute value of sway velocity and yaw rate.
where X'0, X'vv, X'rr, and X'vr are the surge derivatives. Y'v, Y'v|v|, Y'r, Y'r|r|, Y'v|r|, and Y'v|r| are the sway derivatives. N'v, N'v|v|, N'r, N'r|r|, N'v|r|, and N'v|r| are the yaw derivatives. p is the water density. The superscripts represent non-dimensional variables. In addition, the hydrodynamic coefficients for surge, sway and yaw motion were obtained based on the experiment. The hydrodynamic coefficients for surge, sway and yaw motion are described in Table 2.
Hydrodynamic forces due to propeller are described by Eq. (3). For our small planing ship, the leisure boat uses two outboard motors as the main propulsion. Outboard motors include the engine, gearbox and propeller. The propellers used are coupled twin propellers with bravo three drives. The thrust of outboard motors is calculated using Eq. (4) (Gerr, 1989).
where T(N) is the thrust, xt is the longitudinal coordinates of the propeller to the ship's center of gravity and δ is the rudder angle. n is the propeller revolution. P is the pitch face propeller. m is the ship mass. sA is the apparent slip coefficient. C is the constant chosen for the type of ship being considered. Wf is the Taylor wake factor.
Wave force was obtained by performing the seakeeping test in the experiment. The wave force data was stored as a database and is described in Fig. 2.

3. Proposed approach

3.1 Artificial Neural Network

ANN are computational models inspired by the structure and function of biological neural networks in the human brain. They consist of interconnected nodes, or neurons, organized in layers, including input, hidden, and output layers depicted in Fig. 3. During the training process, the ANN iteratively adjusts the weights and biases of its connections to minimize the error between the predicted and target values. The error is calculated using the mean square error (MSE) method. This optimization process, often performed using algorithms like backpropagation, allows ANN to learn complex nonlinear relationships and make accurate predictions based on new input data.
The predicted values of each node in the hidden layer can be written as shown in Eq. (5).
where yj and bj are the output value and the bias corresponds to each node in the hidden layer, respectively. xi and wi are the input value and weight corresponding to each node in the input layer, respectively. f is the activation function. There are many activation functions used in regression problems such as Sigmoid, Tanh and ReLu described by Eq. (6).
Similarly, the predicted value of each node in the output layer can be rewritten as Eq. (7).
where yk and bk are the output value and the bias corresponds to each node in the output layer, respectively. Xj and Wj are the output value and weight corresponding to each node in the hidden layer, respectively. is the linear activation function.
The objective function of the training model is written as:
where n is the number of nodes in the output layer. y is the target output value.
The process of training and validating the ANN model involves splitting the data set into training and testing sets. This is typically done using a ratio such as 75% of the data set for the training set and 25% of the data set for the testing set. The training set was used to optimize the model's parameters through backpropagation, during which the model learns to minimize the difference between predicted and target values. Meanwhile, the testing set was used to assess the model's performance on data that was not observed during training, which helped avoid overfitting and underfitting phenomena. This iterative process continues until satisfactory performance is achieved on the testing set, ensuring the model's ability to generalize to unseen data.
In terms of ship motion prediction, the ANN model was trained and validated using historical data from control simulations. After training and validation, the ANN model was used to predict ship motion states, as depicted in Fig. 4. The input data can include variables such as x0 coordinate, y0 coordinate and heading angle, while the output data represents ship control parameters such as rudder angle and propeller revolution. Using mathematical models in ship maneuvering and the 4th-order Runge-Kutta method, ship motion states (surge velocity, sway velocity, yaw rate, x0 coordinate, y0 coordinate and heading angle) were calculated and continuously updated as input data for the ANN model.

3.2 Simulation and prediction interface

The entire process of control simulation and ship motion state prediction was performed using the visualization interface shown in Fig. 5. This approach provides users with direct observation of the ship motion behavior and makes it easy to adjust to parameters or algorithms when required. The use of the visualization interface for simulation enables rapid responses to ship motions in real-time.
By adjusting the adjustment bar of the control simulation interface, the rudder angle and propeller revolution values were continuously changed and updated in the ship motion model. Furthermore, the interface provides immediate feedback by displaying the ship motion states during control. The ship docking control simulation aims to generate a variety of data as training data for the ANN model. The richer the training data, the easier it is for the ANN model to capture the complex relationship between input values and output values. To achieve this, the control simulation was performed with the same origin coordinates but with various initial heading angles both in calm water and in waves. The test conditions are described in Table 3.
The initial and final states of the ship motion can be entered into the ship motion prediction interface. The interface then predicts and displays the next states of ship motion. This integrated approach streamlines workflow and enhances efficiency in directly analyzing and responding to ship maneuvers. The test conditions for predicting ship motion states are designed as shown in Table 4.

4. Result

4.1 Control simulation for ship docking

In the case of a small planing ship docking, ship speed was 2 knots. The ship moved from a stationary state until it reached the target speed. The rudder angle was adjusted to maneuver the ship toward the dock. When the ship reached the dock, the propeller revolution was reduced to 0 rpm, but ship speed did not suddenly decrease to 0 knots. Based on the ship's existing momentum according to the inertial principle and the geometric characteristics of the small planing ship, the ship continued to move slowly over time. The simulation results of ship docking control in calm water and waves are shown in Fig. 6 and Fig. 7, respectively.
In the wave case, the wave direction of 180° and the wavelength over ship length ratio (λ/L) of 0.5 were chosen for analysis. Notably, the presence of waves significantly influences the docking process. Due to the wave forces, the ship's existing momentum and ship speed decrease faster compared to calm water conditions.

4.2 ANN algorithm validation

Before training an ANN model, the structure off the ANN model must be determined. The neural network structure includes activation functions, the number of hidden layers, the number of nodes in each hidden layer, and the number of epochs. A well-defined structure ensures that the ANN has the necessary complexity to adequately solve a given problem while optimizing computational efficiency and resource utilization. Moreover, determining the model structure is crucial to achieving optimal generalization performance. The Multi-Layer Perceptron Regressor (MLPRegressor) method was employed to determine the model structure. The structure is selected based on the minimum MSE value between the predicted and target values in the training data. To choose an effective and suitable model structure for any given problem, it is necessary to test different model structures on the same training data. A variety of ANN model structures are assumed. Activation functions include ReLu, Tanh, Sigmoid and Linear. The number of nodes in each hidden layer is assumed to be the same. The number of hidden layers is set to [1,2,3,4,5] and the number of nodes in each hidden layer is set to [3,6,9,12,15]. Each component of the ANN model structure is permuted and continuously updated into the MLPRegressor model. The results of the MSE value for the ANN model structure are shown in Fig. 8. The components of the ANN model structure with the minimum MSE value were selected. The optimized ANN model structure includes 5 hidden layers, 15 nodes in each hidden layer, 5000 epochs and the ReLu activation function.
Once the ANN model structure is determined, model validation should be performed using test data to ensure the model's ability to generalize to unseen data. The validation results of the ANN model are presented in Fig. 9, depicting the predicted rudder angle and propeller revolution. The comparison of the predicted values and target values in the testing data shows a good fit for the target values. In addition, the model loss, which measures the disparity between training and validation values, is minimal. Therefore, these results indicate the ANN model's effectiveness in the prediction process.

4.3 Next motion state prediction for ship docking

The ANN model was trained and then used to predict ship motion states using the results for ship docking control simulation in calm water in Fig. 6. As shown in Table 4, the next motion states were predicted at the initial heading angles of 23.3° and -38.8°. The prediction process is complete when the error between the predicted motion state and the target final state is within 5%. Similarly, in the case of waves, the ANN model was trained based on simulated results for ship docking control simulation in Fig. 7. Predictions off next motion states are made at initial heading angles of 55.2° and -10.4°, with the prediction process ending when the error is within 10%. The results for motion state prediction in calm water and waves are shown in Fig. 10 and Fig. 11, respectively. It's worth noting that under the influence of the training data, ship speed in the predicted final state has not yet reached zero. However, automatic navigation while docking the ship in the ballistic phase has been completed.
The performance of the ANN model and the quality of the predicted results depend on the quality of the training data. To achieve this, data obtained from free-running model tests in the experiment or sea trial data should be applied. These data sets can provide valuable insight into the dynamics of small planing ship's docking operations, providing a more comprehensive representation of real-world scenarios. In addition, maneuvering small ships at low speeds also causes yaw rotating motion. This rotation increases the complexity of the docking process, which must be accounted for in the training data and model structure.

5. Conclusion

In our study, the ANN model is trained based on the control simulation results of ship docking in calm water and wave conditions. The ANN prediction model accurately predicted the motion states of small planing ship during docking. The concluding remarks are as follows:
First, ship motion states were simulated by controlling the rudder angle and propeller revolution at various initial heading angles. Due to the influence of the principle of inertia and the geometric characteristics of small planing ship, the ship continues to move slowly over time when the propeller is stopped.
Second, the ANN model is trained and validated using control simulation data. The ANN model structure has been optimized to suit the prediction problem under various environmental conditions.
Third, given any initial motion state, the next motion states of the ship are predicted. The ship was maneuvered automatically and successfully docked during the ballistic phase.
Fourth, the reliability of the ANN method is assessed as high by evaluating the model loss value. Therefore, the ANN model performs well in predicting ship motion states during docking. In addition, the ANN model is useful in developing a ship dynamic model to respond to the motion states of small planing ship in real-time. The ANN prediction model can be combined with the automatic positioning system of small ships in the real world to predict motion status, detect abnormal motion, and predict collision avoidance.
Finally, the ship was successfully maneuvered to dock automatically during the ballistic phase. However, to improve the prediction performance of the ANN model as well as the results of predicting motion states in ship docking, some problems should be considered in future research such as: expanding training data with experimental data and sea trial data, considering more dynamic environmental, considering yaw rotation phenomenon, considering systematic or random errors and evaluating prediction performance between prediction techniques in machine learning.


This work was supported by the National Research Foundation of Korea(NRF) grant funded by the Korea government(MSIT) (NRF-2022R1A2C1093055).

Fig. 1.
Coordinate system for ship docking
Fig. 2.
The range of the final position
Fig. 3.
Wave force
Fig. 4.
ANN model
Fig. 5.
Process of predicting the ship motion state
Fig. 6.
Visualization interface
Fig. 7.
Ship docking simulation in clam water
Fig. 8.
Ship docking simulation in wave
Fig. 9.
ANN model structure
Fig. 10.
ANN model validation
Fig. 11.
Motion state prediction in calm water
Fig. 12.
Motion state prediction in wave
Table 1.
Ship parameters
Item Unit Value
Length, L m 9.450
Breadth, B m 3.050
Draft, T m 0.939
Displacement, ∇ m3 5.172
Longitudinal center of gravity from midship, xG m −1.770
Power, P W 164053.972
Table 2.
Hydrodynamic coefficients
HD coeff. Value HD coeff. Value
X0' −6.92E-03 Xrr' −4.71E-02
Xvv' −1.84E-02 Xvr' 4.69E-02
Yv' −3.46E-02 Yr|r|' −1.05E-02
Yv|v|' −3.70E-02 Y|v|r' −1.56E-02
Yr' 2.27E-02 Yv|r|' 2.91E-03
Nv' −9.70E-03 Nr|r|' −2.79E-03
Nv|v|' −1.04E-02 N|v|r' −3.70E-02
Nr' −3.05E-03 Nv|r|' 8.08E-03
Table 3.
Test conditions for control simulation
Test condition Value
Initial position (m) (x0,y0) = (0,0)
Initial heading angle (°) −90 to 90, interval 15
Table 4.
Test conditions for ship motion state prediction
Test condition Initial state Final state
Calm water Case 1 (0,0,23.3°) (75,35,15°)
Case 2 (0,0, −38.8°) (75,35,15°)
Wave Case 1 (0,0,55.2°) (75,35,15°)
Case 2 (0,0, −10.4°) (75,35,15°)


1 Ahmed, A. Y. and Kazuhiko, H.(2012), “Automatic Ship Berthing using Artificial Neural Network Based on Virtual Window Concept in Wind Condition”, Proceeding of 13th IFAC (The International Federation of Automatic Control) Symposium on Control in Transportation Systems, Vol. 45, No. 24, pp. 286-291.
2 Ahmed, A. Y. and Kazuhiko, H.(2013), “Automatic ship berthing using artificial neural network trained by consistent teaching data using nonlinear programming method”, Journal of Engineering Applications of Artificial Intelligence, Vol. 26, No. 10, pp. 2287-2304.
3 Gerr, D.(1989), ““Propeller Handbook: The Complete Reference for Choosing, Installing, and Understanding Boat Propellers””, Published by International Marine Publishing Company.
4 ITTC(2008). Recommended procedures and guidelines: Testing and Extrapolation Methods High Speed Marine Vehicles: Resistance Test (7.5-02-05-01).
5 Katayama, T., Taniguchi, T., Fujii, H. and Ikeda, Y.(2009), ““Development of maneuvering simulation method for high speed craft using hydrodynamic forces obtained from model tests””, Proceeding of 10th International Conference on Fast Sea Transportation, pp. 37.
6 Kose, K., Fukudo, J., Sugano, K., Akagi, S. and Harada, M.(1989), “On a computer aided maneuvering system in harbuors”, Journal of the Society of Naval Architects of Japan, Vol. 1986, No. 160, pp. 103-110.
7 Lou, W. and Zhang, Z.(2016), “Modeling of ship maneuvering motion using neural networks”, Journal of Marine Science and Application, Vol. 15, pp. 426-432.
crossref pdf
8 Moreira, L. and Soares, C. G.(2023), “Simulating Ship Manoeuvrability with Artificial Neural Networks Trained by a Short Noisy Data Set”, Journal of Marine Science and Engineering, Vol. 11, No. 15.
9 Robert, S., Li, G. Y., Fossen, T. I., Vik, B. and Zhang, H. X.(2020 ““A Hybrid Approach to Motion Prediction for Ship Docking - Integration of a Neural Network Model into the Ship Dynamic Model””, Proceeding of IEEE Transactions on Instrumentation and Measurement, Vol. 70, Article 2501311.
10 Shuai, Y. H., G., Y., Cheng, X., Skulstad, R., Xu, J. S., Liu, H. H. and Zhang, H. X.(2019 “An efficient neural-network based approach to automatic ship docking”, Ocean Engineering, Vol. 191, Article 106514.

Editorial Office
C1-327 Korea Maritime and Ocean University
727 Taejong-ro, Youngdo-gu, Busan 49112, Korea
Tel: +82-51-410-4127    Fax: +82-51-404-5993    E-mail: jkinpr@kmou.ac.kr                

Copyright © 2024 by Korean Institute of Navigation and Port Research.

Developed in M2PI

Close layer
prev next