Fuzzy PID Controller Analysis For The Hexacopter Aircraft Using Simulink Simulation

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

International Journal of Advanced Engineering Research and

Science (IJAERS)
Peer-Reviewed Journal
ISSN: 2349-6495(P) | 2456-1908(O)
Vol-11, Issue-11; Nov, 2024
Journal Home Page Available: https://ijaers.com/
Article DOI: https://dx.doi.org/10.22161/ijaers.1111.2

Fuzzy PID Controller Analysis for the Hexacopter Aircraft


Using Simulink Simulation
Jiahui Feng1, Yuhui Luo2, Zixian Huang3, Rueiyuan Wang4, Rongguei Tsai5, Raojun
Luo6, Chaoxiong Su7, Hosheng Chen*8

1,2,3,5,6,7,8School of Sciences, Guangdong University of Petrochem Technology (GDUPT), Maoming 525000, China
5Guangdong University of Science and Technology, China
*Corresponding author

Received: 23 Sep 2024, Abstract— This study aims to investigate the control benefits of rotary
Receive in revised form: 25 Oct 2024, wing aircraft systems through the Simulink simulation platform. A
Accepted: 01 Nov 2024, hexacopter aircraft is a small unmanned aerial vehicle (UAV) powered
Available online: 06 Nov 2024 by the operation of six rotors, which has important theoretical and
©2024 The Author(s). Published by AI practical application value. Firstly, the body structure and working
Publication. This is an open-access article under principle of the hexacopter aircraft are proposed. Then, a mathematical
the CC BY license model of the hexacopter aircraft is established to support the design of
(https://creativecommons.org/licenses/by/4.0/). subsequent control strategies. Next, compare the differences between
Keywords— Hexacopter Aircraft, Unmanned the classical PID controller design and the fuzzy PID controller design
Aerial Vehicle (UAV), Classical PID (Proportion methods for aircraft control systems and verify them through simulation
Integration Differentiation) Control, Fuzzy PID experiments. The simulation results show that compared with the
Control, Simulink Simulation classical PID controller, the fuzzy PID controller can stabilize the
aircraft at the target position faster when subjected to various types of
disturbances and have good practicality, stability, speed, and accuracy.
Based on this, future research can further explore the application of
other advanced control strategies in aircraft control systems and their
prospects in practical engineering.

I. INTRODUCTION The hexacopter arm of this study is installed


Nowadays, various aircraft are gradually popularized according to the layout of a conventional X-shaped body,
in various application fields of human beings, such as with the motor components and propeller distributed in the
post-disaster rescue [8, 10], water quality sampling [5], same position. The propeller has a fixed pitch, and
military logistics [11], aerial photography [9], and other although the angle between the rotating plane and the
fields, playing an important role. With the continuous fuselage cannot be changed arbitrarily, the reverse torque
development of aircraft, the attention to their related can be balanced by changing the direction of adjacent
products in today's society is gradually increasing. motors. The six motors of the hexacopter control the
Therefore, more and more different types of aircraft are attitude and altitude changes by changing the speed.
appearing on the market. The research object of this article, Number the motors as M1~M6, and the direction of
the hexacopter aircraft, is one of its derivative products. rotation of the motors is shown in Figure 1. [1,3,4,14,15]

www.ijaers.com Page | 8
Feng et al. International Journal of Advanced Engineering Research and Science, 11(11)-2024

coordinate system, mainly using a three-dimensional


Cartesian coordinate system to define the two coordinate
systems of the drone. The ground coordinate system refers
to the coordinates of the motion state and spatial position
relative to the ground. The X-Y-Z inertial coordinates of
the aircraft are taken in the north-east ground direction of
the earth and represented by G. The aircraft coordinate
system is represented by B, with the center of the aircraft
represented by OB. The X-Y-Z of the aircraft coordinate
system corresponds to the front right bottom direction of
Fig.1 Schematic diagram of the rotational posture of the the hexacopter aircraft. The transformation between the
hexacopter motor ground coordinate system and the aircraft coordinate
system is shown in Figure 2.
When the six motors of a quadcopter operate in
synergy, the aircraft can achieve various motion controls
such as roll, pitch, translation, yaw, and hover during flight
[7]. The flight control of drones is usually achieved
through a built-in flight control system, which calculates
and adjusts the rotor speed based on data provided by
sensors such as gyroscopes, accelerometers, and
compasses to achieve stable flight. Fig.2: Transformation of Ground Coordinates Systems and
The purpose of this article is to study the motion Aircraft Coordinate Systems
control system of a hexacopter aircraft, establish
mathematical models for the kinematics and dynamics of The rotation angle of the aircraft coordinate system
the hexacopter, and consider the attitude and altitude around the X-Y-Z axis of the ground coordinate system
information of the hexacopter. The main approach is based can obtain three Euler angles, namely yaw angle φ, roll
on the functions of MATLAB software, classical PID angle θ, and pitch angle ψ. The Euler angle is commonly
control, and fuzzy PID control [2, 6, 12], as well as the used to represent the relationship between the ground
anti-interference attitude controller designed with coordinate system and the aircraft coordinate system and is
anti-interference control ideas [13]. The mathematical an intuitive attitude representation method for UAV.
models derived from mathematical and physical theories According to Euler's theorem, the rotation of a rigid body
are imported into Matlab software for simulation, which around a fixed point is the synthesis of several finite
can effectively test the stability, speed, and accuracy of the rotations around that point. Therefore, the motion of a
six-rotor aircraft system, obtain relevant data, and compare rigid body rotating around a fixed point can be
the data of classical PID control and fuzzy PID control to decomposed into a series of individual rotations around
verify the superiority of the fuzzy PID control system in that point, with the rotation angle being Euler's angle. Thus,
all aspects. the attitude matrix is represented by the product of three
basic rotation matrices, making the ground coordinate
II. ESTABLISH MATHEMATICAL MODEL FOR system and the aircraft coordinate system exactly the
HEXACOPTER AIRCRAFT same.
2.1 Coordinate System and Attitude Representation of When XB rotates around the XG axis, the obtained
Hexacopter Drones yaw angle is φ, and the transformation matrix RX (φ) is:
The coordinate system of a hexacopter aircraft is 1 0 0
divided into a ground coordinate system and an aircraft RX(φ)= [0 cosφ −sinφ]
0 sinφ cosφ

www.ijaers.com Page | 9
Feng et al. International Journal of Advanced Engineering Research and Science, 11(11)-2024

When YB rotates around the YG axis, the roll angle θ cos 𝜓 sin 𝜓 0
is obtained, and the transformation matrix Ry (θ) is RX(𝜓)= [− sin 𝜓 cos 𝜓 0]
obtained as follows: 0 0 1

sin θ 0 − sin θ When the hexacopter rotates in the three-axis position


RX(θ)= [ 0 1 0 ] during flight, according to Newton's second theorem
sin θ 0 cos θ M=J𝜔̇ , the conversion relationship of angular velocity S=
When ZB rotates around the ZG axis, the resulting
[𝜑̇ θ̇ 𝜓̇] in the ground coordinate system can be
pitch angle is denoted as 𝜓. The transformation matrix RZ
(ψ) is obtained as follows: obtained as follows:

cos 𝜓 cos θ cos 𝜓 sin θ sin φ − sin 𝜓 cos φ cos 𝜓 sin θ cos φ + sin 𝜓 sin φ
R(𝜓、θ、φ) = [ sin 𝜓 cos θ cos 𝜓 cos φ + sin 𝜓 sin θ sin φ sin 𝜓 sin θ cos φ − cos 𝜓 sin φ] (1)
− sin θ cos θ sin 𝜓 cos θ cos φ
2.2 Mathematical Model of Hexacopter Aircraft and ω̇ ̇ is the angular acceleration. When the hexacopter
The hexacopter aircraft in this article is a undergoes translational motion during three-axis flight,
mathematical model of the "X" type, but in actual flight, it according to Newton's second law F=ma, it can be
is subject to uncertain factors such as its own gravity, air obtained that:
resistance, and changes in its own torque. If the flight 𝑥̈ 0
speed of the aircraft is relatively low, the following [𝑦̈ ] = 𝐹 + [ 0 ] (2)
assumptions are made to simplify the modeling of the 𝑧̈ 𝑚𝑔

aircraft: When the lift direction generated by the six rotors of a


(1) Hexacopter aircraft should be treated as rigid bodies, hexacopter is consistent and perpendicular to the ground
and the structural elasticity and deformation of the body coordinate ZG direction, then:
should be ignored. Uz=F=F1 + F2 + F3 + F4 + F5 + F6
(2) The mass and moment of inertia of the aircraft are =b(ω12 + ω22 + ω23 + ω24 + ω25 + ω26 ) (3)
assumed to be almost constant, only subjected to gravity According to F=[0 0 -UZ]T as the vector of the total
and propeller tension, ignoring unknown disturbances. lift of the hexacopter, the mathematical model of the
(3) The geometric center of the hexacopter is not only the nonlinear kinematics of the hexacopter aircraft is obtained
same as but also coincides with the position of gravity. by substituting equations (1) and (2) as follows:
(4) Neglecting the influence of the Earth's rotation and 𝑥̈ = −
(cos 𝜓 sin θ cos φ+sin 𝜓 sin φ)𝑈𝑧
𝑚
revolution on the forces acting on a hexacopter UAV. (cos 𝜓 sin θ cos φ−sin 𝜓 sin φ)𝑈𝑧
𝑦̈ = − (4)
According to physical theory, force analysis shows 𝑚
(cos θ cos φ)𝑈𝑧 −𝑚𝑔
that the lift is mainly affected by the body's gravity and the { 𝑧̈ = −
𝑚

generated lift. Lift is generated by six motors driving the When the hexacopter rotates in the three-axis position
rotor to rotate, namely F1, F2, F3, F4, F5, and F6. The during flight, according to Newton's second theorem
combined force of a six rotor UAV is F; the angular M=J𝜔̇ , the conversion relationship of the angular velocity
velocity is ω, the moment of inertia is J, the body weight is S=[𝜑̇ 𝜃̇ 𝜓̇]𝑇 in the ground coordinate system can be
m, the velocity is v, and the resultant moment is M. The obtained as follows:
lift generated by the hexacopter is defined as UZ, the lift 𝜑̇ 1 sin φ tan θ cos φ tan θ 𝑝
coefficient is defined as b, and the arm length is defined as [ 𝜃̇ ] = [0 cos φ − sin φ ] [𝑞 ] =
L. Define E=[xyz] T as the position motion vector of the 𝜓̇ 0 sin φ sec θ cos φ sec θ 𝑟
hexacopter body in the ground coordinate system, and 𝑝 sin 𝜃+𝑞 sin 𝜑 sin 𝜃+𝑟 cos 𝜑 sin 𝜃

Ë as the acceleration vector; ω = [p q r]T is the cos 𝜃


𝑞 cos 𝜃 − 𝑟 sin 𝜑 (5)
vector on the X-Y-Z axis in the ground coordinate system, 𝑞 sin 𝜑+𝑟 cos 𝜃
[ cos 𝜃 ]

www.ijaers.com Page | 10
Feng et al. International Journal of Advanced Engineering Research and Science, 11(11)-2024

When a hexacopter aircraft performs roll, pitch, and The measured parameters of the hexacopter aircraft
yaw movements during flight, according to the studied in this article are shown in Table 1.
conservation of angular momentum M=Ia, the relationship Table 1 Parameters of Physical Measurement Values for
between the rotational moments MX, MY, MZ in the x, y, z Hexacopter Aircraft
directions of the body coordinate axes and the rotational Parameter Parameter
Physical meaning
inertia IX, IY, IZ can be analyzed. It can be concluded that: symbols values
MX =IX 𝑝̇ +qr (IY − IZ ) =IX 𝜑̈ + 𝜃̇𝜓̇(𝐼𝑌 − 𝐼𝑍 ) Total mass of hexacopter
𝑚 6
{ MY =IY 𝑞̇ +pr (IZ − IX ) =IY 𝜃̈ + 𝜓̇𝜑̇ (𝐼𝑍 − 𝐼𝑋 ) (6) (kg)
MZ =IZ 𝑝̇ +qp (IX − IY )=IZ 𝜓̈ + 𝜃̇𝜑̇ (𝐼𝑋 − 𝐼𝑌 ) Gravitational 9.8
𝑔
The assumption of a hexacopter aircraft is acceleration(m/s ) 2

decomposed from a mathematical model using four Inertia of rotation around 0.6217
𝐼𝑋
independent control channels. The variables for vertical the X-axis(kg·m ) 2

(altitude) control input are defined as UZ, lateral control Inertia of rotation around 0.6217
𝐼𝑌
input as UH, pitch control input as UF, and yaw input as UP. the Y-axis(kg·m ) 2

From this, it can be inferred that the changes between each Inertia of rotation around 1.0845
𝐼𝑍
control channel and lift are: the Z-axis(kg·m2)
𝑈𝑍 = 𝐹1 + 𝐹2 + 𝐹3 + 𝐹4 + 𝐹5 + 𝐹6 Hexacopter fuselage 0.4025
𝑈𝐻 = 𝐹1 + 𝐹3 − 𝐹4 − 𝐹6
{ (7) radius(1/2 wheelbase, 𝐿
𝑈𝐹 = 𝐹6 − 𝐹1 + 𝐹3 − 𝐹4
𝑈𝑃 = 𝐹1 + 𝐹2 − 𝐹3 − 𝐹4 − 𝐹5 + 𝐹6 m)
Assuming all assumptions are met and wind
resistance is ignored, based on the above calculations, the III. CONTROL SYSTEM DESIGN AND FUZZY
mathematical model of the theoretical dynamics of a LOGIC ESTABLISHMENT
hexacopter aircraft can be obtained as follows: 3.1 Control System Design
(cos 𝜓 sin 𝜃 cos 𝜑−sin 𝜓 sin 𝜑)𝑈𝑧
𝑥̈ = −
𝑚
The control system is generally composed of multiple
𝑦̈ = −
(sin 𝜓 sin 𝜃 cos 𝜑−cos 𝜓 sin 𝜑)𝑈𝑧 components, and the flow structure of the control system
𝑚
(cos 𝜃 cos 𝜑)𝑈𝑧 −𝑚𝑔 for a hexacopter aircraft is shown in Figure 3.
𝑧̈ = −
𝑚
𝑙𝑈𝐻 −𝜃̇ 𝜓̇(𝐼𝑌 −𝐼𝑍 ) (8)
𝜑̈ =
𝐼𝑋
𝑙𝑈𝐹 −𝜑̇𝜓̇(𝐼𝑍 −𝐼𝑋 )
𝜃̈ =
𝐼𝑌
𝑙𝑈𝑃 −𝜃̇ 𝜑̇(𝐼𝑋 −𝐼𝑌 )
{ 𝜓̈ =
𝐼𝑍

www.ijaers.com Page | 11
Feng et al. International Journal of Advanced Engineering Research and Science, 11(11)-2024

Fig.3 Flow Chart of Control System for Hexacopter Aircraft

3.2 Classic PID Control Principle feedback value; the larger the proportional coefficient, the
The most common control method in general control higher the adjustment sensitivity. The integral coefficient
systems is classical PID control. The classic PID control accumulates the difference between the preset value and
system is shown in Figure 4. the feedback value over time, but there is a significant lag.
The differential coefficient is the rate of change of the
research object, which can make corresponding
adjustments in advance based on the rate of change of the
difference.
3.3 PID Controller Transfer Function
After simplifying the model of the hexacopter aircraft,
equation (8) can be obtained. The nonlinear equation can
be processed to obtain a linearized equation. According to
Fig.4 PID Control System Structure Diagram the system construction of this study, the six degrees of
freedom of the aircraft can be reduced to four degrees of
The expression for the classic PID controller is: freedom, so only the height, pitch, roll, and yaw conditions
e(t) = x(t) − y(t) (9) of the vertical aircraft need to be considered during
t d operation. The control variables for these four situations
u(t) = K P e(t) + K i ∫0 e (t)dt + K d e(t) (10)
dt are represented by UZ as variables perpendicular to X, Y,
In Figure 4, P, I, D represent proportional control, and Z, UH as variables for roll, UF as variables for pitch,
integral control, and differential control, respectively, and UP as variables for yaw. The attitude change of the
corresponding to the proportional coefficient KP, integral drone during flight is achieved through the variation of
coefficient Ki, and differential coefficient Kd in equation control angles ψ, θ, and φ. When cosθ and cosφare
(10). The proportional coefficient is the amplification approximately 1 during flight, the drone is in hover or
factor of the difference between the preset value and the low-speed motion. The controller of a hexacopter aircraft

www.ijaers.com Page | 12
Feng et al. International Journal of Advanced Engineering Research and Science, 11(11)-2024

can convert the dynamic model into a state space The brushless motor used in hexacopter drones is a
expression through the LPV method, which is manifested small motor, and the inductance coefficient inside the
as: brushless motor is relatively small. Thus, the inductance
𝑋̇ = 𝐴𝑋 + 𝐵𝑈𝑇 coefficient can be ignored. Therefore, using an
{ (11)
𝑌 = 𝐶𝑋 + 𝐷𝑈𝑇 approximate first-order inertia link brushless motor
where: mathematical model, the transfer function of the brushless
𝑈𝑇 = [𝑈𝑍 𝑈𝐻 𝑈𝐹 𝑈𝑃 ]𝑇 motor can be expressed as:
0.75
T 0
X = [Ẋ Ẏ Ż φ̇ θ̇ ψ̇ φ θ ψ] 0.1𝑠+1 0 0
0.75 0 0
0
0.1𝑠+1
T 𝐺2 (𝑠) = 0.75
Y = [Ż φ θ ψ] 0 0 0
0.1𝑠+1
0 0 0.75
[ 0
0 0 0 0 0 0 0 0 0 0.1𝑠+1]
0 0 0 0 0 0 0 0 0 (13)
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 The transfer function of the system is obtained by
A= 0 0 0 0 0 0 0 0 0 multiplying equation (11) with equation (12):
0 0 0 0 0 0 0 0 0 𝐺(𝑠) = 𝐺1 (𝑠)𝐺2 (𝑠) =
0 0 0 1 0 0 0 0 0
0.75
0 0 0 0 1 0 0 0 0 0 0 0
𝑠𝑚0.1𝑠+1
[0 0 0 0 0 1 0 0 0] 0.75
0 0 0
𝑠𝑚0.1𝑠+1
(cos ψ sin θ cos φ+sin ψ sin φ)
0.75 (14)
m 0 0 0 0 0 0
(sin ψ sin θ cos φ+cos ψ sin φ) 𝑠𝑚0.1𝑠+1

m
0 0 0 0 0 0
0.75
0 0 0 [ 𝑠𝑚0.1𝑠+1]
(cos θ sin φ)
m According to the actual measured parameters of the
L
IX
0 0 hexacopter in Figure 2, the transfer functions of the
B= 0
0 0
L
0 altitude channel GZ, roll channel GH, pitch channel GF, and
IY
0 L yaw channel GP of the hexacopter aircraft can be obtained
0 0
IZ as (15) by substituting them into equation (14)
0 0 0 0
0 0 0 0 0.4025
𝐺𝑧 (𝑠) =
[ 0 0 0 0 ] 6𝑠(0.1𝑠+1)
0.4025
0 0 1 0 0 0 0 0 0 𝐺𝐻 (𝑠) =
0.6217𝑠(0.1𝑠+1)
(15)
C = [0 0 0 1 0 0 0 0 0]
𝐺𝐹 (𝑠) =
0.4025
0 0 0 0 1 0 0 0 0 0.6217𝑠(0.1𝑠+1)
0 0 0 0 0 1 0 0 0 0.4025

0 0 0 0 { 𝐺𝑃 (𝑠) = 1.0845𝑠(0.1𝑠+1)

D = [ 0 0 0 0] The input values for defining the attitude angle are ψa,
0 0 0 0
0 0 0 0 θa, and 𝜑𝑎 , and the output feedback angles are ψ, θ, and φ.
The transfer function is obtained by applying Laplace Therefore, the expression for the error values of e ψ, eθ, and
transform to equation (11), which is: 𝑒𝜑 is obtained as (16):
(1) 𝑒𝜓 = 𝜓𝑎 − 𝜓
𝑚
0 0 0 { 𝑒𝜃 = 𝜃𝑎 − 𝜃 (16)
𝑠
𝐿
𝐼𝑋
0 0 𝑒𝜑 = 𝜑𝑎 − 𝜑
0
𝑠
𝐺1 (𝑠) = 𝐶[𝑠𝑙 − 𝐴]−1 + 𝐷 = 𝐿 By substituting equation (11) into the PID control
𝐼𝑌
0 0 𝑠
0 expression (10), the control law for attitude angle can be
0 0 𝐿
𝐼𝑍
obtained as follows:
[ 0 ]
𝑠

(12)

www.ijaers.com Page | 13
Feng et al. International Journal of Advanced Engineering Research and Science, 11(11)-2024

𝑡
𝜓̈ = 𝐾𝑝 𝑒𝜓 + 𝐾𝑖 ∫0 𝑒𝜓 𝑑𝑡 + 𝐾𝑑
𝑑
𝑒 the system. In fuzzy PID controllers, fuzzy logic is used to
𝑑𝑡 𝜓
𝑡 𝑑 dynamically adjust PID parameters, enabling the controller
𝜃̈ = 𝐾𝑝 𝑒𝜃 + 𝐾𝑖 ∫0 𝑒𝜃 𝑑𝑡 + 𝐾𝑑 𝑒𝜃 (17)
𝑡
𝑑𝑡 to adaptively adjust based on the real-time state of the
𝑑
{ 𝜑̈ = 𝐾𝑝 𝑒𝜑 + 𝐾𝑖 ∫0 𝑒𝜑 𝑑𝑡 + 𝐾𝑑 𝑑𝑡
𝑒𝜑 system, thereby improving control. The structure of the
3.4 Fuzzy PID Control Principle fuzzy PID control system is shown in Figure 5.
When there are nonlinear models and unknown
uncertainties in the control of the system, it is necessary to
provide more flexible and intelligent control strategies for

Fig.5 Fuzzy PID Control System Structure Framework Diagram

As shown in Figure 5, fuzzy PID control mainly multiplied by the scaling factor to output Kp, Ki, and Kd.
consists of three steps: fuzzification, fuzzy inference, and Therefore, the representation of PID parameters is:
deblurring. In a fuzzy PID control system, error E and K p = K p1 + ∆K p
error rate of change EC are the two inputs of the fuzzy PID { K i = K i1 + ∆K i (18)
controller, while Kp, Ki, and Kd are the three outputs of K d = K d1 + ∆K d
the controller. Set the input domain of the fuzzy sets E and EC to [-3
Assuming that the original values Kp1, Ki1, and Kd1 3], and their fuzzy subsets are E=ES={negative large,
obtained in the classical PID controller are quantized in E negative medium, negative small, zero, positive small,
and EC, and the correction parameters are determined median, positive large}={NB, NM, NS, ZO, PS, PM, PB},
based on the established fuzzy rules, the resulting with a scaling factor of 1. All inputs and outputs use
correction values are ΔKp, ΔKi, and ΔKd. Finally, they are triangular wave-type membership functions. Establish
fuzzy rules based on the fuzzy rule table (Table 2).
Table 2 Fuzzy Rules Table for ΔKp, ΔKi, and ΔKd
ES
𝐾𝑃 ∆𝐾𝑖 ∆𝐾𝑑
NB NM NS Z0 PS PM PB
NB PB NB PS PB NB NS PM NM NB PM NM NB PS NB NB Z0 Z0 NM Z0 Z0 PS
NM PB NB PS PB NB NS PM NM NB PS NS NM PS NS NM Z0 Z0 NS NS Z0 Z0
NS PM NB Z0 PM NM NS PM NS NM Z0 NS NM Z0 Z0 NS NS PS NS NS PS Z0
E Z0 PM NM Z0 PM NM NS PS NS NS Z0 Z0 NS NS PS NS NM PM NS NM PM Z0
PS PS NM Z0 PS PS Z0 Z0 Z0 Z0 PS NS Z0 NS NS Z0 NM PM Z0 NM PB Z0
PM PS Z0 PB Z0 Z0 NS PS PS PS PS NM PS NM PM PS NB PB PS NB PB PB
PB Z0 Z0 PB Z0 Z0 PM NM PS PM PM NM PM NM PM PS NB PB PS NB PB PB

www.ijaers.com Page | 14
Feng et al. International Journal of Advanced Engineering Research and Science, 11(11)-2024

3.5 Comparison between Classical PID Control and equation (15) into the Simulink module. Due to the
Fuzzy PID Control similarity of the roll channel and pitch channel models,
Through Simulink simulation, the control effects of these two channels share a simulation model, and three
classical PID control systems and fuzzy PID systems can classical PID control models and three fuzzy PID control
be more intuitively observed, leading to more convincing models are established. The four channel simulations of
results. Based on the mathematical model of the dynamics classical PID control are shown in Figures 6, 7, and 8. In
of the hexacopter aircraft calculated in the previous text, addition, the simulation models of fuzzy PID control built
substitute the simplified and calculated transfer function in Matlab are shown in Figures 9, 10, and 11.

Fig.6 Altitude Channel Simulation Diagram of Classic PID Control for Hexacopter Aircraft

Fig.7 Simulation Diagrams of Roll Channel and Pitch Channel of Classic PID Control for Hexacopter Aircraft

Fig.8 Simulation Diagram of Yaw Channel for Classic PID Control of Hexacopter Aircraft

Fig.9 Altitude Channel Simulation of Fuzzy PID Control for Hexacopter Aircraft

Fig.10 Simulation Diagrams of Roll Channel and Pitch Channel of Fuzzy PID Control for Hexacopter Aircraft

www.ijaers.com Page | 15
Feng et al. International Journal of Advanced Engineering Research and Science, 11(11)-2024

Fig.11 Simulation Diagram of Yaw Channel for Fuzzy PID control of Hexacopter Aircraft

3.6 Hexacopter Simulation Results and Comparison seconds (Figure 12). According to the analysis of the curve
The Kp, Ki, and Kd values of the classic PID control changes, it can be seen that fuzzy PID control has a faster
for the height channel are 180, 12, and 15, respectively; response, and under pulse interference, the descent speed
the values of ΔKp, ΔKi, and ΔKd for fuzzy PID control is faster. The time to recover stable values is similar, and
are 1500, 8, and 34, respectively. At a unit-step response, the time to reach stability is slightly faster than classical
the height channel introduces pulse interference at 0.5 PID control.

Fig.12 Effect Diagram of Height Channel Pulse Interference Control

The roll channel and pitch channel introduce pulse a faster descent speed in the presence of pulse interference,
interference at 0.5 seconds under unit step response a shorter time required to recover stable values, and a
(Figure 13). According to the analysis of the curve changes, faster time to reach stability than classical PID control.
it can be seen that fuzzy PID control has a faster response,

www.ijaers.com Page | 16
Feng et al. International Journal of Advanced Engineering Research and Science, 11(11)-2024

Fig.13 Effect Diagram of Pulse Interference Control for Roll and Pitch Channels

The values of ΔKp, ΔKi, ΔKd for the fuzzy PID it can be seen that fuzzy PID control has a faster response.
control of the yaw channel are 2400, 1, and 38.5, Under pulse interference, its descent speed is faster, and it
respectively. The yaw channel introduces pulse takes less time to recover stable values. It can be clearly
interference at 0.5 seconds under unit step response seen that the time to stabilize is faster than classical PID
(Figure 14). According to the analysis of the curve changes, control.

Fig.14 Yaw Channel Pulse Interference Control Effect Diagram

Due to the various uncontrollable factors in the air simulation, and interference signals were given to the
environment that affect the flight of a hexacopter drone, controller at the beginning of the simulation to verify the
two continuous signals were selected as interference stability of the control.
simulation experiments. Cosine and random numbers were According to the simulation curves of the cosine and
used as input interference signals in Matlab/Simulink random interference signals controlled by the height

www.ijaers.com Page | 17
Feng et al. International Journal of Advanced Engineering Research and Science, 11(11)-2024

channel (Figure 15, Figure 16), when the controller is of classical PID control is shorter than that of fuzzy PID
disturbed by the cosine signal, the overshoot of fuzzy PID control in some areas, the adjustment time of fuzzy PID is
control is slightly lower than that of classical control, and shorter than that of classical PID in most areas. From this,
the adjustment time is shorter. Fuzzy PID can almost be in it can be seen that the height channel is relatively stable
a relatively stable state, and the response speed of the two under fuzzy PID control and can maintain stability by
is not significantly different. When the controller is adjusting the interference encountered by the drone in a
disturbed by random signals, although the adjustment time timely manner.

Fig.15 Control Effect Diagram of Cosine Interference Signal in Height Channel

Fig.16 Control Effect of Random Interference Signal in Height Channel

According to the simulated curve changes of cosine the adjustment time is slightly shorter. Fuzzy PID can
and random interference signals for roll and pitch channel almost be in a relatively stable state, but there may be
control (Figures 17, Figures 18), when the controller is slightly larger overshoot, and the response speed of the
disturbed by cosine signals, the overshoot of fuzzy PID two is not significant. When the controller is disturbed by
control is slightly smaller than that of classical control, and random signals, fuzzy PID control has slightly lower

www.ijaers.com Page | 18
Feng et al. International Journal of Advanced Engineering Research and Science, 11(11)-2024

overshoot, faster response speed, and significantly shorter stable in fuzzy PID control with a small amplitude
adjustment time than classical control, with shorter rise difference due to the interference of cosine signals, while
and fall times, quickly maintaining a stable state. From this, the interference comparison effect of random signals is
it can be seen that the roll and pitch channels are relatively very obvious.

Fig.17 Control Effect Diagram of Cosine Interference Signal in Roll and Yaw Channels

Fig.18 Control Effect Diagrams of Random Interference Signals in Roll and Yaw Channels

According to the simulated curve changes of cosine in a relatively stable state, and the response time of the two
and random interference signals for yaw channel control is not significantly different. When the controller is
input (Figures 19 and Figures 20), when the controller is disturbed by random signals, the overshoot of fuzzy PID
disturbed by cosine signals, the overshoot of fuzzy PID control is almost the same as that of classical control, with
control is slightly smaller than that of classical control, and relatively fast response speed and shorter adjustment time.
the adjustment time is slightly shorter. Fuzzy PID is almost The rise and fall times are also significantly shorter, which

www.ijaers.com Page | 19
Feng et al. International Journal of Advanced Engineering Research and Science, 11(11)-2024

can quickly maintain a stable state. From this, it can be PID control.
seen that the yaw channel is relatively stable under fuzzy

Fig.19 Control Effect Diagram of Cosine Interference Signal in Yaw Channel

Fig.20 Control Effect of Random Interference Signal in Yaw Channel

IV. CONCLUSIONS improved, and the performance of drones can be enhanced.


In terms of simulation of hexacopter aircraft under From the simulation results, it can be seen that if the
changing real-world conditions, during the actual flight control system adopts fuzzy PID control, the performance,
process, drones are subject to many unknown interferences, stability, and anti-interference ability of the hexacopter
such as sudden changes in signals, wind resistance, and aircraft are superior to classical PID control. A hexacopter
magnetic fields, which can affect their flight conditions. aircraft needs to control the rotation of six motors, and
Therefore, through simulation, problems can be effectively each motor and controller can quickly self-regulate when
discovered, the design effectiveness of drones can be deviations occur, reducing interference to the drone and

www.ijaers.com Page | 20
Feng et al. International Journal of Advanced Engineering Research and Science, 11(11)-2024

effectively maintaining its ability to fly normally in the air. [11] Wang, C., Application and Development Trend Analysis of
Overall, the system control is the key to the design of a Multi rotor Drones in Military Logistics Field, Winged
hexacopter UAVs system. Through the simulation missile. 2021, (08):56-60.
experiment results of this study, ideal scientific data can be DOI:10.16338/j.issn.1009-1319.20200334.
obtained to design suitable controllers. [12] He, Z. Research on UAV flight control and communication
method based on fuzzy adaptive. Wireless Netw. 2024, 30,
REFERENCES 6105–6113. https://doi.org/10.1007/s11276-023-03408-3
[1] Alaimo, A., Artale, V., Milazzo, C.L.R. et al., PID Controller [13] Li, S., He, D., and Liao, F. Attitude stabilization
Applied to Hexacopter Flight. J Intell Robot Syst. 2014, 73, backstepping control of a six rotor unmanned aerial vehicle
261–270. https://doi.org/10.1007/s10846-013-9947-y based on nonlinear feedforward compensation. 2024, 1-21.
[2] Chen, W., Tu, C., Liu, J., Yan, Z., Ren, Y. & Ju, T. Research https://doi.org/10.16183/j.cnki.jsjtu.2023.652.
on Fuzzy PID Flight Control Strategy for Oil Electric [14] Ding, L., Wu, H., and Li, X. Trajectory Tracking Control of
Hybrid Hexacopter Unmanned Aerial Vehicle, Journal of Hexacopter Aircraft under Aggregate Interference. 2018,
Chongqing Jiaotong University (Natural Science Edition). 40(05): 622-628.
2024, 43(08):124-132. DOI:10.13374/j.issn2095-9389.2018.05.013.
[3] Tu, P. Research on fault-tolerant control method for tiltable [15] Chen, Y. Research on fault-tolerant flight control of
six rotor unmanned aerial vehicle, East China Jiaotong hexacopter unmanned aerial vehicles, Nanjing University of
University. 2023. DOI:10.27147/d.cnki.ghdju.2023.000373. Aeronautics and Astronautics, 2014.
[4] Lopez-Franco, C., Gomez-Avila, J., Alanis, A.Y.,
Arana-Daniel, N., and Villaseñor, C., Visual Servoing for an
Autonomous Hexarotor Using a Neural Network Based PID
Controller. Sensors. 2017, 17(8):1865.
https://doi.org/10.3390/s17081865
[5] Tang, M., Fesign of Water Quality Sampling Unmanned
Aerial Vehicle System Based on Fuzzy PID, Nanjing
University of Information Science and Technology. 2021.
DOI:10.27248/d.cnki.gnjqc.2021.000861.
[6] Yao, S., Research on Hardware Control System Design and
Attitude Control Optimization of Six rotor Agricultural
Patrol Carrier Drone, Xinjiang Agricultural University. 2023.
DOI:10.27431/d.cnki.gxnyu.2023.000213.
[7] Zhao, J., Chen, Z., and Zhang, R. Research on Multi rotor
Precise Fixed point Hover Control Based on Cascade PID.
2021, 28(08):17-20+30.
[8] Perez-Saura, D., Fernandez-Cortizas, M., Perez-Segui, R. et
al. Urban Firefighting Drones: Precise Throwing from UAV.
J Intell Robot Syst. 2023, 108, 66.
https://doi.org/10.1007/s10846-023-01883-6
[9] Shen, W. Research on pose detection of hexacopter
unmanned aerial vehicle based on visual assistance. 2021.
DOI: 10.27234/d.cnki.gnhuu.2021.000401.
[10] Yang, B. Research on the Application and Development of
Multi rotor Drones in the Rescue Field. Computer Products
and Distribution. 2020, (05):130.

www.ijaers.com Page | 21

You might also like