TinyML-based daily biogas nowcasting on ESP32: an ultra-compact edge inference framework for anaerobic digestion
Amine Chiguer, Mohammed Sadik, Abderrahim Fail
Key points
From the paper's conclusion- These findings support a reproducible embedded pipeline and a rigorous benchmark, rather than claims of superior accuracy or field-system validation.
Abstract
This study presents a compact machine-learning model for same-day biogas nowcasting in anaerobic digestion on edge-computing hardware. Implemented with Tiny Machine Learning (TinyML) and executed on an ESP32 low-cost microcontroller, the model was trained on a public dataset of 287 daily observations from a mesophilic reactor at 37 °C, using five biochemical variables, their one-day lags, and previous-day biogas production. To avoid optimistic bias, models were evaluated retrospectively with rolling-origin validation over five temporal windows, and the embedded demonstration architecture was fixed a priori rather than selected on the test data. Additional compact architectures showed discordant internal-validation and future-test rankings. A previous-day persistence baseline achieved a mean R² of 0.572 and linear autoregression 0.573, whereas the predefined 16–8 network achieved a mean R² of 0.343, showing that biogas dynamics in this stable reactor were dominated by process inertia and that biochemical variables did not improve prediction beyond the simple temporal baselines. On-device inference verification reproduced the Python reference across all 58 test vectors to within 1.67 × 10⁻⁵ NL/d at a mean latency of 48.899 µs at 240 MHz; persistence and autoregression ran in under 0.2 µs. A reduced-feature farm-scale evaluation with supervised recalibration, after meter-consistency quality control, showed a weak positive correlation but no positive skill on the later test segment (r = + 0.365, R² = −0.237, MAE = 0.30 L/d). These findings support a reproducible embedded pipeline and a rigorous benchmark, rather than claims of superior accuracy or field-system validation.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- AI-driven digital twin and delay-aware surrogate MPC framework for biogas productionComputers & Chemical Engineering · 2026
- Data-driven and Physics-based Modelling of Anaerobic Digestion Towards the Optimisation of Industrial-Scale Biogas PlantsJournal of Physics: Conference Series · 2026
- Machine learning vs. ADM1: Reliable biogas prediction with minimal data requirements in full-scale plantsEnvironmental Science and Ecotechnology · 2026
- 24-Hour Forecasting of Methane and Hydrogen Concentrations in Full-Scale Anaerobic Digesters Under Continuous and Flexible Feeding Using CNN–LSTM ModelsEnergies · 2026
- Reinforcement-Learning-Enabled Supervisory Control of a Full-Scale Anaerobic Digestion Facility Using a Calibrated Digital Twin.Environmental science & technology · 2026
- Multi-stage model predictive control of agricultural anaerobic digestion plant with uncertain substrate characterizationBioresource Technology · 2025