| Quad-rotor UAV is a kind of unmanned aerial vehicle with small size,high mobility,excellent stability and strong expansion performance.It has a wide range of applications.With the progress of science and technology,the design of UAV hardware system and the optimization of software control algorithm have been further developed,and the UAV is gradually developing towards the direction of multi-function and specialization.However,the attitude calculation accuracy of the quad-rotor UAV is affected by the inertial navigation component accuracy.The angular velocity measured by gyroscope has drift error,and the integral operation of diagonal velocity will further produce cumulative error.Due to the high frequency oscillation of the body,the measured value of the accelerometer is mixed with high frequency noise,and due to the variable speed movement of the body,the measured value of the accelerometer is mixed with non-gravity acceleration.The magnetometer is susceptible to interference from the surrounding magnetic field.In addition,in the process of perform a flight mission,quad-rotor UAV is disturbed by external environment and internal uncertainties.But the traditional flight control algorithm PID is a control mode of "error elimination based on error".It can only react after disturbance has an impact on the quad-rotor UAV.So it has hysteresis effect and limited resistance to disturbance.In this paper,the quad-rotor UAV is selected as the research object.Aiming at the problems of limited accuracy of UAV attitude calculation and interference in flight environment,the main research contents are as follows:(1)Firstly,the body coordinate system and navigation coordinate system of the quad-rotor UAV are established.This paper selects the quaternion to describe and update the attitude,avoiding the singular problem of Euler angle attitude calculation.Aiming at the system structure characteristics of the quad-rotor UAV,dynamics and kinematics models are established based on the Newton-Euler method.Aiming at the disturbance of the external wind and air flow during the flight,a simulation model of attitude calculation and control system is established.(2)Aiming at the low precision of the IMU and the mixed high-frequency and low-frequency noise of the measurement data,a fusion algorithm of Mahony and EKF is proposed.Aiming at the attitude calculation deviation caused by non-gravitational acceleration,a non-gravity acceleration adaptive algorithm is designed,and the measure the noise covariance matrix is adjusted by adaptive positive correlation,that is,according to the magnitude of the non-gravity acceleration,the credibility of the accelerometer measurement value is dynamically adjusted to reduce the interference of non-gravitational acceleration of quad-rotor UAV on attitude calculation.(3)The quad-rotor UAV has the structural characteristics of under-driving,strong coupling,and nonlinear system.In order to solve the contradiction between fast response and overshoot,and improve the anti-disturbance ability to the external environment,an improved ADRC is designed.The outer loop adopts PD algorithm to design the position control loop,and the inner loop adopts the improved ADRC to design the attitude control loop.Considering that the total disturbance observed by the extended state observer has high frequency jitter,a recursive average low-pass filter is applied to the interference compensation channel,improving the system command signal tracking ability and anti-interference ability. |