Dynamics Modelling and Linear Control of Quadcopter
Dynamics Modelling and Linear Control of Quadcopter
Abstract – In this paper, a cascade PID feedback control PID, PI-D and I-PD controllers are compared and examined
algorithm is proposed to stabilize the attitude of a quadcopter so with respect to the best performance [5]. Optimized PID control
that the balancing state can be ensured in spite of disturbances. A method is proposed in [6], two simulations are carried out with
mathematical model of quadcopter dynamics is developed by respect to optimized PID and Back-step controller. Other kinds
applying Newton-Euler method. It reveals the exact relationships
among all the variables involved. Both linear and nonlinear state-
of control strategies are also mentioned in such as H infinity [7],
space equations are derived afterwards, which are essential for the linear quadratic optimal control, back-stepping control [8],
controller design and further development. The simulations are sliding mode control [9] and so on.
also carried out to demonstrate the effectiveness and robustness of Many people have emphasized the merits of PID control
the cascade PID algorithm compared with classic PID control method in their papers [10] [11] [12], and it is true that the PID
scheme. control technique has been widely used in many areas and
Keywords— quadcopter; cascade PID; Newton-Euler method; provides an effective performance in controlling unstable
dynamics systems. Nonetheless, the drawback of PID control method is
when the disturbance results a large error in the system, the
I. INTRODUCTION
transient response of systems in terms of settling time,
The multi-rotor helicopter has experienced a remarkable overshoots and steady-state response will be compromised
development over last decade, the most commonly used and which presents a weaker robustness [13]. Especially in the
studied one is the quadcopter which is also known as a quadcopter system, the external disturbances always cause a
quadrotor. It has drawn a lot attention from engineers and large tracking error, which raises the difficulty of controller
researchers due to its simple mechanical structure and a massive design [14]. Hence, a robust cascade PID algorithm is proposed
growth in applications. Recently, the quadcopter becomes one to improve the stability by lowering the system sensitivity to the
of the most popular studied systems in control area. It severs as external disturbances. In addition, the mathematical models of
an excellent test-bed for investigating the behavior of multiple- quadcopter dynamics are usually derived from Euler-Lagrange
input multiple-output (MIMO) systems. In general, there are or Newton-Euler methods [15] [16], the latter is employed and
two types of quadcopter configuration, which are the plus and the dynamics of motors are taken into account during the
cross structures respectively. In this paper, the dynamics modelling for maximum accuracy and feasibility [17]. In
modelling and controller design are based on the latter section III, the proposed cascade PID controller is developed
structure. The quadcopter is seen as an under-actuated system based on the linear model of the system. In section IV, the
which has six degrees of freedom (three translational and three simulations of cascade PID and a parallel structure PID
rotational) [1], but with only four independent inputs (the speed controllers are both performed.
of each motor), this brings the strong coupling of rotational and
translational dynamics . Due to the under-actuated properties of
quadcopters, maintaining its balancing state or a desired attitude
becomes more challenging. Therefore, the control algorithm
design is very important and modelling a more realistic
dynamic model of a quadcopter is also crucial.
Over the last decade, various control methodologies have
been proposed to investigate the attitude control problem of
unmanned aerial vehicles (UAV). Both linear and nonlinear
control schemes are involved. In [2] [3] [4]the model-based PD
and Linear Quadratic Regulator (LQR) control schemes are
applied to an indoor micro quadcopter. The PID algorithm in Fig. 1 Quadcopter aerial vehicle
three structures are considered to formulate the control tasks,
499
ି௨భ
ݕሷ ൌ ሺ
߶ ߠ ݊݅ݏ ߰ ݊݅ݏെ ܿ߶ ݊݅ݏ ߰ ݏሻ Occasionally, the dynamics of brushless DC motors are not
taken into consideration or highlighted during the mathematical
௨భ modelling of the quadcopter dynamics [19] [20] [21], which
ݖሷ ൌ ݃ െ ሺܿߠ ݏܿ ߶ ݏሻ (12) may degrade the performance of the controller to a certain
degree.
It is noted that the dynamics of quadcopters are highly nonlinear In this paper, a static function is introduced to approximate the
and strongly coupled, so the linearization is performed around dynamics of motors in the linear operating region. For control
an equilibrium point to simplify the mathematical model and purposes, the relation between throttle input and steady-state
decouple its dynamics based on previous assumptions: angular speed of motors is shown as:
௨
߶ሷ ൌ మ ߱௦ ൌ ሺ݄݈ܶ݁ݐݐݎΨሻ݇ ் ܾ (15)
ۓ ூೣೣ
ۖ ௨య
ۖ ߠሷ ൌ where ݇ ் is a conversion coefficient, ܾ is the offset parameter
ூ
ۖ ௨ర which is a constant.
߰ሷ ൌ (13)
ூ
۔ III. ATTITUDE CONTROL SCHEME
ݔሷ ൌ െ ݃ߠ
ۖ In order to maintain the balance or a desired attitude of the
ۖ ݕሷ ൌ ݃߶
ۖ ௨భ quadcopter, a classic PID controller is commonly used,
ݖەሷ ൌ ݃ െ however, it cannot provide a robust performance, regardless of
whether the controlling target is Euler angle or angular rate
The internal state is defined as: [22]. In general, the control outputs of the classic PID controller
only depend on the error value of the Euler angles, the impact
ܠൌ ሾݖ ݖሶ ߰߰ሶ ݔ ݔሶ ߶ ߶ሶ ݕݕሶ ߠ ߠሶሿ் of angular rate to the system transient response is completely
overlooked [23], thus the performance of the controller is
Therefore, the state space form of the linear dynamics model limited. Hence, a new approach has been developed which is
can be represented by: cascade PID algorithm. For a system with multiple sensors
available, a cascade control system can achieve a better
ݔሶ ൌ ݔ ݑ (14) performance than the classic PID controller. The cascade
control is composed of two PI controllers in series, the control
output of the primary controller serves as the set point for the
where
secondary controller, then the output of the secondary controller
Ͳ ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ
Ͳۍ will feedback and affect the primary controller. For the
Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳې quadcopter, the primary controller designed is an angle
Ͳێ Ͳ Ͳ ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳۑ
ێ ۑ controller, and its control output is the desired angular rate,
Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ which serves as the set point of the secondary controller - the
ێ ۑ
Ͳێ Ͳ Ͳ Ͳ Ͳ ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳۑ angular rate controller. The actual angular rate loop operates
Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ ݃ Ͳ Ͳ Ͳ Ͳ Ͳۑ much faster than the actual angle loop, which allows it to have
ൌێ
Ͳێ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ ͳ Ͳ Ͳ Ͳ Ͳۑ enough time to compensate for disturbances. The cascade
Ͳێ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳۑ control not only drives the current Euler angle converge to the
Ͳێ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ ͳ Ͳ Ͳۑ desired angle, but also restricts the angular rate during the
Ͳێ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ െ݃ Ͳۑ convergence. So the transient response of the cascade controller
Ͳێ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ ͳۑ will be much smoother than the classic PID controller, this
Ͳۏ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳے control technique can ensure that both Euler angle and angular
rate are measured and controlled in the close-loop system. The
Ͳ Ͳ Ͳ Ͳ robustness of the quadcopter system can be improved greatly.
ۍଵ ې The design of the cascade PID controller is shown below:
Ͳ Ͳ Ͳ
ێ ۑ
Ͳێ Ͳ Ͳ Ͳۑ
Ͳێ ଵ
Ͳ Ͳۑ
ێ ூೣೣ ۑ
Ͳێ Ͳ Ͳ Ͳۑ
Ͳێ Ͳ Ͳ Ͳۑ
ൌ Ͳێ Ͳ Ͳ Ͳۑ
Ͳێ Ͳ
ଵ
Ͳۑ
ێ ூ ۑ
Ͳێ Ͳ Ͳ Ͳۑ
Ͳێ Ͳ Ͳ Ͳۑ
Ͳێ Ͳ Ͳ Ͳۑ Fig. 2 Cascade PID control structure
ێ ଵۑ
Ͳۏ Ͳ Ͳ
ூ ے
500
The control algorithm is designed to control the attitude of a IV. SIMULATION RESULTS
quadcopter according to user instructions, the control inputs are Two PID controllers were tested in a simulation
chosen as ሾݑଵ ݑଶ ݑଷ ݑସ ሿ் , which can be rewritten as: environment. First, a classic PID controller (or angle controller)
was tested followed by an advanced cascade PID controller.
ݑଵ ݇ ݇ ݇ ݇ ߱ଶ Four different conditions were considered to examine the
ۍ ۍ ېଵଶ ې
ݑ െ݇ ݈ ݇ ݈ ݇ ݈ െ݇ ݈ ߱ێ ۑଶ ۑ performance of these two control schemes: (i) taking off; (ii)
ଶ ൌ ێ Ǥ ێଶۑ (16) single roll command; (iii) multiple commands (roll, pitch, yaw);
ݑଷ ێ݇ ݈ ݇ ݈ െ݇ ݈ െ݇ ݈ ߱ێ ۑଷ ۑ
ݑସ ۏ݇ െ݇ ݇ െ݇ ߱ۏ ےସଶ ے and (iv) external disturbance injection.
501
Fig. 6 Response of rolling command with cascade PID control Fig. 9 Disturbance rejection with PID control
Fig. 7 Roll, pitch, and yaw command with PID control On the basis of simulation results, it has seen that the
cascade PID control scheme reduced the overshoot of the
system, and the response speed of the quadcopter is increased
dramatically. This resulted in the quadcopter system being more
stable and robust when the attitude changes. Stable flight is also
guaranteed without large drifts.
V. CONCLUSION
A robust cascade PID control algorithm has been developed
based on the dynamic model of a quadcopter in this paper. The
main advantage of the cascade PID control scheme is its strong
robustness against to external disturbances. In addition, classic
and cascade PID control schemes have been compared to
demonstrate the effectiveness of the designed controller. The
simulation results of quadcopter attitude control are given to
Fig. 8 Roll, pitch ,and yaw command with cascade PID control support the proposed control algorithm. To conclude, the
cascade PID control scheme provides an excellent performance
boost to the quadcopter system. The future work will be focused
on developing sliding mode control algorithms with a nonlinear
dynamic model, so that the robustness and performance of the
quadcopter system against parameter uncertainties and external
disturbances can be improved.
502
VII. REFERENCES [12] J. Li and Y. Li, "Dynamic analysis and PID control for a quadrotor," in
2011 IEEE International Conference on Mechatronics and Automation,
[1] I. Sa and P. Corke, "System identification, estimation and control for a 2011, pp. 573-578.
cost effective open-source quadcopter," in Robotics and Automation [13] Y.-R. Tang and Y. Li, "Dynamic modeling for high-performance
(ICRA), 2012 IEEE International Conference on, 2012, pp. 2202-2209. controller design of a UAV quadrotor," in Information and Automation,
[2] L. M. Argentim, W. C. Rezende, P. E. Santos, and R. A. Aguiar, "PID, 2015 IEEE International Conference on, 2015, pp. 3112-3117.
LQR and LQR-PID on a quadcopter platform," in Informatics, [14] S. Bouabdallah, P. Murrieri, and R. Siegwart, "Design and control of an
Electronics & Vision (ICIEV), 2013 International Conference on, 2013, indoor micro quadrotor," in Robotics and Automation, 2004.
pp. 1-6. Proceedings. ICRA'04. 2004 IEEE International Conference on, 2004,
[3] B. Erginer and E. Altug, "Modeling and PD control of a quadrotor pp. 4393-4398.
VTOL vehicle," in 2007 IEEE Intelligent Vehicles Symposium, 2007, pp. [15] M. Bergamasco and M. Lovera, "Identification of linear models for the
894-899. dynamics of a hovering quadrotor," IEEE Transactions on Control
[4] S. Bouabdallah, A. Noth, and R. Siegwart, "PID vs LQ control Systems Technology, vol. 22, pp. 1696-1707, 2014.
techniques applied to an indoor micro quadrotor," in Intelligent Robots [16] H. Yang and D. Lee, "Dynamics and control of quadrotor with robotic
and Systems, 2004.(IROS 2004). Proceedings. 2004 IEEE/RSJ manipulator," in 2014 IEEE International Conference on Robotics and
International Conference on, 2004, pp. 2451-2456. Automation (ICRA), 2014, pp. 5544-5549.
[5] G. Szafranski and R. Czyba, "Different approaches of PID control UAV [17] J. d. J. Rubio, J. P. Cruz, Z. Zamudio, and A. Salinas, "Comparison of
type quadrotor," in International Micro Air Vehicle conference and two quadrotor dynamic models," IEEE Latin America Transactions, vol.
competitions 2011 (IMAV 2011),'t Harde, The Netherlands, September 12, pp. 531-537, 2014.
12-15, 2011, 2011. [18] E. Balasubramanian and R. Vasantharaj, "Dynamic Modeling and
[6] H. Bolandi, M. Rezaei, R. Mohsenipour, H. Nemati, and S. M. Control of Quad Rotor," vol. 5, pp. 63-69, Feb. 2013.
Smailzadeh, "Attitude Control of a Quadrotor with Optimized PID [19] C.-W. Shiu, C.-M. Hsu, and J.-H. Chou, "Analysis of a Quadrotor with a
Controller," Intelligent Control and Automation, vol. 04, pp. 335-342, Two-Degree-of-Freedom Robotic Arm," in Computer, Consumer and
2013. Control (IS3C), 2016 International Symposium on, 2016, pp. 628-631.
[7] T. Wong, R. Khan, and D. Lee, "Model linearization and HĞ, controller [20] H. Lim, J. Park, D. Lee, and H. J. Kim, "Build your own quadrotor:
design for a quadrotor unmanned air vehicle: Simulation study," in Open-source projects on unmanned aerial vehicles," IEEE Robotics &
ICARCV, 2014, pp. 1490-1495. Automation Magazine, vol. 19, pp. 33-45, 2012.
[8] S. Bouabdallah and R. Siegwart, "Backstepping and sliding-mode [21] A. Tayebi and S. McGilvray, "Attitude stabilization of a VTOL
techniques applied to an indoor micro quadrotor," in Proceedings of the quadrotor aircraft," IEEE Transactions on Control Systems Technology,
2005 IEEE international conference on robotics and automation, 2005, vol. 14, pp. 562-571, 2006.
pp. 2247-2252. [22] G. Bo, L. Xin, Z. Hui, and W. Ling, "Quadrotor helicopter Attitude
[9] R. Xu and U. Ozguner, "Sliding mode control of a quadrotor helicopter," Control using cascade PID," in Control and Decision Conference
Proceedings of the 45th Ieee Conference on Decision and Control, Vols (CCDC), 2016 Chinese, 2016, pp. 5158-5163.
1-14, pp. 4957-4962, 2006. [23] N. Cao and A. F. Lynch, "Inner-Outer Loop Control for Quadrotor
[10] A. L. Salih, M. Moghavvemi, H. A. Mohamed, and K. S. Gaeid, "Flight UAVs With Input and State Constraints," vol. 24, pp. 1797-1804, Sep.
PID controller design for a UAV quadrotor," Scientific Research and 2016.
Essays, vol. 5, pp. 3660-3667, 2010.
[11] R. Garcia, F. Rubio, and M. Ortega, "Robust PID control of the
quadrotor helicopter," IFAC Proceedings Volumes, vol. 45, pp. 229-234,
2012.
503