| Quadrotor UAV is widely used in military and civil fields because of its small size,simple structure and strong maneuverability.Quadrotor UAV for complex tasks is the premise of the stability of position and attitude control,but in the process of performing tasks will be affected by many factors,especially the uncertainty of gust disturbance and load change,so this paper in view of the quadrotor two aspects of external disturbance and variable load,sliding mode control method is used to design the position and attitude controller,the main research content is as follows:Firstly,this thesis chooses the X-type quadrotor as the research object.This structure has better universality.Based on the analysis of its structure and flight principle,the inertial coordinate system and the body coordinate system are established,the transformation relationship between them is analyzed,and the dynamics model of the quadrotor UAV is established by using Newton Euler formula.At the same time,the general steps of sliding mode controller design of quadrotor are analyzed.A position and attitude sliding mode controller is designed to solve the trajectory tracking problem of quadrotor under external disturbance.In order to resist external disturbance,an integral terminal sliding mode control method is designed for the position subsystem to eliminate the steady-state error by integral.The attitude subsystem uses the nonsingular terminal sliding mode control method and the sliding mode observer to compensate the control quantity.Through numerical simulation experiments,the designed controllers can effectively reduce the influence of external disturbance on the quadrotor flight.Aiming at the position and attitude control problem of the quadrotor with variable load,an adaptive sliding mode controller is designed for the height subsystem.The integral order sliding mode surface is extended to fractional order sliding mode surface,which is applied to position and attitude control.The stability of the system is proved by Lyapunov theory.Numerical simulation results show that the adaptive fractional order sliding mode controller has obvious advantages in suppressing overshoot.Finally,the semi physical simulation platform of the quadrotor is built based on MATLAB/PX4.Combined with the designed sliding mode controller,the position and attitude control of the quadrotor in semi physical environment is realized.The experimental results show that the designed controller can effectively control the quadrotor to complete the flight mission. |