Inverse kinematic of robot is used to convert outputs of the outer loop to inputs ...... C S S. S S. C S C. S C. C C. S S S. C S. S S C θ Ï Î¸ Ï Ï Î¸ Ï Ï Î¸ Ï Î¸ Ï Ï Î¸ Ï.
58 International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012
Modeling and Adaptive Tracking Control of a Quadrotor UAV Mostafa Mohammadi, Department of Electrical Engineering, Iran University, Tehran, Iran Alireza Mohammad Shahri, Department of Electrical Engineering, Iran University of Science and Technology, Tehran, Iran Zahra Boroujeni, Department of Electrical Engineering, Iran University, Tehran, Iran
ABSTRACT The dynamics of UAV’s have special features that can complicate the process of designing a trajectory tracking controller. In this paper, after modelling the quadrotor as a VTOL UAV, a nonlinear adaptive controller is designed to solve trajectory tracking problem in the presence of parametric and nonparametric uncertainties. This controller doesn’t need knowing any physical parameters of the quadrotor, and there isn’t need to retune the controller for various payloads. In this approach, the control of a quadrotor is performed by using decentralized adaptive controllers in the inner (attitude control) and outer (translational movement control) loops. The outer loop generates the instantaneous desired angles for inner loop. The inner loop stabilizes the orientation of the vehicle. Inverse kinematic of robot is used to convert outputs of the outer loop to inputs of the inner loop. The controller needs some unknown physical parameter to generate control signals. A robust parameter identiier estimates the required parameters for the outer control loops. Simulations are carried out to illustrate the robustness and tracking performance of the controllers. Keywords:
Adaptive Control, Dynamic Model, Quadrotor, Trajectory Tracking, Unmanned Aerial Vehicle (UAV)
INTRODUCTION Unmanned aerial vehicles (UAV’s) have received great attention in both military and civilian domains in recent decades. These kinds of vehicles are used in many applications such as search and rescue operations, surveillance and photography. Quadrotor is one of new drones, which has four independent rotors. Controlling a quadrotor is performed by proper velocity
control of each rotor. High maneuverability is one of the most interesting features of the quadrotor. It is essential to model UAV in order to control it. The dynamics of UAV’s have special features that complicate the process of designing a tracking controller. Unknown nonlinearities, strong coupling between subsystems, unknown physical parameters, nonparametric uncertainties in inputs and external disturbances such
DOI: 10.4018/ijimr.2012100105 Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012 59
as wind gust are some of the basic difficulties associated with the control of such systems. Therefore, an advanced control strategy is required to achieve good performance of the controller. Many researchers have solved the trajectory tracking problem for UAV’s in different ways. Das, Lewis, and Subbaro (2009) used backstepping approach for controlling a UAV. In this study aerodynamic forces and moments are estimated by neural networks as a method for handling unknown nonlinearities. A nonlinear adaptive controller for the quadrotor was proposed in Madani and Benallegue (2008). This controller which is based on backstepping technique is combined with neural networks. Huang, Xian, Diao, Yang, and Feng (2010) presented a backstepping based techniques to design a nonlinear adaptive controller which can compensate for the mass uncertainty of the vehicle. Michini and How (2009) developed an L1 adaptive output feedback control design process. This controller has robustness to time delay and actuators failure. However, only linear methods are applied in this paper. In Dierks and Jagannathan (2010), output feedback control of a quadrotor UAV using neural networks is performed. Nicol, Macnab, and Ramirez-Serrano (2011) proposed a new adaptive neural network control to stabilize a quadrotor helicopter against modeling error and considerable wind disturbance. The new method is compared to both dead zone and emodification adaptive techniques. Roberts and Tayebi (2011) presented an adaptive positiontracking control scheme is proposed for a UAV for a set of bounded external disturbances. Raffo, Ortega, and Rubio (2010) used an integral predictive and nonlinear robust control strategy to solve the path following problem for a quadrotor. Aerodynamic disturbances and parametric uncertainties are considered in this paper. In Mhammed and Hicham (2009) a high gain observer and sliding mode controller is designed which allows on-line estimation of the roll and pitch angles as well as all the linear
and angular velocities of the vehicle. Under the restriction that only the inertial coordinates and yaw angle are available for measurement. Das, Lewis, and Subbaro (2009) apply dynamic inversion to the inner loops, which yields internal dynamics that are not necessarily stable. Instead of redesigning the output control variables to guarantee stability of the internal dynamics, a robust control approach is used to stabilize the internal dynamics. In Lee, Kim, and Sastry (2009) two types of nonlinear controllers for an autonomous Quadrotor helicopter are presented. A feedback linearization controller, which involves high-order derivative terms, and the second type involves a new approach to an adaptive sliding mode controller using input augmentation. In Benallegue, Mokhtari, and Fridman (2008) a feedback linearization based controller with a high-order sliding mode observer running parallel is applied to a VTOL unmanned aerial vehicle. Zhang, Quan, and Cai (2011) discussed the attitude control of a quadrotor aircraft subject to a time varying and non-vanished disturbances and stabilized using a feedback controller with a sliding mode term. Efe (2011) presented different control architectures; a robust control scheme that can alleviate disturbances. A Proportional Integral and Derivative (PID) type controller with noninteger order derivative and integration is proposed as a remedy. A neural network is used to train to provide the coefficients. Zemalache and Maaref (2009) applied a fuzzy controller based on on-line optimization of a zero order Takagi–Sugeno fuzzy inference system, which is tuned by a back propagationlike algorithm, for a drone. It is used to minimize a cost that prevents an excessive growth of parameters. In this paper some uncertainties are considered. Orsag, Poropat, and Bogdan (2010) used an innovative method to solve the quadrotor control problem, which is based on a discrete automaton. This automaton combines classical PID and more sophisticated LQ controllers to create a hybrid control system. Fahimi and Saffarian (2011) presented an innovative
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
60 International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012
approach that uses the spatial three-dimensional coordinates of a point on the helicopter’s local coordinate frame other than its centre of gravity, called the control point, and the helicopter’s yaw angle as four control outputs. With this choice of control outputs, the helicopter’s input–output model becomes a square control system. Vision based control of UAVs is discussed in Guenard, Hamel, and Mahony (2008); Mahony, Corke, and Hamel (2008); Bourquardez, Mahony, Guenard, Chaumette, Hamel, and Eck (2009); García Carrillo, Rondon, Sanchez, Dzul, and Lozano (2011) and Eberli, Scaramuzza, Weiss, and Siegwart (2011). In Tarhan and Altug (2011), catadioptric systems in UAVs to estimate vehicle attitude using parallel lines that exist on many structures in an urban environment was used. In order to increase the estimation and control speed an Extended Kalman Filter (EKF) was used. Most of these control schemes don’t consider parametric and nonparametric uncertainties in their models. In addition most of them were ignoring important practical issues such as dynamics of actuators and battery discharging during flight time. It is important also to note that he quadrotor structure and its mass are constant but quadrotor payload can change in every mission. Therefore, mass properties of quadrotor are changing and a time-invariant feedback control could not provide a satisfying performance. The contribution of this paper is to describe a clear, comprehensive and step by step modelling procedure. On the other hand a controller of proper structure having a feasible attitude control inner loop and a practical position control outer loop is designed. This uses inverse kinematic instead of small angle approximation to achieve better accuracy. An online robust parameter estimation to cope with parametric uncertainty is the explicit part of this controller. The proposed non-linear adaptive controller doesn’t depend on the physical parameter of the
UAV such as mass or moment of inertia tensor. Furthermore the proposed controller works well with various payloads. Also in designing this controller both of the parametric and nonparametric uncertainties are considered. In this paper the general dynamics of VTOL UAV’s is obtained by Lagrange-Euler formalism. These dynamic equations are specified for a quadrotor UAV configuration. Then an adaptive controller is designed to solve trajectory tracking problem in the presence of all mentioned problems. In this approach the control of the UAV is performed in two inner and outer control loops. The outer control loop, which controls the translational movements, generates the instantaneous desired angles as a reference trajectory to an inner control loop. In addition, translational forces are produced in the outer loop. The inner loop as attitude control stabilizes the orientation of the vehicle according to the desired angles which are generated by an outer loop. Decentralized adaptive controllers are used in both inner and outer control loops to cope with uncertain dynamics of the system. Inverse kinematics of the robot is used to convert outputs of the outer loop to inputs of the inner loop. Controller needs some physical parameters of UAV, like total mass, to generate appropriate control signals. A robust parameter identifier estimates the required parameters for the controller. Finally, the proposed controller is developed for the quadrotor and simulations are carried out to illustrate the robustness and tracking performance of the controller. Comparing with the other adaptive controllers that used to trajectory tracking control of the quadrotor, which most of them are based on the backstepping technique and neural networks, the proposed controller unlike backstepping based controllers has a simple and clear structure, and unlike neural network based controllers doesn’t need training. It is important to note that the training a neural network in order to identify a non-linear multi-input multi-output system such
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012 61
as quadrotor is not easy at all. The suggested decentralized adaptive controller doesn’t need to a high speed microprocessor as a control unit because it is not a high computing controller. The reminder of the paper presents the general model of a UAV, as well as a quadrotor is introduced as rotary wing UAV. Next the control strategy and decentralized adaptive controller is described. Simulation results are presented in next. Finally, the major conclusions of the paper are provided.
UAV MODELLING Having mathematical dynamic model of a vehicle is essential for designing a good controller. Nevertheless a UAV model always includes some uncertainties. As the model becomes simpler the controller becomes more complicated. A model with more details leads to a more efficient controller. But modelling with all details is an expensive task and needs the special apparatus such as a wind tunnel and hardware in the loop (HIL) facilities. UAV modelling procedure includes the following steps: • • • •
Determining the dynamic equations of the vehicle; Determining the structure of uncertain dynamics; Determining the relationship between control inputs and outputs of the actuators for a specified UAV; Determining the actuators dynamics.
Dynamics Equation of Rigid Body For obtaining the dynamic equations of 6DOF rigid body, two frames should be defined. The inertial frame and the body frame. Let B = {B1, B2, B3} be the body fixed frame and E = {Ex, Ey, Ez} be the inertial frame. The inertial frame is considered fixed with respect to the Earth (Figure 1).
The vector ξ = [ x, y, z]T is the position of UAV in inertial frame and the vector η = [φ, θ, ψ ]T is the orientation of body frame with respect to a fixed frame, and referred to as Euler angles. These angles are bounded as follows: roll :−π < φ < π 2 2 pitch :−π < θ < π 2 2 yaw : −π < ψ < π
(1)
The dynamics equations of motion can be obtained by the Lagrange-Euler formulation as follows: H (η) η + C (η, η ) η = τ η 0 m ξ + mg 0 = fξ E z
(2)
The derivation procedure of the dynamic model (2) is provided in Appendix A.
Structure of Uncertain Dynamics Let us consider and determine the structure of uncertain dynamics. Some of uncertain dynamics are as follows: Aerodynamic moments and forces: these are produced by movement of the body in the air. These moments and forces completely depend on air density and angular and linear velocity of the body. These moments and forces haven’t certain form, thus we represent those by 3×1 vectors A η (η ) and A ξ (ξ ) (Bouabdallah, 2007). Friction forces: produced by body movement in the air, those depend on the area of body that is in contact with the air and veloc-
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
62 International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012
Figure 1. Inertial and body frames of rigid body
ity of movement. So we can represent them by a 3×1 vector Fξ (ξ ) . Now we can express all uncertain forces and moments in unit term. τ uncertain (η ) = A η (η ) Funcertain (ξ ) = A ξ (ξ ) + Fξ (ξ )
(3)
Therefore, dynamic equations of UAV are as follows: 0 m ξ + mg 0 = fξ + Funcertain (ξ ) E z + C (η, η ) η = τ η + τ uncertain (η ) H (η) η
Determining the Relationship between Control Inputs and Actuators Outputs for Quadrotor Helicopter As a propeller rotates in the air, it produces a force (thrust) and a moment (drag). Thrust and drag are denoted by T and D. The direction of drag is the opposite of rotation’s direction. In hover condition both of these are proportional by square of rotational speed. T = KT Ω2 D = KD Ω2
(4)
(5)
where KT > 0 and KD > 0 are thrust and drag coefficients, respectively, and Ω is rotational speed of the propeller.
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012 63
Quadrotor is a UAV configuration with four independent rotors operated by proper velocity control of each rotor. We denote the force produced by rotors by T1, T2, T3, and T4. Moments produced by rotors are denoted by D1, D2, D3, and D4. Since propellers 1 and 3 rotate in the opposite direction of propellers 2 and 4, then the signs of D1 and D3 are opposite to the signs of D2 and D4 (Figure 2). Quadrotor has six degrees of freedom like other UAVs. Since the number of actuators is less than the degrees of freedom we could not control all degrees of freedom simultaneously. These kinds of systems are called underactuated mechanical systems. When all rotors have the same rotational speed, and the lift force is equal to the weight of the vehicle, then quadrotor has a fixed and stable attitude. In this condition the orientation of the body frame with respect to the inertial frame is fixed, and the quadrotor is in the hov-
ering mode. In order to change the altitude of quadrotor we must change the lift force which is defined by: 4
U = ∑Ti
(6)
i=1
Longitudinal movements are achieved by a change in the roll angle, and a change in the roll angle is taken place whenever T1 and T3 are not equal. So for controlling the longitudinal movements we must control the roll angle. We define the roll control input as follow: τφ = l (−T1 + T3 )
(7)
where l is the distance between the center of the rotor to the center of the vehicle (Figure 2).
Figure 2. Quadrotor helicopter scheme
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
64 International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012
Lateral movements are achieved by a change in the pitch angle. The pitch angle is changed whenever T2 and T4 are not equal. Thus for controlling the lateral movements we must control the pitch angle. We define the pitch control input as follow: τ θ = l (−T2 + T4 )
(8)
Yaw movement is the rotation about B3 direction. This movement is achieved by a change in the sum of D1, D2, D3 and D4. It must be noted that the signs of D1 and D3 are opposite the signs of D2 and D4, thus we define yaw moment as follows: τ ψ = D1 + D2 + D3 + D4
(9)
From (2) and (12), fξ can be expressed as follows: (SψSφ + CψSθCφ) U m U fξ = (−CψSφ + SψSθCφ) m U (CθCφ) m
0 Ixx 0 I = 0 Iyy 0 0 Izz 0
(10)
(11)
The final step for specifying the quadrotor model from the general form of a UAV model (2) is determining H (η) and C (η, η ) matrices.
(12)
Actuators Dynamics Due to high power and low weight and fast response, a brushless DC motor (BLDC) is the common type of actuator that is used in commercial UAV. These types of actuators are usually modeled by experimental methods. BLDC motor, its driver and propeller are considered as a unique system. The speed response of this unit can be modeled as a linear system, which has a second order transfer function: G ( s) =
Further, τ η can be expressed as follows: l (−T1 + T3) τφ τ η = l (−T2 + T4) = τ θ D1 + D2 + D3 + D4 τ ψ
A quadrotor usually has a symmetric structure, so its moment of inertia tensor can be assumed in diagonal form.
ω2n s2 + 2ςωn s + ω2n
(13)
where ωn and ς are natural frequency and damping ratio respectively.
CONTROLLER DESIGN To achieve a good trajectory tracking for a quadrotor helicopter, the following steps are necessary. Firstly a trajectory generator provides a reference trajectory for the position. Then, according to the difference between reference trajectory and the path travelled by UAV the position control signals are generated by a decentralized adaptive controller. Inverse kinematics of robot is used to convert outputs of the outer loops to inputs of the inner loops. The outputs of the inverse kinematics block are U,
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012 65
desired roll angle, and desired pitch angle. The controller needs some physical parameters of UAV e.g., total mass, to generate appropriate control signals. A parameter identifier estimates the required parameters for the inverse kinematics equations. A leakage modification is applied to the parameter identifier to increase its robustness against disturbances and uncertain dynamics. Inner control loops stabilize the attitude of UAV. Each of inner control loops is a decentralized adaptive controller. The outputs of inner control loops are elements of τ η . Finally, control signals are converted to speed of rotors. The overall scheme of the control strategy is depicted in Figure 3.
x d (t) = x di + a1x t + a 2 x t2 +a 3 x t3 + a 4 x t4 + a 5 x t5
The initial and final velocities and accelerations are zero; therefore two consecutive differentiation provides the following equation: a 1 t f 3x a = 3 4 t 4x f a t 6 12 5 x f
final position [ x df , y df , zdf ] in a specified time tf such that the jerk (rate of change of the acceleration) is minimized over the time horizon. This trajectory ensures that the velocities and accelerations at the end point are zero. Assuming:
t2f 5t2f 20t2f
−1
d x 0 0
(15)
where
Reference Trajectory Generator It is required for the UAV to fly from a prescribed initial position [ x di , y di , zdi ] to a prescribed
(14)
dx =
(x df − x di ) tf3
(16)
Thus, the desired trajectory for the x direction is given by x d (t) = x di + a 3 x t3 + a 4 x t4 + a 5 x t5
(17)
Figure 3. UAV control scheme
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
66 International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012
The reference trajectories for the y and z directions are given by similar relationships (Spong, Hutchinson, & Vidyasagar 2006).
(20) is composed of three components, namely:
Decentralized Adaptive Control
i.
Consider the dynamic equations of a UAV as: 0 m ξ + mg 0 − Funcertain (ξ ) = fξ E z + C (η, η ) η − τ uncertain (η ) = τ η H (η) η
ii. Theterm (K0 i (t)ei (t) + K1i (t)e i (t)) which is due to the adaptive feedback controller with adjustable gains K0 i (t) and K1i (t) , that acting on defined errors; ..
(18)
By matrix multiplication the dynamic model of the quadrotor can be rewritten as: m ξ + d (ξ, ξ, ξ) = f i Ti ξ H ii η i + di (η, η , η ) = τ · i
i = 1, 2, 3 (19)
In the proposed decentralized control scheme which is motivated from (Seraji, 1989), an independent controller is designed for each channel of (19). The control laws considered in this section are restricted to be decentralized, that is, each local controller operates solely on its own subsystem with no exchange of information between the subsystems. The adaptive independent controllers dedicated to ηi and ξi are described by:
The term f (t) which is an auxiliary signal synthesized by the adaptation scheme to improve the tracking performance and partly compensating for the di and dTi ;
fξ i (t) = fTi (t)
iii. The term q ξdi which is contributed by the adaptive acceleration feed forward controller with the adjustable gains q operating ..
on the desired acceleration ξdi . The following Theorem provides the controller adaptation laws for tracking the desired trajectory that is produced by the outer loops. Theorem 1: Consider the UAV dynamic equation (19) and adaptive control low (20), the controller adaptation laws which ensure asymptotic trajectory tracking are based on the weighted error ri (t) as follows: . ri (t) = Wpi ei (t) + Wvi ei (t) . rTi (t) = WTpi eTi (t) + WTvi eTi (t)
(21)
..
+ (KT 0 i (t)eTi (t) + KT1i (t)e Ti (t)) + q ξdi Ä· i (t) = fi (t)
(
)
+ K0 i (t) ei (t) + K1i (t) e i (t)
(20)
i = 1, 2, 3 where ei = ηri − ηi is the orientation error. eTi = ξri − ξi is the position error. ξri and ηri are the desired trajectories. The control law
Auxiliary signal t fi (t) = fi (0) + δ i ∫ ri (t)dt + ρi ri (t) 0 t fTi (t) = fTi (0) + δ Ti ∫ rTi (t)dt + ρTi rTi (t) 0 (22) Feedback gains
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012 67
t Kij (t) = Kij (0) + α ij ∫ ri 0 ( j) ( j) (t)ei (t)dt + βijri (t) ei (t) t KTij (t) = KTij (0) + α Tij ∫ rTi 0 ( j) ( j) (t)eTi dt + βTijrTi (t) eTi (t ) j = 0, 1
(23)
(SψSφ + CψSθCφ) U m fξ x U fξ = (−CψSφ + SψSθCφ) = fξ y m fξ z U CθCφ) ( m
Feedforward gain t
q i (t) = q i (0) + γ i ∫ rTi
(24)
0 ..
..
(t) ξdi (t)dt + λ i rTi (t) ξdi (t) ( j)
where in ei
(t) , the superscript “(j)” denotes
the jth derivative. {δi , α ij , δTi , α Tij, γ }
trollers as desired trajectories (Figure 3). Calculating translational forces and desired angles is performed by using inverse kinematics. Substituting fξ that is obtained from equation 20 in equation 10 yields:
are any posi
tive scalar integral adaptation gains, {ρi , βij , ρTi , βTij, λ} are zero or any positive proportional adaptation gains, and {Wpi , Wvi , WTpi , WTvi } are positive scalar weighting factors. ri (t) and rTi (t) are used to tuning the controller. If the response is slow, Wpi and WTpi must increase. If more stable response is required, Wvi and WTvi must increase. Proof: The Theorem is proven in Appendix B using an improved Lyapunov-based Model Reference Adaptive Control (MRAC) technique.
Inverse Kinematic fξ which is given in (20) must be converted to the instantaneous desired angles and translational forces. Translational forces are commanded to the UAV actuators directly and the desired angles are given to the rotational con-
(25)
For solving these equations we assumed that there are no uncertain dynamics or disturbances. Solving equation (25) gives: U = m fξ x 2 + fξ y2 + fξ z2 f Cψ + f Sψ ξx ξy (26) θ = Atan fξ z f Sψ − fξ y Cψ φ = Atan( ξ x cos(θ)) fξ z
Parameter Estimation
As it is clear in (26), calculating U needs the value of total mass of the vehicle, m. However, we assumed that the value of m and other vehicle mass parameters such as momentum of inertia are unknown. In order to determine m, consider the third row of (18) as: z + g =
1 cos (θ) cos (φ) U1 + µ m
(
)
(27)
If we define new variables as follow: Z = z + g 1 Θ* = m ϕ = cos (θ) cos (φ) U 1 µ = F ξ + κ uncertainz ( )
(
)
(28)
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
68 International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012
where µ is a nonparametric bounded uncertainty, that consists of third element of Funcertain (ξ ) and the output disturbances. Assuming κ as a bounded disturbance, we can redefine (27) as follow: *
Z = Θ ϕ+µ
(29)
Then Θ* can be estimated as Θ by the following differential equation: = γϕε − γωΘ Θ
(30)
where ε is a filtered error signal, which is given by (31), and γ is positive constant that determines the speed of convergence. (31)
ε = Z − Θϕ
Various choices of the leakage term ω(t) are available. The common choice for ω(t) is a positive constant: ω (t) = σ,
∀ t≥0
(32)
where σ is a small positive design parameter. This method is referred to as the σ modification or leakage modification. It is proven that if U is a Persistence Exciting signal, Θ will converge to its true value Θ* . Also convergence of this adaption law has been proven in Ioannou and Sun (1996).
step of 1 millisecond. The UAV parameters are chosen based on a real world aerial robot. Physical parameters of UAV are listed in Table 1. Initial control parameters of inner control loops are determined as follows: Wp = diag(10, 10, 10) , Wv = diag(1, 1, 1) f (0) = [0, 0, 0] , δ = [1, 1, 1] , ρ = [1, 1, 1] Ki 0 (0) = [5, 5, 5], Ki1 (0) = [1, 1, 0.4 ] α i1 = [5, 5, 5]α i2 = [1, 1, 1], βi1 = [1, 1, 1] , βi2 = [1, 1, 1] Initial control parameters of outer control loops are determined as follows: WTp = diag(7, 7, 4) , WTv = diag(0.7, 0.7,.3) fT (0) = [0, 0, 9.81] , δ T = [1, 1, 1] , ρT = [1, 1, 1] KTi0 (0) = 11, 11, 5.5 , KTi1 (0) = 0.5, 0.5, 0.5 α Ti1 = [2, 2, 2], α Ti2 = [1, 1, 1], βTi1 = [1, 1, 1] , βTi2 = [1, 1, 1] q (0) = [1, 1, 1] , γ = [1, 1, 1] , λ = [1, 1, 1] The following persistent light gusts of wind are considered as external disturbances on the aerodynamic forces and moments: τφ = 1.4 Nmint = 3s ; τ θ = 1.4 Nmint = 4s ;
SIMULATION RESULTS
τ ψ = 1.4 Nmint = 5s ;
In this section, computational analysis and computer simulations are performed to validate the tracking performance and the robustness of the proposed controllers in the presence of parametric and nonparametric uncertainties. All simulations are carried out with a fixed time
and Fz = 2N in t = 8s .
Fx = 2 N in t = 6s ; Fy = 2 N in t = 7 s
Maximum control torque in any rotational axis is 2 N.m. Rotational external disturbance is 1.4N.m, which is directly applied to the system.
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012 69
Table 1. Values of quadrotor physical parameters Unit Kg
Value
Parameter
1
m
2
0.5
Ixx
Kg.m2
0.5
Iyy
Kg.m Kg.m
0.85
Izz
M
0.24
l
N.m.s2
1.1×10-6
N.s
54.2×10
2
2
rotational external disturbance MaximumControl torqueana xis momentumof inertiaod axis 1.4 = ≈ 35% 2 / (0.5)
KD -6
KT
the vehicle dynamics that is not considered in the dynamic model of the quadrotor, with the following values: Funcertain (ξ) = K Faero x 2 y 2 z 2 and T 2 2 2 τuncertain (η ) = K τaero φ θ ψ T
Therefore the rotational external disturbance is equal to 35 per cent of the maximum applied torque. The maximum control force is 22 N, and translational external disturbances are 2 N in each axis. Sumof translational external disturbance MaximumControl o force (2 + 2 + 2) = ≈ 27% 22 Therefore the translational external disturbance is equal to 27 per cent of the maximum applied force. For simulation purposes, UAV is supposed to fly from the pre-specified initial position ξd0 to pre-specified final position ξdf in a specified time tf. In this case we set ξd0 = [0, 0, 0] , ξdf = [5, 5, 5] and tf =10s. We assume that the UAV’s initial position has a large error, which is equal to 4 percent of all displacement, i.e., ξ0 = [0.2, 0.2, 0.2] and set ψ d = 0 . Furthermore, the controller is tested in the presence of nonparametric uncertainty. We assume that there are forces and torques in
where
K Faero = diag(.25,.25,.25)
and
K τaero = diag(0.75, 0.75, 0.75) . Figure 4 shows the desired and actual positions for this scenario. As it clear from the Figure 4 that the controllers have rejected disturbances effectively and the system is robust in the presence of uncertain dynamics. It can be observed that the final error of position is zero. It can be seen that starting from an initial position far from the reference, the proposed control strategy is able to make the vehicle follow the reference trajectory. Figure 5 shows the reference and actual attitudes. These reference attitudes generated by the inverse kinematics block at the end of outer control loops. According to the results shown in Figure 5, it can be concluded that the rotational controllers has good performance in disturbance rejection, and drive the system to the stable position in a short time. Steady state errors are caused due to existence of external disturbances, which are not considered in inverse
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
70 International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012
kinematic calculation. Thus, the reference trajectory angles for inner loops are generated imperfectly. Furthermore, it can be seen that the controller eliminate interactions effectively, so that disturbance in each channel causes to change the control signal of the same channel. These results show that control strategy
provides a robust path following in the presence of parametric and nonparametric uncertainties when sustained disturbances are applied to the system. Figure 6 shows the control signals U, produced by translational controllers, and U2,
Figure 4. Three position commands
Figure 5. Three orientation commands
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012 71
Figure 6. Control signals
U3, U4, the moments, which are calculated by inner controllers. Control signals are limited (0 to 22 N for forces and -2 to 2 N.m for torques) and pass through a slew rate limiter (100 N per second for force and 10 N.m per second for torques) such that the control signals are completely feasible. As it is shown in Figure 6, control signals stabilize the system and provide good trajectory tracking.
easy to implement. The main drawback of this method is that uncertainty in control input and measurement noise are not considered. Future work will involve the implementation of the control strategy in a real quadrotor.
CONCLUSION
Benallegue, A., Mokhtari, A., & Fridman, L. (2008). High-order sliding-mode observer for a quadrotor UAV. International Journal of Robust and Nonlinear Control, 18(4-5), 427–440. doi:10.1002/rnc.1225
The general form of the dynamic model of an UAV is presented. A decentralized tracking controller has been designed based on model reference adaptive control for the UAV. The control strategy has been split into two stages. Outer position control loops and inner dynamic attitude control loop. The computational analysis and simulation results show that the designed controllers are not dependent on physical parameter. Furthermore, the controllers are robust, and have a good performance in trajectory tracking in the presence of parametric and nonparametric uncertainties. These controllers are also able to reject sustained disturbances. The controllers were designed purposefully to be
REFERENCES Asada, H., & Slotine, J. (1986). Robot analysis and control. New York, NY: John Wiley & Sons.
Bouabdallah, S. (2007). Design and control of quadrotor with application to autonomous flying (Unpublished doctoral dissertation). EPFL University, Lausanne, Switzerland. Bourquardez, O., Mahony, R., Guenard, N., Chaumette, F., Hamel, T., & Eck, L. (2009). Image-based visual servo control of the translation kinematics of a quadrotor aerial vehicle. IEEE Transactions on Robotics, 25(3), 743–749. doi:10.1109/ TRO.2008.2011419 Das, A., Lewis, F., & Subbaro, K. (2009). Backstepping approach for controlling a quadrotor using lagrange form dynamics. Journal of Intelligent & Robotic Systems, 56(1-2), 127–151. doi:10.1007/ s10846-009-9331-0
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
72 International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012
Das, A., Lewis, F., & Subbaro, K. (2009). Dynamic inversion with zero-dynamics stabilisation for quadrotor control. IET Control Theory Application, 3, 303–314. doi:10.1049/iet-cta:20080002 Dierks, T., & Jagannathan, S. (2010). Output feedback control of a quadrotor UAV using neural networks. IEEE Transactions on Neural Networks, 21(1), 50–66. doi:10.1109/TNN.2009.2034145 Eberli, D., Scaramuzza, D., Weiss, S., & Siegwart, R. (2011). Vision based position control for MAVs using one single circular landmark. Journal of Intelligent & Robotic Systems, 61(1-4), 495–512. doi:10.1007/ s10846-010-9494-8 Efe, M. Ö. (2011). Neural network assisted computationally simple PID control of a quadrotor UAV. IEEE Transactions on Industrial Informatics, 7(2), 354–361. doi:10.1109/TII.2011.2123906 Fahimi, F., & Saffarian, M. (2011). The control point concept for nonlinear trajectory-tracking control of autonomous helicopters with fly-bar. International Journal of Control, 84(2), 242–252. doi:10.1080/0 0207179.2010.549842 García Carrillo, L. R., Rondon, E., Sanchez, A., Dzul, A., & Lozano, R. (2011). Stabilization and trajectory tracking of a quadrotor using vision. Journal of Intelligent & Robotic Systems, 61(1-4), 103–118. doi:10.1007/s10846-010-9472-1 Guenard, N., Hamel, T., & Mahony, R. (2008). A practical visual servo control for an unmanned aerial vehicle. IEEE Transactions on Robotics, 24(2), 331–340. doi:10.1109/TRO.2008.916666 Huang, M., Xian, B., Diao, C., Yang, K., & Feng, Y. (2010). Adaptive tracking control of underactuated quadrotor unmanned aerial vehicles via backstepping. In Proceedings of the American Control Conference, Baltimore, MD (pp. 2076-2081). Ioannou, P., & Sun, J. (1996). Robust adaptive control (pp. 555–565). Upper Saddle River, NJ: Prentice Hall. Lee, D., Kim, H., & Sastry, S. (2009). Feedback linearization vs. adaptive sliding mode control for a quadrotor helicopter. International Journal of Control. Automation and Systems, 7(3), 419–428. doi:10.1007/s12555-009-0311-8 Madani, T., & Benallegue, A. (2008). Adaptive control via backstepping technique and neural networks of a quadrotor helicopter. In Proceedings of the 17th World Congress The International Federation of Automatic Control, Seoul, Korea (pp. 6513-6518).
Mahony, R., Corke, P., & Hamel, T. (2008). Dynamic image-based visual servo control using centroid and optic flow features. Journal of Dynamic Systems, Measurement, and Control, 130, 35–46. doi:10.1115/1.2807085 Mhammed, G., & Hicham, M. (2009). A high gain observer and sliding mode controller for an autonomous quadrotor helicopter. International Journal of Intelligent Control and Systems, 14(3), 204–212. Michini, B., & How, J. (2009). L1 adaptive control for indoor autonomous vehicles: Design process and flight testing. In Proceedings of the AIAA Guidance, Navigation, and Control Conference, Chicago, IL (pp. 5754-5768). Nicol, C., Macnab, C. J. B., & Ramirez-Serrano, A. (2011). Robust adaptive control of a quadrotor helicopter. Journal of Mechatronics, 21(6), 927–938. doi:10.1016/j.mechatronics.2011.02.007 Orsag, M., Poropat, M., & Bogdan, S. (2010). Hybrid fly-by-wire quadrotor controller. Automatika (Zagreb), 51(1), 19–32. Raffo, G., Ortega, M., & Rubio, F. (2010). An integral predictive/nonlinear control structure for a quadrotor helicopter. Automatica, 46, 29–39. doi:10.1016/j. automatica.2009.10.018 Roberts, A., & Tayebi, A. (2011). Adaptive position tracking of VTOL UAVs. IEEE Transactions on Robotics, 27(1), 129–142. doi:10.1109/ TRO.2010.2092870 Seraji, H. (1989). Decentralized adaptive control of manipulators: Theory, simulation, and experimentation. IEEE Transactions on Robotics and Automation, 5(2), 183–201. doi:10.1109/70.88039 Spong, M., Hutchinson, M., & Vidyasagar, M. (2006). Robot modeling and control (pp. 149–186). New York, NY: John Wiley & Sons. Tarhan, M., & Altug, E. (2011). EKF based attitude estimation and stabilization of a quadrotor UAV using vanishing points in catadioptric images. Journal of Intelligent & Robotic Systems, 62(3-4), 587–607. doi:10.1007/s10846-010-9459-y Zemalache, K., & Maaref, H. (2009). Controlling a drone: Comparison between a based model method and a fuzzy inference system. Applied Soft Computing, 9, 553–562. doi:10.1016/j.asoc.2008.08.007 Zhang, R., Quan, Q., & Cai, K.-Y. (2011). Attitude control of a quadrotor aircraft subject to a class of time-varying disturbances. IET Control Theory Application, 5(9), 1140–1146. doi:10.1049/ietcta.2010.0273
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012 73
Mostafa Mohammadi was born in Sardasht, Iran in 1986. He received a BS and MSc in 2008 and 2011 in Control Engineering in IUST. His research interests are: Nonlinear and adaptive control, System identification, Adaptive control, aerial robots, Mobile Robots, and Mechatronic systems. Alireza Mohammad Shahri received a BS degree in Electrical engineering from K.N.Toosi University of Technology, Iran in 1985. He then received his MEng and PhD degrees in Electrical Engineering from University of Wollongong, Australia in 1994 and 1998, respectively. His research interests are: Instrumentation and measurement systems, Industrial computer networks, Mobile Robots, and Mechatronic systems. Dr. Shahri is currently Faculty Member at the department of Electrical Engineering at Iran University of Science & Technology. Zahra Boroujeni was born in Tehran, Iran in 1989. She received a B.S. degree in Electrical engineering (control) from Iran university science and technology, Tehran (IUST) in 2010. Now she is student of MSc Control Engineering in IUST. Her research interests are: Nonlinear control; System identification; Adaptive control; Robotic; Mechatronic. She is currently working on surgery robots.
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
74 International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012
APPENDIX A Derivation Procedure of the Dynamic Model The rotation matrix from B to E, is R θ , which is obtained by post-multiplying the three basic rotation matrices in the following order: Rotation about the Ez axis of the angle ψ (yaw), Rotation about the New y axis of the angle θ (pitch), and Rotation about the resultant x axis of the angle φ (roll). R θ is given by (34). Let V B be the translational velocity vector in body fixed frame. The relationship between the derivatives of ξ and V B is as follows: ξ = R θ V B
(33)
CψCθ −SψCφ + CψSθSφ SψSφ + CψSθCφ R θ = SψCθ CψCφ + SψSθSφ −CψSφ + SψSθCφ CθSφ CθCφ −Sθ
(34)
where C. = cos(.) and S. = sin(.) . Let ωB be rotational velocity vector in body fixed frame. The relationship between the derivatives of η ( η ) and ωB is as follows: η = Tθ ωB
(35)
1 sφtθ cφtθ Tθ = 0 cφ −sφ 0 sφ / cθ cφ / cθ
(36)
where t. = tan(.) . The dynamics equations of motion can be expressed by the Lagrange-Euler formulation: d ∂L ∂L Qi = . − dt ∂q i ∂ q i L = T −U
(37)
T
where q = ξT , η ∈ R 6 is the generalized coordinates vector. Q is the generalized force vector and L is the Lagrangian. T and U are kinetic and potential energy, respectively. Since the Lagrangian does not contain any term that combines ξ with η , dynamics equation can be separated to the rotational and the translational parts.
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012 75
Rotational Dynamics In rotational dynamics there is no potential energy. Thus, L = T . where T is the Kinematic energy, which is produced by rotational motion. Let I be the moment of inertia tensor of the rigid body. Rotational kinematic energy is obtained by the following equation: 3
T=
1 ωBTi I i ω Bi 2∑ i =1
(38)
By using (35), the previous equation can be rewritten as follows: 1 T = η T T θ−1T I Tθ−1 η 2
(39)
Therefore Lagrangian can be expressed as follows: L=
1 T η Hη 2
(40)
where H = Tθ−1T I Tθ−1
(41)
Thus the Lagrange-Euler rotational dynamics in terms of η can be expressed as follows: + C (η, η ) η = τ η H (η) η
(42)
τ η represents the roll, pitch and yaw moments. The first term of the left hand side of (42) represents the inertial moments, while the second term includes Coriolis and centrifugal forces (Asada & Slotine, 1986).
Translational Dynamics In translational dynamics, in contrast to rotational dynamics, there is the gravitational potential energy. Therefore, (37) can be expressed as follows: 0 1 T L = ξ mξ − mg 0 2 E z
(43)
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
76 International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012
where m is the total mass of the body and g is gravitational constant. The translational dynamics equations can be expressed as follows: 0 mξ + mg 0 = fξ E z
(44)
where fξ is 3×1 vector containing all translational forces.
APPENDIX B Controller Adaptation Laws The controller adaptation laws derived using an improved Lyapunov-based MRAC method. We first prove this Theorem for translational part. Consider the ith row of the translational part of (19) and the adaptive control law (20). On applying (20) to (19), we obtain the error differential equation: ..
m ξi + di (ξ, ξ, ξ) = fi (t)
(
)
(45)
..
+ K0 i (t) eTi (t) + K1i (t) e Ti (t) + q ξdi If we substitute ξi = ξid − eTi then dropping the subscript i for convenience, (45) can be rewritten as follow: me + k1e + k 0 e = d − f + (m − q)ξd
(46) .
Let us define the 2×1 error vector X( t ) = [e (t), e(t)]T and rewrite (46) as the “adjustable system:” 0 X(t) = −k 0 m .
0 0 0 −k1 X (t) + d − f + m − q ξd m m m
(47)
Let the desired performance of the tracking error e(t) , denoted by em (t) , be described by the second-order homogeneous differential equation: ..
..
em (m) + 2ζω em (t) + ω m 2 em (t) = 0
(48)
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012 77
ω and ζ are natural frequency and damping ratio respectively. Rewriting (48) in a vector form, we obtain the “reference model”: 0 . X m (t) = −ωm 2
1 X (t) = A X (t) m m −2ζω m
(49)
e (t) m . Since the reference model (49) is stable, there exist symmetric positivewhere X m (t) = . e (t) m definite constant 2×2 matrices P and Q which satisfies the Lyapunov equation. PA m + A Tm P = −Q
(50)
The initial values of the desired and actual trajectories are often the same, and hence the e (0) m . Thus the solution of the homogeneous equainitial error is usually zero, i.e., X m (0) = . e (0) m tion (49) is identically zero; that is X m (t) ≡ 0 for t > 0. We shall now derive the controller adaptation laws which ensure that, for any desired trajec0 tory ξd (t) , the tracking error X( t ) tends to desire value X m (t) = asymptotically. Let us 0 define the 2×1 adaptation error vector E (t) = X m (t) − X ( t ) . From the (49) and (47) obtain the error differential equation as: 0 . 1 E (t) E(t) = 2 −ω −2ζω 0 0 X (t) + k k 2 1 0 − ω ζω − 2 m m 0 0 .. + −d + f + −m + q ξr m m
(51)
Let us now define the scalar positive-definite Lyapunov function:
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
78 International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012
V = E T PE + Q0 ( +Q1 (
k0 m k1
−d + f − f * )2 m
− ω2 − k 0* )2
(52)
* 2 1
− 2ζω − k ) m q−m − q * )2 +Q3 ( m +Q2 (
where P is given by (50) and {Q0 , Q1, Q2 , Q3 } are arbitrary positive scalars and {f * , k 0* , k1* , q * } are functions of time to be specified later. Now, differentiating V along the error trajectory (51), and after simplification we obtain: = −E TQE + 2 −d + f Q f − f * − r V 0 m m f −2Q0 f * − f * m . . k k * 2 0 0 +2 − ω Q1 − k 0 − re m m . k . −2Q1k 0* 0 − k 0* m . . k k * 1 1 +2 − 2ζω Q2 − k1 − re m m . k . −2Q2 k1* 1 − k1* m . .. q q − m Q3 − q * − r ξd +2 m m . q −2Q3 q * − q * m
(53)
As previously defined, r is the scalar weighted error; r = WTp e + WTv e . In deriving (53), it is assumed that the coefficients m and d in the model (19) are unknown and “slowly time varying” in comparison with the controller gains. Now, for the adaptation error E to vanish as must be negative definite in E. For this purpose we set: ymptotically, V
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012 79
. f Q0 − f * = r m
. k . * 0 Q1 − k 0 = re m . k . * 1 Q2 − k1 = re m . .. q Q3 − q * = r ξd m
(54)
reduces to: In this case, V = −E TQE − 2Q f * r V 0 ..
−2Q1k 0* re − 2Q2 k1* re − 2Q3 q * r ξd
(55)
Now, let us choose f * , k 0* , k1* as follows: f * = Q 0* r k 0* = Q1* re k1* = Q2* re ..
(56)
q * = Q 3* r ξ d
{
where Q0* , Q1* , Q2* , Q3*
}
simplifies to: are zero or positive scalars. Hence, V
= −E TQE − 2 Q * r2 V 0 .. 2
−2 Q1* r2 e2 − 2Q2* r2 e 2 − 2Q3* r2 ξd
(58)
This is a negative definite function of E. Consequently, the error differential equation (51) is asymptotically stable. Implying that E → 0 orX (t) → X m (t) = 0 ast → ∞ . Thus, from (53) and (56), the controller adaptation laws are found to be: m r f = mQ*0 r + Q0
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
80 International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012
.
k 0 = mQ1* .
k1 = mQ2* q = mQ*3
d m (re) + (re) dt Q1 d m (re ) + (re ) dt Q2
.. d m .. (r ξd ) + r ξ dt Q3 d
(59)
In order to make the adaptation laws independent of h, we choose: Q*0 =
ρ m
Q1* =
Q0 =
m δ
Q1 =
β1 m m α1
Q*2 =
β2 m
Q2 =
m α2
Q*3 =
λ m
Q3 =
m γ
(60)
where {ρ, β1, β2 , λ} are zero or any positive scalars and {δ, α1, α 2 , γ} are any positive scalars. Note that since m is positive and slowly time-varying, we have Qi* ≥ 0,Qi ≥ 0 and both Qi* , Qi are also slowly time-varying. Thus, from (59) and (60), we obtain the controller adaptation laws: f = ρr + δr .
k 0 = β1
d (re) + α1 (re) dt
.
d (re ) + α 2 (re ) dt .. .. d q = λ (r ξd ) + γ r ξd dt k1 = β2
(61)
Integrating (61) yields the controller terms as: t
f (t) = f (0) + δ ∫ r (t) dt + ρr (t) 0
K0 (t) = K0 (0) t
+α1 ∫ r(t)e(t)dt + β1r (t) e (t) 0
Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
International Journal of Intelligent Mechatronics and Robotics, 2(4), 58-81, October-December 2012 81
K1 (t) = K1 (0) t
+α 2 ∫ r(t)e(t)dt + β2 r (t) e (t) 0 t
..
..
q (t) = q (0) + γ ∫ r(t) ξd dt + λr (t) ξd
(62)
0
The controller adaptation law (62) ensures asymptotic stability of the ith local subsystem. To show global asymptotic stability, we combine the second-order translational subsystem dynamics (19) for i = 1,2,3 to obtain the 6th order composite system and sum up the local Lyapunov functions V(E i ) of the individual subsystems to form the global Lyapunov function V(E) , where E is the 6×1 composite error vector. Since V(E) >0 and V(E )