Skip to content

v0.4.0 - Real-time battery SOC estimation

Choose a tag to compare

@mohammadrezwankhan mohammadrezwankhan released this 23 Jul 16:56
453b69a

Highlights

  • Adds a reusable, toolbox-free two-state extended Kalman filter for real-time battery state-of-charge and RC-polarization estimation.
  • Uses the same piecewise-linear OCV table for voltage prediction and the local dOCV/dSOC measurement Jacobian.
  • Applies a Joseph-form covariance update and supports strictly increasing uniform or irregular measurement timestamps.
  • Includes a deterministic one-hour benchmark with a deliberate 20-percentage-point initial SOC bias and repeatable noisy terminal-voltage measurements.

Verified benchmark

  • Initial prior SOC error: -0.200
  • First posterior SOC error: -0.142
  • Final SOC error: +0.0001
  • SOC RMSE: 0.0066
  • Sustained two-percent settling time: 18 s
  • Posterior terminal-voltage RMSE: 1.581 mV

The full MATLAB/Simulink workflow reports All 13 MATLAB and Simulink checks passed. Citation metadata and Markdown links also pass their independent workflows.

Start here

run('examples/battery-soc-ekf/check_battery_soc_ekf.m')
run('examples/battery-soc-ekf/run_battery_soc_ekf.m')

The model remains an educational reference. Replace the illustrative OCV, electrical parameters, and covariance tuning before cell-specific use.