# Differential Evolution Algorithm-Based Iterative Sliding Mode Control of Underactuated Ship Motion

Authors: Huaran Yan; Yingjie Xiao; Qinrong Li; Renqiang Wang
Journal: Computational Intelligence and Neuroscience
 (2021)

---

## Abstract

The differential evolution algorithm (DEA)-based iterative sliding mode control (ISMC) method was proposed for the path tracking problem of three-degree-of-freedom (3-DoF) underactuated ships under external interference, with the nonlinear separate model proposed by mathematical model group (MMG). To improve control quality and enhance robustness of the control system, a swarm intelligence optimization algorithm is used to design a controller parameter optimization system. The DEA was adopted in the system to solve the minimum system evaluation index function, and the optimal controller parameters are acquired. Considering the impact of chattering on the actual project, a chattering measurement function is defined in the controller design and used as an input of the controller parameter optimization system. Finally, the 5446TEU container ship is carried out for simulation. It is verified that the designed controller with strong robustness can effectively deal with the disturbances; meanwhile, the chattering of the output is significantly reduced, and the control rudder angle signal conforms to the actual operation requirements of the ship and is more in line with the engineering reality.


---

## Body

## 1. Introduction

With the continuous improvement of ship automation requirements, the problem of underactuated ship motion control has gradually attracted the attention of scholars. The nonlinear control method of under-driven ships can well improve the maneuverability of ships and improve the economy and safety of ship operations. At the same time, with the continuous development of the marine economy, it is necessary to complete complex tasks such as submarine pipeline laying, marine resource exploration, marine drilling platform positioning, and ocean replenishment, which requires more and more precise ship control. Therefore, it has important theoretical significance and practical value to study motion control of under-driven surface ships.In recent years, with the increasing requirements for trajectory control, more ship trajectory tracking control has been applied to practical engineering, and there are more and more research studies on trajectory tracking. Michiel [1] used the output feedback method to track the preset ship trajectory, and finally the simulation was realized on a 1 : 70 actual model. Ghommam [2] used the backstepping method to achieve global gradual stability and realize the trajectory tracking of under-driven ships. Fu Mingyu [3] designed a semiglobal uniformly exponentially stable controller. However, the shortcoming of literatures [1–3] is that they are all under ideal conditions; that is, there is no interference or just constant interference. Yang also used the backstepping method to achieve trajectory tracking under time-varying interference [4]. Annamalai [5] used model predictive control, adapted to environment online, and controlled sudden disturbance of ship, which has a good effect.There are also considerable research studies of ship track tracking. Some scholars use sliding mode methods and iterative sliding modes to deal with uncertainty. Cui et al. [6] proposed to combine the state observer with adaptive technology and designed the controller through the Lyapunov theory. The auxiliary system is used directly to solve the input saturation problem for ship control with input saturation limitation to achieve the desired effect [7]. Literature [8] used the minimum parameter method to approximate the unknown items of the model and replaced the online learning of the ownership value with the norm online learning of the neural network weight, which reduces the calculation amount of the controller and obtains a good control effect [9]. Literature [10] used sliding mode control technology to develop the scheme of waypoint tracking for an underactuated autonomous underwater vehicle. The paper also proposes a method to develop robust controllers with model uncertainty and different types of disturbances.The above research on ship path tracking control basically uses the Fossen model. The control variables obtained by using the Fossen model are the lateral thrust, longitudinal thrust, and turning of the ship. For a full-drive ship, these control forces and moments need to be optimally calculated and then distributed to each propeller to achieve control. For single-propeller and single-rudder under-driven ships, these control forces and moments need to be further converted and mapped to rudder angle and diesel throttle. Therefore, the control value obtained by using the Fossen model is far from the actual engineering application of the ship control system [11].For this, the trajectory tracking control for underactuated ship was designed based on the separation model proposed by mathematical model group (MMG) [12]. By defining a control variable chattering measurement variable and a reinforced learning signal, the parameters of neural network can be adjusted online, which can further suppress the chattering effect of the control variable. In reference to the problem of underactuated ship trajectory tracking control, with the reinforcement learning method [13], the neural network-based adaptive ISMC method is proposed for ship with the MMG model. The design of the controller directly obtains the control variables such as diesel engine speed and rudder angle, which promotes engineering applications. Shen et al. [14] proposed a minimum parameter adaptive recursive sliding mode control strategy, in the time-varying range; the output limited range is effectively expanded, which is more in line with actual offshore engineering applications [15].With the development of intelligent control technology [16], some intelligent control methods [17] are continuously integrated into the towing-driven track control. For example, in the design of dynamical loop, Zhang et al. [18] designed the adaptive law of neural network weights and realized the online estimation of system nonlinearity and the design of actual control law. The effective tracking of the path of a 32 m long single under-driven ship is realized. Aiming at the problem of difficult parameter tuning and poor anti-interference ability in conventional nonlinear autodisturbance rejection control in ships’ trajectory control, neural network is adopted to identify the system, and the two parameters have a greater influence on the overall control effect [19]. Aiming at the problems of complex control environment, low controller stability, and large amount of algorithm calculations faced by the track tracking control of smart ships, the deep deterministic strategy gradient algorithm is used as the realization of the controller, and the offline learning method is used to train the controller. To achieve precise control of tracking [20], Dai [21] used the turbidity particle swarm algorithm with shrinkage factor to solve multiple parameter optimization problems in the iterative sliding mode controller for automatic berthing of under-driven ships and realized the automatic berthing of 5446TEU container ships under the disturbance of wind and waves through computer simulation. In literature [22], the adaptive sliding mode control for ship heading is designed with the genetic optimization algorithm. In underactuated ship motion control scheme, the sliding mode surface feedback method is proposed for ship motion. It can be seen from literatures [16–20] that a better control effect can be achieved after using intelligent methods to optimize the controller parameters.Inspired by the observations mentioned above, the paper introduces the hyperbolic tangent function to design the iterative sliding mode system and proposes the differential evolution algorithm based an adaptive ISMC method for ship [23]. The method is applied to path tracking of underactuated ship. In addition, a control parameter optimization system is constructed to improve the control quality and enhance robustness of the control system. The system takes the status of track yaw, heading deviation, and rudder angle chattering as input, and the differential evolution algorithm is adopted to solve the minimum output optimal controller parameters. Finally, with a type of container ship as the goal, the ship path tracking control simulation is carried out, under the disturbance environment such as wind and waves, and the simulation results of the iterative sliding mode controller are compared and analyzed.


## 2. Problem Description

At present, the Fossen ship motion model [24] is used to study ship trajectory tracking control. The calculated output is usually three control variables of ship longitudinal and lateral thrust and turning moment. For conventional under-driven ships with one propeller and one rudder, these three control variables need to be converted. It is the set speed of the diesel engine and the command rudder angle of the steering gear. Therefore, compared with the actual application of ship control, the control quantity designed by the Fossen model cannot be used directly. In order to be consistent with the actual engineering application, this article will design the controller based on the MMG separate model to directly obtain the control variables such as diesel engine rotation speed and rudder angle. The MMG model [14, 15] of the horizontal motion of the under-driven ship can be expressed as follows:(1)u˙=XH+XP+XR+Xwind+Xwave+m+myvrm+mx,v˙=YH+YP+YR+Ywind+Ywave−m+mxurm+my,r˙=NH+NP+NR+Nwind+NwaveI+J,x˙=ucosφ−vsinφ+uccosφc,y˙=vcosφ+usinφ+ucsinφc,φ˙=r,where XH, YH, and NH, which are generated by the fluid power of a bare hull, respectively, represent the longitudinal force, lateral force, and rotational moment; XP, YP, and NP, respectively, represent the longitudinal force, lateral force, and rotational moment of propeller; XR, YR, and NR stand for the longitudinal force, lateral force, and rotational moment of rudder, respectively; Xwind, Ywind, and Nwind, which are produced by wind, respectively, represent the longitudinal force, lateral force, and rotational moment; Xwave, Ywave, and Nwave, which are produced by wave, respectively, represent the longitudinal force, lateral force, and rotational moment; m represents the ship’s mass; and mx and my represent the additional ship’s mass in the longitudinal and transverse directions. I and J represent the moment of inertia of the ship, respectively; u stands for the ship’s longitudinal speed; uc stands for the current speed; v stands for the ship’s lateral speed; r stands for the rotation speed; x and y stand for the ship’s longitudinal and lateral position; φ stands for the ship’s heading; and φc stands for the current direction.In the realization of ship trajectory tracking control, the definition of trajectory error is very important. The definition of trajectory error in this article is shown in Figure1, where Oxd,yd stands for the preset point of trajectory in geographical coordinates; Gx,y stands for the actual ship point of tracking trajectory in ship’s coordinates; D stands for the distance of two points; φr stands for the expected ship’s heading; and xe and ye stand for the deviation of longitudinal and lateral of trajectory. If the two errors of xe and ye can be controlled near zero, then it can be considered that the ship is tracking the expected trajectory.Figure 1
Ship trajectory tracking error.Assuming that the expected point of the trajectory points to the actual point and the direction angle isθ, the following equation is obtained from Figure 1:(2)φr=atany˙dx˙d,θ=atany−ydx−xd,ρ=y−yd2+x−xd2,xe=ρcosθ−φr,ye=ρsinθ−φr.Then, the design goal of the system controller is as follows: for the ship’s MMG model as equation (1) and the ship’s trajectory tracking error as equation (2), an adaptive tracking control method is designed to ensure the asymptotic convergence of all signals of the system at the same time and the under-driven ship can track the preset trajectory in a limited time.


## 3. Design of Tracking Controller of Ship Motion

The following theorem is given first:Theorem 1.
Consider a zero-order nonlinear scalar system:(3)y=fx,u,t,where x represents the state variables, u represents the input, and y represents the output.Consider the following three assumptions:(1)
The state function is defined asx˙=gu, and gu represents continuous function with boundness(2)
The bounded nonlinear continuous function is regarded asfx,u,t with boundness(3)
The sign of the gain of the control input is known, and it is assumed that∂f/∂u>0Construct the following feedback control law:(4)u˙=−kpy−εtanhy,where kp>0 and ε>0.Then, system (3) can achieve uniform asymptotic stability under the control law (4).Proof.
Taking the derivative of equation (4), it can be obtained that(5)y˙=∂f∂xx˙+∂f∂uu˙.
Construct the Lyapunov function as(6)Vy=12y2.
Taking the derivative of equation (6) and substituting equations (4) and (5), it can be referred that(7)V˙y=12y2=yy˙=y∂f∂xx˙+∂f∂uu˙=∂f∂xguy+∂f∂u−kpy−εtanhyy=∂f∂u−kpy−εtanhy+∂f∂xguy≤−∂f∂ukpy+εtanhy−∂f∂xguy.
Considering∂f/∂u>0, the following inequality is obtained with constants kp and ε:(8)∂f∂ukpy+εtanhy−∂f∂xgu>0.
Further, the following results can be obtained:(9)V˙y<0.
Therefore, with the Lyapunov theory, the zero-order nonlinear scalar system in (3) is uniformly asymptotically stable, and Theorem 1 holds.


### 3.1. Design of ISMC

Construct fourth-order sliding mode switching surface function with hyperbolic tangent function.(10)σ1ye=k1tank0ye+y˙e,σ2σ1,φe=φe+k2∫tanσ1dt,σ3σ2=k3tanσ2+σ˙2,σ4σ3=k4tanσ3+σ˙3,where k0∼k4 ∈ R+ and k3≤k4.It is considered thatu≫v, and the longitudinal and lateral components of the rudder force are much smaller than the torque, and the angle is smaller than the right angle. Therefore, first try to derive the monotonic function relationship between the constructed highest-order sliding mode surface σ4 and the rudder angle δ, then use Theorem 1 to design the feedback control law, and prove that the track deviation ye converges asymptotically.According to the mathematical relationship of equation (10), we can know that σ4⟶0 at that time, there is σ3⟶0 and σ3⟶0. When σ2⟶0, there is(11)φe⟶−k2∫tanσ1dt,(12)φ˙e⟶−k2tanσ1.According to the MMG ship model in equation (1), it can be obtained by expanding σ1 as follows:(13)σ1=k1tanhk0ye+vcosφe+usinφe+ucsinφc,where σ1 is revisited as output y, in equation (4). Considering that σ1 is controlled by φe, in equation (13), φe can be regarded as the control variable u. It is obtained that σ1 is a continuous bounded nonlinear function. It can be referred to as follows:(14)∂σ1∂φe=ucosφe−vsinφe.In order to prevent the ship from sailing in the reverse direction, it can be assumed that, at initial time, the heading deviation angleφ is set as φ<π/2. It is known that u≫v by assumption (1). Therefore, it can be obtained that equation (14) satisfies the condition, which is greater than zero based on the nature of trigonometric function. Further, the control law is designed as(15)u˙=φ˙e=−k2tanhσ1.According to Theorem1, then with the control law in equation (15), equation (14) can achieve asymptotic stability, that is, σ1⟶0. From the first equation of equation (11), it can be obtained that(16)y˙e⟶−k1tanhk0ye.Therefore, the track deviationye is also asymptotically stable. So, if only σ4⟶0 is realized, the track deviation ye can be guaranteed to converge stably.In order to achieveσ4⟶0, the following sliding mode surface feedback control law is adopted:(17)δ˙=−k5σ4−εtanhσ4,where k5∈R+ and ε∈R+.After fully expandingσ4 in equation (10), it can be referred that(18)σ4σ3=k4tanσ3+k3r+k2tanhσ1coshσ22+k2k0k1y˙e/coshk0ye2+y¨ecoshσ12+NH+NP+NR+Nwind+NwaveIzz+Jzz.Calculating the partial derivative of equation (18) for δ, considering that only the rudder torque NR, the rudder lateral component force XR, and the rudder longitudinal component force YR are related to the input rudder angle δ, it can be obtained that(19)∂σ4∂δ=∂∂δNRIzz+Jzz+∂∂δk2y¨ecoshσ12=∂∂δNRIzz+Jzz+k2∂XR∂δsinφ/m+mxcoshσ12+k2∂YR∂δcosφ/m+mycoshσ12,where NR=hx⋅cosδ⋅sinαR, hx stands for a function with positive value, δ stands for the rudder angle, and αR stands for the effective angle of attack, which is related to δ. So, ∂NR/∂δ>0 is established, with constrained δ∈−35°,35°.Considering the actual steering, the longitudinal and lateral components of rudder forceXR and YR and their gain are much smaller than the torque NR.According to the boundedness of trigonometric functions and hyperbolic trigonometric functions, there isk2 such that the following equation holds:(20)∂σ4∂δ>0.Therefore, from equations (17) and (20) and Theorem 1, it can be obtained that σ4 converges to zero asymptotically, so as to ensure the asymptotic convergence of the track deviation ye and realize the path tracking target.


### 3.2. Optimization of Controller Parameters Based on Differential Evolution Algorithm

From the ship’s handling characteristics, it can be known that the ship’s roll and interference will cause the control rudder angle to fluctuate back and forth. If the controller design is unreasonable or the parameters are not appropriate, the frequency and amplitude of such fluctuations will be increased. To prolong the life of equipment and to make control effect close to actual steering requirements, the chattering output of the rudder should be reduced as much as possible. Therefore, if the designed ISMC is adaptive, the system control performance will be improved.It is obtained that the parameterk5 has great impact on quality and robustness of control system in equation (17). Similarly, k0∼k4 will also have a certain influence on control performance. So, the optimization problem in this paper is to find the best controller parameters in the case of external disturbances, and the designed optimization algorithm can make these parameters adaptive and dynamic adjustment when the external disturbances change.For this reason, the abovementioned control parameter optimization system is designed to adjust the controller parametersk0∼k5 by the change of the track deviation. Meanwhile, a kind of chattering measurement variable is defined, with the differential evolution algorithm (DEA), and the online optimization of the system is constructed [25, 26] to reduce the output chattering amount of the control input. So, DEA-based adaptive ISMC is designed for ship’s path tracking, as shown in Figure 2. In the parameter optimizer, an optimization system [27, 28] is designed, which takes the track deviation ye as the input to realize the adaptive adjustment of the control parameters k0∼k5. Its input is the track deviation ye and the control rudder angle δ˜.Figure 2
The structure of DEA-based adaptive ISMC for ship’s path tracking.The parameter optimization problem of controller is to determine a set of appropriate initial parameters and select indicators to measure whether the initial values of the parameters are optimal. Select the following evaluation indicators:(21)J=1N∑n=1Nλ1⋅ye2+λ2⋅φe2+λ3⋅δ˜2+λ4⋅r2,ye≤D,where J is the performance index, ye is the track deviation, φe is the heading deviation, δ˜ stands for the rudder angle chattering, r represents the rate of turning (ROT), N represents the total number of iteration, and λ1∼λ4 stand for the coefficients. Its size is generally based on the environmental conditions of the sailing waters.The measurement of rudder angle buffetingδ˜ in equation (21) is calculated using the following publicity [15]:(22)δ˜=M−M¯M¯,where M¯ represents the expected rudder angle chattering value, which depends on the designer’s requirements for system chattering. M is defined as the cumulative sum of the absolute value within n iterations. If the value of M increases in n cycles, it means that chattering increases; conversely, if the value of M decreases in n cycles, it means that chattering decreases. Therefore, the change of M can be adjusted. The calculation of M is described as(23)Mt=∑t=0nρklδt−lT−δt−l−1T,where T represents the simulation period, δt−lT and δt−l−1T are the rudder angle values of different periods before and after, n is the number of accumulation (take n=50), and ρkl is defined as follows:(24)ρkl=0,δklT−δkl−1T⋅δkl−1T−δkl−2T≥0,1,δklT−δkl−1T⋅δkl−1T−δkl−2T<0.When chattering occurs in the output of the system, the change trend of the output will change, in equation (24). Combined with equation (23), the chattering change of output will be acquired in last cycle.The complete tracking route is used as the optimized data. The process of optimizing parameters is shown in Figure3. The transition between the DEA and the Simulink model is the individual gene (parameters of ISMC) and fitness of individual. The DEA module assigns individuals to parameters by receiving the performance index. The Simulink module exports the performance index by receiving individuals corresponding to parameters.Figure 3
The diagram of optimizing parameters of ISMC by DEA.In detail, the process of optimizing parameters of DEA-based ISMC is described.Step 1.
Initialize gene population and parameters. Randomly generate an initial gene individualxi0 as follows:(25)xi,00=randixU−xL+xL,where xU and xL stand for the individual’s upper and lower bounds, and the range of randi is 0,1.Step 2.
The initial gene population is assigned tok0∼k5, and the parameters are transmitted to the controller to control the ship to perform the track tracking operation and then calculate the performance index function J according to equation (21) and further judge whether the termination condition is met. If the termination conditions are met, the evolution ends and the algorithm exits; otherwise, it proceeds to Step 3.Step 3 (mutation operation).
Randomly selectxp1,j, xp2,j, and xp3,j three individuals different from xi,j from j-th generation population to perform mutation operations to generate a variant gene individual hi,jt+1.(26)hi,jt+1=xp1,jt+Fxp2,jt−xp3,jt,where p1∼p3 are numbers, and i≠p1≠p2≠p3; G is evolutionary algebra, j<G; and F⋅ is a factor.Step 4 (cross operation).
Generate new individualvit+1 with variant individual hi,jt+1 and evolution individual xi,jt, which can enhance diversity.(27)vi,jt+1=hi,jt+1,randi≤CR,xi,jt,randi>CR,where CR stands for probability and CR∈0,1.Step 5.
With the greedy strategy, select and operate to generate next-generation population individuals.xit+1 is chosen by f⋅. Generate next-generation particles, and return to Step 2, and repeat the evolution operation until the maximum evolution algebra G is reached.(28)xit+1=vit+1,fvit+1≤fxit,xit,fvit+1>fxit,where f⋅=1/J and J represents performance index function.


## 3.1. Design of ISMC

Construct fourth-order sliding mode switching surface function with hyperbolic tangent function.(10)σ1ye=k1tank0ye+y˙e,σ2σ1,φe=φe+k2∫tanσ1dt,σ3σ2=k3tanσ2+σ˙2,σ4σ3=k4tanσ3+σ˙3,where k0∼k4 ∈ R+ and k3≤k4.It is considered thatu≫v, and the longitudinal and lateral components of the rudder force are much smaller than the torque, and the angle is smaller than the right angle. Therefore, first try to derive the monotonic function relationship between the constructed highest-order sliding mode surface σ4 and the rudder angle δ, then use Theorem 1 to design the feedback control law, and prove that the track deviation ye converges asymptotically.According to the mathematical relationship of equation (10), we can know that σ4⟶0 at that time, there is σ3⟶0 and σ3⟶0. When σ2⟶0, there is(11)φe⟶−k2∫tanσ1dt,(12)φ˙e⟶−k2tanσ1.According to the MMG ship model in equation (1), it can be obtained by expanding σ1 as follows:(13)σ1=k1tanhk0ye+vcosφe+usinφe+ucsinφc,where σ1 is revisited as output y, in equation (4). Considering that σ1 is controlled by φe, in equation (13), φe can be regarded as the control variable u. It is obtained that σ1 is a continuous bounded nonlinear function. It can be referred to as follows:(14)∂σ1∂φe=ucosφe−vsinφe.In order to prevent the ship from sailing in the reverse direction, it can be assumed that, at initial time, the heading deviation angleφ is set as φ<π/2. It is known that u≫v by assumption (1). Therefore, it can be obtained that equation (14) satisfies the condition, which is greater than zero based on the nature of trigonometric function. Further, the control law is designed as(15)u˙=φ˙e=−k2tanhσ1.According to Theorem1, then with the control law in equation (15), equation (14) can achieve asymptotic stability, that is, σ1⟶0. From the first equation of equation (11), it can be obtained that(16)y˙e⟶−k1tanhk0ye.Therefore, the track deviationye is also asymptotically stable. So, if only σ4⟶0 is realized, the track deviation ye can be guaranteed to converge stably.In order to achieveσ4⟶0, the following sliding mode surface feedback control law is adopted:(17)δ˙=−k5σ4−εtanhσ4,where k5∈R+ and ε∈R+.After fully expandingσ4 in equation (10), it can be referred that(18)σ4σ3=k4tanσ3+k3r+k2tanhσ1coshσ22+k2k0k1y˙e/coshk0ye2+y¨ecoshσ12+NH+NP+NR+Nwind+NwaveIzz+Jzz.Calculating the partial derivative of equation (18) for δ, considering that only the rudder torque NR, the rudder lateral component force XR, and the rudder longitudinal component force YR are related to the input rudder angle δ, it can be obtained that(19)∂σ4∂δ=∂∂δNRIzz+Jzz+∂∂δk2y¨ecoshσ12=∂∂δNRIzz+Jzz+k2∂XR∂δsinφ/m+mxcoshσ12+k2∂YR∂δcosφ/m+mycoshσ12,where NR=hx⋅cosδ⋅sinαR, hx stands for a function with positive value, δ stands for the rudder angle, and αR stands for the effective angle of attack, which is related to δ. So, ∂NR/∂δ>0 is established, with constrained δ∈−35°,35°.Considering the actual steering, the longitudinal and lateral components of rudder forceXR and YR and their gain are much smaller than the torque NR.According to the boundedness of trigonometric functions and hyperbolic trigonometric functions, there isk2 such that the following equation holds:(20)∂σ4∂δ>0.Therefore, from equations (17) and (20) and Theorem 1, it can be obtained that σ4 converges to zero asymptotically, so as to ensure the asymptotic convergence of the track deviation ye and realize the path tracking target.


## 3.2. Optimization of Controller Parameters Based on Differential Evolution Algorithm

From the ship’s handling characteristics, it can be known that the ship’s roll and interference will cause the control rudder angle to fluctuate back and forth. If the controller design is unreasonable or the parameters are not appropriate, the frequency and amplitude of such fluctuations will be increased. To prolong the life of equipment and to make control effect close to actual steering requirements, the chattering output of the rudder should be reduced as much as possible. Therefore, if the designed ISMC is adaptive, the system control performance will be improved.It is obtained that the parameterk5 has great impact on quality and robustness of control system in equation (17). Similarly, k0∼k4 will also have a certain influence on control performance. So, the optimization problem in this paper is to find the best controller parameters in the case of external disturbances, and the designed optimization algorithm can make these parameters adaptive and dynamic adjustment when the external disturbances change.For this reason, the abovementioned control parameter optimization system is designed to adjust the controller parametersk0∼k5 by the change of the track deviation. Meanwhile, a kind of chattering measurement variable is defined, with the differential evolution algorithm (DEA), and the online optimization of the system is constructed [25, 26] to reduce the output chattering amount of the control input. So, DEA-based adaptive ISMC is designed for ship’s path tracking, as shown in Figure 2. In the parameter optimizer, an optimization system [27, 28] is designed, which takes the track deviation ye as the input to realize the adaptive adjustment of the control parameters k0∼k5. Its input is the track deviation ye and the control rudder angle δ˜.Figure 2
The structure of DEA-based adaptive ISMC for ship’s path tracking.The parameter optimization problem of controller is to determine a set of appropriate initial parameters and select indicators to measure whether the initial values of the parameters are optimal. Select the following evaluation indicators:(21)J=1N∑n=1Nλ1⋅ye2+λ2⋅φe2+λ3⋅δ˜2+λ4⋅r2,ye≤D,where J is the performance index, ye is the track deviation, φe is the heading deviation, δ˜ stands for the rudder angle chattering, r represents the rate of turning (ROT), N represents the total number of iteration, and λ1∼λ4 stand for the coefficients. Its size is generally based on the environmental conditions of the sailing waters.The measurement of rudder angle buffetingδ˜ in equation (21) is calculated using the following publicity [15]:(22)δ˜=M−M¯M¯,where M¯ represents the expected rudder angle chattering value, which depends on the designer’s requirements for system chattering. M is defined as the cumulative sum of the absolute value within n iterations. If the value of M increases in n cycles, it means that chattering increases; conversely, if the value of M decreases in n cycles, it means that chattering decreases. Therefore, the change of M can be adjusted. The calculation of M is described as(23)Mt=∑t=0nρklδt−lT−δt−l−1T,where T represents the simulation period, δt−lT and δt−l−1T are the rudder angle values of different periods before and after, n is the number of accumulation (take n=50), and ρkl is defined as follows:(24)ρkl=0,δklT−δkl−1T⋅δkl−1T−δkl−2T≥0,1,δklT−δkl−1T⋅δkl−1T−δkl−2T<0.When chattering occurs in the output of the system, the change trend of the output will change, in equation (24). Combined with equation (23), the chattering change of output will be acquired in last cycle.The complete tracking route is used as the optimized data. The process of optimizing parameters is shown in Figure3. The transition between the DEA and the Simulink model is the individual gene (parameters of ISMC) and fitness of individual. The DEA module assigns individuals to parameters by receiving the performance index. The Simulink module exports the performance index by receiving individuals corresponding to parameters.Figure 3
The diagram of optimizing parameters of ISMC by DEA.In detail, the process of optimizing parameters of DEA-based ISMC is described.Step 1.
Initialize gene population and parameters. Randomly generate an initial gene individualxi0 as follows:(25)xi,00=randixU−xL+xL,where xU and xL stand for the individual’s upper and lower bounds, and the range of randi is 0,1.Step 2.
The initial gene population is assigned tok0∼k5, and the parameters are transmitted to the controller to control the ship to perform the track tracking operation and then calculate the performance index function J according to equation (21) and further judge whether the termination condition is met. If the termination conditions are met, the evolution ends and the algorithm exits; otherwise, it proceeds to Step 3.Step 3 (mutation operation).
Randomly selectxp1,j, xp2,j, and xp3,j three individuals different from xi,j from j-th generation population to perform mutation operations to generate a variant gene individual hi,jt+1.(26)hi,jt+1=xp1,jt+Fxp2,jt−xp3,jt,where p1∼p3 are numbers, and i≠p1≠p2≠p3; G is evolutionary algebra, j<G; and F⋅ is a factor.Step 4 (cross operation).
Generate new individualvit+1 with variant individual hi,jt+1 and evolution individual xi,jt, which can enhance diversity.(27)vi,jt+1=hi,jt+1,randi≤CR,xi,jt,randi>CR,where CR stands for probability and CR∈0,1.Step 5.
With the greedy strategy, select and operate to generate next-generation population individuals.xit+1 is chosen by f⋅. Generate next-generation particles, and return to Step 2, and repeat the evolution operation until the maximum evolution algebra G is reached.(28)xit+1=vit+1,fvit+1≤fxit,xit,fvit+1>fxit,where f⋅=1/J and J represents performance index function.


## 4. Research on Computer Simulation of Ship Path following Control

In this part, the ship trajectory integration control system designed in section 3 will be verified through computer simulation. Emphasis is placed on the automatic optimization of the iterative sliding mode control parameters by the online optimization system designed by the differential evolution algorithm in the case of external interference so as to realize the adaptive adjustment of the parameters.The paper uses the 5446TEU container ship in [14] as the object to carry out path tracking control simulation to verify the designed controller. At the same time, the wind and wave interference model of the MMG separation ship motion model adopts the calculation method of literature [14]. In the test, the initial coordinates of the ship are (0, 0), and the initial speed is 20 kn. The center of the tracking circle is (2000, 2000), and the radius is 2000 m. At the same time, environmental factors are set as follows: wind speed is 15 m/s; wind direction is 140°; current speed is 2.5 m/s; current direction is 160°; wave height is 4 m, and encounter frequency is 0.6 Hz.The ISMC and the DEA-based ISMC are designed separately, which are used to simulate the ship path tracking. The parameterε in the feedback controller is set to 0.001, and the expected rudder angle chattering value M¯ is set to 0.1. The controller design parameters k0∼k5 are obtained through an optimization system based on the differential evolution algorithm (DEA), and parameters are preset as follows: G=50, CR=0.85, F=0.35, and G=50.The fitness function change curve of the differential evolution algorithm is shown in Figure4, which reflects the evolution process. Figures 5–8 are the curves of the trajectory, trajectory error, rudder angle, and parameter changes during the simulation experiment of the setting circular path tracking under the set working conditions of the ship.Figure 4
The curve of fitness value.Figure 5
The curves of trajectory tracking.Figure 6
Error curves of path tracking.Figure 7
Rudder angle curves of tracking.Figure 8
The parameterk0∼k5 curve of round path tracking.It is obtained that the iterative sliding mode algorithm (ISMA) and the DEA-based iterative sliding mode algorithm (DEA-ISMA) have quickly kept up with the target path, but the tracking error of the ISMA is larger from Figure5. It can be seen more intuitively from Figure 6 that the ISMA method and the DEA-ISMA method are applied to path tracking with a stable time of about 300 s. However, the ISMA method has always had a large error. It is not difficult to find from Figure 7 that the maximum rudder angle of ship using the ISMA is about 20°, while the maximum rudder angle of ship using the DEA-ISMA method is only 12°. Degrees of oscillation of rudder angle are smaller, steering gear will not be excessively worn, and the actual sailing requirements of ship are satisfied. It can be seen from Figure 8 that the parameters k0∼k5 change drastically at the beginning, and the relative amplitude is relatively large. When the path is not tracked, adjust k0∼k5 to a greater extent to reduce the error as soon as possible. After tracking, adjust in a small range. The parameters are only to eliminate chattering, and the DEA-based optimization system realizes the dynamic adjustment of the parameters. It can be obtained that the DEA-ISMA method has better control effect than the ISMA method, which is more stable, more accurate, and more consistent. It is more in line with the actual requirements of the project from Figure 5–8.


## 5. Conclusions

Taking into account the actual engineering requirements of ship path tracking control, starting from the MMG ship model, the idea of swarm intelligence optimization is used for reference, and DEA is proposed. And the DEA-based adaptive ISMC method is applied to path tracking of underactuated ship.The calculation example shows that, compared with the ISMA method, the DEA-ISMA method is more robust, more accurate path tracking, long effective range at the same time, and higher efficiency. Similarly, compared with iterative sliding mode, the rudder angle buffeting obtained by the controller is significantly reduced, which can effectively protect the rudder gear, which is conducive to energy saving and more in line with actual engineering needs.



---

*Source: 4675408-2021-12-08.xml*