Extended Kalman Filter with Battery Estimation Example

Example implementation of the EKF using complex step differentiation and two methods for linearising and discretising the system dynamics

You are now following this Submission

This is an example implementation of the Extended Kalman Filter (EKF) algorithm using complex step differentiation (https://blogs.mathworks.com/cleve/2013/10/14/complex-step-differentiation/) and the following two methods for linearising and discretising the system dynamics:
- The Euler method, with the option to define intermediate steps for increased accuracy
- The Taylor-Heun and Gauss-Legendre methods ("Mazzoni, T. Computational aspects of continuous–discrete extended Kalman-filtering. Comput Stat 23, 519–539 (2008)")
As a toy example, the EKF is used with the cell model from "https://uk.mathworks.com/help/physmod/simscape/ug/lithium-battery-cell-one-rc-branch-equivalent-circuit.html" to estimate the State of Charge, along with the capacitance and internal resistance parameter values of the cell.

Cite As

Efstathios Siampis (2026). Extended Kalman Filter with Battery Estimation Example (https://www.mathworks.com/matlabcentral/fileexchange/105855-extended-kalman-filter-with-battery-estimation-example), MATLAB Central File Exchange. Retrieved .

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0