Real-Time Blood Glucose Prediction Using SARIMAX and Edge Computing
DOI:
https://doi.org/10.63056/Keywords:
Glucose Forecasting, SARIMAX Model, Continuous Glucose Monitoring, Raspberry Pi, Real-Time Healthcare, Glycemic Risk PredictionAbstract
The global surge in blood glucose regulation disorders has increased demand for smarter, predictive healthcare systems. While Continuous Glucose Monitoring (CGM) devices have improved real-time tracking of glucose levels, their reactive nature limits proactive management. Anticipating glycemic fluctuations remains a significant challenge in minimizing health risks for individuals affected by these fluctuations. This study introduces a transparent and lightweight forecasting framework using the SARIMAX (Seasonal AutoRegressive Integrated Moving Average with eXogenous variables) model, implemented on a Raspberry Pi 5 for real-time execution in low-resource settings. The system employs synthetically generated CGM data over a 3-month window, simulating realistic glucose behavior, including post-meal spikes and circadian trends. The SARIMAX model was trained on this dataset and configured with daily seasonality parameters to forecast glucose levels on an hourly basis over a 7-day prediction horizon. Forecasted values were clipped to remain within physiological boundaries, and uncertainty bands were constructed using an 80% confidence interval. Performance evaluation metrics such as Mean Absolute Error (3.36%), Root Mean Square Error (4.30%), and average deviation (~4.83 mg/dL) confirm the model’s high predictive accuracy. Visual overlays of actual and predicted glucose curves further demonstrated close alignment in trend and amplitude, with the majority of readings remaining within clinically acceptable zones. These results validate the model’s robustness for short-term forecasting without the need for complex machine learning architectures. The presented framework proves that SARIMAX offers a compelling balance between interpretability, accuracy, and computational efficiency. Its successful deployment on an edge-computing device like Raspberry Pi confirms its viability for real-time applications in patient-centric monitoring systems. This work provides a foundation for future integration of lightweight predictive analytics into mobile healthcare infrastructure and early-warning platforms for glycemic risk mitigation.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Wasif Arshad, Murtaza Anjum, Mustafa Shakir (Author)

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