Attitude Optimal Backstepping Controller Based Quaternion for a UAV

A hierarchical controller design based on nonlinear H ∞ theory and backstepping technique is developed for a nonlinear and coupled dynamic attitude system using conventional quaternion based method. The derived controller combines the attractive features ofH ∞ optimal controller and the advantages of the backstepping technique leading to a control law which avoids winding phenomena. Performance issues of the controller are illustrated in a simulation study made for a four-rotor vertical take-off and landing (VTOL) aerial robot prototype known as the quadrotor aircraft.


Introduction
Control of aerial robots is highly complex and has been the subject of many research papers.The research on Mobile Robots with high degree of autonomy becomes possible, due to the development and reduction of costs on computer, electronic, and mechanic systems [1].Euler-angle based and conventional quaternion based methods have been extensively employed for spacecraft attitude control.However, the first method suffers from singularity that prohibits large orientation maneuvers, while the second exhibits ambiguity and unwinding phenomena; hence the advantage of a four-parameter attitude representation such as quaternions is the avoidance of singular points in the representation, together with better numerical properties.The attitude control problem of a rigid body has been investigated by several researchers and a wide class of controllers has been developed.In this context Fortuna et al. [2] propose an approach based on two parallel controllers derived in quaternion algebra; a PD (proportional and derivative) feedback controller and a feedforward controller implemented by means of a hypercomplex multilayer perceptron neural network.The proposed controller in [3] is based upon the compensation of the Coriolis and gyroscopic torques and the use of a PD 2 feedback structure, where the proportional action is in terms of the vector quaternion and the two derivative actions are in terms of the airframe angular velocity and the vector quaternion velocity.Wang et al. in [4] treat how to improve attitude control performances of roll and pitch channels under both small and large amplitude manoeuvre flight conditions.Zhao et al. in [5] discuss trajectory tracking control for vertical take-off and landing (VTOL) Unmanned Aerial Vehicles (UAVs) using the command filtered backstepping technique and a second-order quaternion filter are developed to filter the quaternion and automatically compute its derivative, which determines the commanded angular rate vector.In Fresk and Nikolakopoulos approach in [6] both the quadrotor's attitude model and the proposed nonlinear proportional squared (P2) control algorithm have been implemented in the quaternion space, without any transformations and calculations in Euler's angle space or Direct Cosine Matrix.Moreover Honglei et al. [7] derive a backstepping-based inverse optimal attitude controller which has the property of a maximum convergence rate in the sense of a control Lyapunov function under input torque limitation and the inverse optimal approach is employed to circumvent the difficulty of solving the Hamilton-Jacobi-Bellman (HJB) equation.Likun and Qingchao in [8] construct a Lyapunov function based on attitude tracking errors and angular rates.The stabilizing feedback control law is deduced via Lie derivation of the Lyapunov function.A virtual controller and some command references are introduced by Sun et al. in [9] to asymptotically stabilize the system of the tracking error dynamics.Then, the actual controller and command references are derived by solving a system of linear algebraic equations, such as attitude stabilization, and [10] develops a control law that uses both optimal control and finite-time control techniques which can globally stabilize the attitude of spacecraft system to a set of equilibria.A solution for robust spacecraft attitude control using a nonlinear  ∞ control law to stabilize the maneuver in the presence of external disturbance is investigated by [11].Moreover, a nonlinear  ∞ output feedback controller is proposed and coupled to a high-order sliding mode estimator to regulate a UAV (Unmanned Aerial Vehicle) in the presence of the unmatched perturbations [12].Many searchers like [13] used the globally non-singular unit quaternion representation in a Lyapunov function candidate.Guilherme et al. perform a control structure through a nonlinear  ∞ controller to stabilize the rotational movements and a control law based on backstepping approach to track the reference trajectory [14].
Combining the backstepping technique with  ∞ technique and using the conventional quaternion based methods to stabilize the attitude of spacecraft system to a set of equilibria is the goal of this work.The control strategy must overcome some difficulties such as the highly nonlinear and coupled dynamics more over the dynamic, complex, and unstructured environments which may cause unpredictable disturbances to the control system.So dealing with some states in each step will reduce difficulties and make them restrained.Using the optimal condition of Pontryagin and the optimal control approach to design a robust control law for attitude motion control it has been shown that the resulting control law has excellent performance, as demonstrated by simulations.The paper is outlined as follows.The formulation of the problem is developed in Section 2. Optimal attitude control  ∞ /backstepping with some mathematical preliminaries are developed in Section 3. Simulation results applied for the quadrotor are discussed in Section 4. Finally, Section 5 presents some conclusions.

Problem Formulation
Let  be the quaternion and the dynamic attitude system represented as where  ∈  3×3 denotes the inertia matrix of the body and satisfies  =   > 0, Ω = (0, Ω), and Ω ∈  3 is the angular velocity vector of the body in the body-fixed frame, () ∈  3 is the control torque vector, and () ∈  3 is the external disturbance vector.The attitude quaternion () ∈  4 is defined by () = ( 0 (),  1 (),  2 (),  3 ())  = ( 0 (),  V ())  and the Euclidean norm ‖()‖ 2 = 1, ∀ ≥ 0. If   is the desired quaternion written in dynamic form as with Ω  = (0, Ω  ), Ω  ∈  3 is the desired angular velocity.The quaternion error in multiplicative form is or Then the derivative of the above equation gives which leads to then, Let with Using Rodriguez formula one can define the rotation matrix in quaternion representation [15,16]: Let an auxiliary angular velocity be defined as so the system in quaternion error can be represented as from (9) × is the cross product.Finally using the skew matrix we obtain Let then ( 16) can be written as In that case (18) can be written as with taking   () = ( 0 (),  V ())  , the development of ( 12) will lead to the kinematic equation of the rigid body motion described in terms of the attitude quaternion: (  ()) is the kinematics Jacobian matrix (see [17]) defined as and the matrix ( V ()) ∈  3×3 denotes a skew-symmetric matrix given by Let with So the system in hierarchical form based on ( 22) and (20) will be presented as The performance specification in steady state must lead to the equilibrium point This section is a necessary introduction for the following section which deals with the optimal backstepping technique based on the model presented in (26), leading to an optimization problem with constraints and a backstepping controller.
The Hamiltonian equation and Riccati formula solution is developed meanwhile.

Optimal Attitude Control
In this section we are interested in optimal control of systems modeled by differential equations, in finite dimension, defined as follows: where  ∈ R  1 is the state vector,  ∈ R is the time variable, and  ∈ R  2 is the control input.For such systems, the goal is to determine a controller to bring the system from an initial set to a final set, by minimizing criterion called the cost.In this case, we define the optimal control problem, as min  (, ) Let the cost function with constraint be presented as where  ×  ∋ (, )  → (, ) ∈ R,  ×  is a normed space.Here,  is the space of continuous functions with continuous derivatives R ⊃ [ 0 ,   ] → R  We note the Hamiltonian function as follows: ( () ,  () ,  ()) =  (, ) +  ()   (, ) .
The key point of this theory is the Pontryagin Maximum principle formulated in 1956, according to which the optimal control minimizes the function  with the following optimality condition: The principle goal in designing an optimal control law is to make the steady state converge to the closer equilibrium.
The controller is established into two steps (as classical backstepping) passing through a virtual controller and a matrix   positive definite computed through Riccati equation.The local stabilizability and detectability are then ensured by the existence of a proper solution of the algebraic Riccati equations.Assuming that system (26) is stabilizable, then the following theorem is established.
Theorem 1.Consider the hierarchical system (26) with the assumption that pair (  ,   ) has to be stabilizable; then there exists a virtual control V  and a positive semidefinite matrix   such that the subsystem can be represented in the form = 1 to .  is the degree of differentiability of the system ( = 1, 2;  = 2 in our case), with the new variable  defined as and the virtual backstepping controller V which asymptotically stabilizes the disturbance free system Proof.In backstepping controller each step will be treated as a submodel.The link between different submodels is made using backstepping technique.So let model (26) be represented in error form as and  −1 =   for every   = 0, and then Since the variable of differential   depends essentially on the variable V  (actual virtual control) and V −1 (past virtual control), then one can introduce by analogy the variable  −1 in model ( 40).Let the model with the new variable control with   the new variable control defined as Chosing   as with  represents the step number.The ż  for  = 1 ⋅ ⋅ ⋅  − 1 will be computed by using recurrence formula; hence the Hamiltonian function will be defined as replacing ż  from (41) gives Using the optimality conditions for control law leads to since then equaling ( 42) and (48) will give So the virtual control V  can now be computed: Equation (38) will help to extract the past ż  from recurrence technique replacing V −1 from (50) gives (52) using (40) leads to (53) then ż −1 is evaluated: (54) by recurrence ż  is Introducing the new computed variables in the Hamiltonian (45) will give Taking the worst case for   in linear form [18]: So (56) becomes Applying the optimality conditions from (58) leads to For the final step λ  is computed: Taking (47) and differentiating for  and : comparing with ( 60) and ( 62) leads to finally the Riccati equation before the final step will be Let us compute the Riccati equation for the final step using the computed value  −1 : replacing the value of   from (48): then Finally the Riccati equation is formulated as and the equation of V  becomes this will conclude the proof.
Step 1.The algorithm (hierarchical) for computing control law needs initialization.Let V 0 () =  1 ();  0 () =  1 ();  1 () =  2 ();  0 = 0;  0 = 0;  1 = 0; and taking the virtual control V 1 sign( 0 (0)) then the submodel will be Let the model with the new variable control with Taking the Hamiltonian will be for this case applying the optimality conditions: control law is deduced from Hamiltonian equation which reflects the  ∞ control law (optimality condition): for  1 = [0, 0, 0]  ; differentiating (78) and comparing with (77) lead to the Riccati equation became with  1 being a symmetric matrix and  1 being a diagonal matrix; then the control law  1 is calculated as finally the control law V 1 is computed: Step 2. Taking the second submodel the model presented in  variable form is (86) this equation can be written: taking the worst case for  2 with Let by recurrence the past ż 1 is calculated: the Hamiltonian will be Applying the optimality conditions for λ 1 and λ 2 will give knowing that then the control law is deduced from Hamiltonian equation (optimality condition): hence Similarly, Hence the Riccati equation is determined. 2 is chosen to be a symmetric matrix.So the control law is in other way   (102)

Simulation Results
The parameters of the model are  = diag(0.0098,0.0098, 0.0176), the parameters of the controller are  2 = 150,  1 = 0.1 3×3 ,  2 = 0.03 3×3 , and  1 =  2 =  3×3 .Note the quaternion can be represented as  0 () = cos(), ⃗  V () = ⃗  sin(), and hence the initial location can be easily seen through (0).Case 1.Let the initial condition of the quaternion error be  0 = (0.8224, 0.2226, 0.4397, 0.3604)  , which corresponds to an angle (0) = 34.67 ∘ ; the matrices  1 and  2 are computed through Riccati equation and  2 is chosen to achieve good performances.For that case  0 (0) > 0 and will be stabilized to 1. Figures 1, 2, and 3 show the attitude responses and the control inputs, which gives a convergence in short time.These results are nearby the normal reflect when analyzing the initial location of  which lies in the first quadrant.

Conclusion
A hierarchical  ∞ /backstepping controller is proposed and theory to derive control law is developed.This combination will emphasize not only the robustness performance but also the choice of the adaptation matrix.The local stabilizability/detectability conditions are thus ensured by the existence of the proper solutions of the unperturbed Riccati equations.Theoretical results are supported by numerical simulations that demonstrate efficiency of the proposed controller design.Further investigation is focused on hierarchical observer/controller.
move from solving an optimization problem with constraints to an optimization problem without constraints.Consider the cost function of the form  (, , ) =  (, ) + ∫ 1and  is the space of continuous functions defined on [ 0 ,   ] → R  2 .We consider a new function , ×× ∋ (, , )  → (, , ), where  is the space of differentiable functions R → R  1 and the vector  is known as the costate vector.This new function allows us to  ( (, ) − ẋ ()) .(32)