Designing a Lithium Ion Battery Management System with MATLAB and Simulink

Lithium-ion battery packs are the predominant energy storage systems in aircraft, electric vehicles, portable devices, and other equipment requiring a reliable, high-energy-density, low-weight power source. The battery management system (BMS) is responsible for safe operation, performance, and battery life under diverse charge-discharge and environmental conditions.


Simulink® modeling and simulation capabilities enable 
BMS development
, including single-cell-equivalent circuit formulation and parameterization, electronic circuit design, control logic, automatic code generation, and verification and validation.

Reference Designs

A model allows the vehicle designer to test all these situations in simulation, without risking causing damage to the real battery. Two example projects that can be used as reference designs are 
Design and Test Lithium Ion Battery Management Algorithms
Battery Modeling

See models in these example projects

Models in the Design and Test Lithium Ion Battery Management Algorithms project include: 

State Machine model

State machine for precharging for contactor management

State of Charge model
State of charge estimation using extended Kalman filter, unscented Kalman filter
Passive cell balancing

Passive battery cell balancing

Fault Management models

Fault management: over/under voltage, over current, over temperature etc.

Current Limit calculations

Charge and discharge current limit calculations

Models in the Battery Modeling project include:

Passive balancing models

Passive balancing

State of charge using UKF

State of charge estimation using UKF

Internal resistance estimation

Internal resistance estimation

Battery parameter estimation

Battery parameter estimation

Watch a demonstration featuring models from Design and Test Lithium Ion Battery Management Algorithms 

Part 1: BMS Overview (5:28)

See an overview of the various subsystems contained within the sample battery pack and its peripherals and what makes this cell representative of real-life lithium ion chemistry.



Part 2: The BMS Algorithm (3:12)

This video goes into more detail on the BMS algorithm; the part of the battery management system that monitors, protects, limits, and reports measurements from the battery pack. Learn how to use Stateflow® to develop supervisory control for a battery management system.

Part 3: State of Charge Estimation (2:47)

Learn about the advantages and drawbacks of three methods for state-of-charge estimation (SoC): Coulomb counting, Unscented Kalman Filters, and Extended Kalman Filters.

Part 4: Cell Balancing (4:33)

The final video in this series focuses on cell balancing. It’s important to keep individual battery cells roughly at the same state of charge, otherwise the system can become underutilized. Learn how to model cell balancing algorithms in Simulink.

To find out more about designing battery management systems: