Vertical Motion Control of an Underwater Glider with a Command Filtered Adaptive Algorithm

Underwater gliders are widely used in oceanic observation, which are driven by a hydraulic buoyancy regulating system and a movable mass. Better motion performance can help us to accomplish observation tasks better. Therefore, a command filtered adaptive algorithm with a detailed system dynamic model is proposed for underwater gliders in this paper. The dynamic model considers seawater density variation, temperature variation and hull deformation according to dive depth. The hydraulic pump model and the movable mass dynamic are also taken into account. An adaptive nonlinear control strategy based on backstepping technique is developed to compensate the uncertainties and disturbances in the control system. To deal with the command saturation and calculation of derivatives in the backstepping process, command filtered method is employed. The stability of the whole system is proved through the Lyapunov theory. Comparative simulations are conducted to verify the effectiveness of the proposed controller. The results demonstrate that the proposed algorithm can improve the motion control performance for underwater gliders under uncertainties and disturbances.


Introduction
Underwater gliders are widely used in oceanic exploration, because of their longrange, low-energy consumption, and low-cost characteristics [1,2]. Underwater gliders are generally driven by a hydraulic buoyancy regulating system and a movable mass. The hydraulic buoyancy regulating system consists of a hydraulic pump, an inner bladder, an external bladder, and several hydraulic valves. Underwater gliders control the hydraulic oil volume in the external bladder to adjust the buoyancy. Meanwhile, underwater gliders regulate the posture through changing the linear position and rotation angle of the movable mass.
Accurate motion tracking control of underwater gliders is required to complete different oceanic survey tasks. Precise attitude and velocity of underwater gliders could help collect detailed data of desired profiles, such as thermocline [3,4]. In addition, virtual mooring is an effective way to extend the duration of underwater gliders [5,6], which makes long-term oceanic phenomenon monitoring possible.
As an accurate mathematical model makes high performance control much easier, it is necessary to take all important influences into consideration. Underwater gliders, especially deep-sea underwater gliders, suffer from pressure variation, seawater density variation, temperature variation and hull deformation. Wang et al. [7] obtained the net buoyancy of autonomous underwater gliders through combing finite element method and density change with the water depth. A nonlinear dynamic model considering seawater pressure, temperature, and density, and the deformation of the pressure hull of the underwater glider was proposed by Gao et al. [8]. Yang et al. [9] established a dynamic model for deep-sea hybrid-driven underwater gliders considering hull deformation and seawater density variation, and proposed a buoyancy compensation scheme. Wang et al. [10] presented a dual-buoyancy-driven mechanism for a full ocean depth glider, and derived a dynamic model considering the influences of environment. Zhou et al. [11] developed a mathematical model of deep-sea gliders with hybrid buoyancy regulating system, which took hull deformation and seawater density variation into consideration. Researchers have considered the essential factors that influence underwater gliders. However, established models are only used to derive the gliding states, which have not been applied in the motion control process. Therefore, it is important to design controllers for underwater gliders with the help of the established accurate models. In addition, to make a more reliable model, the dynamic of actuators, i.e., the hydraulic pump model and the movable mass dynamic, should be considered.
To improve the motion control performance of underwater gliders, many researchers have done lots of work. Leonard and Graver [12] derived a nonlinear dynamic model of a nominal glider, and designed a model-based LQR (linear quadratic regulator) to control the vertical motion. Abraham and Yi [13] presented a model predictive control (MPC) design for buoyancy propelled autonomous underwater glider to compensate disturbances, which was confirmed by comparison to the PID controller. Song et al. [14] developed a dynamic surface decoupling control (DSDC) algorithm based on the active disturbance rejection control (ADRC) for an underwater glider, which reduced overshoot and settling time. Zhou et al. [15] proposed designated area persistent monitoring strategies for hybrid underwater profilers, which was verified by simulations and sea trials. Adaptive robust sliding mode control of an underwater glider with input constraints for virtual mooring was proposed by Zhou et al. [16], which incorporated model uncertainties, environmental disturbances and limited dynamic range of actuators. Jeong et al. [17] applied the machine learning algorithm to the navigation of the underwater glider. Wang et al. [18] designed a vertical profile diving and floating motion controller for underwater gliders based on fuzzy adaptive LADRC algorithm, which allowed the glider to dive to a predetermined depth precisely or float at a specific depth.
However, it is still a great challenge to obtain high motion tracking performance of underwater gliders, due to the strong parametric uncertainties, model uncertainties and disturbances. Model compensation [19] based control is one of the most feasible approaches, which requires an accurate model to capture the system's nonlinearities and uncertainties. Adaptive control [19][20][21][22][23][24][25][26] can improve control systems' dynamic performance and static precision through online approximation and compensation. Sliding mode control [27][28][29] can compensate the model uncertainties and disturbances. In general, underwater gliders are driven by a hydraulic buoyancy regulating system and a movable mass. The motion dynamic of underwater gliders is low, which may cause command saturation in the backstepping process of controller design. Meanwhile, the calculation of derivatives must be taken into consideration, because of the existing model uncertainties and disturbances. Command filter [30,31] is an effective technique to deal with command saturation and calculation of derivatives in the backstepping process.
To achieve better motion control performance and maneuverability of underwater gliders, a detailed system dynamic model is developed for controller design and simulation. The model considers not only the environment influence, e.g., seawater density variation, temperature variation and hull deformation according to dive depth, but also the dynamic model of system actuators, i.e., the hydraulic pump model and the movable mass dynamic, which could provide a more accurate simulation model, and help obtain high control performance through model compensation. Command filtered method is synthesized with backstepping technique to handle the low dynamic of underwater gliders. Adaptive control is employed to compensate the uncertainties and disturbances in the system. This paper is organized as follow. Firstly, a detailed nonlinear mathematical model of the underwater glider is derived. Secondly, a nonlinear adaptive controller based on command filtered algorithm and backstepping method is designed. Next, the stability of the overall control system is proved through Lyapunov theory. Finally, comparative simulations are conducted to verify the effectiveness of the proposed controller. In addition, the nomenclature of this paper is provided in the Nomenclature.

Problem Formulation
There are two main operation patterns of underwater gliders, i.e., zigzag motion and spiraling motion. Zigzag motion is in the vertical plane. Virtual mooring could be simplified into a first stage three-dimensional movement and a second stage vertical movement, to improve the reliability in the practice use. So, this paper focuses on the vertical motion control of underwater gliders. The velocity and its direction are of significant importance for high performance ocean exploration.
Inertial-referenced frame (IRF) E 0 -ik and body-referenced frame (BRF) e 0 -e 1 e 3 are always used to describe the motion of underwater vehicles. As shown in Figure 1, in IRF, the k-axis is oriented in the same direction as gravity; in BRF, the e 1 -axis coincides with the longitudinal axis of the underwater glider, the e 3 -axis is orthogonal to e 1 -axis and pointing to the bottom. Motion equation of underwater gliders in the vertical plane could be obtained,ẋ where x, z are the position of the underwater glider in the vertical plane according to IRF, of which x denotes the horizontal movement distance and z denotes the dive depth. θ is the pitch angle, u and w are the velocity in BRF, q is the pitch angular velocity. The velocity and pitch angle of underwater gliders in vertical plane are shown in Figure 1. According to previous works [16], a decoupled motion dynamics of underwater gliders in the vertical plane can be developed, where M f 1 and M f 3 are the added mass, I f 2 is the added moment of inertial, K M , K M 0 , K q , K D 0 , K L and K L 0 are hydrodynamic coefficients of underwater gliders, m b is the change value of the oil mass in the external bladder, m p is the value of the movable mass, r b is the distance between the external bladder and the center of gravity (CG), r p is the distance between the movable mass and CG, R p is the rotational radius of the movable mass, ∆B e is the buoyancy change value with respect to the hydraulic buoyancy regulating system, ∆B b is the total change value of buoyancy, g is the gravitational acceleration, d q , d u and d w are disturbances and lumped model uncertainties in the motion dynamics respectively. The total change value of buoyancy could be described as where ∆B h is the buoyancy change value generated by the pressure hull of underwater gilders.
The hull volume will be compressed owing to the seawater pressure. The seawater density variation and the temperature variation also affect the buoyancy generated by pressure hull. The relationship can be expressed as where ρ sea (z) is the seawater density at the depth z, V h0 is the volume of the pressure hull in the air, κ t and κ h are the influence coefficients of temperature and seawater pressure respectively, T 0 and T(z) are temperatures of seawater at sea surface and depth z respectively, which are also can be measured by a temperature sensor. According to previous works [11], the seawater density and temperature of South China Sea can be approximated as ρ sea (z) = ρ sea (0) + 1.7806 ln(1 + 0.0478z) + 0.0035z (5) where ρ sea (0) is the seawater density at sea surface.
where a is the coefficient of temperature variation. The buoyancy produced by the hydraulic buoyancy regulating system can be written as where V oil is the volume of the displaced hydraulic oil. V oil = Qdt, which also can be measured by a cable linear displacement sensor. Q is the flow rate to the external bladder, t is the operating time of the pump. Therefore, m b can be represented by V oil where ρ oil is the hydraulic oil density. The dynamics of the hydraulic pump [10,32,33] is considered to provide a more accurate system model, where D is the displacement of the hydraulic pump, n is rational speed of the electrical motor, that drives the hydraulic pump. C t is the coefficient of the total internal leakage. P(z) is the seawater pressure at depth z, and P(z) = ρ sea (z)gz, which also can be measured with a pressure sensor. The dynamics of the electrical motor speed can be neglected, because the dynamics of the desired motion is significantly lower than the dynamics of the electrical motor. Therefore, it is assumed that the control voltage applied to the electrical motor is proportional to the rotational speed, as where κ p is a positive constant and U 1 is the control input voltage of the electrical motor. However, the dynamics of the movable mass is not so high, which has to be considered, where τ r p and κ r p are the time constant and the gain of the linear displacement dynamics of the movable mass respectively, U 2 is the control input voltage. In addition, r p can be measured with an encoder.
The following equilibrium equation of underwater gliders in the vertical plane [16] can be obtained, where s subindex stands for the equilibrium states, of which α s is the attack angle, ξ s is the gliding angle, θ s is the pitch angle, u s and w s are the velocity in BRF, V s is the velocity in IRF.
As α s is usually very small [22], w s is very small compared to u s . Therefore, only the velocity u and the pitch angle θ are taken in consideration of vertical plane motion control. It will not cause a big influence in a short time.
For simplification, define a set of parameters as η = [η 1 , η 2 , η 3 , η 4 , η 5 , η 6 ], and So, (2) can be expressed aṡ Remark 1. For simplicity, assuming that the underwater glider initially has neutral buoyancy and balanced moment on the sea surface. The center of gravity (CG) in (2) means the initial center of gravity of the whole underwater gilder on the sea surface, which is considered unchangeable. In fact, the actual center of gravity may change, when the hydraulic pump and movable mass work. However, the correctness of (2) holds, no matter which rotational axis is chosen.
Remark 2. d q , d u , d w are disturbances and lumped model uncertainties in the motion dynamics. The model uncertainties in the inner loops, such as ∆B h , m b , are also considered in d q , d u , d w .

Remark 3.
The dive depth z of the underwater glider can be measured by a depth gauge. Therefore, z can be calculated by differentiating z. The pitch angle θ could be measured with a gyroscope. However, the velocity u and w have to be measured with a DVL (Doppler velocity log).

Controller Design
The control objective is to make u and θ follow the desired velocity u d and pitch angle θ d as close as possible, which could improve the operation performance in both vertical motion and virtual mooring. A command filtered adaptive algorithm based on backstepping procedure is proposed to compensate uncertainties and disturbances, and deal with the command saturation and calculation of derivatives.
Before the controller design, we have the following assumption.
Assumption 1. The desired velocity u d , pitch angle θ d and their derivativesu d ,θ d ,θ d are bounded.
Only the motion in vertical plane is considered in this paper. As the dynamics of the underwater glider is low, it is possible to design a smooth velocity and pitch angle command and keep their derivatives exist.
Step 1: This step concentrates on designing a desired buoyancy to make the velocity tracking error as small as possible, and designing an expected linear displacement of the movable mass to make the pitch angle tracking error as small as possible.
Step 1.1: Defining the velocity tracking error as According to Assumption 1, differentiating (14) and noting (13),ũ A virtual control input ∆B 0 e for ∆B e is designed as whereη 4 ,η 5 andd u are the estimations of η 4 , η 5 and d u , c 1 is a positive constant, χ 2 is an extra corrector term, which will be designed later.η 4 ,η 5 andd u are the estimation errors, which are defined asη 4 A second-order filter with coefficients ω n1 and ξ 1 showed in Figure 2 is applied on the virtual input ∆B 0 e to handle the command saturation and calculation of derivatives. The filtered output corresponding to ∆B 0 e is ∆B * e . The following errors are defined, where χ 1 is an extra corrector term, and is defined asχ 1 (14) and (17), we can geṫū Define a following Lyapunov function where k 11 , k 12 , k 13 and k 14 are positive constants. The adaption law is chosen as˙η Based on (18) and (20), the time derivative of V 1 iṡ Step 1.2: Meanwhile, define the pitch angle tracking error as A sliding surface s is designed as where λ is a positive constant. Since makingθ small or converge to zero is equivalent to making s small or converge to zero, the rest of the design will focus on making s as small as possible. According to Assumption 1, differentiating (23) and noting (13), (22), yielding the dynamics of s,ṡ =θ + λ˙θ A virtual control input r 0 p for r p is designed as whereη 1 ,η 2 ,η 3 andd q are the estimations of η 1 , η 2 , η 3 and d q , c 3 is a positive constant, χ 4 is an extra corrector term, which will be designed later.η 1 ,η 2 ,η 3 andd q are the estimation errors, which are defined asη 1 A filter with same structure showed in Figure 2 but different parameters ω n2 and ξ 2 , is applied on the virtual input r 0 p . In addition, r * p is the filtered output.
Define the following errorss where χ 3 is an extra corrector term, and is defined asχ 3 (24) and (26) yieldṡs Define a following Lyapunov function where k 31 , k 32 , k 33 , k 34 and k 35 are positive constants. A following adaption law is designeḋη Considering (27) and (29), the time derivative of V 3 can be calculated aṡ Step 2: This step focuses on the control inputs of the inner loop, which designs the control inputs of the electrical motor and movable mass.
Step 2.1: According to (7) and (17), we can get So, the desired input Q 0 can be determined as And, the extra term χ 2 is designed aṡ where c 2 is a positive constant. In addition, Q is determined by applying a similar filter with coefficients ω n3 and ξ 3 showed in Figure 2 on Q 0 . Therefore, we can get Define a following Lyapunov function where k 2 is a positive constant.
Taking (21) and (34) into consideration, the time derivative of V 2 is given bẏ In addition, based on (9), (10), the control input of the electric motor could be determined as Step 2.2: According to (11) and (26), the dynamics ofṙ p can be expressed aṡr Thus, the desired input U 0 2 can be designed as The extra term χ 4 could be also decided aṡ where c 4 is a positive constant. In addition, U 2 is determined by applying a similar filter with coefficients ω n4 and ξ 4 showed in Figure 2 on U 0 2 . So, the time derivative ofr p can be calculateḋr Define a following Lyapunov function where k 4 is a positive constant. Considering (30) and (41), the time derivative of V 4 is given bẏ Finally, define a following Lyapunov function Combing (36) and (43), it could be easily obtaineḋ Therefore,V ≤ 0, the stability of the control system has been proved. Figure 3 demonstrates the schematic diagram of the proposed command filtered adaptive control (CFAC) algorithm for underwater gliders.

Remark 5.
The parameters in Lyapunov functions, i.e., k 11 , k 12 , k 13 , k 14 , k 2 , k 31 , k 32 , k 33 , k 34 , k 35 and k 4 decide the convergence rate of the corresponding error. Their values should be determined based on simulation results.

Simulation and Discussion
Simulations based on three controllers are conducted to verify the effectiveness of the developed control strategy. The first was the proportional-integral-differential controller (PID), i.e., U 1 = sgn(u d )(K P1ũ + K I1 ũdt + K D1 dũ dt ), U 2 = K P2θ + K I2 θ dt + K D1 dθ dt , where sgn(•) is the signum function. The second was the nonlinear controller without parameter adaption and command filter (NC), i.e., k 11 = 0, k 31 = 0, ∆B * e = ∆B 0 e , r * p = r 0 p , Q = Q 0 , U 2 = U 0 2 , and χ 1 = 0, χ 2 = 0, χ 3 = 0, χ 4 = 0. The third was the proposed CFAC strategy. The parameters of the underwater glider and seawater used for controller design and simulation are shown in Table 1. The control parameters of the aforementioned controllers are listed in Tables 2 and 3 respectively. The simulations are implemented in MATLAB Simulink with a control rate of 100 Hz.  1 ω n1 10 k 11 1 The submerging motion from sea surface to seabed in vertical plane is simulated. To validate the effectiveness of parameter adaption and disturbance attenuation, the initial parameter values in the controllers are set different from the ones used in the underwater glider model. In addition, disturbances are also applied in the glider model, which are shown in (46).
Firstly, the desired velocity is variable, while the desired pitch angle is constant. The tracking performance of velocity is shown in Figures 4 and 5. PID exhibits the largest velocity tracking errors, and NC is a little better than PID. Comparing with NC and PID, CFAC performs much better. Figures 6 and 7 show the pitch angle tracking performance. NC demonstrates the largest tracking errors among three controllers. CFAC is better than PID. The control inputs U 1 and U 2 are shown in Figures 8 and 9 respectively.
Then, the desired velocity is constant, while the desired pitch angle is variable. Based on Figures 10-13, CFAC displays the best tracking performance both in velocity and pitch angle. The control inputs U 1 and U 2 are shown in Figures 14 and 15 respectively.
It could be seen that nonlinear controller without parameter adaption may not achieve a better result than the traditional PID controller. NC works based on accurate model compensation. If parameters and disturbances in the model cannot be obtained precisely, NC may not demonstrate a good performance. In the meanwhile, PID does not depend on accurate model, and can obtain good results in a specific working condition. The drawback of PID is that the control parameters in PID only guarantee some specific working conditions. CFAC takes the advantages of adaptive control, which could attenuate the influence of parameter variation and external disturbance.

Case 2: Motion Control during Floating in Vertical Plane
To validate the robustness of CFAC, the simulation of floating motion from seabed to sea surface in vertical plane is also conducted. Same parameter initial values and disturbances as Case 1 are applied. Firstly, the desired velocity is variable, while the desired pitch angle is constant. The velocity tracking performance is shown in Figures 16 and 17. The pitch angle tracking performance is shown in Figures 18 and 19. The control inputs U 1 and U 2 are shown in Figures 20 and 21 respectively.
Secondly, the desired velocity is constant, and the desired pitch angle is variable. Figures 22-25 show the tracking performance. Similar as Case 1, CAFC achieves the best tracking performance, comparing with NC and PID. PID demonstrates the worst pitch angle tracking performance in Figures 24 and 25. Because the disturbance in the pitch angle loop and influence of hydraulic buoyancy regulating system hinder PID achieve good pitch angle tracking performance. The control inputs U 1 and U 2 are shown in Figures 26 and 27 respectively. According to Case 1 and Case 2, CFAC shows its excellent motion control ability in both submerging and floating process in vertical plane. The switch process between submerging and floating process is not considered, because the switch process could be treated as an open-loop control process with depth as the command. After the switch process, closedloop motion control can be executed again, which guarantees the completion of oceanic observation tasks.

Case 3: Motion Control in Virtual Mooring
To explore the performance of CFAC further, simulation of virtual mooring in the submerging process is conducted. Same parameter initial values and disturbances as Case 1 are applied. The desired trajectories of velocity and pitch angle are described in Figures 28 and 29. When the pitch angle θ approaches zero, ∆B 0 e in (16) will become infinite. In addition, the condition u >> w (u is much larger than w) will be no more satisfied, if velocity u tends to zero. Therefore, the terminal of the desired trajectory is set as u d = 0.03 m/s and θ d = −0.08 rad, since low speed and small pitch angle will reduce the impact during virtual mooring. Once the desired trajectory reaches the terminal, the underwater glider will shift to open-loop buoyancy regulating and realize the final mooring.
Because noises always exist in the practical measurement, especially velocities, white noises are imposed on the feedback of u, w and q in the simulation. Figures 28 and 30 show the velocity tracking performance. The velocity tracking errors of NC is larger than PID and CFAC. It can be seen that both the absolute value and amplitude of tracking error are much larger in NC. The reason is not only the parameter uncertainties and disturbances, but also the imposed measurement noises. However, in the meantime, PID also achieves a good performance as CFAC. PID strategy is only based on the feedback. The low dynamics of the hydraulic buoyancy regulating system and velocity response can reduce the noises imposed on the feedback of u, w and q. In addition, the parameter adaption of CFAC could not reach its best in a short working time. In CFAC, adaptive strategy compensates the parameter uncertainties and disturbances, while command filter attenuates the calculation explosion of derivatives caused by measurement noises in the backstepping process. The pitch angle tracking performance is shown in Figures 29 and 31. CFAC still holds the best tracking performance. The control inputs U 1 varies acutely due to the imposed noises on feedback velocities as shown in Figure 32. U 1 finally reaches its saturation 10V, that indicates a small velocity and pitch angle command is beyond the ability of the underwater glider. Control input U 2 is shown in Figure 33. U 2 does not vary dramatically like U 1 , because the dynamics of pitch angle is lower than the one of velocity. In CFAC, command filter deals with the command saturation and calculation of derivatives in the underwater glider control system. Equation (45) guarantees thatū, ∆B e , s andr p will become zero asymptotically, which are different from the expected tracking errorsũ, ∆B e ,s andr p . Since the dynamics of u and θ of the underwater glider is not high based on (13), command filter can be applied to make CFAC work with a suitable response time to avoid overshoot. Takingũ for example,ũ =ū + χ 1 based on (17), anḋ is the filter output of ∆B 0 e through command filter in Figure 2. The error between ∆B * e and ∆B 0 e could become small enough to make χ 1 converge to zero, that is possible because the dynamics of the underwater glider is not high. As a consequence,ũ will approach zero, onceū and χ 1 converge to zero. In a same way, ∆B e ,s andr p can be proved to approach zero.
In practice use, ξ i (i = 1, 2, 3, 4) in CFAC is chosen as 1, which is the critical damping ratio of the second-order system and could avoid overshoot and oscillation during command filtering. ω ni (i = 1, 2, 3, 4) is chosen based on the dynamics of the underwater glider and desired trajectory. A large ω ni may introduce the influence of measurement noises, and cause overshoot and oscillation. A small ω ni cannot eliminate the filter error and lead to the final control error. Hence, a balance of ω ni should be kept. Command saturation keeps the calculated control command in a sound range, which is important for low dynamic systems, such as underwater gliders. Once command saturation works, the underwater glider cannot track the desired trajectory. It means that the dynamics or amplitude of the expected trajectory is beyond the response of controlled system.

Conclusions
This paper developed a detailed system mathematical model and a command filtered adaptive control strategy for underwater gliders, whose system dynamics is low and working condition is complicated. It will help improve the maneuverability and motion tracking performance in the oceanic observation tasks. Underwater gliders are driven by a hydraulic buoyancy regulating system and a movable mass. A detailed system dynamic model is proposed, which considers not only the influence of working environment, e.g., seawater density variation, temperature variation and hull deformation according to dive depth, but also the dynamic of system actuators, i.e., the hydraulic pump model and movable mass dynamic. An adaptive nonlinear control algorithm based on backstepping technique is proposed to compensate the uncertainties and disturbances. A command filtered method is employed to deal with command saturation and calculation of derivatives in the backstepping process. The stability of the whole system is proved through Lyapunov theory. Three controllers are compared in simulations with different motion requirements. The results demonstrate that CFAC has good velocity and pitch angle tracking performance under parameter uncertainties and disturbances, which can help underwater gliders accomplish observation tasks better. It could be learned that CFAC applies to low dynamic systems, such as underwater gliders. Experimental validation should be implemented in the future work.