Ashis 2019
Ashis 2019
Abstract—Parrot Rolling Spider/minidrone is one of the most drone. The nonlinear model of the quadcopter was linearised
favoured quadcopters around the world which is used for using Jacobian method in [10]. A full state feedback controller
academic and experimental purposes. This paper deals with the was designed here for measuring all the 12 states of the
mathematical modeling of kinematics and dynamics of the parrot
minidrone, employing linear feedback controller for stabilizing quadcopter. The PID controller was tested on a hardware
the system and a comparative analysis of altitude control of prototype [14]. The primary aim of selecting parrot minidrone
Parrot minidrone using Proportional Integral Derivative (PID) for the simulation studies is its availability. Unlike most of the
and Linear Quadratic Regulator (LQR) control techniques. drones, this minidrone is compatible with Simulink working
Matlab/SIMULINK software was used for simulating the plant environment. This work has a step by step approach for
response. The Simulink support package for parrot minidrones
was used for obtaining the parameters of the system. All the studying the system in detail and it has been organized into
studies and simulations conducted in this paper are based different sections. The next section describes the properties of
on kinematics and dynamics of parrot minidrone. The highly the system under study in detail. Successive sections include
nonlinear plant model is linearized around equilibrium points the modelling of the system, controller design, estimation and
and a linear feedback controller is employed for stabilizing the simulation studies.
system.
Keywords—PID, LQR, Matlab, SIMULINK, Parrot Rolling spi-
der II. S YSTEM D ESCRIPTION
The Parrots Rolling Spider is a palm size quadcopter which
I. I NTRODUCTION
works with Bluetooth Low Energy (BLE) technology. It can
Researches on Unmanned Aerial Vehicles (UAVs) are in- be operated with a smartphone which supports BLE. Since
creasing day by day. Because of its huge popularity, UAVs the minidrone weighs only 55 grams, it is more sensitive to
are a hot topic nowadays. A UAV does not carry a human environmetal disturbances. It includes a 3 axis accelerometer, 3
pilot on it. These aerial vehicles are really helpful to test axis gyroscope, 0.3 megapixel 60fps downward facing camera
and evaluate new ideas in the fields like flight control theory, and a pressure sensor. It is compatible with Windows and
robotics, GPS navigation etc. The UAV market is growing Linux operating systems. It has an operating range of 20
everyday with variety of UAVs. Among them, quadcopters meters and is powered by a 550 mAh Lithium-Polymer (Li-
are the widely used ones because of its huge popularity and Po) removable battery which can give a flight time of 8 min-
symmetry. Quadcopters are more vulnerable to environmental utes/6minutes (with wheels). The four BLDC motors mounted
disturbances because of its compact structure. They make use above the drone rotates the propellers. The motherboard of the
of Vertical Take off and Landing (VTOL) technology [15]. rolling spider features Parrot SIP6 chipset with an 800 MHz
Many online delivery companies are on their development Arm A9 processor. The Fig 1 shows the Parrot Rolling Spider
stage to deliver products using drones at the doorstep of their [16].
customers. A stable hovering should be achieved by the system
for this process. LQR has been used over many years in
robotics and it is one of the most trusted control algorithms.
This paper focuses on detailed mathematical modeling of a
quadcopter UAV. For simulation studies, a support package
from Simulink for parrot minidrones was used and was studied
in detail. A practical approach was needed for students to test
their knowledge on flight dynamics, control theory etc. The
Simulink support package for parrot minidrones is a good
initiative from Matlab for this. The lab experiments done in
[4] using parrot minidrone had achieved a stable hovering
Fig. 1. Parrot Rolling Spider
Authorized licensed use limited to: Auckland University of Technology. Downloaded on May 27,2020 at 22:00:05 UTC from IEEE Xplore. Restrictions apply.
2019 2nd International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT)
Authorized licensed use limited to: Auckland University of Technology. Downloaded on May 27,2020 at 22:00:05 UTC from IEEE Xplore. Restrictions apply.
2019 2nd International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT)
The nonlinear model in (11) can further be simplified by A and B are the state matrix and input matrix respectively.
neglecting the forces produced by the wind on quadcopter. The system must be controllable for the design of controllers.
For introducing optimal control, the nonlinear system need to The parameters used for simulating the model in matlab are
be linearized. listed in Table I.
B. Linearization TABLE I
M ODEL PARAMETERS
The nonlinear state space equations can be linearized around
an operating point x̄ with a constant input value ū. A zero atti- Symbols Values Description
m 0.068 kg Mass of the quadcopter
tude condition was considered for linearization. Linearization g 9.81 m/s2 Gravitational constant
of the quadcopter model has been performed for a hovering Ix 0.0686*10−3 kg.m2 MOI along x axis
configuration and is carried out to obtain a generalized linear Iy 0.092*10−3 kg.m2 MOI along y axis
state space model of the form, Iz 0.1366*10−3 kg.m2 MOI along z axis
rho 1.184 kg/m3 Density of air
˙ = Ax(t) + Bu(t)
x(t) (12) b 0.0107 Thrust factor
l 0.0624 m Rotor to drone centre length
r 0.033 m Rotor radius
where,
0 0 0 1 0 0 0 0 0 0 0 0
0 IV. C ONTROLLER D ESIGN
0 0 0 1 0 0 0 0 0 0 0
A. PID control
0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 A linear PID controller can be applied on a nonlinear
0 0 0 0 0 0 0 0 0 0 0 0 system without linearizing the system dynamics about the
0 0 0 0 0 0 0 0 0 0 0 0 equilibrium point. The controller can still stabilize the system
A= (13)
0
−g 0 0 0 0 0 0 0 0 0 0
in case of external forces. The Simulink support package for
g 0 0 0 0 0 0 0 0 0 0 0 parrot minidrones was utilized for the PID control simulation.
0 0 0 0 0 0 0 0 0 0 0 0 This package includes one Simulink model with dynamics of
0 0 0 0 0 0 1 0 0 0 0 0 linear and nonlinear model. It also includes sensor dynamics
0 0 0 0 0 0 0 1 0 0 0 0 and disturbance. The flight control system bock includes six
0 0 0 0 0 0 0 0 1 0 0 0 PID controllers for stabilizing the system. A Proportional
Derivative (PD) controller was sufficient enough for the system
0 0 0 0
to stabilize itself at a reference altitude. The PID control output
0 0 0 0 is given as,
0 0 0 0
Z
0 1
0 0
de(t)
Ix
1
u(t) = Kp e(t) + Ki e(t)dt + Kd (15)
dt
0 0 Iy 0
0 1 where u(t) denotes the control input, Kp denotes the propor-
0 0
B= Iz (14)
0
0 0 0 tional gain, Ki denotes the integral gain and Kd denotes the
0
0 0 0 derivative gain. The tracking error,
1 0 0 0
m
0
e(t) = y(t) − r(t) (16)
0 0 0
0 0 0 0 where y(t) and r(t) are the output and the desired output of
0 0 0 0 the system respectively.
Authorized licensed use limited to: Auckland University of Technology. Downloaded on May 27,2020 at 22:00:05 UTC from IEEE Xplore. Restrictions apply.
2019 2nd International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT)
B. Linear Quadratic Regulator The LQ control simulation for the minidrone has been
LQR formulates a state feedback law for a full state feed- shown in Fig 5. The control input given to the drone and
back control. The state feedback law for LQR is, the altitude output obtained after simulation has been plotted.
For LQ control, equation (17) is used as the controller model,
with parameters R = diag(0.01, 0.01, 0.01, 0.01) and Q =
u = −Kx (17)
diag(0, 0, 0, 0, 0, 0, 0, 0, 150, 150, 150, 150). From the plot, it
where u and K are the control input and the state feedback can be seen that the drone was able to track the reference
gain respectively. The process is assumed to be a continuous command.
time Linear Time Invariant (LTI). The function to be mini- Output
mized is given by, 2.5
2
z reference
z
Altitude(m)
Z ∞ 1.5
0 0
-0.5
where Q, R and and N are the state cost, control cost and 0 1 2 3 4 5
Time(s)
6 7 8 9 10
Control input
an optional cross term matrices respectively subject to the 60
40
dynamics of the system,
Voltage(V)
20
0
˙ = Ax(t) + Bu(t)
x(t) -20
(19) -40
y(t) = Cx(t) 0 1 2 3 4 5
Time(s)
6 7 8 9 10
The LQR controller generates the control law using A, B, Q Fig. 5. Altitude control with LQR
and R matrices. Solution of S can be obtained by solving the
Algebraic Riccati equation, The performance evaluation of the controllers has been
T
A S + SA − (SB + N )R −1 T T
(B S + N ) + Q = 0 (20) tabulated in Table II. From the table, it can be observed that
the LQR can give a better response than PID.
K can be derived as,
TABLE II
K = R−1 (B T S + N T ) (21) P ERFORMANCE EVALUATION OF CONTROLLERS
V. S IMULATION RESULTS Controller Settling time Peak overshoot Steady state error
PID 3 1.605 0.005
Matlab/SIMULINK software was used for simulating the LQR 2.5 1.56 0.005
plant model using PID and Linear Quadratic (LQ) control.
The altitude responses with PID and LQR controllers has
been plotted. Using equation (1) as the nonlinear model, a VI. C ONCLUSION AND FUTURE SCOPE
PID controller in the form of (15) was considered with a A nonlinear mathematical model of the Parrot Rolling
sampling time of T s = 0.05 second. The altitude control Spider, considering kinematics and dynamics of the system
of parrot minidrone using PID control is shown in Fig 4. A has been derived. Simulation on altitude control of the quad-
reference command of 1.5 meters was given to the model. copter using PID and LQR control has been done using
The PD controller for altitude control was able to stabilize the Matlab/SIMULINK software and simulation outputs has been
system within 5 seconds. The PD controller made the system observed. From the simulation studies it can be observed that
to hover at 1.5 meters. Tuning the PD controller for Kp = 0.8 the steady state error caused when using PID controller has
and Kd = 0.3 will result in a hovering control. been considerably reduced when LQ control technique was
introduced. Also the LQ control provided a better tracking of
1.8
PID control output the system with minimum settling time. This paper focussed
z
1.6 z reference on simulation studies of a stable hovering drone. Tuning the
1.4 PID control parameters was not that much difficult across
1.2
the studies. The minidrone was able to achieve stability at
Altitude (meter)
1
hovering condition by using the two controllers discussed in
0.8
the paper. When compared to the conventional PID control
0.6
technique, optimal control can ignore the difficulty in tuning
0.4
the PID control parameters. Instead of using six PID con-
0.2
trollers for the whole system, one LQR controller will be
0
enough for multiaxis control of minidrone. Future studies can
0 5 10 15 20 25 30
Time (seconds)
be carried out on the actual hardware by making use of the
Parrot minidrone support package from the Simulink which
Fig. 4. Altitude control with PID comes from the Aerospace blockset. The control technique
Authorized licensed use limited to: Auckland University of Technology. Downloaded on May 27,2020 at 22:00:05 UTC from IEEE Xplore. Restrictions apply.
2019 2nd International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT)
Authorized licensed use limited to: Auckland University of Technology. Downloaded on May 27,2020 at 22:00:05 UTC from IEEE Xplore. Restrictions apply.