A novel active disturbance rejection control with hyperbolic tangent function for path following of underactuated marine surface ships

This paper presents a TADRC method via active disturbance rejection control (ADRC) with hyperbolic tangent function for path following of underactuated surface ships with input constraint, heading rate constraint, parameters uncertainties, as well as environment disturbances. The line of sight (LOS) guidance scheme that computes the desired heading angle on basis of cross tracking error and a look ahead distance, converts path following into heading control, and also renders good helmsman behavior. Moreover, hyperbolic tangent function is introduced to modify the linear extended state observer (LESO) to design a nonlinear observer (TESO) for promoting the estimation performance of the heading, heading rate and total disturbances including parameters uncertainties and environmental disturbances. Then, the linear error feedback control is modified by a nonlinear sliding mode control scheme with hyperbolic tangent function to handle the heading rate constraint and to obtain the better control action. Furthermore, the feedback control law is embedded in a standard Quadratic Programming (QP) cost function to handle the input constraints including rudder saturation and rudder rate limit. Finally, the comparison simulation demonstrates the effectiveness of the proposed method for the underactuated ship’s path following.


Introduction
Path following problem of marine surface ships has attracted more attention from the control and ship engineering community for many years. Path following is one of the typical control scenarios for underactuated ships, which can be described as following a predefined path without temporal constraint. 1 The underactuated nature of these problems, together with the matter of uncertain parameters, external disturbances as well as input constraints, renders the control problem both challenging and interesting. 2,3 Some techniques have been proposed for the control design of path following. The line of sight (LOS) guidance was also widely used in path following. 4,5 The LOS was used by Fossen for path following, which could convert path following into heading control. 6 And it was extended in 7 where a dynamic LOS was proposed to improve the rate of the convergence. After that, a time-varying look ahead distance was exploited in, 8 which could promote the maneuvering behavior and track the desired path faster.
The problems of the rudder constraints, parameters uncertainties, environment disturbances even heading rate constraint, caused path following to be challenging. To cope with the disturbances, a nonlinear disturbance observer was employed in. 9 And the adaptive method was proposed in 10 and 11 to solve the parameters uncertainties and environmental disturbances. Furthermore, the adaptive technique was used in 12 where both the curvature of the path and the disturbance of ocean current were addressed. In, 13,14 radial basis function (RBF) neural network and adaptive law were used to deal with the model uncertainties and disturbances, respectively.
However, the aforesaid methods are so complex relatively that they are hard to be implemented in practice presently. Active disturbance rejection control (ADRC) approach proposed by Han 15 is proved a novel approach to handle the uncertainties and disturbance. Extended state observer (ESO), as the key part of ADRC, realize the system a significant robustness by estimating the total unknown including internal uncertainties and external disturbances in real time. 16 Gao 17 proposed a linear ADRC (LESO) scheme, which adopts a linear ESO (LESO) and proportionalderivative (PD) error feedback control law for easy parameter tuning. In 18 and, 19 the LESO was designed to estimate the sideslip angles. In 20 and, 21 the LESO was designed to tackle both the uncertain dynamics and external disturbances. It is noted that a rapid disturbance estimation requires large LESO gain that is probably exceed the bandwidth of engineering systems, and even high gain observers could cause the peaking phenomenon. The estimation may be less accurate when the error is small, or easily causes large oscillatory when the error is large. An adaptive ESO (AESO) with time-varying gains was design in 22 and, 23 which overcomes the drawbacks of LESO and nonlinear ESO. The hyperbolic tangent function was used in 24 where the derivative peaking phenomenon in conventional LESO was suppressed. Literature 21 presented a nonlinear sliding mode with hyperbolic tangent function to modify the PD control law for the better control action.
In addition to the aforementioned problems, it is also significant to obtain a constrained and smoother control input. In recent years, the MPC algorithm has become the standard optimization method for constrained systems. 25 Considering aforementioned investigations, this paper proposes a modified ADRC (TADRC) via both modified ESO (TESO) and nonlinear sliding mode error feedback control law with hyperbolic tangent function for the ship's path following to promote the performance of control, simplify the design of the ESO parameters and improve estimation accuracy of LESO. The LOS algorithm is employed to design the reference heading angle, so that path following is converted into heading control. Then, a nonlinear sliding mode approach is presented via a cost function, by which the rudder amplitude and rate constraints are handled. Finally, the comparison simulation results illustrate the effectiveness of the designed controller.
The remainder of this paper is organized as follows: the modeling of ship path following is presented in Section 2. Section 3 proposes a TADRC control design method for ship path following on the basis of LOS guidance. The simulation results are conducted and explained in Section 4 followed the conclusions.

Modeling of ship and disturbance
The ship position in the horizontal plane and the motion parameters are shown in Figure 1.
where, u is the heading, r is the heading rate, u is the surge velocity, v is the sway velocity, V = (u 2 + v 2 ) 1/2 is the ground velocity, and b = arctan(v/u) is the drift angle. The ship maneuvering Mathematical Model Group (MMG) was proposed in 1970s, which took the revolution of propeller and the rudder angle as the control input. Consider the environment disturbances, MMG model can be expressed 26 where, m is the ship mass, m x and m y are the additional masses, X H , Y H and N H are the bare hull forces (moment), X P , Y P and N P are the propeller forces (moment), X W , Y W and N W are the wind forces (moment), X Wave , Y Wave and N Wave are the wave forces (moment). It is noted that only the slowly varying forces are counteracted by steering system. The oscillatory motion caused by the first-order wave-induced forces should be prevented from entering the feedback loop. u c and V c are the current set and speed, respectively. I ZZ is the moment of inertia of the ship around the vertical axis, J ZZ the additional moment of inertia, and X R , Y R and N R are the rudder forces (moment) given by where, t R is the coefficient of rudder resistance deductions, a H is the ratio of the hull's additional lateral force to the rudder lateral force caused by steering, x H is the distance from the steering induced hull lateral force center to the ship's center of gravity, and F N is the rudder positive pressure. d is the control rudder angle. |d| 4 35°and |Dd| 4 3-6°/s are the rudder amplitude saturation and rudder rate limit, respectively. The winds (moments) X W , Y W and N W in the dynamics (1) are given 27 by where, r a is the air density, a R is the wind angle of attack, U R is the relative wind speed, A f and A s are the ship frontal and lateral projected areas, respectively. L oa is the ship length overall, C wx (aR), C wy (aR) and C wn (aR) are the nondimensional wind coefficients, respectively. The waves (moments) X Wave , Y Wave and N Wave are given 28 by where, l is the wavelength, x is the encounter angle, r is the seawater density, and a is the wave amplitude, L is the ship length, C Xw (l), C Yw (l) and C Nw (l) are the coefficients related to wave length l, respectively. The assumptions are as follows I. The ship states x, y, u, u, v and r can be measured. II. The generalized disturbance f including parameters uncertainties and environment disturbances is bounded and slowly time-varying, 29 namely | f | 4f max and _ f ' 0. III. The first and second order derivatives of x and y are bounded, namely j _ xj4 _ x max ; j _ yj4 _ y max ; j€ xj4€ x max and j€ yj4€ y max ;

Control of path following
In this paper, the revolution of propeller is set as a constant. The control objective is that, the rudder angle d will be designed to force ship to follow the reference path. And the ship motion model could be simplified by the kinematics and heading model with disturbances for the controller design where, K and T are the manipulability index of ship, d(t) is the total unknowns including the parameters uncertainties and environment disturbances.
Path following controller consist of the reference heading design based on the LOS algorithm and heading control by the nonlinear sliding mode method in the paper. The framework of the control design is shown in Figure 2.
Control design for path following The LOS guidance system Fossen 7 applied LOS schemes to ship path following. LOS guidance principle is used to generate the desired heading angle that is calculated from cross track error y e and a look ahead distance D. The reference heading u d to make the control objects from (x, y, u) to only u, so that is to say, the matter of path following is converted into the heading control. 4 The LOS guidance principle is shown in Figure 3.
where, y e is the cross-track error, u k is the current straight line angle, a is the angle between the adjacent straight paths, R a is the radius of the circle of acceptance for the current waypoint, namely the acceptable radius of tacking the next waypoint, D is the look ahead distance, R is the distance of ship position P (x, y) from LOS position P los . And in order to obtain a variable look ahead distance D, a time-varying radius R here is introduced as  where, c 1 and c 2 are positive parameters. A timevarying look ahead distance D would be achieved using a time-varying R. The smaller LOS angle could reduce overshoot when the ship is nearer to the desired path. Meanwhile, the larger LOS angle could improve convergence rate as the ship is far from the desired path. Thus, the LOS angle will be offered Then, the next waypoints P k + 2 should be chosen when the ship position P (x, y) satisfies Meanwhile, k will be incremented to k=k + 1. This varying radius R a will be determined by the angle a.
Here, a varying radius R a is utilized to improve the behavior of path tracking at waypoints like the action of a good helmsman. Theorem 1., Define a reference heading u d as follows and u e = u À u d , while t ! + }, if u e ! 0, then y e ! 0 Proof: According to the point-line distance formula and Figure 3, the cross tracking error is given where, a k , b k , C k are the current straight line parameters. Derivative equation (10) with respect to time Substitute equation (9) into (11) The Lyapunov function candidate V 1 = (1/2)y e 2 is chosen, derivative V 1 with respect to time Consequently, while t ! +}, if ship heading u tracks the designed u d , namely u e ! 0, then y e ! 0.
The u d is also taken as the reference heading for path following control design in the next section.

Design of the conventional LADRC
Design of the conventional LESO. On the basis of the items 3 and 4 in equation (5), a nonlinear second ship heading dynamic system can be given where, f(u, r, d) denotes the nonlinear dynamics, b is the unknown control gain. Equation (14) can be rewritten as where, f = f(y 0 (t), y(t)), d(t)) + (b À b 0 )d represents the generalized disturbance. b 0 is the estimation of the unknown b, which may be a parameter to be tuned. If f is differentiable, the LESO can be given as follows 17 where, the positive parameters.û, a`andf are the observer states of u, r and f, respectively. l 11 , l 12 and l 13 are the observer bandwidth v o , normally, l 11 = 3v o , l 12 = 3v 2 o , l 13 = v 3 o . The statef will converge to the extended state f if the observer bandwidth are well tuned.
The linear state error feedback law. Once the observer is designed and bandwidth is well tuned, its outputs will track u, r and f, respectively. By canceling the effect of f byf, the ADRC compensates actively for f in real time. 17 The ADRC control law is given as follows where k p and k d are the controller gains with k p = v 2 c and k d = 2v c , and v c is the closed loop natural frequency. Consequently, parameter tuning burden can be reduced as bandwidth regulation, for example, v c and v o . Let Note that with a LESO well-designed, if the estimation errors ofû, andf are ignored, thenû ' u,r ' r andf ' f. Let u e =û À u d , then equation (18) becomes which is a linear state error feedback law.
The control law with hyperbolic tangent function. For the equation (19), let k 1 = k p =k d , then Defined where, s is the phrase locus of u e and u 0 e on the phrase plane, and s may be also taken as a linear sliding mode function.
Linear sliding mode requires faster convergence rate as the larger track error of the system states through the larger and faster control input. However, for the better control action when the track error is large, normally, convergence rate caused by the control input constraint is hard to obtain in the practical engineering system. The system would be stable slowly during the track error is small. Therefore, a nonlinear sliding mode is urgently needed to deal with the drawback of the linear sliding mode, whose characteristic is that the convergence rate increases nonlinearly until it tends to a constant with the increase of tracking error. The nonlinear sliding mode could lead to the better control action in a large scale. So we can choise hyperbolic tangent function that is monotone and bounded as the nonlinear sliding mode function. Defined The feedback control law of system (26) becomes where k 0 and k 1 are positive parameters. If s ! 0, then u 0 e ! Àk 1 tanh (k 0 u e ) and u 0 e 2 (Àk 1 , k 1 ). The maximum convergence rate of the system is limited within (Àk 1 , k 1 ). u e will be convergence as almost fixed rate k 1 when u e is large enough. On the other hand, u e will be convergence as index law when u e is small enough. Currently, the problem of the heading rate constraint was solved and the control action is improved.
The final feedback control law of ADRC with hyperbolic tangent function (TADRC) is Input constraints handled by a cost function d 1 always addresses the rudder amplitude and rudder rate constraints poorly, which even may introduce chattering phenomenon. Hence, d 1 incorporates in a cost function to promote performance of the rudder angle as follows where, n is the historical horizon, Q and G are the weightings, which could adjust the balance between current rudder angle and historical rudder angle. The stability could be still satisfied by adjusting the suitable Q and G. And d 1 (t2i) is the current information of rudder angle, namely, current control law (30) if i = 0. d 1 (t2i) is the historical information of rudder angle if i . 0. The optimal rudder angle d will be obtained by solving the Quadratic Programming (QP) 25 problem with the control input constraints including d min 4d4d max and Dd min 4Dd4Dd max .

Simulation analysis
The parameters of the ship The effectiveness of the designed controller is demonstrated by the comparison simulations. Motor vessel named ''Yulong'' with single propeller and rudder is taken as the example in the simulation, and the ship parameters concerned are shown in Table 1.  Figure 4 shows the two controllers could force ship to follow the reference path because the range of oscillations from the time-varying disturbances are less than 2 m or 10% of ship breadth. Meanwhile, the oscillation range of y TESO is smaller than y LESO . Figure 5 shows the control input of rudder angle with TESO is smoother and less oscillations than the one via LESO. Figure 6 decribes that the estimation errors of both heading angle and heading rate based on the NESO are smaller. Figure 7 shows that the generalized disturbances f could be estimated accurately by TESO, and the estimation errors of f via TESO is also smaller. The  aforesaid results demonstrate that the proposed TESO promoted the estimated accuracy and performance, and outperformed the conventional LESO. Simulation 2: The compared simulations using the proposed TADRC and LADRC, on the basis of LOS guidance method, are used to demonstrate the effectiveness of path following action with the rudder constraints, environment disturbances, as well as parameters uncertainties. The reference paths are computed by connecting the adjacent predefined waypoints   as follows: P 1 (0, 0), P 2 (4000, 0), P 3 (5500, 1000), P 4 (8500, 1000), P 5 (8500, 7500), P 6 (11000, 10000), P 7 (13000, 10000). The initial states: (x, y, u, u, v, r) = (0, 0 m, 0, 7.2 m/s, 0, 0). The environment disturbances: wind speed and time-varying direction are 10m/s and 30°sin(0.01t) + 45°, current velocity and directiongoing are 1 m/s and 5°sin(0.005t) + 45°, wavelength 83m, wave encounter angle u + 135°2 30°sin(0.05t), wave height 3 m. Figure 8 shows that the two control schemes of TADRC and LADRC could force ship to follow the desired path in the case of uncertain parameters and environment disturbances. Moreover, the actual path via TADRC is the same smooth as good helmsman behavior at large angle heading-altering. Figure 9 shows the control input rudder angle via TADRC is smoother and less oscillations than the one via LADRC. These results illustrate that the TADRC method could address the rudder amplitude and rate constraints successfully, and handle the parameters uncertainties as well as environmental disturbances effectively.

Conclusions
A novel TADRC design method with the LOS guidance scheme was presented for path following of underactuated ships in this paper. The TESO was designed by modifying LESO via hyperbolic tangent function to improve the estimated performance for the generalized disturbances including parameters uncertainties and environment disturbances. The hyperbolic tangent function was introduced to design a nonlinear sliding mode control law instead of the conventional PD control to improve the control action. The nonlinear sliding mode control law was embedded in a standard QP cost function to handle the input constraints. The LOS guidance generated the reference heading for shaping  desired paths like a good ship's helmsman behavior. The simulation results showed that the proposed controller could force ship to follow the desired path effectively in case of the time-varying disturbances including wind, current and wave. Meanwhile, the comparison results indicate that the TADRC controllers with the LOS guidance scheme outperformed the conventional LADRC method. Moreover, the TESO method can improve the estimation accuracy for the heading, the heading rate and the generalized disturbance. More theoretical research about TADRC is needed in the future.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported in part by the special projects of key fields (Artificial Intelligence) of Universities in Guangdong Province (2019KZDZX1035), the National Natural Science Foundation of China (Nos. 51979045, 51939001, 61976033), and program for scientific research start-up funds of Guangdong Ocean University.