Extended Kalman Filter with Battery Estimation Example
Version 1.0.0 (60.1 KB) by
Efstathios Siampis
Example implementation of the EKF using complex step differentiation and two methods for linearising and discretising the system dynamics
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 .
MATLAB Release Compatibility
Created with
R2020a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
