Trajectory Following Control of an Unmanned Vehicle for Marine Environment Sensing

An autonomous surface vehicle is indispensable for sensing of marine environments owing to its challenging and dynamic conditions. To accomplish this task, the vehicle has to navigate through a desired trajectory. However, due to the complexity and dynamic nature of a marine environment affected by factors such as ocean currents, waves, and wind, a robust controller is of paramount importance for maintaining the vehicle along the desired trajectory by minimizing the trajectory error. To this end, in this study, we propose a robust discrete-time super-twisting second-order sliding mode controller (DSTA). Besides, this control method effectively suppresses the chattering effect. To start with, the vehicle’s model is discretized using an integral approximation with nonlinear terms including environmental disturbances treated as perturbation terms. Then, the perturbation is estimated using a time delay estimator (TDE), which further enhances the robustness of the proposed method and allows us to choose smaller controller gains. Moreover, we employ a genetic algorithm (GA) to tune the controller gains based on a quadratic cost function that considers the tracking error and control energy. The stability of the proposed sliding mode controller (SMC) is rigorously demonstrated using a Lyapunov approach. The controller is implemented using the Simulink® software. Finally, a conventional discrete-time SMC based on the reaching law (DSMR) and a heuristically tuned DSTA controller are used as benchmarks to compare the tracking accuracy and chattering attenuation capability of the proposed GA based DSTA (GA-DSTA). Simulation results are presented both with or without external disturbances. The simulation results demonstrate that the proposed controller drives the vehicle along the desired trajectory successfully and outperforms the other two controllers.


Introduction
Marine environment sensing, monitoring, and management are essential to protect the ocean.In this regard, autonomous surface vehicles (ASVs) or unmanned surface vehicles (USVs) (hereafter, ASVs or USVs can be used interchangeably) play a crucial role in sensing and monitoring the ocean, providing essential information [1][2][3][4].The ocean covers two-thirds of the Earth's surface and has a substantial impact on weather patterns, marine ecosystems, coastal regions, and the dynamics of climate change [1].It is a source of energy, food, and materials; moreover, it is used for transportation and recreational purposes [5].Marine ecosystem degradation, ocean temperature rise, plastic waste contamination, and pollution, etc are posing a threat to mankind [1].To address this problem, surface vehicles equipped with sensors can be applied to collect data.For autonomous, efficient, and accurate sensing of marine environments, following a desired sensing trajectory is essential.Moreover, autonomous trajectory following of USVs has been utilized implementation of a robust controller, provided the uncertainties are bounded [29,30].The fundamental principle of the SMC is to select a sliding surface within the state space in which the system has the desired characteristics.Subsequently, a controller can be designed to force the system trajectories from any initial condition within the state space to the sliding surface within finite time.Additionally, the trajectories can be maintained on the surface afterwards.In essence, SMC comprises two parts: equivalent control responsible for bringing the state trajectories from any initial condition to the sliding manifold, and discontinuous control that keeps the trajectories on the surface after they are brought to the manifold.Thus, the system is insensitive to model uncertainty and bounded exogenous disturbances [29].
However, SMC does not preserve the theoretical sliding motion formulation; rather, it switches to an infinitely high frequency for the sliding manifold.This high-frequency switching is not practically feasible due to the limitations of the actuator bandwidth.Hence, an ideal sliding mode cannot be achieved.Additionally, high-frequency switching of the control signal results in a phenomenon known as the chattering effect.Chattering can result in wear and tear of mechanical actuators as well as high energy consumption.The possible reasons for chattering, according to [30,31], are: (i) even though high-frequency switching is achievable, the existence of "parasitic dynamics", that is, unmodeled actuator and sensor dynamics, in series with the system could result in a small oscillation around the sliding manifold, and (ii) non-ideal sliding motion causes a highfrequency oscillation.
Continuous-time second-order SMCs have been proposed to alleviate the chattering problem [32,33].However, when continuous-time SMCs are discretized using a sample and held for digital implementation, they may lose their robustness, leading to instability.To address this limitation of continuous-time sliding mode controllers, researchers introduced discrete-time sliding mode controllers (DSMC).Moreover, implementing a DSMC is more straightforward owing to the advancement and widespread availability of computers and microcontrollers.However, the robustness of DSMC is undermined owing to the finite sampling time.In DSMC, the state trajectories converge to a bounded region near the sliding surface called the ultimate band.They exhibit a zigzag motion, termed quasi-sliding mode (QSM).Furthermore, unlike continuous-time SMC, the width of the ultimate band of a DSMC can be determined, which indicates the robustness of the controller.As noted in [34], given the desired ultimate band, the desired controller parameters can be determined; however, the limitations of the controller must be considered.Hence, by manipulating this band, the insensitivity of DSMC to uncertainties can be varied.To increase the robustness and mitigate the chattering effect of conventional DSMC, a second-order DSMC was proposed in [35,36]; however, the controller gains are not optimal.
Although there are a number of research works on DSMC, particularly based on the reaching law [37], its application to USVs has received less attention.This could be because of the difficulty in finding a discretized model of the vehicle [38].In Ref. [39], a cascaded conventional DSMC and PI-based gain-scheduling controller were used for a straight line following ASV.Different numerical tests were conducted with and without ocean current disturbances.Although the results were satisfactory, the rudder experienced significant chattering.
Therefore, in this study, we propose a discrete-time super-twisting sliding mode controller [35], which is a robust second-order SMC, to address chattering.To the best of our knowledge, DSTA has not been applied to trajectory following for USVs.Additionally, owing to the complexity of obtaining an exact discrete-time model of the vehicle, we assumed certain hydrodynamic parameters and external disturbances, such as ocean currents, waves, and wind, as unknown perturbation.Hence, we applied a time delay estimator (TDE) to estimate the unknown system dynamics.
The TDE estimates the unknown system dynamics based on the past states of the system and control input.It was first introduced by [40] to estimate disturbances in robotic manipulators, and was later applied to underwater control [41,42].Then, based on this estimation, the controller cancels the uncertainties.
In many previous studies, the effectiveness of the time delay estimator has been experimentally verified in the presence of model uncertainties and external disturbances [36,41,42].The purpose of the time delay estimator is to assess perturbation by utilizing data from a sufficiently short time ago, aiming to enhance control performance in terms of robustness and control energy.As will be detailed by using equations, the time delay estimator operates under the assumption that the perturbation does not change drastically within one sampling period, even though it dynamically evolves.In our research, the sampling period is 0.01 s, and the derivative of the perturbation remains fairly constant for this duration.This assumption is reflected in the TDE formulation, which can be regarded as the first-order approximation of the Taylor series expansion of the disturbance.
If the time delay estimator is not utilized, higher bounds on uncertainties should be assumed for robust control, leading to an increased control signal.A higher control signal, in turn, indicates higher control energy.Moreover, if the perturbation is not estimated, the controller becomes computationally intensive due to the need to adapt a large number of uncertain parameters.This restricts the real-time use of the control algorithm due to the limited onboard computational resources [43].These limitations can be addressed using a time delay estimator, which provides information about perturbation to improve the robustness and reduce the control signal [36,41].
Furthermore, the TDE minimizes the time delay, which affects the performance of the sliding mode controller [31].Finally, we apply a genetic algorithm (GA) to determine the optimal gains of the proposed controller.A quadratic cost function, which is the sum of the tracking error and control energy, was selected.The block diagram of the proposed method is shown in Figure 2. The main contributions of this study are summarized as follows.

1.
A robust DSTA has been applied for trajectory following of an ASV.Moreover, a TDE algorithm has been used to estimate the unknown dynamics of the system, which in turn, improves the robustness of the proposed controller.

2.
A GA is used to tune the controller parameters based on a quadratic objective function, which is the sum of the tracking error and control energy.

3.
A linear matrix inequality (LMI) based Lyapunov approach was employed to validate the stability of the closed-loop system.4.
Finally, simulation results are presented for two scenarios, with and without the presence of exogenous disturbance.Moreover, the performance of the proposed GA based DSTA is compared with that of DSTA and a reaching law based DSMC.
The remainder of this paper is structured as follows.Section 2 describes the mathematical model of the vehicle from which the discretized model is drived using the integral approximation method.Section 3 describes the design of the proposed DSTA controller and the stability of the closed-loop system.Tuning of the parameters of the proposed controller using the GA is presented in Section 4. In Section 5, numerical results and discussions are presented, and finally, Section 6 presents the conclusions.

Mathematical Model 2.1. Continuous-Time Vehicle Model
Generally, the motion of ASVs is described using two coordinate frames of reference [11]: the earth-fixed or inertial frame denoted by {O n } = {x n , y n , z n }, and the bodyfixed frame represented by {O b } = {x b , y b , z b }, as shown in Figure 3. Here, only the planar motion of the vehicle was considered.It was assumed that the vehicle had a homogeneous mass distribution and xy-plane symmetry.The motion of the vehicle in the inertial frame of reference is expressed using position and orientation vector η = [x, y, ψ] T , whereas its body-fixed velocity is represented by the velocity vector ν = [u, v, r] T .Here, x(m) and y(m) are the positions along x n and y n , respectively; ψ(rad) is the yaw angle.Additionally, u(m/s), v(m/s) are the surge and sway velocities along x b and y b , respectively, r(rad/s) is the yaw rate about z b .Therefore, the kinematic model of the vehicle is given by: where J(ψ) ∈ R 3×3 is the transformation matrix between the body-fixed frame and earthfixed frame, which is: and its dynamic model is given by: where M = (M RB + M A ) ∈ R 3×3 denotes the sum of the rigid body mass and hydrodynamic added mass; C(ν) = (C RB + C A ) ∈ R 3×3 is a Coriolis-centripetal matrix due to rigid body and added mass; D(ν) = (D L + D NL ) ∈ R 3×3 is the sum of linear and nonlinear damping matrices given as follows: where Here, m is the mass of the vehicle, I z is the moment of inertia about z b , and x g is the center of gravity.X u, Y v, Y ṙ, N v, and N ṙ are the hydrodynamic added-mass coefficients.X u , Y v , Y r , N v , and N r are constant linear damping coefficients; and, X |u|u , Y |v|v , Y |r|r , N |v|v , and N |r|r are constant nonlinear damping coefficients.We assume fore-aft symmetry such that Y ṙ ≈ N v. Additionally, for low-speed applications, N v = Y r .τ = [X, Y, N] T ∈ R 3 denotes the forces and moments generated by the port thruster, starboard thruster, and bow thruster, respectively.τ ext ∈ R 3 denote forces and moments due to external disturbances [44].The response of the thrusters is assumed to be faster than the dynamics of the vehicle; therefore, the dynamics of the thrusters is neglected.

Discrete-Time Vehicle Model
A discrete-time controller can be obtained either by discretizing a continuous-time controller designed using a continuous-time system model or by directly designing a discretetime controller from the discretized system model.In this study, we followed the latter design approach.Assumption 1. Assume that only the rigid body mass (R RB ) and linear damping (D L ) of the vehicle are known.The other parameters are unknown, and will be estimated using the TDE.This assumption also helps to decouple the sway and yaw dynamics.
Thus, based on Assumption 1 the dynamic model of the vehicle given by Equation ( 1) can be rewritten as follows: where is unknown or perturbation term to be estimated.
Assumption 2. The state variables and control input are assumed to be constant during the sampling time period T, that is, v(t) and τ(t) remain constant [45].
Using Assumption 2, we compute a discrete-time model of the vehicle.By integrating Equation ( 5) over the sampling interval kT into (k + 1)T, we obtain: In Equation ( 6), f (t) contains the terms that cannot be integrated.After rearranging Equation ( 6), the following discretized expression is obtained: where denotes, as explained in Assumption 1, hydrodynamics and parameter uncertainties and the external disturbance.I denotes the identity matrix of appropriate dimension.
where L γ > 0 is a Lipschitz constant and T is the sampling time [46].

Controller Design and Stability Analysis
In this section, the proposed DSTA controller design and stability analysis using the Lyapunov approach are discussed.

Controller Design
The control problem involves designing a robust controller such that the vehicle follows a reference or desired trajectory while addressing the tracking error and chattering effect.In this study, the desired trajectories were defined in a body-fixed reference frame, that is, a body-fixed velocity trajectory following.
To design a SMC, the first step is to select the sliding surface to which the system trajectories are forced to converge.Hence, let the desired trajectories be ν The desired trajectories are generated by the guidance system.Also, let the actual trajectories be ν(k) = [u(k), v(k), r(k)] T provided by the navigation system.Thus, the trajectory error is the difference between the desired and the actual trajectories, that is, e(k) = ν d (k) − ν(k).The sliding surface was selected as follows: where For the trajectories to converge to the sliding surface, the sliding function must satisfy s(k + 1) = s(k) = 0 after some time instant k; however, this does not occur in the real world, instead, the system trajectories are confined to a band near the sliding manifold, that is, QSM.For convergence of the system trajectories, the sliding function must satisfy ∥s(k + 1)∥ < ∥s(k)∥.We compute s(k + 1) from Equation (8) as follows: Now, by substituting Equation ( 7) into Equation ( 9), we obtain The DSTA is given by [35] s(k where and Ω i ∈ R 3×3 for i = 1, 2 are diagonal matrices to be designed to ensure the convergence of DSTA.T is the sampling time period, and sgn(s(k)) is a signum function defined as where γ ∈ R. By equating Equation (10) with Equation ( 11), the control law becomes: where (K p B) −1 must exist.The control law given by Equation ( 12) cannot be realized, because the perturbation term Γ(k) is unknown.From Assumption 3, the perturbation term is bounded.Hence, we employ the TDE method to estimate the perturbation term such that Γ(k) is used instead of Γ(k).The control law can be rewritten as follows: The perturbation term is estimated based on the values of the past state variables of the system and past control inputs, that is, the past dynamics of the system.Mathematically, this can be expressed as Γ(k) = Γ(k) = Γ(k − 1).The estimation of the perturbation term Γ(k) can be obtained from Equation (7) as follows: The estimation in Equation ( 14) is based on the assumption that the perturbation term does not vary significantly during the sampling time.However, if the perturbation term changes rapidly during sampling time, the estimation error may be large [45].Hence, the estimation can be further improved if the delayed perturbation term Γ(k − 1) and differential of Γ(k − 1), which is ∆Γ(k − 1), are used to estimate the perturbation term.Now, we get: After substituting Equation ( 14) into Equation ( 15), the estimated perturbation term becomes Therefore, by substituting the perturbation term Equation ( 16) into Equation ( 13), we obtain the following control law: The control law given by Equation ( 17) can be implemented easily because the perturbation term is known.The delayed state and control input of the system can be retrieved from computer memory.

Stability Analysis
The stability of a closed-loop system is provided as follows [35,36,47]: Consider the dynamics of the surface vehicle given by Equation (2).If there exists a positive definite solution the conditions Ω 1i < 0, and Ω 2i > 0 are met.Therefore, the proposed DSTA controller given by Equation ( 17) ensures asymptotic convergence of the system trajectories to a ball B r (that is, B r = {s : ∥s∥ 2 < r b }) centered at the origin.The ball has a radius of convergence.
where 0 < r < 1 is the ball radius, s is the sliding surface, and Proof of Theorem 1.The closed-loop system dynamics can be obtained by substituting Equation (17) into Equation ( 10), and we obtain where ∆Γ(k) = Γ(k) − Γ(k) denotes the estimation error.As shown in Equation ( 18), the estimation error affects the closed-loop dynamics of the system.In the following section, we verify the robustness of the proposed controller by assuming that the perturbation term satisfies the Lipschitz criterion, as explained in Assumption 3. Now, we rearrange Equation (18) using change of variable.Let ρ(k) = Tς(k) + ∆Γ(k).From this, we obtain where Without loss of generality, we can rewrite Equation (19) for i = 1, 2, 3 as: Equation ( 20) can be expressed using a compact matrix notation as follows: where χ i (k) = [s i (k), ρ i (k)] T , and Ψ(k), φ(k), and ξ(k) are: We select a positive definite Lyapunov function Here, λ min and λ max are the minimum and maximum eigenvalues of L, respectively.
The difference in the Lyapunov function is: By substituting Equation ( 21) into Equation (24), we obtain Substituting Equation (24) into Equation (25), we obtain After collecting these terms, Equation (26) becomes Using the Λ-matrix inequality , some of the expressions in Equation ( 27) are simplified as follows: Hence, Equation ( 27) can be rewritten as By adding rV i (k) to both sides of Equation (28), we obtain where 0 < r < 1.Using LMI, if there exists a negative definite matrix Φ satisfying the following inequality: ∆V i (k + 1) can be rewritten as where However, φ T Fφ can be simplified as follows [36]: The simplification of Equation ( 33) is presented in Appendix A. For the positive definite matrices Ψ and H in Equation ( 31), we can apply the two-norm definition: Here, λ min and λ max are the minimum and maximum eigenvalues of the matrices, respective.Thus, Equation (32) becomes Let ζ 1 = λ min (Ψ) > 0, and 35) is simplified using the completing squares method as follows: By substituting Equation (36) into Equation (35), we obtain where Equation ( 38) is a linear, first-order, ordinary difference equation; thus, we can compute the solution by induction from the first few iterations given as follows: Therefore, from the results in Equations (39a)-(39c), we can generalize the kth iteration as follows: As k approaches infinity, V i (k) becomes: Hence, the radius of the ball is This concludes the proof of Theorem 1.

Controller Gain Optimization Using Genetic Algorithm
In this section, the computation of the optimal gains of the proposed controller using GA is discussed.Setting controller gains, particularly for complex nonlinear systems, is difficult and requires experience.The system response can be made faster with higher controller gains; however, this leads to higher control signals, which in turn increase the energy consumption and actuator saturation.Thus, to address these problems, we applied a GA to tune the controller gains.
To determine optimal gains, an objective or cost function must first be established.In optimal control, the choice of cost function depends on the performance measures that the system must satisfy.These performance measures can be the error, time, and control energy, or a combination of them [49].The use of the sum of tracking error and control energy, or a combination of other performance metrics as a cost function, is a common approach and has been applied in real-world applications.Nevertheless, there is always a trade-off between the selections of the performance criteria.After selecting the cost function, a suitable optimization algorithm is chosen to find the optimal parameters of the controller based on the cost function.
In this study, GA was selected because it is convenient for discrete-time optimization [50].GA is an evolutionary algorithm based on Darwin's theory of natural selection.Generally, it uses three operators: selection, crossover, and mutation.The operation of the GA commences by setting an initial random population comprising possible candidate solutions, and the fitness of the individuals is evaluated using the cost function.The selection operator then selects the fittest individuals, from which parents are selected for reproduction.Offsprings are produced by crossing the chromosomes of the parents.To increase the diversity of the next generation, a mutation operator is applied that prevents stagnation, that is, the similarity of the solution after several generations.This operation continues until the stopping criteria are satisfied [50,51].The GA operation is summarized in the flowchart in Figure 4.

Computing fitness of individuals using the cost function
Are stopping criteria met?The proposed method avoids real-time use of GA.If employed in real-time, the convergence time of GA significantly impacts control performance.Problems may arise if GA fails to converge within the desired time period corresponding to the control frequency.To address this, we employed GA to tune the controller parameters offline before real-time operation.This tuning is specifically for the nominal case, without external disturbances, and is done prior to the real-time operation of the controller.

Mutation operation End
Since ASVs can stay on the water surface for long periods of time, they should use energy efficiently apart from following the desired trajectory by minimizing the tracking error.Thus, we employ a quadratic cost function J c , which is the sum of the tracking error and control energy, defined as follows: where k is the number of time steps and e(i) and u(i) are the vectors of the tracking error and control signal at the i th time instant, respectively.Q ∈ R 3×3 is a positive semidefinite matrix and R ∈ R 3×3 is a positive definite matrix.The cost function, as defined in Equation ( 42), incorporates weighting matrices Q and R for the tracking error index and control energy index, respectively.The values of these matrices depend on the size of the tracking error and the control energy, as mentioned in [52].They are selected to strike a balance between tracking performance and control energy consumption.It should be noted the cost function is formulated as an unconstrained optimization problem.The cost function given by Equation ( 42) is coded using MATLAB.The error and control signals are logged into the MATLAB workspace using the Simulink ® model implementation of the vehicle.The cost function is computed from these signals.Then, the cost function and GA options were passed to the built-in MATLAB GA.Finally, the algorithm tunes the controller's gains until the stopping criteria are reached, which in our case are the maximum number of generations and stall generations.
Figure 5 illustrates our analysis of GA convergence, showing plots of fitness, stopping criteria, and the average distance between individuals.The GA operates with a population size of 250, and its stopping criteria include a maximum of 15 generations and a stall generation of 7, as outlined in Table 1.Other GA settings are detailed in the same table.The fitness graph in Figure 5 demonstrates GA convergence to the 'best' solution in nearly 6 generations, terminating based on the maximum number of generations criterion.Moreover, the graph depicting the average distance between individuals gradually decreases as the generation advances, indicating the convergence of GA towards a proper solution.

Simulation Results and Discussion
This section presents a verification of the performance of the proposed controller through numerical simulations.The simulation comprises two scenarios: (i) the performances of the proposed GA-based DSTA (hereafter, GA-DSTA) and DSTA controllers with TDE are compared.Additionally, to evaluate the performance of these controllers and chattering reduction, we used the commonly used conventional discrete-time SMC based on reaching law (DSMR) implemented in [45].(ii) Since ASVs could be deployed in areas where the disturbance due to ocean current, wind, and ocean waves is significant, the robustness of the proposed controller will be tested in the presence of an external disturbance.
The reference trajectories used were body-fixed velocity trajectories.The physical parameters of the vehicle are obtained from the research vessel used in [44].The vehicle has an overall length of 2.53 m and a 0.565 m beam, and is a scaled-down (1:17.1)model of a large research vessel.The vehicle parameters are listed in Table 2.

Scenario 1: Nominal Case
In this case, the performance of the proposed controller without external disturbances is addressed.A piecewise body-fixed reference trajectory given in Equations ( 43)- (45) for surge, sway, and yaw was used to test the effectiveness of the proposed controller.Discontinuous trajectories are used to validate the controller's performance in worst-case scenarios, even though they may not be used in real-world scenarios.To assess the dynamic performance of the controller, i.e., how the controller reacts to abrupt changes in trajectory, abrupt changes have been considered.These trajectories were discretized using the sampleand-hold method.We assume that the maximum surge speed, sway speed, and yaw rate of the vehicle are 15 m/s, 2 m/s, and 1 rad/s, respectively.The initial speed of the vehicle is set to [u 0 , v 0 , r 0 ] T = [0 m/s, 0 m/s, 0 rad/s] T .A sampling time has to be selected based on the update rate or frequency of the sensors and actuators.Thus, in this study, a sampling time of T = 0.01 s is chosen.
for 0 ≤ t < 10 −10 sin(0.1t)+ 5 cos(0.1πt),for 10 ≤ t < 20 0.01t 2 − 2 sin(0.05πt),for 20 ≤ t < 30 100e − t 8 sin(0.8t),for 30 ≤ t < 40 ( 43) for 20 ≤ t < 30 0.8 sin(0.5t),for 30 ≤ t < 40 (44) for 0 ≤ t < 10 0.4, for 10 ≤ t < 20 e − t 8 sin(0.8t),for 20 ≤ t < 30 The weighting matrices of the objective function are heuristically selected as Q = diag(1.5,1.5, 1.5) and R = diag(0.01,0.01, 0.01).The parameters of both the DSTA and the DSMR were also heuristically tuned.To ensure a fair comparison, we used a fairly similar values as well as to prevent higher control signals which causes control signal saturation and chattering effect.The parameters of the proposed GA-DSTA, DSTA, and DSMR controllers are listed in Table 3.To qualitatively evaluate the performance of the proposed controller, we used two performance indices: (i) the root mean square error (RMSE) was used to compute the tracking error of the three controllers for the surge, sway, and yaw rate; (ii) The Frobenius norm was used to obtain the total control energy expenditure of the three control algorithms.The RMSE and Frobenius norm are given by Equation (46) and Equation (47), respectively.
where ⋆ represents one of the three degrees of freedom, N is the number of time steps, and M denotes the number of degrees of freedom (that is, three in this case).U is a control signal matrix whose dimensions are the number of degrees of freedom by the number of time steps, and u ij denotes each element of U.
The simulation results of the three controllers for the nominal case of the surge, sway, and yaw rates are shown in Figures 6-8.As can be observed from the simulation results, the three controllers drive the vehicle along the desired trajectory successfully; however, the proposed GA-DSTA controller outperforms the other two controllers both in terms of overshoot and tracking error minimization.The RMSEs of the surge, sway, and yaw rate of the three controllers are listed in Table 4.It can be seen from this qualitative analysis that the proposed GA-DSTA controller yields a 13.5% and 40.01%reduction in RMSE compared to the DSTA and DSMR controllers, respectively, for the surge direction.Similarly, the percentage of reduction in RMSE was observed for the sway direction, except for the yaw rate of DSMR, which was approximately 42.56%.For the sake of brevity, the RMSEs of the three controllers are shown in the bar graph in Figure 9.As shown in the bar chart, the RMSE for the surge speed is higher than the RMSE for the sway speed and yaw rate for all the three control methods.This shows that when the speed increases, the tracking error increases as well.Additionally, a step change was included in the desired trajectories to test the dynamic performance of the proposed controller.The proposed controller reacts quickly to the change and tracks the desired trajectory effectively, although there is an insignificant overshoot, as shown in Figures 6-8.The conventional DSMR controller has a large overshoot compared to those of GA-DSTA and DSTA; however, it reacts immediately and settles almost within less than 0.2 s for the surge, sway, and yaw rate.This is due to the TDE algorithm, which estimates the unknown system dynamics so that the controller reacts quickly.
The expenditure of control energy of the proposed GA-DSTA controller including those for DTSA and DSMR are given in Table 5.The energy consumption of the proposed controller was lower than those of the other two controllers.It was found that there was an 41.78% reduction in the energy expenditure of the GA-DSTA controller compared with that of the DSTA controller.However, the energy consumption of the GA-DSTA controller was reduced to 66.4% of that of the DSMR controller.This is clearly shown in the bar graph in Figure 10.Total control energy expenditure (RPM) The total energy consumption of the proposed method and the other two controllers are listed in Table 5.As can be seen from this energy-consumption table, the proposed method has the lowest energy consumption.The energy consumption is related to the chattering.If the chattering is significant, then the energy consumption is high as well.The GA-DSTA controller significantly minimizes the chattering compared to both DSTA and DSMR controllers, resulting in the lowest energy consumption.Additionally, the chattering by the DSTA controller is lower than that of the conventional DSMR controller, leading to lower energy consumption as well.Despite the small difference in tracking errors across the three controllers, the notable improvement in chattering by the GA-DSTA and DSTA controllers contributes to the overall reduction in energy consumption.The chattering effect in the control signals for Scenario 1 is shown in Figure 11.

Scenario 2: External Disturbance
In the real world, the motion of the ASV is affected by external disturbances such as currents, wind, ocean waves, model uncertainties, and parametric variations.Thus, before deploying a control algorithm, its robustness against external disturbances must be tested.In this subsection, we present a simulation in the presence of external disturbances.Note that the external disturbances are assumed to be bounded and satisfy the Lipschitz condition given in Assumption 3. The external disturbances for the surge, sway, and yaw rates are given by Equations ( 48)- (50).
for 0 ≤ t < 10 1.5 sin(2πt) cos(πt), for 10 ≤ t < 20 1.5sawtooth(2πt), for 20 ≤ t < 30 0, for 30 ≤ t < 40 ( 48) for 10 ≤ t < 20 0.5 sin(0.2πt)cos(0.2πt),for 20 ≤ t < 30 0, for 30 ≤ t < 40 ( 49) where sawtooth is a MATLAB built-in sawtooth function.For the surge and sway directions, disturbances were added to the reference trajectory from t = 10 to t = 30, and disturbances for the yaw rate were added from t = 0 to t = 10 and t = 20 to t = 30.The maximum magnitudes of the disturbances for the surge u dis , sway v dis , and yaw rate r dis were ±1.5 m/s, ± 0.5 m/s, and ± 0.2 rad/s, respectively.The sampling time was the same as that in the nominal case.
The simulation results for the second scenario are shown in Figures 12-14 for the surge, sway, and yaw rates, respectively.Even in the presence of external disturbances, the proposed method, including the other two controllers, successfully followed the desired trajectory.The RMSEs for the second scenario are given in Table 6.The percentages of RMSEs reduction of the proposed controller compared to the DSTA controller for the surge, sway direction, and yaw rate are approximately 13.39%, 9.046%, and 13.36%, respectively, and 40%, 35.44%, and 41.7% as compared to the DSMR, respectively.From this comparison, it can be inferred that the proposed controller outperforms the other two.The RMSEs are depicted in the bar chart in Figure 15.The robustness of the proposed controller to external disturbances relies on the gains of the controllers Ω 1 and Ω 2 .When the values of these gains are small, the chattering effect decreases, and the robustness of the controller degrades.The GA tunes these gains to smaller values based on a given objective function.This slightly could degrade the robustness of the proposed controller.However, the presence of the TDE algorithm prevents further performance degradation by estimating unknown system dynamics and external disturbances.
Regarding the control energy expenditure, the proposed controller utilized lower energy than the DSTA and DSMR controllers as shown in Table 7.There is a 41.6% reduction in the energy consumption of GA-DSTA compared to that in DSTA, and 66.3% compared to that in DSMR.The bar chart in Figure 16 shows the total energy consumed by the three controllers.The proposed GA-DSTA and DSTA controllers have less chattering compared to DSMR controller as shown in Figure 17.Yaw rate control signal

Conclusions
In this study, a GA-DSTA controller was proposed for trajectory following of an ASV.Besides, a TDE algorithm was incorporated to estimate the unknown dynamics of the system.The stability of the closed-loop system was analyzed using a Lyapunov approach.The controller gains were tuned using GA based on a quadratic performance index, the sum of the tracking error and the control energy.The performance of the proposed controller was validated with and without the presence of external disturbances, and its performance was also compared with both DSTA and DSMR.The results showed the proposed GA-DSTA controller outperformed, in terms of both the tracking error and the chattering phenomenon reduction, the other controllers.However, though GA improved the tracking capability of the proposed method by suppressing the chattering effect, its robustness slightly decreased when external disturbances were added.However, the TDE algorithms improved the robustness of the controller.
The proposed controller can be applied to the trajectory following of an ASV which can be used to replace time-consuming, expensive, and hazardous sensing tasks which

Figure 2 .
Figure 2. Block diagram of the proposed control method.

Figure 3 .
Figure 3. Illustration of body-fixed and earth-fixed reference frames of a surface vehicle.

Figure 4 .
Figure 4. Flowchart of the Genetic algorithm for gain optimization.

Figure 5 .
Figure 5. Illustration of convergence of genetic algorithm using fitness, stopping criteria, and average distance between individuals.

Figure 6 .
Figure 6.Surge speed trajectory following comparison of the GA-DSTA, DSTA, and DSMR controllers for Scenario 1.

Figure 7 .
Figure 7. Sway speed trajectory following comparison of the GA-DSTA, DSTA, and DSMR controllers for Scenario 1.

Figure 8 .
Figure 8. Yaw rate trajectory following comparison of the GA-DSTA, DSTA, and DSMR controllers for Scenario 1.

Figure 10 .
Figure 10.Comparison of the total energy expenditure of the GA-DSTA, DSTA, and DSMR controllers for Scenario 1. RPM is revolutions per minute.

Figure 12 .
Figure 12.Surge speed trajectory following comparison of the GA-DSTA, DSTA, and DSMR controllers for Scenario 2.

Figure 15 .
Figure 15.Comparison of the RMSEs of the GA-DSTA, DSTA, and DSMR controllers for the surge, sway, and yaw rate Scenario 2. RPM is revolutions per minute.

Table 7 .Figure 16 .
Figure 16.Comparison of total energy expenditure of the GA-DSTA, DSTA, and DSMR controllers in revolution for Scenario 2. RPM is revolutions per minute.

Table 1 .
Parameter setting of genetic algorithm.

Table 2 .
Physical parameters of the ASV.
kg: kilogram, s: second, and m: meter

Table 5 .
The total energy expenditure of GA-DSTA, DSTA, and DSMR controllers for surge, sway, and yaw rate for Scenario 1. RPM is revolutions per minute.

Table 6 .
RMSEs of the GA-DSTA, DSTA, and DSMR controllers for the surge, sway, and yaw rate for Scenario 2.
Control signals for surge, sway, and yaw rate of GA-DSTA, DSTA, and DSMR controllers for Scenario 2. RPM is revolutions per minute.