Research Article

Proactive Magnetic Anomaly Suppression Algorithm for Robust Madgwick-Based Heading Estimation

Volume: 13 Number: 3 September 30, 2026

Proactive Magnetic Anomaly Suppression Algorithm for Robust Madgwick-Based Heading Estimation

Abstract

Accurate heading estimation is critical for autonomous navigation. However, the widely utilized Madgwick filter may encounter orientation inaccuracies when subjected to environmental magnetic perturbations. This study proposes an enhanced heading estimation framework that integrates a real-time magnetic anomaly detection mechanism into the conventional Madgwick filter architecture. The proposed methodology continuously monitors the instantaneous magnetic field magnitude and inclination angle, evaluating them against threshold boundaries determined in a magnetic-interference-free environment. Upon the detection of a magnetic disturbance, the system proactively adjusts the filter’s gain parameter (β), effectively decreasing the influence of the magnetometer while increasing reliance on gyroscope data. While initial gyroscope bias is calibrated in static conditions in this study, maintaining precision over extended durations or under significant temperature variations may necessitate periodic recalibration. The algorithm was validated through eight experimental trials involving short-range navigation and rotational maneuvers under conditions of magnetic interference. Comparative analysis indicates that the proposed method demonstrates improved performance over the classical Madgwick filter, with the mean of the maximum heading errors across all trials reduced from 24.95° to 2.28°. Furthermore, the method yielded average mean error, standard deviation, and root mean square error (RMSE) values of 1.13°, 0.60°, and 1.29°, respectively. These findings indicate that the integration of an adaptive anomaly mitigation strategy yields improved accuracy in heading estimation, thereby facilitating consistent orientation tracking in environments prone to magnetic interference.

Keywords

References

  1. Akhlaghi, S., Zhou, N., & Huang, Z. (2017). Adaptive adjustment of noise covariance in Kalman filter for dynamic state estimation. In: 2017 IEEE Power & Energy Society General Meeting (pp. 1-5), (16-20 July 2017), Chicago, IL, USA. https://doi.org/10.1109/pesgm.2017.8273755
  2. Alaba, S. Y. (2024). GPS-IMU Sensor Fusion for Reliable Autonomous Vehicle Position Estimation. https://doi.org/10.48550/arxiv.2405.08119
  3. Alam, F., Zhou, Z., & Hu, J. (2014). A Comparative Analysis of Orientation Estimation Filters using MEMS based IMU. In: 2nd International Conference on Research in Science, Engineering and Technology (ICRSET’2014) (21-22 March 2014), Dubai, UAE. https://doi.org/10.15242/iie.e0314552
  4. Changwani, R. (2025). Optimized State Estimation for Real-Time Robotic Navigation and Mapping. In: 2025 IEEE 2nd International Conference on Energy and Electrical Engineering (EEE) (pp. 1-5) (20-21 June 2025), Nanchang, China. https://doi.org/10.1109/eee64897.2025.11162777
  5. Chen, W., Li, X., Zhang, H., Jia, P., Zou, F., Lyu, W., & Sang, S. (2023). A heading correction technology based on magnetometer calibration and adaptive anti-interference algorithm. Sensors and Actuators A: Physical, 363, 114726. https://doi.org/10.1016/j.sna.2023.114726
  6. Du, S., Chen, T., Lou, Z., & Wu, Y. (2024). A 2D-LiDAR-based localization method for indoor mobile robots using correlative scan matching. Robotica, 43(2), 514-541. https://doi.org/10.1017/s026357472400198x
  7. Fan, B., Li, Q., & Liu, T. (2017). An Adaptive Orientation Estimation Method for Magnetic and Inertial Sensors in the Presence of Magnetic Disturbances. Sensors, 17(5), 1161. https://doi.org/10.3390/s17051161
  8. Geneva, P., Eckenhoff, K., & Huang, G. (2019). A Linear-Complexity EKF for Visual-Inertial Navigation with Loop Closures. In: 2019 International Conference on Robotics and Automation (ICRA) (pp. 3535-3541), (20-24 May 2019), Montreal, QC, Canada. https://doi.org/10.1109/icra.2019.8793836

Details

Primary Language

English

Subjects

Mechatronics Engineering, Autonomous Vehicle Systems

Journal Section

Research Article

Early Pub Date

September 23, 2026

Publication Date

September 30, 2026

Submission Date

April 29, 2026

Acceptance Date

July 16, 2026

Published in Issue

Year 2026 Volume: 13 Number: 3

APA
Ünal, O. (2026). Proactive Magnetic Anomaly Suppression Algorithm for Robust Madgwick-Based Heading Estimation. Gazi University Journal of Science Part A: Engineering and Innovation, 13(3), 1039-1063. https://doi.org/10.54287/gujsa.1939810
AMA
1.Ünal O. Proactive Magnetic Anomaly Suppression Algorithm for Robust Madgwick-Based Heading Estimation. GU J Sci, Part A. 2026;13(3):1039-1063. doi:10.54287/gujsa.1939810
Chicago
Ünal, Osman. 2026. “Proactive Magnetic Anomaly Suppression Algorithm for Robust Madgwick-Based Heading Estimation”. Gazi University Journal of Science Part A: Engineering and Innovation 13 (3): 1039-63. https://doi.org/10.54287/gujsa.1939810.
EndNote
Ünal O (September 1, 2026) Proactive Magnetic Anomaly Suppression Algorithm for Robust Madgwick-Based Heading Estimation. Gazi University Journal of Science Part A: Engineering and Innovation 13 3 1039–1063.
IEEE
[1]O. Ünal, “Proactive Magnetic Anomaly Suppression Algorithm for Robust Madgwick-Based Heading Estimation”, GU J Sci, Part A, vol. 13, no. 3, pp. 1039–1063, Sept. 2026, doi: 10.54287/gujsa.1939810.
ISNAD
Ünal, Osman. “Proactive Magnetic Anomaly Suppression Algorithm for Robust Madgwick-Based Heading Estimation”. Gazi University Journal of Science Part A: Engineering and Innovation 13/3 (September 1, 2026): 1039-1063. https://doi.org/10.54287/gujsa.1939810.
JAMA
1.Ünal O. Proactive Magnetic Anomaly Suppression Algorithm for Robust Madgwick-Based Heading Estimation. GU J Sci, Part A. 2026;13:1039–1063.
MLA
Ünal, Osman. “Proactive Magnetic Anomaly Suppression Algorithm for Robust Madgwick-Based Heading Estimation”. Gazi University Journal of Science Part A: Engineering and Innovation, vol. 13, no. 3, Sept. 2026, pp. 1039-63, doi:10.54287/gujsa.1939810.
Vancouver
1.Osman Ünal. Proactive Magnetic Anomaly Suppression Algorithm for Robust Madgwick-Based Heading Estimation. GU J Sci, Part A. 2026 Sep. 1;13(3):1039-63. doi:10.54287/gujsa.1939810