Fuzzy PD controller of UAV attitude under wind interference

. In this paper, for the UAV attitude angle stabilization system under constant flat wind disturbance, the fuzzy adaptive PID control theory is used to establish the equation of wind disturbance attitude angle stability system. After mastering the control rate of the system, the fuzzy controller is designed by using matlab, and the attitude angle dynamic simulation analysis was carried out. The results show that under the interference of flat wind, the longitudinal attitude of the UAV is changed by interference, and the fuzzy adaptive PD is used to control the attitude angle of the aircraft, which has faster tracking performance, smaller adjustment time than the traditional PD control. Thereby achieving better maneuverability and less steady-state error. Therefore, the fuzzy adaptive PD can better control the attitude stability of the UAV, improve the wind resistance of the UAV, and ensure the flight is safe and reliable.


Introduction
UAVs are subject to various disturbances during flight, and airflow disturbances are the main factors, such as constant wind, rising and falling airflow, eddy currents, etc. The updraft due to hot air can reach 10 to 12 m/s in the summer afternoon. In the updraft, the lift of the UAV will increase; in the downdraft formed by the cold air, the lift will decrease. Large eddy currents can cause the UAV to be unstable and cause large bumps. For convenience, the constant wind is decomposed into a vertical wind perpendicular to ground speed and a flat wind parallel to ground speed. Studies have shown that a regular wind will cause changes in the flight path, while turbulence will cause angular motion of the UAV, and any wind disturbance will change the longitudinal attitude of the UAV. Regular constant winds are often used as the main form of wind disturbance [1]. In order to study the influence of wind disturbance on the attitude control of the UAV, this paper only considers the influence of the flat wind on the UAV. Firstly, the motion equation of the UAV is established, and the change and dynamics of the attitude angle of the UAV under the action of the flat wind are analyzed.
Firstly, the motion equation of the UAV is established, and the variation and dynamic performance of the UAV attitude angle under the action of the flat wind are analyzed. Then the fuzzy PD control is used to control the stability of the angular displacement and improve the wind resistance of the UAV. The simulation proves that the fuzzy PD controller has better control effect when it is required to accurately realize the flight trajectory, such as automatic landing and directional flight.

UAV motion equation
In order to analyze the influence of flat wind and vertical wind on the flight control system, it is necessary to establish the transfer function of the UAV based on attitude or speed as the output, so the motion equation of the UAV must be established first.
Assume that the UAV is not disturbed by wind W in the initial state, and flies at the ground speed d V , the angle of attack v α , the track inclination angle θ , and the pitch angle ϑ . Assume that the wind deflects the direction of the UAV relative to the air from w α , and w α is the increment of attack angle of the UAV under wind disturbance.
If the UAV's reference motion is a uniform linear motion, linearize the Eq. 1, take the full differential, and assume 0 =0 In the Eq. 3, ∆ is an incremental symbol, and p is a derivative operator, 1v n , 1 n α , 1 n ϑ , 4 n ϑ are all pneumatic coefficients, these parameters are no longer given.

Transfer equation under flat wind disturbance
In order to use the structure diagram to represent the influence of x W on the system, it is necessary to find the change of the attitude angle and the inclination angle of the track under the flat wind. Assume that , , , , , A B C F H K are undetermined coefficients [3].

The movement of the UAV under flat wind
Observe the transfer function , the relationship between steady states is: It can be seen that under the constant flat wind interference, the increment of the ground speed after steady state is x W . The physical process is: the long-cycle motion stable UAV has airspeed stability. Under the effect of downwind, the airspeed and the resistance decreases, and the ground speed generated by the engine thrust increases, until the airspeed k V returns to the original value, and the upwind process is similar. If there is no stability of long-period motion, the interference of the flat wind will cause the UAV to diverge. It is necessary to use an angular displacement fuzzy PID control system to stabilize the attitude angle, or to use speed control to stabilize the speed. It can be seen from the Eq. 5, Eq. 6, Eq. 8 that the molecules have differential factors s, so under the action of the flat wind, the angle of attack, the track tilt angle and the attitude angle of the UAV will be go back to the initial baseline value. This is because the airspeed is constant, so the aerodynamic force is unchanged [1].

fuzzy PD controller
In this paper, the attitude change of the UAV is studied. The control method is fuzzy PD control, that is, only the proportional coefficient and the differential coefficient are blurred. Therefore, the system is dual input and dual output, and the fuzzy controller is designed based on the adaptive PID control principle [4]. According to the Eq. 4 to Eq. 8 of the UAV under the action of the flat wind, the system structure diagram of the fuzzy control angular displacement can be obtained as follows: x W   The dual input and dual output are used, therefore the error e and the error change rate ec are used as inputs, and the proportional and differential parameters , p d K K are used as outputs [5]. Since the PD control of the system is added to the feedback loop, and the parameter trimming is considered to be around the optimal parameters, the known parameters can be obtained: the proportional coefficient and the differential coefficient of the conventional PD control are =1.  0.4). The membership function of the input quantity is Gaussian, the output membership function is triangular, and the de-fuzzing algorithm uses the centroid method. The fuzzy language sets of the four variables are defined as {NB, NM, NS, ZO, PS, PM, PB}, those are negative large, negative medium, negative small, zero, positive small, medium, and large [6]. As shown in Fig. 2 to Fig. 5.   According to the actual system, seven fuzzy language sets (negative large, negative medium, negative small, zero, positive small, medium, and large) are used, and the number of input quantities is 2, so the number of fuzzy rules is 2 7 =49 [7], fuzzy The rules can be determined by experience [8], as shown in Table 1 and Table 2.  The understanding of fuzzy rules should be: For example, when e is NB (negative large) and ec is NB (negative large), p K is PB (positive large) and d K is PS (positive small). The size of the language descriptions such as negative and positive are mapped to the membership function, that is, the NB represents a certain value in the corresponding membership function. This process is called fuzzification.

Simulation analysis
The structure of the fuzzy controller is [9]: Traditional controls do not have a fuzzy controller. If there is no attitude angle stabilization system, after the disturbance, the UAV will produce a steady-state error of the attitude angle. If has the attitude angle stabilization system, the autopilot senses the error angle and stabilizes the UAV in the reference state. Divide , the simulation curve of the angular displacement steady-state system is as follows. The parameters of the UAV are as Table 3.
According to the design of the fuzzy controller and the analysis of the transfer function of the UAV, the simulink map as shown can be constructed in the Fig. 7 [10].     According to the simulation diagram Fig. 8 to Fig. 11 and matlab programming analysis [11], the dynamic performance parameters are as Table 4. According to the simulation curve, the greater the wind disturbance has greater influence on the system performance, but the UAV attitude system with fuzzy adaptive control has a lower pitch angle steady state error than the traditional PD control under flat wind interference. It can be seen from Table 4 that in the range of 3 m/s to 7 m/s of flat wind, the steady-state error of the pitch angle after fuzzy control is only one tenth to two cents of the traditional control. Since there is no integral link, the system has a slight oscillation [9], but the overshoot is generally smaller after the fuzzy control, and the adjustment time and rise time are smaller. It can be concluded from Table 4 that the flat wind is larger, the adjustment time and rise time of the fuzzy control system are much smaller than those of the traditional control system. It can also be seen that the rudder angle change of the fuzzy PD control system is larger than that of the traditional PD control, and there is a trend ahead, indicating that after the fuzzy controller, the proportional and differential links are more powerful and faster to control the system. The addition of fuzzy control does improve the dynamic performance of the system.

Summary
In this paper, the longitudinal motion equation and transfer function of the UAV are established under constant flat wind disturbance. The fuzzy adaptive PD controller design was carried out for the longitudinal channel of the UAV under the flat wind interference, and the control system simulation was carried out by selecting the parameters. The results show that the longitudinal attitude of the UAV changes under the influence of flat wind. The flat wind is bigger, the attitude of the UAV is more unstable, the worse the dynamic performance of the attitude angle makes the attitude angle difficult to control. However, the system using fuzzy adaptive PD control has faster tracking ability, better maneuverability and smaller overshoot than the traditional PD control [12], which improves the wind resistance of the UAV.
This research was financially supported by NSFC (61473306).