Research of UAV Flight Control Algorithm Based on Improved Fuzzy Neuron

UAV flight control systems have the characteristics of non-linear, multi-variable, and strong coupling. Traditional PID control algorithms have many problems in complex flight environments, such as large adjustable parameters, poor robustness, and slow convergencein. Due to the defects of traditional PID control algorithm, this paper proposes an improved PID control algorithm based on fuzzy neurons. The modified fuzzy neuron is used to modify the traditional PID control algorithm. Through Matlab experimental simulation, it is proved that the algorithm has a significant improvement in response speed, robustness, accuracy and anti-interference compared with the traditional PID algorithm.


INTRODUCTION
UAVs can achieve attitude adjustments in flight, mainly through the flight control system to quickly complete self-adjustment of attitudes. Attitude control strategies can effectively improve the stability and robustness of the body's flight. At present, PID control algorithm is one of the commonly used algorithms in the field of UAV flight control. The PID algorithm can be used to achieve stable tracking of the ideal value during the drone control process. Because the body is flying in a complex and changeable environment, the traditional PID control algorithm cannot adjust the flight attitude in time according to environmental changes. By introducing improved fuzzy neuron, the traditional PID algorithm is optimized. Through fuzzy neuron control, the membership function in the fuzzy neuron PID algorithm is adjusted in real time according to the environmental changes to achieve the attitude adjustment requirements in different states or environments [1]. Simulation is established by Matlab simulation software and the platform verifies the control effect of the fuzzy neuron PID control algorithm.It is found that the method is more stable and faster than traditional PID control.

Fuzzy neuron system optimization principle
The PID parameter self-adjusting fuzzy controller is based on the conventional PID regulator. In the fuzzy processing, to transform the basic universe into a fuzzy universe, you need to adjust the input quantization factors Ke, Kec and output conversion scale factors of el and ec. Use fuzzy set theory to establish a fuzzy logic relationship between the parameters Kp, Ki, and Kd as the absolute value of the deviation and the absolute value of the deviation change. According to different e, ec, the parameters Kp, Ki, and Kd are adjusted online [2]. A fuzzy controller that accurately controls static errors in the system.The setting requirements are to summarize the effects of different e and ec on PID parameters.

Design steps of fuzzy neuron pid control rule learning
First, the fuzzy rules and membership functions are represented by a neural network, and the generated neural network is used to implement fuzzy inference.Then, the BP back propagation algorithm is used to train the neural network, thereby improving the accuracy of the system, modifying the parameters of the membership function, and obtaining accurate Fuzzy rules; finally, membership functions and fuzzy rules are extracted from the neural network to help explain the internal representation and operation of the neural network [3].
The specific design steps are as follows: Build a library of fuzzy rules and membership functions; represent fuzzy rules and membership functions with a neural network.Train the neural network to modify the parameters of the membership function to obtain accurate fuzzy rules; extract the modified membership function and fuzzy rules from the neural network, and save these rules and membership functions for future use. Set the initial state and parameter initial values, including randomly generating initial BP neural network weight coefficients, set initial input and output values to zero, set the learning rate and inertia coefficient, set the counter to k = 1, and set the count Ceiling, etc.
2.Calculate the hidden layer input of the bp neural network to determine the fuzzy control rules. The structure of a fuzzy control example using a three-layer bp neural network is shown in Figure 2. Figure 2. Structure of a BP neural network representing an example of fuzzy control fnn uses fuzzy inference rules of the form: IF X1 is Alp and X2 is A2q THEN V is Wpd, Xl, X2 are premise language variables, Alp and A2q are corresponding language values, V is a conclusion language variable, Wpd is a language value, and the relationship between the input and output of each layer is: Layer 1 input layer: It1=Xl Qt1= It1 (t=1,2) Layer 2 blurs the input: Iij (2)

Qij (2) = Aij (xi) = exp (-((xi-aij) / at) ^ 2)
Among them, i = 1,2 is the input variable label; j = l, 2, ..., N is the language value label. Layer 3 fuzzy inference engine, the connection weights between the neurons in the second and third layers are all l. The inference method using the product addition method has: The gelatinization layer uses the center of gravity method: In the formula, N is the number of language values contained in each premise language variable, and Wpq is the maximum degree of membership of the conclusion language value ‰.
3.Select the objective function,J = , e(t) = Yd(t)-y(t).The BP algorithm can be used to adjust the values of aij,bij and Wpq to realize offline memory and online self-correction of membership function and fuzzy control rules.
4.Parameter update. 5.Reestablishment of fuzzy rules. Combined with theoretical analysis, the relationship between the deviation e, the deviation change rate ec and the three PID parameters Kp, Ki, Kd can be concluded.

Simulation verification based on Matlab
In this paper, Matlab mathematical application software is used to establish a simulation model, and a four-rotor control simulation model is built in Matlab. The transfer function of each channel is calculated based on the four-rotor nonlinear dynamic model and linear dynamic model to form a four-rotor simulation model [4].
The stability and anti-interference ability of the roll, pitch, and yaw angles of the four rotors in the traditional pid control and cascade fuzzy neuron pid control methods were simulated, and the step signals were used to compare and analyze the data.

Figure3.Comparsion of data analysis before and after optimization
The input signals of the two control systems use step signals.The signal is set to trigger at time 0, the initial value is 0, and the step end value is 1.According to the comparison of the step signals of the two control strategies of roll angle and pitch angle, it can It is concluded that both control strategies can achieve a certain control effect, but the fuzzy neuron pid control system has the fastest response speed and makes the system reach the stable state speedy [5]. The comparison of the step signals of the two control strategies by yaw angle can be The analysis shows that the traditional pid control system has the best fast performance, the worst accuracy and stability, and the longest adjustment time. The fuzzy neuron pid control system has the best stability and accuracy performance, the overshoot is very small,  4 and the adjustment time It is 40% shorter than the traditional pid control strategy, so when step signals are used as input, the fuzzy neuron pid control system can obtain better control results.

Conclusion
In this paper, by analyzing the dynamic characteristics of the quadrotor aircraft, it is concluded that the characteristics of the quadrotor aircraft system require higher requirements for its control system. Therefore, a fuzzy neuron PID control model is proposed to solve the shortcomings of the traditional PID control algorithm. The simulation results of Matlab software using step signals, roll angle, and pitch angle are compared. The fuzzy element PID control system has the fastest response speed, and the system is first brought to a stable state. The comparison of the two control strategies shows that the fuzzy neuron PID control system has the best stability and accuracy performance. The above results verify that the fuzzy neuron PID control system can achieve better anti-interference performance and more stable control for the quadrotor aircraft [6].