Adaptive Extended Kalman Filtering for Battery State of Charge Estimation on STM32
António Barros, Edoardo Peretti, Davide Fabroni, Diego Carrera, Pasqualina Fragneto, Giacomo Boracchi
TL;DR
This work tackles real-time State of Charge estimation on resource-constrained embedded platforms by coupling a second-order ECM with an Adaptive Extended Kalman Filter whose covariances are adapted via Maximum Likelihood using a sliding window. The authors systematically study the estimation window size and demonstrate that a window of $N=128$ offers an optimal trade-off between memory and accuracy. They provide a fully embedded C implementation on an STM32 MCU and show that the MLE-based AEKF matches or outperforms Coulomb counting and CM EKF, especially on real data where model mismatches are present. The results support the viability of real-time SoC estimation for embedded BMS applications and point to future work on joint SoC and health estimation.
Abstract
Accurate and computationally light algorithms for estimating the State of Charge (SoC) of a battery's cells are crucial for effective battery management on embedded systems. In this letter, we propose an Adaptive Extended Kalman Filter (AEKF) for SoC estimation using a covariance adaptation technique based on maximum likelihood estimation - a novelty in this domain. Furthermore, we tune a key design parameter - the window size - to obtain an optimal memory-performance trade-off, and experimentally demonstrate our solution achieves superior estimation accuracy with respect to existing alternative methods. Finally, we present a fully custom implementation of the AEKF for a general-purpose low-cost STM32 microcontroller, showing it can be deployed with minimal computational requirements adequate for real-world usage.
