Error Compensation Method for Indoor IMU Localization Based on CNN-BiLSTM-Transformer Architecture
摘要
To address the problem of error accumulation in indoor inertial navigation using Inertial Measurement Units (IMU), this study proposes an error compensation method based on a hybrid CNN-BiLSTM-Transformer architecture. The proposed method takes the smartphone IMU’s nine-dimensional measurements—three-axis accelerometer, three-axis gyroscope and three-axis magnetometer—as input. An initial trajectory is first generated using a Pedestrian Dead Reckoning (PDR) algorithm. Thereafter, a hierarchical error-modeling pipeline is applied: a CNN extracts local motion features from the IMU signals, a BiLSTM models the temporal propagation of inter-step errors, and a Transformer employs multi-head self-attention to capture global drift patterns. This hybrid architecture performs end-to-end regression of distance and heading errors and is used to dynamically compensate the PDR-derived trajectory. Experiments conducted on the public RIDI dataset demonstrate that the proposed model achieves R2 scores of 0.905 and 0.939 for distance and heading error prediction, respectively. After error compensation, the mean positioning error remains below 1.5 m. Localization experiments on three public datasets (RIDI, RoNIN and OxIOD) show that the proposed approach achieves higher positioning accuracy than PDR, EKF-INS, RoNIN, FTIN, iMOT, ResNet-Transformer and other baselines. In addition, the model is lightweight (only 2.40 M parameters) and computationally efficient (≈ 116.8 MFLOPs), making it well suited for on-device/mobile deployment. The results validate the effectiveness of the CNN-BiLSTM-Transformer architecture in multi-level error modeling, offering a novel solution for high-precision, low-cost indoor pedestrian localization.