Battery Modeling

version 1.27 (2.16 MB) by Javier Gazzarri
Lithium ion battery characterization, state estimation, cell balancing, and thermal management


Updated 3 Jun 2021

View License

Editor's Note: Popular File 2020

This file contains Simscape Electrical Lithium-ion battery models for parameter estimation and simulation.
1. Unzip the project.
2. Double-click BatteryModeling.prj to set up the MATLAB path. The html index contains links to open each example.
1. 3S-1P battery pack CCCV charge with passive balancing using Simscape Electrical. Charge / discharge cycling with passive balancing, including thermal effects.
2. EV battery cooling. Liquid cooling of an automotive battery pack.
3. Cell characterization. Parameter estimation of single cell using pulsed discharge experiments.
4. SOC Estimation using UKF.
5. SOH (internal resistance) online estimation using EKF. Internal resistance grows over time and the nonlinear Kalman Filter estimates its evolution.
6. Battery App. This app can be used to find battery parameters from datasheet information.
This site contains additional information on battery modeling using MathWorks(R) tools:
Additional literature:
SAE 2015: Model-Based Parameter Identification of Healthy and Aged Li-ion Batteries for Electric Vehicle Applications
Webinar: Battery Data Acquisition and Analysis Using MATLAB
Webinar: Lithium Battery Model with Thermal Effects for System-Level Analysis
IEEE 2012: Lithium Battery Model with Thermal Effect
SAE 2013: Simplified Extended Kalman Filter Observer for Battery SOC Estimation
SAE 2013: Battery Model Parameter Estimation Using a Layered Technique
SAE 2014: Battery Pack Modeling, Simulation, and Deployment on a Multicore Real Time Target
Webinar: Optimizing Vehicle Electrical Design through System-Level Simulation
Video: Real-Time Simulation of Battery Packs Using Multicore Computers
Video: MATLAB & Simulink Racing Lounge: Battery Modeling with Simulink
Using Model-Based Design to Build the Tesla Roadster
MathWorks(R) Consulting offers services on this topic. For assistance, please contact me or your MathWorks(R) representative.

Cite As

Javier Gazzarri (2022). Battery Modeling (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019b
Compatible with R2019a and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!