Hexacopter Control
Hexacopter Control
9
International Journal of Applied Information Systems (IJAIS) – ISSN : 2249-0868
Foundation of Computer Science FCS, New York, USA
Volume 9 – No.5, August 2015 – www.ijais.org
shows this configuration. There are three movements that Table 1. The main effects on the acting hexarotor
describe all possible combinations of attitude: Roll (rotation
around the X axis) is obtained when the balance of rotors 1, 2 Effects Fountainhead
and 3 (or 6, 5 and 4) is changed (speed increases or decreases).
By changing the angle, lateral acceleration is obtained; pitch Aerodynamics effects Rotating propellers
movement (rotation around the Y axis) is obtained when the
balance of the speed of the rotors 1 and 6 (or 3 and 4) is Inertiel counter torque Speed change of propellers
changed. The angle change results in a longitudinal acceleration;
Effect of gravity Position of the center of mass
yaw (rotation about the Z axis) is obtained by a simultaneous
change of speed of the motors (1, 3, 5) or (2, 4, 6). Gyroscopic effects Change in the direction of the drone
2.1 Hexacopter Kinematics L’effet de frottement Tous les mouvements du drone
This subsection describes the dynamical models of the Six
Rotor. The schematic structure of the hexacopter and the
rotational directions of the propellers are illustrated in Figure 1. In order to get equations of motion of entire system, the
In order to describe the hexacopter motion only two reference following assumptions have been made:
systems are necessary: earth inertial frame ( -frame) and body- The hexacopter is a rigid body;
fixed frame (RB -frame).
The hexacopter has a symmetrical structure;
Tensions in all directions are proportional to the square
of the propeller speed.
To derive the dynamic model of the hexacopter (position and
attitude); the Newton-Euler formalism is used [4]. Therefore the
following equations are obtained:
RB
mI 33 0 33 V mV F
RI 0 33 J J
(1)
2.2.1 Forces
Gravity force: Fg = [0 0 -mg]T.
Fig 1: The structure of hexarotor and its frames
6 6
Thrust force: Fp = RI [0 0 Fi]T = RI [0 0 b
B B
The orientation of the hexacopter is given by the three Euler i 1 i 1
angles, namely yaw angle ψ, pitch angle θ and roll angle ϕ that
i ]T
2
10
International Journal of Applied Information Systems (IJAIS) – ISSN : 2249-0868
Foundation of Computer Science FCS, New York, USA
Volume 9 – No.5, August 2015 – www.ijais.org
12
3
Pitch torque: My= bl
2
( 1
2
3
2
4
2
6 )
2 u1 b b b b b b 2
2 (4)
bl bl bl bl 2
bl bl 3
u 2 2
2 2 2 2 2 2
bl 3
Yaw torque: Mz= d ( 1 2 3 4 5 6 ) 2 2 2
bl 3 bl 3 bl 3 2
u 3 0 0
4
The vector Mf is defined as: Mf = [Mx My Mz ]T 2 2 2 2
u 4 2
• Torque aerodynamique resistance : d d d d d d 5
2
Ma =Kfa = [Kfax Kfay Kfaz ] T
2 2 2 2
6
• gyroscopic effect from Propeller:
6
If the rotor velocities are needed to be calculated from the
Mgh = Ωr J r [0 0 (-1)i+1 i ]T control inputs, an inverse relationship between the control inputs
i 1 and the rotors' velocities is needed, which can be acquired by
Yaw counter torque : Mgh =[ 0 , 0 , Jr r ]T inverting the matrix in (4) to give,
With r = 1 2 3 4 5 6 = (l u1 +2 u2 - u4)
2.2.3 Hexacopter mathematical model = (l u1 + u2 - u3 + u4)
The equations of motion, that governs the translational and the
rotational motion for the hexarotor with respect to the body = (l u1 - u2 - u3 - u4)
frame are (5)
= (l u1 -2 u2 + u4)
2.2.3.1 Translational dynamic
= (l u1 - u2 + u3 - u4)
m = ΣF = Fp + Fg + Ft
= (l u1 + u2 + u3 + u4)
6
x = 1/m ( coscossin sinsin ) ( Fi ) - kftx x /m
i 1
1
= [ ( J zz - J xx ) - Kfay + JrΩr + u3].
2
1 1
[ ( J xx - J zz )- Kfaz + u4]
2 2 2 2 2 2 2
+ bl( 2 5 ( 1 3 4 6 )) = (6)
2 J zz
J yy = ( J zz - J xx )-Kfay + JrΩr +
2
(3) kftx 1
x = - x + uxu1
3 2 2 2 2 m m
+ bl ( 1 3 4 6 ) kfty 1
2 y = - y + uyu1
J zz = ( J xx - J yy )- Kfaz +
2 m m
2 2 2 2 2 2
kftz cos cos
+ d ( 1 2 3 4 5 6 ) z = - z - g + u1
m m
The hexacopter’s total thrust force and torque control inputs u 1,
u2, u3, u4 are related to the six motor’s speed by the following with : ux = coscossin sinsin .
equations: UT=[u1,u2,u3,u4] is the vector of (artificial) input uy = cos sin sin sincos .
variables[5]:
The dynamic model presented in equation set (6) can be
rewritten in the state-space form x = f(X,U). X R12 is the
vector of state variables given as follows:
11
International Journal of Applied Information Systems (IJAIS) – ISSN : 2249-0868
Foundation of Computer Science FCS, New York, USA
Volume 9 – No.5, August 2015 – www.ijais.org
4 = a4x2x6 + a5 + a6Ωrx2 + b2u3 In this next section, we present the application of two different
6 a7x2x4 + a8 + b3u4 control techniques Backstepping and Sliding-mode to hexarotor.
3. CONTROL OF HEXAROTOR
With the choice of the control input vector U, it is clear that the In this section, a control strategy is based on two loops (inner
rotational subsystem is fully-actuated, it is only dependant on the loop and outer loop). The inner loop contains four control laws:
rotational state variables x1 to x6 that correspond to ϕ, , θ, , roll command (ϕ), pitch command (θ), yaw control (ψ) and
ψ, respectively. controlling altitude Z. The outer loop includes two control laws
positions (x, y). The outer control loop generates a desired for
Rewriting the last equation (7) to have the accelerations in terms roll movement (θd) and pitch (ϕd) through the correction block.
of the other variables, we get translational equation of motion, This block corrects the rotation of roll and pitch depending on
the desired yaw (ψd). The figure below shows the control
strategy we will adopt Fig.4:
8 a9x8 + (cosx1cos x5 sin x3 + sinx1sin x5) u1
m
12
International Journal of Applied Information Systems (IJAIS) – ISSN : 2249-0868
Foundation of Computer Science FCS, New York, USA
Volume 9 – No.5, August 2015 – www.ijais.org
The hexarotor parameters used in the simulations are, ψd and d : Desired Yaw angle and rate of change
Table. 2 Parameters Used in the Simulations In order to design the PID controllers, nonlinear rotational
Parameter Description Value dynamics of hexarotor are linearized around zero, which are
Jxx MOI about body frame's x-axis 7.5e-3 kg.m2 given by,
Jyy MOI about body frame's y-axis 7.5e-3 kg.m2
Jzz MOI about body frame's z-axis 1.3e-2 kg.m2 ϕ(s) = 2(s); θ(s) = U3(s); ψ(s) = 4(s)
l Moment arm 0.23 m
Jr Rotor inertia 6e-5 kg.m2
m Quadrotor mass 0.650 kg
3.1.3 Position controller
Kf Aerodynamic force constant 3.13e-5 N s2 PID controller is defined for controlling the ex= xd – x and
KM Aerodynamic moment constant 7.5e-7 Nm s2 ey= yd – y positions. The control objective is to drive both
Rmot Motor circuit resistance 0.6 Ω values to zero (ex, ex)=(0,0). In this sense, the control laws are:
Kmot Motor torque constant 5.2 mNm/A
Kt Aerodynamic translation coeff diag(0.1,0.1,0.15) d= kp,x(xd - x) + kd,x( d- )+ ki,x ʃ(xd - x) dt
Kt Aerodynamic rotation coeff diag(0.1,0.1,0.15)
d = kp,y(yd - y) + kd,y( d- )+ ki,y ʃ(yd - y) dt
3.1 PID Controller for hexarotor
The classical PID linear controller has the advantage that
parameter gains are easy to adjust, is simple to design and has
good robustness. However some of the major challenges with
the hexarotor include the non-linearity associated with the
mathematical model and the imprecise nature of the model due
to unmodeled or inaccurate mathematical modeling of some of
the dynamics. Therefore applying PID controller to the hexarotor
limits its performance.
The purpose of the PID controller is to force the Euler angles to
follow desired trajectories. The objective in PID controller
design is to adjust the gains to arrive at an acceptable degree of
tracking performance in Euler angles.
After the mathematical model of the hexarotor along with its
open loop simulation is verified, a PID controller was developed.
The PID controller generates the desired control inputs for the
hexarotor. The block diagram for a PID controller is shown in
Figure 5.
13
International Journal of Applied Information Systems (IJAIS) – ISSN : 2249-0868
Foundation of Computer Science FCS, New York, USA
Volume 9 – No.5, August 2015 – www.ijais.org
and [7] for more details. 3.2.2 Backstepping Control of the Linear
Considering the following system, Translations
The altitude control U1 and the Linear (ux,uy) Motion Control
xid - xi i [3,5,7,9,11] are obtained using the same approach described in 3.2.
ei =
x(i-1)d + k(i-1)e(i-1) - xi i [4,6,8,10,12] U1= [g-a11x12+ d + k11(-k11e11+e12)+ k12 e12+ e11]
with ki ˃ 0 i [2,…..,12] ux= ( ) [-a9x8+ d + k7(-k7e7+e8)+ k8 e8+ e7]
3.2.1 Backstepping Control of the Rotations uy= ( ) [-a10x10+ d + k9(-k9e9+e10)+ k10 e10+ e9].
Subsystem The sliding mode control inputs which were derived and
Using the backstepping approach, one can synthesize the control expressed in equation (8) were applied to the nonlinear model in
law forcing the system to follow the desired trajectory. Refer to (7) and responses are shown in fig.(7).
[7] and [8] for more details. For the first step we consider the
tracking-error ei = x1d - x1 and we use the Lyapunov theorem
by considering the Lyapunov function Vi positive definite and
it’s time derivative negative semi-definite:
i [3,5,7,9,11]
Vi=
Vi-1 + i [4,6,8,10,12]
2= -k1 – k2 ≤ 0.
14
International Journal of Applied Information Systems (IJAIS) – ISSN : 2249-0868
Foundation of Computer Science FCS, New York, USA
Volume 9 – No.5, August 2015 – www.ijais.org
the sliding manifold, and the behavior during this phase is called
the reaching phase. This phase is known for the high magnitude
control efforts that may undergo saturation sometimes. Second is
the sliding phase, during which the error vector obeys the
dynamical implications of the analytic description of the locus
itself, which is stable by design and the error terminates at the
origin inevitably. The control scheme takes its name from the
latter dynamic behavior and is called sliding mode control.
The hexarotor system was subdivided into the full-actuated and
under-actuated systems. The under-actuated system, to which
SMC was applied, was further subdivided into under-actuated
subsystems. Results showed good stability and robustness of the
system. Chattering effect of SMC was observed but minimized
Chattering
with a continuous approximation of a pre-determined “sign”
function
The basic sliding mode controller design procedure is performed
in two steps. Firstly, choice of sliding surface (S) is made
according to the tracking error, while the second step consist the
design of Lyapunov function which can satisfy the necessary Fig. 9 The sliding Control Simulation Response
sliding condition (S <0) [9][10]. The application of sliding
mode control to hexarotor dynamic is presented here by
obtaining the expression for control input. The sliding surface
are define,
uy= ( )[ d+ λy e12– ky sign(Sy)] ( Linear y Motion) Fig. 11 the altitude, the attitude and heading responses
The sliding mode control inputs which were derived and 4.1 Linear Operation
expressed in equation (9) were applied to the nonlinear model in In this paper three linear and nonlinear control schemes are used
(7) and responses are shown in fig. 9 and fig.10. to stabilize the attitude of hexarotor UAV. The methods
considered are PID, SMC, backstepping control. The employed
controllers developed to control the hexarotor model under
15
International Journal of Applied Information Systems (IJAIS) – ISSN : 2249-0868
Foundation of Computer Science FCS, New York, USA
Volume 9 – No.5, August 2015 – www.ijais.org
The PID controller has been successfully applied to the Tracking ability A H H
hexarotor though with some limitations. The tuning of the PID Fast convergence A H LN
controller could pose some challenges as this must be conducted
around the equilibrium point, which is the hover point, to give Precision A H A
good performance. Simplicity H A LN
The SMC resulted in good stability and robustness of the Disturbance rejection LN H H
system; but an undesirable Chattering effect of SMC was
observed which was very notable in the attitude response unlike Noise (signal) H LN LN
the altitude. It minimized with a continuous approximation of a
Chattering LN H LN
predetermined “sign” function. The presence of the ‘‘sign’’ term
in the SMC's control law makes it a discontinuous controller. Legend: LN—low to none; A—average; H—high.
Shows that whenever the value of the surface s is positive, the
control law works to decrease the trajectory to reach the sliding 5. CONCLUSIONS AND FUTURE WORKS
surface (s = 0). Ideally it should continue sliding on the surface The goal of this work was to derive a mathematical model for
once hitting it, but due to the delay between the change of sign the hexarotor Unmanned Aerial Vehicle (UAV) and develop
and the change in the control action, the trajectory passes the nonlinear control algorithms to stabilize the states of the
surface to the other side. The main drawbacks of chattering are hexarotor, which include its altitude, attitude, heading and
that it causes the excitation of unmodeled system dynamics that position in space and to verify the performance of these
yields a possible instability of the system. In addition to that it is controllers with comparisons via computer simulations. The
associated with a high power consumption and possible actuator mathematical model of a hexarotor UAV was developed in
damage. These drawbacks make the SMC hard to be details including its aerodynamic effects and rotor dynamics
implemented on real systems. Backstepping control is a which we found lacking in many literatures; three control
recursive algorithm that breaks down the controller into steps techniques were then developed and synthesized; a linear
and progressively stabilizes each subsystem. Its advantage is that Proportional-Integral-Derivative (PID) controller, a nonlinear
the algorithm converges fast leading to less computational Sliding Mode Controller (SMC) and a nonlinear Backstepping
resources and it can handle disturbances well. The main controller. A complete simulation was then implemented on
limitation with the algorithm is its robustness is not good. To MATLAB/Simulink relying on the derived mathematical model
increase robustness (to external disturbances) of the general of the hexarotor. The simulation environment was used to
backstepping algorithm, an integrator is added and the algorithm evaluate the mentioned controllers and compare their dynamic
becomes Integrator backstepping control. The integral approach performances under different types of input conditions. The
was shown to eliminate the steady-state errors of the system, SMC and Backstepping controllers gave better performance
reduce response time and restrain overshoot of the control outside the linear hovering region due to their nonlinear nature.
parameters. Figure 11 show a quantitative comparison between The PID and Backstepping controllers gave better performance
the performance of the PID, SMC and Backstepping controllers than all the other controllers when the effect of wind was added
in terms of the settling time and overshoot of the system's to the system. The wind effect was modeled as extra forces and
response respectively. moments on the hexarotor body.
4.2 Nonlinear Operation As it can be seen from the experimental plots, the controller
When the controllers were used outside of the linear region introduced using the sliding-mode approach provides average
(away from hover), the PID controller failed to stabilize the results. This is partly due to switching nature of the controller
system due to the fact that PID comes out of a family of linear which introduces high frequency, low amplitude vibrations
controllers. On the other hand, the SMC and the Backstepping causing the sensor to drift. On the other hand, the backstepping
controller were able to stabilize the system with a good dynamic controller proves the ability to control the orientation angles in
performance. the presence of relatively high perturbations confirming by the
way some previous studies on under actuated systems. The SMC
In conclusion, PID controller is simple in structure; its controller has the problem of chattering.
performance may not be adequate under conditions of severe
disturbances. SMC is robust against disturbances yet it suffers An important part of this work was dedicated to finding a good
from the chattering phenomenon. Backstepping yield good control approach for hexarotors. Three techniques were explored
tracking results yet they need the availability of the system from theoretical development to final experiments.
nonlinearities, which is generally accepted as a drawback. In As evident from the review, no single algorithm presents the best
table.3 summarizes the comparison of the various algorithms as of the required features. It also been discussed that getting the
applied to hexarotors. The performance of a particular algorithm best performance usually requires hybrid control schemes that
depends on many factors that may not even be modeled. Hence, have the best combination of robustness, adaptability,
this table serves as guide in accordance with what is presented in optimality, simplicity, tracking ability, fast response and
this work. disturbance rejection among other factors.
Table.3 Comparison of control algorithms (PID, SMC, BS) The future work is to develop a fully autonomous vehicle with a
more powerful hybrid flight controller. For example, adding an
Characteristic PID Sliding mode Backstepping
integral action to the developed Backstepping controller
Robust A A LN combined with Frenet-Serret Theory will lead to the formulation
of an adaptive control algorithm robust to system uncertainties.
Adaptive LN H H Last but not least, implementing the developed control
16
International Journal of Applied Information Systems (IJAIS) – ISSN : 2249-0868
Foundation of Computer Science FCS, New York, USA
Volume 9 – No.5, August 2015 – www.ijais.org
techniques on real hexarotor hardware to give a more fair [5] Jun Shen, Qiang Wu, Xuwen Li, Yanhua Zhang, Research
comparison between their performances. The positive results of the RealTime Performance of Operating System, 5th
achieved through this development enhance the knowledge of International conference on Wireless Communications, pp.
this very unstable system and encourages us to continue towards 1-4, 2009.
full autonomy hexarotor.
[6] R. M. Murray and S. S. Sastry, A mathematical
6. REFERENCES introduction to robotic manip-ulation. CRC press, 1994.
[1] Hongning Hou, Jian Zhuang, Hu Xia, Guanwei Wang, and [7] A.W.A. Saif, M. Dhaifullah, M.A.Malki and M.E. Shafie,
Dehong Yu. A simple controller of minisize quad-rotor “Modiffied Backstepping Control of Quadrotor”,
vehicle. In Mechatronics and Automation (ICMA), 2010 International Multi-Conference on System, Signal and
International Conference on, pages 1701doi: Devices, 2012.
10.1109/ICMA.2010.5588802.
[8] A.A. Main, W. Daobo, “Modeling and Backstepping-based
[2] Jinhyun Kim, Min-Sung Kang, and Sangdeok Park. Nonlinear Control Strategy for a 6 DOF Quadrotor
Accurate modeling and robust hovering control for a Helicopter”, Chinese Journal of Aeronautics 21, pp. 261-
quadrotor vtol aircraft. Journal of Intelligent and Robotic 268, 2008.
Systems, 57(1-4):9-26, 2010.
[9] V.G. Adir, A.M.Stoica and J.F. Whidborne,“Sliding Mode
[3] Farid Kendoul. Survey of advances in guidance, navigation, Control of 4Y Octorotor”, U.P.B. Sci. Bull, Series D,
and control of unmanned rotorcraft systems. Journal of Vol.74, Iss. 4, pp. 37-51,2012.
Field Robotics, 29(2):315{378, 2012.
[10] K. Runcharoon and V. Srichatrapimuk, “Sliding Mode
[4] Simon János, Goran Martinovic, Navigation of Mobile Control of Quadrotor” International Conference of
Robots Using WSN‘s RSSI Parameter and Potential Field Technological Advances in Electrical, Electronics and
Method, Acta Polytechnica Hungarica, Journal of Applied Computer Engineering, pp. 552-556 May 9-11, 2013.
Sciences Vol.10, No.4, pp. 107-118, 2013.
17