Neuro-Sliding Control for Underwater ROV’s Subject to Unknown Disturbances

Proposed in this paper is a model-free and chattering-free second order sliding mode control (2nd-SMC) in combination with a backpropagation neural network (BP-NN) control scheme for underwater vehicles to deal with external disturbances (i.e., ocean currents) and parameter variations caused, for instance, by the continuous interchange of tools. The compound controller, here called the neuro-sliding control (NSC), takes advantage of the 2nd-SMC robustness and fast response to drive the position tracking error to zero. Simultaneously, the BP-NN contributes with its capability to estimate and to compensate online the hydrodynamic variations of the vehicle. When a change in the vehicle’s hydrodynamics occurs, the 2nd-SMC may no longer be able to compensate for the variations since its feedback gains are tuned for a different condition; thus, in order to preserve the desired performance, it is necessary to re-tune the feedback gains, which a cumbersome and time consuming task. To solve this, a viable choice is to implement a BP-NN control scheme along with the 2nd-SMC that adds or removes energy from the system according to the current condition it is in, in order to keep, or even improve, its performance. The effectiveness of the proposed compound controller was supported by experiments carried out on a mini-ROV.


Introduction
Underwater robots are nonlinear systems that operate in complex marine environments. They are subject to ocean currents that affect their performance by following a required trajectory or keeping a desired position while carrying out specific tasks. Moreover, their performance is also affected by the addition or removal of tools like robot arms and/or measurement instruments, among others, during the execution of a task because their weight and hydrodynamic parameters change accordingly. These changes are considered as external perturbations that need to be compensated for in order to achieve a desired performance [1,2].
Much research has been conducted in the area of underwater robots to tackle the problem described above. In reference [1], Zhang and Zhu proposed a model-based adaptive first order sliding mode control based on local recurrent neural networks. The approach transforms the trajectory tracking error system into an affine nonlinear system and uses a local recurrent neural network to approximate unknown items online for the adaptive trajectory tracking control. To reduce the chattering amplitude, the same, but gradually. The feasibility and effectiveness of the proposed approach were demonstrated with experiments carried out on a mini-ROV.
The rest of this paper is organized as follows. Section 2 presents and describes the standard mathematical models for underwater robots. Section 3 is devoted to describing in detail the structure and properties of the proposed neuro-sliding control, called the NSC scheme. Section 4 explains the electromechanical architecture of the mini-ROV used for the experiments in detail. Two sets of exhaustive experiments were developed; and the results were analyzed and discussed taking into account two criterions to evaluate the performance. Finally, Section 5 presents our concluding remarks on the NSC scheme.

Mathematical Model
The kinematic and dynamic models of an underwater vehicle [15] can be expressed in terms of an Earth-fixed frame xyz and a body-frame x b y b z b attached to the vehicle's center of gravity (CG), as shown in Figure 1. The rest of this paper is organized as follows. Section 2 presents and describes the standard mathematical models for underwater robots. Section 3 is devoted to describing in detail the structure and properties of the proposed neuro-sliding control, called the NSC scheme. Section 4 explains the electromechanical architecture of the mini-ROV used for the experiments in detail. Two sets of exhaustive experiments were developed; and the results were analyzed and discussed taking into account two criterions to evaluate the performance. Finally, Section 5 presents our concluding remarks on the NSC scheme.

Mathematical Model
The kinematic and dynamic models of an underwater vehicle [15] can be expressed in terms of an Earth-fixed frame and a body-frame attached to the vehicle's center of gravity (CG), as shown in Figure 1. The kinematic equation of motion is given by: where the pose vector = ∈ ℝ contains the global position = and the Euler angles = expressed in the Earth-fixed frame; the velocity vector = ∈ ℝ is composed of the linear velocity vector = and the angular velocity vector = , both according to the body-fixed frame; and the matrix ( ) is the matrix that relates the body-fixed vehicle's velocities to the Earth-fixed frame pose rates.
The hydrodynamic model is given by formed by the vectors ∈ ℝ and ∈ ℝ previously defined above. Matrices ∈ ℝ × , ∈ ℝ × , and ∈ ℝ × denote the matrix of inertia (including added mass), the matrix of Coriolis and centripetal terms (including added mass), and the damping matrix, respectively. Vectors ∈ ℝ and ∈ ℝ represent the restoring force and moment vector produced by gravity and buoyancy and the vector with the control inputs, respectively.
To eliminate ν and ν from Equation (2), the hydrodynamic model Equation (2) can be rewritten in the Earth-fixed frame by applying the next kinematic transformations (assuming that ( ) is non-singular) [15,16]: After some calculations, the Earth-fixed expression is given below [15 ]  The kinematic equation of motion is given by: where the pose vector η = x y z φ θ ψ T ∈ R 6 contains the global position η 1 = x y z T and the Euler angles η 2 = φ θ ψ T expressed in the Earth-fixed frame; the velocity vector ν = u v w p q r T ∈ R 6 is composed of the linear velocity vector ν 1 = u v w T and the angular velocity vector ν 2 = p q r T , both according to the body-fixed frame; and the matrix J(η) is the matrix that relates the body-fixed vehicle's velocities to the Earth-fixed frame pose rates.
The hydrodynamic model is given by formed by the vectors ν ∈ R n and η ∈ R n previously defined above. Matrices M ∈ R n×n , C ∈ R n×n , and D ∈ R n×n denote the matrix of inertia (including added mass), the matrix of Coriolis and centripetal terms (including added mass), and the damping matrix, respectively. Vectors g ∈ R n and τ ∈ R n represent the restoring force and moment vector produced by gravity and buoyancy and the vector with the control inputs, respectively. ν from Equation (2), the hydrodynamic model Equation (2) can be rewritten in the Earth-fixed frame by applying the next kinematic transformations (assuming that J(η) is non-singular) [15,16]: ..

Control Design
As briefly mentioned earlier, the proposed control scheme is composed of two control laws: a second order sliding mode control (2nd-SMC) and a self-tuning backpropagation neural network control (BP-NN). The compound control uses the advantages of both controllers, the fastness of the 2nd-SMC to drive the vehicle to the desired position, and the BP-NN's ability to counteract disturbances online to minimize the position tracking error within a tolerable time interval of about 10 to 20 s. A block diagram of the compound control scheme is shown in Figure 2. with

Control Design
As briefly mentioned earlier, the proposed control scheme is composed of two control laws: a second order sliding mode control (2nd-SMC) and a self-tuning backpropagation neural network control (BP-NN). The compound control uses the advantages of both controllers, the fastness of the 2nd-SMC to drive the vehicle to the desired position, and the BP-NN's ability to counteract disturbances online to minimize the position tracking error within a tolerable time interval of about 10 to 20 s. A block diagram of the compound control scheme is shown in Figure 2. . This means that the compound control signal is the sum of the control signal calculated separately. The control design for each control law is given below.

Second Order Sliding Mode Control (2nd-SMC)
According to Equation (5) and Figure 2, it is possible to parameterize linearly as the product of the regressor ( , , ) ∈ ℝ × and the vector ∈ ℝ . Consequently, the parametrization ( , , ) can be written in terms of a nominal reference , and its time derivative as follows: ( ) + ( , ) + ( , ) + ( ) = ( , , , ) Subtracting Equation (7) from both sides of Equation (5) yields the open-loop error dynamics equation: where is substituted for and = − represents the extended error. The problem of According to Equation (5) and Figure 2, τ η = τ SMC + τ NN . This means that the compound control signal τ η is the sum of the control signal calculated separately. The control design for each control law is given below.

Second Order Sliding Mode Control (2nd-SMC)
According to Equation (5) and Figure 2, it is possible to parameterize linearly as the product of the regressor Y η, where τ η is substituted for τ SMC and s r = .
η − . η r represents the extended error. The problem of control design for the open-loop error dynamics system (Equation (8)) is to find τ SMC so that it converges exponentially when Y r η, where η = η − η d denotes the position tracking error and η d denotes the desired trajectory; α,K i ∈ R n×n are gain matrices; sign(x) stands for the entry wise signum function of vector x; and with κ > 0. Considering Equation (9), the extended error s r can be rewritten as follows

Sliding Mode Control
Take into account the next control law [12]: where K d ∈ R n×n is a gain matrix. The control does neither require any knowledge of the dynamics nor any parameters of the system. Major information about the controller can be found in [12].

Self-Tuning Backpropagation Neural Network Control
In this work, the self-tuning backpropagation neural network control, shown in Figure 2 was implemented. The neural network controller was used to regulate the process, the net parameters were adjusted to improve the system performance, and no previous training was required. An additional reference for the controller can be found in [16].
A recurrent neural network composed of three perceptron-layers was selected. As shown in Figure 3, the present error as well as two past position tracking errors ( η k , η k−1 , η k−2 ), respectively, were used by the input layer (X 1 , X 2 , X 3 ). Additionally, a bias unit, B, was incorporated into the input X 4 , which stores the value of 1. The use of a bias unit in the neural network increases the capability of the network to adjust to the system.
In this case, the net output error was used to present the position tracking error, η k , as the difference between the process output, η k , and the reference value, η dk , instead of as a comparison between the desired and present net output: the network to adjust to the system. In this case, the net output error was used to present the position tracking error, , as the difference between the process output, , and the reference value, , instead of as a comparison between the desired and present net output:  Each of the hidden layer neurons computes the weighted sum S j based on the inputs X i with its weight coefficient W ji : In the hidden layer, for each neuron, the output H j is calculated by the sigmoid function applied to the weighted sum S j : Similarly, for the output layer neuron, the weighted sum R over the outputs H j and its weight coefficients V j were calculated: For the output layer neuron, the net output τ NN was calculated by the sigmoid function applied to the weighted sum R, and scaled by a positive gain factor G NN : After the net output is applied to the process, a wait time is necessary for the process to respond to the control command τ NN . Then, the process' error is computed considering the process' output, and the weight coefficients of the neural network are adjusted. The backpropagation (BP) algorithm was applied in order to adjust the weight coefficients of the neural network, as explained below.
Backpropagation minimizes the quadratic function: The direction of the descending gradient is used to adjust the weight coefficients, so the gradient is only defined if E(t) is continuous and differentiable, thereby, the sigmoid function was used as the activation function Solving for the first term with the compound control signal error e τ η gives: where Solving for the second term gives: The term ∂ η ∂e τη cannot be directly calculated, so it is replaced by: Instead of determining the abs ∂ η ∂e τη term, it is incorporated as part of the learning coefficient "λ", and the equations for adjusting the weight coefficients are: Finally, the sign ∂ η ∂e τη term is determined by experimental observations by introducing changes to the set-point of the controller for the closed-loop system performance.

Experimental Results
In this section, we present the experimental results of the proposed neuro-sliding controller (NSC) as well as those of the 2nd-SMC and the BP-NN controllers. The experimental setup is explained below.

Mini-ROV Architecture
Experiments were carried out in a salty water tank with a small-sized underwater ROV. A block diagram of the mini-ROV is shown in Figure 4. Instead of determining the term, it is incorporated as part of the learning coefficient " ", and the equations for adjusting the weight coefficients are: Finally, the term is determined by experimental observations by introducing changes to the set-point of the controller for the closed-loop system performance.

Experimental Results
In this section, we present the experimental results of the proposed neuro-sliding controller (NSC) as well as those of the 2nd-SMC and the BP-NN controllers. The experimental setup is explained below.

Mini-ROV Architecture
Experiments were carried out in a salty water tank with a small-sized underwater ROV. A block diagram of the mini-ROV is shown in Figure 4.  The mini ROV's body was principally made up of an aluminum 25 × 15 cm cylindrical pressure chamber wherein the electronic cards and the camera are placed. On both sides of the pressure chamber flanges with O' ring slots mated in the bow with a polycarbonate transparent dome and in the stern with an aluminum cap with penetrators on it. The purpose of the penetrators is to allow the tether and the thruster wires to enter through the hull without water leaks. Beneath the pressure chamber, a frame with a pair of skis is screwed. This frame makes the vehicle's center of gravity to below the center of buoyancy, thus, making the ROV intrinsically stable in both the pitch and roll angles. Figure 5 depicts some views of the mini ROV used for the experiments. Four thrusters were attached to the vehicle, one horizontal and one vertical, on each side of the pressure chamber (port and starboard), as shown in Figure 6. Their main purpose is to allow the submarine to be actuated on its and axis.

Electronic Architecture
The electronic architecture of the small sized ROV can be explained in two principal parts: the data acquisition system and the ROV-pilot interface.
The ROV's cylindrical hull contained the data acquisition system where the central part was an AM3 × 8E ARM Cortex microcontroller embedded into an Arduino DUE board running at 84 MHz. Different kinds of sensors were connected to it that measured the actual status of the vehicle: A MS5837-30BA pressure sensor placed outside the hull with a penetrator that measured the hydrostatic pressure. As explained in [13], each milibar measured below the surface of water is equivalent to a centimeter of depth according to the formula that shows ℎ as depth in meters m , ℎ = where is the hydrostatic pressure Pa ; is the atmospheric pressure Pa ; is the water density kg m ⁄ ; and is theacceleration of gravity m s ⁄ . This pressure sensor presents an Four thrusters were attached to the vehicle, one horizontal and one vertical, on each side of the pressure chamber (port and starboard), as shown in Figure 6. Their main purpose is to allow the submarine to be actuated on its x and z axis. Four thrusters were attached to the vehicle, one horizontal and one vertical, on each side of the pressure chamber (port and starboard), as shown in Figure 6. Their main purpose is to allow the submarine to be actuated on its and axis.

Electronic Architecture
The electronic architecture of the small sized ROV can be explained in two principal parts: the data acquisition system and the ROV-pilot interface.
The ROV's cylindrical hull contained the data acquisition system where the central part was an AM3 × 8E ARM Cortex microcontroller embedded into an Arduino DUE board running at 84 MHz. Different kinds of sensors were connected to it that measured the actual status of the vehicle: A MS5837-30BA pressure sensor placed outside the hull with a penetrator that measured the hydrostatic pressure. As explained in [13], each milibar measured below the surface of water is equivalent to a centimeter of depth according to the formula that shows ℎ as depth in meters m , ℎ = where is the hydrostatic pressure Pa ; is the atmospheric pressure Pa ; is the water density kg m ⁄ ; and is theacceleration of gravity m s ⁄ . This pressure sensor presents an accuracy of 50 mbar in the operating pressure range of 0-6 bar, a sampling rate of 50 kHz, and is

Electronic Architecture
The electronic architecture of the small sized ROV can be explained in two principal parts: the data acquisition system and the ROV-pilot interface.
The ROV's cylindrical hull contained the data acquisition system where the central part was an AM3 × 8E ARM Cortex microcontroller embedded into an Arduino DUE board running at 84 MHz. Different kinds of sensors were connected to it that measured the actual status of the vehicle: A MS5837-30BA pressure sensor placed outside the hull with a penetrator that measured the hydrostatic Sensors 2019, 19, 2943 9 of 17 pressure. As explained in [13], each milibar measured below the surface of water is equivalent to a centimeter of depth according to the formula that shows h as depth in meters [m], h = P−P o pg where P is the hydrostatic pressure [Pa]; P o is the atmospheric pressure [Pa]; ρ is the water density [kg/m 3 ]; and g is theacceleration of gravity m/s 2 . This pressure sensor presents an accuracy of ±50 mbar in the operating pressure range of 0-6 bar, a sampling rate of 50 kHz, and is read by the I2C serial protocol.
Other sensors were connected to the microcontroller: a serial UART, PNI's TCM-MB IMU (inertial measurement unit) that makes it possible to know the position of the ROV in the body-frame reference, two leak sensors to know if the electronics are in risk of damage because of water intrusion inside the hull, four hall-effect current sensors to read the status of each thruster during operation, a voltage sensor for brownout protection, an IP camera to stream live video to ground, and the thruster DC motor drivers (Pololu VNH5019).
The ROV pilot interface was a two screened PC with a LabView virtual instrument that displayed all of the sensors' magnitudes received from the microcontroller. A joystick that worked as the manual controller of the vehicle was connected to the computer. One of the two screens connected to the PC displayed the video captured by the camera by a WiFi connection. The PC ran on a Windows operating system and was fitted with a Core i5 microprocessor (6300U@2.4 GHz) and 8 GB DDR3 RAM. The PC processed the input data coming from the ARM Cortex microcontroller and computed the summed control signal, which was in turn sent to the thruster drivers through the tether.
The communication between the submarine and the ROV pilot interface was through a pair of Xbee radio transmitter-receivers, one of which was on the dry end of the tether and another was connected to the PC that sent back and forward sentences with all the gathered data by the microcontroller. A WiFi modem was also connected to the tether in order to transmit live video to the PC.

Experiment Design
In this section, the description of the experiment for the three implemented controllers is given below. The complete experiment lasted 30 min in total (1800 s) and was divided into five tests, each test lasted six minutes and was composed of three stages: Stage 1-No perturbation, Stage 2-Perturbation, and Stage 3-No perturbation. The perturbation consists in manually adding and removing a weight of 1 kg (10% of the vehicle's total weight) to and from the vehicle to evaluate the performance of the proposed controller. Each stage lasted two minutes (120 s); thus, a complete test lasted six minutes (360 s). In Stage 1, the vehicle was required to reach (follow) the set-point (trajectory) for a period of 120 s. In Stage 2, the weight was suddenly added to the vehicle for about 120 more s. In Stage 3, the weight was rapidly removed from the vehicle, which remained working for the next 120 s. In order to compare the performance of the controllers, the sequence was repeated five times to complete 1800 s in total. Remark 1. The weight was chosen as long as it did not saturate the thrusters. The weight was gradually increased to the point where the thrusters were able to perform the task properly. It was found that a weight greater than 1 kg exceeded the thruster's physical limits.
Two sets of experiments were performed to control the vehicle's depth. Only the depth was controlled, the remainder of the degrees of freedom was left uncontrolled. Thus, from Figure 2, η = z, η d = z d and η = z − z d . Next, the experimental results are given.

Results
For comparison purposes, next, we present the experimental results of the three controllers addressed in this paper. The second order sliding mode control (2nd-SMC) was implemented with the feedback gains shown below in Table 1. The backpropagation neural network control (BP-NN) was implemented with the learning coefficient set to 0.1. The neuro-sliding control (NSC) considered the feedback gains listed in Table 1 and a learning coefficient equal to 0.1.
To evaluate the performance of the proposed controllers, two criteria were used: (i) The square mean error (SME) that measures the position tracking error on average, and (ii) the effective voltage (RMS voltage) applied to the thrusters as a way to deduce how much energy is being consumed. Table 2 shows the SME and the RMS values of the three controllers. Note that in the case of the NSC scheme, the total control signal was composed of two parts, a part given by the 2nd-SMC scheme and the other given by the BP-NN control. The sum of both signals gives the total voltage (100%) that can be supplied by the drivers to the thrusters (see Figure 2 for the major reference).  (Test #1). Similarly, the plots located on the right side depict the last six minutes of the experiment (Test #5). According to Table 2 and Figures 8 and 9, the 2nd-SMC scheme exhibited a better performance than the BP-NN scheme in terms of the SME value. Since the beginning of the experiment (Test #1) the 2nd-SMC showed a tight control of the depth variable and only at the moments when the load was added to and removed from the vehicle, the depth variable deviated for some seconds from the set-point. In both situations, the control law rapidly drove the position error to zero. This behavior remained constant throughout the experiment (until Test #5). Instead, the BP-NN presented a large overshoot in the first test when the load was added to and removed from the vehicle; however, as time went by, the neural network learnt the dynamics and compensated for the disturbance. The overshoots became smaller over time, and likewise, the SME value. With respect to the RMS voltage Next, the experimental results are given.

Results
For comparison purposes, next, we present the experimental results of the three controllers addressed in this paper. The second order sliding mode control (2nd-SMC) was implemented with the feedback gains shown below in Table 1.

Gain
Value Gain Value The backpropagation neural network control (BP-NN) was implemented with the learning coefficient set to 0.1. The neuro-sliding control (NSC) considered the feedback gains listed in Table 1 and a learning coefficient equal to 0.1.
To evaluate the performance of the proposed controllers, two criteria were used: (i) The square mean error (SME) that measures the position tracking error on average, and (ii) the effective voltage (RMS voltage) applied to the thrusters as a way to deduce how much energy is being consumed. Table 2 shows the SME and the RMS values of the three controllers. Note that in the case of the NSC scheme, the total control signal was composed of two parts, a part given by the 2nd-SMC scheme and the other given by the BP-NN control. The sum of both signals gives the total voltage (100%) that can be supplied by the drivers to the thrusters (see Figure 2 for the major reference).   (Test #1). Similarly, the plots located on the right side depict the last six minutes of the experiment (Test #5).  Throughout the experiment, the 2nd-SMC scheme presented a greater RMS value than the BP-NN control. However, it was noted that as long as the BP-NN's SME decreased, its RMS voltage increased. In addition, it was observed that the 2nd-SMC scheme was capable of keeping the position error within certain limits throughout the experiment, but was not able to gradually reduce it as the BP-NN scheme did.

Position Regulation
Next, Figures 10-12 depict the NSC performance considering three cases: (1) 2nd-SMC 20%/BP-NN 80%; (2) 2nd-SMC 50%/BP-NN 50%; and (3) 2nd-SMC 80%/BP-NN 20%. According to Figure 2, each control signal was multiplied by its respective scaling factor and to generate the BP-NN control signal ( ) and 2nd-SMC signal ( ), respectively. The scaled control signals were summed to generate the 100% control voltage that the driver could supply to the thrusters. Figure 10 depicts the experimental results of the NSC scheme (2nd-SMC 20%/BP-NN 80%). Since the control voltage is mainly composed of the BP-NN part, the SME value was very similar to that of the pure BP-NN as shown in Figure 9 for Test #1. However, after some time, in Test #5, the SME represented 63.3% of the pure BP-NN's SME value, which means that the neural network is working properly.  Figure 9. Performance of the BP-NN control. As time went by the neural network updated its weights online in order to drive the position error to zero. In the same fashion, the energy required to achieve a smaller SME increased. Figure 11 depicts the experimental results of the NSC scheme (2nd-SMC 50%/BP-NN 50%). In this case, the vehicle exhibited a smaller overshoot when compared to that of the previous case, mainly because of the 2nd-SMC action. The SME gradually decreased, thanks to the BP-NN action. Note that inTest #5, the SME value represented 64.3% of the SME value reported in Test #1; which means that the BP-NN acts as a fine control that correctly adjusts its weight coefficients to overcome Figure 9. Performance of the BP-NN control. As time went by the neural network updated its weights online in order to drive the position error to zero. In the same fashion, the energy required to achieve a smaller SME increased. Sensors 2019, 19, x FOR PEER REVIEW 13 of 17 Figure 10. Performance of the NSC scheme (2nd-SMC 20%/BP-NN 80%). The BP-NN scheme appeared as the predominant control with a contribution of 80%. As the neural network adjusted its weights online, the SME decreased in time. The RMS voltage remained practically unchanged. Figure 11. Performance of the NSC scheme (2nd-SMC 50%/BP-NN 50%). The overshoot showed a reduction and the BP-NN gradually reduced the SME value. Figure 10. Performance of the NSC scheme (2nd-SMC 20%/BP-NN 80%). The BP-NN scheme appeared as the predominant control with a contribution of 80%. As the neural network adjusted its weights online, the SME decreased in time. The RMS voltage remained practically unchanged.
Sensors 2019, 19, x FOR PEER REVIEW 13 of 17 Figure 10. Performance of the NSC scheme (2nd-SMC 20%/BP-NN 80%). The BP-NN scheme appeared as the predominant control with a contribution of 80%. As the neural network adjusted its weights online, the SME decreased in time. The RMS voltage remained practically unchanged. Figure 11. Performance of the NSC scheme (2nd-SMC 50%/BP-NN 50%). The overshoot showed a reduction and the BP-NN gradually reduced the SME value. Figure 11. Performance of the NSC scheme (2nd-SMC 50%/BP-NN 50%). The overshoot showed a reduction and the BP-NN gradually reduced the SME value. Figure 12. Performance of the NSC scheme (2nd-SMC 80%/BP-NN 20%). The 2nd-SMC scheme was the predominant control with a contribution of 80%. The SME exhibited a reduced value since the beginning; however, due to the low contribution of the BP-NN control, the SME value did not reflect a significant reduction by the end of the experiment. The RMS voltage remained practically unchanged throughout the experiment.
Next, the experimental results of the NSC scheme following a trajectory are given.  Table 3 shows the SME and the RMS values of the three controllers. Figures 13-15 depict only the experimental results of the NSC scheme (for the sake of space, figures related to the 2nd-SMC and BP-NN schemes are omitted). In this subsection, the experimental results of the NSC scheme are given. The mini-ROV was required to follow a sinusoidal trajectory under the three NSC combinations described above. Figures 13-15 depicts the performance of the NSC scheme under the three combinations. Two general aspects to highlight are: (1) The overshoot was large at the beginning and decreased over time by virtue of the BP-NN control action, and (2) As long as the SME decreased, the RMS value increased. Figure 12. Performance of the NSC scheme (2nd-SMC 80%/BP-NN 20%). The 2nd-SMC scheme was the predominant control with a contribution of 80%. The SME exhibited a reduced value since the beginning; however, due to the low contribution of the BP-NN control, the SME value did not reflect a significant reduction by the end of the experiment. The RMS voltage remained practically unchanged throughout the experiment.
According to Table 2 and Figures 8 and 9, the 2nd-SMC scheme exhibited a better performance than the BP-NN scheme in terms of the SME value. Since the beginning of the experiment (Test #1) the 2nd-SMC showed a tight control of the depth variable and only at the moments when the load was added to and removed from the vehicle, the depth variable deviated for some seconds from the set-point. In both situations, the control law rapidly drove the position error to zero. This behavior remained constant throughout the experiment (until Test #5). Instead, the BP-NN presented a large overshoot in the first test when the load was added to and removed from the vehicle; however, as time went by, the neural network learnt the dynamics and compensated for the disturbance. The overshoots became smaller over time, and likewise, the SME value. With respect to the RMS voltage applied to the thrusters, the 2nd-SMC exhibited a more active control signal than the BP-NN scheme due to its high gain nature.
Throughout the experiment, the 2nd-SMC scheme presented a greater RMS value than the BP-NN control. However, it was noted that as long as the BP-NN's SME decreased, its RMS voltage increased. In addition, it was observed that the 2nd-SMC scheme was capable of keeping the position error within certain limits throughout the experiment, but was not able to gradually reduce it as the BP-NN scheme did.
Next, Figures 10-12 depict the NSC performance considering three cases: (1) 2nd-SMC 20%/BP-NN 80%; (2) 2nd-SMC 50%/BP-NN 50%; and (3) 2nd-SMC 80%/BP-NN 20%. According to Figure 2, each control signal was multiplied by its respective scaling factor G NN and G SMC to generate the BP-NN control signal (τ NN ) and 2nd-SMC signal (τ SMC ), respectively. The scaled control signals were summed to generate the 100% control voltage that the driver could supply to the thrusters. Figure 10 depicts the experimental results of the NSC scheme (2nd-SMC 20%/BP-NN 80%). Since the control voltage is mainly composed of the BP-NN part, the SME value was very similar to that of the pure BP-NN as shown in Figure 9 for Test #1. However, after some time, in Test #5, the SME represented 63.3% of the pure BP-NN's SME value, which means that the neural network is working properly. Figure 11 depicts the experimental results of the NSC scheme (2nd-SMC 50%/BP-NN 50%). In this case, the vehicle exhibited a smaller overshoot when compared to that of the previous case, mainly because of the 2nd-SMC action. The SME gradually decreased, thanks to the BP-NN action. Note that inTest #5, the SME value represented 64.3% of the SME value reported in Test #1; which means that the BP-NN acts as a fine control that correctly adjusts its weight coefficients to overcome the perturbation's effects. Figure 12 depicts the experimental results of the NSC scheme (2nd-SMC 80%/BP-NN 20%). In this case, the 2nd-SMC had a major contribution to the total control voltage. Compared to the previous cases, the SME values presented a significant reduction. Nevertheless, due to the low contribution of the BP-NN control, the SME value in Test #5 showed no significant reduction with respect to that of Test #1; instead, the RMS value experienced an increase in its value due to the 2nd-SMC action.
Next, the experimental results of the NSC scheme following a trajectory are given. Table 3 shows the SME and the RMS values of the three controllers. Figures 13-15 depict only the experimental results of the NSC scheme (for the sake of space, figures related to the 2nd-SMC and BP-NN schemes are omitted).

Conclusions
According to the experimental results, it was observed that the 2nd-SMC scheme drove the position error to zero in a robust manner while keeping a small overshoot with respect to the BP-NN response. The BP-NN control had the ability to estimate the vehicle's hydrodynamic variations and to compensate for perturbations by adjusting its weights online in order to gradually drive the position error to zero. However, the weight adjustment was relatively slow because it took several iterations before the weight values converged to a steady state, which can be a disadvantage if the perturbation changes rapidly over time. If the perturbation changes faster than the weight adjustment, the BP-NN control may not be able to compensate for it completely. Thus, a smooth but robust controller like a 2nd-SMC is required. Hence, the combination of both controllers results in a more robust and versatile controller. According to the SME and the RMS values, it can be noted that the best performance was accomplished when the NSC scheme was mainly composed of either the In this subsection, the experimental results of the NSC scheme are given. The mini-ROV was required to follow a sinusoidal trajectory under the three NSC combinations described above. Figures 13-15 depicts the performance of the NSC scheme under the three combinations. Two general aspects to highlight are: (1) The overshoot was large at the beginning and decreased over time by virtue of the BP-NN control action, and (2) As long as the SME decreased, the RMS value increased.

Conclusions
According to the experimental results, it was observed that the 2nd-SMC scheme drove the position error to zero in a robust manner while keeping a small overshoot with respect to the BP-NN response. The BP-NN control had the ability to estimate the vehicle's hydrodynamic variations and to compensate for perturbations by adjusting its weights online in order to gradually drive the position error to zero. However, the weight adjustment was relatively slow because it took several iterations before the weight values converged to a steady state, which can be a disadvantage if the perturbation changes rapidly over time. If the perturbation changes faster than the weight adjustment, the BP-NN control may not be able to compensate for it completely. Thus, a smooth but robust controller like a 2nd-SMC is required. Hence, the combination of both controllers results in a more robust and versatile controller. According to the SME and the RMS values, it can be noted that the best performance was accomplished when the NSC scheme was mainly composed of either the 2nd-SMC or the BP-NN action. The 50/50 percent case exhibited good performance; however, we observed that in the whole cases, the SME value in Test #5 was greater than in the other cases. In light of the latter, we suggest choosing cases where one of the controllers has a major contribution, that is, G SMC > G NN or G NN > G SMC , depending on the task, the desired performance, and the operating conditions. Future work is to find a method to determine (offline or online) the set of scaling factors G SMC , G NN that achieve the best performance of the system. Experiments considering controlled currents and the heading control remain an opportunity for future research. Funding: The authors would like to acknowledge the financial support of Tecnologico de Monterrey, in the production of this work.