You are on page 1of 6

2013 Third International Conference on Instrumentation, Measurement, Computer, Communication and Control

Adaptive Flight Control Design for Quadrotor UAV


based on Dynamic Inversion and Neural Networks

Qing Lin, ZhiHao Cai, YingXun Wang, JinPeng Yang, LiFang Chen
National Key Lab of Science and Technology on Aircraft Control,
School of Automation Science and Electrical Engineering
Beijing University of Aeronautics and Astronautics
Beijing, 100191, China
linqing@asee.buaa.edu.cn

Abstract—An oblique cross quadrotor UAV is designed and these aircraft, there are several important considerations [3].
assembled. To achieve autonomous flight control, a nonlinear There are numerous kinds of uncertainties in the system such
dynamic model is investigated. Then an adaptive flight control as actuator degradation, external disturbances, and uncertain
theory, based on dynamic inversion and linear neural network, is time delays in processing or communication, which pose a
introduced to the control of the UAV. Based on the time-scale challenge to the robustness and adaptive ability of the flight
separation principle, an attitude dynamic inverse controller and control system. Although various advanced control methods for
a trajectory dynamic inverse controller are deduced respectively a quadrotor UAVs such as feedback linearization method[4],
according to the nominal nonlinear model. The inverse error backstepping control[5], sliding mode control[6] have recently
dynamics is regulated with a PD controller. A Sigma-Pi neural
been developed to meet increasing demands on the UAV
network is introduced to eliminate the inverse error adaptively to
improve the robustness of the controller. To verify the flight
performance. However, backstepping method has formalized
controller, two group simulations are conducted: the first is to
design process, perfect convergence, but poor robustness. SMC
validate the robustness of the attitude controller under severe method needs to solve the chattering problem. And feedback
parameter uncertainty. Then a compound MTE (mission-task- linearization has poor robustness for the dependency on
elements) simulation, which includes pirouette and vertical accurate model.
maneuver, is applied to the verification of the flight control Based on the discuss above, an adaptive flight control
system. The simulation results including an imitation of inverse method based on neural network and dynamic inversion is
error and disturbance moments are provided. The
adopted to design the attitude inversion controller and
demonstrations show that the designed flight control system has
adaptability and robustness and can achieve accurate attitude
trajectory inversion controller. This method can guarantee the
and trajectory control. convergence of tracking error. According to the adjustment of
the weights of Sigma-Pi neural network, inversion error arose
Keywords-Quadrotor UAV; dynamic inversion; Sigma-Pi NN; by model error, external disturbance can be compensated real-
adaptive control; compound MTE simulation verification time. The robustness and performance is verified through
simulation based on mission-task-elements maneuver.
I. INTRODUCTION In this paper the problems are discussed and organized in
In recent years, with the development of MEMS technology, the following way. Section 2 gives the introduction of the
carbon fiber technology, and embedded computer technology, quadrotor UAV under consideration and a mathematical model
micro quadrotor UAVs have been an increasingly attractive of the vehicle. Section 3 presents the method of neural network
research platform for their simple design and relatively low augmented dynamic inversion control. Section 4 provides the
cost. The quadrotor configuration presented here offers all design of attitude controller and trajectory controller. Section 5
advantages of helicopters along with increased payload gives the results of the digital simulations. Conclusions are
capacity, increase stability in hover, maneuverability and presented in Sec 6.
reduced mechanical complexity. Numerous research institutes
at home and abroad choose quadrotor UAVs as an ideal II. MATHEMATICAL MODEL
platform to develop intelligent control, swarm formation [1]
and SLAM navigation [2], etc. A. The Quadrotor UAV
Quadrotor UAVs are underactuated, nonlinear and strong The vehicle investigated in this paper is a quadrotor UAV
coupled which is hard to cope with properly for conventional consisting of four fixed pitch angle rotors powered by four
control methods. Due to the influence of nonlinearity and electronic motors and mounted at the end of an X-shaped frame.
unmodeled dynamics, it is quite difficult to establish a very The micro UAV system is composed four subsystems, the
accurate mathematical model. In design a flight controller for airframe, the power system and the flight control system as

978-0-7695-5122-7/13 $26.00 © 2013 IEEE 1461


DOI 10.1109/IMCCC.2013.326
shown in Fig. 1 To improve the safety of experiments, carbon f1 f2
fiber tubes ( ) are mounted on the airframe. Q1 Q2
1 2
xb l1
o yb
xe f4 zb
Q4
f3
mg
ye Q3
4 l2
3
ze

Figure 1. The Configuration of the quadrotor UAV under research Figure 2. Force and torque diagram of the quadrotor UAV

The airframe is a X-shape carbon fiber frame. The power The thrust generated by rotor i is given by
system consists of four brushless DC motors, brushless motor
controller, 3s Lithium Polymer battery, and flexible PP-plastics fi  bi2 (2)
propellers. The flight control system, i.e., the autopilot is
composed of embedded controller, Attitude and Heading Where b  0 is a parameter depending on the density of the
Reference System (AHRS), ultrasonic altimeter, data recorder, air, the radius of the propeller, thel chord length and the
wireless communication model and a 14 channels R/C number of blades[7].
transmitter. All avionics is assembled at the center of the
airframe to reduce the constant disturbance moment during the The total thrust in B  x, y, z  is
flight process. 4 4
T   f i  b i2 (3)
B. Flight Dynamics Model i 1 i 1

The flight dynamic model is the basis of parameter The total torques caused by the rotor drag in B  x, y, z  are
identification, flight control design and test flight. Due to the
complexity of the flight dynamics of the quadrotor UAV, it is
difficult to build an accurate model. To simplify the model
process and facilitate the flight control design, the flight  b  l2  (12 42 22 32 ) 
 
dynamics model is deduced under the following assumptions     b  l1  (12 22 32 42 )  (4)
 
   
4
The quadrotor UAV is a rigid-body and the aircraft
structure and elastic deformation are ignored. The 
 ( 1)i 1i2
i 1


center of gravity coincides with the origin of the body
coordinate system. Where l1 and l2 denote the longitudinal and horizontal
 The airframe structure is tough symmetry and the distance between the rotor and the center of gravity
asymmetry airflow and the air compressibility are respectively.
ignored. The torque generated by rotor by rotor i is given by
The quadrotor UAV under consideration is given in Fig. 2. Qi   wi2 (5)
Rotor 1 and rotor 3 contra rotate. Rotor 2 and rotor 4 rotate
clockwise. Force and torque diagram of the quadrotor UAV are Where   0 is a parameter depending on the density of
analyzed in Fig. 2 Let B  x, y, z  be the frame attached to the the air, the radius of the propeller, the chord length and the
vehicle and E  x, y, z  denote the inertial frame as shown in
number of blades
Fig. 2ˈthe origin of the inertial frame is set to the take-off On the basis of the above analysis, the dynamical model of
point. The rotation matrix R : B  E depends on the three the quadrotor UAV is given by
Euler angles ( ,  ,  )T representing, respectively, the yaw, the & T
pitch and the roll.  x& (cos  sin  cos  sin  sin  ) m
k1 x&

s s c c s s s c s c  T
c c & y& (sin  sin  cos  cos  sin  ) k2 y& (6)
  m
R( ,  ,  )  c s s s s c c s c c s s  (1)
 T
 z& g cos  cos 
 & k3 z&
 s s c c c  m
Where, c x for cos x and s x for sin x .

1462
 I y Iz  x& fˆ  x, x&,   , represents the model
Where,   x, x&,    &
 p& ( ) qr k4 p&
error. To eliminate the model inversion error, a Sigma-pi neural
 Ix Ix
 network is introduced to adaptively compensate the inversion
Iz Ix 
 q& ( ) pr k5 q& (7) error online with a real-time pseudo control signal vad , which
 Iy Iy is a part of the pseudo control v .
 I Iy 
 r& ( x ) pq k6 r& The pseudo control is given by
 Iz Iz
v  vrm v pd vad (14)
& p (sin  tan  )q (cos  tan  ) r
& Whereˈ vrm  & x&
rm is the pseudo control from the reference
  q cos  r sin  (8) model, which is shown as
& ( q sin  r cos  ) / cos 
 xrm n2
 (15)
xg s 2 2n s n2
III. NNW AUGMENTED DYNAMIC INVERSION
CONTROL METHOD v pd comes from the PD linear regulator, which is used to
A. Control Structure regulate the dynamic response of the system, which can be
presented as
The method described here is dynamic inversion control
augmented with neural network, which has been heavily v pd  k p ( xrm x) kd ( x&rm x&) (16)
studied as a candidate method for nonlinear flight control[9-13].
Fig. 3 contains the architecture of NNW augmented dynamic Where, k p and k d respectively stand for proportional and
inversion, which is composed of reference model, dynamic differential coefficients to improve the response of the system.
inversion, PD linear regulator and neural network adaptive
compensator. x ,x
The pseudo control can be derived from (14) and (16)
rm rm

v&
x&
rm k p ( xrm x) kd ( x&rm x&) vad (17)
xc 5HIHUHQF v rm v '\QDPLF  cmd  x, x
LQYHUVLRQ DFWXDWRU 3ODQW
HPRGHO
B. The model tracking error dynamics
e From (13) and (17), we can get
vad 11: x
$GDSWLYH
FRPSHQVDWRU
v (&
x&
rm
&
x&
) k p ( xrm x) kd ( x&rm x&) ( vad )  0 (18)
:HLJKWV
5HJXODWLQJ
/DZ Then the model tracking error dynamics can be presented
3'OLQHDU
v pd
UHJXODWRU as
Figure 3. NNW augmented dynamic inversion control architecture e& Ae B(vad ) (19)
A second order nonlinear model can be derived from the xrm x 0 1 0
dynamics model of the quadrotor. Where, e  , A ,B  .
 x&rm x&  kp kd   
1
x& f  x, x&,  
& (9)
Remark 1[10]: When model error can be approximated
Where, x  R n is the state variable, and   R m is the by vad k p and k d are properly chosen to make sure that the
control input. If f  x, x&,   is invertible and x, x&is measurable, matrix A is Hurwitz, the model tracking error will converge to
the system can be changed to the following form. zero.
x& v
& (10) C. Sigma-Pi neural network compensator
v  f  x, x&,   (11) The neural network can consist of any linearly
parameterized feedforward structure which is capable of
Where, v is the pseudo-control signal, and we can get the reconstructing the inversion error. Fig. 4 gives a general
actual control input depiction of a sigma-Pi linear network.
  f 1 ( x, x&, v) (12)
Considering the model error, the model is approximate to
the plant. The second system is described as
x& fˆ  x, x&,     x, x&,  
& (13)

1463
( 1 ) Figure 5. Attitude control augmentation system architecture
* +
X11 +
X 1 ** + W
*
* X1n +
+
π There are two common types of control augmentation for
, 1-
( 1 ) w1 aircraft, which are referred to Rate Command Attitude Hold
* + π
* X 21 +
X2 *
w2 (RCAH) and Attitude Command Attitude Hold(ACAH).In this
+ π U adV paper, the former method is applied to the attitude control
** X 2n ++
, 2 -
'
wk system. Fig. 5 depicts the attitude stability and control augment
( 1 )
system(SCAS) architecture. The pseudo control can be
*
X
+
X m * m1 + π described as
* +
** ++
, Xmnm -
v &
&
rm v pd vad
   
Figure 4. Sigma-Pi neural network structure
v  v    rm  v pd  vad 
&
& (23)
  v pd  vad 
The input/output map of the neural network may be  v  &
&rm     
represented as,
Equation (23) denotes the second-order differential of Euler
k
vad   w j j  X ,v  W  X ,v
T angle, but the inputs of nonlinear dynamic inversion of attitude
(20)
controller is % p&c q&c r&
c & .To use the pseudo control in (23) it
T
j 1

Where, X represents the normalized states, W is a vector of needs to be transformed from the Euler frame to the body
variable networks frame. The equivalent body angular acceleration commands are
computed as
weights,  c1 , c2 , c3   kron(kron(c1 , c2 ), c3 ) is a vector of
network basis function.ˈ  p&c  v v  s & & c

Remark 2[10]: Consider the candidate Lyapunov function  q&c  v c   & s v c s
&   & s  s & & c c
& (24)
 r& v s & & c v c c & & s  c & & c  s
1 (W W * )T (W W * ) c      
V  eT Pe (21)
2 2! Combining (7) and (24) we have
Where W * denotes the ideal weightˈ !  0 is the adaptive    p&c I x ( I y I z )qr
gain. Equation (22) gives a network adaptation law that 
guarantees boundedness of the tracking error and of the    q&c  I y ( I z I x ) pr (25)
network weight.   r& I ( I I ) pq
  c z x y

 " s e #
W&  (22) B. Control Allocation
 0 e $#
The inputs of the plant are the rotation speed command of
motors % w1 w2 w3 w4 & , so control allocation is needed to
T
1 1 kp
Where s  ( xrm x) ( x&rm x&) , and
2 kp 2  kd  k p transform anticipated torques T    
T
   to standard
1 kp inputs.
kd 1 1 1
P ; .
k 2k d 2k p 2k p 2k p kd  From (3) and (4) we have:
 p
T b( w12 w22 w32 w42 )
IV. ADAPTIVE FLIGHT CONTROL SYSTEM DESIGN  
   b  l2  ( w12 w42 w22 w32 ) 
FOR THE QUADROTOR UAV
    b  l1  ( w12 w22 w32 w42 )  (26)
A. Attitude control augmentation system design  
  4

c 5HIHUHQFH rm v
  ( 1)  wi
i 1 2

   
PRGHO
v pd
vad i 1
11: X
FRPSHQVDWRU
3' ,
UHJXODWRU
rm , rm Tc
The anticipated rotate speed command can be calculated as
1
c 5HIHUHQFH  rm v 
$WWLWXGH
2
PRGHO
v pd vad
,QYHUVLRQ
 &RQWURO
DOORFDWLRQ 3
4XDGURWRU
8$9
T
  
11:
FRPSHQVDWRU
X
 4 w12
3'  , 
UHJXODWRU
 rm ,  rm w22 
c  rm M 1
  (27)
w32  
5HIHUHQFH v

 
PRGHO

2
v pd vad 11:
FRPSHQVDWRU
 , X  w4  
3'
UHJXODWRU
 rm ,  rm  

1464
b b b b the origin of initial frame. Fig.6~Fig. 9 depicts the simulation
b  l2 
results.
b  l2 b  l2 b  l2
where M   is full rank
b  l1 b  l1 b  l1 b  l1 
 MTE Trace
     
45
Response Trace

matrix obviously. 40

35
C. Adaptive Autopilot design 30
The attitude controller achieves the stabilization and 25
tracking of attitude command, which is the basis of trajectory

z/m
20
tracking and autopilot. The design of trajectory controller is 15
similar to the design of attitude SCAS, which using translation 10
dynamics (6) to deduce the trajectory inversion controller as
5
follows
0
30
 20
T  m v 2 v 2 (v g ) 2 10
 c x y z 0
60
 m( v x sin  c v y cos  c )
-10
40
50
 30
c  arcsin
-20 20
 (28) y/m -30 -10
0
10

  Tc  x/m


 c  arcsin mv x Tc sin  c sin c 
 Tc cos  c cos c
Figure 6. Compound MTE and 3D trajectory tracking response
 
60
Different from the attitude SCAS, the attitude control of the xc
40
autopilot simplified and the neural network is applied to the x
x
x\m

20
trajectory inversion controller. The anticipated commands
0
include three dimension trajectory and reference heading.
-20
0 10 20 30 40 50 60 70 80
Time\s

V. SIMULATION 40
yc
20
Two groups of digital simulation results is provided to y
y
y\m

0
verify the adaptive ability and robustness of the flight control -20
system, and provides reference information for the following -40
trial flight. 0 10 20 30 40
Time\s
50 60 70 80

zc
A. Compound MTE simulation 0
z
z
z\m

To assess the model and the flight control system, mission- -20

task-elements are chosen according to ADS-33D-PRF[14, 15]. -40

The imitated MTE includes pirouette and vertical maneuver, 0 10 20 30 40 50 60 70 80


Time\s
which is often adopted to conduct performance evaluation of
helicopters.
Figure 7. Three axis position tracking reponse and position error
The compound MTE maneuver command is as follows˖ 20

 x  1 cos . t / 20   *80 / .
0
/°

c
 -20


 y  80sin . t / 20  / . -40


 (29) 0 10 20 30 40 50 60 70
c
80

 z  0.5t 1
Time/s
2 

 pusic  2. t / 40



0
/°

-2

To evaluate the robustness of the controller, disturbance -4

moments  p  0.03N gm, q  0.04 N gm, r  0.05N gm are -6


0 10 20 30 40 50 60 70 80
Time/s
introduced at 40s and last for 20s to imitate the gust or collision 400

interference during flying. At the same time, 50% aerodynamic 300

data perturbation is introduced to imitate the model error. At


//°

200
/c
100 /
the beginning of simulation, the vehicle is hovering 1m above 0
/
0 10 20 30 40 50 60 70 80
Time/s
Figure 8. Three axis attitude angle tracking response and attitude error

1465
100
p
This research was supported by graduate student innovation
fund of Beijing University of Aeronautics and Astronautics.
p deg/s

-100
0 10 20 30 40 50 60 70 80
REFERENCES
Time/s
[1] Jaimes, A., S. Kota and J. Gomez. “An approach to surveillance an area
10 using swarm of fixed wing and quad-rotor unmanned aerial vehicles
UAV (s),”.SoSE'2008. IEEE International Conference on System of
q deg/s

0
Systems Engineering.
-10
q [2] Agarwal, P. and T. Brady. “SLAM Strategy for an Autonomous
-20
0 10 20 30 40 50 60 70 80 Quadrotor,” University of Michigan.
Time/s
[3] Dydek, Z.T., A.M. Annaswamy and E. Lavretsky, “Adaptive control of
10 quadrotor UAVs in the presence of actuator uncertainties,” AIAA
r
Infotech@ Aerospace, 2010: p20-22.
r deg/s

5
[4] Felix, M. “A Two Level Non Linear Inverse Control Structure for
Rotorcraft Trajectory Tracking,” Chinese Control Conference, 2007.
0
0 10 20 30 40 50 60 70 80 [5] Madani, T. and A. Benallegue. “Control of a quadrotor mini-helicopter
Time/s
via full state backstepping technique,” 45th IEEE Conference on
Decision and Control. 2006.
Figure 9. Three axis attitude angle rate response
[6] Efe, M.O. “Robust low altitude behavior control of a quadrotor
rotorcraft through sliding modes,”. Mediterranean Conference on
Fig. 6 shows 3D trajectory command of chosen MTE and Control & Automation. 2007.
responses of neural network augmented NDI method. Fig. 7 [7] Prouty, Raymond W, “Helicopter performance, stability, and control,”
shows single axis position tracking response and position error. 1995.
During the simulation, the NN+NDI method can track the [8] Harris C M, Piersol A G., “Harris' shock and vibration handbook,” 2002:
MTE trajectory perfectly, with acceptable position error. Under New York: McGraw-Hill.
the severe model error and perturbation moment at 40s, [9] Rysdyk, R. and A.J. Calise, “Robust nonlinear adaptive flight control for
fluctuation within a narrow range is induced, but with online consistent handling qualities”. IEEE Transactions on Control Systems
neural network trained real-time, model error is compensated Technology, 2005. 13(6): p896-910.
adaptively and the fluctuation is eliminated quickly. [10] Rysdyk, R.T. and A.J. Calise, “Adaptive nonlinear control for tiltrotor
aircraft”, Proceedings of the 1998 IEEE International Conference on
Fig. 8 shows the curve of three axis attitude angle and Control Applications. 1998.
tracking response and attitude error. Fig. 9 shows the curve of [11] Kim, B., K. Choi and B.S. Kim, “Trajectory tracking controller design
attitude angle rate. The NN+NDI method has better stability. using neural networks for tiltrotor UAV,” AIAA Guidance, Navigation
and Control Conference and Exhibit. 2007: Hilton Head, South Carolina.
At the beginning of simulation, a big negative pitch angle is
[12] Rysdyk, R.T. and A.J. Calise, Adaptive model inversion flight control
needed to establish the maneuver acceleration. After that the for tilt-rotor aircraft. Journal of Guidance, Control, and Dynamics, 1999.
pitch angle quickly decays. At 40s the pitch angle is sensitive 22(3): p. 402-407.
to the perturbation, but the adjustment process is fast. [13] Kim, B.S. and A.J. Calise, “Nonlinear flight control using neural
Furthermore, the yaw angle changes smoothly just as the MTE networks,” Journal of Guidance, Control, and Dynamics, 1997. 20(1): p.
maneuver, which makes the nose always points to the center of 26-33.
the pirouette circle. [14] Xia Qingyuan, X.J., “A Design of Triaxial Unmanned Rotor Aircraft
and Its Adaptive Flight Control System,” Acta Aeronautics et
Astronautica Sinica. 24(3): p495-508.(In Chinese)
ACKNOWLEDGMENT [15]. Command, T., “Aeronautical Design Standard: Handling Qualities
Requirements for Military Rotorcraft (ADS-33D-PRF),” St. Louis, MO:
Aviation Research. Development, and Engineering Center.

1466

You might also like