Model-Free High Order Sliding Mode Control with Finite-Time Tracking for Unmanned Underwater Vehicles

: Several strategies to deal with the trajectory tracking problem of Unmanned Underwater Vehicles are encountered, from traditional controllers such as Proportional Integral Derivative (PID) or Lyapunov-based, to backstepping, sliding mode, and neural network approaches. However, most of them are model-based controllers where it is imperative to have an accurate knowledge of the vehicle hydrodynamic parameters. Despite some sliding mode and neural network-based controllers are reported as model-free, just a few of them consider a solution with ﬁnite-time convergence, which brings strong robustness and fast convergence compared with asymptotic or exponential solutions and it can also help to reduce the power consumption of the vehicle thrusters. This work aims to implement a model-free high-order sliding-mode controller and synthesize it with a time-base generator to achieve ﬁnite-time convergence. The time-base was included by parametrizing the control gain at the sliding surface. Numerical simulations validated the ﬁnite-time convergence of the controller for different time-bases even in the presence of high ocean currents. The performance of the obtained solution was also evaluated by the Root Mean Square (RMS) value of the control coefﬁcients computed for the thrusters, as a parameter to measure the power consumption of the vehicle when following a trajectory. Computational results showed a reduction of up to 50% in the power consumption from the thrusters when compared with other solutions.


Introduction
Unmanned Underwater Vehicles (UUVs) are used in multiple tasks such as ship's hull inspection [1], ecological surveys [2,3], underwater inspection and mapping [4], among others. The use of UUVs avoid risks for human divers and reduce operational costs. In addition, they can perform some tasks that cannot be done by humans in an underwater environment. The motion of these vehicles can be remotely operated (ROVs) or autonomous (AUVs). For ROVs, there is a human pilot that commands the vehicle's movements and actions, usually through a tether. Human presence makes complex exploration and intervention tasks possible since humans can react to changes in the mission plan caused by the unpredictable nature of the underwater environments. However, certain operations such as high precision navigation require some form of autonomy from the vehicle. That is a complex task to achieve and one of the main problems for AUVs [5] since their six Degree of Freedom (DOF) dynamics is highly non-linear and, therefore, difficult to control [6]. Motion control of a UUV has different goals such as waypoint tracking, path following, and 2 of 21 trajectory tracking [7]. For waypoint tracking, the controller should guide the vehicle from a starting position to the desired destination throughout a set of pre-defined waypoints. For path following, the aim is that the vehicle accurately follows the desired path in terms of a geometric description while the trajectory tracking problem requires the vehicle to converge to a desired time-parametrized trajectory. For trajectory tracking, convergence can be either asymptotic, exponential, or in finite-time.
Several control strategies have been applied in the past to achieve high precision trajectory tracking. The Proportional Integral Derivative (PID) control is one of the most employed control strategies for UUVs due to their simple structure. They work well for systems where it is possible to control all outputs through the inputs-meaning they are not underactuated-and are widely used for heading, depth, and surge control [8]. However, one limitation for PID controllers is that they are tuned to deal with specific conditions and, if those conditions change, the performance will be affected. In addition, PID controllers do not consider nonlinearities, which will eventually deteriorate the controller performance. Some other strategies are used with the PID controller to compensate some of the uncertainties faced in the underwater environment. Dong et al. [9] designed a fuzzy rules-based strategy to tune a PID depth controller. Experiments were carried out to test the controller, showing a depth control accuracy of up to 3 cm. Yang et al. [10] adopted a cascade PID structure to deal with horizontal displacements in the heading control. Experimental results showed better performance when compared with a traditional PID controller since oscillations were reduced and even eliminated when controlling the heading of the ROV. Zhang et al. [11] used Particle Swarm Optimization (PSO) to optimize the parameters of a PID controller for horizontal displacements. Simulation results showed better performance than a PID controller, but weaker compared with a fuzzy controller. Hernández-Alvarado et al. [12] proposed a Neural Network (NN) based self-tuning PID controller where the NN automatically estimates a suitable set of gains for the PID controller to achieve system stability. The controller was validated with numerical simulations and experimentation, showing better performance when subject to unknown disturbances and over 3% of energy-saving against a traditional PID controller.
Backstepping Control (BC) is a model-based nonlinear controller that is commonly used for trajectory tracking of UUVs. It is based on the Lyapunov theory [13] and works by sectioning the dynamic system of the vehicle into subsystems, so the controller begins with a known stable system and then iterates to obtain proper controllers for the rest of the subsystems. Yan et al. [14] applied backstepping control to the trajectory tracking of an AUV to a docking station. Simulations of their controller showed that all tracking errors converge to a small neighborhood of the origin. Zhou et al. [15] proposed a solution for underactuated AUVs tracking using a combination of a Neural Network (NN) algorithm and a backstepping sliding mode controller. Simulations showed a smooth tracking of the desired three-dimensional trajectory. Yan et al. [13] proposed a backstepping sliding mode controller with fuzzy switching gain. Simulation results showed that the controller designed can guarantee that the UUV accurately track the desired path in the presence of time-varying interference and effectively eliminate the chattering in the traditional Sliding Mode Control (SMC) method.
SMC is another typical approach for trajectory tracking of UUVs. It has been extensively applied due to its simple form, robustness, and tolerance to model uncertainty. However, SMC has the problem of chattering. For UUV control, the chattering causes high-frequency changes in the speed of the thrusters, which leads to high energy consumption, increase friction, and thruster damage [16]. Ramezani-al et al. [17] proposed an SMC with adaptative gain. In their controller, a continuous term is used instead of a discrete traditional sign function, a large gain for the sliding mode is applied to satisfy the reaching condition, as well as a small gain for the sliding mode to avoid the chattering phenomena. Simulation results showed the controller proposed can decrease the amplitude of chattering in the control signal and increase the convergence rate to the desired trajectory. Lv et al. [18] proposed a fault-tolerant control method integrated with thrust allocation Appl. Sci. 2021, 11, 1836 3 of 21 based on the sliding mode theory. Experimental results showed a reduction of up to 94% of the steady error compared with a conventional SMC. García-Valdovinos et al. [19] proposed a 2nd order SMC combined with a backpropagation NN control scheme for UUVs to deal with external disturbances and parameter variations. Experimental results showed that the controller was able to reduce the position error to zero in a robust way while the online adjustments of the weights in the NN compensated for the variations in the vehicle hydrodynamics and perturbations.
Despite the numerous approaches for trajectory tracking of UUVs encountered, just a few of them have considered a finite-time convergence. Finite-time control is an effective control strategy with strong robustness and fast convergence. It has many advantages such as faster convergence time, higher accuracy, and better anti-disturbance capability [20]. Yan et al. [21] adopted the globally finite-time tracking control strategy, along with a PID-SMC model-based controller, to track a predefined trajectory for a UUV. Simulations showed that the control laws can achieve strongly robust and preferably control performance for the horizontal trajectory tracking control in the presence of parameter perturbation and unknown currents. Their work was extended to three-dimensional trajectory tracking by Yu et al. [22]. Simulation results show that the vehicle can converge to the trajectory and remain in a small neighborhood even in the presence of ocean currents, wherein a small fluctuation in the tracking errors is observed. Chu et al. [23] proposed a local recurrent NN for finite-time trajectory tracking of ROVs with an unknown dynamical model. The authors designed a state observer based on sliding-mode to estimate those variables that cannot be measured by the ROV and achieved finite-time convergence with the adaptative controller proposed. Qiao et al. [24] proposed two control schemes based on sliding mode to the tracking control of UUVs in presence of uncertainties and disturbances: an adaptive integral terminal sliding mode control and an adaptive fast integral terminal sliding mode control. Each controller is composed of a kinematic and a dynamic controller, where the kinematic can achieve local finite-time convergence of the tracking error to zero. Guerrero et al. [25] proposed an adaptative high order SMC with finite-time convergence for an AUV. The authors validated the proposed controller with real experiments for depth and yaw trajectories, considering parametric uncertainties and external disturbances.
Finite-time tracking controllers have been widely and successfully used to control fully actuated robot arms [26,27], but little research has been done for underactuated unmanned underwater vehicles (UUVs), whose particular nonlinear dynamics have other challenges, for instance, the hydrodynamics effects inherent to the vehicle's geometry and water density. Considering the advantages of a controller with finite-time convergence, and that most of the controllers designed to achieve that for trajectory tracking in UUVs navigation are model-based 1st order SMC, this paper presents the formulation and validation of a model-free 2nd order SMC based on a Time Base Generator (TBG) that guarantees finite-time three-dimensional trajectory tracking of underactuated UUVs subject to ocean currents. The resulting control law does neither depend on the hydrodynamics nor other parameters of the vehicle; therefore, it is considered as a model-free controller. In addition, formulation of the control law of this 2nd order SMC eliminates the chattering effect which is common in conventional 1st order SMC [28,29]. To achieve finite-time convergence of the tracking errors of three-dimensional trajectories, the 2nd order SMC is parametrized by a TBG which allows the user to set an arbitrary base-time in which the vehicle will meet the desired trajectory. The performance of the proposed controller is evaluated by numerical simulations including the effects of external disturbances. All this is structured in this paper as: Section 2 describes the BlueROV2 UUV and its dynamic model, as well as the proposed control scheme including the TBG. Section 3 describes the method and parameters used to validate the proposed controller. Section 4 shows the results of the testing and validation, and Section 5 contains the concluding remarks.

Kinematic Model
As described by Fossen [30], two reference frames are needed to build the mathematical model that represents the underwater vehicle: one referenced to the earth (labeled as Earth-fixed frame) and the other referenced to the vehicle (labeled as body-fixed frame). The orthonormal axes are denoted by x, y, z for the Earth-fixed frame, and by x b , y b , z b for the body-fixed frame. These reference frames are shown in Figure 1. As described by Fossen [30], two reference frames are needed to build the mathematical model that represents the underwater vehicle: one referenced to the earth (labeled as Earth-fixed frame) and the other referenced to the vehicle (labeled as body-fixed frame). The orthonormal axes are denoted by , , for the Earth-fixed frame, and by , , for the body-fixed frame. These reference frames are shown in Figure 1. The Society of Naval Architects and Marine Engineers (SNAME) has a convention to express the position and orientation of vehicles, and the forces and moments applied to them. The SNAME nomenclature for position, velocity, and forces in underwater vehicles [30] is presented in Table 1.

Movement
Name The position of the vehicle with respect to the Earth-fixed frame and its velocity with respect the body-fixed frame can be represented as = ( , , , , , ) , The forces and moments of the vehicle with respect to the body-fixed frame are described as The Society of Naval Architects and Marine Engineers (SNAME) has a convention to express the position and orientation of vehicles, and the forces and moments applied to them. The SNAME nomenclature for position, velocity, and forces in underwater vehicles [30] is presented in Table 1.
The position of the vehicle with respect to the Earth-fixed frame η and its velocity with respect the body-fixed frame ν can be represented as The forces and moments of the vehicle with respect to the body-fixed frame are described as 5 of 21

Hydrodynamic Model
The hydrodynamic model of a UUV can be described by Newton-Euler equations [30] as where M ∈R 6×6 is the inertial and added mass matrix, C ∈R 6×6 is the rigid body and added mass centripetal and Coriolis matrix, D ∈R 6×6 is the hydrodynamic damping matrix, g ∈R 6×1 is the restitution forces vector, B t ∈R 6×6 is the thruster allocation matrix, u t ∈R 6×1 is a vector containing the force generated by the thrusters, and ω ∈R 6×1 represents environmental disturbances.

BlueROV2 Model
The vehicle considered for the simulations in this work was the BlueROV2 from Blue Robotics ® . It has the six-thruster vectored configuration that can be seen in Figure 2.

Hydrodynamic Model
The hydrodynamic model of a UUV can be described by Newton-Euler equations [30] as where M ∈ℝ 6×6 is the inertial and added mass matrix, C ∈ℝ 6×6 is the rigid body and added mass centripetal and Coriolis matrix, D ∈ℝ 6×6 is the hydrodynamic damping matrix, g ∈ℝ 6×1 is the restitution forces vector, ∈ℝ 6×6 is the thruster allocation matrix, ∈ℝ 6×1 is a vector containing the force generated by the thrusters, and ∈ℝ 6×1 represents environmental disturbances.

BlueROV2 Model
The vehicle considered for the simulations in this work was the BlueROV2 from Blue Robotics ® . It has the six-thruster vectored configuration that can be seen in Figure 2. Matrices and vectors involved in the vehicle's hydrodynamics contain numerous unknown parameters, making it infeasible to estimate. Nevertheless, there are some assumptions and considerations that can be made because of the BlueROV2 geometry and operation, resulting in a considerable reduction of unknown parameters. These conditions are listed below:


Since BlueROV2 operates at relatively low speeds (i.e., less than 2 m/s), lift forces can be neglected.  BlueROV2 is assumed to have port-starboard symmetry and fore-aft symmetry, and the center of gravity (CG) is in the symmetry planes.  BlueROV2 is assumed to operate below the wave-affected zone. As a result, disturbances of waves on the vehicle are negligible.  The thruster allocation of BlueROV2 does not permit active control of the pitch orientation q. However, the motion around this axis is considered self-regulated due to the vehicle buoyant restoring moments, resulting in the following reduced system = ( , , , , 0, ) , Matrices and vectors involved in the vehicle's hydrodynamics contain numerous unknown parameters, making it infeasible to estimate. Nevertheless, there are some assumptions and considerations that can be made because of the BlueROV2 geometry and operation, resulting in a considerable reduction of unknown parameters. These conditions are listed below:

•
Since BlueROV2 operates at relatively low speeds (i.e., less than 2 m/s), lift forces can be neglected.

•
BlueROV2 is assumed to have port-starboard symmetry and fore-aft symmetry, and the center of gravity (CG) is in the symmetry planes. • BlueROV2 is assumed to operate below the wave-affected zone. As a result, disturbances of waves ω on the vehicle are negligible.

•
The thruster allocation of BlueROV2 does not permit active control of the pitch orientation q. However, the motion around this axis is considered self-regulated due to the vehicle buoyant restoring moments, resulting in the following reduced system Considering the reduced system detailed before, the physical and hydrodynamic parameters of BlueROV2 are summarized in Table 2 as identified in [31][32][33].
Added mass parameters Linear Damping parameters The matrices that comprise the hydrodynamical model in Equation (4) are considered as defined in [30].
Considering the thruster distribution in the BlueROV2, the thruster allocation matrix is assembled as

Model-Free High-Order SMC with Finite-Time Convergence
The dynamics of the UUV (Equation (4)) can be expressed in the Earth-fixed frame applying the following kinematic transformations [30] .
where the transformation matrix J(η 2 ) is defined as with where c angle = cos(angle), s angle = sin(angle), and t angle = tan(angle).
After some mathematical manipulation, the resulting expression is where García-Valdovinos et al. [26,27] established that Equation (10) is linearly parametrizable by the product of a regressor Y η, . η, .. η ∈ R n × p composed of known nonlinear functions and a vector θ ∈ R p containing constant parameters. Then, this parametrization can be rewritten in terms of a nominal reference . η r and its time derivative .. η r as follows Subtracting Equation (12) from both sides of Equation (10) leads to the open-loop error dynamics expression where η r is known as the extended error. Now, consider the following nominal reference where η = η − η d represents the tracking error of the position, η d is the desired trajectory, α and K i are diagonal positive definite n × n gain matrices, sign(x) stands for the signum f unction of vector x and with κ > 0. So that the extended error S r can be rewritten as follows The result is the model-free high-order SMC with the following control law Notice that the so-called model-free control law does not depend on any parameter, matrix, or vector describing the hydrodynamics of the vehicle, it is defined by a diagonal definite positive n × n gain matrix K d , and the extended error S r . Furthermore, since the signum f unction is not used directly but through its integral, the chattering effect common in conventional SMC is not present. A stability analysis of the controller just described can be found in [34] where the existence of the sliding mode was proven.
A TBG will be used to achieve finite-time convergence. A TBG is a scalar time function that provides a smooth transition from 0 to 1, with a duration controllable by a time-base t b . Its derivative provides a bell-shaped speed profile. The TBG implemented in this work was introduced by Parra-Vega [26] and García-Valdovinos [27] for finite-time convergence of a robotic arm. Consider the fifth-order polynomial and its time derivative with t 0 representing the initial time and subjected to the following conditions: ξ(t b ) = 0. The time-base t b can be chosen arbitrarily and does not depend on the initial condition. Now, ξ(t) will be used to parameterize a time-varying gain α(t) as follows with α 0 = 1 + ε, 0 < ε 1, 0 < δ 1, and α c > 0. To achieve finite-time convergence in the trajectory tracking of the BlueROV2, the constant gain α in Equation (15) is replaced with the time-varying gain α(t) given by Equation (22). Then, the control law described in Equation (19) is applied. The control scheme is represented in the block diagram depicted in Figure 3.
To obtain the forces needed in the thrusters, τ η needs to be converted from the Earthfixed frame to the body-fixed frame as follows Then, the control coefficient vector u for the thrusters is computed as where K T is a diagonal matrix containing the maximum force (N) each thruster can produce. Then, the control coefficient vector u is limited to a range of −1 ≤ u ≤ 1 to avoid thruster saturation and to keep the control signal introduced to the model in a range that can be achievable by the thrusters.  To obtain the forces needed in the thrusters, needs to be converted from the Earth-fixed frame to the body-fixed frame as follows Then, the control coefficient vector for the thrusters is computed as where is a diagonal matrix containing the maximum force (N) each thruster can produce. Then, the control coefficient vector is limited to a range of −1 ≤ ≤ 1 to avoid thruster saturation and to keep the control signal introduced to the model in a range that can be achievable by the thrusters.

Validation Method for the Controller
To test and validate the proposed control scheme the hydrodynamics of the BlueROV2-as presented in Section 2.1-was programmed in a simulator developed in MATLAB/Simulink ® . This simulator also considers some external disturbances such as ocean currents.

Parameterized Trajectory of the UUV
A spiral trajectory was selected to be able to control all DOFs of the BlueROV2 ( , , , , ) while moving simultaneously at surge, sway, heave, and yaw. The desired positions and velocities ̇d are given by the following equations = ( , , , , ), where = + ( ),

Validation Method for the Controller
To test and validate the proposed control scheme the hydrodynamics of the BlueROV2as presented in Section 2.1-was programmed in a simulator developed in MATLAB/ Simulink ® . This simulator also considers some external disturbances such as ocean currents.

Parameterized Trajectory of the UUV
A spiral trajectory was selected to be able to control all DOFs of the BlueROV2 (x, y, z, ϕ, ψ) while moving simultaneously at surge, sway, heave, and yaw. The desired positions η d and velocities . η d are given by the following equations where where .
x d = − ω Rsin(ωt), . y d = ω R cos(ωt), where R is the radius for the spiral trajectory, ω is a constant, (x i , y i ) is the center of the circumference of the spiral, z i is the initial depth for the trajectory, z f is the final depth of the trajectory, ψ i is the initial yaw, and t s is the simulation time.
The desired spiral trajectory with R = 1 meter, ω = π 6 rad s , (x i , y i ) = (0, 0), z i = 0, z f = 10 meters, and a simulation time t s = 30 s is plotted in Figure 4. is the radius for the spiral trajectory, is a constant, ( , ) is the center of the circumference of the spiral, is the initial depth for the trajectory, is the final depth of the trajectory, is the initial yaw, and is the simulation time. The desired spiral trajectory with = 1 meter, = 6 , ( , ) = (0,0), = 0, = 10 meters, and a simulation time = 30 s is plotted in Figure 4.

Considering Ocean Currents as Disturbances
The forces of the ocean currents can be considered constant and irrotational according to Fossen [30]; and can be implemented using relative velocity, which is the difference between the real velocity and the ocean current velocity where is the vehicle velocity and is the ocean current velocity.

Considering Ocean Currents as Disturbances
The forces of the ocean currents can be considered constant and irrotational according to Fossen [30]; and can be implemented using relative velocity, which is the difference between the real velocity and the ocean current velocity where ν is the vehicle velocity and ν oc is the ocean current velocity. The generalized vector for an irrotational ocean current velocity is given by where u oc is an ocean current velocity from the north, v oc is the ocean current velocity from the east, and w oc is the ocean current velocity from below. Defining the angles α oc as the angle of attack, and β oc as the slide slip angle, every element of the velocity vector can be calculated as u oc = ν oc cosα oc cosβ oc , v oc = ν oc sinβ oc , and w oc = ν oc sinα oc cosβ oc , Since the velocity vector is expressed in the Earth-Fixed frame, Equation (4) can be modified resulting in Zhang et al. [35] performed some experiments where high ocean currents affecting a UUV were measured. Taking them into account and for purposes of the simulations presented in this work, the following ocean currents will be included as constants

Comparing with Classic Controllers
Other classic control approaches such as PID, Feed-Back Linearization (FBL), and Lyapunov-based controllers [30], [36] will be simulated for the trajectory tracking of the BlueROV2 to compare the performance of the proposed model-free 2nd order SMC.

PID Controller
The control signal used for the PID controller is given by where K p , K i , and K d are the proportional, integral, and derivative gain matrices, respectively. An initial set of gain matrices was proposed and then several simulations were performed aiming to find the one that produces the best results for the trajectory tracking of all DOFs. As a result, the gain matrices for this controller are defined as

Feed-Back Linearization Controller
The control signal used for the FBL controller is given by: where a b is the commanded acceleration. Here, a PID controller will be used as an auxiliary controller to compute a b as where K p , K i , and K d will take the same values as in Equation (33).

Lyapunov-Based Controller
The control signal used for the Lyapunov-based controller is given by: where . .
where K and α are gain matrices which, after several iterations to find a suitable performance of the controller, will take the following values The values for the gain matrices used in the simulations of this work are summarized in Table 3.

Results and Discussion
A simulation was performed so that a computational model of the BlueROV2 follow the spiral trajectory described before, the parameters and gains for the proposed model-free 2nd order SMC with finite-time convergence are shown in Table 4. The initial position for the vehicle was set to x = 2 meters, y = −1 meter, and z = 2 meters so it started slightly away from the desired trajectory. The effects of ocean currents were neglected for this simulation. Results for trajectory tracking and errors of the proposed controller are presented in Figure 5. The controlled trajectory smoothly converged with the desired trajectory at the time-base proposed and without overshoots, after that, the vehicle followed the desired trajectory without deviations. The errors decreased over time to become zero at the designated t b except for the pitch, which, as established in Section 2.1, was not actuated and the resulting increase in its error-smaller than 0.5 • -was caused by the vehicle's dynamics while moving forward.
A three-dimensional trajectory of the BlueROV2 simulation along with the control trajectory can be seen in Figure 6.
The control coefficients for each of the BlueROV2 thrusters are shown in Figure 7. These control coefficients were in a range of −1 ≤ u ≤ 1, where |u| = 1 represents that the controller is demanding 100% of the thruster force. The maximum force was demanded at the start of the simulation and, after reaching the time-base, the control signals remained constant and no chattering was observed.
Results for trajectory tracking and errors of the proposed controller are presented in Figure 5. The controlled trajectory smoothly converged with the desired trajectory at the time-base proposed and without overshoots, after that, the vehicle followed the desired trajectory without deviations. The errors decreased over time to become zero at the designated except for the pitch, which, as established in Section 2.1, was not actuated and the resulting increase in its error-smaller than 0.5°-was caused by the vehicle's dynamics while moving forward. A three-dimensional trajectory of the BlueROV2 simulation along with the control trajectory can be seen in Figure 6. The control coefficients for each of the BlueROV2 thrusters are shown in Figure 7. These control coefficients were in a range of −1 ≤ ≤ 1, where | | = 1 represents that the controller is demanding 100% of the thruster force. The maximum force was demanded at the start of the simulation and, after reaching the time-base, the control signals remained constant and no chattering was observed. Since can be tuned arbitrarily for the user, further simulations were performed The control coefficients for each of the BlueROV2 thrusters are shown in Figure 7. These control coefficients were in a range of −1 ≤ ≤ 1, where | | = 1 represents that the controller is demanding 100% of the thruster force. The maximum force was demanded at the start of the simulation and, after reaching the time-base, the control signals remained constant and no chattering was observed. Since can be tuned arbitrarily for the user, further simulations were performed for the proposed controller under the same gains and parameters but for different timebases. Simulation results for trajectory tracking and errors are shown in Figure 8 and Figure 9 for a time-base of 3 and 7 s, respectively. In both cases, the vehicle met the desired trajectory at the designated time-base . Since t b can be tuned arbitrarily for the user, further simulations were performed for the proposed controller under the same gains and parameters but for different time-bases. Simulation results for trajectory tracking and errors are shown in Figures 8 and 9 for a time-base of 3 and 7 s, respectively. In both cases, the vehicle met the desired trajectory at the designated time-base t b .  The controllers presented and described in Section 3.3 were simulated for comparing their error convergence to zero and the control coefficient computed for the BlueROV2 thrusters. As can be seen in Figure 10, the surge and sway error of the proposed controller  The controllers presented and described in Section 3.3 were simulated for comparing their error convergence to zero and the control coefficient computed for the BlueROV2 thrusters. As can be seen in Figure 10, the surge and sway error of the proposed controller The controllers presented and described in Section 3.3 were simulated for comparing their error convergence to zero and the control coefficient computed for the BlueROV2 thrusters. As can be seen in Figure 10, the surge and sway error of the proposed controller converges to zero at the desired time. Meanwhile, the rest of the controllers converged at different times and, for the PID and FBL, there was not a stationary error but an oscillation in its value was observed through the simulated time. For the heave error, despite the oscillations resulting in the PID and the FBL, all the controllers converged to zero. Finally, for the yaw orientation, the FBL exhibited some troubles converging to zero during the first 20 s to finally converge to it exponentially. In general, the performance of the proposed model-free 2nd order SMC with finite-time convergence surpassed the rest of the controllers, even when FBL and Lyapunov-based were model-based. in its value was observed through the simulated time. For the heave error, despite the oscillations resulting in the PID and the FBL, all the controllers converged to zero. Finally, for the yaw orientation, the FBL exhibited some troubles converging to zero during the first 20 s to finally converge to it exponentially. In general, the performance of the proposed model-free 2nd order SMC with finite-time convergence surpassed the rest of the controllers, even when FBL and Lyapunov-based were model-based. To evaluate the performance of the proposed controller in terms of energy consumption from the thrusters, the Root Mean Square (RMS) value of the control coefficients computed for the thrusters was obtained and results are shown in Table 5. The mean column of the table represents the mean value of the coefficients considering all six thrusters. As it can be seen in the table, the average thruster force demanded by the proposed modelfree 2nd order SMC was in the range of 0.1004 and 0.1296-1.0 being the maximum-this was up to 50% less than the forces demanded by a traditional PID or FBL controller even when it converged faster. The Lyapunov-based controller converged to the trajectory approximately at 7 s, and its mean value for control coefficient of the thrusters was 23% bigger than the 2nd Order SMC with t = 7 s.  To evaluate the performance of the proposed controller in terms of energy consumption from the thrusters, the Root Mean Square (RMS) value of the control coefficients computed for the thrusters was obtained and results are shown in Table 5. The mean column of the table represents the mean value of the coefficients considering all six thrusters. As it can be seen in the table, the average thruster force demanded by the proposed modelfree 2nd order SMC was in the range of 0.1004 and 0.1296-1.0 being the maximum-this was up to 50% less than the forces demanded by a traditional PID or FBL controller even when it converged faster. The Lyapunov-based controller converged to the trajectory approximately at 7 s, and its mean value for control coefficient of the thrusters was 23% bigger than the 2nd Order SMC with t b = 7 s. To test the controller response to external disturbances, the effects of ocean currents were included as described in Section 3.2. Results for trajectory tracking and errors of a simulation with the proposed model-free 2nd order SMC with t b = 5 s are shown in Figure 11. Despite the high ocean currents introduced, the BlueROV2 still smoothly converged to the desired trajectory at the designated t b , there were not overshoots at all, and the vehicle followed the designed trajectory with an error of zero after the time-base was reached. To test the controller response to external disturbances, the effects of ocean currents were included as described in Section 3.2. Results for trajectory tracking and errors of a simulation with the proposed model-free 2nd order SMC with = 5 s are shown in Figure 11. Despite the high ocean currents introduced, the BlueROV2 still smoothly converged to the desired trajectory at the designated , there were not overshoots at all, and the vehicle followed the designed trajectory with an error of zero after the time-base was reached. A three-dimensional trajectory of the BlueROV2 simulation along with the control trajectory when subject to ocean currents can be seen in Figure 12. A three-dimensional trajectory of the BlueROV2 simulation along with the control trajectory when subject to ocean currents can be seen in Figure 12. A three-dimensional trajectory of the BlueROV2 simulation along wit trajectory when subject to ocean currents can be seen in Figure 12.  Control signals for each of the BlueROV2 thrusters are shown in Figure 13. Contrary to the simulation results shown in Figure 7, the control signal did not remain constant after the time-base was reached. Thruster control signals changed over time to overcome the perturbations introduced by the ocean currents, which allowed the BlueROV2 to follow the desired trajectory as designed.
Appl. Sci. 2021, 11, x FOR PEER REVIEW Control signals for each of the BlueROV2 thrusters are shown in Figure 13. to the simulation results shown in Figure 7, the control signal did not remain after the time-base was reached. Thruster control signals changed over time to the perturbations introduced by the ocean currents, which allowed the BlueRO low the desired trajectory as designed. Ocean currents were also included in simulations for the rest of the contro sidered in the past section. Results for tracking errors are presented in Figure 14 the classic controllers tested were able to overcome the perturbations introduc the proposed model-free 2nd order SMC was able to compensate for them and the finite-time convergence as designated by the user. Ocean currents were also included in simulations for the rest of the controllers considered in the past section. Results for tracking errors are presented in Figure 14. None of the classic controllers tested were able to overcome the perturbations introduced, while the proposed model-free 2nd order SMC was able to compensate for them and keeping the finite-time convergence as designated by the user. Ocean currents were also included in simulations for the rest of the controllers considered in the past section. Results for tracking errors are presented in Figure 14. None of the classic controllers tested were able to overcome the perturbations introduced, while the proposed model-free 2nd order SMC was able to compensate for them and keeping the finite-time convergence as designated by the user. To evaluate the performance of the proposed controller in terms of energy consumption from the thrusters, the Root Mean Square (RMS) value of the control coefficients computed for the thrusters was obtained when the vehicle was subject to high ocean currents. Results are shown in Table 6. The average thruster force demanded by the model-free 2nd order SMC with finitetime convergence was in a range of 0.1903 and 0.2105, which resulted in up to 30% less than the average force demanded by the PID controller and up to 64% less than the demanded by the FBL controller, even when they were not able to meet the trajectory and maintain the vehicle there.

Conclusions
Finite-time trajectory tracking of underactuated UUVs is a considerable challenge. Their nonlinear dynamics and the challenging conditions of the underwater environment make it more complex for the controller to achieve a stable and robust performance as they do in other systems and environments. In this work, for the first time, a model-free 2nd order SMC and a TBG were synthesized and implemented to achieve finite-time convergence of an underactuated nonlinear UUV to a desired trajectory. Such a controller has some advantages compared with other finite-time model-based 1st order SMC reported in literature since it neither requires the dynamic model structure nor the knowledge of any hydrodynamical parameter from the vehicle. In addition, this controller does not present the chattering effect common in other conventional SMC. The TBG was included in the controller by the parametrization of the α gain at the sliding surface, making it time-varying instead of constant. The hydrodynamical model of the BlueROV2 UUV was implemented in MATLAB/Simulink ® . There, numerical simulations were performed to validate the performance of the proposed controller. Results have shown that the controller was able to manage the BlueROV2 to smoothly converge to the desired trajectory at a specific time without overshoots, and then follow it with a tracking error of zero. Other classic controllers such as PID and FBL could not achieve a similar performance. Since the time-base can be tuned arbitrarily for the user, simulations were repeated with different time-bases and the results remained consistent and satisfactory. The performance of the solution proposed was also evaluated in terms of the energy consumption regarding the thruster forces demanded by the different controllers. It was shown that the proposed model-free 2nd order SMC demands up to 50% less power from the thrusters than other of the controllers simulated and it does not present the chattering effect common in some SMC controllers. Finally, the vehicle was subject to high ocean currents. Simulation results showed that the controller stills able to meet the desired trajectory at the designated time, smoothly and without overshoots, and then maintain the vehicle in the desired trajectory when other classic controllers could not. In future work, authors expect to verify the finite-time convergence of the model-free 2nd order SMC by performing experimentation under controlled conditions with the BlueROV2 vehicle whose hydrodynamical model was considered for the simulations presented in this work. Further research will also include the obstacle avoidance problem during the trajectory tracking.