Integrating Battery Models into BMS Workflows

Learn how to integrate physics-based and data-driven battery models into BMS workflows and explore deployment strategies for Li-ion systems.

5 min read

June 10th, 2025

Last updated: June 16th, 2025

Integrating Battery Models into BMS Workflows
Top Startups Using Physics and ML for Battery Development

Top Startups Using Physics and ML for Battery Development

Discover the most innovative companies redefining battery modeling with cutting-edge physics-based simulations and machine learning breakthroughs.

Introduction

As the demand for high-performance batteries surges, we’re seeing battery management systems (BMS) transform from simple monitoring devices into intelligent, model-driven platforms. This shift is especially pronounced in lithium-ion systems, where precision, safety, and longevity are paramount.

In this blog, we explore practical strategies for embedding high-fidelity models into BMS workflows, with a particular focus on Li-ion systems.

We examine model types, deployment considerations, and real-world scenarios that illustrate how model integration directly translates to operational value.

Why We’re Moving Toward Model-driven BMS

Traditionally, BMS implementations have leaned on lookup tables, Coulomb counting, and low-order equivalent circuit models. While sufficient under stable conditions, these methods break down in scenarios involving rapid load changes, thermal gradients, or aged cells. As we push batteries harder and expect them to last longer, these conventional approaches hit their limits.

By integrating physics-based and data-driven models into the BMS stack, we open up new capabilities like the accurate estimation of key battery states such as state of charge (SOC), state of health (SOH), and state of power (SOP), proactive thermal control, and early failure detection.

These models simulate otherwise unobservable internal states, enabling adaptive control strategies that evolve with battery degradation, usage history, and environmental conditions.

For instance, reduced versions of the Doyle-Fuller-Newman (DFN) model when augmented with thermal and aging submodels, allows us to simulate coupled electrochemical-thermal dynamics in real time. That’s a huge leap from static estimation strategies.

Choosing the Right Model and Integration Approach

Reduced-order physics-based models

Reduced-order models (ROMs) offer a tractable path to embedding physical models in real-time systems. These are often derived from full-order DFN models using methods such as proper orthogonal decomposition or by simplifying to single particle models (SPM). ROMs preserve interpretability while meeting the computational constraints of embedded targets.

To integrate these models, we typically generate them offline using tools such as PyBaMM or COMSOL. Once validated, they are exported to firmware-compatible formats like C/C++ or functional mock-up interfaces (FMI).

These reduced models are then coupled with estimation algorithms like extended or unscented Kalman filters to enable online state tracking. To capture aging and temperature effects, ROMs are often augmented with thermal submodels and empirical aging maps calibrated to historical data.

Data-driven surrogate models

Machine learning models trained on historical lab or in-vehicle datasets offer an alternative path to fast, flexible model inference. Long short-term memory networks, Gaussian process regression, and physics-informed neural networks are particularly useful for estimating internal states and predicting remaining useful life (RUL).

These models are trained offline on battery cycling data and then exported to embedded inference formats such as ONNX or TensorRT. Deployment in the BMS stack typically includes pre-processing layers for sensor data normalization and post-processing components for confidence calibration.

When properly integrated, data-driven models provide real-time approximations with sub-millisecond inference times, making them ideal for high-frequency control loops.

Hybrid models

Hybrid models combine the physical interpretability of ROMs with the learning capacity of machine learning. A common design involves a neural network learning the residual between SPM predictions and actual measured outputs. Another promising direction is the use of neural ordinary differential equations constrained by electrochemical laws.

Integration of hybrid models is facilitated by a modular architecture in which physics-based and data-driven components share common inputs. The system dynamically hands off between these components depending on runtime constraints or model trustworthiness. This flexibility allows the BMS to optimize between accuracy and computational load on a per-cycle basis.

From synthetic data to hybrid models in 6 weeks.

Learn the full stack of tools used by top battery teams.

Enroll now for this expert-led battery modelling course. Limited seats only!

Real-world Scenarios for Model-driven BMS

Integrating advanced models into BMS software stacks is not just a theoretical advantage. It is essential for practical battery management in commercial and industrial applications.

In fast-charging scenarios, high-resolution thermal and electrochemical models enable the BMS to push charging rates without breaching safety thresholds. These models support real-time adjustments to current limits based on internal temperature distributions and lithium plating risk.

In second-life applications, embedded SOH models help characterize repurposed cells and maintain consistent pack performance despite inherent variability. For electric vehicle fleets, predictive thermal models allow manufacturers to manage overheating risks across a wide range of usage profiles and ambient conditions.

Mission-critical energy systems, such as those used in aerospace, defense, or data center backup, leverage high-fidelity BMS models to detect latent faults and extend operational uptime. And in battery-as-a-service platforms, embedded RUL models support performance-based contracts by quantifying health and degradation in real time.

Embedding Models in Real-time Firmware

Co-simulation and scheduling

Embedded BMS systems often operate under stringent timing constraints, such as 10-millisecond control loops. To meet these demands, model execution must be optimized for latency and memory usage. Techniques such as code generation from Simulink, CasADi, or Modelica allow models to be compiled into real-time code suitable for execution on microcontrollers.

Model scheduling strategies play a key role. A common practice is to run full models less frequently (perhaps every 100 milliseconds) while executing predictive sub-models every 10 milliseconds. Some systems implement dynamic prioritization, updating models more frequently when thermal gradients are steep or during periods of high load.

Sensor fusion and filtering

Robust state estimation depends on fusing model predictions with real-time sensor data. To achieve this, we implement algorithms such as the unscented Kalman filter or particle filter, which reconcile model states with noisy voltage, current, and temperature measurements. Accurate and synchronized sensor input is critical, as model-based estimation is only as good as the boundary conditions provided by physical measurements.

Online calibration and learning-in-the-loop

Over time, battery parameters such as internal resistance and diffusion coefficients shift due to aging. To maintain accuracy, the BMS must update these parameters in real time. Techniques like recursive least squares or Gaussian process regression allow for continuous model calibration based on operating data. In some cases, calibration is triggered during rest periods or at the end of charging events to minimize estimation noise.

Industry Deployment and Toolchain Support

Major original equipment manufacturers and tool providers are already embedding these practices into production systems. Tesla, for example, uses electrochemical state estimation for cell balancing and fast-charging optimization, supported by embedded thermal models for pack-level safety. BMW has implemented adaptive reduced-order models for real-time SOC and SOH estimation under aging conditions. Toolchains from AVL and dSPACE support hardware-in-the-loop testing and model deployment, bridging development and field implementation.

Learn how to export PyBaMM models for embedded inference, just like industry teams at Tesla and BMW.

Check out this expert-led battery modelling course.

Limited seats only!

Key Challenges and The Path Forward

Despite rapid progress, embedding high-fidelity models in BMS systems remains challenging. Resource constraints on microcontrollers, often limited to under 2 MB of RAM, limit the size and complexity of deployable models. Cell-to-cell heterogeneity and external environmental factors can lead to model drift if not properly managed. Moreover, certifying model-based control logic for safety standards such as ISO 26262 introduces additional complexity.

Yet the trajectory is clear. Advances in auto-generated embedded code from platforms like JModelica and FMI, combined with real-time inference using edge AI hardware, are steadily reducing these barriers. Cloud-assisted learning loops, where embedded models sync with centralized analytics for continual improvement, are already under test in pilot fleets.

We anticipate that within the next two to three years, embedded digital twins will become standard in EV and stationary storage BMS platforms. These models will support closed-loop optimization and fleet-wide adaptation, fundamentally reshaping how batteries are managed across their lifecycle.

Stay tuned for more updates and insights. Follow us on LinkedIn and join the conversation using #FutureThroughDeepTech.

Master hybrid modeling for predictive battery management

Combine physical models and machine learning to estimate SOC, SOH, and RUL in scenarios where traditional models break down.

  • Train neural networks on simulation-generated synthetic data
  • Augment SPM predictions with ML residuals for better accuracy
  • Build hybrid pipelines like those used in Battery-as-a-Service platforms

Frequently Asked Questions (FAQs)


Hybrid models are particularly advantageous when physics-based models are too slow or miss important nonlinearities, and when pure ML models lack generalization or interpretability. A common strategy involves using a physical model (e.g., SPM) as a base and training a neural network to learn the residual error between model predictions and measured outputs. This combines the trustworthiness of physics with the flexibility of ML, allowing the BMS to capture effects like hysteresis, side reactions, or aging behavior that are hard to model from first principles alone.


Yes. Platforms like PyBaMM (for physics-based modeling), TensorFlow or PyTorch (for machine learning), and ONNX or FMI (for deployment) enable end-to-end development of BMS-ready models without relying on proprietary software. These tools support model simulation, parameter fitting, synthetic data generation, and deployment to embedded systems, making it possible for researchers and engineers to prototype advanced BMS algorithms independently or within R&D teams.


Embedded BMS platforms typically run on constrained microcontrollers with limited RAM (e.g., 512 KB to 2 MB) and strict timing requirements (e.g., 10 ms control loops). Deploying physics-based or ML models requires careful optimization via techniques such as model reduction, fixed-point arithmetic, memory-efficient data structures, and real-time scheduling. Additionally, safety-critical applications must conform to functional safety standards (e.g. ISO 26262), requiring extensive validation, fail-safe mechanisms, and explainability which is particularly challenging for black-box ML models.


Thermal submodels simulate internal temperature distributions, capturing heat generation from both resistive losses and entropic reactions. During fast charging, these models allow the BMS to dynamically reduce charging current in cells nearing thermal or electrochemical safety thresholds (e.g., lithium plating onset or thermal runaway). This predictive capability supports aggressive charging strategies while maintaining cell integrity, outperforming static temperature cutoffs that may be too conservative or too slow to react.


In model-driven BMS, high-fidelity internal state estimation is achieved by fusing noisy real-world sensor data (voltage, current, temperature) with model predictions. This is typically done using Bayesian filters such as the extended Kalman filter, unscented Kalman filter, or particle filters. These filters dynamically reconcile the difference between measured and simulated outputs, allowing for correction of model drift and real-time updates to states like SOC or SOP. Accurate sensor synchronization and calibration are crucial, as errors in measurement propagate directly into estimation inaccuracies.


Data-driven models, including recurrent neural networks (e.g. LSTMs), Gaussian processes, or physics-informed neural networks (PINNs), rely on historical training data. Their performance degrades significantly when exposed to input conditions not represented in the training distribution such as unexpected thermal excursions or rare fault modes. To mitigate this, confidence metrics (e.g. prediction intervals, dropout-based uncertainty) and hybridization with physics-based priors are often used. These strategies enhance reliability by preventing the system from overtrusting extrapolated predictions.


Reduced-order models (ROMs), such as single particle models (SPMs) are derived from full electrochemical models like Doyle-Fuller-Newman (DFN) through simplifications or projection-based methods. These ROMs retain the physical interpretability of key states, like lithium concentration gradients or overpotentials, while being fast enough to run on real-time hardware. When coupled with estimation algorithms like unscented Kalman filters, they enable adaptive, real-time tracking of SOC, SOH, and thermal behavior even on microcontrollers with tight memory and CPU constraints.


Traditional battery management systems typically rely on Coulomb counting for state-of-charge (SOC) estimation and equivalent circuit models (ECMs) for voltage behavior. While these are computationally efficient, they assume static parameters and fail to capture internal electrochemical or thermal dynamics. Under high C-rates, temperature gradients, or cell aging, these methods introduce significant errors in state estimation and are unable to provide predictive insights into degradation or safety risks.


Latest blogs from Neovarsity