Model Predictive Control Based on State Space and Risk Augmentation for Unmanned Surface Vessel Trajectory Tracking

: The underactuated unmanned surface vessel (USV) has been identiﬁed as a promising solution for future maritime transport. However, the challenges of precise trajectory tracking and obstacle avoidance remain unresolved for USVs. To this end, this paper models the problem of path tracking through the ﬁrst-order Nomoto model in the Serret–Frenet coordinate system. A novel risk model has been developed to depict the association between USVs and obstacles based on SFC. Combined with an artiﬁcial potential ﬁeld that accounts for environmental obstacles, model predictive control (MPC) based on state space is employed to achieve the optimal control sequence. The stability of the designed controller is demonstrated by means of the Lyapunov method and zero-pole analysis. Through simulation, it has been demonstrated that the controller is asymptotically stable concerning track error deviation, heading angle deviation, and heading angle speed, and its good stability and robustness in the presence of multiple risks are veriﬁed.


Introduction
Between 2014 and 2019, out of a total analysis of 5100 maritime accidents, 68.2% were attributed to human fault, and port areas accounted for 18.5% followed by coastal areas at 13.3% [1].Autonomous ships, capable of performing tasks with little or no human interaction, could help lower the high rate of accidents.The realization of complete autonomy plays a crucial role in the advancement of autonomous vessels, enabling unmanned surface vehicles (USVs) to operate effectively in complex environments independently of human intervention [2].Unmanned navigation is a significant topic and needs to be approached from various angles, including ship maneuverability, environmental loads, obstacles, and adherence to maritime regulations.Research in this area holds great promise for future development in unmanned navigation regarding efficiency and security.However, limited research has been conducted on reducing risks and obstacles and improving safety during maneuvering.Therefore, researching the engineering and academic interest of achieving safe, reliable, and optimal ship maneuvering during trajectory tracking is of great importance.USVs, which benefit from advancements in robotics and artificial intelligence, have attracted considerable attention in ship and ocean engineering.In comparison with conventional ships, USVs present reduced costs, increased efficiency, and superior security.It is imperative to develop a robust and risk-free steering system that meets the different operational prerequisites [3].
Extensive investigations have been undertaken into the control of USVs, including studies on the back-stepping method [4], the linear quadratic regulator algorithm [5], adaptive controller [6], sliding mode controller (SMC) [7], and fuzzy logic control [8].References [9][10][11] focused on the trajectory tracking of USVs, which is a crucial performance criterion for maneuvering and navigation.In detail, a new guidance and control system was created for a USV which takes environmental factors into account in [9], and robust intelligent path planning has been developed by integrating functional modules.A controller has been presented in the literature [10] for the purpose of tracking the trajectory of USVs while accounting for uncertainties and input constraints.The planning and control of trajectories, oriented towards berthing, were discussed in [11] using an advanced fuzzy PID approach.This approach considers the dynamic alterations of the USV during berthing tasks.The authors' (Wei Li) previous work concentrated on the design of controllers and disturbance observers in the field of USV trajectory tracking [12], in which the time-varying disturbances such as wind, waves, and currents must be compensated and controlled while achieving path tracking.In addition, the authors have some research results in the field of model predictive control algorithms as well as high-speed multihull robust control.Specifically, a sliding mode predictive anti-pitching control considering appendage constraints is proposed in [13] (Jun Zhang), in which a prediction model and an objective function are established with the sliding mode states as variables, and the sliding mode terminal stability constraint set is adopted to improve the stability of the closed-loop system.Considering the excessive vertical motion amplitude of high-speed multihulls, and the difficulty of measuring heave velocity and pitch angular velocity directly, a robust anti-pitching control method without velocity measurements is proposed in [14].Nevertheless, the collision avoidance issue has been overlooked in the above trajectory tracking investigations.
Since obstacle avoidance is one of the most important capabilities for USVs to perform safe navigation, the researchers in [15] employed a reinforcement learning-based, decision-making algorithm for path planning of surface vehicles to prevent collisions during maneuvering.However, the time-consuming training of the network and the uncertainty limit the effectiveness of the proposed approach.Wang et al. in [16] presented a path planning algorithm named the local normal distribution-based trajectory that is designed to avoid static obstacles based on the convention of international regulations.The algorithm was tested in a simulation environment and verified to be effective for single obstacles.Li et al. in [17] developed a deep reinforcement learning algorithm for optimal collision avoidance path planning utilizing simulated real-time sensor data during practical navigation.The collision avoidance problem in a marine environment can be effectively addressed with local dynamic path planning based on local sensor data.In actual navigation, USVs primarily rely on perception sensors to obtain surrounding environment information, such as light detection and ranging (LiDAR), radar and vision sensors.
But as stated in [17], the USV cannot obtain complete information of the environment but only obtain environmental information within a certain range centered on itself through various sensors, in practice.Niu et al. in [18] proposed an energy-efficient path planning algorithm integrating multiple algorithms to optimize path planning under spatially and temporally varying environmental loads.Song et al. in [19] presented a two-level dynamic obstacle avoidance algorithm.The initial stage involves global planning through the implementation of the velocity obstacle algorithm, followed by local obstacle avoidance methods.Nevertheless, the literature [15][16][17][18][19] ignores the effect of USV kinematics and manipulation performance on obstacle avoidance effectiveness.
To address this issue, the kinematic model is used to predict the path whilst disregarding the vessel's intricate mechanics in [20] when conducting collision avoidance studies.Reference [21] utilized a modified version of the artificial potential field method (APFM), in conjunction with the Dijkstra algorithm.To further optimize the APFM, the global path planning technique was improved in [22], with the implementation of the artificial potential field-ant colony optimization obstacle avoidance algorithm.As for the path planning, [23] used a Voronoi diagram and Fermat's spiral to generate a real-time path, which subse-quently navigates the ship through an adaptive line-of-sight (LOS) guidance algorithm.Campbell et al. implemented processes for identifying obstacles, evaluating risks, and devising routes to circumvent them in [24].The detection mechanism is based on vision-LiDAR, and the path mapping employs the Rule-based Repairing A-Star (R-RA*) algorithm.Furthermore, Kuwata et al. [25] attained dependable and autonomous sea navigation by utilizing the velocity obstacles approach.However, the collision avoidance method of [25] needs the use of satellite imagery, which excludes imperative information such as reefs and ocean depth.Moreover, the capacity for cameras and sonar to observe can be impeded by light and jolts, leading to a decreased range and accuracy, as mentioned in [21][22][23][24].
References [26][27][28][29][30][31][32][33][34][35] are more relevant to this paper.The collision avoidance system strives to carry out vessel tasks efficiently, steadily, and promptly [26].To circumvent localized reactions in high-speed USVs, Ref. [27] determined that the application of the collision avoidance system involves both path planning and a control system, and the authors of [27] stated that integrating control and planning within an algorithm significantly enhances real-time performance and better meets the requirements for collision avoidance of USVs.Zhang et al. developed a sturdy approach to model predictive control (MPC) for surface vessel path-following, as described in their publication [28], which considered roll motion during optimization.In the study [29], the researchers utilized MPC to navigate obstacles in restricted areas.Since the adoption of an MPC controller, it has been utilized to address the issues of trajectory tracking and obstacle avoidance in both aerial drones and ground vehicles.It has become increasingly common in addressing USV's navigation challenges [30,31].Path planning is no exception, with MPC enabling online stability and robustness [32].This is executed by incessantly re-planning the path process at each iteration and implementing the initial control action linked with the chosen trajectory to the ship [33].The optimization of a finite control set is a widely recognized concept in robust MPC literature [34].Furthermore, as stated by [35], MPC has been utilized for collision prevention in maritime operations.However, it is essential to improve the response of the collision avoidance system mentioned [30][31][32][33][34][35], given the relatively small size and higher speed of USVs compared to conventional ships.
In this paper, we assume that the USV has obtained information on the size and shape of obstacles through multiple sensors.With this detection result, our research concentrates on the obstacle avoidance path planning and tracking trajectory controller design process, aiming to ensure successful trajectory tracking with obstacle avoidance.On the other hand, to ensure the accuracy of USV trajectory tracking while avoiding obstacles, this paper proposes a risk enhanced MPC method for USV trajectory tracking.Compared with existing studies and our previous work, the main contributions of this paper are as follows: (1) It establishes a state space control model with risk augmentation for underactuated USV path tracking, where the state space control model, including track error deviation, heading angle deviation, heading angle velocity, and risk force augmentation term, plays an important role.(2) This paper presents a MPC method combined with an artificial potential field that accounts for multiple environmental obstacles, in which the risk model depicting the correlation between the USV and obstacles has been established based on the Serret-Frenet coordinate system, distinguishing itself from existing techniques.(3) It demonstrates that a reasonable design of the weighted gain matrix and risk avoidance parameters ensure convergence of the proposed algorithm.The method developed in this work, based on Lyapunov stability and zero-pole analysis, holds significant value in obtaining optimal control action in an explicit manner.
This paper is organized as follows.In Section 2, the system model is presented.In Section 3, the MPC controller with risk augmentation is designed and the convergence of the algorithm is presented mathematically.Numerical simulations are presented in Section 4. Section 5 concludes this paper and states future works.

System Modeling 2.1. Trajectory Tracking Description of USV
Two different research methods are successively applied to the path tracking control of the surface ship.One is to design the controller directly based on the dynamic equation of the path tracking error in the geodetic coordinate system.The other is to study the problem under the Serret-Frenet coordinate (SFC) [36] as shown in Figure 1.The origin of the frame {SF} is located at the closest point on the given path from the origin of the body-fixed frame {B}.Ω denotes the given path, T is the tangent direction of the given path, M is the USV orientation, ψ is the heading angle formed by the counterclockwise rotation of the USV direction to the X axis, ψ SF is the desired heading angle formed by the counterclockwise rotation of the tangent direction of the given path to the X axis, e is the tracking error, and X d is the desired point.the algorithm is presented mathematically.Numerical simulations are presented in Section 4. Section 5 concludes this paper and states future works.

Trajectory Tracking Description of USV
Two different research methods are successively applied to the path tracking control of the surface ship.One is to design the controller directly based on the dynamic equation of the path tracking error in the geodetic coordinate system.The other is to study the problem under the Serret-Frenet coordinate (SFC) [36] as shown in Figure 1.The origin of the frame {SF} is located at the closest point on the given path from the origin of the bodyfixed frame {B}.Ω denotes the given path, T is the tangent direction of the given path, M is the USV orientation, ψ is the heading angle formed by the counterclockwise ro- tation of the USV direction to the X axis, SF ψ is the desired heading angle formed by the counterclockwise rotation of the tangent direction of the given path to the X axis, e is the tracking error, and d X is the desired point.In Figure 1, the error dynamics based on SFC are given by [37]: where , , v r ω represents the surge, sway, and yaw velocities, respectively.κ denotes the curvature of the given path Ω .The control objective of the path following in Serret-Frenet frame is to drive e and ψ to zero [37].When environmental obstacles exist, the path following e and ψ cannot be eliminated at the same time.In such circumstances, the primary objective is to maintain a near-zero cross-track error e , while keeping a cer- tain necessary heading error ψ to avoid current environmental obstacles.
For most of the path following, the given path is a straight line or a way-point path, which consists of piecewise straight lines with the curvature κ being zero.Even though the curvature is not zero, we can also segment it into lots of piecewise straight lines.Additionally, sin( ) → can be derived within a small control input.As the ship's motion change is near the equilibrium point and the drift angle can be disregarded, it can be In Figure 1, the error dynamics based on SFC are given by [37]: where ω, v, r represents the surge, sway, and yaw velocities, respectively.κ denotes the curvature of the given path Ω.The control objective of the path following in Serret-Frenet frame is to drive e and ψ to zero [37].When environmental obstacles exist, the path following e and ψ cannot be eliminated at the same time.In such circumstances, the primary objective is to maintain a near-zero cross-track error e, while keeping a certain necessary heading error ψ to avoid current environmental obstacles.
For most of the path following, the given path is a straight line or a way-point path, which consists of piecewise straight lines with the curvature κ being zero.Even though the curvature is not zero, we can also segment it into lots of piecewise straight lines.Additionally, sin(ψ) → ψ can be derived within a small control input.As the ship's motion change is near the equilibrium point and the drift angle can be disregarded, it can be deduced that that ω 0 and v → 0 .From the above analysis, the error dynamics based on SFC (1) evolves into a more concise form as follows: where e is the tracking error, ψ is the tracking heading error, ω is the USV speed, and r is the yaw velocity.

State Space Model for Trajectory Tracking
This paper utilizes the Nomoto model [38] to analyze ship maneuverability, as it enables the interpretation of ship motion problems through manipulation of performance parameters that are easily gained.The Nomoto model in [38] is presented in detail below: where ψ denotes the heading and δ is the constrained rudder angle as the control input.K and T are the operational parameters, which can be obtained by the designated rotary and Z-type experiments.Equation ( 3) can be rewritten into a concise form as follow: ..
Following the definition of ψ = ψ − ψ SF , if the desired path is a straight line, then .
Combined with the error dynamics for path tracking in Equation ( 2), one follows that Equation ( 6) can be rewritten into the form of a state space equation as follow: From the state space model for trajectory tracking of USV Equation (7), one concludes that it captures the dominant ship maneuvering dynamics and path following error dynamics with a control variable.Based on the state space model for trajectory tracking of the USV in Equation ( 7), this paper concerns the goal of tracking a trajectory, specifically how to gradually reduce and eventually eliminate the position deviation and direction angle deviation from the current trajectory of a ship to follow a target trajectory.This is achieved by adjusting the rudder angle control quantity to finally converge the position deviation and direction angle deviation to zero by using the following control method.

MPC Algorithm Framework
Model predictive control (MPC) is becoming increasingly prevalent in advanced control due to its direct formulation and powerful optimization capabilities to handle explicit models and constraints effectively.As shown in Figure 2, the MPC utilizes a closed-loop control structure, comprising the controller module equipped with the dynamic optimizer, plant model, cost function, and constraints [39].Furthermore, Figure 3 demonstrates the open-loop control in the MPC controller.The plant model serves as a simplified estimate of the actual plant, aiding in the optimization process.The control system's initial inputs operate within a predetermined range and are supplied to the plant model.The initial output of the model is suboptimal.Moreover, the MPC controller aims to optimize the control inputs based on the appointed cost function.Over various iterations, the control inputs gradually converge to the optimum solution.The improved control inputs should be installed in the physical installation to bring it up to date.The optimization cycle repeats for each subsequent prediction time span, within the new redirection time span.This process continues until the time span concludes.The MPC controller design is achieved by model predictive controller toolbox.The user outlines the core components of the numerical model, including the cost function, state space, and constraints.The remaining unspecified modules are predetermined by default settings, such as the dynamic optimizer.
control structure, comprising the controller module equipped with the dynamic optimizer, plant model, cost function, and constraints [39].Furthermore, Figure 3 demonstrates the open-loop control in the MPC controller.The plant model serves as a simplified estimate of the actual plant, aiding in the optimization process.The control system's initial inputs operate within a predetermined range and are supplied to the plant model.The initial output of the model is suboptimal.Moreover, the MPC controller aims to optimize the control inputs based on the appointed cost function.Over various iterations, the control inputs gradually converge to the optimum solution.The improved control inputs should be installed in the physical installation to bring it up to date.The optimization cycle repeats for each subsequent prediction time span, within the new redirection time span.This process continues until the time span concludes.The MPC controller design is achieved by model predictive controller toolbox.The user outlines the core components of the numerical model, including the cost function, state space, and constraints.The remaining unspecified modules are predetermined by default settings, such as the dynamic optimizer.This paper applies MPC with space state and risk augmentation to the problem of tracking the trajectory of a USV.State space representation and cost function are crucial components of MPC and will be expounded in the following sections.

Model Predictive Controller
In the marine environment, USVs will encounter static or dynamic obstacles during trajectory tracking, including sailing ships and reefs, that impede their ability to follow the predetermined trajectory.To facilitate the avoidance of obstacles during trajectory tracking by the USV, an artificial potential field-based risk model is introduced in this section.Additionally, a model prediction controller utilizing the risk augmentation term is designed to minimize the objectives of the optimization problem.control structure, comprising the controller module equipped with the dynamic optimizer, plant model, cost function, and constraints [39].Furthermore, Figure 3 demonstrates the open-loop control in the MPC controller.The plant model serves as a simplified estimate of the actual plant, aiding in the optimization process.The control system's initial inputs operate within a predetermined range and are supplied to the plant model.The initial output of the model is suboptimal.Moreover, the MPC controller aims to optimize the control inputs based on the appointed cost function.Over various iterations, the control inputs gradually converge to the optimum solution.The improved control inputs should be installed in the physical installation to bring it up to date.The optimization cycle repeats for each subsequent prediction time span, within the new redirection time span.This process continues until the time span concludes.The MPC controller design is achieved by model predictive controller toolbox.The user outlines the core components of the numerical model, including the cost function, state space, and constraints.The remaining unspecified modules are predetermined by default settings, such as the dynamic optimizer.This paper applies MPC with space state and risk augmentation to the problem of tracking the trajectory of a USV.State space representation and cost function are crucial components of MPC and will be expounded in the following sections.

Model Predictive Controller
In the marine environment, USVs will encounter static or dynamic obstacles during trajectory tracking, including sailing ships and reefs, that impede their ability to follow the predetermined trajectory.To facilitate the avoidance of obstacles during trajectory tracking by the USV, an artificial potential field-based risk model is introduced in this section.Additionally, a model prediction controller utilizing the risk augmentation term is designed to minimize the objectives of the optimization problem.This paper applies MPC with space state and risk augmentation to the problem of tracking the trajectory of a USV.State space representation and cost function are crucial components of MPC and will be expounded in the following sections.

Model Predictive Controller
In the marine environment, USVs will encounter static or dynamic obstacles during trajectory tracking, including sailing ships and reefs, that impede their ability to follow the predetermined trajectory.To facilitate the avoidance of obstacles during trajectory tracking by the USV, an artificial potential field-based risk model is introduced in this section.Additionally, a model prediction controller utilizing the risk augmentation term is designed to minimize the objectives of the optimization problem.

Obstacle Description under the SFC for USV Trajectory Tracking
After the USV starts moving, the design of the obstacle avoidance controller based on the augmented risk term is only performed if the USV enters the risk area.If the ship does not encounter any obstacles within the risk range, there is no need to account for their influence on its trajectory tracking.In this case, only the trajectory tracking controller needs to be designed [12], which utilizes a model prediction controller that is not affected by obstacles.Then when the USV enters the obstacle's range of influence, the sensor provides detailed obstacle information relating to location, shape, and size to the control system.Then the controller provides real-time control signals for the USV to achieve trajectory tracking with obstacle avoidance.
This paper assumes that the sensors have identified the position, size, and configuration of obstacles.As illustrated in Figure 4, the risk model depicting the correlation between the USV and the obstacles has been established based on the SFC.The mass center of the USV is denoted by X, also serving as the origin of the {B} coordinate, coinciding with the desired track point X d , i.e., the origin of the SFC.This coordinate system reflects the orthogonal projection of X on the target track Ω on the system and shifts alongside the motion of the USV.e is the distance between X and X d , ψ SF is the target heading, and ψ is the heading angle of the USV.d 0 = λ 0 a is the maximum distance at which the risk can affect the movement of the USV, where a denotes the radius of a circular obstacle (i.e., the red obstacle region).If the obstacle is irregular, we approximate it as a circular obstacle.λ 0 is the safety coefficient which depends on the operating performance of the USV and the shape of the risk and is generally taken as 5~10, d is the distance between the mass center of the USV and the center of the blue risk area C obs .
by obstacles.Then when the USV enters the obstacle's range of influence, the sensor provides detailed obstacle information relating to location, shape, and size to the control system.Then the controller provides real-time control signals for the USV to achieve trajectory tracking with obstacle avoidance.
This paper assumes that the sensors have identified the position, size, and configuration of obstacles.As illustrated in Figure 4, the risk model depicting the correlation between the USV and the obstacles has been established based on the SFC.The mass center of the USV is denoted by X , also serving as the origin of the {B} coordinate, coinciding with the desired track point d X , i.e., the origin of the SFC.This coordinate system reflects the orthogonal projection of X on the target track Ω on the system and shifts alongside the motion of the USV.e is the distance between X and d X , SF ψ is the target heading, and ψ is the heading angle of the USV.0 0 d a λ = is the maximum distance at which the risk can affect the movement of the USV, where a denotes the radius of a circular obstacle (i.e., the red obstacle region).If the obstacle is irregular, we approximate it as a circular obstacle.0 λ is the safety coefficient which depends on the operating performance of the USV and the shape of the risk and is generally taken as 5~10, d is the distance between the mass center of the USV and the center of the blue risk area obs C .Based on the artificial potential field method, the gravitational field of the USV subjected to the desired track point can be expressed as follows: where ξ is the proportional position gain coefficient.The gravitational force on the USV from the desired track point is as follows: where the negative sign signifies that the direction of the force is from the mass center of the USV to the desired trajectory point.Based on the definitions of 0 d and d , it is evident that 0 d represents the scope of a stationary obstacle that is intended to enhance the Based on the artificial potential field method, the gravitational field of the USV subjected to the desired track point can be expressed as follows: where ξ is the proportional position gain coefficient.The gravitational force on the USV from the desired track point is as follows: where the negative sign signifies that the direction of the force is from the mass center of the USV to the desired trajectory point.Based on the definitions of d 0 and d, it is evident that d 0 represents the scope of a stationary obstacle that is intended to enhance the size of the obstacle, while d denotes the distance between the USV and the obstacle's center of mass, which changes in real-time and determines the level of the USV's potential field for the risk obstacle as follows: The USV's repulsive force from the risk is defined as follows: where η is the repulsive potential field parameter, X c is the closest point to the mass center of the USV in the risk area C obs , X − X c / X − X c denotes the unit vector pointing from X c to X, and the direction of the force F rep (d) is also from X c to X.

Controller Design with Risk Augmentation
When the USV enters the area affected by the risk, it experiences a repulsive force, while simultaneously experiencing the gravitational force of the intended trajectory.As a result, by adding the combined force field to the control model as the fourth state of the system, we obtain the USV tracking control model based on the risk augmentation as where . Equation ( 12) can be rewritten as a state space expression of continuous systems: .
where x = r ψ e U sum T and y is the system output.C is the system output matrix with appropriate form.A,B, and D are system matrices with Then we perform the first order Eulerian discretization on Equation ( 13) to obtain a discrete control state space model as follows: where A k ,B k ,C k , and D k are system matrices with discretization.Using Equation ( 14) as a prediction model, the following prediction states are obtained by iteration: We denote x(k + i|k) , u(k + i|k) , and y(k + i|k) the corresponding predictive state vector, control vector, and output vector at the future sample instant k + i based on the current sample instant k, where i = 1, 2, • • • , N P , k = 1, 2, • • • ..N P is the predictive time domain and N c is the control time domain.Generally, N C ≤ N P .The predicted output vectors for the next N P instants can be written in the compact form: where The cost function used for the MPC design has the structure with where y d is the desired output of the system containing a weighted combination of the states.Q, R, and H are weighing matrices.For the cost function (18), the first term of the quadratic objective function depicts the error between the actual output and predicted output based on the weighing matrix Q, such that it represents the state of the system and the desired state to be as close as possible at the next N p time steps.The second term of quadratic objective function prevents excessive controller output based on the weighing matrix R at the next N c time steps.The third quadratic objective function prevents excessive repulsive force based on the weighing matrix H at the next N c time steps.The aim of model predictive control in this paper is to minimize the system's output error, controller output, and obstacle repulsive force, thus obtaining the optimal control law for USV trajectory tracking.As a result, the model prediction control can be described as follows: at each sampling instant k, the aim is to find the optimal control sequence {u * (k), u * (k + 1), • • • , u * (k + N c − 1)} to minimize the objective function.For notational convenience, we rewrite the cost function as the following impact form: Under the receding horizon principle, the control vectors for the next N c sampling instants are obtained by minimizing the cost function (19), but only the first of these is applied to the system.Therefore, for unconstrained optimization problems, let ∂J ∂U = 0, and solving this equation gives the global optimal control sequence as follows: During the path tracking for USV, the control system has certain limitations.In this paper, we investigate the scenario where the control rudder angle amplitude is constrained.For predictive control with a prediction time domain of N p , the control volume amplitude in future j steps are restricted as follows: Equation ( 21) can be rewritten as a matrix form: where I is a unit matrix with N p × N p dimensions.After considering the amplitude constraint on the rudder angle, the objective function is evolved into the following: where x 0 is the initial state of state vector x of the system; U max , and U min are vector with elements u max and u min with 1 × N P dimensions.The trajectory tracking problem of the USV with risk augmentation can be summarized as Equation ( 1), in which the cost function is a combination of minimization for output error, control inputs, and repulsive force regarding the state model of the USV trajectory tracking and linear inequality control constraints.This type of problem is commonly known as a quadratic programming problem.To minimize online computation, the optimization problem with constraints can be solved by the Lagrange multiplier method [40].
The Lagrange function is defined as where γ is the multiplier vector and the inequality constraints are transformed into equational constraints by introducing relaxation variables.Let ∂L/∂U = 0 and ∂L/∂γ = 0, it follows that the optimal controller output with constraints is as follows: Taking the first control variable of the control sequence to perform on the controller, the corresponding final control law for the USV trajectory tracking is obtained as follows: where x = [r ψ e U sum ] T is the state vector, Q and R are positive definite symmetric weighting matrices, and T is the optimal Lagrange multiplier vector.But based on the principle of the rolling optimization mechanism of model predictive control, only the first optimal controller law is acted on in the system.As a result, we denote the first optimal controller law as u * (k).As the optimization time frame advances, u * (k) undergoes considerable modification as well.In other words, the system modifies the time domain length of the control sequence from [0, N P − 1] to [1, N P ], while still implementing the current first control variable as the control time domain progresses.Then the stable state variable convergence is attained by implementing control law Equation (26), enabling the surface unmanned vessel to avoid risks while accomplishing accurate tracking of the intended trajectory.

Convergence Analysis
While the potential field method can be briefly explained using mathematics, it has inherent limitations.Evidence suggests that the system will lose stability when the trajectory oscillates around obstacles, resulting in a jagged movement of the USV.Therefore, it is essential to present the stability analysis of the USV tracking control system based on the risk enhanced MPC method.
For the real system Equation ( 1), we transform it to a general form of the controlled plant model as follows: x Since the control action at each period is obtained by solving the optimization problem Equation (23).For the sake of presentation, we rewrite the objective function of Equation ( 23) as follows: where l(x, u, ρ) ≥ 0 and l(x, u, ρ) = 0 if and only if x = 0, u = 0, and ρ = 0.For simplification, let the predictive time domain and the control time domain both equal N. Then we present the following two assumptions that are easily satisfied based on the proposed MPC method.
Assumption 2. The optimization problem (28) for each period has a feasible solution and can be obtained using the global optimal solution.Moreover, only the first optimal controller action u * (k) is imposed on the system for the optimal control sequence {u * (k + i|k) Then we present Theorem 1 about the convergence result for the proposed MPC method as follows.
Proof of Theorem 1.Based on the Lyapunov stability theory, it is necessary to determine a Lyapunov function of the system that is positively definite, and its differentiation is negatively definite (i.e., the Lyapunov function is decreasing).We define the Lyapunov function as V(k).It is obvious that V(k) is positively definite due to the fact that the form of V(k) is a quadratic objective function.Then, Since, for the end of optimization, we have the following endpoint state constraint as x(k + N|k) = 0 .Then one derives that min Based on the Lyapunov stability theory, the system ( 27) is stable at x = 0, u = 0, and ρ = 0.
To ensure the system converges quickly, it is important to consider the impact of the output matrix on the system's zeros since their position affects convergence speed.Therefore, it is necessary to further analyze the impact of the output matrix on the system convergence performance.A reasonable output matrix can be designed to ensure stability as the dynamic characteristics of the system derived from the rudder angle to the rolling is a kind of non-minimum phase system by dynamics' analyses.Specifically, if C = [1 1 1 1], i.e., taking all state variables of the system as output, the root trajectory of the transfer function of the system is shown in Figure 5.The system depicted in Figure 6 features a zero-pole positioned on the right halfplane, signifying a non-minimum phase system.To prevent divergence owing to the predictive control law, the output matrix must be redefined, ensuring that the system is a minimum phase system with the zero-pole located on the left half-plane.Let [1 1 1 0] C = .The root trajectory of the system can be observed in Figure 6.The trajectory of the redefined system's roots displayed in Figure 6 lies entirely within the left half-plane.Stability of the system is guaranteed by modifying the output matrix, and utilizing the designed predictive control law, Equation ( 26) stabilizes the sys- The system depicted in Figure 6 features a zero-pole positioned on the right half-plane, signifying a non-minimum phase system.To prevent divergence owing to the predictive control law, the output matrix must be redefined, ensuring that the system is a minimum phase system with the zero-pole located on the left half-plane.Let C = [1 1 1 0].The root trajectory of the system can be observed in Figure 6.The system depicted in Figure 6 features a zero-pole positioned on the right halfplane, signifying a non-minimum phase system.To prevent divergence owing to the predictive control law, the output matrix must be redefined, ensuring that the system is a minimum phase system with the zero-pole located on the left half-plane.Let [1 1 1 0] C = .The root trajectory of the system can be observed in Figure 6.The trajectory of the redefined system's roots displayed in Figure 6 lies entirely within the left half-plane.Stability of the system is guaranteed by modifying the output matrix, and utilizing the designed predictive control law, Equation ( 26) stabilizes the system state, thus rendering the system asymptotically stable.The trajectory of the redefined system's roots displayed in Figure 6 lies entirely within the left half-plane.Stability of the system is guaranteed by modifying the output matrix, and utilizing the designed predictive control law, Equation (26) stabilizes the system state, thus rendering the system asymptotically stable.

Simulations
The model predictive controller with risk augmentation is verified through MATLAB simulations.The proposed algorithms are tested on the computer with Intel Core i7-6700 processor (Intel Corporation, Santa Clara, CA, USA).The USV hull parameters are listed in Table 1.As depicted in Figure 7a, the USV system is presented.In this paper, we establish a kinematic KT model for the vessel type, which relies upon the assumption of the attained precise detection outcomes for obstacles.To explain exactly how this equipment or its characteristics are used in the studies, we have added the control system block diagram of the USV SL-20Y to help understand the system components and controller principles in detail as shown in Figure 7b.processor (Intel Corporation, Santa Clara, CA, USA).The USV hull parameters are listed in Table 1.As depicted in Figure 7a, the USV system is presented.In this paper, we establish a kinematic KT model for the vessel type, which relies upon the assumption of the attained precise detection outcomes for obstacles.To explain exactly how this equipment or its characteristics are used in the studies, we have added the control system block diagram of the USV SL-20Y to help understand the system components and controller principles in detail as shown in Figure 7b.

Scenario 2: Trajectory Tracking with a Single Obstacle
In this scenario, the trajectory tracking problem is implemented by the proposed MPC with a single obstacle.The USV starts from the initial pose .The simulation result of trajectory tracking is given in Figure 9.
It can be seen from Figure 9 that the USV integrated with the MPC controller, combined with a risk avoidance scheme, proactively steers, adjusts its heading before approaching the obstacle, and subsequently returns to its desired path.It can be seen from Figure 8 that (i) the USV starts from the initial position and successfully reaches the target point soon; (ii) the track error deviation and heading angle deviation converge to zero gradually indicating that the USV is converging towards the assigned waypoints; and (iii) the controller input has a maximum value of 25 • , suggesting the existence of control limitations while tracking.The controller input is limited to [−30, 30] (degrees, degrees).The obstacle position is η ob = [30, 30], the length of the obstacle (i.e., the diameter) is 5 m, and the safety coefficient parameter λ 0 = 8.The desired heading ψ d = 45 • .The gravitational potential field parameter is set to ξ = 0.001 and the repulsive potential field parameter is set to η = 12.The simulation result of trajectory tracking is given in Figure 9.
It can be seen from Figure 9 that the USV integrated with the MPC controller, combined with a risk avoidance scheme, proactively steers, adjusts its heading before approaching the obstacle, and subsequently returns to its desired path.  .The simulation result of trajectory tracking is given in Figure 9.
It can be seen from Figure 9 that the USV integrated with the MPC controller, combined with a risk avoidance scheme, proactively steers, adjusts its heading before approaching the obstacle, and subsequently returns to its desired path.

Scenario 3: Trajectory Tracking with Multiple Obstacles
In this scenario, the trajectory tracking problem is implemented by the proposed MPC under multiple obstacles with different positions and lengths.The USV starts from the initial pose It is evident from Figure 10 that the USV fitted with the model predictive control controller utilizing the risk-enhanced approach adjusts its direction prior to encountering obstacles of varying sizes.Thereafter, it expeditiously resumes its target path, which validates the effectiveness of the proposed algorithm.

Conclusions
This paper presents a novel model predictive control based on state space and risk augmentation for USV trajectory tracking.In detail, a state space control model with risk augmentation is proposed for underactuated USV path tracking.The model includes track error deviation, heading angle deviation, heading angle velocity, and a risk force augmentation term and is key to this investigation.Then this paper introduces a method for MPC that combines an artificial potential field to account for multiple environmental obstacles.A risk model has been established based on the SFC system to depict the correlation between the USV and the obstacles.Finally, the study demonstrates that the algorithm can achieve convergence with a reasonable design of the weighted gain matrix and risk avoidance parameters.The technique presented in this study, which utilizes Lyapunov stability and zeropole analysis, has considerable merit in achieving optimal control response in a It is evident from Figure 10 that the USV fitted with the model predictive control controller utilizing the risk-enhanced approach adjusts its direction prior to encountering obstacles of varying sizes.Thereafter, it expeditiously resumes its target path, which validates the effectiveness of the proposed algorithm.

Conclusions
This paper presents a novel model predictive control based on state space and risk augmentation for USV trajectory tracking.In detail, a state space control model with risk augmentation is proposed for underactuated USV path tracking.The model includes track error deviation, heading angle deviation, heading angle velocity, and a risk force augmentation term and is key to this investigation.Then this paper introduces a method for MPC that combines an artificial potential field to account for multiple environmental obstacles.A risk model has been established based on the SFC system to depict the correlation between the USV and the obstacles.Finally, the study demonstrates that the algorithm can achieve convergence with a reasonable design of the weighted gain matrix risk avoidance parameters.The technique presented in this study, which utilizes Lyapunov stability and zero-pole analysis, has considerable merit in achieving optimal control response in a straightforward manner.Through simulation, it has been demonstrated that the controller is asymptotically stable concerning track error deviation, heading angle deviation and heading angle speed, and its good stability and robustness in the presence of multiple risks are verified.

Future Works
Future works can be carried out in the following aspects: (i) Obstacles detection.The sensors (such as light detection and ranging (LiDAR), radar, and vision sensors) detect obstacles and provide feedback to alert the control system of their presence on the intended trajectory.If obstacle detection through sensors is being considered, it is essential to combine the detection process of multiple sensors and fuse the results before delivering them to the controller; (ii) real-time marine environment experiments using the proposed method, including multiple obstacles, random disturbances, and a robust observer design.In addition, the effect of the controller weight matrix on the convergence performance should also be investigated with the proposed MPC controller with risk augmentation.

Figure 1 .
Figure 1.Illustration of the coordinates in the earth frame (inertial frame) {O}, the surface vessel body-fixed frame {B}, and the Serret-Frenet {SF} frame.

Figure 1 .
Figure 1.Illustration of the coordinates in the earth frame (inertial frame) {O}, the surface vessel body-fixed frame {B}, and the Serret-Frenet {SF} frame.

Figure 2 .
Figure 2. MPC framework of closed-loop control with dynamic optimizer, const function and constraint, and plant model.

Figure 3 .
Figure 3. MPC controller with optimization open loop, containing MPC controller, plant model, current state, input, and output signal with prediction horizon illustration.

Figure 2 .
Figure 2. MPC framework of closed-loop control with dynamic optimizer, const function and constraint, and plant model.

Figure 2 .
Figure 2. MPC framework of closed-loop control with dynamic optimizer, const function and constraint, and plant model.

Figure 3 .
Figure 3. MPC controller with optimization open loop, containing MPC controller, plant model, current state, input, and output signal with prediction horizon illustration.

Figure 3 .
Figure 3. MPC controller with optimization open loop, containing MPC controller, plant model, current state, input, and output signal with prediction horizon illustration.

Figure 4 .
Figure 4. Risk obstacle model description on the desired path based on the SFC system for trajectory tracking of the USV.

Figure 4 .
Figure 4. Risk obstacle model description on the desired path based on the SFC system for trajectory tracking of the USV.

4. 1 .
Scenario 1: Target Point Following The simulation outcome for target point following from an initial position is shown in Figure 8.The USV departs from point p s = [35.35,−35.35, 90] (m, m, deg) with an initial velocity of v 0 = 0 and aims to reach the final destination at point p e = [140, 140, 45].The sampling time for optimization parameters and prediction horizon steps are set to τ = 0.08 s and N p = 20, respectively, resulting in a prediction time of 1.6 s.The weight matrix is set as Q = diag{100, 100, 100}, R = 0.05.The controller input is limited to [−30, 30] (degrees, degrees).

Figure 8 .
Figure 8. Simulation results for target point following.(a) USV path simulation result with target point at e p ; (b) simulation results for yaw velocity, heading error, tracking error, and controller output for target point following.

8 .
Simulation results for target point following.(a) USV path simulation result with target point at p e ; (b) simulation results for yaw velocity, heading error, tracking error, and controller output for target point following.

4. 2 .
Scenario 2: Trajectory Tracking with a Single Obstacle In this scenario, the trajectory tracking problem is implemented by the proposed MPC with a single obstacle.The USV starts from the initial pose p s = [5, 5, 90] (m, m, deg).The parameters of the MPC controller are set as Q = diag{200, 200, 200},R = 1, H = 1, N P = N c = 10, and the sampling period T s = 0.08s, leading to a prediction time of T mpc = 1 s.

4. 3 .
Scenario 3: Trajectory Tracking with Multiple Obstacles In this scenario, the trajectory tracking problem is implemented by the proposed MPC under multiple obstacles with different positions and lengths.The USV starts from the initial pose p s = [−10, −10, 0] (m, m, deg).The parameters of the MPC controller and the desired path are set as the same as scenario 2. The first obstacle position is η ob1 = [30, 30], and its length is 3m.The second obstacle position is η ob2 = [50, 50], and its length is 6m.The safety coefficient parameters are both set as λ 01 = λ 02 = 5.The gravitational potential field parameters are set to ξ 1 = ξ 2 = 0.002, and the repulsive potential field parameters are set to η 1 = 10 and η 2 = 15.The result of trajectory tracking is given in Figure 10.

cient parameter 0 8 λ
= .The desired 45 d ψ =  .The gravitational potential field parameter is set to 0.001 ξ = and the repulsive potential field parameter is set to 12 η =

Figure 9 . 19 Figure 9 .
Figure 9. Simulation results for a single obstacle.(a) USV path simulation result with a single obstacle at η ob = [30, 30]; (b) simulation results for yaw velocity, heading error, tracking error, and controller output for trajectory tracking with a single obstacle.

1 [ 2 [
m, deg).The parameters of the MPC controller and the desired path are set as the same as scenario 2. The first obstacle position is length is 3m.The second obstacle position is length is 6m.The safety coefficient parameters are both set as 01 The result of trajectory tracking is given in Figure10.