Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/329271703

Sensor Fusion for Attitude Estimation and PID Control of Quadrotor UAV

Article · October 2018


DOI: 10.18178/ijeetc.7.4.183-189

CITATIONS READS

12 1,563

3 authors:

Aminurrashid BIN Noordin Ariffanan Basri


Technical University of Malaysia Malacca Universiti Teknologi Malaysia
52 PUBLICATIONS   271 CITATIONS    70 PUBLICATIONS   769 CITATIONS   

SEE PROFILE SEE PROFILE

Zaharuddin Mohamed
Universiti Teknologi Malaysia
161 PUBLICATIONS   2,788 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Control of Unmanned Vehicles View project

Control of tower and overhead cranes View project

All content following this page was uploaded by Aminurrashid BIN Noordin on 12 February 2019.

The user has requested enhancement of the downloaded file.


International Journal of Electrical and Electronic Engineering & Telecommunications Vol. 7, No. 4, October 2018

Sensor Fusion for Attitude Estimation and PID


Control of Quadrotor UAV
Aminurrashid Noordin, Mohd Ariffanan Mohd Basri, and Zaharuddin Mohamed
Universiti Teknologi Malaysia, Skudai, Malaysia
Email: aminurrashid@utem.edu.my; {ariffanan; zahar}@fke.utm.my

Abstract—This paper presents sensor fusion algorithm using Quadrotor UAV is an aerial vehicle that has
nonlinear complementary filter (NCF) for attitude capabilities in vertical take-off and landing (VTOL),
estimation and a proportional-integral-derivative (PID) omni-directional flying, and easy hovering performances
controller for small-scale quadrotor unmanned aerial
in limited spaces and always being considered in research
vehicle (UAV) stabilization. From inertial measurement unit
(IMU) data, gyroscope as a main sensor is fused to another due to the simplest electronics and mechanical structures
two sensors; accelerometer and magnetometer to correct design. However, quadrotor UAV is an under-actuated
drift error of gyroscope to obtain reliable attitude and dynamically unstable system which possess with
estimation. In this paper, the performance of NCF is complex behaviours. Many presented work in literatures
implemented on real-time while applying PID controller for use ‘+’ configuration and simplified model, where non-
attitude stabilization of quadrotor UAV during hovering. linear effect is neglected. Several literatures have
Experimental results show the effectiveness of PID mentioned of proportional-integral-derivative (PID)
controller for quadrotor UAV stabilization during attitude
control a quadrotor [12]-[15] but using linearize model.
control.
Thispaper focus on low cost IMU fusion using
Index Terms—nonlinear complementary filter, quadrotor, nonlinear complementary filter for attitude estimation of
PID, UAV. quadrotor UAV and PID controller for highly nonlinear
quadrotor UAV. The system comprises of quadrotor F450
I. INTRODUCTION frame (x configuration model), and APM2.6 flight
controller with built in IMU (MPU6000) and external
Microelectromechanical systems (MEMS) is a HMC5833L compass sensor. Data from low frequencies
combination of mechanical and electrical components parts of accelerometer and magnetometer are fused to the
into microscale objects. In advanced of MEMS high frequency part of the gyroscope signal. Drift error
technology, components being small size, less expensive, by the main source (gyroscope) is corrected by
and low power consumption, sensors such as inertial accelerometer and magnetometer. A PID controller is
measurement unit (IMU) are redesigned to include onto used for attitude stabilization during quadrotor hovering.
devices such as smartphone, automotive industries and A flipped test is conducted to observed quadrotor
others application.[1]-[4]. performance during initial start on a rotating test-bed
In robotics, IMU is the main of attitude and heading fixed on one axis to ensure its stabilization before free
reference system (AHRS) to determine rotation, motion, test on 3dof experimental platform with 𝑘𝑝 , 𝑘𝑖 , and 𝑘𝑑
location and direction (generally called attitude parameter setting.
estimation) of mobile robots for automated navigation, This paper is structured as follows. Section II briefly
autonomous underwater vehicle (AUV) for global described the nonlinear quadrotor UAV modelling in
localization systems and unmanned aerial vehicle (UAV) Newton-Euler formulation. Section III explained
in aviation [1], [4]-[6]. Hence, research community and regarding sensors used in IMU such as gyroscope,
DIY hobbyist take this opportunity, utilizes small scale accelerometer and magnetometer. Section IV mentioned
IMU and focus on development of unmanned aerial sensor fusion algorithm technique used in this research.
vehicles (UAV) which is very promising vehicle for Section V shows the PID controller design method for
navigations, surveillances, and as well as educational attitude stabilization of quadrotor UAV. Section VI gives
purposes [7]-[10]. the experiments results and conclusions are stated in
However, IMU sensor performance is commonly Section VII.
effected by biases and noises which tend to drift over
time for especially gyroscope and reduce the accuracy of
II. QUADROTOR MODEL
measurement. Therefore, most researcher applied sensor
fusion algorithms techniques to overcome the Quadrotor UAV is a type of helicopter that can be
measurement errors and obtaining accurate reading [1], controlled by varying the rotor speeds. It is an under-
[4], [5], [11]. actuated, dynamic vehicle with four input forces and six
output coordinates. Quadrotor UAV composed of four
Manuscript received January 5, 2018; revised July 10, 2018. rotors with symmetrically arrangement where two

©2018 Int. J. Elec. & Elecn. Eng. & Telcomm. 183


doi: 10.18178/ijeetc.7.4.183-189
International Journal of Electrical and Electronic Engineering & Telecommunications Vol. 7, No. 4, October 2018

diagonal motors (1 and 2) are running in the same From general Newton-Euler translational and
direction whereas the others (3 and 4) in the other rotational dynamics, the quadrotor dynamics, is described
direction to eliminate the anti-torque [10], [14], [16]. as (3) and (4) respectively, where, 𝑔 is gravitational
Quadrotor UAV have been designed with coefficient, 𝐸𝑧 is vector matrix of z-axis defined as
symmetrically structure in either ‘x’ mode configuration [0 0 1]𝑇 , 𝑈1 is total thrust force generated by four rotors.
or ‘+’ mode configuration. This research used ‘x’ mode 𝐼 is the moments of inertia for the quadrotor, a diagonal
𝑇
configuration quadrotor as illustrated in Fig. 1, where the matrix 3-by-3 and defined as 𝐼 = diagonal[𝐼𝑥𝑥 𝐼𝑦𝑦 𝐼𝑧𝑧 ] . 𝐽𝑟
coordinate systems of two reference frames describe the is rotor inertia, Ω𝑑 is total rotor speeds generated from the
dynamics of a quadrotor; an earth fixed initial reference two pairs of rotor. 𝑈2 , 𝑈3 and 𝑈4 are total torque, 𝜏related
frame, {E} and a body fixed reference frame {Q} located to quadrotor as of total summation of Coriolis torque, 𝜏𝑐 ,
at the center of gravity (COG) of quadrotor body frame and Gyroscopic torque, 𝜏𝑔 and quadrotor body frame
which is a rigid body in free motion with six Degree of torque, 𝜏𝑎 .
Freedom (DOF) consist of three translational and three
rotational. 𝑚𝜉̈ = 𝑚𝑔𝐸𝑧 + 𝑈1 𝑅𝑇 𝐸𝑧 (3)
𝐼𝜂̈ = −𝜂 × 𝐼𝜂 − 𝐽𝑟 (𝜂 × 𝐸𝑧 )Ω𝑑 + [𝑈2 𝑈3 𝑈4 ]𝑇 (4)
Finally, from (3) and (4), the final equation for
quadrotor translation dynamics and rotational dynamics
can be formulated as
𝑚𝑥̈ = 𝑈1 (𝑆𝜓𝑆𝜙 + 𝐶𝜓𝑆𝜃𝐶𝜙)
𝑚𝑦̈ = 𝑈1 (−𝐶𝜓𝑆𝜙 + 𝑆𝜓𝑆𝜃𝐶𝜙)
𝑚𝑧̈ = 𝑚𝑔 + 𝑈1 (𝐶𝜃𝐶𝜙) (5)
𝐼𝑥𝑥 𝜙̈ = (𝐼𝑦𝑦 − 𝐼𝑧𝑧 )𝜓̇𝜃̇ − (𝐽𝑟 Ω𝑑 )𝜃̇ + 𝑙𝑈2
𝐼𝑦𝑦 𝜃̈ = (𝐼𝑧𝑧 − 𝐼𝑥𝑥 )𝜓̇𝜙̇ + (𝐽𝑟 Ω𝑑 )𝜙̇ + 𝑙𝑈3
Figure 1. Inertial coordinate systems and body-fixed frame for x 𝐼𝑧𝑧 𝜓̈ = (𝐼𝑥𝑥 − 𝐼𝑦𝑦 )𝜃̇𝜙̇ + 𝑈4 (6)
configuration quadrotor
III. INERTIAL MEASUREMENT UNIT
For the modelling, the following assumption is
defined for simplification [17]: With advanced in MEMS, 3-axis gyroscopes are often
implemented with a 3-axis accelerometer to provide a full
1. The quadcopter is assumed as a rigid body.
6 degree-of-freedom (DOF) motion tracking system for
2. The quadcopter’s structure is assumed as
many applications such unmanned aerial vehicles (UAV),
symmetric with respect to the XY-axis.
mobile robot and smartphone. With 3-axis digital
3. The centre of mass and the origin of the body compass additional of 3-DOF can assist on a heading for
fixed frame are coinciding. a system for correct orientation during locomotion. Fig. 2
4. The propellers are considered as rigid; no blade shows 6-DOF MPU6000 comprise of gyro and
flapping occurs. accelerometer. 3-axis compass can be attached as
5. The four propellers work under the same auxiliary sensor for attitude estimator system such used in
conditions at any time, meaning that thrust APM2.6.
coefficient, and reaction torque coefficient, are the
same for all propellers.
The generalized coordinates for the quadrotor based
on Fig. 1 can be described as follow:
Figure 2. A 6-DOF – Gyro/Accelerometer
𝜉 = [𝑥, 𝑦, 𝑧]𝑇 ∈ ℝ3 , 𝜂 = [𝜙, 𝜃, 𝜓]𝑇 ∈ ℝ3 (1)
A. Gyroscope
whereas, in (1) vector 𝜉 , denotes the position of the
A gyroscope is a device typically used for navigation
quadrotor relative to inertial frame, vector 𝜂, denotes the by measurement of angular velocity and estimated
attitude of the quadrotor. The relation of body fixed changing in orientation [18]. However, for a long term,
reference frame, {Q} respect to earth fixed initial Gyroscope reading tend to drift from static condition.
reference frame, {E} satisfy as {𝑄}𝑇 = 𝑅𝑇 × {𝐸}𝑇 . Gyroscopes can measure rotational velocity up to three
Equation (2) defines the rotation matrix 𝑅𝑇 , where, S and directions. In IMU, a gyroscope or gyros sensor as shown
C stands for trigonometric operators ‘sin’ and ‘cos’ in Fig. 3 is used to detect rotation speed to measure
respectively. angular velocity or in other term called angular rate with
𝐶𝜓𝐶𝜃 −𝑆𝜓𝐶𝜙 + 𝐶𝜓𝑆𝜃𝑆𝜙 𝑆𝜓𝑆𝜙 + 𝐶𝜓𝐶𝜙𝑆𝜃 measurement unit degree per second (°/s) or revolution
𝑅 𝑇 = [𝑆𝜓𝐶𝜃 𝐶𝜓𝐶𝜙 + 𝑆𝜓𝑆𝜃𝑆𝜙 −𝐶𝜓𝑆𝜙 + 𝐶𝜙𝑆𝜓𝑆𝜃] (2) per second (RPS).
−𝑆𝜃 𝐶𝜃𝑆𝜙 𝐶𝜃𝐶𝜙

©2018 Int. J. Elec. & Elecn. Eng. & Telcomm. 184


International Journal of Electrical and Electronic Engineering & Telecommunications Vol. 7, No. 4, October 2018

For three axes rotation, the same concept is applied as


shown in Fig. 5 where roll angle (𝜙) and pitch angle (𝜃)
can be computed as (8) and (9) respectively. The rotation
follows typical right-hand rules law:

𝜙 = tan−1 (𝐴𝑦 /√𝐴2𝑥 + 𝐴2𝑧 ) (8)


Figure 3. A 3-Axis Gyro Sensor (Source: Adafruit Industries, 2017)
𝜃 = tan−1 (𝐴𝑥 /√𝐴2𝑦 + 𝐴2𝑧 ) (9)
By integrating the angular rate (reading from sensor) C. Magnetometer
of each axis, the roll angle (𝜙), the pitch angle (𝜃), and
A magnetometer as shown in Fig. 6 can sense where
the yaw angle (𝜓) can be obtained using (7) as follow
the strongest magnetic force is coming from, generally
𝜙 = ∫ 𝜔𝑥 𝑑𝑡 used to detect magnetic north. Therefore, as for digital
compass, magnetometer sensor is used to provide heading
𝜃 = ∫ 𝜔𝑦 𝑑𝑡 information where the heading system calculation
𝜓 = ∫ 𝜔𝑧 𝑑𝑡 (7) depending to magnetic data (X, Y, Z) therefore the
compass orientation can be mathematically rotated to
Standard control range of angle in aviation system is horizontal plane as show in Fig. 7. Based on this figure, X,
between −180 to 180 degrees. Therefore, result from (7) Y, and Z from magnetic sensor reading can be
need to be adjusted within this range. transformed to the horizontal plane (Xh, Yh) by applying
B. Accelerometer the rotation as (10) with aided from tilt sensing roll (𝜙)
and pitch (𝜃) from an accelerometer sensor. As such it is
An accelerometer sensor as shown in Fig. 4 is a useful to determine absolute orientation in the NEWS
dynamic MEMs sensor used to measure acceleration plane of any systems during navigation [20].
forces up to three orthogonal axes. Measurement unit of
accelerometer typically in gravitational motion (g) where 𝑋ℎ = 𝑚𝑥 cos(𝜙) + 𝑚𝑦 sin(𝜙) − 𝑚𝑧 cos(𝜃) sin(𝜙)
1g is equivalent to 9.8m/s2 which is acceleration cause of
earth gravity. However, for linear displacement 𝑌ℎ = 𝑚𝑦 cos(𝜃) + 𝑚𝑧 sin(𝜃) (10)
measurement, recorded data need to be integrated two From (10) then, the heading information can be
times which tend to drift over a time and very sensitive to calculated as
environmental noise [3], [19]. 𝑌
In other way, from an accelerometer, a tilt angle can be Heading = 𝜓ℎ = atan2( ℎ ) (11)
𝑋ℎ
sense and estimate as described on Freescale
Semiconductor Application Note used by [20].

Figure 6. A 3-Axis Magnetometer Sensor (Source: Adafruit Industries,


Figure 4. A 3-Axis Accelerometer Sensor (Source: Adafruit Industries, 2017)
2017)

Figure 7. Tilt sensing angle in local horizontal plane defined by gravity


(a) Rotate about x-axis (Caruso, 2000)

IV. SENSOR FUSION ALGORITHM


Based on [20] and [21], in this sensor fusion,
gyroscope signal is used as references for orientation of
the UAV to update the direct cosine matrix (DCM).
Accelerometer and magnetometer are used to correct drift
error from gyroscope and heading error. A feedback
(b) Rotate about y-axis proportional integral (PI) controller is used to eliminate
Figure 5. Three Axes tilt sensing for (a) Roll angle and (b) Pitch angle the steady state error in this system.

©2018 Int. J. Elec. & Elecn. Eng. & Telcomm. 185


International Journal of Electrical and Electronic Engineering & Telecommunications Vol. 7, No. 4, October 2018

DCM for rigid body frame respect to earth frame The yaw error in the earth frame is the z component of
expressed in Euler angles is described as (3). For small the cross product of the Heading vector and the x column
angle rotation, 𝑆𝜙 → 𝜙, 𝑆𝜃 → 𝜃, 𝑆𝜓 → 𝜓 and the cosines of the R matrix
of these angles approach unity. By neglecting the 𝑒𝑦𝑎𝑤(𝑒𝑎𝑟𝑡ℎ) = 𝑟𝑥𝑥 𝐻𝑒𝑎𝑑𝑖𝑛𝑔𝑦 − 𝑟𝑦𝑦 𝐻𝑒𝑎𝑑𝑖𝑛𝑔𝑥 (19)
products of the angles because become small, the DCM
can be simplified to the skew symmetric form shown as Then, the yaw error in body frame can be computed as
below: 𝑟𝑧𝑥
1 −𝜓 𝜃 𝑟
𝑒𝑦𝑎𝑤 = 𝑒𝑦𝑎𝑤(𝑒𝑎𝑟𝑡ℎ) [ 𝑧𝑦 ] (20)
𝑅𝐵𝐸 ≈ [ 𝜓 1 −𝜙] (12) 𝑟𝑧𝑧
−𝜃 𝜙 1 Finally, the total error vector can be written as
In kinematics, the rate of change in rotating vector 𝑒𝑡𝑜𝑡𝑎𝑙 = 𝑊𝑟𝑝 𝑒𝑟𝑜𝑙𝑙−𝑝𝑖𝑡𝑐ℎ + 𝑊𝑌 𝑒𝑦𝑎𝑤 (21)
gives by
𝑑𝑟(𝑡) V. PID CONTROL
= 𝑤(𝑡) × 𝑟(𝑡) (13)
𝑑𝑡
Proportional Integral Derivative (PID) controller is a
where 𝑤(𝑡) is angular rate vector and r(t) is rotating
classical controller that have proven to be robust and
vector with same reference frame. By assuming signals of
tremendously beneficial in many linear or non-linear
gyroscope not affected by drift, the matrix to update
applications. The PID design are pointed out in many
DCM from gyroscope signals can be described as
references, such as [13], [22]-[25]. The controller
1 −𝑑𝜓 𝑑𝜃 attempts to minimize the error over time by adjustment of
𝑅(𝑡 + 𝑑t) ≈ 𝑅(𝑡) [ 𝑑𝜓 1 −𝑑𝜙] (14) a control variable 𝑢(𝑡). The mathematical representation
−𝑑𝜃 𝑑𝜙 1 of PID controller is given as
To maintain the orthogonality of rotating frame, 𝑑
𝑢(𝑡) = 𝑘𝑝 𝑒(𝑡) + 𝑘𝑖 ∫ 𝑒(𝑡) + 𝑘𝑑 𝑒(𝑡) (22)
renormalize is needed. The first step is to obtain the error 𝑑𝑡
that measures the rotation of X and Y toward each other where, 𝑢(𝑡) is the input signal and the error signal 𝑒(𝑡) is
by dot product defined as
𝑟𝑦𝑥 𝑒(𝑡) = 𝑑𝑒𝑠𝑖𝑟𝑒𝑑_𝑖𝑛𝑝𝑢𝑡(𝑡) − 𝑎𝑐𝑡𝑢𝑎𝑙_𝑜𝑢𝑡𝑝𝑢𝑡(𝑡) (23)
𝑇 𝑟 𝑟 𝑟
err = 𝑋 ∙ 𝑌 = 𝑋 𝑌 = [ 𝑥𝑥 𝑥𝑦 𝑥𝑧 ] [ 𝑦𝑦 ] 𝑟 (15) On the other hand, a PID controller continuously
𝑟𝑦𝑧
calculates an error value 𝑒(𝑡) then applies a correction
Then the orthogonal value of X, Y and Z can be based on proportional, integral, and derivative terms as
computed as shown in Fig. 8.
𝑒𝑟𝑟𝑜𝑟
𝑋𝑜𝑟𝑡ℎ𝑜𝑔𝑜𝑛𝑎𝑙 = 𝑋 − 𝑌 The proposed controllers for attitude and altitude
2
𝑒𝑟𝑟𝑜𝑟 stabilization in this experiment are shown as Fig. 9,
𝑌𝑜𝑟𝑡ℎ𝑜𝑔𝑜𝑛𝑎𝑙 = 𝑌 − 𝑋
2 where a cascade PID is used. For attitude stabilization in
𝑍𝑜𝑟𝑡ℎ𝑜𝑔𝑜𝑛𝑎𝑙 = 𝑋𝑜𝑟𝑡ℎ𝑜𝑔𝑜𝑛𝑎𝑙 × 𝑌𝑜𝑟𝑡ℎ𝑜𝑔𝑜𝑛𝑎𝑙 (16) the inner loop PID controller, angular rate 𝜙̇ , 𝜃̇ , 𝜓̇ and
The final step is to ensure magnitude of each row of R velocity of 𝑧̇ are used as references input and have its
matrix is equal to one. This is done by scaling the row of own gain. For altitude control in outer loop PID
the R matrix using Taylor’s expansion as controller, desired 𝑧 , 𝜙 , 𝜃 , and 𝜓 is set as desired
1 input/reference.
𝑋𝑛𝑜𝑟𝑚 = (3 − 𝑋𝑜𝑟ℎ𝑡𝑜𝑔𝑜𝑛𝑎𝑙 ∙ 𝑋𝑜𝑟𝑡ℎ𝑜𝑔𝑜𝑛𝑎𝑙 )𝑋𝑜𝑟𝑡ℎ𝑜𝑔𝑜𝑛𝑎𝑙
2
1
𝑌𝑛𝑜𝑟𝑚 = (3 − 𝑌𝑜𝑟ℎ𝑡𝑜𝑔𝑜𝑛𝑎𝑙 ∙ 𝑌𝑜𝑟𝑡ℎ𝑜𝑔𝑜𝑛𝑎𝑙 )𝑌𝑜𝑟𝑡ℎ𝑜𝑔𝑜𝑛𝑎𝑙
2
1
𝑍𝑛𝑜𝑟𝑚 = (3 − 𝑍𝑜𝑟ℎ𝑡𝑜𝑔𝑜𝑛𝑎𝑙 ∙ 𝑍𝑜𝑟𝑡ℎ𝑜𝑔𝑜𝑛𝑎𝑙 )𝑍𝑜𝑟𝑡ℎ𝑜𝑔𝑜𝑛𝑎𝑙 (17)
2
The roll-pitch error is computed by taking the cross
product of the reference measurement of gravity with the
Z row of DCM and can be described by
𝑇
𝑒𝑟𝑜𝑙𝑙−𝑝𝑖𝑡𝑐ℎ = [𝑟𝑧𝑥 𝑟𝑧𝑦 𝑟𝑧𝑧 ] × 𝑔𝑟𝑒𝑓 (18)
Figure 8. PID controller structure

Figure 9. Cascade PID in nonlinear quadrotor’s attitude stabilization and altitude control

©2018 Int. J. Elec. & Elecn. Eng. & Telcomm. 186


International Journal of Electrical and Electronic Engineering & Telecommunications Vol. 7, No. 4, October 2018

Telemetry Telemetry

Radio controller

Compass &
Ground station APM2.6 GPS module Quadrotor

Figure 10. Avionics system for quadrotor

with the chosen PID parameter, the quadrotor UAV able


to maintain it stability during hovering.
Then the experiment continues with 3dof testbed
platform as shows in Fig. 13. Here, the quadrotor UAV
being test to response on roll, pitch and yaw angle input
from radio controller.

a) Initial condition b) On going experiment


Figure 11. Single axis platform for flipping

TABLE I. PID PARAMETERS FOR QUADROTOR UAV


Angles Kp Ki Kd
𝝓 5 0.003 0
Stabilize 𝜽 5 0.003 0
𝝍 7 0.02 0
𝝓̇ 0.2 0.004 0.003
Rate 𝜽̇ 0.2 0.004 0.003
𝝍̇ 0.13 0.02 0

VI. EXPERIMENTAL RESULTS


Fig. 10 shows flight control system for the quadrotor Figure 12. Roll, 𝜙 angle performance during flipping test
that used in this experiment consist of APM2.6 (based on
Arduino MEGA) with built in IMU (accelerometer and
gyroscope) and external compass with GPS module.
Several experiments have been conducted to test
quadrotor UAV stabilization while tuning the PID
parameters. For the first test, the quadrotor UAV is tied
up on a single road testbed platform. Fig. 11 (a) and Fig.
11 (b) shows the quadrotor UAV condition tied up on the
testbed before and during the experiment. In this
experiment, the quadrotor UAV is only allowed to rotate
on roll, 𝜙 angle. The PID parameters is tuned until the
quadrotor UAV able to flip 180°and stabilized at 0°. The
chosen PID parameter is stated on Table I.
Fig. 12 shows roll angle performance during flipping
test. Initially, the quadrotor UAV is at 180°position and Figure 13. 3dof experimental platform
after the throttle is set about 50% of maximum speed, it
Fig. 14, Fig. 15 and Fig. 16 show roll, pitch and yaw
immediately rotates to 0°in 1 to 2 seconds and try to be
response to the input from radio controller respectively.
stabilized until at 13 seconds before the throttle is set to
During this experiment, the throttle is set about 50% of
zero. Since quadrotor UAV still has momentum, it still
maximum input. The roll and pitch from radio controller
rolling for a few second before stabilized until 26 seconds
are push right and left, upward and backward respectively
before the throttle once again is set about 50% of
to see quadrotor UAV response for stabilization during
maximum speed. The quadrotor UAV once again able to
hovering.
be flipped from 180°to 0°and stabilized. It shows that

©2018 Int. J. Elec. & Elecn. Eng. & Telcomm. 187


International Journal of Electrical and Electronic Engineering & Telecommunications Vol. 7, No. 4, October 2018

(0) to 360-degree angle response to the radio controller


input from yaw.

VII. CONCLUSIONS
This paper has presented a sensor fusion based on
nonlinear complementary filter algorithm and PID
controller design for the quadrotor UAV for attitude
estimation and stabilization during hovering. The sensor
fusion algorithm used gyroscope data (high frequency
part) as the main source and the drift corrected by
accelerometer and magnetometer data (low frequencies
part).The proposed PID controller is designed based on
the cascade control approach where, for attitude
Figure 14. Roll angle response
stabilization in the inner loop PID controller, angular rate
𝜙̇, 𝜃̇, 𝜓̇ and velocity of 𝑧̇ are used as references input and
have its own gain. For altitude control in outer loop PID
controller, desired 𝑧 , 𝜙 , 𝜃 , and 𝜓 is set as desired
input/reference. Two experiments have been conducted
for flipped and attitude stabilization. PID parameters is
tuned to ensure the quadrotor UAV able to flip and
stabilize from 180-degree initial position for roll axis.
Then the quadrotor was tested on 3dof experimental
platform for attitude stabilization respond to input from
radio controller. Experimental results demonstrated the
effectiveness of the proposed approach throughout the
test.
Further research needs to be done to extend the results
shown in the present paper with input disturbance such as
wind while outdoor flight test. Different type of controller
can be further investigated to improve system
Figure 15. Pitch angle response performances.

ACKNOWLEDGMENT
The authors would like to thank Universiti Teknologi
Malaysia (UTM) under the Fundamental Research Grant
Scheme (R.J130000.7823.4F761), Research University
Grant (Q.J130000.2523.15H39), Universiti Teknikal
Malaysia Melaka (UTeM), and Ministry of Higher
Education for supporting this research.

REFERENCES
[1] Y. Hu, Y. Yan, J. Liang, and L. Wang, “A miniature, low-cost
MEMS AHRS with application to posture control of robotic fish,”
in Proc. IEEE Instrum. Meas. Technol. Conf., 2013, pp. 1392–
1395.
[2] B. Allotta, R. Costanzi, and F. Fanelli, “An attitude estimation
Figure 16. Yaw angle response algorithm for underwater mobile robots,” IEEE/ASME Trans.
Mechatronics, vol. 21, no. 4, pp. 1900–1911, 2016.
As shown in Fig. 14, at 30 seconds, the quadrotor [3] U. Guner, H. Canbolat, and A. Unluturk, “Design and
implementation of adaptive vibration filter for MEMS based low
UAV try to stabilize at zero (0) degree after being push to cost IMU,” in Proc. 9th Int. Conf. Electr. Electron. Eng., 2015, pp.
right and left. The positive and negative spikes show the 130–134.
quadrotor UAV angle response to the radio controller [4] L. Wang, L. Fu, X. Hu, and G. Zhang, “Attitude estimation for
input from roll. Similarly, as shown in Fig. 15, where at UAV with low-cost IMU/ADS based on adaptive-gain
complementary filter,” in Proc. Int. Symposium on Neural
50 seconds, the quadrotor UAV try to stabilize at zero (0) Networks, 2016, pp. 346-355.
degree after being upward and backward. The positive [5] Z. Wu, Z. Sun, W. Zhang, and Q. Chen, “Attitude and gyro bias
and negative spikes show the quadrotor UAV angle estimation by the rotation of an inertial measurement unit,” Meas.
response to the radio controller input from pitch. Sci. Technol., vol. 26, no. 12, p. 125102, 2015.
[6] D. Q. Duong, J. Sun, T. P. Nguyen, and L. Luo, “Attitude
Fig. 16 shows a response from yaw direction where the estimation by using MEMS IMU with fuzzy tuned complementary
quadrotor UAV able to rotate right and left between zero

©2018 Int. J. Elec. & Elecn. Eng. & Telcomm. 188


International Journal of Electrical and Electronic Engineering & Telecommunications Vol. 7, No. 4, October 2018

filter,” in Proc. IEEE Int. Conf. Electron. Inf. Commun. Technol., [20] D. Derawi and J. Kim, “Real-time nonlinear complementary
2016, pp. 372–378. observer for low-cost inertial attitude system,” presented at 2013
[7] Z. R. Mahayuddin, H. M. Jais, and H. Arshad, “Comparison of Int. Glob. Navig. Satell. Syst. Soc. IGNSS Symp., 2013.
human pilot (remote) control systems in multirotor unmanned [21] M. S. Saelal, D. Derawi, N. D. Salim, and M. Z. M. Tumari,
aerial vehicle navigation,” Int. J. Adv. Sci. Eng. Inf. Technol., vol. “Real-time nonlinear complementary filter on SO(3) for attitude
7, no. 1, pp. 132–138, 2017. estimation of small-scale ariel robot,” in Proc. Int. Conf. Vision,
[8] J. Ajmera and V. Sankaranarayanan, “Point-to-point control of a Image Signal Process., 2017, pp. 109–113.
quadrotor: Theory and experiment,” IFAC-PapersOnLine, vol. 49, [22] J. Li and Y. Li, “Dynamic analysis and PID control for a
no. 1, pp. 401–406, 2016. quadrotor,” in Proc. IEEE Int. Conf. Mechatronics Autom., 2011,
[9] J. Bazin, T. Fields, and A. J. Smith, “Feasibility of in-flight pp. 573–578.
quadrotor individual motor thrust measurements,” in Proc. AIAA [23] S. Liu, Z. Hou, and J. Zheng, “Attitude adjustment of quadrotor
Atmospheric Flight Mechanics Conf., 2016, pp. 1–12. aircraft platform via a data-driven model free adaptive control
[10] B. B. V. L. Deepak and P. Singh, “A survey on design and cascaded with intelligent PID,” in Proc. 28th Chinese Control
development of an unmanned aerial vehicle (quadcopter),” Int. J. Decis. Conf., 2016, pp. 4971–4976.
Intell. Unmanned Syst., vol. 4, no. 2, pp. 70–106, 2016. [24] B. Kada, “A new methodology to design sliding-PID controllers:
[11] Y. Wang, N. Li, X. Chen, and M. Liu, “Design and Application to missile flight control system,” presented at IFAC
implementation of an AHRS based on MEMS sensors and Conf. on Advances in PID Control, 2012.
complementary filtering,” Adv. Mech. Eng., vol. 2014, 2014. [25] M. Nguyen Duc, T. N. Trong, and Y. S. Xuan, “The quadrotor
[12] R. García, F. R. Rubio, and M. G. Ortega, “Robust PID control of MAV system using PID control,” in Proc. IEEE Int. Conf.
the quadrotor helicopter,” IFAC Proc. Volumes, vol. 45, no. 3, pp. Mechatronics Autom., 2015, pp. 506–510.
229-234, 2012.
[13] F. Goodarzi, D. Lee, and T. Lee, “Geometric nonlinear PID Aminurrashid Noordin received the B.Eng. and the M.Eng. Degree in
control of a quadrotor UAV on SE (3),” in Proc. Eur. Control Mechatronics Engineering from Universiti Teknologi Malaysia in 2002
Conf., 2013, pp. 3845–3850. and 2009 respectively, where he is currently working toward the Ph.D.
[14] J. Ghommam, L. F. Luque-Vega, B. Castillo-Toledo, and M. Saad, in the Department of Control and Mechatronics Engineering of
“Three-dimensional distributed tracking control for multiple Universiti Teknologi Malaysia (UTM). Since 2011, he has been with
quadrotor helicopters,” J. Franklin Inst., vol. 353, no. 10, pp. Department of Electrical Engineering Technology, Faculty of
2344–2372, 2016. Engineering Technology of Universiti Teknikal Malaysia Melaka where
[15] S. Bouabdallah, A. Noth, R. Siegwart, and R. Siegwan, “PID vs he is currently a Lecturer. His research interests include Nonlinear
LQ Control Techniques Applied to an Indoor Micro Quadrotor,” Control System, Robotics and Embedded System.
in Proc. IEEE/RSJ Int. Conf. Intell. Robot. Syst., 2004, pp. 2451–
2456. Mohd Ariffanan Mod Basri received the B.Eng. and the M.Eng.
[16] D. Domingos, G. Camargo, and F. Gomide, “Autonomous fuzzy Degree in Mechatronics Engineering from Universiti Teknologi
control and navigation of quadcopters,” IFAC-PapersOnLine, vol. Malaysia in 2004 and 2009 respectively. He also received the Ph.D. in
49, no. 5, pp. 73–78, 2016. Electrical Engineering from Universiti Teknologi Malaysia in 2015. He
[17] M. A. M. Basri, A. R. Husain, and K. A. Danapalasingam, is currently a Senior Lecturer in Department of Control and
“Enhanced backstepping controller design with application to Mechatronics Engineering of Universiti Teknologi Malaysia. His
autonomous quadrotor unmanned aerial vehicle,” J. Intell. Robot. research interests include intelligent and Nonlinear Control Systems.
Syst. Theory Appl., vol. 79, no. 2, pp. 295–321, 2014.
[18] H. Fourati, N. Manamanni, L. Afilal, and Y. Handrich, Zaharuddin Mohamed received his B.Eng in Electrical, Electronics
“Complementary observer for body segments motion capturing by and Systems from Universiti Kebangsaan Malaysia (UKM) in 1993,
inertial and magnetic sensors,” IEEE/ASME Trans. Mechatronics, M.Sc. in Control Systems Engineering from The University of Sheffield
vol. 19, no. 1, pp. 149–157, 2014. in 1995 and Ph.D. in Control Systems Engineering from The University
[19] N. H. Ariffin, N. Arsad, and B. Bais, “Low cost MEMS gyroscope of Sheffield in 2003. Currently, he is an Associate Professor in
and accelerometer implementation without Kalman Filter for angle Department of Control and Mechatronics Engineering of Universiti
estimation,” in Proc. Int. Conf. Adv. Electr. Electron. Syst. Eng., Teknologi Malaysia (UTM) and his current research interest involve the
2016, pp. 77–82. control of Mechatronics systems, flexible and smart structures.

©2018 Int. J. Elec. & Elecn. Eng. & Telcomm. 189

View publication stats

You might also like