| In recent years,multi-rotor aircraft has become a hot spot,and have been widely used in a variety of industries.In this paper,a four-rotor flight control system with obstacle avoidance,target tracking and cruise function is designed and implemented in view of the obstacle threat encountered by UAV in the process of indoor flight.At the same time,for the operator to provide a supplementary function,reducing the amount of operation.The realization of the indoor cruise and tracking system,need to match the hardware algorithm software,to complete the corresponding missionIn terms of hardware,the paper first builds a small four-rotor platform based on the actual situation of indoor flight environment,and chooses ANO’s open source flight control board as the system flight controller.The controller uses the STM32F407 chip as a processor,the board is equipped with a barometer,gyroscope and accelerometer used to measure the flight status of the aircraft.Then,according to the functional requirements of the designed system,an ultrasonic distance measuring sensor for measuring the flight height and surrounding obstacle information and a pyroelectric infrared sensor for detecting the heat source signal are installed on the four rotor experiment platform.After building a hardware platform,the paper designed the corresponding algorithm according to the function need to achieve,.Firstly,a PID algorithm for controlling the flying height of the aircraft and a fuzzy control algorithm for controlling the obstacle avoidance and tracking are designed.After that,a data fusion algorithm for an ultrasonic sensor and an accelerometer for measuring the flight speed of the aircraft is designed and a cruise algorithm that can be used to cruise the action according to the obstacle situation.On the software,the sensor driver is first written to collected the sensor data,and then the filter and the data fusion scheme are designed.After that,the flight mode selection program is written to complete the selection of different functions in the system design.Finally,the previously designed PID control algorithm,fuzzy control algorithm and cruise algorithm through the program to control the aircraft to complete the corresponding function.And the simulation of the algorithm is carried out in MATLAB to verify the feasibility of the algorithm.In summary,this article designed the indoor cruise and target tracking system.For indoor flight may encounter the situation,according to the characteristics of the sensor,a number of sensors are arranged reasonably on the aircraft to detect the surrounding environment to complete the task.At last,through the experimental test,effectively validated the effectiveness of the system,and laid the foundation for further development in the future. |