AI in BMS for Electric and Hybrid Vehicles

Application note

High Performance, reduced sensor model uses AI in BMS for Electric and Hybrid Vehicles

ForthLite: Deep Learning AI solution that utilizes STMicroelectronics SPC5-STUDIO-AI to accurately predict Li-Ion State of Health and Charge, using less sensors and optimized CPU resources

The presented platform involves a Machine Learning approach and demonstrates how data-driven approaches meet the challenge of reaching high accuracy while being light and computationally efficient. The architecture of the solution ensure the easiness of use and stands as a ready to use tool for R&D forces designing the next generation of AI-driven Battery Management Systems and constantly dealing with timings and budgetary constraints.

Application Example

White Paper

Overview: Battery Management System

Lithium-Ion batteries (Lib) are of increasing interest for applications with higher energy and power requirements, especially Electric Vehicles (EVs). The Lib pack is a major component within the car: its efficiency is a key factor for an increased car autonomy and for an extended pack life.
Lib require a careful management to ensure their safe operation. Battery monitoring and control is performed by an embedded system called a Battery Management System (BMS), whose main purpose is to ensure that each battery cell within the pack operates in a safety window in terms of current (I), voltage(V) and temperature (T).
Another crucial feature of the BMS is the computation of the State of Charge (available energy) and the State of Health (remaining useful life) of the battery.

Analytical Model
LiB states cannot be directly measured and several methods are available nowadays which compute SoC and SoH based on the theoretical model of the battery and on external measurements of voltage, current and temperature, relying upon an electrical equivalent circuit model which is analytically solved by using the sampling of external physical quantities.
Only highly complex models provide an accurate and reliable representation of the battery system, at the expenses of exceeding hardware complexity, cost, and computational power.

Data Driven Approach and machine learning
The solution presented in this platform involves machine learning techniques and demonstrates how a data-driven approach meets the challenge of reaching high accuracy while being light, computationally efficient and compliant with RESS (rechargeable energy storage systems) safety standards.


Many factors affect the aging mechanism of a LiB cell: not only the chemical properties of its components, but also the environmental conditions (temperature and humidity) as well as the number of cycles and the loads dynamics. All of these non-linear dependencies make the analytical modeling of the cell’s behavior a hard task which, upon success, faces the problem of too large model’s dimensions and too high execution latency.


This platform adopts a customized neural-network approach, based on convolution auto-encoders and recurrent LSTM cells to hit the goal of reducing dimensions and preserving accuracy of SoH and SoC estimation.

The stream of V, I and T coming from the battery cells is reduced by the auto-encoder. The reduced sequence is fed to the recurrent layres which output the battery states.

By mean of a supervised learning training routine the development team will be able to exploit the capabilities of this solution and effectively integrate it for a real time estimation of the SoC and of the SoH of the battery.


The design goal is to fit the Hardware resources of the SPC5 microcontrollers from STmicroelectronics.

The solution was deployed and tested on the SPC584 Discovery Board, based on the 32-bit Power Architecture® Technology. But how should a deep learning pre-trained neural network model be part of an embedded software application targeting SPC5 execution?

How to improve programmer productivity by avoiding to develop time consuming hand crafted code to run the neural network inference engine on SPC5?

The solution comes from SPC5-STUDIO-AI: the novel AI software extension from ST, released as a plugin for the well-known SPC5-STUDIO configuration and code generation tool.

Success Story

The development of this solution is prompted by one of the 18 high-priority areas outlined by the European Battery Alliance (EBA) aimed at directing R&I investments of European stakeholders acting in the battery market, in order to reach the target set by European Commission: ensuring a share of 250 bn euros in the global battery market starting 2025 onward.

The solution’s architecture ensures the easiness of use and stands as a ready to use tool for R&D forces constantly dealing with timings and budgetary constraints while designing the next generation of AI-driven BMSs.