Modeling and Control of A Quadrotor UAV
Modeling and Control of A Quadrotor UAV
Vol:7 2013-05-23
Abstract—This paper presents preliminary results on modeling simulation. In this paper, we aim to obtain this kind of
and control of a quadrotor UAV. With aerodynamic concepts, a model for a special case, which is under the assumptions
mathematical model is firstly proposed to describe the dynamics that the quadrotor is well controlled at a fixed height and the
of the quadrotor UAV. Parameters of this model are identified by
experiments with Matlab Identify Toolbox. A group of PID con- angle of attack is small. We focus on studying the dynamics
trollers are then designed based on the developed model. To verify of rate loop and speed loop. By the linear estimation and
the developed model and controllers, simulations and experiments for identification, a parameterized transfer function for a selected
altitude control, position control and trajectory tracking are carried quadrotor platform is obtained. A group of PID controllers
out. The results show that the quadrotor UAV well follows the are then designed by the root locus analysis and Ziegler-
referenced commands, which clearly demonstrates the effectiveness
Nichols tunning rules based on the developed model. Finally,
International Science Index Vol:7, No:5, 2013 waset.org/Publication/7686
autonomous flight. A mature quadrotor system can be used II. Q UADROTOR P LATFORM
for reconnaissance, rescue, photography and works that are A so called Hummingbird quadrotor is chosen from As-
dangerous or space limited for human beings [1], [2]. cending Technologies, GmbH, which has a mature hardware
Many researchers involve themselves into this area in recent system and sufficient software packages. With SDK, control
years. As in [3]–[5], Samir Bouabdallah et al. carried out a algorithms can be easily simulated in Matlab Simulink and
series of researches on the control system of the quadrotor converted to embedded codes with no gap. The two level
UAV. In their works, the rigid body dynamics of a quadrotor processors structure and safe landing mode can protect the
UAV and several effects of aerodynamics were studied. They quadrotor from damages in most cases. For these reasons,
implemented several controllers, including the PID controller, many researchers choose it as their experimental platform [7],
backstepping controller, sliding-mode controller, and so on. [9], [10].
By comparison, a so called integral backstepping method was This platform is shown in Fig. 1. The tip-to-tip wingspan
proposed [5]. The backstepping controller and sliding-mode is 50cm and the height is 8cm. It weighs 500g with a
controller have great influences on subsequent researchers. E. capability of additional 200g payload. The attitude is sensed
I. Pounds et al. presented a delicate method to identify the by three gyroscopes along with a 3D magnetometer. And three
rigid body dynamics of the quadrotor UAV and an attitude accelerometers are equipped in the system to measure the
control algorithm was adopted by root locus analysis [6]. In acceleration in body fixed coordinates. The height is sensed by
[7], a PD controller was presented by V. Kumar et al., and a pressure sensor. The speed and position information come
performs well in their robotic team [8]. from a GPS unit. All of these characteristics provide enough
From the brief review, although the rigid body dynamics and hardware basis for outdoor experiments.
several aerodynamic effects have been analyzed by Bouabdal-
lah et al. [3], [5], a complete dynamic model, especially that III. M ODELING
can be adopted for position control, is still missing. In order to derive a complete dynamic model, the rigid body
For this reason, to develop a dynamic model that can fully dynamics, motor dynamics and the effects of aerodynamics are
describe the quadrotor UAV is necessary. Such model can studied in this section.
greatly help researchers to design controllers in an analytical
way and predict the behaviors of the quadrotor UAV via
A. Rigid body dynamics
Wei Dong, Guo-Ying Gu, Xiangyang Zhu and Han Ding are with Rigid body dynamics of the quadrotor UAV governs the
the State Key Laboratory of Mechanical System and Vibration, School response of attitude control. The expressions are derived in
of Mechanical Engineering, Shanghai Jiao Tong University, Shang-
hai 200240, China; email:[email protected], [email protected], two coordinate systems: an inertial coordinates and a body
[email protected], [email protected] fixed coordinates.
377
World Academy of Science, Engineering and Technology
Vol:7 2013-05-23
F4
Z
2 F3 M4
1
YB
ZB F1
M3 XB
F2 M1
X L
Y mg
r
3 M2 ZI
4 YI
XI
Fig. 1. Hummingbird quadrotor
Fig. 3. Force diagram for quadrotor
z z Z z
Z
Z
Y θ
ϕ
Y dynamics is governed by
ϕ Y
ψ ⎧ ⎡ ⎤ ⎡ ⎤
0 0
International Science Index Vol:7, No:5, 2013 waset.org/Publication/7686
y y y ⎪
⎪
x
X
x
θ x ψ
⎪
⎪
⎪ mr̈ = R ⎣ 0 ⎦ − ⎣ 0 ⎦ − q̇ × mṙ
X X
⎪
U1 mg
⎨
⎡ ⎤ (3)
⎪ U 3
Fig. 2. Attitude definition ⎪
I q̈ = ⎣U2 ⎦ − q̇ × I q̇
⎪
⎪
⎪
⎪
U4
⎩
Li dt + Ri + ke ωm = u
⎧
U1 = F1 + F2 + F3 + F4 (5)
dωm
⎪
J dt = τ − τd
⎪
U2 = (F3 − F1 )L
⎨
(2)
U 3 = (F2 − F4 )L
⎪
⎪ where
U4 = M1 + M3 − M2 − M4
⎩
Li : coefficient of inductance i: armature current
R: armature resistance ke : back emf constant
where F1 , F2 , F3 and F4 are thrusts, M1 , M2 , M3 and M4 ωm : speed of motor u: armature voltage
are momentums, and L is the lever length as illustrated in Fig. J: inertia of motor τ: torque of motor
3. The subscripts correspond to the ordinal numbers in Fig. 1. τd : load
378
World Academy of Science, Engineering and Technology
Vol:7 2013-05-23
TABLE I
C. Effects of Aerodynamics I DENTIFICATION R ESULTS FOR C( S )
Two main effects are taken into consideration. One concerns
Item Ka τm Experiment Time(s)
how thrust is generated while the other deals with the drag
22.75 0.001
force. 1 144
18.00 0.001
The thrust T produced by each motor is calculated as 2
13.05 0.001
122
17.61 0.001
2 17.53 0.001
T = ρCT Aωm R2 (6) 3
18.29 0.001
72
15.48 0.001
4 62
where 15.48 0.001
25.58 0.001
5 65
CT : thrust coefficient ρ: air density 16.49 0.001
A: rotor disk area R: blade radius 13.71 0.001
6 72
32.30 0.001
where ω1 , ω2 , ω3 , ω4 are rotary speeds of four rotors, ω3 = The identification of those subsystems is processed as
ω1 + δωφ , and ω2 = ω4 + δωθ . follows.
Rate Loop According to (7), with the consideration that the
Considering the flight at a fixed height, the aerial drag force
changes of ω1 and ω4 are small considering the large values
is expressed as [13]
of themselves in practice, φ̈ and θ̈ are governed by δωφ and
1 δωθ with linear relationship respectively. And from equation
D= CD ρv̄ 2 S (8)
2 (5), the motor is a first order system. Thus, the overall transfer
function of C is a first order system which is expressed as
where
Ka
D: drag force CD : drag force coefficient C(s) = (11)
v̄: speed of the quadrotor S: effective drag area
τm s + 1
where Ka stands for the overall gain of this subsystem and
τm represents the delay. To identify the parameters in (11),
In order to ensure that the quadrotor UAV flies in a steady six experiments are carried out. With a preliminarily designed
speed, (6) should be equal to (8). Thus, one can obtain controller, the quadrotor flies with a time varied attitude.
1 References and responses for the rate loop are recorded in
ρCT Aωe2 R2 sin α = ρCD v̄ 2 (St sin α + Ss cos α) (9) 50Hz. The data are then processed by Matlab Identify Toolbox.
2
The identified results are shown in Table I. Thus, C(s) is
where estimated as (12) by taking mean values from the results
St : planar area from top view α: angle of attack 19
Ss : planar area from side view ωe : equivalent motor speed C(s) = (12)
0.001s + 1
Attitude Loop The open loop behavior is in the form
Furthermore, when a quadrotor flies at a fixed height, the of integral as shown in Fig. 4, which is also proven by
equivalent thrust (U1 ) itself is a function of the angle of attack experiments.
according to (4) and (6). Substituting those two equations into Speed Loop According to (10), even for a quadrotor flying
(9), the flying speed is a function of the angle of attack as at a fixed height, the relation between attitude and flying speed
is nonlinear. In this work, we only consider a special case
v̄ = cos αρCD 2mg sin α
which is under the assumptions as follows:
(St sin α+S s cos α)
(10)
2mg
≈ ρCD Ss − S 2 α St α 2 • The height of the quadrotor is well controlled
s
• The quadrotor flies at a fix height
From (10), when α is small, the side area Ss dominates the • The attitude angles are small
drag effect. However, the influence of St increases when α Thus, for a certain platform, (10) can be expanded by the
becomes larger. Taylor series at any nonzero point. Then a first order system
is chosen to give an estimation. Noticing the fact that time
delay always exists in the conversion from attitude to speed,
IV. C ONTROLLER DESIGN the transfer function of STF in Fig. 4 is proposed as
Based on the proposed dynamic models (4), (5) and (10), Ks
the controllers will be designed in this section. STF(s) = e−Ls (13)
τs s + 1
379
World Academy of Science, Engineering and Technology
Vol:7 2013-05-23
Reference Position Control Speed Control Attitude Control Rate Control Body Dynamics
Angular acceleration
r +- P +- S +- A +- R C
TABLE II
I DENTIFICATION R ESULTS FOR STF( S ) 10
Position(m)
Item Ks τs L Experiment Time(s)
19.61 2.69 0.47 0 Xreference
1 144
11.33 1.37 0.59 −5
Xresponse
6.81 0.91 0.79 Xsimulation
2 122
6.66 0.81 0.81 −10
0 5 10 15 20 25 30 35 40 45
6.13 0.63 0.84
3 72
International Science Index Vol:7, No:5, 2013 waset.org/Publication/7686
380
World Academy of Science, Engineering and Technology
Vol:7 2013-05-23
Position(m)
the control input for altitude control 5
m 0
U1 = [c1 (z˙r − ż)+ z¨r +ε1 sgn(s1 )+k1 s1 +g] (19)
cos φ cos θ −5
−10
0 50 100 150
V. E XPERIMENTS
All the experiments are carried out in an outdoor environ- 20
Ycmd
ment. Rate, attitude, speed, position and altitude are controlled 10 Y
Position(m)
act
by onboard processors running at a frequency of 1000Hz. 0
Trajectory information is sent from a laptop to the position
−10
controller at a frequency of 50Hz. The reference and response
for each controller are collected to the laptop via a wireless −20
0 50 100 150
router. Time(s)
and they keep these meanings through the following text. The 5
steady state error is within 0.5 meter, and the delay is within Speed(m/s)
0
7 seconds. Compared with reported controllers [4] [15], it is X’cmd
−5
good enough in the outdoor environment. ’
Xact
−10
0 50 100 150
5
10
4
5
Speed(m/s)
3
Height(m)
0
2
’
Ycmd
−5
1 Zcmd Y’act
0 Z −10
act 0 50 100 150
Time(s)
−1
0 20 40 60 80 100 120 140
Time(s)
Fig. 8. Results of speed control
Fig. 6. Results of altitude control
θcmd
0.5
B. Position Control θact
Angle(rad)
381
World Academy of Science, Engineering and Technology
Vol:7 2013-05-23
Y
15
cmd −5
act
10
−10
5
−15
0 −15 −10 −5 0 5 10 15
Y
−5
Fig. 11. Circular trajectory tracking
International Science Index Vol:7, No:5, 2013 waset.org/Publication/7686
−10
382