Software calibration for AK8963 magnetometer based on optimal ellipsoidal fitting

Aziz El fatimi, Adnane Addaim, Zouhair Guennoun


With the rapid development of mechatronics, systems in package (SiP), in particular the MPU-9250 inertial measurement Unit 9DOF (MPU-6050 6DOF and AK8963 3DOF), are becoming ubiquitous in applications for autonomous navigation purposes. Nevertheless, they suffer from some accuracy problems related to axis misalignment, disturbances, and deviation over time that make them unable to work autonomously for a long time. This paper will present a simple and practical calibration method using a least-squares based ellipsoid fitting method to calibrate and compensate for the error interference of the AK8963 sensor. Towards the end of this paper, a comparison between before and after the calibration is presented to study the software compensation effect and the stability of the magnetic sensor under study.


AK8963 magnetometer; earth’s magnetic field; ellipsoidal fitting; MPU-9250; software calibration; STM32-nucleo

Full Text:



Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

International Journal of Electrical and Computer Engineering (IJECE)
p-ISSN 2088-8708, e-ISSN 2722-2578