Control System Design and Simulation
For a Quadrotor Helicopter
P. NIRUT, Ryosuke MASUDA, Hiroshi HIRATA
Graduate School of Computer and Information Engineering, Tokai University, Japan
1. Introduction
This paper studies to simulate the operation of aircraftwith four propellers. It is known as the unmanned aerialvehicle (UAV) with quadrotor mechanism. A design
methodology is introduced that blends the classical PID andthe fuzzy controller in an intelligent way. The hybrid fuzzy
PID controller (HFPID) [1] takes advantage of the nonlinear
characteristics of the fuzzy and the accuracy near a setpoint isguaranteed by the classical PID. The paper also explains on
the developments Unscented Kalman Filter (UKF) [2]estimation of the orientation from measurements ofacceleration and magnetic field sensors. Many fusion
techniques, mostly based on Kalman filter to improve theaccuracy and robustness, it has been used in many applications
such as in robotics, aerospace, under water vehicles, andothers. The results of the simulations in the quadrotor arepresented.
2.

2.2 Dynamic Equation
In order to move the quadrotor model from the earth frameto the body framein Fig.1. The mathematical design
should depend on the direction cosine matrix.
⎡cθ cφ sθ cφ sψ − sφcψ cφ sθ cψ + sφ sψ ⎤Rzyx = ⎢⎢sφcθ sφ sθ sψ + cφcψ sφ sθ cψ − cφ sψ ⎥⎥ (1)⎢⎣ −sθ
⎥⎦
cθ sψ
cθ cψ
Where: and represent cosine and sine respectively.
The dynamic model of the quadrotor can be obtained via a
Lagrange approach and a simplified model is give as follow[3]. We will define the inputs to be

u1 = ( F1 + F2 + F3 + F4 ) / mu2 = (m F1 + F2 + F3 ± F4 ) / J1
u3 = ( F1 ± F2 + F3 m F4 ) / J 2(2)u4 = C ( F1 − F2 + F3 − F4 ) / J 3System description

Where: are the moment of inertia with respect to the axes
and C is the force to moment scaling factor. The
represents
andare the pitch and rolla total thrust in the z-axis,inputs andis a yawing moment. A quadrotor has four input
forces and six output state. The equations of motion be comeφψθ&&x = u1 (cos φ sin θ cosψ + sin φ sinψ ) θ&& = u2 l&&y = u1 (sin φ sin θ cosψ − cos φ sinψ ) ψ&& = u3l&&z = u1(cos θ cosψ ) − gφ&& = u4

3.

(3)

Control algorithm

Fig. 1: The quadrotor schematic.
2.1. Quadrotor Aerial Vehicle
In the quadrotor, which represent four input forces that arebasically the thrust generated by each propeller as shown in
Fig. 1. The collective input (u) is the sum of the thrusts ofeach motor. Translation along the x-axis is related to pitch
angle (θ). This angle can be obtained by changing rotor 1 orrotor 3 increasing (reducing) speed. On the other hand,translation along the y-axis is result from roll angle (φ) bychanging rotor 2 or rotor 4 increasing (reducing) speed. The
yaw angle (ψ), the speed of rotor 1’s and 3 should not be same
speed of rotor 2 and 4. To balance the moment, the directionof rotor 1 and 3 have to be opposite of rotor 2 and 4 at thesame speed.

Fig. 2: Hybrid type fuzzy PID control
3.1 Hybrid fuzzy-PID control
Controller is proposed for position control of the Quadrotor
system and its performance is tested by simulation studies.
In Fig. 2: It has two main parts: the classical PID and Fuzzycontrollers. PID control structure is given in (4).

e(t ) = yref − y(4)tU (t ) = K P e(t ) + K I ∫ e(τ ) dτ + K D e&(t )0Where is the error between reference position
andposition .
is the proportional gain,
the integral gain,
the derivative gain.
de/e

NB

NMNSZ

PS

PMPB

NB

NB

NB

NBNMNMNSZNMNBNBNMNSNSZPSNSNBNMNSNSZPSPMZNMNSNSZPS

PS

PMPS

NM

NS

Z

PSPS

PMPB

PMNSZ

PSPS

PMPB

PB

PB

ZPS

PMPM

PB

PB

PB

Table1. Rule base for fuzzy logic control
Fuzzy Logic controller (FLC) used in this paper is basedon two input FLC structure. The input variables are definedas; e yy and dev
v. Real interval of variables
is obtained by using scaling factors which are , andFig.2. The fuzzy control rule is in the form of: IF e E anddedE THEN , =, . These rules are written in arule base, which is shown in Table 1. The rule base structure is
Mamdani type [4].
3.2 Unscented Kalman Filter (UKF)
Kalman filter is quite a standard method in state estimation.
Recently, the UKF is widely used for estimation of nonlinear
systems instead of the extended Kalman filter (EKF). The
main difference between the UKF and the EKF is the method
to compute the propagation of process and measurement noise
covariance in the UKF. The points around the mean, called
sigma point, and propagate to next time step by general
nonlinear dynamic function, while in the EKF which is basedon Talor’s series approximation. Then the propagation isbased on linearized model. In this paper we aim to design a
UKF to estimate the sensor readings [5]. UKF algorithm
proceeds as shown in Fig. 4.

used to estimate the respective time constant, with value 0.5s.
In (5)
K
K=G( s ) =(τ s + 1) (0.5s + 1)
(5)

Fig. 5: Find the process Models

Gain K

Motor 1

Motor 2Motor 3Motor 4

3215

4102

4519

3306

Table2. Gain of each motor
Simulation 2
To test the effectiveness of the filter, the green lines
are actual error. When the yellow lines are the UKF estimate
error and the purple lines are the LPF estimate error.

Fig. 6: Run the Simulation.

xk +1 = Φxk + wk

Acknowledgementszk = Hxk + vk

The modelling of the motors was achieved due to the useof data collected for identification which originated from theMicro-Tachometer. it is possible to determine the angularspeed of the motor propeller assembly. And the filter is able to
track rotational motion in Fig. 6. The UKF estimate error isless than the actual error. When it compares with the LPF, theresults show that the UKF is more accurate and faster than theLPF. Then we will implement to the real quadrotor system andmake the experiment.

x0 , P0x− , P−zkz − , Pz , Pxz

x+ , P+Fig. 4: Unscented Kalman Filter process
4. Simulation result
Control systems are necessary to make the system
response to the reference values as most as possible. Thismeans the system can work properly and efficiently.
Simulation 1
To find out the actual parameters of the transfer function
we needed to measure the angular rate of the motor by usingthe Micro-Tachometer. The dynamics of the motor are
nonlinear therefore we have to make it to be a linear model tohave implementation of first-order transfer functions. Themodel should be linearized around an adequate operationpoint. The System Identification tool GUI in MATLAB wasReferences
[1]
[2]

[3]

[4]

[5]

Parnichkun, M., Ngaecharoenkul, C.: Kinematics of a pneumaticsystem by hybrid fuzzy PID. Mechatronics 11,1001-1023,2001
Joao Luis Marins, Xioping Yun, Eric R. Bachman, Robert B.
McGhee, and Michael J. Zyda: An Extended Kalman Filter forQuaternion , International Conference on Intelligent Robots andSystem, IEEE/RSJ,2001
E. Altug, J. P. Ostrowski and R. Mahony: Control of aQuadrotor Helicopter using Visual Feedback, International
Conference on Robotics and Automation, IEEE, vol. 1, pp. 7277,2002.
E. H. Mamdani, S. Assilian: An Expereriment in Linguistic
Synthesis With a Fuzzy Logic Controller, in International
Journal of Man Machine Studies,Vol. 7, 1975, pp. 1-13, 1977
S.J. Julier, J.K. Uhlmann: Unscented Filtering and Nonlinear
Estimation, Proceedings of the IEEE, Vol. 92, No. 3, 2004