File Exchange

image thumbnail

Design and Test Lithium Ion Battery Management Algorithms

version 1.0.2 (8.89 MB) by Chirag
This example project can be used as a reference design to get started with designing Battery Management System with MATLAB and Simulink.


Updated 12 Nov 2019

View License

This example project can be used as a reference design to get started with designing Lithium Ion Battery Management System (BMS) with MATLAB and Simulink.

Project includes Simulink models for BMS Algorithms such as:

1. State of Charge estimation using Extended Kalman Filter, Unscented Kalman Filter
2. Passive Battery Cell Balancing
3. State Machine for Pre-charging and Contactor Management
4. Fault Management - Over/Under Voltage, Over Current, Over Temperature etc.
5. Charge and Discharge Current Limit Calculations

To design and test these algorithms, project also includes files for
1. Li-ion Battery Cell Parameter Estimation
2. Battery Pack with 6 cells in series and 96 cells in series
3. Simulink Test files with test cases to test State Machine Logic
4. Linking requirements to Models

Cite As

Chirag (2020). Design and Test Lithium Ion Battery Management Algorithms (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (15)

apei zou

代码生成的时候谁解决了这个错误啊: The selected toolchain ('TI ARM Code Generation Tools | gmake') is not registered. It must be in the Toolchain registry in order to be valid. Check if this toolchain is supported. For a list of supported factory toolchains refer to


Hi Apei Zou, what are you trying to debug?

apei zou

@Chirag Is there debug this model's video?

Please, if there is somebody out there with R2019b should load this project and export to previous versions and then upload here. I need 2019a version please.

Afsher P A

hello sir

@Chirag... would be great if you can export the model to a previous version. Thanks.

@Rajeev: You will have access to 2019b. Kindly let me know if you have any challenge.


Hi Rajeev, Hi Vikram, This project has more than 100 files to cover all aspects of Model Based Design and different steps of designing BMS. Due to number of models involved, it is difficult for me to export each model to previous release and make sure it works. You can always reach out to your MathWorks Account Manager to get trail for latest release if you don't have access to it.

Rajeev G

Hi Chirag, I am encountering the same problem as @Vikram, I have a R2018a version and I am unable to open the .mlproj file, is there a way to open it in earlier versions?

Vikram Jain

@Aldo/Chirag, in this case since I don't have te license for 2019b version how can I use this ? can you post the same files for 2018b version ?

@Chirag , I have no problem to open the MATLAB project file and extract all the contained files. Thanks for the submission!
@Vikram, remember MATLAB Projects, files with .mlproj extension, were introduced in release R2019a.
See here for more information.

Vikram Jain

I am using 2018b


@Vikram, Which MATLAB version are you using? The example is developed in R2019b, most recent.

Vikram Jain

Hi Chirag, I was trying to open this in MATLAB but it doesn't seems to open, it opens as garbage file. Can you help me figure out how to load/open this file in MATLAB ?



Download file is now .zip folder instead of MATLAB project package.


Changed Description

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux