A Time-Efficient Complementary Kalman Gain Filter Derived From Extended Kalman Filter and Used for Magnetic and Inertial Measurement Units

Magnetic and inertial measurement units (MIMUs) are mainly used for determining the attitude of moving bodies. The extended Kalman filter (EKF) and the complementary filters (CFs) are the most commonly applied algorithms for calculating the attitude of the body that an MIMU is attached. Despite its much higher accuracy than CFs, the time-consuming EKF may not be competent for the work of attitude calculation if a microcomputer with limited computation power is used. To any attitude calculating algorithm, its posterior attitude (PA) is computed as: PA = prior attitude + gain matrix (GM) $\times $ innovation. The prior attitude and the innovation are derived from the measurements of the gyroscope, the accelerometer, and the magnetometer. The detailed analysis in this study found that the reason for the performance difference between EKF and CFs is their different structures of the GMs, which promotes the authors to construct a new GM. Based on some reasonable assumptions, the GM of EKF is simplified under the principle that the computation accuracy of PA is decreased as little as possible, but its computation burden is reduced as much as possible. After the replacement of the GM of the EKF by the innovatively designed GM, a new CF, named time-efficient complementary Kalman gain filter (TCF), is proposed. The simulation and experimental results show that TCF performs better than two CFs and is close to EKF in terms of attitude estimation accuracy but uses nearly the same computation time as the two CFs and about half of the computation time required by EKF.