Underactuated USV path following mechanism based on the cascade method

The path following control under disturbance was studied for an underactuated unmanned surface vehicle (USV) subject to the rudder angle and velocity constraints. For this reason, a variable look-ahead integral line-of-sight (LOS) guidance law was designed on the basis of the disturbance estimation and compensation, and a cascade path following control system was created following the heading control law based on the model prediction. Firstly, the guidance law was designed using the USV three-degree-of-freedom (DOF) motion model and the LOS method, while the tracking error state was introduced to design the real-time estimation of disturbance observer and compensate for the influence of ocean current. Moreover, the stability of the system was analyzed. Secondly, sufficient attention was paid to the rudder angle and velocity constraints and the influence of system delay and other factors in the process of path following when the heading control law was designed with the USV motion response model and the model predictive control (MPC). The moving horizon optimization strategy was adopted to achieve better dynamic performance, effectively overcome the influence of model and environmental uncertainties, and further prove the stability of the control law. Thirdly, a simulation experiment was carried out to verify the effectiveness and advancement of the proposed algorithm. Fourthly, the “Sturgeon 03” USV was used in the lake test of the proposed control algorithm to prove its feasibility in the engineering practices.

Unmanned surface vehicle (USV) has become a hot research topic in the unmanned equipment field at home and abroad because of its intelligent, fast, flexible, stealthy, and weatherproof characteristics. It has enjoyed a very bright future in ocean monitoring, reconnaissance, modern military battle, and security defense in territorial waters [1][2][3] . USV path following means that a USV under the effect of the control system departs from any initial position, enters the expected path and sails along the expected path with the minimum tracking error 4 . Most USVs have no direct transverse control mechanism, but relies only on the longitudinal propulsive force and steering torque to control the motion, so that they are typical underactuated systems 5 . Due to the lack of control mechanism and the complex and unpredictable marine environment, it is very difficult to control a USV 6 . Therefore, the accurate and stable path following of an underactuated USV in the marine environment becomes a hot topic in the research of USV control.
As a classical and effective guidance algorithm, the line-of-slight (LOS) is not restricted by model, but determines the expected heading of a ship based on its real-time position and planned path. It has been widely applied in the control field since it is slightly affected by high-frequency noise, highly reliable and real time. Reference 7 designed a cascade control system based on the LOS and feedback linearization method while ignoring the disturbance from the external environment. The system realized the effective path following and was proved to achieve the uniform global K-exponential stability. Based on References 7,8 further proved the uniform semi-global exponential stability of the system. When the ocean current was known, Reference 9 put forward an integral LOS guidance law, and introduced the additional longitudinal error to offset the disturbance of ocean current. In this way, the path following control was realized under the disturbance of ocean current. With the designed guidance law, the system was proved to achieve the uniform global asymptotic stability. Reference 10 further explored the stability of the guidance system and proved the uniform global K-exponential stability of the system. To further enhance the convergence speed of path following while ensuring the stability of the system, Reference 11 put forth a variable look-ahead integral LOS guidance law, and proved its uniform global K-exponential stability at the equilibrium point. Reference 12 further verified the uniform semi-global exponential stability of the control system. Do designed a disturbance observer in the Serret-Frenet coordinate system for the effective path following to realize the real-time estimation of and compensation for the disturbance of ocean current. Moreover, the www.nature.com/scientificreports/ uniform global asymptotic stability of the system was proved 13 . Assuming that the disturbance of ocean current was bounded and varied slowly, Fossen et al. relied on the Lyapunov stability theory and the direct feedback of error to compensate for the drift angle caused by the disturbance including ocean current in a real-time manner. Furthermore, they proved the uniform semi-global exponential stability of the entire system to further improve the real-time and accurate USV path following capability 14 . In Reference 15 , the influence of the complex marine environment was fully considered while designing a path following control system based on the cascade of the variable look-ahead integral LOS guidance algorithm and the adaptive sideslip compensation heading control algorithm. It proved the uniform global asymptotic stability of the system, and presented an offshore following test with ships to verify the effectiveness of algorithms. Considering the influence of USV motion performance, Reference 16 linearized and discretized the USV three degree of freedom model, considered the control quantity constraints and output constraints, and the path following problem was transformed into a rolling optimization problem under multiple constraints. Reference 17 further considered the optimization in the quasi infinite time domain based on the predictive control method. However, there is a lack of analysis of the stability of the designed controller, and the linearization of the strong nonlinear model also leads to the decline of model accuracy. Some achievements have been made at home and abroad with regard to the path following of underactuated USVs, but most of them focus only on the realization of functions and rarely address the constraints on the actuating mechanism in the practical following. Most of controllers are designed on the basis of error feedback control, leading to the delay of control law. In the meantime, most studies pay attention to algorithm design and simulation, but lack the effective verification in the practical scenarios. To address this problem, this paper combines theoretical research, simulation verification, and ship test. At first, the guidance law is designed on the basis of the USV three-DOF motion model and the LOS to analyze the stability of the guidance system. Meanwhile, the longitudinal tracking error is introduced as the state to design the disturbance observer, and realize the real-time estimation and feedback compensation of the disturbance steady-state component. Compared with most output-based feedback compensation algorithms, it is more flexible and controllable. Subsequently, the control law is designed with the USV motion response model and model predictive control (MPC) to address such problems as the instability and large error caused by the rudder angle constraint and system delay in the path following. On this basis, the stability of the control system subject to multiple constraints is further analyzed. After that, a simulation experiment is presented to verify the effectiveness and advancement of the algorithm designed in this paper. At last, a USV 'Sturgeon' is used in the lake test for the proposed control algorithm and verify its feasibility in the engineering practices.
The rest of the paper is organized as follows. "Underactuated USV motion model" section establishes a three-degree-of-freedom maneuvering model. The adaptive integral LOS guidance law, model predictive heading control law and disturbance observer are designed in "Path following control system design" section. The problem of path following is defined. And the proof of system stability is given in "Proof of system stability" section. In "Simulation verification and result analysis" section, a simulation experiment is conducted to prove the effectiveness and advancement of the path following system. The feasibility of the system in practical engineering applications is verified by the lake test in "Vessel test and result analysis" section. "Conclusion" section summarizes the work of this paper.

Underactuated USV motion model
The horizontal three-DOF kinematics and response mathematical model for underactuated USV is built as follows: where η = [x, y, ψ] T is the position and heading angle on the horizontal plane in the north-east-down coordinate system; υ = [u, v, r] T is the longitudinal and transverse velocities and the heading velocity of the USV in the hull coordinate system; J(ψ) is the conversion matrix from the hull coordinate system to the north-east-down coordinate system; δ is the input of rudder angle, T is the turning lag index, and K is the turning ability index.

Path following control system design
Guidance law design. Based on the integral LOS strategy, the expected heading is expressed as: www.nature.com/scientificreports/ where κ is a constant strictly greater than zero; max and min are the maximum and minimum of the look-ahead distance respectively; κ > 0 ; y e is longitudinal tracking error; ω path update rate, β is sideslip angle. When the path following error y e is large, lim y e (t)→∞ e −κ|y e (t)| ≈ 0 and the look-ahead distance is short, so that the USV quickly approaches the given path. When the path following error y e is small, lim y e (t)→0 e −κ|y e (t)| ≈ 1 , and the look-ahead distance is long, so that the USV can maintain the stable following on the given path ( Fig. 1).

Control law design.
The USV has a limited range of rudder angle. While tracking the heading, the response time of rudder effect may cause the system instability and tracking delay. To address the constraint arising from the range of rudder angle and the influence of rudder effect response in the heading tracking control, the heading controller is designed with predictive control 18,19 . Equation (4) is transformed into the design model of USV heading controller as follows: where the range of USV rudder angle is δ ∈ [δ min , δ max ]. The kinematics model in Eq. (8) is written into the state equation as follows: where x p (t) = [ψ, r] T is the state variable; δ(t) is the control input variable; y p (t) is the output; and C = I 2×2 .
Equation (9) is written in the differential form: Considering the tracking error and rudder angle constraints, the design objective function is expressed as: where N is the moving horizon optimization predicted length; P , Q and R are the weight coefficient matrices and their diagonal elements are all greater than 0. In the objective function, the first term is the terminal constraint penalty; the second term reflects the capability of tracking the expected heading; and the third term reflects the demand for the stable variation of rudder angle. The optimization problem defined in Eqs. (11) and (12) is converted into the quadratic programming problem and then solved.
Equation (10) is rewritten into www.nature.com/scientificreports/ Equation (11) is rewritten into Equation (14) is further converted to obtain Equation (12) for the constraints is written as To sum up, the optimization problem is converted into the quadratic programming problem subject to multiple constraints as follows: Since Φ ≥ 0 , the quadratic programming has a solution for each non-negative weight matrix P , Q or R. (5) and (7) are used to obtain The sideslip angle caused by the disturbance of ocean current is very small, i.e. sin β ≈ β , cos β ≈ 1. With Eq. (18), it is further derived that Moreover, there is

Disturbance observer design. Equations
The disturbance of ocean current is taken into account for its real-time observation and compensation to obtain where v c is the transverse ocean current component in the S-F coordinate system). The sideslip angle caused by the disturbance of ocean current is very small and varies very slowly, so that it is regarded as a constant within a short period. Therefore, there is β ≈ 0 , and then ˙ ≈ 0.
Considering the observability of the transverse error y e , the adaptive disturbance observer is designed as follows: where K 1 = K 1c e (σ |ỹ e |) −1 , K 2 = K 2c e (σ |ỹ e |) −1 , K 1c and K 2c are both the constants greater than zero; ỹ e = y e −ŷ e is the state estimation error of the transverse error.
When y e =0 , the compensation integral term is obtained as Obviously, the disturbance observation subsystem achieves the uniform global asymptotic stability and uniform semi-global exponential stability at the equilibrium point.

Proof of system stability
The stability of the guidance subsystem is proved as follows: When the transverse component of the distance is accurately estimated, and ζ = ũψψ T = 0 3×1 , the guidance subsystem 1 has the uniform global asymptotic stability and uniform semi-global exponential stability at the equilibrium point (y e , ζ ) = (0, 0, 0, 0).
The heading control subsystem subject to the rudder angle constraint is proved as follows: In the terminal inequality constraint x(k + N) ∈ � , represents a neighborhood adjacent to the origin and is a positive invariant region of the controlled system and satisfies (A + BL)x(k) ∈ �, ∀x ∈ �.
Lemma Assuming that P > 0 is the positive definite solution of the Lyapunov equation P = (A + BL) T P(A + AL) + (C T QC + L T RL) , there is ∃α > 0 , so that the system (29) satisfies the control con- The problem is redefined as It satisfies the rudder angle constraint. The corresponding predictive state sequence is x * (k + 1|k),x * (k + 2|k), . . . ,x * (k + N|k) , and satisfies the terminal constraint equation. The optimized value is: The closed-loop control is: It is substituted into the system Eq. (29) to obtain and there is x(k+1) =x * (k + 1|k).
The rudder angle sequence is selected at the time k + 1 as follows: Since x * (k + N|k) ∈ � , there is Therefore, it satisfies the rudder angle constraint. Since The corresponding state sequence is: (28) 1 ′ :ẏ e = − y e � 2 + (y e + y int ) 2 U. (29) (36) δ min ≤ Lx * (k + N|k) ≤ δ max .  Let ỹ * (k|k) = Cx k , δ * (k|k) = δ k , it is obtained that Therefore, the objective function is bounded. The rudder angle control sequence is the feasible solution of the optimization problem. If the optimization problem (30) has an optimized solution, the optimized solution must be superior to the feasible solution. Therefore, it is obtained that: When x = 0 , δ = 0 . At this time, δ * = 0 is the feasible solution of the optimization problem, and J * = 0 . For ∀k ≥ 0 , there is J * k ≥ 0 , which monotonically decreases, and J * k is the minimum at x = 0. To prove the continuity of J * k at x = 0 , let x ∈ at the equilibrium point. The feasible solution is selected as Considering the randomness of x ∈ , for the given ε > 0 , ℓ = ℓ(ε) > 0 , so that ∀�x� < ℓ , and then J k < ε . The optimal solution is certainly superior to the feasible solution, and J * k ≥ 0 , so that we obtain Therefore, J * k is continuous at x = 0 . Based on the Theorem 5.3 in Reference 20 , it is found that J * k is a Lyapunov function of the closed-loop system (29), so that the closed-loop system can realize the uniform global asymptotic stability at the equilibrium point. As revealed in the stability analysis, the cascade control system has the uniform global asymptotic stability at the equilibrium point.

Simulation verification and result analysis
In simulation and testing, the main configuration parameters of the industrial computer are as follows: CPU intel core i5-3610, host frequency 2.7 GHz, 8G memory, and 64-bit win7 operating system.
Heading controller simulation. The model parameters of 'Sturgeon' USV were K = 0.738 and T = 0.295 .
The sampling cycle of system was T s = 200 ms ; the prediction cycle of MPC was 40T s ; the control cycle was 2T s ; and the diagonal elements of weight matrixes Q and R were 1 and 10 respectively. According to the feedback linearization (FL) method in Reference 21,22 , heading control law parameters k ψ and k r were 5 and 1 respectively. PID control law had proportional factor K p = 0.45 , integral factor K i = 0.001 , and differentiated factor K d = 0.15 . The expected heading was 30°, and the original heading and rudder angle were both 0. The range of rudder angle was − π 6 rad, π 6 rad . The heading tracking result and controller quantity are presented in Figs. 2 and 3 respectively.
As revealed in the simulation results, the rise time, settling time, and percent overshoot of the heading controller based on PID are around 3.5 s, 9.5 s and 17% respectively, and those of the heading controller based on FL are around 3.5 s, 7.5 s and 12% respectively, while those of the heading controller based on MPC are around 4 s, 5 s and 0.1% respectively. All three algorithms could realize the stable heading tracking. Figure 2 clearly www.nature.com/scientificreports/ reveals that, the PID controller and the FL controller generate very high overshoot and oscillation at the stage of convergence (around 4.5 s), and need longer time to become stable. The heading controller based on MPC rarely has overshoot at the same rate of convergence, and is able to realize stable tracking within a short period, so that its control effect is much better. As clearly indicated in Fig. 3 rudder angle curve, the heading controller based on MPC could lower the rudder angle in advance before reaching the expected heading, so as to reduce overshoot, while the heading controllers based on PID and FL have obvious delay, causing the instability of the system. And the optimal solutions given by MPC algorithm do not exceed the set limits of rudder angle in the simulated conditions.
Combining algorithm principles to further analyze the results of simulation and comparison experiments, we can get the following conclusions.
(1) The MPC controller itself has a feedforward compensation mechanism with the moving horizon optimization strategy, and could achieve better convergence and lower overshoot. While the PID controller and the FL controller take compensation for existing error as tuning mechanism and may easily lead to much overshoot because of rudder delay and vessel inertia. (2) The MPC controller obtains optimal control sequence based on quadratic programming, therefore, the solution obtained meets the constraint of rudder angle, which is difficult to achieve with the other two controllers. (3) Compared with the PID controller and the FL controller, the MPC controller obtains better tracking performance, but adds computational load in the implementation. , velocity 5 m/s , and control parameters min = 15 m , max = 20 m , κ = 0.01 , K 1c = 5 , K 2c = 1 , σ = 2 . The resultant velocity of steady-state disturbance was set to 0.5 m/s, and the direction was − π/4 rad. Heading control parameters were the same as above. The results of path following are as shown in Figs. 4, 5, 6, 7, 8 and 9. The path following results without disturbance observer and with disturbance observer in this paper are expressed as algorithm 1 and algorithm 2 respectively. The simulation result shows that, under the effect of the control system designed in this paper, USV could overcome the influence of ocean current, realize the tracking of expected path successfully, and guarantee faster convergence and smaller tracking error. After combining Figs. 4, 5 and 6, it is known that USV is far away from the expected path at the initial stage, and guidance law gives the larger variation of heading. Thereafter, a higher rudder velocity (as shown in Fig. 9) is correspondingly given by the USV heading controller to control the increase of rudder angle (as shown in Fig. 8) and realize the rapid turning. At the stage of stable tracking, there is smaller tracking error and lower rudder velocity, so that rudder angle varies slowly to guarantee high stability and tracking accuracy. It also can be seen from Figs. 4 to Fig. 7, the disturbance observer in this paper can effectively estimate and compensate interference factors, and improve tracking accuracy.

Vessel test and result analysis
'Sturgeon' USV (as shown in Fig. 10) was 7.0 m long and 2.0 m wide, and had the velocity of up to 30 knots and the endurance of 15 h. Based on the idea of modular design, it was equipped with self-developed ship-mounted central control system and ground telemetering control system, and provided with attitude/bearing integrated navigation, wireless communication equipment, photoelectric, radar and other sensor systems, and weapon system, etc. Moreover, it could satisfy the needs of various missions by bearing different loads (Fig. 11).  www.nature.com/scientificreports/ Test site was located in Honglian lake, Ezhou. In the test area, an expected path was set to 5 km, while the expected velocity was set to 10 knots. In the process of tracking, ship-mounted central control system could record the information on the state of USV including position, heading, velocity and attitude in a real-time manner. Moreover, ship-mounted wireless communication system could send back the record to the shorebased control station in a real-time manner. USV path following result is shown in Fig. 12, while the state data recorded presented in Figs. 13, 14 and 15.   www.nature.com/scientificreports/ As shown in test results, 'Sturgeon' USV departed from the original position deviated from the expected path (around 50 m), turned at a large rudder angle and rudder velocity, entered the expected path rapidly, and then cruised with smaller tracking error while maintaining the stable heading along the expected path. The vessel test has sufficiently verified the feasibility of this control algorithm in practical engineering applications, and the actual effect of tracking is good.

Conclusion
In this paper, we designed a complete and superior path following system. According to the cascade system theory, we designed the guidance subsystem and the heading control subsystem respectively, and proved the uniform global asymptotic stability based on the Lyapunov theory. www.nature.com/scientificreports/ In terms of guidance law design, while proposing the integral LOS guidance law, we designed a disturbance observer by introducing longitudinal error as the state. Compared with most algorithms based on output feedback compensation, it is more flexible, controllable, and further enhances the accuracy of path following.
After considering the rudder angle constraint and the delay of rudder effect, we designed the control law on the basis of USV motion response model and MPC. Based on simulation and comparison experiments, we found it has obvious advantages compared with the PID controller and the FL controller in ensuring system convergence speed and stability.
In addition, based on the design of the system, we conducted a simulation experiment and further applied the control system to the 'Sturgeon' USV for the lake path following test, tracking errors could be rapidly reduced under the action of a stable control law and the USV accurately tracked the expected path. The result is satisfying and also verifies the practical feasibility of the algorithm in engineering applications.
In the following research, the adaptive regulation of the heading control law parameters can be further studied to optimize its control performance and achieve better effect of path following. www.nature.com/scientificreports/