Abstract:Aiming at the problem that the inertia measurement unit has large noise and the accuracy of the conventional attitude calculation algorithm is not high, an adaptive fuzzy complementary filter (AFCF) algorithm based on quasiNewton method (LBFGS) is proposed in this paper. In this method, first the LBFGS is used to estimate the optimization of the accelerometer and magnetometer, monitor the motion level and the errors of the accelerometer and magnetometer. Then the fuzzy logic theory is used to adjust the weighting factor and gain weight to dynamically adjust the complementary filter parameter, realize the dynamic compensation of attitude error and optimize the attitude calculation results. The experimental verification show that the system static error is within 0.4°, the dynamic error is within 1.3°, and the system can reduce noise interference and gyroscope drift.