| Quad-rotor UAVs have been widely used because of their small size,flexible mobility,strong load capacity and low cost.Quad-rotor UAV is an underactuated and strongly coupled system,and its system parameters are easily affected by external environmental factors in the process of operation,so it is difficult to build an accurate mathematical model of UAV.It is easy to be interfered by the external environment when performing the task,which requires high accuracy of attitude calculation and flight controller.This paper focuses on attitude calculation and flight controller,and its main contents are as follows:Aiming at the difficulty in accurately building the simulation model,Newton-Euler formula is adopted to establish the dynamics model of the quadrotor UAV through conditional simplification and constraint hypothesis,which provides the foundation for the subsequent flight control algorithm research.Aiming at the shortcomings of complex dynamic model deducing and unable to fully express the characteristics of the quadrotor UAV,the physical model of the quadrotor UAV is built by using Sim Mechanics toolkit and Solid Works software.The model does not need to assume and simplify,which reduces the difficulty of modeling and increases the reliability of simulation results.Aiming at the large error of MEMS sensors and the fact that a single sensor cannot accurately calculate the attitude information of the quadrotor UAV,in order to improve the attitude accuracy,the Mahony complementary filtering algorithm was designed and the simulation analysis was carried out.From the image,it was concluded that the solution angle could basically track the reference angle.In order to further improve the accuracy of attitude solution,the extended Kalman filter algorithm based on quaternion is designed and the simulation analysis is carried out.It is concluded from the image that the tracking performance of the solution angle is better,and the error between the solution angle and the reference angle is almost zero,and the accuracy of the solution is improved.Aiming at the problem of under-actuation and strong coupling of quadrotor UAV,the serial controller is designed,the outer loop is position control,and the inner loop is attitude control.Taking the physical model as the simulation object,a classical PID controller is designed,and the simulation and image analysis are carried out in Simulink.The fuzzy PID controller is designed to solve the shortage of simulation effect,and the incomplete differential and anti-saturation integral modules are added to the controller.The simulation curve shows that the fuzzy PID controller can improve the response speed of the system,reduce the overshot,and meet the performance requirements without external interference.In order to increase the stability of the system when there is external disturbance,the neural network training module is introduced,and the fuzzy neural network PID controller is designed.The simulation experiment and analysis are carried out,and the simulation results show that the improved controller has stronger anti-interference ability.It lays a solid foundation for the outdoor work of the quadrotor UAV.Last hardware and software system of quadrotor UAV is designed,the hardware part by adopting the idea of points module circuit structures,software part mainly three important programs: system initialization program,the attitude algorithm and program control algorithm,the design of the quadrotor UAV conducts flight test,the test results show that the quadrotor UAV can achieve stable job. |