1. Introduction
On the basis of the quad-rotor UAV and the fuzzy PID control system simulation, the setting of the wind is analyzed in the the project of the environment noise to take advantage of a PID control. Through the model, Matlab and Simulate are used to simulate the simulation, and it is concluded that compared with the traditional PID, it has stronger autonomous adjustment ability. At the same time, adding intelligent algorithm to PID control will have the independent optimization and adjustment ability of PID model parameters, and the application of certain algorithms will have a certain good effect on the autonomous adjustment ability of four-rotor UAV. Based on the previous research on the stability control of UAV, this paper summarizes and compares the control mechanism of traditional PID and fuzzy PID, and briefly describes the motion mechanism and wind disturbance resistance mechanism of quad-rotor UAV, as well as the influence of intelligent algorithm on PID.
2. Establishing simulation model
2.1. Mathematical modeling of quad-rotor UAV
Using the “X” quad-rotor as the research object, and the rotation of the UAV is divided into pitch, flip and yaw. Its own coordinate system ObXbYbZb is selected for analysis, and the linear motion of the UAV is selected for analysis in the geographical coordinate system OeXeYeZe. Changing an object coordinate system to a geographical coordinate system produces the following relationships:
(1)
Where Re b is the coordinate transformation matrix [1]:
(2)
Where s represents the sin function, c represents the cos function, θ represents the pitch Angle of the UAV, ψ represents the yaw Angle of the UAV, and φ represents the rolling Angle of the UAV. For the sake of guaranteeing the effectiveness of the mathematical model of the UAV in the simulation experiment, the following assumptions are made: The character of the quad-rotor possess equably rigidity, its barycenter is located in geometrical center, the elevating force of the object is positive along the body axis Zb, and the gravity of the body is negative along the geographical coordinate system Ze.
2.2. Establishment of motion equation of quad-rotor UAV
The Newton-Euler formula is used to conduct a mechanical analysis of the four-rotor UAV in the geographical coordinate system. The main force of the four-rotor UAV in the hovering attitude is three forces, In other words, the lift T generated by the rotation of the quad-rotor, the gravity ma of the body itself, and the body’s velocity in the rotation state are zero. because the air resistance is proportional to the speed, which is obtained according to the equilibrium condition:
(3)
Where m is the mass of the quad-rotor UAV.
2.3. Determination of Angle information of quad-rotor UAV
The phoronomic equation of the model has nothing to do with the mass and force of the body itself, and the attitude Angle of the drone changes with torque. p, q, r are rolling speed, pitch speed, yaw speed. From this, the Angle information of the four-rotor UAV can be obtained as:
(4)
2.4. The establishment of angular motion equation
In the process of maintaining hover, the quad-rotor UAV mainly has two functions: the lifting moment provided by the rotor and the air moment. In the body coordinate system, the differential equation of the angular motion of the UAV can be obtained according to Euler equation:
(5)
When the UAV is hovering, is presenting the deflection Angle of the UAV along the three axes, I is named as the moment of inertia matrix of the UAV, τ is the resultant moment received by the UAV, and ωb is the presentation of the rotational angular velocity matrix of the UAV. Decompose the above formula into the angular motion equation on the three axes as [2]:
(6)
Where IxIyIz presents the moment of inertia along the three axes of the body coordinate system.
2.5. Design of fuzzy PID controller
The composition of the PID controller as show in Figure 1, compared with traditional PID, a fuzzy logic controller is added as the main component. The controller takes system error e and error rate ė as input, and PID controller parameter KpKiKd as output [3]. The precise quantities of input and output are transformed into fuzzy sets of corresponding languages, the language values of control variables corresponding to input and output variables are set as NB, NM, NS, Z, PS, PM, PB, and the discourse domain of system error e, error rate ė, and control quantity u is set as {-3, -2, -1, 0, 1, 2, 3} [4]. Then the fuzzy language is selected as the corresponding membership function.
Figure 1. Design of fuzzy PID controller.
2.6. Wind disturbance model analysis and modeling
The four-rotor UAV is often disturbed by external factors when performing flight tasks, and wind is one of the most disturbing factors that affect the attitude of the four-rotor UAV. In order to test whether the four-rotor UAV can ensure attitude stability during flight under wind disturbance, the wind variation characteristics are analyzed, and the corresponding mathematical model is established, which is introduced into the simulation system of the four-rotor UAV as environmental noise, and the accuracy and the anti-interference property of the controller are emreged through the output of the system.
According to the characteristics of continuity, gradualism, suddenness and randomness of wind, wind can be divided into Vb, Vg, Vr and Vn, there are called basic wind, gust wind, gradual wind and random wind [5].
The basic wind is not converted with time after its generation, that is, the constant value K.
Wind gusts are generated and enhanced at a certain point, and then attenuated to disappear at a certain point, so it can be seen that during this period of time, wind speed has cosine characteristics, namely:
(7)
Where, Vgmax, t1 and tg are gust peak, start time and gust period respectively.
Gradual wind does not suddenly occur and disappear, and the enhancement or attenuation changes with time, that is:
(8)
Where, Vrmax, tr1, tr2 and tr3 are the peak value of the gradient wind, the time when the gradient wind speed begins, the time when the gradient wind speed ends, and the duration of the gradient wind speed respectively. The generation and disappearance of wind is random, and it also has the characteristics of continuity in the process of change, namely:
(9)
Where, Vnmax is the top of the random wind, Ram(-1,1) is the random number evenly distributed between -1 and 1, wn is the average distance of wind speed fluctuation, and φn is the random quantity of random distribution between 0 and 1.
According to the above-mentioned analysis, the four different winds applying in the modern technological life are built in a mathematical simulation model. And the basic models of four kinds of wind are weighted and summed according to distinct rates of the weight. By analyzing the figure of the weight ratios, the speed of the four wind converting under various wind conditions can be simulated, and a integrated wind speed shift model can be built.
3. Review
PID control is the most popular research field in recent years. Better PID control will greatly improve the UAV control system. However, with the continuous improvement of PID control, effective methods such as fuzzy PID and PID control with intelligent algorithm are explored on the basis of traditional PID, so reasonable choices are made according to the conditions and expectations of researchers.
3.1. Comparison between traditional PID control and fuzzy PID control
Fuzzy PID control has small over-modulation and short algorithm time, and the initial vibration amplitude controlled by the PID is relatively short as a percentage of the control signal or interference signal. When dealing with external interference, fuzzy PID controller shows better dynamic performance and better anti-interference, and the control output distortion is small, and it has strong anti-interference and robustness. Compared with traditional PID, it has more stable control performance.
The anti-interference test shows that the pitch Angle and rolling Angle of the four-rotor UAV controlled by fuzzy PID can quickly stabilize, and the deviation Angle is < 0.65°, while the response speed is faster, the stabilization time is < 1s, while the response time of the traditional PID is > 5s, and the overshoot is < 1%.
3.2. Add the algorithm to the PID control system
So as to make the fuzzy PID possess a better adaptation to the conversion of environment, summarize the law, complete certain operation, reasoning, recognition and control tasks, and have a strong fault tolerance ability, an algorithm is added to the PID control system.
One of the algorithms is neural network modulation. The neural network has strong fault tolerance, so that the neural network can identify the object according to the main characteristics of the object, and has self-learning, self-organizing function and induction ability. BP neural network was built into the fuzzy PID control system, as shown in Figure 2.
Figure 2. Fuzzy PID control system based on BP neural network.
Let the BP neural network adopt a 3-layer BP structure, which contains 3 input nodes, i implicit nodes and 3 output nodes. The number of input variables depends on the complexity of the controlled system. The output nodes correspond to the three parameters KpKiKd of the PID controller respectively. The activation function of neurons in the hidden layer is Sigmoid function, and the activation function of neurons in the output layer is non-negative Sigmoid function [6].
Hidden layer neuron activation function:
(10)
Derivation:
(11)
Output layer neuron activation function:
(12)
Derivation:
(13)
The loss function of the performance index of evaluating neural network learning is:
(14)
Using the method of the gradient descent which is the negative gradient of the weight factor E search for the weight coefficient and adjust it, and add a learning algorithm to look for the inertia rapidly convergence to obtain the weight of the hidden layer and the output layer.
(15)
(16)
Where n is the learning rate and a is the inertia coefficient. The error of the algorithm tends to be stable after a certain time of automatic tuning, and the PID parameter changes with the change of error, and cycles until the condition is satisfied.
Comparing neural network PID with classical PID, neural network PID has smaller static error, which shows that neural network has better control performance and better control effect for nonlinear systems.
4. Conclusion
When studying the anti-interference of four-rotor UAV, it is necessary to strictly grasp the conditions of giving wind disturbance variables, and compare and test different PID control systems under the same conditions. The PID control has much better anti-interference and robustness than the traditional PID control, and the adjustment of intelligent algorithm will also have better control effect. Based on previous studies, the combination of efficient algorithm and PID control to make use of intelligent PID and effectively adjust the parameters of PID control system will improve the autonomous control ability of UAV in a certain way and obtain more extensive utilization. At the same time, this paper compares the mechanism of traditional PID and fuzzy PID, introduces the auxiliary role of intelligent algorithm and the motion mechanism and anti-wind disturbance mechanism of UAV, deeply summarizes the previous research, and explains the development direction of UAV in the future.
References
[1]. GUO J, JIN H, SHEN X G. (2021) Optimization Control of Quad-rotor UAVs Based on Neural Network PID Algorithm. Electronic Sci&Tech, 34: 51-55.
[2]. ZHANG J Z, ZHANG H, LIU H, GUO J W,2014, Fuzzy-PID control for Macro-Quadrotor UAV. In: Ordnance Industry Automation, Mianyang, Sichuan, China. pp. 2-3.
[3]. YU W Y, YANG K L,2019, Design of cascade fuzzy adaptive PID control system for four-rotor UAV. In: Machinery Design & Manufacture,1:227-231.
[4]. ZHANG X Y, YU F J, LIU C,2017, Design of human quad-rotor UAV bases on fuzzy PID control. In: Research and exploration in laboratory, 36: 56-59.
[5]. Xiaomuyoumuyou (2022) Wind speed simulation research based on simulink. https://blog.csdn.net/cao_yun_quan/article/details/123593016
[6]. Sunny.Code. (2022) PID intelligent control based on BP neural network. https://blog.csdn.net/weixin_45548236/article/details/1269199.
Cite this article
Qi,Z. (2024). On the use of PID control to improve the stability of the quad-rotor UAV. Applied and Computational Engineering,49,31-36.
Data availability
The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.
Disclaimer/Publisher's Note
The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
About volume
Volume title: Proceedings of the 4th International Conference on Signal Processing and Machine Learning
© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and
conditions of the Creative Commons Attribution (CC BY) license. Authors who
publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons
Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this
series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published
version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial
publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and
during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See
Open access policy for details).
References
[1]. GUO J, JIN H, SHEN X G. (2021) Optimization Control of Quad-rotor UAVs Based on Neural Network PID Algorithm. Electronic Sci&Tech, 34: 51-55.
[2]. ZHANG J Z, ZHANG H, LIU H, GUO J W,2014, Fuzzy-PID control for Macro-Quadrotor UAV. In: Ordnance Industry Automation, Mianyang, Sichuan, China. pp. 2-3.
[3]. YU W Y, YANG K L,2019, Design of cascade fuzzy adaptive PID control system for four-rotor UAV. In: Machinery Design & Manufacture,1:227-231.
[4]. ZHANG X Y, YU F J, LIU C,2017, Design of human quad-rotor UAV bases on fuzzy PID control. In: Research and exploration in laboratory, 36: 56-59.
[5]. Xiaomuyoumuyou (2022) Wind speed simulation research based on simulink. https://blog.csdn.net/cao_yun_quan/article/details/123593016
[6]. Sunny.Code. (2022) PID intelligent control based on BP neural network. https://blog.csdn.net/weixin_45548236/article/details/1269199.