The Korean Society for Power System Engineering
[ Article ]
Journal of Power System Engineering - Vol. 26, No. 5, pp.53-63
ISSN: 2713-8429 (Print) 2713-8437 (Online)
Print publication date 31 Oct 2022
Received 11 Oct 2022 Revised 18 Oct 2022 Accepted 19 Oct 2022
DOI: https://doi.org/10.9726/kspse.2022.26.5.053

A Study on Stable Control of Quadcopter with Disturbance using Intelligent Controller

Duc-Anh Pham* ; Seung-Hun Han*,
*Professor, Department of Mechanical System Engineering, Gyeongsang National University.
*Graduate student, Department of Mechanical System Engineering, Gyeongsang National University.

Correspondence to: Seung-Hun Han : Professor, Department of Mechanical System Engineering, Gyeongsang National University. E-mail: shhan@gnu.ac.kr, Tel : 055-772-9150

Abstract

In the past decade, drones and artificial intelligence have been two of the objects that have captured the attention of researchers, modern technology lovers and enthusiasts. Drone operations are often unstable due to many external environmental influences, so altitude control and tracking trajectory control play an important role. Applying an intelligent controller is an effective solution for adjusting the stability of the quadcopter's operation. In this article, the author proposes a hybrid controller neural network and fuzzy logic controller to control the drone to operate stably following the preset trajectory. This study presents stable flight control and tracking trajectory control for quadcopter using a traditional PID controller and an adaptive neuro-fuzzy interference system (ANFIS) controller. In this paper, the Newton-Euler formula is used to present the mathematical formula of the quadcopter and then tested and simulated by Matlab/Simulink. The results show that the intelligent controller has the ability to operate more efficiently and respond faster than the traditional PID controller.

Keywords:

Drone, Neural network, Fuzzy logic controller, Matlab/Simulink, Operate stably

1. Introduction

Quadcopter1-2) is a 4-wing helicopter classified as vertical take-off and landing aircraft, also known as VTOL (Vertical Take Off and Lading). It has the ability to move in 6 directions (up-down, front-back, left-right), and the ability to stay in place (Hover). Compared to other types of flying models such as helicopter models, which have a very complex mechanical structure and many finely crafted small details, the Quadcopter is much simpler, this type consists of only 4 brushless motor coals placed at the four corners of a square. The direction of rotation of 2 adjacent motors will be opposite to each other. As a result, it can eliminate the torque caused by each motor. In addition to that ability, these 4 engines when rotating create lift for the aircraft.

Another important factor is that the propeller diameter of the quadcopter is much smaller than that of other types of flight models (such as helicopters), so it is more convenient to fly test or fly indoors to people around. In terms of control, a quadcopter is a complex control system because it has to collect and process many types of motion sensors with low stability, and response time must be as timely as possible. Depending on the control circuit system to what extent will determine the ability to control the quadcopter easy or difficult. But with a good design, a person who has never piloted it before can easily control the quadcopter. According to the above principle, controlling a quadcopter is just controlling the speed of 4 motors to get the desired movement.

Up to the present time, Quadcopter has proven to be highly applicable in many areas of life.3-5) One of the important areas that can be mentioned is the military. They were commonly used first to meet the needs and requirements of military missions and later extended to civilian use. These devices can be monitored from above for optimal security protection. In dangerous attacks, drones will ensure human safety when they can completely replace manned aircraft. In data collection, taking pictures for scientific research has become easier than ever. In the field of rescue assistance: finding victims in difficult mountainous areas is no longer a difficult problem. With drones, real-time videos of earthquakes, fires, and floods are provided as needed. The field of commercial production: the transportation and delivery of goods becomes more modern and convenient than ever. Not only that, but we can also supervise the construction of bridges and roads, factories, and high-rise buildings. Especially the entertainment sector: this is an area that benefits quite a lot when drones are unmanned driver appears. Photography of aerial shots is no longer a problem, even rare scenes can be captured simply.

ANFIS - Adaptive Neuro-Fuzzy Interference System6-15) is a combination of two computational methods of artificial neural network (ANN) and fuzzy logic. Fuzzy logic has the ability to transform qualitative aspects of human knowledge and insights into precise quantitative analysis. However, it does not have a deterministic method that can be used as a guide in the process of converting and thinking humans into Fuzzy Inference Systems (FIS) and it takes quite a while. to regulate Member Functions (MFs). Unlike ANN, it has a higher ability in the learning process to adapt to its environment. Therefore, ANN can be used to automatically adjust MFs and reduce the error rate in determining rules in fuzzy logic.

Using the available input/output data set, the anfis function builds a fuzzy inference system (FIS - Fuzzy Inference System), its membership function parameters are adjusted using the training algorithms of the network neurons such as backpropagation (BP) algorithms or combining propagation with the least squares method. That allows our fuzzy system to "learn" from the data set they are modeled on.

A FIS - Fuzzy Inference System is built on three main components, which are input, output, and basic rules, which include the selection of fuzzy logic rules "If-Then;" as a function of fuzzy set membership and reason fuzzy inference techniques from fundamental laws to get the output.

The underlying rules and the database are known as the knowledge base, where both are key factors in the decision-making process. Typically, the database contains information such as information about the fuzzy set parameter with a function already defined for each current language variable. Database development often includes defining global data, determining the number of language values to be used for each language variable, as well as setting up a member function.

Based on rules, it contains fuzzy logic operators and an "If-Then." Basic rules can be built from human or automated generation, where search rules use numerical input-output data.

There are several types of FIS such as Takagi-Sugeno, Mamdani, and Tsukamoto. A FIS model of the Takagi-Sugeno model has been widely used in the application of the ANFIS method.

In this paper, the ANFIS controller is used to control the Drone in stable operation. This study uses the controller “Adaptive Neural Fuzzy Interference System” based on the Takagi-Sugeno ruler. Compared to drones using intelligent controllers based on Fuzzy Logic Control14), the design will be easier because it does not have to depend on the experience of experts to design but can be self-taught thanks to ANN, which uses the ANFIS controller to update the parameters of the PID controller online. Drones are objects that always operate in a disturbed environment, then the ANFIS controller is a very good proposition for this case thanks to the mentioned above. The control algorithm of the PID controller and the ANFIS controller is simulated on Matlab/Simulink. The results obtained from the simulations of both controllers are compared.


2. Theoretical basis and mathematical model of Quadcopter

2.1 Quadcopter control theory

The front and rear propellers rotate counterclockwise, while the right (right) and left (left) blades rotate clockwise to balance the torque generated by the blades on the frame. All 4 wings must produce an equal amount of thrust during Quadcopter takeoff and landing (throttle up/down). The roll angle is controlled by varying the speed between the right and left wings so that the total thrust generated by the wings remains the same. Likewise, the pitch is controlled by changing the speed of the front and rear wings while keeping the total thrust. Meanwhile, the yaw is controlled by the change in the speed of the right and left wings compared to the speed of the front and rear wings, but the total thrust of the four wings remains constant for the Quadrocopter to maintain altitude.

Fig. 1

Quadcopter Basic Movement

Fig. 2

Torque model of Quadcopter

2.2 The theory of motion of Quadcopter and building an aircraft dynamics model

The main operating principle of this model works based on the movement of the air flows generated by the aircraft wings moving downwards, causing the object to fly upwards and the adjustment of the speed of each engine will change the direction of flight of the Quadrocopter.

To describe the motions of a rigid frame with 6 degrees of freedom, 2 frames of reference are needed (Fig. 3). In Fig. 3, we have the Oxyz coordinate system, which is a global coordinate system (earth reference frame) fixed at a location on the ground. OBxByBzB is a local coordinate system (body reference frame) mounted at the center of the Drone with the xB axis toward the 1st motor (Front motor), the yB axis towards the 4th motor (Right motor), and the zB axis pointing down the land.

Fig. 3

Torque model of Quadcopter

The Quadcopter orientation16) is represented by three Euler angles through the rotation matrix R:

R=cψcθcψsθsϕ-sψcθcψsθcϕ+sψsϕsψcθsψsθsϕ-cψcϕsψsθcϕ-cψsϕ-sθcθsϕcθcϕ(1) 

The force generated by the rotors:

Fi=b.ωi2(2) 

Where i=1,2,3,4. Then the lift force for the whole airframe is:

T=i=14Fi=i=14b.ωi2(3) 

The equation describing the Quadcopter acceleration:

r¨=x¨y¨z¨=g.001-RTm001(4) 

Where: g is the acceleration due to gravity, m is the mass. Equation of relationship between inertia matrix IR = (IX,IY,IZ) , rotational moment M and gyro torque:

MG:I.Ω¨=-Ω¨×I.Ω˙-MG+M(5) 

We have the gyroscope torque that depends on the rotational velocity factors with u1 = T and u2, u3, u4 respectively, which are units of rotational torque for roll, pitch, yaw, or rotational speed uT = (u1, u2, u3, u4) and the angular velocity ωi will be:

gu=ω1+ω2+ω3+ω4(6) 

Combining (4) with (5) and (6) we have dynamics equation:

x¨=-cosϕsinθcosψ+sinϕsinψ.u1m(7) 
y¨=-(cosϕsinθsinψ+sinϕsinψ).u1m(8) 
z¨=g-cosΦcosθ.u1m(9) 
ϕ¨=θ˙ψ˙Iy-IzIx-IRIxθ˙gu+LIxu2(10) 
θ¨=ϕ˙ψ˙Iz-IxIy-IRIyϕ˙gu+LIyu3(11) 
ψ¨=ϕ˙θ˙Ix-IyIz+LIzu4(12) 

2.3 Aerodynamic calculation model

Aerodynamic calculations describe the effects of propeller rotation in the air. With parameters: TMT(N) is the thrust of the propeller, upward, S(m2) is the area of the fan, ρs(kg / m3) is the density of the air.

We have the equation of thrust:

TMT=2ρsvI2N(13) 

Due to thrust TMT=Wp=mg4 (weight carried by 1 propeller):

VI=Wp/2ρsS2m/s(14) 

2.4 Architecture of Anfis

The ANFIS architecture is an adaptive network using supervised learning on a learning algorithm, which has a similar function to the Takagi-Sugeno fuzzy inference system model. Fig. 4 shows the fuzzy reasoning mechanism for the Takagi-Sugeno model and the ANFIS architecture. For simplicity, assume that there are two inputs x and y, and an output f. Two rules were used in the "If-Then" method for the Takagi-Sugeno model, as follows:

  • Rule 1 = If x is A1 and y is B1 Then F1 = p1x+q1X+r1
  • Rule 2 = If x is A2 and y is B2 Then F2 = p2x+q2X+r2
Fig. 4

Architecture of ANFIS (Suparta and Alhasa 2013)

where A1, A2 and B1, B2 are member functions of each input x and y (part of the plane), while p1, q1, r1 and p2, q2, r2 are linear parameters in part - Then (partly a consequence) of the Takagi-Sueno Fuzzy Inference model.

Referring to Fig. 4, the ANFIS architecture has five layers. The first and fourth layers contain an adaptive node, while the other layers contain a stationary node. A brief description of each class is as follows:

Layer 1: Each node in this class adapts a function parameter. The output from each node is a membership value level given by the input of the member functions. For example, the membership function could be a Gaussian membership function, a bell general membership function, or a type of membership function that is the degree of membership functions for fuzzy sets Ai and Bi, respectively, and {ai, bi, ci} are the parameters of a member function that can change the shape of the member function. Parameters in this class are often called premise parameters

μAix=exp-x-ci2ai2(15) 
μAix=11+x-ciai2b(16) 
O1,i=μAix,      i=1,2(17) 
O1,i=μBi-2y,      i=3,4(18) 

Layer 2: Each node in this layer is formatted or incompatible, and the circular node is labeled as P. The output node is the result of multiplying the signal that enters the node and is passed to the next node. Each node in this class represents the circle power for each rule. In the second layer, the T-norm operator with common performance, such as AND, is applied to get the output

O2i=wi=μAixμBiy,     i=1,2(19) 

Where wi is the output representing the circular power of each rule.

Layer 3: Each node in this layer is formatted or incompatible, and the circle node is labeled as N. Each node is a calculation of the ratio between the strength of the i-th laws to the power of the circle of all the rules. This result is called the standard ring strength.

O3i=w¯i=wiiwi(20) 

Layer 4: Each node in this layer is an output-adapted node, with a node function defined as

O4i=w¯ifi=w¯ipix+qiy+ri(21) 

Where wi is the normalized ring power from the previous layer (third layer) and is a parameter in the node. The parameters in this class are called result parameters.

Layer 5: The only node in this layer that is a fixed or nonadaptive node whose total output is the sum of all signals coming from the previous node. In this layer, a circle button is labeled as

O5i=iw¯ifi=iwifiiwi(22) 

The BP algorithm calculates the weights from the final output then from the end to the beginning, has the result, then compares and updates the weights. At first, the rules have the same role, after learning the weights will be different and then the rules will have different functions. The learning process is a weight adjustment process.

2.5 Disturbance

The atmosphere is the layer of gas that surrounds the earth. The density ρH of the atmosphere decreases very rapidly with altitude and when H > 40 Km, the influence of air can be ignored. The temperature of the TH atmosphere decreases by about 6.5 degrees with an altitude increase of 1000m. According to the international standard atmosphere, up to H = 11,000 m, TH = 216.60 K and PH pressure is 4 times less than P at ground level. According to the meteorological documents, the gradients of pH, ρH and TH in the horizontal plane (Oxbzb) are usually negligible compared to the gradient in height Oyb. So why in "normal life" do people often say there are "potholes" in the air. Its caused by turbulence in the atmosphere. Therefore, when considering the motion of the UAV in the atmosphere, it is necessary to consider this disturbance. Atmospheric turbulence is essentially the movement of air masses, wind. In the general case, the wind speed vector W is a very complex function of space and time:

  • W = W (x0, y0, z0, t)

The wind speed vector in the general case can have an arbitrary direction in space, so it is possible to analyze the components Wx0, Wy0, Wz0 (according to the ground coordinate system Ox0y0z0). The components themselves are also spatially and temporally dependent.

  • Wx0 = Wx0 (x0, y0, z0, t)
  • Wy0 = Wy0 (x0, y0, z0, t)
  • Wz0 = Wz0 (x0, y0, z0, t)

The wind angle ψw is the angle between the Ox0 axis and the projection of the crosswind velocity vector (-W) down the Ox0y0 plane. The angle of inclination of the wind θw is the angle between the vector W and the horizontal plane Ox0y0.


3. Results and discussion

The experiment was carried out to verify and simulate by Matlab/Simulink18-20) with input signals. To verify the effectiveness of the controller, the noise of the environment affecting the Drone will be changed. Below is a table of input signals and simulation results:

Simulating Quadcopter based on the formula of dynamics and disturbance in part 2 and the parameter listed in Table 1, its get simulation results are as follows:

The parameters of the drone.

Fig. 5 is the simulation result when operating in the condition of no interference, we see that the feedback thrust of the two controllers is almost the same, not too different. For stability of x-axis, y-axis, and Yaw height, the Neural-Fuzzy controller is more efficient. With the Neural-Fuzzy controller, the x-axis stabilization time is 30 seconds, the y-axis stabilization time is 30 seconds and the Yaw altitude stabilization time is 27 seconds, which is better than the PID controller: 32 seconds, 33 seconds, and 29 seconds, respectively. In the absence of environmental influences, the Neural-Fuzzy controller still performs better, but without too much of a difference in efficiency. The following are the simulation results under the influence of the environment.

Fig. 5

Simulate 2 controllers when there is no wind

Fig. 6 shows that the Neural-Fuzzy controller is still very stable. And it can be seen that both the X, Y, and Yaw coordinates are close to the given stability line, while the PID controller has a much larger noise and error than the PID controller when there is a noisy signal.

Fig. 6

Simulate 2 controllers when the wind action

From the above simulation results, we can see that the disturbances caused by the environment were quickly overcome thanks to the self-learning feature of the neural network and the reasoning ability of the logic controller for the drone to operate effectively action. However, the learning time of the controller achieving high efficiency requires a lot of learning time. the learning time of the controller achieves high efficiency and requires a lot of learning time. The stability of the ANFIS controller is reliable, its noise avoidance stability is reliable, and it is one of the most effective intelligent controllers when it comes to practical application. This article is the basis for expanding future research on the operating model in the real environment.


4. Conclusions

1) Neural-Fuzzy controller has perfected the control of Drones contributing to their useful versatility.

2) Neural-Fuzzy controller is more efficient, the response speed is more faster, and has better noise rejection.

3) No need to adjust the PID coefficient when changing the size weight of the drone thanks to the proposed controller learning.

4) Along with the development of technology, the proposed controller and its learning will develop more and more to improve efficiency in the field of automation control.

Acknowledgments

The work was supported by the research grant of the Gyeongsang National University in 2022.

Author contributions

D. A. Pham; Formal analysis, Software, resources, data curation, writing—original draft preparation, data collected and analyzed, visualization. S. H. Hang; supervision, project administration, writing—review and editing.

References

  • G. Chamayou, 2015, "Drone Theory", Penguin UK.
  • S. Y Park, J. B. Her, J. H. Kim and D. J. Lee, 2016, "Design, modeling and control of omni-directional aerial robot", 2016 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 1570-1575. [https://doi.org/10.1109/IROS.2016.7759254]
  • J. Niu, D. Wang, P. Han, J. Fang, X. Ren, Y. Qin and Z. Xu, 2021, "Image Enhancement of Low Light UAV via Global Illumination Self-aware feature Estimation", 2021 3rd International Conference on Natural Language Processing (ICNLP), pp. 225-231. [https://doi.org/10.1109/icnlp52887.2021.00044]
  • D. Vrontisa, M. Christofi, V. Pereira, S. Tarba, A. Makrides and E. Trichina, 2021, "Artificial intelligence, robotics, advanced technologies, and human resource management: a systematic review", The International Journal of Human Resource Management, Vol. 33, No. 3, pp. 1237-1266. [https://doi.org/10.1080/09585192.2020.1871398]
  • M. K. Bennett, N. Younes and K. Joyce, 2020, "Automating Drone Image Processing to Map Coral Reef Substrates Using Google Earth Engine", Drones 2020, Vol. 4, pp. 1-13. [https://doi.org/10.3390/drones4030050]
  • P. Cheng, C. Quek and M. L. Mah, 2007, "Predicting the impact of anticipatory action on U.S. Stock Market - An event study using ANFIS (A Neural Fuzzy Model)", Computational Intelligence, Vol. 23, No. 2, pp. 117-141. [https://doi.org/10.1111/j.1467-8640.2007.00304.x]
  • R. Wang, A. An, Y. Wen and H. Song, 2021, "Study on the Influence of Parallel Fuzzy PID Control on the Regulating System of a Bulb Tubular Turbine Generator Unit", Journal of Electrical Engineering & Technology, Vol. 16, pp. 1403-1414. [https://doi.org/10.1007/s42835-021-00698-5]
  • S. Khan, C. Liu and J. A. Ansari, 2020, "Centralized Fuzzy Logic Based Optimization of PI Controllers for VSC Control in MTDC Network", Journal of Electrical Engineering & Technology, Vol. 15, No. 6. pp. 2577-2585. [https://doi.org/10.1007/s42835-020-00556-w]
  • S. Abdelhay and A. Zakriti, 2019, "Modeling of a Quadcopter Trajectory Tracking System Using PID Controller", The 12th International Conference Interdisciplinarity in Engineering, Vol. 32, pp. 564-571. [https://doi.org/10.1016/j.promfg.2019.02.253]
  • L. Teppo, 2011, "Modelling and Control of Quadcopter", Independent research project in applied mathematics, Espoo 22.
  • C. T. Lin and C. S. G. Lee, 1996, "Neural fuzzy systems: A neural fuzzy synergism to Intelligent systems", IEEE Transactions on Neural Networks, Vol. 7, No. 5, p. 813. [https://doi.org/10.1109/TNN.1996.536328]
  • L. A. Zadeh and R. A. Aliev, 2018, "Chapter 16: Adaptive Neuro-Fuzzy Inference Systems (ANFISs)", Fuzzy Logic Theory and Applications, World Scientific Book, pp. 453-493. [https://doi.org/10.1142/9789813238183_0016]
  • O. S. Byun, S. H. Joe and S. R. Moon, 2002, "A Study on Fuzzy Wavelet Neural Network System Based on ANFIS Applying Bell Type Fuzzy Membership Function", Journal of the Institute of Electronics Engineers of Korea TE, Vol. 39, Issue 4, pp. 363-369.
  • S. K. Jeong, 2018, "Design of Membership Ranges for Robust Control of Variable Speed Drive Refrigeration Cycle Based on Fuzzy Logicv", Journal of the Korean Society for Power System Engineering, Vol. 22, No. 1, pp. 18-24. [https://doi.org/10.9726/kspse.2018.22.1.018]
  • K. H. Kim, B. G. Kim and Y. B. Kim, 2018, "A Study on the Optimal Tracking Control System Design for Automatic Ship Berthing", Journal of the Korean Society for Power System Engineering, Vol. 22, No. 4, pp. 72-80. [https://doi.org/10.9726/kspse.2018.22.4.072]
  • D. K. Tiep and Y. J. Ryoo, 2017, "An Autonomous Control of Fuzzy-PD Controller for Quadcopter", International Journal of Fuzzy Logic and Intelligent Systems, Vol. 17, No. 2, pp.107-113. [https://doi.org/10.5391/IJFIS.2017.17.2.107]
  • P. Pounds, R. Mahony and P. Corke, "Modelling and Control of a Quad - Rotor Robot", 7/2010, Australian National University, Canberra, Australia CSIROICT Centre. [https://doi.org/10.1016/j.conengprac.2010.02.008]
  • The MathWorks, Inc (2016), "Fuzzy Logic ToolboxTM User's Guide", Version 2.2.24 (Release 2016b).
  • H. Demuth and M. Beale và Ma. Hagan, 2016, "Neural Network ToolboxTM User’s Guide", Version 9.1 (Release 2016b), The Math Works.
  • J. F. Bai, J. H. Kim and S. Kim, "Development of Simulator for Weight-Variable Type Drone Base on Kinetics", 2020, IEMEK Journal of Embedded Systems and Applications, Vol. 15, pp. 149-157. [https://doi.org/10.14372/IEMEK.2020.15.3.149]

Fig. 1

Fig. 1
Quadcopter Basic Movement

Fig. 2

Fig. 2
Torque model of Quadcopter

Fig. 3

Fig. 3
Torque model of Quadcopter

Fig. 4

Fig. 4
Architecture of ANFIS (Suparta and Alhasa 2013)

Fig. 5

Fig. 5
Simulate 2 controllers when there is no wind

Fig. 6

Fig. 6
Simulate 2 controllers when the wind action

Table 1

The parameters of the drone.

Parameter Value Unit
Mass 0.2 kg
Gravity acceleration 9.8 m2/s
Moment of inertia along the x-axis 0.1 kg·m2
Moment of inertia along the y-axis 0.1 kg·m2
Moment of inertia along the z-axis 0.08 kg·m2
Rotational velocity u1 ≤30 N
Rotational torque for roll u2 ≤1.2 Nm
Rotational torque for pitch u3 ≤1.2 Nm
rotational torque for yaw u4 ≤1.2 Nm
Distance from the center of the Quadrotor to the center of motors (l) 0.25 m
Ratio coefficient between motor torque and motor force (k) 0.001 Nm/N
Angles ≤60˚ Degree