Project I: Hanoi University of Science and Technology School of Electrical & Electronic Engineering
Project I: Hanoi University of Science and Technology School of Electrical & Electronic Engineering
PROJECT I
DESIGN FORMATION CONTROL SYSTEM FOR UAVs
NGUYEN MANH CUONG
cuong.nm210143@sis.hust.edu.vn
DAO DUC CONG
cong.dd222817@sis.hust.edu.vn
Major: Control Engineering and Automation
HA NOI, 05/2024
ABSTRACT
This project investigates the leader - follower formation control and collision avoid-
ance problem for a class of UAVs. The approach involves several mild assumptions on
the interaction graph among the leader and the follower robots, utilizing observers to in-
directly gain the information of leader agent. Firstly, observers are designed to estimate
the leader’s states, which remove the requirement that each follower robot knows the full
state of the leader only by using local interactions among the robots. Secondly, based on
the observers, a distributed formation controller is proposed to achieve the desired setup
of a multi-robot system. Thirdly, Lyapunov function technique is employed to analyze
the efficiency of observers and convergence of formation tracking errors. Finally, sim-
ulations on a group of quadrotor are presented to demonstrate the effectiveness of the
theoretical results. This project is organized as follows:
Chapter 1. Introduction
Chapter 2. Preliminaries
Chapter 3. Control design
Chapter 4. Simulation
TABLE OF CONTENTS
LIST OF FIGURES i
LIST OF TABLE ii
CHAPTER 1. INTRODUCTION 1
1.1 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Research Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Conclusions for Chapter 1 . . . . . . . . . . . . . . . . . . . . . . . . 1
CHAPTER 2. PRELIMINARIES 2
2.1 Graph Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 Quadrotor Mathematical Model . . . . . . . . . . . . . . . . . . . . . 2
2.2.1 Coordinate Systems and Transformations . . . . . . . . . . . . 2
2.2.2 Forces and Moments . . . . . . . . . . . . . . . . . . . . . . . 3
2.2.3 Quadrotor Dynamics Model . . . . . . . . . . . . . . . . . . . 3
2.3 Formation Control Problem . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4 Conclusions for Chapter 2 . . . . . . . . . . . . . . . . . . . . . . . . 5
CHAPTER 4. SIMULATION 12
4.1 Numerical Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.3 Conclusions for Chapter 4 . . . . . . . . . . . . . . . . . . . . . . . . 17
CONCLUSION 18
REFERENCES 19
LIST OF FIGURES
1
CHAPTER 2. PRELIMINARIES
Lemma 1 [2] All nonzero eigenvalues of H are with positive real parts. Furthermore,
H is nonsingular if and only if the graph G contains a directed spanning tree with the
node 0 as the root.
2.2 Quadrotor Mathematical Model
Consider a group of N + 1 three-dimensional quadrotors, of which mathematical
models are derived based on the assumption that each quadrotor is regarded as a rigid
body and the origin of the body-fixed coordinate system is at its center of mass.
2.2.1 Coordinate Systems and Transformations
To describe the states of quadrotor motion, appropriate coordinate systems are es-
tablished as follows:
2
• Body-fixed coordinate system oi xb yb zb : coordinate origin oi is at the centroid of
the i th quadrotor; oi xb axis coincides with the headward direction of the quadro-
tor; oi zb axis is in the quadrotor symmetric plane containing oi xb axis and points
upward; oi yb axis is perpendicular to the symmetric plane and makes up the right-
handed coordinate system with oi xb axis and oi zb axis.
The transformation matrix from the inertial coordinate system Oxyz to the body coordi-
nate system oi xb yb zb for the i th quadrotor is given by
cθi cψi cθi sψi −sθi
RI→B = sφi sθi cψi − cφi sψi sφi sθi sψi + cφi cψi sφi cθi (2)
i
cφi sθi cψi + sφi sψi cφi sθi sψi − sφi cψi cφi cθi
where (RI→B
i )T = (RI→Bi )−1 , s and c denote the trigonometric functions sin and cos
respectively, and θi , ψi , and φi are the pitch angle, yaw angle and roll angle of the i th
quadrotor, respectively.
2.2.2 Forces and Moments
The forces acting on the i th quadrotor are thrust Ti , gravity Gi and drag Di . Thrust
Ti equals to the resultant thrust from four rotors; gravity Gi is obtained as
Gi = mi g (3)
where g is the gravitational acceleration and mi the mass of the i th quadrotor and drag
Di is calculated by
Di = −ki,χ χ̇i (4)
where ki,χ = diag{ki,x , ki,y , ki,z } is the aerodynamic damping coefficient matrix, and χi =
[xi , yi , zi ]T is the position vector of the i th quadrotor under the inertial coordinate system.
To facilitate analysis of rotational motion for quadrotors, resultant moment can be
decomposed into pitch moment Mi,θ , roll moment Mi,φ and yaw moment Mi,ψ , respec-
tively. Pitch momentMi,θ and roll moment Mi,φ are generated by thrust difference, and
yaw moment Mi,ψ is generated by the reaction moment caused by the drag acting on four
rotors. The drag makes quadrotors have yaw tendency whose direction is opposite to the
corresponding rotor rotation.
2.2.3 Quadrotor Dynamics Model
It follows from [1] that the 6-DOF dynamics model of the i th quadrotor is de-
scribed by
ẍi 0 0 −k i,x ẋ i
1
B→I
ÿ = 0 +R 0 + −k ẏ (5)
i i i,y i
mi
z̈i −mi g Ti −ki,z żi
3
Ji,θ θ̈i −ki,θ li,θ θ̇i Mi,θ
Ji,ψ ψ̈i = −ki,ψ ψ̇i + Mi,ψ (6)
Assumption 1 [3] There is no directed path from followers to the leader; conversely,
there exists at least one path from the leader to any one of the followers. The data
communication between two followers is mutua
Assumption 2 [3] The graph G contains a directed spanning tree with the node 0 being
the root.
The objective of this paper is to synthesize a suitable control law such that the for-
mation control problem of multiple quadrotors defined as follows is addressed. It should
be noted that the formation trajectory is decided by the leader quadrotor and the forma-
tion structure is determined by the desired relative position di j = [di j,x , di j,y , di j,z ]T , i, j ∈
ν, from the i th quadrotor to its neighbor, the j th quadrotor.
4
(5)–(6), and define the formation tracking errors as
ei,x = x0 − xi + di0,x ,
ei,y = y0 − yi + di0,y , (7)
ei,z = z0 − zi + di0,z ,
Given the graph G and the formation trajectory (x0 , y0 , z0 ) decided by the uncontrolled
leader quadrotor, find a dynamic control law such that
5
CHAPTER 3. CONTROL DESIGN
In what follows, the main results of this paper will be presented in two steps. First,
a distributed observer is designed to provide the estimated information on the leader
for each follower. Second, a controller under a cascade structure is designed to achieve
leader-follower formation.(figure 3.1)
i = 1, . . . , N
where [x̂i , ŷi , ẑi , x̂˙i , ŷ˙i , ẑ˙i ]T are the states of the i th observer, which are the estimates of po-
sitions and velocities of the leader quadrotor for the i th follower quadrotor, η1 , η2 , η3 >
6
0. The distributed observer (9)–(11) has the following property.
Lemma 2 [4] Consider the graph G and the distributed observer (9)–(11) Under As-
sumptions 1 and 2, the estimates x̂i , ŷi , ẑi , i = 1, . . . , N, converge to x0 (t), y0 (t), z0 (t)).
Proof: Take the distributed observer design on the x axis as an example. It follows from
(9) that
!
∑ ai j (x̂˙i − x̂˙ j ) = −η1 ∑ ai j (x̂i − x̂ j ) (12)
j∈Ni j∈Ni
∆˙ i = −η1 ∆i (13)
V̇i =∆i ∆˙ i
= − η1 ∆2i ≤ 0 (14)
7
Where:
Ti
ui,x = (cos ψi sin θi cos φi + sin ψi sin φi ),
mi
Ti
ui,y = (sin ψi sin θi cos φi − cos ψi sin φi ), (16)
mi
Ti
ui,z = (cos θi cos φi ).
mi
To address the formation control problem as formulated in Definition 1, the distributed
position controller for each quadrotor is designed as follows:
ui,x = ∑ ai j ki,1 (x̂i −x̂ j −xi +x j +di j,x )
j∈Ni
+ ki,2 (v̂i,x − v̂ j,x − vi,x + v j,x )
ki,x
+ v̂˙i,x + ẋi (17)
mi
ui,y = ∑ ai j ki,1 (ŷi −ŷ j −yi +y j +di j,y )
j∈Ni
+ ki,2 (v̂i,y − v̂ j,y − vi,y + v j,y )
ki,y
+ v̂˙i,y + ẏi (18)
mi
ui,z = ∑ ai j ki,1 (ẑi − ẑ j − zi + z j + di j,z )
j∈Ni
+ ki,2 (v̂i,z − v̂ j,z − vi,z + v j,z )
ki,z
+ v̂˙i,z − g + żi (19)
mi
With ki,1 , ki,2 > 0.
Theorem 1 [5] Consider the graph G and the closed-loop system consisting of the sys-
tem (14) and the distributed dynamic control law (9)–(11) and (17)–(19). Under As-
sumptions 1–2, then the leader-follower formation control problem is solved via the pro-
posed control law.
Proof:When designing the position controller, we only take the proof on the x axis as an
example.
Define:
8
where x̂i and v̂i,x are the estimates of the leader information on position and velocity for
the i th follower.
From (15), (17) and (20) one has that:
ê˙i,x =êi,xv ,
ki,x
ê˙i,vx =v̂˙i,x + ẋi − ui,x
mi
= − ∑ ai j ki,1 (êi,x − ê j,x )
j∈Ni
≤0. (23)
Since H ′ is nonsingular ê0,x = 0,Upon using Lemma 1, ∆e,i = 0 as êi,x = 0 with (23), the
proof is thus completed.
9
3.2.2 Attitude Control
The desired attitude of the quadrotors calculated by intermediate control inputs
ui = [ui,x , ui,y , ui,z ]T , i = 1, . . . , N, is given by
q
d =m 2 2 2
T i ui,x + ui,y + ui,z ,
i
mi (ui,x sin ψid −ui,y cos ψid )
d
φi = arcsin ,
Tid (25)
u cos ψid +ui,y sin ψid
θid = arctan i,x ,
ui,z
To facilitate the attitude controller design, rewriting the rotational dynamics of the
i th quadrotor in (6) gives that
k l
θ̈i = − i,θJ i,θ θ̇i + τi,θ ,
i,θ
ki,ψ
ψ̈i = − Ji,ψ ψ̇i + τi,ψ , (26)
φ̈i = − ki,φ li,φ φ̇i + τi,φ ,
Ji,φ
M
i,θ Mi,ψ Mi,φ
Where τi,θ = Ji,ψ , τi,ψ = Ji,ψ , τi,φ = Ji,φ The attitude controller for each quadrotor is
designed as follows:
Theorem 2 [6]The closed-loop system consisting of the system (26) and the control law
(27)–(29). Then with the proposed control law, the desired attitudes in (25) can be
tracked.
10
From (26), (27) and (30) one has that:
11
CHAPTER 4. SIMULATION
The desired formation trajectory is [x0 (t), y0 (t), z0 (t)]T = [5sin(0.2t), 5cos(0.2t),t]T ,
, the desired formation structure is a triangle, and the desired relative positions from each
follower to the leader are given by dd10 = [0, 0, 10]T , d20 = [10cos( 7π 7π T
6 ), 0, 10sin( 6 )] , d30 =
[10cos( −π −π T
6 ), 0, 10sin( 6 )] .
In the simulation, the initial states of each follower quadrotor are listed in Tables
4.2–4.3 and the initial states of each finite-time observer are given in Table 4.4.
12
Table 4.2. Initial Position and Linear Velocity of Each Quadrotor
Label [xi (0), yi (0), zi (0)]T , m [ẋi (0), ẏi (0), żi (0)]T , m/s
1 [0, 0, 0]T [0, 0, 0]T
2 [0, 2.5, 0]T [0, 0, 0]T
3 [−2.5, 0.8, 0]T [0, 0, 0]T
Label [θi (0), φi (0), ψi (0)]T , rad [θ̇i (0), φ̇i (0), ψ̇i (0)]T , rad/s
1 [0, 0, π/6]T [0, 0, 0]T
2 [0, 0, 5π/6]T [0, 0, 0]T
3 [0, 0, −π/6]T [0, 0, 0]T
Other parameters:
η1 = η2 = η3 = 10,
ki,1 = 10, ki,2 = 10,
ki,3 = 10, ki,4 = 10,
i = 1, 2, 3
4.2 Results
The simulation results of the project will be present3d. It includes the motion
trajectory in figure 4.2, control signals in figure 4.3, output and errors about position in
figure 4.4-4.5, attitide in figure 4.6-4.7 of all follower quadrotors
13
Figure 4.2. Trajectories of all follower quadrotors
14
Figure 4.4. Position output of all quadrotors
15
Figure 4.6. Attitude output of all follower quadrotors
Remark 1 From the simulation results, we see that the position output of the following
quadrotors follows the virtual leading quadrotor with position distances after about 4s.
The position and state errors approach 0. From there, we can see that the method of
combining observers to support formation formation achieves the desired results through
simulation.
16
4.3 Conclusions for Chapter 4
In this chapter, a scenarios in simulation are introduced to verify the effectiveness
of the proposed control algorithm. All results are analyzed in data and figures with
different criteria to perceive the entire terms of the proposed control methodology
17
CONCLUSION
In this thesis, the problem of formation control for a class of quadrotor systems has
been investigated. To reduce reliance on the requirement for accurate state information of
the leading mobile robot, a state estimator is employed to facilitate coordinated support
tasks through theoretical analysis. Distributed formation control laws are constructed
based on data from each agent’s observation set. Lyapunov stability theory is applied to
demonstrate the convergence of the tracking error during the formation process.
18
REFERENCES
[1] B. Zhao, B. Xian, Y. Zhang, and X. Zhang, “Nonlinear robust adaptive tracking con-
trol of a quadrotor uav via immersion and invariance methodology,” IEEE Transac-
tions on Industrial Electronics, vol. 62, no. 5, pp. 2891–2902, 2014.
[3] H. Du, W. Zhu, G. Wen, Z. Duan, and J. Lü, “Distributed formation control of
multiple quadrotor aircraft based on nonsmooth consensus algorithms,” IEEE trans-
actions on cybernetics, vol. 49, no. 1, pp. 342–353, 2017.
[5] L. Dou, X. Ma, C. Yang, M. Du, and X. Wang, “Distributed finite-time formation
control for quadrotors based on adaptive state observer,” in 2019 Chinese Control
Conference (CCC), pp. 8085–8090, IEEE, 2019.
[6] L. Dou, C. Yang, D. Wang, and T. Chen, “Distributed finite-time formation con-
trol for multiple quadrotors with leader state unmeasurable,” in 2018 37th Chinese
Control Conference (CCC), pp. 9843–9848, IEEE, 2018.
19