Experimental Validation of a Model-Free High-Order Sliding Mode Controller with Finite-Time Convergence for Trajectory Tracking of Autonomous Underwater Vehicles

Several control strategies have been proposed for the trajectory tracking problem of Autonomous Underwater Vehicles (AUV). Most of them are model-based, hence, detailed knowledge of the parameters of the robot is needed. Few works consider a finite-time convergence in their controllers, which offers strong robustness and fast convergence compared with asymptotic or exponential solutions. Those finite-time controllers do not permit the users to predefine the convergence time, which can be useful for a more efficient use of the robot’s energy. This paper presents the experimental validation of a model-free high-order Sliding Mode Controller (SMC) with finite-time convergence in a predefined time. The convergence time is introduced by the simple change of a time-base parameter. The aim is to validate the controller so it can be implemented for cooperative missions where the communication is limited or null. Results showed that the proposed controller can drive the robot to the desired depth and heading trajectories in the predefined time for all the cases, reducing the error by up to 75% and 41% when compared with a PID and the same SMC with asymptotic convergence. The energy consumption was reduced 35% and 50% when compared with those same controllers.


Introduction
Autonomous Underwater Vehicles (AUV) have permitted us to deepen the knowledge of the oceans and seafloors. The use of AUVs in tasks such as structural inspection [1,2], environmental risks detection [3], and mapping underwater structures [4], among others, increases the safety of the mission and the reliability of their results [5], and reduces the operational costs considerably [6]. However, due the challenging conditions in the underwater environment, a high precision autonomous navigation is difficult to achieve [7]. Autonomous navigation can be performed by different methods such as waypoint tracking, path following, and trajectory tracking [8]. In the waypoint tracking method, the vehicle navigates throughout a set of pre-defined waypoints. This is the easier method to be implemented, however, it could result in some uncertainty in the trajectory followed by the vehicle between two waypoints [9]. The path following navigation ensures that the vehicle follows a desired path to reach its destination, which is geometrically defined in Cartesian coordinates [10]. In the trajectory tracking problem, the vehicle must follow a time-parametrized path, meaning it must go to a certain point in a given time [11]. The integration of time and space restrictions makes trajectory tracking the most complex of the referred autonomous navigation methods. Considering this, the highly non-linear dynamics of the AUV and the presence of external disturbances demands the development of new control methods to fulfill the extremely challenging problem of trajectory tracking in AUVs.
Proportional Integrate Derivative (PID) control was extensively used at the early stages of AUV tracking control [12][13][14]. PID controllers have a simple structure that allows an easier implementation. They are tuned to deal with very specific conditions and any change on them will cause a performance drop. Additionally, they do not consider non-linearities, which are highly present in the AUVs dynamics and the underwater environment. An alternative to deal with traditional controllers' issues is to include an intelligent algorithm [15,16] in the control law to achieve an adjustment of the controller parameters or self-tuning. This is known as adaptive control, which does not require an exact model of the vehicle and only a small amount of prior knowledge suffices. Backstepping control [17] and Sliding Mode Control (SMC) [18] are other common control methods widely used in the trajectory tracking of AUVs. The control methods used for AUVs trajectory tracking discussed before have an asymptotic or exponential convergence to the trajectory. A finite-time convergence controller would have many advantages such as faster convergence time, higher accuracy, and better anti-disturbance capability [19].

Related Work
Limited literature can be found related to control methods with finite-time convergence for AUV trajectory tracking. Ramezani-al et al. [20] proposed an SMC with an adaptive gain to eliminate the effects of external chattering and noise vulnerability. In numerical simulations, the proposed controller drives the vehicle to the desired trajectory in a limited time. Yu et al. [21] achieved finite-time convergence trajectory tracking of AUVs in presence of model parameter perturbation and ocean currents. The controller is based on a PID-SMC combination that globally stabilizes all tracking errors in a finite-time. Numerical simulations showed absolute tracking errors up to 20 cm in the absence of external disturbances. Qiao et al. [22] used two adaptive integral terminal SMC schemes to achieve trajectory tracking on AUVs. This controller yields finite-time convergence while dealing with dynamic uncertainties and external disturbances. The performance of the proposal was tested by numerical simulations resulting in robustness of 2% in position tracking. In those works, the controlled trajectory converges to the reference in a time that depends either on the vehicle parameters, its initial position, or the own controller parameters and gains. Therefore, prior knowledge of the vehicle is required to estimate the convergence time, and a different initial position and changes on the controller parameters will affect it. González-García et al. [23] presented a model-free high-order SMC with finite-time convergence aiming for cooperative AUVs missions. On contrary to previous works, the finite-time for the convergence can be predefined by the user through the time-base parameter t b , the value of which-in seconds-is only limited by the thruster's capabilities. The arbitrary setting of the time-base parameter does not affect the robustness and performance of the controller once it meets the desired trajectory and can be used to demand a faster or slower response from the vehicle depending on what the mission requires. Numerical simulations were performed and results showed an outstanding performance when compared with traditional controllers. Even in the presence of strong ocean currents, the error was zero in the predefined time in all the cases simulated.
All of the works discussed before were limited to numerical simulations. However, due to the limitations present in real experiments, such as sensor resolution, measurement rate, processor speed, and so, it is quite possible that a controller does not perform as expected when programmed in a real system. The performance of a model-free high-order SMC with finite-time convergence in a predefined time is validated by real experiments in this paper. Being able to arbitrarily select the convergence time for the controller opens the options for better management of the vehicle energy consumption. It would also be an advantage to coordinate a group of AUVs in cooperative tasks. The performance of the controller was compared with a PID and an asymptotic 2nd-order SMC. The experiments were performed using the BlueROV2 robot which was modified to be able to follow predefined trajectories autonomously. The experiments consisted of a depth and heading control to follow a predefined sinusoidal trajectory and were carried out in a pool with 1 m depth The rest of the document is structured as: Section 2 describes the generalities of underwater vehicles, the control algorithm to be validated, and the BlueROV2 vehicle configuration. Section 3 describes the experimental set up including the BlueROV2 modifications and controller's laws and parameters. Section 4 shows the results of the experiments performed and their discussion, and Section 5 contains the concluding remarks.

Materials and Methods
General equations for kinematics and hydrodynamics of the AUVs are introduced in this section along with the particularities of the robot used in the experiments. After that, the model-free high-order SMC with finite-time convergence in predefined time is also introduced.

Autonomous Underwater Vehicles Kinematics and Hydrodynamics
Fossen [24] describes the kinematics of underwater vehicles using two reference frames: an Earth-fixed frame and a Body-fixed frame. As shown in Figure 1, the orthonormal axes are denoted as x, y, and z for the Earth-fixed frame and x b , y b , and z b for the Bodyfixed frame. There is a convention for the notation of underwater vehicle's position, orientation, and velocities accepted by the Society of Naval Architects and Marine Engineers (SNAME) [24], which also defines the forces and moments applied to the vehicle. Considering this nomenclature, the vehicle's position regarding the Earth-fixed frame (η) and its velocities regarding the Body-fixed frame (ν) can be described as and the forces and moments with respect to the Body-fixed frame (τ) as The hydrodynamical model for underwater vehicles, as described by Newton-Euler equations [24], is given by 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, τ R 6×1 is the control signal 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×6 represents environmental disturbances. According to Fossen [24], the model given by Equation (4) can be expressed in the Earth-fixed frame applying kinematic transformations as followṡ where with c angle , s angle , and t angle are abbreviations for cos(angle), sin(angle), and tan(angle), respectively. After some mathematical manipulation, the resulting expression for the hydrodynamical model in the Earth-fixed frame is where

Finite-Time Controller with Convergence in a Predefined Time
The High-order SMC with finite-time convergence used in this work is based in the proposal by García-Valdovinos et al. [25][26][27] and was adapted for trajectory tracking of AUVs in [23] as follows: Consider that Equation (12) is linearly parametrizable by the product of a regressor Y(η,η,η) R n×p , which is composed of known nonlinear functions and a vector θ R p with constant parameters. The parametrization of Equation (12) can be rewritten in terms of a nominal referenceη r and its derivativeη r as Subtracting Equation (18) from both sides of Equation (12) leads to the open-loop error dynamics expression where S r is known as the extended error computed as considering the nominal referencė where the tracking error of the position is given byη = η − η d , η d is the desired position, α and K i are diagonal positive definite n × n gain matrices, sign(x) is the signum function of the x vector, and with k > 0. The extended error can be now rewritten as resulting in the model-free second-order SMC which control law is defined as A stability analysis of the controller just described can be found in [27]. To achieve finite-time convergence with this model-free high-order SMC, a Time-Base Generator (TBG) is used as described in [25,26]. This TBG is a scalar function providing a smooth 0 to 1 transition. The duration of that transition is controllable by a predefined time-base t b . The derivative of this function provides a bell-shaped speed profile. The functions used for the TBG are where t 0 represents the initial time. Equations (27) and (28) are subjected to the following conditions: Then, ξ(t) is used to parameterize the gain α in Equation (22) as time-varying as follows with α 0 = 1 + , 0 < 1, 0 < δ 1, and α c > 0. A diagram of the complete control scheme is showed in Figure 2.
Remark 1. The time-base parameter t b can be chosen arbitrarily and does not depends on the initial conditions or controller parameters. The convergence of the controlled trajectory will occur at the selected t b , which means that a smaller value for t b will produce a faster convergence, and a bigger t b value will produce a slower convergence.

BlueROV2 Robot
The BlueROV2 from Blue Robotics ® is a Remotely Operated Vehicle (ROV) with a 6-Thruster vectored configuration as shown in Figure 3. It has an open-source software and hardware configuration, which make it suitable for research purposes. A complete set of the BlueROV2 physic and hydrodynamic parameters is listed in [23]. However, this work considers a model-free control algorithm, which means that only the thruster allocation matrix B t is needed. From the BlueROV2 thruster distribution, B t is defined as

Exact Differentiatior
The tracking error derivative is needed to compute the control signal. That means that the velocities of the robot need to be estimated. The easiest way to do that is through a simple Euler differentiatior. However, this differentiatior is quite sensitive to noise and will produce an inaccurate estimation of the robot velocities. An alternative is to use an exact differentiatior as the proposed by Davila et al. [28].

Experimental Set-Up
The BlueROV2 was modified in its hardware and software to be able to autonomously follow predefined depth and yaw trajectories. The proposed model-free high-order SMC with finite-time convergence was tested in different experiments and its performance was compared with traditional PID and 2nd-order SMC. The experimental set up can be observed in the Figure 4. The experiments were performed in the Tecnologico de Monterrey, Campus Queretaro semi-olympic swimming pool. All the runs were made in the same robot-BlueROV2-using three full-charged batteries-one for every control scheme-from 9:00 a.m. to 12:00 p.m. This with the aim of perform the experiments under the same conditions. No external disturbances were introduced to the experiments. An OMEN O15 Laptop with a Intel CORE i7 processor running UBUNTU 16 as operative system was used as ground control station.

Hardware
Inside the BlueROV2, a Raspberry Pi ® 3 (RPi) acts as the processor, and it is in charge of running the control algorithms and managing the different sensors. The Rpi runs Lubuntu as operative system, and it is connected to a control station through a tether. A BAR-30 high-resolution pressure sensor from BlueRobotics ® is connected to the robot through an I 2 C port in the RPi to measure the depth z of the vehicle. A Smart sensor BNO-055 from Bosh ® is connected to a serial port of the Rpi and is used to estimate the orientations φ, θ, ψ. The thruster's speeds are controlled by Pulse Wide Modulation (PWM) signals from the RPi, which goes through a set of 30 A Electronic Speed Controllers (ESC). Finally, a 14.8 V, 18A Ah battery supplies energy for the whole electronics. A diagram of the hardware configuration in the BlueROV2 used for the experiments is shown in Figure 5.

Software
The Robot Operating System (ROS) in its Kinetic version was used to program the algorithms to manage the sensors, thruster's speed, and control schemes. Five nodes were used in total (shown in Figure 6). The IMU sensor node (1) manages the BNO-055 sensor and it is able to obtain a new set of φ, θ, and ψ orientations at a 100 Hz rate. The Pressure Sensor node (2) manages the Bar-30 sensor and obtains a new z position at a 10 Hz rate. Both nodes publish the estimated positions so they can be used as inputs to the Control Algorithm node (3). In this node, the different control algorithms were programmed along with a user interface to provide the user the option of selecting between the PID control, 2nd-Order SMC, and the model-free high-order SMC with finite-time convergence. The user can also modify the controller parameters and gains from this interface. In the algorithm, the desired position is generated as defined by the user throughout the user interface-either as a set point or as time-variant-and compared with the actual position estimated by the sensors. Then, the selected control law is applied and a thruster's coefficients vector is computed and published as a result. The Thruster Managment node (4) reads the thruster's coefficients vector and converts it to the proper PWM signal for each thruster to be generated by the RPi peripherals. The Manual Control node (5) is used prior to the experiment to position the BlueROV2 in its initial position.

Time-Parameterized Trajectories
A sinusoidal trajectory was chosen for the vehicle to track both depth (z d ), and yaw (ψ d ). Those trajectories are given by where z i and ψ i are the initial desired position or offset, A z and A ψ are the desired amplitudes, and ω is the frequency for the signal. Then, the desired velocitiesż d andψ d arė

Control Algorithms
Experiments were carried out using three different control laws for the trajectory tracking of the robot. The aim was to compare the performance of the proposed algorithm with other common controllers used for this purpose.

PID Control
The control law used for this controller is where k p , k i , and k d are the proportional, integral, and derivative gain matrices, respectively.
For the experiments on this work, the gain matrices that gave the best results are

Model-Free High-Order SMC (Asymptotic)
The control law used for this controller is with where α > 0, κ > 0, K i , and K d are constant gains, t 0 is the initial time, and sign(S η ) is the sign function of S η . For the experiments on this work, the gain set that gave the best results is α = 10, κ = 5, K i = diag[0, 0, 0.05, 0.005, 0, 0.001], and

Model-Free High-Order SMC (Finite-Time)
The control law used for this controller is the same as the previous section (Equation (35)). To achieve finite-time convergence, the α gain in Equation (36) is substituted by the timevariant gain α(t) defined in Equation (29), with α c = 10 for depth control, α c = 5 for heading control, and, in both cases, α 0 = 1.005 and δ = 0.001. The rest of gain parameters (κ, K i , and K d ) stays as defined in Equation (37).

Exact Differentiator Algorithm
The algorithm proposed for the exact differentiator is given bẏ where λ 1 = 1.5 and λ 2 = 1.1 are constant, f (t) is the signal we want to differentiate, and sign() stands for the sign function. After a brief adjustment time, the following is considered as true j 0 = 0 and j 1 = 0 were considered as initial values for the algorithm.

Results and Discussion
The functions in Equations (31) and (32) were programmed in the BlueROV2 as desired trajectories for depth and heading, respectively, meanwhile the desired roll was set to φ = 0. The initial desired positions were set to z i = 0.50 m and ψ i = 270°, the desired amplitudes were A z = 0.25 m and A ψ = 30°, and the period was set to T = 1 ω = 20 s. Results for different runs with the PID controller implementation are shown in Figure 7. The best result for the PID controller is shown in Figure 8, a significant error can be observed in the depth trajectory control meanwhile the heading trajectory control error is significantly minor, but there is an overshoot in its transitory response. The same experiment was performed applying the model-free 2nd-order SMC with asymptotic convergence. Results for trajectory tracking of z and ψ in different runs of the experiment are shown in Figure 9. The graph in Figure 10 includes the best performance of the asymptotic 2nd-order SMC, there is a faster response compared with the PID controller, and the error once the robot meets the trajectory is smaller. Results for the trajectory tracking by the model-free high-order SMC with finite-time convergence in a predefined time-base of 5 s are shown in Figure 11. Note that, at the beginning of the controlled trajectory, the BlueROV2 approaches slowly to the desired trajectory and then accelerates to reduce the error to practically zero in the selected timebase of 5 s. After the time-base is reached, the controller maintains the robot in the desired trajectory with a minimum Root Mean Square Error (RMSE) (<1 cm and <2.3°) as can be seen in Figure 12. Those errors can be attributed to hardware limitations such as sensor accuracy, resolution, and measurement rates, processor speed, communication baud rates, etc., which limits the control cycle frequency to a maximum of 10 Hz compared with a frequency 100 to 1000 times higher in simulations.  The resulting TBG for this experiment is shown in Figure 13. As described in Equations (27) and (28), there is a smooth transition from zero to one which is completed exactly at the given time-base. The resulting time-varying gain α(t) is shown in Figure 14, as described in Equation (29). Several runs of the same experiment were performed with the model-free high-order SMC with finite-time convergence defining different time-bases. Results of the controlled depth and yaw trajectories are shown in Figure 15. It can be observed that the controller drives the robot to the desired trajectory to match it in the desired time-base for all cases. Velocities estimations are another source of noise and, therefore, errors in the trajectory tracking problem for the SMC. To reduce these errors, the exact differentiator described in Equation (38) was used for the experiments in both the asymptotic and finite-time SMC. The results of theż andψ estimations for a finite-time controlled trajectory are shown in Figure 16. As can be observed, the uncertainty in the estimations was reduced significantly by the use of the exact differentiator. The RMSE was computed as a performance indicator of the different controllers applied. As the error varies during the convergence, the RMSE was calculated after the robot is in the desired trajectory. For the finite-time controller, the robot is considered in the trajectory when t > t b . For the PID and the asymptotic SMC controllers, the robot is considered in trajectory once the controlled trajectory intersects with the desired trajectory. Results for the different control approaches are shown in Figure 17. In the depth trajectory tracking, the mean RMSE-considering all the runs of the experiment-is 4.07 cm for the PID control (PID), 1.68 cm for the asymptotic 2nd-order SMC (SMC), and the best was the high-order SMC with finite-time convergence (SMC-FT) with a value of 1.03 cm. For the yaw trajectory tracking, the mean RMSE was 6.29°for the PID control, 4.58°for the asymptotic 2nd-order SMC, and, again, the best was the high-order SMC with finite-time convergence with a value of 2.72°.

RMSE (m) for z trajectory tracking
Another performance indicator is the energy consumption in the thrusters. A control coefficient of +1.0 represents the maximum thrust in one direction and a control coefficient of −1.0 represents the maximum thrust in the opposite direction, in both cases, the power consumption is 625 W approximately. A higher magnitude of this coefficient means a bigger energy consumption from the corresponding thruster. The control coefficient for the different thrusters as result of the experiments shown in Figures 8, 10 and 11 are shown in Figure 18. The resulting control coefficients for thrusters 1, 2, 3, and 4 were identical in magnitude, the same occurred for thrusters 5 and 6. The Root Mean Square (RMS) values of the control coefficients were computed as performance indicator as follows where N is the number of samples. Considering the six thrusters, the RMS value of the control coefficient was 0.155 for the PID controller, 0.206 for the asymptotic SMC, and 0.101 for the finite-time SMC with t b = 5 s. The finite-time controller was able to drive the vehicle to the desired trajectory with 35 % less energy demanded than the PID controller, even when they reach the desired trajectory at the same time. The asymptotic SMC was faster in its approach to the desired trajectory, resulting in an energy demand twice as bigger as the demanded by the finite-time controller. As can be observed in the different performance indicators, the finite-time SMC proposed outperforms the asymptotic SMC even when, as stated in previous sections, they were programmed with the same parameters and gains-except for α(t)-which is a clear example of the advantages of using a finite-time convergence solution. Performing a tuning on the PID or asymptotic SMC to achieve a faster or slower convergence will also modify the performance of the controller in the trajectory tracking. This does not happen with the finite-time controller, where a simple change in the t b parameter will lead to a faster or slower convergence maintaining its performance and robustness. The user can benefit from this to obtain the best performance of the controller according to the needs demanded by the task.

Conclusions
In this work, a model-free high-order SMC with finite-time convergence in a predefined time was tested and validated through experimentation in a water pool, using the BlueROV2 robot. This robot was modified and instrumented to be able to follow timeparametrized trajectories at depth and orientation. Results showed that the finite-time convergence controller was able to drive the robot to the desired trajectory in a desired predefined time and maintain it there with a small error for all of the experiment runs. The performance of the controller was then compared with a PID controller and an asymptotic 2nd-order SMC in terms of the RMSE. The mean depth error after the total of the experiments was 75% smaller for the finite-time convergence controller compared with the PID control. Additionally, it was 38% smaller compared with the asymptotic 2nd-order SMC which kept the same parameters and gains of the finite-time controller with the exception of the α gain. Regarding the yaw trajectory tracking, the same indicator was 57% and 41% smaller for the finite-time controller when compared to the PID and asymptotic SMC, respectively. Although it was expected that the finite-time controller outruns the PID control performance, the fact that it also outperformed its asymptotic equivalent demonstrates the advantages of a finite-time convergence controller in the AUV navigation problem. Another advantage of the use of this finite-time controller is the smaller energy consumption. The RMS thruster coefficient was 35% smaller when compared with the PID solution with both controllers converging at the same time. It was also half of the RMS coefficient computed for the asymptotic SMC. Future work will expand the experimentation to x and y axes. Additionally, this controller will be implemented and tested for cooperative intervention missions of AUVs, where it is important that the vehicles can reach a desired position or trajectory at a predefined time. This controller will be especially useful considering scenarios where the communication between AUVs is limited or does not exist at all.