An Optimization Model for Ship Speed Based on Maneuvering Control

: The increasing frequency of serious environmental issues and high fuel costs have necessitated better energy efﬁciency in the shipping industry. According to a report by the International Maritime Organization (IMO), ship speed optimization has huge potential. This paper introduces an optimization model of ship speed based on maneuvering control. The trajectory tracking theory and sliding mode control method are applied to simulate the control load of a ship. The propeller mode and rudder mode are used to calculate the corresponding rotating speed of the propeller, the rudder angle and the energy consumption. The accuracy and robustness of the maneuvering control model are validated in a still water scenario and a level 5 sea state scenario. On this basis, a particle swarm optimization (PSO) algorithm is applied to determine the best speed combination. The result shows that sailing at a constant speed is the most energy-saving strategy in still water. Moreover, due to the effects of wind, waves and currents, ships should sail faster when the sea is calm and slower when the sea is rough. These results are consistent with the actual experiences of a captain.


Introduction
Seaborne transportation is one of the main cargo transportation modes, and the only economic choice for the transportation of commodities between continents.There are more than 80,000 vessels, which comprise over 90% of the world's trade traffic [1].Shipping produces carbon emissions, which were responsible for 2.89% of the global CO 2 emissions in 2018, growing from 2.76% in 2012.According to Fourth IMO Greenhouse Gas Study [2], in the next decades, emissions are projected to increase by up to 50% until 2050 relative to their levels in 2018.Furthermore, fuel costs are by far the largest portion of the operating costs of vessels, and a little decrease in fuel consumption can result in considerable savings in operational costs.Shipping companies are considering how the fuel efficiency of their vessels can be improved in order to reduce costs and carbon emissions [3].The academic community has responded to this strong demand.Vettor and Soares [4] developed a ship weather-routing system.Their system is able to optimize the route between two ports, minimizing fuel consumption, the duration of voyages and the risks related to rough weather; this trade-off between factors is governed by the relative importance given to each of these goals by shipmasters.In the same year, they applied their system to plan the route of a fishing vessel in coastal waters [5].Elkafas and Shouman [6] studied the potential energy efficiency and environmental benefits of speed reduction measures via an energy efficiency design index (EEDI), an energy efficiency operational indicator (EEOI) and ship emissions calculation models, as recommended by the IMO.Similarly, the research of Taskar and Andersen [7] pointed out that keeping yearly transport work constant has a notable influence on the fuel-saving potential of a speed reduction strategy.Tadros et al. [8] investigated the effect of propeller cups on the reduction in fuel consumption in realistic weather conditions.models.Faieghi et al. [35] investigated the application of a chaos-embedded PSO algorithm for the tuning of fractional-order proportional integral derivative-control controllers used to control the rolling motions of ships.Kang et al. [36] applied the PSO method in their research on the problem of collision avoidance path planning for ships.Hamdi et al. [37] carried out the real-time study of a photovoltaic system with a boost converter using PSO-RBF neural network algorithms in a MyRio controller.
With the development of unmanned ship technology, there will be some autonomous fleets sailing on the sea in the foreseeable future.It is meaningful to study how to save energy based on the characteristics of autonomous navigation ships.In this paper, a shipmaneuvering control model is established based on a sliding mode control method.The total energies and operational commands of the ship for the entire voyage are simulated under different ship speed strategies.Based on these simulations, the PSO method is applied to determine the best ship speed strategy with the minimum value for corresponding energy consumption.Subsequently, the best maneuvering strategy is produced.

Ship Motion Model
For most civil ships, a motion model with three degrees of freedom in the horizontal plane and two actuators, i.e., propeller and rudder, is appropriate.Figure 1 shows the earth-fixed and body-fixed coordinate systems, xyz and x b y b z b .The definitions of state variables in surge, sway and yaw are also presented.Considering the effects of currents, the motion model can be expressed as follows: where ψ is the yaw angle, u and v are the velocity of surge and sway, r is the yaw rate, and u c and v c are the velocity of current.The surge force τ 1 and yaw moment τ 2 are control inputs.m jj (j = 1, 2, 3) is the ship's inertia.d u , d v , d r , d ui , d vi and d ri (i = 1, 2, 3) are the hydrodynamic damping.τ uw , τ vw and τ rw are the external loads from wind and waves.

Controller Design
The control design proposed in this paper was inspired by the dissertation of Wang [38], in which a trajectory-tracking sliding mode controller is designed for underactuated surface vessels.The tracking error can be defined as: ) where x e and y e are the position errors, x d and y d are the positions of tracking target, u e and v e are the speed errors, and α u and α v are expected speeds to be determined.

Controller Design
The control design proposed in this paper was inspired by the dissertation of Wang [38], in which a trajectory-tracking sliding mode controller is designed for underactuated surface vessels.The tracking error can be defined as: The expected speeds u  and v  can be defined as: where k and 2 k are positive coefficients.Then (4) can be expressed as: In order to determine the surge control force 1  , a first-order exponential sliding sur- face is set as follows: ( ) where  is positive coefficient.According to Equations ( 1)-( 3), the following is obtained: . .
The expected speeds α u and α v can be defined as: where k 1 and k 2 are positive coefficients.Then (4) can be expressed as: .
In order to determine the surge control force τ 1 , a first-order exponential sliding surface is set as follows: where λ 1 is positive coefficient.The derivative of ( 7) can be expressed as: .
y e sin ϕ + k 1 x e r sin ϕ − k 2 y e r cos ϕ.
The reaching law of sliding mode can be taken as: .
where sat(s 1 ) is a transition function defined as: where ε 1 , ξ 1 and ∆ 1 are positive coefficients.Following from Equations ( 8) and ( 9), the surge control force τ 1 is given as: In order to calculate the yaw control moment τ 2 , the second-order exponential sliding surface is set as follows: The derivative of ( 12) can be expressed as: . s 2 = . . . . .
The reaching law of sliding mode can be taken as: .
where sat(s 2 ) is as follows: where ε 2 , ξ 2 and ∆ 2 are positive coefficients.The yaw control moment τ 2 is given as:

Propeller Model
The propeller thrust T P and propeller torque Q P can be written as [39]: where t P0 is thrust deduction coefficient in straight running condition, ρ is the density of water, n is rotating speed of propeller, D is propeller diameter, J PP is added moment of rotary inertia of propeller.The thrust coefficient K T (J P ) and torque coefficient K Q (J P ) can be computed with open-water curves as functions of advanced coefficient J P , which is expressed as: where ω P is effective propeller wake fraction.

Rudder Model
The rudder forces and moments, including the hydrodynamic forces and moments induced on ship's hull by rudder action, namely X R , Y R and N R , can be written as follows [40]: where δ is rudder angle, α H is ratio of hydrodynamic force, x R is x-coordinate of point on which rudder force Y P acts, and F N is rudder normal force, which can be written as follows: where λ is aspect ratio of rudder, A R is rudder area, and V R and α R are the effective rudder inflow speed and angle, respectively.

Calculation of Maneuvering Commands and Energy
Under general navigation conditions, rudder is the only device providing the control moment, as shown by the following equation: Accordingly, the rudder angle is determined.Afterwards, the rudder force in xcoordinate of ship can be simulated.Similarly, the thrust of propeller and the rudder force in x-coordinate provide the control force: Equation (23) gives the rotating speed of propeller.Then the torque of propeller is simulated by Equation (18).The total energy consumption of propeller for the entire voyage can be simulated as the time integration of power:

PSO Algorithm
In navigation, a route consists of multiple legs: S = (S 1 , S 2 , S 3 , . . .).In the limitation of sailing time, different speed combinations V = (V 1 , V 2 , V 3 , . . . result in differing energy consumption.In this paper, PSO algorithm is applied to determinate speed combination which corresponds to the minimum energy consumption.
The core formula of PSO algorithm is expressed as follows: where i = 1, 2 . . .n is the number of particles, j = 1, 2 . . .m is the number of iterations, U is the update velocity of speed combination V, ω is the inertia coefficient of update velocity, c 1 and c 2 are learning factors, rand(0, 1) is random number between 0 and 1, V j pbest is the best speed combination in the jth iteration and V j gbest is the best speed combination in first j iterations.

Solution Process
In order to define the optimization problem, the procedure for determining the best ship speed combination is described in form of pseudocode as follows: 1.

3.
Read upper and lower limits of speed: V min , V max .4.
Read optimization parameters: ω, c 1 , c 2 , and N, where N is the maximum number of steps of optimization iteration.

5.
Perform for i ≤ N.
Update speed: if Update ship maneuvering target status: r .9.
Calculate the output energy of propeller E meeting the requirements of control target status using Equations ( 1)-( 24).10.Update the minimum energy consumption E best and the corresponding best speed combination V best , i = i + 1. 11.Output the final speed combination V f inal .

Result and Analysis
In this paper, a large merchant ship is the subject of our model.The main parameters of the hull, propeller and rudder are listed in Table 1 and the parameters of the optimization model are listed in Table 2.The model runs on a high-performance server with 80 i5 processors.The total calculated time is about 13 min.Considering that shipowners expect the response time to be half an hour, the calculation efficiency of this current model satisfies the application requirement.Figure 2    The accuracy and robustness of the maneuvering control model are the basis of the speed optimization.In this paper, two navigation scenarios are applied for validation.The speed combination is set as: ( ) Figure 3 shows the results of sailing in the still water scenario.It is found that the calculated track and heading coincide with target ones well.The route length is more than 1740 n miles, while the maximum distance error is less than 0.02 n mile.Moreover, the speed error is less than 0.006 kn.A large increase in the error occurs at the moment the ship turns.The main reason is that the planned route is a combination of multiple broken lines, while the actual route is a continuous smooth curve.Figure 4 shows the results of Each leg is a rhumb line and the ship sails at a constant speed along it.The rhumb line's thematic calculation [41] is applied for the conversion between the geographical coordinates and plane coordinates.
The accuracy and robustness of the maneuvering control model are the basis of the speed optimization.In this paper, two navigation scenarios are applied for validation.The speed combination is set as: V = (14, 12, 15, 13, 11)kn ( 27) Figure 3 shows the results of sailing in the still water scenario.It is found that the calculated track and heading coincide with target ones well.The route length is more than 1740 n miles, while the maximum distance error is less than 0.02 n mile.Moreover, the speed error is less than 0.006 kn.A large increase in the error occurs at the moment the ship turns.The main reason is that the planned route is a combination of multiple broken lines, while the actual route is a continuous smooth curve.Figure 4 shows the results of sailing with the effects of the wind, waves and currents.The effect of currents is added as a velocity vector in the earth-fix coordinate system.The velocity vector is as follows: (1 sin(t/12h), 1 cos(t/12h), 0)kn (28) where h stands for the number of hours.The wind speed is 8.0~10.7 m/s and the wave height is 2.5~4 m under level 5 sea conditions.According to IMO ISO15016:2015 [42], the amplitude of the wind load and wave load on the large merchant ship is 10 6 ∼10 7 N.To indicate the influence of a level 5 sea state, which is quite rough for navigation, the total load of the wind and waves are set as: −4 × 10 6 sin(t/2d), 1 × 10 5 sin(t/2d), 2 × 10 8 sin(t/2d) N (29) where d stands for the number of days.
the transverse load of the current by turning the ship's heading, which is controlled by the rudder.Due to the heading change, the calculated track matches the target track well.
The maximum distance error is less than 0.07 n mile and the speed error is less than 0.006 kn.It shows that the maneuvering control model can still ensure high accuracy under a level 5 sea state.In repeated tests, the model outputs the optimization results within the expected time, which proves the model is robust.To verify the control algorithm, the PSO algorithm is applied to determine the best speed combination under each navigation scenario.The time limitation is that the sailing time is 6 days, which corresponds to the weather forecast time.The speed limitation is as follows: The calculated heading changes periodically near the target heading.This is because the ship does not have a separate lateral controller during navigation and can only balance the transverse load of the current by turning the ship's heading, which is controlled by the rudder.Due to the heading change, the calculated track matches the target track well.The maximum distance error is less than 0.07 n mile and the speed error is less than 0.006 kn.It shows that the maneuvering control model can still ensure high accuracy under a level 5 sea state.In repeated tests, the model outputs the optimization results within the expected time, which proves the model is robust.
To verify the control algorithm, the PSO algorithm is applied to determine the best speed combination under each navigation scenario.The time limitation is that the sailing time is 6 days, which corresponds to the weather forecast time.The speed limitation is as follows: 10 kn ≤ V ≤ 16 kn (30) Figure 5 shows the optimization result of the still water scenario.The best speed combination is V = (12.1, 12.1, 12.1, 12.1, 12.1)kn, which means that the ship sailing at a constant speed is the most energy-saving in still water.According to the survey, captains tend to keep a constant speed under calm sea conditions.The simulated result is consistent with the actual experience of captains.Correspondingly, the rotating speed of the propeller remains at 45.1 rpm.The rudder is steered only when the ship is turning.Figure 6 shows the optimization result under the effects of the wind, waves and currents.The best speed combination is V = (14.8, 11.1, 11.1, 11.1, 13.8)kn.It shows that ships should sail slower to save energy under rough sea conditions, because the energy consumption changes sharply with the ship speed.In contrast, ships should sail faster under calm sea conditions to meet the requirements for the total sailing time.Under these conditions, the energy consumption will not increase too much.With this speed strategy, the energy consumption of voyages can be lowered.This result is also consistent with the actual experiences of many captains.The energy consumption of the best speed combination is 1% lower than that of sailing at a constant speed.It is a considerable optimization effect for a large shipping company, which means that millions of USD can be saved.The rotating speed of the propeller and the rudder angle both show obvious responses to the changes in the wind, waves and currents.
the propeller.These defects lead to additional energy consumption.Regarding unmanned ships, the rotating speed of the propeller command and the rudder angle command can be executed synchronously by a machine.In this way, this optimization model can be helpful.At present, due to the crew's operating habits, the rotating speed of the propeller does not change frequently.Moreover, the steering engine is not operated in sync with the propeller.These defects lead to additional energy consumption.Regarding unmanned ships, the rotating speed of the propeller command and the rudder angle command can be executed synchronously by a machine.In this way, this optimization model can be helpful.

Figure 1 .
Figure 1.The earth-fixed and body-fixed coordinate systems, xyz and


are expected speeds to be deter- mined.According to Equations (1)-(3), the following is obtained:

Figure 1 .
Figure 1.The earth-fixed and body-fixed coordinate systems, xyz and x b y b z b .

Figure 2 .
Figure 2. A section of route with five legs and six waypoints.

Figure 2 .
Figure 2. A section of route with five legs and six waypoints.

Figure 3 .
Figure 3. Results of sailing in the still water scenario.(a) Comparison of the track, (b) comparison of heading, (c) distance error, and (d) speed error.

Figure 3 .
Figure 3. Results of sailing in the still water scenario.(a) Comparison of the track, (b) comparison of heading, (c) distance error, and (d) speed error.J. Mar.Sci.Eng.2023, 11, x FOR PEER REVIEW 10 of 13

Figure 4 .
Figure 4. Results of sailing under the effects of the wind, waves and currents.(a) Comparison of the track, (b) comparison of heading, (c) distance error, and (d) speed error.

Figure 4 .
Figure 4. Results of sailing under the effects of the wind, waves and currents.(a) Comparison of the track, (b) comparison of heading, (c) distance error, and (d) speed error.

Figure 5 .
Figure 5. Optimization result of still water scenario.(a) Speed distribution, (b) rotating speed of propeller command, and (c) rudder angle command.

Figure 6 .
Figure 6.Optimization result under the effects of the wind, waves and currents.(a) Speed distribution, (b) rotating speed of propeller command, and (c) rudder angle command.

Figure 5 .
Figure 5. Optimization result of still water scenario.(a) Speed distribution, (b) rotating speed of propeller command, and (c) rudder angle command.

Table 1 .
Main parameters of the hull, propeller and rudder.

Table 2 .
Parameters of the optimization model.

Table 2 .
Parameters of the optimization model.