Design of Attitude Calculation Algorithm Based on Kalman and Mahony Complementary Filtering
摘要
For the industrial development trend of low cost and miniaturization of micro UAV, the accuracy and anti-interference of attitude calculation put forward more stringent requirements. an improved attitude calculation algorithm based on Kalman filter and mahony complementary filter is proposed. The gyroscope and accelerometer are used to estimate, predict and update the attitude angle through Kalman filter, suppress external disturbances such as motion acceleration and temperature drift. The attitude angle obtained by quaternion and the attitude angle calculated by Kalman are used to make a difference to obtain the angle deviation. The deviation angle is used to control the gyroscope angle. At the same time, the mahony complementary filter is used to correct the attitude of the gyroscope again, which greatly improves the anti-interference ability and accuracy of the system. The simulation results show that the improved fusion algorithm can effectively suppress external disturbances and enhance the stability of the system in both dynamic and static environments.