Temporal Fusion Transformer-Based RUL Prediction for Battery Life with TinyML Integration
摘要
Unanticipated battery failures can disrupt the functionalities in mission-critical systems. In large-scale Internet of Things (IoT) deployments and live saving medical devices, downtime is costly and can be life-threatening. In such scenarios, accurate prediction of the Remaining Useful Life (RUL) of lithium-ion batteries is essential for ensuring operational reliability, safety, and efficient maintenance planning. However, nonlinear aging, environmental variability, and multivariate dependencies between sensor inputs complicate the estimation of RUL. This work addresses these challenges by presenting a deep learning-based framework for RUL prediction using the Temporal Fusion Transformer (TFT), combined with a lightweight TinyML model for edge deployment. The framework involves three stages: real-time data acquisition via ESP32-based monitoring, feature engineering to extract battery degradation patterns, and model training with TFT to forecast RUL along with uncertainty bounds (P10, P50, P90). As deploying the full TFT model is impractical on resource-constrained microcontrollers, a simpler architecture is designed and quantized using TinyML techniques to enable efficient real-time on-device inference. With an MAE of 4.44, RMSE of 6.36, and Pinball Loss scores of 0.89 (P10), 2.22 (P50), and 1.28 (P90), the proposed TFT model demonstrates accurate and reliable RUL prediction. The quantized TinyML model deployed on ESP32 achieved an MSE of 3.12. Its lightweight deployment enables scalable, energy-efficient battery health monitoring on edge Internet of Things (IoT) devices.