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

Mathematical Modeling and Control Law Design for

1DOF Quadcopter Flight Dynamics


Adnan Jafar, S.M.Ahmad, Nisar Ahmed,Member,IEEE
Ghulam Ishaq Khan Institute of Engineering Sciences and Technology
engr.adnan13@yahoo.com,smahmed@giki.edu.pk,nisarahmed@giki.edu.pk

Abstract—The purpose of this research is the modeling and copter. Quad copter is gaining attentions of many engineers
Linear Control of Quad copter through pitch, roll, yaw and thrust and scientist due to its complex dynamic model and
command Interface. This research starts with derivation of non- dynamically unstable. In order to achieve successful
linear mathematical model of quad copter dynamics that consists of autonomous mission and dynamic robust response, many
6 degree of freedom(DOF) motions. The non-linear model is then
linearized around equilibrium point and then 3DOF kinematics is
control techniques have been applied to the Quad copter such
extracted in order to design stabilizing and tracking control of three as input-output linearization[5],Back stepping[6]-[7],Sliding
angular motions (Pitch, Yaw and roll). The Open loop transfer mode control[8],Adaptive control[9],PID controller
function of each DOF rotation motion shows that quad copter is augmented with Feedback[10],Nonlinear control[11]. The
highly unstable without any damping factor in linear mode. .A successful control requires the correct model of the system.
Proportional integrator and differentiator(PID) controller is The basic contribution of this paper includes in the following
designed to control and stabilization of 3DOF rotations, controlling points.
the four actuators independently in simulation. The real time • To derive the mathematical model of Quad copter
1DOF operation is done on designed Test rig in which the relation
between thrust, Average RPM is evaluated and desired pitch pitch
• Bifilar mechanism design to calculate moment of
response is achieved by closed loop PID controller on Test rig. To inertia of three axis X,Y and Z
support the above arguments, the simulated results as well as • A real time PID control is implemented to controlitch
experimental results are presenented and compared. movement of Quadcopter and comparison
between simulation and real time response.
Keywords—Test rig; Thrust;Power consumption ;PID; Control
Law;Modeling;Actuator dynamics

I. INTRODUCTION II. QUADCOPTER DYNAMIC MODEL


Recent advancements in MEMS sensor, energy efficient and There are lots of literature present that discuss the
very powerful microprocessor and microcontroller have modeling of UAV and copter in different ways. This includes
provided courage to build an autonomous vehicle. trajectory tracking with a controller using improved dynamic
inversion method[1].A similar can been seen in[6] in which
In our country problem exists in the form of natural disasters author discussed the 6DOF modeling and backstepping control.
and calamities like frequent flooding and earthquakes. In such However,most of work haven been on fixed pitch angle blades
scenarios inadequate and untimely information about people for quad copter while traditional helicopter used variable pitch
and their precise location when cut off due to flooding or angle blades.
earthquakes has led to huge losses to human lives and
properties. Therefore close aerial monitoring of objects, sites A. Kinematics and Actuator dynamics
and location is desirable. Quad copter is very good choice for A quad copter helicopter consists of four rotors which is
above operations and monitoring purposes [1]. It can be used equally spaced arranged on a square body at the corners. In
as assistance bot for people working in dangerous heights like order to allow the helicopter to develop more degree of
building exterior workers, rescue operation, bomb search and freedom the swash plate tool was needed.
disposal [2] . The flight of Quad copter requires that each Normally, the modeling of quad copter is done by using four
motor produces the propulsion force against the gravitational rotors in cross pattern. The complete model is considered to be
to lift the controller upward. The better the performance of inflexible body, the basic motion control of the quad copter is
quad copter or any autonomous vehicle requires that it should shown in Fig.1.
reach in steady state value smoothly without any disturbances
or overshoot [3]. Quad copter is highly unstable and as well as When all the motors of a quad copter are turned on, then one
coupled translational and rotational equations. Unmanned pair of a motors create torque in one direction while at the
Quad rotor helicopter have gained increasing focus among same time the other pair of motors rotate in such way that they
scientists and engineers [4]. Many researchers and engineers produce torque which cancel the effect of first pair which
have done work on modeling and flight control of Quad

978-1-5090-1252-7/16/$31.00 ©2016 IEEE


results in quad copter to travel in same direction instead of Where ui is the voltage applied to the motors , the
rolling around. aerodynamic torque in terms of Thrust is given by the
following relation Q =

The Yaw can be control independently due to counteracting


aerodynamic torques which is produced by opposite motor
rotation of rotors R-1 R-3 and R-2 R-4. The total force on
Quad Copter of mass m and acting drag force DB and their
Fig.1.Quadcopter control mechanism
corresponding Momentum M is given as
F= D e mge ∑ Tz De (2)
By increasing or decreasing the rotor speed the strangle
movement is provided to the quad copter which leads to a M=∑ (Q z Re D (r e ) T (r z )) (3)
u1[N] vertical force which lift the quad copter upper or lower The complete nonlinear dynamics is given in (4) and (5)
with respect to fixed body frame, which is in our case rpm of
R-1,R-2,R-3 and R-4 increasing/decreasing results in vertical mr=F (4)
motion.
IωB ω xIω = M (5)
In order to provide roll movement to the quad copter the R-2
rotor’s speed is increase or decrease simultaneously with R-4
rotor’s speed which is front and back rotors respectively shown
Due to counter rotation of motors the total angular
in Fig.1 leads to tilt in current position of quad copter along the momentum of the rotors is assumed to be zero , the role of
x-axis. Similarly, In order to provide pitch movement to the rolling moment and drag can be ignore in case of near hover
quad copter the R-1 rotor’s speed increase or decrease
condition . Define the total thrust as
simultaneously with the R-3 rotor’s speed which provides
torque in such a way that the quad copter gets tilt along the y-
T=∑ T (6)
axis. For yaw movement the speed of pair of R-2 and R-4
rotors is changed simultaneously with remaining pair of rotors
The translational motion is defined by
i.e. R1 and R3 which generate torque in such a way that
provide tilt along z-axis to the quad copter.
mr= F= R R R ∅ Tz m e (7)
III. MATHEMATICAL MODELING
Where Rφ Rθ and Rψ are the rotation matrices for roll, pitch,
The non-linear dynamics is examined in NED which North and yaw, respectively described in [1]. Above equation shows
East Down corresponding to inertial and fixed body the nonlinear translation motion of Quad copter. The Linear
coordinates which is denoted by {eN eE eD} and {xB yB zB} model of above equation can be calculated by using following
respectively as shown in Fig.3 where {φ, θ, ψ} represents the approximations
Euler angles corresponding to roll , pitch and yaw
respectively. θ∙ =∅∙ =φ∙ =u2-0= u3-0= u4-0 =0
Finally, assuming total thrust approximately counteracts
gravity, T = mg, except in the eD axis,
Now the Translation motion equations reduces to following
matrix form

r 0 0 T 0 ∅
m r = 0 T 0 0 θ (8)
r mg 0 0 1 T
For small angular velocities, the Euler angle accelerations are
Fig.2. Inertial Coordinates in a Quad copter determined by dropping the second order term, ω × Iω, and
expanding the thrust into its four constituents. The angular
equations reduce to following matrix after linearization,
The rotors R-1-R-4 are mounted on a board at xB , yB, -xB and
–yB axes with position vector Ri with respect to the center of
gravity respectively I ∅ 0 l 0 l T
The rotor’s axis of rotation is parallel to both Qi and Ti which I θ = l 0 l 0 T (9)
is Aerodynamic Torque and Thrust respectively which is I φ K K K K T ;T
mathematically given as
T u (1)
.
TABLE I. QUACOPTER PARAMETERS
Variable Name Value Units
g Gravity 9.81 m/s2
I X axis moment 0.02 Kg/m2
of interia
I Y axis moment 0.08 Kg/m2
of interia
I Z axis moment 0.02 Kg/m2
of interia
K constant 0.36 M
L Moment arm 0.36 M
length
M mass 0.73 Kg
Quadcopter model have numerous dynamic variables, many of Fig.3.Open loop Pitch response
which have specific values that were adhered to throughout the
simulations. Table 1 lists the variables and describes them. A. Control
Hence the Translational motion dynamics equations after linear This section deals with the control of Quad copter as it is
approximation reduces to
highly coupled unstable system. The quad copter is controlled
x =-g θ (10)
by varying the rotor velocities which are spun by each four
y =g ∅ (11)
motors. The simplest and easily reliable technique is the PID
z =g (12) in which we adopted Ziegler Nichol method to evaluate the
Angular motion dynamics can be described in form value of controller gains proportional, derivative and integral
∅= l (13) denoted by Kp,Kd,Ki respectively.
K
θ= l (14) G = K s K s (16)
Where Gc is the transfer function of PID controller equal
φ= l (15) ()
to and U is the control signal to the motor. The input to
()
In our quadcopter, the following parameters are derived using
bifilar pendulum method which is given below PID controller is the error signal e(t) which contains difference
l = 0.36m of desired pitch angle(θ ) and actual pitch angle(θ ) measured
I = I = 0.02kg. m by Inertial measurement unit(IMU) as follows.
I = 0.047kg. m e(t) = θ θ (17)

K = 0.36m For a simple proportional control, the trajectory of Quad

Where u1 is the sum of total thrusts produced by four rotors, u2 copter pitch and yaw is inherently a oscillatory due to no
is the second and 4th, u3 is the difference of first and 3rd damping term involved in the close loop transfer function
motor torque difference.
shown by below equations
IV. FEEDBACK CONTROL OF QUADCOPTER
( )
The open loop response of Quadcopter Translational and = = (18)
, ( ) ( )
angular dynamics is highly unstable because each quadcopter
state variable is a double integrator means two poles at the
origin. The Open loop response of attitude subsystem of Quad ( )
copter is shown in Fig.3. = = (19)
, ( ) ( )

It is seen from open loop response Fig.3 that Quad copter is


inherent unstable system so a controller should be designed As the response is still oscillatory, so in order to stabilize it a
that makes the open loop system stable. In this research, PD control is implemented .In PD control GC = KP + Kds, Let
Classical PID Control has been implemented as bench mark in
undergoing research at GIK Institute to make the Quadcopter us now add a small value for Kd for the damping effect. The
fully stable and fast dynamic response during initial flight test transfer function turns out to be
of Quad copter on Test rig
( ) ( . )
= = (20)
, ( ) ( ( . )

( . )
( )
= = (21)
, ( ) ( ( . )

The roll and pitch response of Quadcopter is first tested on


Simulink by choosing value of Kp,Kd and Ki using Nichol
method. The value at which pitch and Roll gives accurate
tracking is Kp=0.5 and Kd=2.5 shown by fig.4 and 5.

Fig.6.PID controller effort on Pitch response

Using PID controller the result got shown in Fig.6, it can be


noticed that the response time has been reduced to 0.12
seconds and secondly the curve is smoother and soft.
As it can be seen from Equation 1, the angle directly influences
the position. In order for the quad copter to follow a path, the
value of the angle needs to be tracked quickly and accurately.
Using knowledge of the parameters' functions, we used the hit
Fig.4.PD controller effort on Roll motion and trial method until we reached the desired values
experimentally shown in Table II.

TABLE II. PID TERM FUNCTIONS


Term Rise overshoot Settling Steady Offset
time time state
error
Kp Decrease Increase decrease
Ki decrease Increase Increase eliminate
Kd decrease decrease eliminates increase

The values of roll, pitch and yaw is obtained by using an IMU


(Inertial Measurement Unit). An accelerometer and gyroscope
were used for this purpose. At high frequencies the
accelerometer starts giving spurious values so a low pass filter
is implemented which will filter out the high frequency values
Fig.5.PD controller effort on Pitch motion of the accelerometer. The gyroscope’s value on the other hand
starts to drift at low frequency so a high pass filter is
implemented which will filter out the low frequency values of
This is the type of response is required from the quad copter. It the gyroscope. Combined this will make a complimentary
filter. This will help develop a stable control loop.
is stable but since the quadcopter will travel at high speeds and
in many adverse conditions so the response time should be
V. EXPERIMENTS AND SPECIFICATIONS
small as possible. This is achieved by adding a further integral The quad copter is split into 3 major sections: the frame design,
gain Ki. This makes the final transfer function of the form the propulsion system (motors + propeller + ESC), the control
system (micro-controller + IMU) and the frame design.

( . )
( )
= = (22)
, ( ) ( ( . )
Table III shows the value of thrust for different RPM of all the
motors. The marked value is the speed at which quad copter
starts to hover.

TABLE III. THRUST VERSUS RPM

Average Motor RPM Thrust (N)

2750 5.20
Fig.7.Classification of quad copter
5000 5.92
In order to fly the quad copter the thrust provided by the
7000 6.50
motors should be two times greater than the weight of quad
copter, if the thrust is not so good then quad copter can’t fly or 8000 7.03
if it fly then it will does not respond well for controlling. If the
9750 7.46 (hover) value)
thrust is much high then it will becomes very difficult to
control the quad copter. 11500 7.84

A. Actuator,EMU and speed Controller 13250 8.64


Given an overall payload of 0.73 kg, we choose a motor 15000 9.43
and propeller combination than can produce a thrust half the
weight of the payload and equation of power is given in (23) 17800 10.45
P=Tω=F x (r ω) (23)
Where T is the torque and F is the thrust force (mg/2) of value
3.58 N, and r is the moment arm lengths of 0.36 m.We choose 15
a safe maximum RPM of 10,000, we get a power rating of 140
W. Hence we choose a motor with 150W power rating, and a 10
rating of 900RPM/V (giving a maximum rpm of 10,000).
There are two types of brushless RC motors, in runners and out 5
runners. The motors used are out runners as they rotate much
slow but produce more torque. In order to reduce weight, 0
complexity, lower efficiency and noise produced in gearbox 0 5000 10000 15000 20000
out runners is a good choice for driving electric aircraft
propellers directly. Emax GT2215/12 are the motors used in Fig.8.Thrust Versus RPM graph
this quad copter. On a quad copter, the measurement of gyros,
accelerometer and control of four motors using pilot stick
inputs is control and observed by flight control board. The Fig.8 describes the relation of thrust and rev/min for the
input received by ESCs from the flight control board provides motors. The graph proves that the motors have enough power
power to the motors to achieve required speed. All this task is to not only match the weight of the quadcopter and hover; but
managed by ESC’s has it consist on processors, firmware and also have enough power to lift the quadcopter.
other integrated electronics which provide fast switching to The real time 1DOF (Pitch) control is implemented using PID
turn on and off the motor. The integrated USB version of controller to stabilize and steer the Quad copter with its
embedded breadboard based on surface mount is Nano.
trajectory planning. Graphical user interface is designed on real

B. WOODEN TEST RIG time myRio module of labview and we used myRio as
A wooden test rig was constructed to test the thrust of embedded kit to interface the IMUs with it shown in figure 10.
every individual motor and the entire quad copter shown in The PID controller shown in figure 14 used to calculate the
Fig.9. To start the test of the control system the quad copter
was placed in the test bench. In start quad copter was hooked ratio increased or decreased in the motors signal to achieve
up to power supply, to allow for more concentrated testing. desired tilt. A PWM block used to vary the motor signal by
But when hooked up to the power supply the quad copter had
wires hanging down on one side and thus making the center of various duty cycles decided by PID controller block. A
gravity some offset. This effect was not a concern as the Algorithm is written in to implement set of equations to
testing would mostly focus on response than error angle.
Given below is the weight table of the components of the quad calculate motor voltage based on PID controller output to make
copter. the process variable (Pitch angle) equal to set point.
At 10 degree tilt, Pitch response is shown in figure 11,it is seen
clearly that PID controller makes the quad copter fully stable
with peak time 0.8s and settling time 3.2second with perfect
transient and steady state performance.The comparison of
simulation as well as real time Pitch angle control shown by
figure (5) and 11. It is clearly seen that control law effort in
case of real time implementation has more settling time as wel Fig.11.1DOF Pitch response

VI. CONCLUSIONS
In this research, nonlinear mathematical model of Quadcopter
dynamic model is first derived and then applied linearization
theorem to find the linear model of Quad copter in order to find
control laws for waypoint tracking paths. Simulation as well as
Experimental results show the performance of control law for
Pitch movement control of Quad copter. Test rig, Voltage to
thrust Calculations and Power consumption model has also
been done in this research. However future research is required
to work on design and implementation of nonlinear robust gain
Fig.9.Quadcopter mounted on 3 DOF Aluminum Test Rig
scheduling control for Pitch, yaw and roll
REFERENCES

[1] Sumantri, Bambang, Naoki Uchiyama, and Shigenori Sano. "Least


square based sliding mode control for a quad-rotor helicopter and energy
saving by chattering reduction." Mechanical Systems and Signal
Processing 66 (2016): 769-784
[2] Saeed, Ahmed, Azin Neishaboori, Amr Mohamed, and Khaled A.
Harras. "Up and away: a visually-controlled easy-to-deploy wireless
UAV cyber-physical testbed." In Wireless and Mobile Computing,
Networking and Communications (WiMob), 2014 IEEE 10th
International Conference on, pp. 578-584. IEEE, 2014
[3] A. Tayebi and S. McGilvray, “Attitude Stabilization of a VTOL
Quadrotor Aircraft,” IEEE Tranactions on Control Systems Technology,
Vol. 14, No. 3, 2006, pp. 562-571. doi:10.1109/TCST.2006.872519
[4] A. Tayebi and S. McGilvray, “Attitude Stabilization of a VTOL
Quadrotor Aircraft,” IEEE Tranactions on Control Systems Technology,
Vol. 14, No. 3, 2006, pp. 562-571. doi:10.1109/TCST.2006.872519
[5] O. Fritsch, P. De Monte, M. Buhl and B. Lohmann,“Quasi-static
feedback linearization for thetranslational dynamics of a quadrotor
helicopter,” American Control Conference (ACC), 2012, pp.125 – 130.
[6] A. A. Mian and W. Daobo,“Modelling and Backstepping-based
Nonlinear Control Strategy for a 6 DOF Quadrotor Helicopter,” Chinese
Journal of Aeronautics, Volume 21, Issue 3, pp. 261–268.
Fig.10. 1DOF real time setup for IMU interfacing [7] A. Das, F. Lewis and K. Subbarao,“Backstepping Approach for
Controlling a Quadrotor Using Lagrange Form Dynamics,”Journal of
Intelligent and Robotic Systems, Volume 56, Issue 1-2,pp. 127-151.
[8] R. Zhang, X. Wang and K. Y. Cai, “Quadrotor aircraft control without
velocitymeasurements,” IEEE Conference on Decision and Control, pp.
as steady error than simulation result due to microcontroller 5213 – 5218.
[9] Y. Morel and A. Leonessa“Direct Adaptive Tracking Control of
and ECU response time. Futher enhancement can be to design Quadrotor Aerial Vehicles,”ASME International Mechanical
Engineering Congress and Exposition. American Society of Mechanical
a control law in more speedy processors like Engineers, pp. 155-161.
FPGA,Raspberrypie and DSP processors etc. [10] H. Haomiao,“Aerodynamics and control of autonomous quadrotor
helicopters in aggressive maneuvering,” IEEE International Conference
on Robotics and Automation, ICRA'09, pp. 3277

You might also like