Applying Simplex Algorithm for Ship’s Motion Simulation Optimization by Using Maneuvering Tests Data

This article demonstrates an effective method to find OHCs (optimal hydrodynamic coefficients) by applying the Simplex algorithm to reduce the errors of the ship’s motion simulation. The solution is to determine OHCs, which are also the coefficients of the ship’s motion equations. A ship’s motion simulation model was programed by contributing the mathematical model of the ship’s motion, applying the numerical method and MATLAB. In the optimization procedure, the form of Objective Function was contributed corresponding to the type of maneuvering test. The Sensitivity Analysis technique and Simplex algorithm are applied to filter and optimize the most sensitive hydrodynamic coefficients. The numerical model was validated by experimental maneuvering test data, including Turning Circle and Zigzag tests of Esso Bernicia 193000DWT Tanker. A good optimization solution was obtained: for Turning Circle test, after optimization, the ship’s simulation trajectory is close to the experimental trajectory with a RMSD of 5.8m, which reduced from an original value of 69m. In the Zigzag test, the RMSD between the ship’s simulation yaw angle and experimental data was reduced 17.3deg to 5.9deg. The other optimization results, such as the convergence of Objective Function, the number of iteration of Optimization Variables, calculated time, etc. are accepted. Therefore, the Simplex algorithm can be applied quite effectively to optimize ship movement (ship’s trajectory, the ship’s yaw angle, etc.). By defining a common set of values by merging the optimal value of the most sensitive coefficients of two tests, which may be used for the other ship’s motion simulation applications. Keywords— ship’s motion simulation; optimization technique; Simplex algorithm; hydrodynamic; experimental maneuvering.


I. INTRODUCTION
Ships are objects of considerable nonlinearity, operating in the ocean environment, so they are greatly influenced by random interference factors such as waves, wind, ocean currents [1]. Notably, the measurement and determination of kinematic parameters are complicated and confusing. Therefore, ships are the object of many scientists around the world interested in researching, and it is always an exciting challenge for the community of scientists when studying the ship's motion control. In particular, when a ship navigates in a narrow channel, the ship will be affected by the limitations of the channel, namely: the width of the navigation and the depth of the channel [2]. These factors directly affect the maneuverability of the ship, such as rotation, inertia, and speed of the ship. In addition, when the ship is moving in the narrow channel, there are also physical phenomena such as shore effect, squat, and hydrodynamic interaction. Moreover, tankers are special cargo ships because of their potential to cause serious pollution to the marine environment if any accident occurs, so the safety of tankers is higher than that of conventional cargo ships [3], [4]. When maneuvering and traveling in and out of narrow channels, the operators must be proficient, and the ship maneuvering system must work with high reliability [5].
The 1978 STCW Convention and its amendments in 2010 recognized the importance and provided for the increased use of cockpit simulation in maritime professional training [6]. In addition to statutory requirements, the demand for simulated training in the world has also become urgent, requiring maritime training institutions to equip cockpit simulations capable of simulating different types of propulsion [7]. The maneuvering simulation system can also be explored in the feasibility study of ship design, port design, and navigational channel [8]. This application is applicable to existing ships as well as during the design process. To do this, it is necessary to set up a suitable math model for ship motions and meet the accuracy of each specific ship. The artificial brain of a maneuvering simulation system is the math model for ship motion so that realism can be guaranteed [9]. In the problem of controlling ship movement, the first thing is to understand the dynamics of the control object as well as its relationship to the surrounding environment [10]. The result of learning about a control object is usually a mathematical model describing its kinematic properties. Since then, based on this mathematical model and the requirements for the desired control quality, it is proposed that the appropriate control method [11].
On the other hand, there have been many mathematical models that were introduced and developed over a long time with the application, adjusting many different predictive methods, and becoming very complicated. Therefore, the development of mathematical models suitable for ships should be more concerned, especially tankers with quite specialized propulsion systems [12]. It is challenging to optimize the ship trajectory simulation; one of the solutions is to identify OHCs that are in the ship's motion equations. The application of optimization technique with SQP and BFGS algorithms was made for this problem by T. Khang Toan [13] and Wang et al. [10]. In this paper, we introduce another optimization algorithm carrying out by an effective way to calculate OHCs by applying the Simplex algorithm for ship trajectory simulation based on ship maneuvering test data. As the previous researches, this procedure is achieved efficiently through 3 steps as follows [14]: • Ship motion equations (in 3 DOF corresponding to surge-sway-yaw motions, Figure 1) are resolved by the numerical method to obtain the motion components such as ship position, velocity, yaw angle, hydrodynamic forces and moment, etc. The original value of ship hydrodynamic coefficients (HCs) are used in this step. • Applying the sensitivity analysis to filter the most sensitive HCs that have the most influence on the change of ship trajectory; • Applying the Simplex algorithm to find the optimal value of the most sensitive HCs.

A. Mathematical Model
The ship motion equations in 3 DOF are written as follows [15], [16]: -vr = gX" + ur = gY" (L " ).2 = gLN" (1) where: u and v are the surge and sway velocity respectively; u& is the surge velocity and v & is the sway velocity; r is the yaw velocity; r & is the yaw acceleration; g is the gravity; L is the length between perpendiculars of ship; " 1 Z Z I k L m = is the non-dimensional radius of gyration, I z is the inertial moment of ship. X", Y", N" are the non-dimensional forces and moments respectively that are written as follows: where: , ,..., , ,..., , ,..., are the non-dimensional ship's HCs, which can be calculated by Simplex algorithm; δ is the rudder angle; t d is the thrust where: h is the water depth; T" is the non-dimensional propeller thrust given by: where: T uu , T un and T |n|n are HCs; n is the engine speed; c is the flow velocity at the rudder estimated by: where: c un and c nn are the hydrodynamic coefficients.

B. Numerical Method 1) Ship's motion simulation:
The vector of ship's motion state (x) including the motion variables are computed [13], [17]- [19]: x is calculated in a nonlinear time-varying matrix: where: t is the real-time; X pos and Y pos are the coordinates of ship in OX-axis and OY-axis of the earth-frame respectively; u c = [δ c n c ] T is the control input; δ c is the commanded rudder angle; n c is the commanded shaft velocity; ẋ = [u v ṙ Ẋ pos Ẏ pos ψ δ & ṅ] T is the derivative vector of x, which is computed simultaneously by solving the ship motion equations by the Runge-Kutta 4th order method (RKF45).
2) Ship motion simulation optimization: For the optimization resolution, an Objective Function (Fobj) is minimized to identify ship hydrodynamic coefficients.
The optimization problem is resolved as follows [4]: With: 1 2 , ,..., where: α is the vector of optimization variables which represents the ship hydrodynamic coefficients to be determined; N is the number of variables; ( ) i f α is the deviation function between simulation and experimental data of ship maneuvering tests. The above optimization problem will be solved by applying the Simplex algorithm. During the numerical resolution, the Objective Function (F obj ) is used, and the gradient values of F obj concerning the vector α that will be updated through each calculation loop.
In this study, two maneuvering tests, including Turning Circle and Zigzag tests [10] were used as the validation tests. Thus, the formulation of F obj is contributed depending on each test as follows: 3) Turning circle test [11]: where: 2 i S ∆ is the square root of the difference between the computed and the experimental ship trajectories, which depends on ship hydrodynamic coefficients α. It reads: where: cal and exp are simulated and experimental maneuvering test data respectively, (x i , y i ) are the coordinates of the point i on the trajectory, and N p is the number of pairs of points to be optimized. For analyzing the discrepancy of trajectory, we used the Root Mean Square Deviation (RMSD) given by: where: 2 i S ∆ is given by Eq. (10); N is the total of points to be optimized. [20]: The expression of F ob j :

4) Zigzag test
where: ψ i is the yaw angle, which also depends on HCs α; Np is pairs of points to be approximated. The Root Mean Square Deviation (RMSD) of the ship's yaw angle (between simulated and experimental data) given by: where: . = . − . "#$ ; N is the total of points to be optimized.

C. Ship Parameters
The validation of this study is carried out by using the experimental maneuvering test data of Esso Bernicia 193000DWT Tanker [17] (Figure 2), where the ship parameters are given in Table 1, and the 35 hydrodynamic coefficients are given in Table 2.    [17] ID No.
Hyd. Coefficient Initial Value

D. Data of Ship Maneuvering Tests at Sea
The experimental input parameters of ship maneuvering tests, including Turning Circle and Zigzag, are given in Table 3.

A. Ship's Motion Simulation
The simulation results of the ship's trajectory in Turning Circle test and ship's yaw/rudder angles in the Zigzag test [1,13,14] are given in Figure 3 and Figure 4 respectively.

B. Sensitivity Analysis of HCs
The most sensitive HCs [22] of each maneuvering test are determined and summarized in Table 4 and Table 5.  Figure 5.  Before optimization, RMSD of ship's trajectory between experimental and simulation data is: ∆S (RMSD) = 68m. After optimization procedure, this value is reduced to 5.8m. As shown in Figure 7, after optimization procedure by applying Simplex algorithm, the simulated trajectory of ship is close to experimental trajectory. The important optimal solutions obtained by Simplex algorithm are summarized in Table 6. The optimal value of HCs obtained by Simplex algorithm is presented in Table 7. As shown in Table 6, the minimum value of the Objective Function obtained by Simplex algorithm after convergence, which is 0.085 (minimized from 1). This shows that a very good result was obtained and Simplex algorithm is suitable to ship's trajectory optimization problem.   2) Zigzag test: By applying Simplex algorithm with the same optimization procedure as for Turning Circle test, the evolution of the optimal HCs in Zigzag test is obtained and shown in Figures 8. Convergence of the Objective Function is presented in Figure 9. Comparison of ship's yaw angle before and after optimization procedure is shown in Figure 10. Before optimization, RMSD of ship's yaw angle between experimental and simulation data is: ∆ψ (RMSD) = 17.3 deg. After the optimization procedure, this value is reduced to 5.9 deg. The important optimal solutions obtained by Simplex algorithm for Zigzag test are summarized in Table 8.

5.9deg
The optimal value of HCs obtained by Simplex algorithm in Zigzag test is presented in Table 9. It notes the remarkable minimum value of the Objective Function obtained by Simplex algorithm for Zigzag test after convergence, which is 0.318 (minimized from 1.000). This is a good optimization result and shows that Simplex algorithm can be applied to ship's yaw angle optimization problem.

3) Common value of OHCs of Turning Circle and
Zigzag tests: After obtaining the value of OHCs from Turning Circle and Zigzag tests, a set of common values is identified by merging the optimal value of the most sensitive coefficients of two test (average value), for the remaining coefficients, the initial value is used. The set of common values above is used as the final value of ship's HCs for the other ship's motion simulation applications (Table 10).

IV. CONCLUSION
By contributing the mathematical model of ship's motion, applying the numerical method and MATLAB, the authors programmed a ship's motion simulation program. In order to reduce the errors of ship's motion simulation, the optimization technique is applied. The important ship's motions including ship's trajectory and yaw angle were validated by using the experimental data at sea of Turning Circle and Zigzag tests. For the optimization procedure, the authors contributed the form of Objective Function, applying the Sensitivity Analysis technique and Simplex algorithm to filter and optimize the most sensitive HCs.
A good result of optimization resolutions was obtained. In Turning Circle test, after optimization, and the ship's simulation trajectory are close to the experimental trajectory with a RMSD of 5.8m, which reduced from an original value of 69m. By the same optimization procedure, in Zigzag test, the ship's simulation yaw angle is close to the experimental data with a RMSD of 5.9deg, which reduced from an initial value of 17.3deg. After analyzing the optimization solutions, we obtained the optimal value of the most sensitive HCs in each test. From these values, we identify a set of common values by merging the optimal value of the most sensitive coefficients of two test, which may be used for the other ship's motion simulation application. Finally, we would like to propose an optimization procedure by applying the Simplex algorithm to optimize the ship's motion simulation using the experimental maneuvering test data.