Papers
Topics
Authors
Recent
Search
2000 character limit reached

Quaternion-Averaging-Based Adaptive Complementary Filter for Pedestrian Dead Reckoning With a Foot-Mounted AHRS

Published 5 Jul 2026 in cs.RO and cs.HC | (2607.05451v1)

Abstract: Pedestrian Dead Reckoning (PDR) can be applied to indoor navigation systems. GPS suffers from signal degradation due to roofs and high-rise buildings, whereas PDR can estimate positions without being affected by such signal degradation. The accuracy of a foot-mounted AHRS(Attitude and Heading Reference System)-based PDR depends on the accuracy of the attitude estimation algorithm used in the AHRS. In this article, a Quaternion-Averaging-Based Adaptive Complementary Filter (QAACF) for PDR with a foot-mounted AHRS is proposed to improve estimation accuracy while reducing computational cost. QAACF fuses a quaternion derived from angular velocity with quaternions derived from acceleration and magnetic field measurements using Markley's quaternion averaging, which combines two quaternions more rigorously than linear interpolation. In addition, QAACF adaptively adjusts the weights of angular velocity, acceleration, and magnetic field measurements according to gait phases and the level of magnetic disturbances. Experimental results showed that the proposed QAACF achieves low Root Mean Square Errors (RMSEs) compared to existing attitude estimation filters while requiring lower computational cost than Kalman filters.

Authors (2)

Summary

  • The paper presents QAACF, which adapts quaternion fusion using Markley’s averaging to integrate gyroscope, accelerometer, and magnetometer data based on gait phase and disturbance metrics.
  • It demonstrates enhanced attitude estimation accuracy, achieving a yaw RMSE of 4.7° and improved trajectory tracking over conventional Kalman and complementary filters.
  • The method delivers computational efficiency via closed-form quaternion averaging, making it ideal for resource-constrained, indoor pedestrian navigation systems.

Quaternion-Averaging-Based Adaptive Complementary Filter for PDR with Foot-Mounted AHRS: An Expert Analysis

Introduction and Motivation

Pedestrian Dead Reckoning (PDR) addresses the challenge of reliable indoor localization in environments where GNSS signals are degraded by obstructions such as roofs or high-rise buildings. Attitude and Heading Reference Systems (AHRS) based on MARG (Magnetic, Angular Rate, and Gravity) sensor fusions are widely used for foot-mounted PDR, but estimation accuracy is constrained by sensor drift, magnetic disturbances, and algorithmic trade-offs between computational cost and tracking precision. Kalman Filters (KFs) offer favorable estimation accuracy but incur computational overhead, while Complementary Filters (CFs) are efficient but typically less robust, particularly under dynamic conditions and in the presence of magnetic disturbances.

The paper introduces the Quaternion-Averaging-Based Adaptive Complementary Filter (QAACF), which aims to close the performance gap between computational efficiency and estimation accuracy in attitude estimation for PDR. Unlike conventional quaternion fusions employing LERP or SLERP, QAACF leverages the rigor of Markley’s quaternion averaging and adaptively tunes fusion weights based on gait phase and online disturbance metrics.

Algorithmic Framework

Overview of QAACF

The QAACF integrates quaternion estimates from angular velocity, acceleration, and magnetic field measurements in two major fusion steps, both using closed-form solutions from Markley’s quaternion averaging. The process is illustrated in (Figure 1). Figure 1

Figure 1: Overview of the proposed QAACF algorithm integrating angular velocity, acceleration, and magnetometer-based quaternion fusion using adaptive weighting.

Sensor-Specific Quaternion Estimation

  • Gyroscope Fusion: Direct quaternion propagation by integrating angular velocities.
  • Accelerometer Fusion: Quaternion update using a gradient-descent minimization of the gravity vector alignment loss.
  • Magnetometer Fusion: Quaternion computed via an efficient geometric method combining gravity and magnetic field vectors, robust to heading ambiguities and misalignment.
  • Adaptive Weights: Computed online based on gait phase — detected via foot angular velocity norms (midstance boosts accelerometer confidence) — and magnetic disturbance inference.

Quaternion Averaging

Markley’s method provides a closed-form solution for two-quaternion weighted fusion, circumventing the ambiguities and unit hypersphere topology issues inherent to LERP and even SLERP. For two quaternions q1,q2\boldsymbol{q}_1, \boldsymbol{q}_2 with weight ww, the fused estimate is

qq1+wq1q2Λwq2\overline{\boldsymbol{q}} \propto \boldsymbol{q}_1 + \frac{w\boldsymbol{q}_1\cdot\boldsymbol{q}_2}{\Lambda - w} \boldsymbol{q}_2

where Λ\Lambda is the largest eigenvalue derived from the weighted sum matrix and the closed-form characteristic equation, incorporating the inner product structure of the quaternions.

Adaptive Weighting

Adaptive weights for fusing angular velocity and acceleration (wa,kw_{a,k}) and subsequent fusion with magnetic field (wm,kw_{m,k}) are exponentially weighted based on detected gait phase (midstance detection via angular velocity magnitude) and live magnetic disturbance metrics. This adaptivity is critical for mitigating the effects of disturbance without discarding valuable information: Figure 2

Figure 3: Definition of the gait phases (stance and swing) critical for adaptive sensor weighting.

PDR Pipeline and ZVU Integration

QAACF-based PDR includes double acceleration integration in the global frame, bias correction via Zero Velocity Update (ZVU) at midstance (zero foot velocity phase), and rigorous propagation of pose. Gait phase detection is embedded and crucial for reliable zero-velocity triggering. Figure 4

Figure 2: AHRS and reflective marker placements on the foot for reliable inertial/magnetic measurement.

Experimental Methodology

Multiple indoor walking datasets were collected using an Xsens MTW2-3A7G6 AHRS for foot-mounting and OptiTrack for ground-truth pose measurement. Comparative baselines include multiple KFs (Extended, Fast, Cubature) and representative CFs (Fast, Madgwick, Mahony). Sensor and filter calibration procedures followed best practices, with all implementations executed in Python with numerical optimizations for fusion operations.

Results

Attitude Estimation Accuracy

The QAACF outperforms both KFs and CFs in root-mean-square error (RMSE) for roll, pitch, and yaw compared to the Xsens reference (XKF3hm). Notably, QAACF achieves a yaw RMSE of 4.7°, surpassing all competing methods. Figure 5

Figure 6: Line graph of attitude RMSEs across filters, highlighting the superior performance of QAACF in all Euler angles.

Adaptive weights remain low for magnetic fusion in the presence of disturbances, increasing only intermittently when conditions stabilize, as captured by online disturbance metrics and gait phase transitions. Figure 7

Figure 4: Time series of QAACF adaptive weights, reflecting online modulation in response to gait dynamics and disturbance magnitude.

Waveform plots confirm that QAACF yields attitude estimates closely matching the reference during both stationary and dynamic segments of walking trials. Figure 8

Figure 5: Time histories of roll, pitch, and yaw, demonstrating the tight tracking of QAACF to reference attitudes.

PDR Accuracy

Trajectory RMSEs and relative errors for total walked distance validated on both short and long paths show that QAACF-based PDR consistently achieves lower or comparable errors to the XKF3hm reference, with average distance relative error of 1.3%. For long trajectories unsupervised by external tracking, QAACF maintains competitive performance and stability. Figure 9

Figure 7: RMSE comparisons of trajectory estimates for all filters, with QAACF achieving top-tier performance on both short and extended walks.

Figure 10

Figure 8: Relative error plot for walking distance estimation, underscoring QAACF’s consistency and accuracy.

Overlayed trajectory reconstructions further illustrate the improvement in spatial tracking over competing approaches. Figure 11

Figure 9: Sample walking trajectories generated by PDR with QAACF and standard Kalman filters, emphasizing tighter adherence to ground truth.

Figure 12

Figure 10: Trajectory comparisons for QAACF and CF baselines, with QAACF reducing drift and heading error significantly.

Computational Efficiency

Measured on both MacBook Pro (M1 Pro) and Raspberry Pi 4, QAACF’s per-sample computation time is significantly lower than all Kalman Filters while remaining competitive with best-in-class CFs. This is directly attributed to the closed-form and branch-free nature of the quaternion averaging subroutine and the absence of covariance matrix propagation. Figure 13

Figure 11: Computation time per attitude sample for all evaluated filters. QAACF achieves an efficient balance of accuracy and speed, suitable for embedded deployment.

Implications and Future Directions

The introduction of QAACF fills a critical gap for low-latency, foot-mounted AHRS in PDR, merging high estimation fidelity with computational tractability. This facilitates integration into resource-constrained embedded systems, wearables, or robotic platforms without external localization infrastructure.

From a theoretical perspective, the fusion of Markley’s closed-form quaternion averaging with online adaptive weighting strategies elevates the rigor of quaternion-based sensor fusion — opening pathways to more generalizable, disturbance-robust inertial navigation filters.

Open challenges remain:

  • QAACF's dependence on sensor calibration and high-fidelity gyroscopes.
  • Uncertainty regarding extrapolation to highly dynamic locomotion (e.g., running).
  • Lack of validation against absolute ground truth (optical motion capture) for certain yaw evaluation regimes.
  • Potential for further fusion with learned magnetic disturbance classifiers or deep IMU models, especially in environments with structured disturbance patterns.

Conclusion

QAACF advances the state of the art for foot-mounted PDR through its technically principled quaternion fusion, adaptive online weighting, and practical efficiency. It demonstrates that properly weighted, rigorous quaternion averaging can surpass both expensive nonlinear filtering and heuristic complementary fusion, establishing a new baseline for robust, deployable indoor pedestrian navigation. Extensions to other domains—limb motion tracking, robotics, or autonomous mobile platforms—are anticipated, contingent on further validation under high-dynamics or complex environmental conditions.

(2607.05451)

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Tweets

Sign up for free to view the 1 tweet with 1 like about this paper.