| Multi rotor UAVs are widely used in military,civil,scientific research and education because of their simple structure,flexible control,and low manufacturing cost.The rapid development of UAVs in recent years has benefited from the popularity of aerial photography UAVs and industrial UAVs.Due to the popularity of aerial UAVs and industrial UAVs,rotor UAV is in a period of rapid development,which has a significant impact on people’s production and life,reducing labor intensity,especially in high-risk operations.This paper designs UAV from the aspect of software and hardware,which enables it to complete a series of flight objectives.First,the design goal of this time is a small four rotor UAV Based on indoor flight.Based on this goal,the UAV is designed and the flight prototype is made.The overall design includes the following aspects: The frame design includes frame layout,frame material selection,landing gear design,etc.,which is the basis for the stable flight of the UAV.The perception module mainly uses inertial sensors,height sensors,optical flow sensors and vision sensors,which can be directly obtained or calculated to obtain the UAV’s three-dimensional angle,three-dimensional position,three-dimensional velocity,three-dimensional angular velocity and three-dimensional acceleration.According to the design requirements,the control system selected TMS320F28379 D microcontroller,which realizes real-time control of the UAV by implanting a real-time operating system.The power system is mainly composed of ESC,motor,propeller and battery.According to the control signal given by the flight controller,the four speeds of the motor are respectively controlled to obtain the pulling force and torque in different directions,thereby change the attitude and position of the UAV to achieve the desired flight purpose.Secondly,through the analysis of the quadrotor UAV in the front,rear,left,right,up and down six directions of the movement principle.The Newton-Euler formula is used to analyze the movement of the UAV,and the dynamic model and kinematics model of the UAV are established.These models link the pulling force and torque with the position and angle information of the UAV.At the same time,a power system model is established,which can roughly estimate the pulling force caused by the rotation of the motor.Finally,based on the overall design of the UAV and the understanding of its flight principles,a flight control system based on the TMS320F28379 D single-chip microcomputer was designed.The attitude of the UAV is calculated by Mahony’s complementary filtering algorithm,and the attitude control of the UAV is achieved through the cascade PID controller,so as to achieve the flight goal.After the design is completed,build a simulation model of the quadrotor UAV in MATLAB/Simulink to verify its attitude control algorithm,and apply the algorithm to the UAV flight control system.The feasibility of this design is proved through the experiment of posture cascade PID control in the debugging frame,and the PID parameters are tuned at the same time.After that,through the UAV indoor flight experiment,the stability and feasibility of the quadrotor UAV design scheme,related algorithms and hardware were verified,and the expected design goal was achieved. |