Table of Contents
Fetching ...

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.

Adaptive Extended Kalman Filtering for Battery State of Charge Estimation on STM32

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 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.

Paper Structure

This paper contains 15 sections, 3 equations, 4 figures, 2 tables.

Figures (4)

  • Figure 1: Improved Thévenin model of a battery's cell.
  • Figure 2: Diagram of our embedded implementation of the EKF with MLE adaptive scheme. Red arrows represents communication lines between the two modules. Black arrows represents access to modules' data structures.
  • Figure 3: 95% MAE confidence bands for synthetic data against (a) window size, (b) noise power and (c) parameters error.
  • Figure 4: SoC estimation results on real data.