The multi-rotor has many advantages such as small in size, light in weight, simple in mechanical structure, easy in operation, low in cost, so it has a wide prospect of application. It can be used for the investigation, bait, electronic interference, communicating relay and UAV(Unmanned Aerial Vehicle) in the military. With civilian applications, it can be used to patrol and rescue in the forest, mountain, sea and other complex environment. It also can be used to spray pesticides and deliver cargos. In industry environment, it can be used to inspect the roads, bridges, pipelines, power transmission equipment. Therefore the multi-rotor becomes a hot research topic at home and abroad and develops rapidly.The thesis aims at the attitude detection and the attitude control of quad-rotor. For the attitude detection, the attitude angles of the quad-rotor are measured by various inertia sensors, and then these angles are fused and revised by using Kalman algorithm. For the attitude control, the flight controller is designed and the algorithm of incomplete derivative PID is adopted. Finally the control system of the quad-rotor is implemented. The contents of the thesis include:1. The flight principle of quad-rotor is analyzed and the dynamic model of it is built. By controlling the rotating speed of each motor, the quad-copter’s flight attitude can be changed. The dynamic model of the quad-rotor is built through the Newton-Euler dynamic equations.2. The overall structure of quad-rotor is designed. The quad-rotor is consisted of micro control unit(MCU), attitude detection modules, remote control module(RC), motor driver module and supply of power. The MCU is STM32F107C8T6. The attitude detection module includes accelerometer, gyroscope, electronic compass and barometer. The RC uses 2.4G wireless communication mode. Brushless DC motor is selected as driving mechanism. The power is provided by the 11.1V 3S Li battery.3. The algorithm of the attitude information fusion of the quad-rotor is studied. At first on the basic of discussing the principle of accelerometer, gyroscope and digital compass, the pretreatment method of the sensors are analyzed. Then the principles of first order complementary filter and Kalman filter are respectively explained and the two filters are used on the attitude detection system. Finally the algorithms are ported to the micro-controller and tested via graphical data curve displayed on the computer. The results show that the performance of the Kalman filter is higher than that of the first order complementary filter.4. The incomplete derivative PID algorithm is used in quad-rotor controller. The theoretical principle and the structure of the traditional PID controller are studied, and its advantage and disadvantage are analyzed. The algorithm of incomplete derivative PID is applied to quad-rotor controlled. Finally, the contrast experiment is simulated in traditional PID controller and incomplete derivative PID. The results show that the incomplete derivative PID has faster response than the traditional algorithm.5. The attitude control system of quad-rotor is designed. Through combining the algorithm of attitude fusion and the incomplete derivative PID, the attitude control system of quad-rotor is designed. Then the system is tested for hovering to verify the stability of attitude angles. The results show that the attitude control system can control the quad-rotor stability. |