Table of Contents Author Guidelines Submit a Manuscript
Mathematical Problems in Engineering
Volume 2016 (2016), Article ID 8573235, 11 pages
Research Article

Attitude Optimal Backstepping Controller Based Quaternion for a UAV

1Preparatory School Oran, Lahn Laboratory, 31000 Oran, Algeria
2University of Sciences and Technology Oran MB, Lahn Laboratory, BP 1505, El M’naouer, 31000 Oran, Algeria
3Laboratoire d’Ingénierie des Systèmes de Versailles, UVSQ, 10-12 avenue de l’Europe, 78140, France

Received 27 July 2015; Revised 7 November 2015; Accepted 11 February 2016

Academic Editor: Qingling Zhang

Copyright © 2016 Kaddouri Djamel et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.


A hierarchical controller design based on nonlinear 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 of 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.

1. 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 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.

2. Problem Formulation

Let be the quaternion and the dynamic attitude system represented aswhere denotes the inertia matrix of the body and satisfies , , and is the angular velocity vector of the body in the body-fixed frame, is the control torque vector, and is the external disturbance vector. The attitude quaternion is defined by and the Euclidean norm , . If is the desired quaternion written in dynamic form as with , is the desired angular velocity. The quaternion error in multiplicative form isor

Then the derivative of the above equation giveswhich leads tothen, LetwithUsing 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 asfrom (9) one can write is skew-symmetric which satisfies the condition . From (11) we get is the cross product. Finallyusing the skew matrix we obtainLetthen (16) can be written asIn that case (18) can be written aswithtaking , 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 asand the matrix denotes a skew-symmetric matrix given by



So the system in hierarchical form based on (22) and (20) will be presented asThe performance specification in steady state must lead to the equilibrium pointThis 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.

3. 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 is the state vector, is the time variable, and 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

Let the cost function with constraint be presented as Withwhere , is a normed space. Here, is the space of continuous functions with continuous derivatives and is the space of continuous functions defined on . We consider a new function , , where is the space of differentiable functions and the vector is known as the costate vector. This new function allows us to move from solving an optimization problem with constraints to an optimization problem without constraints. Consider the cost function of the formWe 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 and a positive semidefinite matrix such that the subsystem can be represented in the form to . is the degree of differentiability of the system (; in our case), with the new variable defined asand the virtual backstepping controller 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 asdifferentiating (38) givesand for every , and thenSince the variable of differential depends essentially on the variable (actual virtual control) and (past virtual control), then one can introduce by analogy the variable in model (40). Let the model with the new variable controlwith the new variable control defined asChosing as with represents the step number. The for will be computed by using recurrence formula; hence the Hamiltonian function will be defined as replacing from (41) givesUsing the optimality conditions for control law leads tosince thenequaling (42) and (48) will give So the virtual control can now be computed:Equation (38) will help to extract the past from recurrence techniquereplacing from (50) givesusing (40) leads to then is evaluated:by recurrence isIntroducing the new computed variables in the Hamiltonian (45) will giveTaking the worst case for in linear form [18]:So (56) becomesApplying the optimality conditions from (58) leads toFor the final step is computed:Taking (47) and differentiating for and : comparing with (60) and (62) leads totaking thenfinally the Riccati equation before the final step will beLet us compute the Riccati equation for the final step using the computed value :replacing the value of from (48): then Finally the Riccati equation is formulated asand the equation of becomesthis will conclude the proof.

Step 1. The algorithm (hierarchical) for computing control law needs initialization. Let ; ; ; ; ; ; and taking the virtual control then the submodel will be Let the model with the new variable controlwith Taking the Hamiltonian will be for this caseapplying the optimality conditions:control law is deduced from Hamiltonian equation which reflects the control law (optimality condition): for ;differentiating (78) and comparing with (77) lead tothe Riccati equation becamewith being a symmetric matrix and being a diagonal matrix; then the control law is calculated asfinally the control law is computed:

Step 2. Taking the second submodelthe model presented in variable form isthis equation can be written:taking the worst case for withLet by recurrence the past is calculated:the Hamiltonian will beApplying the optimality conditions for and will giveknowing thatthen the control law is deduced from Hamiltonian equation (optimality condition):thenhence Similarly, Hence the Riccati equation is determined. is chosen to be a symmetric matrix. So the control law is in other way So replacing by its value the real control is finally computed:

4. Simulation Results

The parameters of the model are , the parameters of the controller are , , , and . Note the quaternion can be represented as , , and hence the initial location can be easily seen through .

Case 1. Let the initial condition of the quaternion error be , which corresponds to an angle ; the matrices and are computed through Riccati equation and is chosen to achieve good performances. For that case and will be stabilized to . 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.

Figure 1: Quaternion error (Case 1).
Figure 2: Angular velocity (Case 1).
Figure 3: Control input (Case 1).

Case 2. Taking an initial condition of the quaternion error , and , this case will give and simulation under closed loop control shows stabilization of to . This is confirmed by Figures 4, 5, and 6; this will emphasize the fact of which lies in the second quadrant.

Figure 4: Quaternion error (Case 2).
Figure 5: Angular velocity (Case 2).
Figure 6: Control input (Case 2).

5. 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.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.


  1. A. Barrera, Advances in Robot Navigation, InTech Publisher, 2011. View at Publisher · View at Google Scholar
  2. L. Fortuna, G. Muscato, and M. G. Xibilia, “Attitude feedforward neural controller in quaternion algebra,” Intelligent Automation and Soft Computing, vol. 5, no. 3, pp. 191–199, 1999. View at Publisher · View at Google Scholar · View at Scopus
  3. A. Tayebi and S. McGilvray, “Attitude stabilization of a four-rotor aerial robot,” in Proceedings of the 43rd IEEE Conference on Decision and Control (CDC '04), pp. 1216–1221, Paradise Island, Bahamas, December 2004. View at Scopus
  4. X. Wang, Y. Chen, G. Lu, and Y. Zhong, “Robust attitude tracking control of small-scale unmanned helicopter,” International Journal of Systems Science, vol. 46, no. 8, pp. 1472–1485, 2015. View at Publisher · View at Google Scholar · View at Scopus
  5. S. Zhao, W. Dong, and J. A. Farrell, “Quaternion-based trajectory tracking control of VTOL-UAVs using command filtered backstepping,” in Proceedings of the American Control Conference (ACC '13), pp. 1018–1023, IEEE, Washington, DC, USA, June 2013. View at Scopus
  6. E. Fresk and G. Nikolakopoulos, “Full quaternion based attitude control for a quadrotor,,” in Proceedings of the European Control Conference (ECC '13), Zurich, Switzerland, July 2013.
  7. A. Honglei, L. Jie, W. Jian, W. Jianwen, and M. Hongxu, “Backstepping-based inverse optimal attitude control of quadrotor: regular paper,” International Journal of Advanced Robotic Systems, vol. 10, article 223, 2013. View at Publisher · View at Google Scholar · View at Scopus
  8. H. Likun and W. Qingchao, “Direct Lyapunov-based control law design for spacecraft attitude maneuvers,” Progress in Natural Science, vol. 16, no. 11, pp. 1188–1192, 2006. View at Publisher · View at Google Scholar
  9. H. Sun, Z. Yang, and B. Meng, “Tracking control of a class of non-linear systems with applications to cruise control of air-breathing hypersonic vehicles,” International Journal of Control, vol. 88, no. 5, pp. 885–896, 2015. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet · View at Scopus
  10. S. Li, S. Ding, and Q. Li, “Global set stabilization of the spacecraft attitude control problem based on quaternion,” International Journal of Robust and Nonlinear Control, vol. 20, no. 1, pp. 84–105, 2010. View at Publisher · View at Google Scholar
  11. S. M. Joshi, A. G. Kelkar, and J. T.-Y. Wen, “Robust attitude stabilization of spacecraft using nonlinear quaternion feedback,” IEEE Transactions on Automatic Control, vol. 40, no. 10, pp. 1800–1803, 1995. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus
  12. M. Kerma, A. Mokhtari, B. Abdelaziz, and Y. Orlov, “Nonlinear H control of a quadrotor (UAV), using high order sliding mode disturbance estimator,” International Journal of Control, vol. 85, no. 12, pp. 1876–1885, 2012. View at Publisher · View at Google Scholar
  13. J. T.-Y. Wen and K. Kreutz-Delgado, “The attitude control problem,” IEEE Transactions on Automatic Control, vol. 36, no. 10, pp. 1148–1162, 1991. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus
  14. M. G. O. Guilherme, V. Raffo, and F. R. Rubio, “Backstepping/nonlinear H control for path tracking of a quadrotor, unmanned aerial vehicle,” in Proceedings of the American Control Conference, Seattle, Wash, USA, June 2008. View at Publisher · View at Google Scholar
  15. M. D. Shuster, “A survey of attitude representations,” American Astronautical Society, vol. 41, no. 4, pp. 439–517, 1993. View at Google Scholar · View at MathSciNet
  16. P. Hughes, Spacecraft Attitude Dynamics, John Wiley & Sons, New York, NY, USA, 1986.
  17. Y. Park, “Robust and optimal attitude stabilization of spacecraft with external disturbances,” Aerospace Science and Technology, vol. 9, no. 3, pp. 253–259, 2005. View at Publisher · View at Google Scholar · View at Scopus
  18. Y. S. Qiang Lu and S. Mei, Nonlinear Control Systems and Power System Dynamics, edited by: Kluwer Academic Publishers, Springer, 2001.