A TINYML-AUGMENTED INERTIAL NAVIGATION SYSTEM FOR REAL-TIME DRIFT COMPENSATION ON AN STM32 MICROCONTROLLER
Low-cost MEMS-based inertial navigation systems (INS) suffer from nonlinear and time-varying gyroscope bias drift, leading to cumulative orientation errors in long-duration applications. Traditional sensor fusion algorithms assume constant bias and do not compensate dynamic drift behavior under operating conditions. This paper presents a TinyML-augmented inertial navigation system implemented on an STM32 microcontroller for real-time adaptive drift compensation. A lightweight neural network model is trained using temporal gyroscope features and deployed using TensorFlow Lite Micro with 8-bit quantization. The estimated bias was removed prior to quaternion-based Madgwick sensor fusion. Experimental validation shows reduced cumulative drift, improved yaw stability, and real-time execution feasibility within strict embedded memory constraints. The proposed approach confirms the integration of embedded machine learning in aerospace navigation systems.
P.S.Karthikkumar, , S.Vignesh, , A, E., A, R. R. & G, N. (2026). A Tinyml-Augmented Inertial Navigation System for Real-Time Drift Compensation on an STM32 Microcontroller. International Journal of Science, Strategic Management and Technology, 02(05). https://doi.org/10.55041/ijsmt.v2i5.134
P.S.Karthikkumar, , et al.. "A Tinyml-Augmented Inertial Navigation System for Real-Time Drift Compensation on an STM32 Microcontroller." International Journal of Science, Strategic Management and Technology, vol. 02, no. 05, 2026, pp. . doi:https://doi.org/10.55041/ijsmt.v2i5.134.
P.S.Karthikkumar, , S.Vignesh,Ezhumalai A,Raghul A, and Nithishwaran G. "A Tinyml-Augmented Inertial Navigation System for Real-Time Drift Compensation on an STM32 Microcontroller." International Journal of Science, Strategic Management and Technology 02, no. 05 (2026). https://doi.org/https://doi.org/10.55041/ijsmt.v2i5.134.
[2] R. Mahony, T. Hamel, and J. Pflimlin, “Nonlinear complementary filters on the special orthogonal group,” IEEE Trans. Autom. Control, vol. 53, no. 5, pp. 1203–1218, 2008.
[3] E. Foxlin, “Inertial head-tracker sensor fusion by a complementary separate-bias Kalman filter,” Proc. IEEE VRAIS, pp. 185–194, 1996.
[4] Y. S. Suh, “Orientation estimation using a quaternion-based indirect Kalman filter,” IEEE Trans. Instrum. Meas., vol. 59, no. 12, pp. 3299–3305, 2010.
[5] H. Fourati, “Heterogeneous data fusion algorithm for pedestrian navigation via foot-mounted inertial measurement unit and complementary filter,” IEEE Trans. Instrum. Meas., vol. 64, no. 1, pp. 221–229, 2015.
[6] R. Cechowicz, “Bias drift estimation for MEMS gyroscope used in inertial navigation,” Acta Mech. Autom., vol. 11, no. 2, pp. 104–108, 2017. (researchgate.net)
[7] S. Han et al., “Random error reduction algorithms for MEMS inertial sensors: A review,” Micromachines, vol. 11, no. 11, p. 1021, 2020. (mdpi.com)
[8] S. Han, “Startup drift compensation of MEMS INS based on PSO-GRNN,” Sensors, 2025. (pmc.ncbi.nlm.nih.gov)
[9] M. McManus, “Inertial navigation system drift reduction using scientific machine learning,” M.Eng. thesis, MIT, 2024. (dspace.mit.edu)
[10] C. Chao and J. Zhao, “TinyGC-Net: An extremely tiny network for calibrating MEMS gyroscopes,” arXiv preprint arXiv:2403.02618, 2024. (arxiv.org)