Advanced Autonomous Underwater Vehicles Attitude Control with L1 Backstepping Adaptive Control Strategy

This paper presents a novel attitude control design, which combines L1 adaptive control and backstepping control together, for Autonomous Underwater Vehicles (AUVs) in a highly dynamic and uncertain environment. The Euler angle representation is adopted in this paper to represent the attitude propagation. Kinematics and dynamics of the attitude are in the strict feedback form, which leads the backstepping control strategy serving as the baseline controller. Moreover, by bringing fast and robust adaptation into the backstepping control architecture, our controller is capable of dealing with time-varying uncertainties from modeling and external disturbances in dynamics. This attitude controller is proposed for coupled pitch-yaw channels. For inevitable roll excursions, a Lyapunov function-based optimum linearization method is presented to analyze the stability of the roll angle in the operation region. Theoretical analysis and simulation results are given to demonstrate the feasibility of the developed control strategy.


Introduction
With increasing demands for undersea exploration and exploitation, researches in related fields have been given a boost, especially the study of autonomous underwater vehicles (AUVs), which is an undersea system containing its own power and controlling itself while accomplishing a pre-defined task [1]. A fully autonomous underwater robotics network for various missions with high performance is in great demand [2]. Thus, the design and control strategies of AUVs have received considerable attention by researchers.
The attitude control problem is one of the fundamental problems to facilitate the advancement of autonomous underwater networks. However, the attitude dynamics of AUVs have highly-coupled nonlinearity with uncertainties from modeling errors and time-varying external disturbances. Various methods have been proposed for the attitude control. Some work uses feedback controllers separately for each channel neglecting the coupling among angles, while some handle the problem directly by nonlinear control approaches, such as sliding-mode-based control [3][4][5][6], H ∞ tools [7,8] and others.
In this paper, based on good study of the nonlinear AUV model presented in [9], which is driven by four water pumps, a precise attitude controller with the combination of backstepping control and L 1 adaptive control is proposed for the yaw and pitch channels. The backstepping approach provides a recursive method for stabilizing the origin of a system in strict-feedback form [10]. The kinematics and dynamics of the attitude problem for mobile system with 6-DOF are in strict feedback form, This AUV is aligned to be neutrally buoyant, which means the gravitational force and buoyant force are equal to each other. It is also aligned to be naturally stable, which means two of the three Euler angles, φ and θ, are close to zero when it is at rest. The body coordinate frame O is attached to the center of mass of the AUV. The x axis points to the head and y axis goes to the right of the AUV. More modeling details are presented in Appendix A.

Kinematics and Dynamics of Attitude
The Euler angle representation is used here to present the attitude of the AUV. Table 1 gives some of the definitions and notation in this paper. x y w z A standard notation for attitude propagation equations and attitude dynamics is adopted here, The first line of Equation (1) describes the kinematics of attitude angles, where Ω = φ θ ψ T and w = w x w y w z T are state vectors of attitude angles and angle rates expressed in the body frame. φ, θ and ψ denote roll, pitch and yaw angle, while w x , w y and w z are angle rates with respect to x, y and z axes of body frame, and The second line of Equation (1) describes the dynamics of attitude angles, where the diagonal matrix J ∈ R 3 is moment of inertia of the AUV, and η b ∈ R 3 is the overall moment applied on the AUV expressed in body frame, which consists of buoyancy-gravity stabilization moment τ G , control input η and fluid dynamic moment τ D , shown as follows, As mentioned before, this could offer two DOFs of moment to manipulate the pitch and yaw angle. Thus, the control signal is η = [0 η y η z ] T .
Equation (1) summarizes the overall attitude model of the AUV. The modeling details could be found in [9]. This paper only considers the uncertainties in dynamics. Thus, compared to Equation (1), the attitude dynamics can be represented as follows, whereH(w) = −J −1 (w × Jw) and K = J −1 . The uncertainties,H δ (w) and K δ , are due to the imprecise knowledge of J. σ out represents disturbance from environment. This dynamic equation could bė Expanding the second η b in (5), let H(w) =H(w) + τ G + τ D , and defining σ = K −1 K δ η b + K −1H δ (w) + σ out to represent the overall uncertainties, we obtaiṅ

The Trimmed Model for Pitch and Yaw Dynamics
In this section, the original model in Section 3.1 is trimmed for controller design and performance analysis. Define the kinematics Euler angle equations of the pitch and yaw channels are θψ = cφ −sφ sφ/cθ cφ/cθ w y w z , ẇ ẏ w z = I sẇ = I s H(w) + I s K(η + σ).
Define η s = τ y τ z as the control signal. To further simply Equation (8), we introduce the following definitions.
where J 11 , J 22 and J 33 are the diagonal elements of J.
Thus, Equation (8) isΩ All the uncertainties have been added together into σ s ∈ R, which is subject to the following assumptions: Assumption 1. There exist constants L > 0 and L 0 > 0 such that the following inequalities hold uniformly in t ≥ 0, ∀w 1 , w 2 ∈ R 3 and ∀w s 1 , w s 2 ∈ R 2 : Assumption 2. There exist constants L 1 > 0, L 2 > 0 and L 3 > 0 such that the following inequalities hold uniformly in t ≥ 0: Assumption 3. The desired command Ω d ,Ω d andΩ d ∈ R 2 are bounded. Ω and ω exist inΩ andw, which are compact subsets of R 3 , where Ψ(Ω) and H(w) are continuous and bounded, and so are Ω s and ω s .

Control Objective
The control objective is to design an adaptive attitude controller, which could let attitude angles to track the desired commands Ω d . In this paper, the goal is to let the pitch and yaw angles, Ω s , always track the desired values, Ω d . Meanwhile, the roll angle is self-stable. The self-stability of the roll angle will be proved in the analysis part.

State Predictor
The state predictor is defined as follows,ŵ where e ∆ =ŵ s − w s is the prediction error, and A m is a Hurwitz matrix, which defines the desired convergence of e. Usingσ s =σ s − σ s , the prediction error is, The Laplace transform of it is,

Adaptive Law
Setting the sampling time of the adaptation law by T s , and the prediction error by e, a piecewise constant adaptation law is given bŷ where φ(T s ) = A m (I − exp(A m T s )) −1 and u(iT s ) = exp(A m T s )e(iT s ) for all i = 1, 2, 3, ....

L 1 Backstepping Euler Angle Controller
Define η s = [η y η z ] T , and use η b ∈ R 2 and η a ∈ R 2 to represent control laws coming from the backstepping loop and L 1 adaptive loop respectively. Thus, where A m1 , A m2 are diagonal Hurwitz matrices. K 1 is a positive gain and D 1 (s) is a strictly proper transfer function, the value of which ensure C(s) = K 1 D 1 1+K 1 D 1 has unit DC gain. For the entire system in (1), the overall control law would be

Analysis
The performance analysis of this paper has two parts, namely, self-stability analysis in the roll angle channel and response performance analysis in the pitch-yaw angle channels. The roll angle channel relies on the self stabilization mechanism of itself with assumptions of bounded states in the pitch-yaw channels. Then, the pitch-yaw angle channels stability based on the bounded states in the roll channel is analyzed. The overall stability of the system will be discussed at the end.

Roll Angle Channel Self-Stability Analysis
Expanding Equation (6), the dynamics of the roll angle is described by the following equations, where σ 1 = 1 0 0 σ, representing the overall uncertainty in the roll channel. The first two terms inẇ x come from τ G and τ D , where d is the distance from the center of gravity and the center of buoyancy, and C x is the damping coefficient. Define Equations (22) and (23) can be written as follows, Consider the linearization model, where x = φ w x is the state vector, and A = 0 is a Hurwitz matrix. g 1 = J −1 11 G W d is a positive constant. g 2 and g 3 are positive linearization coefficients. d roll ∈ R 2 is the uncertainty that is the uncertainty from the other two channels, and d m = 0 d 3 T represents the difference between the linearization model and the original model of x. d 1 , d 2 are defined in (24) and (25), while d 3 is defined as follows.
Since A is a Hurwitz matrix, there exist matrices P and Q, which are positive definite. Consider the Lyapunov function candidate: The derivative of V roll iṡ d 1 and d 2 are continuous and bounded in the compact setsΩ andω, such that Thus, (31) could be written aṡ which shows the boundary ofV roll is effected by the value of the linearization mismatch error d 3 in d m .
With the optimum linearization, proper coefficients, g 2 and g 3 , could give the minimum d 3 .
Then the roll channel is bounded and where t 1 > 0 is a dummy variable.
Proof of Lemma 1. Recalling the Lyapunov function in (30), first we prove that by contradiction method as follows. Assume the opposite of Equation (37) is true, then there exists while Equations (39) and (40) imply thatV(t ) > 0, which is clearly in contradiction with Condition ii in (35). Thus, Equation (37) which leads to (36).

Remark 1.
For a given pair of g 2 and g 3 , with an appropriate choice of P and Q, the Lyapunov function and the derivative of it are specified, which are shown in Figure 2. The blank region in the center indicts wherė V(x) > 0, while the colorful region shows whereV(x) < 0. The contours represent V(x) = V c , where V c ∈ R. Figure 2 shows a bunch of Lyapunov contours with different values of V c . Any contours within the colorful region satisfy Condition ii in Lemma 1.

Optimum Linearization.
In what follows, we introduce an optimum procedure to find g 2 and g3, such thatV > 0 is a closed region, which means contours V(x) = V c exist, and find the minimum value of V c , denoted as V c min .
1. For a given pair of (g 2 , g 3 ), with the specified P and Q, we have the objective function L(x) = −V(x). The optimization problem under such set up would be whereV i ∈ R. This optimization problem would search along each contour V(x) =V i to find the maximum value ofV in this contour. 2. Base on step 1, set L(x) == 0 to find theV 0 , which means in this contour V(x) =V 0 the maximum value ofV is 0. 3. Repeat steps 1 and 2 in the compact sets of g2 and g3; get a set ofV 0 (g 2 , g 3 ). 4. Define the boundary function of states, g(x) = B x (V 0 ), where x = g(x). 5. Find the min(B x (V 0 )) in the set ofV 0 (g 2 , g 3 ), which give the states' minimum bounds. Then, the optimal linearization coefficients, g2 and g3, are picked up.

Pitch-Yaw Angle Channel Stability Analysis
Lemma 2. Considering the system described in (9) with the state predictor (12), adaptive law (15) and control Proof of Lemma 2. The solution of system (13) When t = T s , it follows from Equation (52) that According to the choice of adaptive law in (15), we have It follows from Equation (53) that The norm of it is Since σ s = I s σ, σ s is a subset of σ. Using Assumption 1 in (56), we could have In the condition of this Lemma ||w s t 1 || L ∞ ≤ ρ w , for all i while iT s < t 1 , Equation (57) could be Using the definition of γ 0 (T s , ρ x ) in (46), finally we could get For all iT s < t 1 , according to Assumption 2, the derivative of uncertainties could be written in Using the definition of b dσ in (49), then It follows from (54) that Hence, (55) and (61) imply that iT s and there exists t p ∈ [(i − 1)T s , iT s ] such that For any The bound ofσ s (t) is derived in Equation (60). Then we have It follows from the definition ofσ s (t) and γ 1 (T s , ρ w , ρ η ) in (45), (47) that Using the dynamics in Equation (13), we have Hence, Using the norm property ||e t 1 || ≤ √ n||e t 1 || L ∞ , we have where n is the dimension of w s (t). The value of n is equal to 2 in this situation. It follows from the definition of γ 2 (T s , ρ w , ρ η ) in (48), which completes the proof.

Lemma 3. For any given bounded
Proof of Lemma 3. Recall the definition of γ 0 (T s , ρ w ) in (46), the insides of the integration are functions with bounded values. As T s → 0 we can get γ 0 (T s , ρ w ) → 0. Similarly the limits of γ 1 (T s , ρ w , ρ η ) and γ 2 (T s , ρ w , ρ η ) going to zero could be proved. The proof is completed. Lemma 4. Considering the system described in (9) with the state predictor (12), adaptive law (15) and control .

Proof of Lemma 4. Considering this Lyapunov function candidate,
first, we prove that Based on the control laws in (16) and the definition in (20) (43) and (44), the derivative of (75) is: where A m1 and A m2 are Hurwitz matrices, which ensure that the total of the first two quadratic terms would be negative.
For f (t, w s (t)) = [(C(s) − 1)J sẇd + (1 − C(s))σ s − C(s)σ s ] T , according to Assumption 1 and Lemma 1, By the definition in (50), thus Next, we prove Equation (76) by contradiction method. Assuming the opposite of Equation (76) is true. Then if at any time t 1 > 0, one has V(t 1 ) > C. According to (75), we could have Ω s > √ C or w s > √ C. Based on this, two-case discussions under this are presented as follows, which could easily findV(t 1 ) < 0. (77), based on the conditions settings for this case, we could getV(t) < 0. Ifw s > √ C, according to Case 1, we could easily verifyV < 0. Hence, if V(t 1 ) > C, then from the above Cases 1 and 2 we havė For Lemma 5. For the system in (2), (6) with the L 1 backstepping adaptive controller in (16), if the truncated L ∞ norm Ω s t 1 L ∞ ≤ ρ Ω , w s t 1 L ∞ ≤ ρ w , x t 1 L∞ ≤ b x and η s t 1 L ∞ ≤ ρ η for any time t 1 ≥ 0, then and Proof of Lemma 5. According to (16), taking the norm of this equation, we could have Use Assumption 1, Lemmas 1 and 4, we could get Based on the definition ofw s in (43) Thus, we could get Same for Ω s , Lemma 6. There exist ρ w > 0, ρ Ω > 0, ρ η > 0 and T s > 0 such that and w d + Proof of Lemma 6. Let us choose ρ η such that where ∆ 1 > 0 is any positive constant. From Lemma 5.2, there exists some T s to make For (94) and (95), we could get the value of the left sides. There must exist a set of ρ w and ρ Ω , which could satisfy the inequalities. (98) Proof of Theorem 1. For t = 0, it satisfy that Using proof by contradiction, assume Theorem 1 is not true, since w s (t), Ω s (t) and η s (t) are continuous. There exists some t ≥ 0 where Thus, Letting t 1 = t , following from Lemmas 5 and 6 that and These contradict what we get in (101) with the assumptions in (100). Therefore t does not exist. Thus the statement in Theorem 1 holds for all t > 0.

Overall Stability Analysis
Theorem 2. If we choose Ω d and design parameters A m1 , A m2 to make ρ w and ρ Ω satisfy the following equation, where d 1 and d 2 are defined in (24) and (25), then the entire system is stable and Proof of Theorem 2. We prove this theorem by a contradiction argument, for t = 0, it satisfies that Assume Theorem 2 is not true, since x(t), w s (t) and Ω s (t) are continuous. There exists some Thus, It follows from Theorem 1 that Equation (98) holds and contradicts with Equation (110). Therefore t does not exist. Thus, the statement in Theorem 2 holds for all t > 0.

Remark 2.
The conditions (105), (106) and (107) of Theorem 2 are feasible. In the definition of d 1 and d 2 we can readily obtain that d 1 ≤ sθtθ + cφtθ ρ ω and d 1 ≤ J −1 11 (J 33 − J 22 ) ρ ω 2 + 2Lρ ω + L 0 noticing that σ 1 is subject to Assumption 1. By reducing the pitch angle operating range θ and the desired angular velocity ρ ω , we can always satisfy (107). However, this also limits the operation envelop of the vehicle. The control parameters and reference input should not violate the conditions. The simulation results in next section also validating the feasibility condition of Theorem 2.

Simulation for Roll Angle Stability Analysis
Following the optimum linearization procedure in Remark 1, the numerical solution for optimum linearization is g 2 = 0.89 and g 3 = 1.85. The parameter settings for the simulation are The simulation results are shown in Figure 3. The region ofV > 0 has been reduced by picking up the suitable coefficients g2 and g3. The blue contour is the one who has max(V) = 0. The purple line give the bounds of φ and w x , which are φ ∈ [−0.7392, 0.7392] and w x ∈ [−0.8987, 0.8987].

Simulation Structure
The control law generated by the controller is a desired moment which can not be directly taken by the AUV. A dynamic control allocation module is brought into consideration to distribute the moment among these four thrusters. Similar to the study of quadcopters in [20], the total trust and moment provided by this thruster configuration with 4 thrusters can be expressed as the vector sum of the force and moment from each individual thruster. Using w i to represent each rotor's speed, the trust provided by the i th thruster is where b is the truster coefficient. Thus, the total trust is given by Pairwise differences in rotors' speed drive the vehicle to rotate. The torques about the AUV's y-axis and z-axis are generated by the moments where l is the distance from the thruster axis to the center of mass. Thus, the total trust and moments in the body frame are The pseudoinverse is used to calculate the allocation matrix A −1 . Then, by using the desired moments command could be distributed into RPM commands for each thruster.
The simulation structure is shown in Figure 4.

Closed-Loop Response
In this section, we will present the performance of two control methods. One is the proposed L 1 backstepping control, while the other is the PID control. Case 1 presents the simulation results with the designed reference inputs shown in Figure 5. Case 2 provides the simulation results with step functions as reference signals. The closed-loop responses of the L 1 backstepping control in Case 2 are shown in Figure 6a The control laws, η y and η z , generated by these two controllers are shown in Figures 6c and 7c, respectively, which are the desired moments with respect to axis y and axis z, namely, moment M and N. The RPM commands sent to the four water pumps are shown in Figures 6c and 7c. Comparing  Figures 6a,b, we could see the pitch angle uses less time than yaw angle to achieve the goal. When the desired angle of the pitch channel is reached, the commands are switched to put more effort into the yaw angle channel function.

Conclusions
In this paper, a robust L 1 backstepping attitude control has been proposed for AUVs in a dynamic environment. Moreover, a Lyapunov function-based optimum linearization method is presented to analyze the stability of the roll angle in the operation region without active stabilization. Simulation results have been provided to show the effectiveness of the proposed approach. Further research will focus on the performance improvement and precise trajectory-following algorithm design, which eventually will be extended to a fully autonomous underwater robotic network.
Author Contributions: Y.L. and J.C. conceived the idea of the study, performed the research, and analyzed the results under the supervision of C.C.; Y.L. wrote the initial draft of the paper; Y.L. and J.C. revised the manuscript.
Funding: This research received no external funding.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A. AUV Modeling
The design of the prototype used in this paper is presented in Section 2. In this section, we would give more modeling details.

Appendix A.1. Proof of Concept Testing
The proof of concept system is designed to be passively stable. In initial testing, this criterion has been sufficiently met with a self-righting time of approximately 1 second from a complete roll over. Initial testing of the propulsion system in a swimming pool environment has displayed an acceptable cruising speed and turn radius.
The fluid level and position of the buoyancy control unit is adjustable as shown in Figure A1. With all motors' power set to zero, we adjust the fluid level to make the buoyancy force equal. Additionally, the position of the buoyancy is also adjusted to make the attitude of the AUV straight in the water.
This static balancing and alignment can make the vehicle naturally closed to the desired system. Although, the control law from the closed-loop controller can compensate these unbalanced and misaligned factors, the initial alignment can still reduce the control efforts since control signals are subject to physical constraints with limited amplitude, like actuator saturation. It also helps to ensure that the vehicle parameters fall into the fully controllable range. Figure A1. Prototype side view [9].
The details of dynamic model are presented in three subsections. The general approaches to building the model of a remotely operated vehicle (ROV), an AUV or other underwater vehicles are discussed in [21][22][23]. Some results are adopted, while further simplification of the modeling are derived to help design a more efficient control system.

• Actuator Dynamics
The dynamic relation of the setting value from the speed controller and real-time speed of motor is described in Equation (A1). A single lag model is used to model the real-time speed ω i of the motor i and the setting input value u i .

• Force and Moment Generation Process
This part analyses how the force and moment are generated and applied to the AUV. There are three terms applied on the vehicle, which are weight and buoyancy force and moment, water pump propulsion force and moment and AUV fluid dynamic force and moment.

(a) Weight and Buoyancy
The gravitational force and buoyant force in terms of body coordinate systems are, where g is the gravitational acceleration, ρ is the fluid density and V is the volume of the fluid displaced by the vehicle. The moments generated by these forces can be expressed in terms of the positions of the center of mass C and the center of the buoyancy B [21].
where R C and R B are the respective positions of the center of mass and the center of buoyancy in the local coordinate system. The AUV is aligned to be neutrally buoyant, which means F w = F B . It is also aligned to be naturally stable, which means the two of three Euler angles φ, θ are close to zero. The moment generated by the buoyancy force and gravity force can be simplified as follows, where d is the distance from the gravity center and buoyancy center. The more stabilization moments τ xs , τ ys is always trying to maintain stability, which means the larger the d, the more stable the vehicle.

(b) Water Pump Propulsion Force and Moment
As discussed in Section 6.2.1, the resultant force T b and moments, τ y and τ z , of the proposed propulsion system can be expressed as the vector sum of the force and moment form each individual pump in Equation (116).

(c) AUV Fluid Dynamic Force and Moment
The shape of the AUV is complex and therefore the modeling of its behavior is almost impractical. From the perspective of control, the simplified model at the operation points is desired.

The drag equation of fluid is
where ρ is the density of the fluid, v is the speed of the object relative to the fluid, C d is the drag coefficient, A is the reference area. In the vector form, Similarly, for the rotational moment, it is To summarize, the overall force f b and moment η b applied to AUV are where T b , F D , τ xs , τ ys , τ y , τ z and τ D are defined in Equations (116), (A4) and (A6).
• Rigid Dynamics of the AUV Body Revisiting the notations in [24], the equations of motion for a rigid body subject to body force f b ∈ R 3 and torque η b ∈ R 3 applied at the center of mass and specified with respect to the body coordinate frame is given by the Newton-Euler equation in the body coordinate which can be written as, where v b ∈ R 3 is the body velocity, ω ∈ R 3 is the body angular velocity, m ∈ R is the mass, I ∈ R 3×3 is an identity matrix and J ∈ R 3×3 is an inertial matrix. The effects of added mass [21] will influence the total mass m and total moment of inertial matrix J. There will be large uncertainties in those parameters as discussed in Equations (4) and (5).
The position and velocity of the AUV center of gravity are given by p = x y z T and v =ṗ ∈ R 3 , respectively, expressed to the spatial frame in North-East-Down orientation. Let R ∈ SO be the rotation matrix of the body axes relative to the spatial axes and vector. R can be parameterized by the ZYX Euler angles with φ, θ and ψ about the x, y and z axes, respectively.
where Ψ(Ω) is give in Equation (2). In the ZYX Euler angle parameterization of rotation matrix, there are singularities at θ = ±π/2. For the following discussion, we assume that the trajectory of AUV does not pass through the singularities. The motion equations of a rigid body are (A12) Equation (A12) summarizes the overall dynamic system of the AUV, where f b and η b are defined in Equation (A8).