EV ArticlesFeatured

Exploring Battery Modelling and Simulation Using Data and AI

As demand rises for safer, more efficient, and scalable battery solutions, simulation has emerged as a strategic enabler. In electric vehicle (EV) battery development, virtual modeling helps engineers design and test battery behavior faster, safer, and more cost-effectively. We interviewed experts from MathWorks to discuss how data and AI-powered simulation tools are helping engineers model and optimize battery systems with greater precision and speed.

Danielle Chu is a Product Manager at MathWorks, specialising in power electronics and battery systems, while Prasanna Deshpande is an Application Engineering Manager at MathWorks India and works closely with automotive OEMs, suppliers, and startups adopting model-based design.

MathWorks provides a block-diagram environment that enables engineers to perform system-level, multi-domain modeling — covering electrical, mechanical, and digital control systems. This includes full powertrain simulations as well as component-level modeling, such as for the battery pack. It also supports algorithm development for functions like state of charge (SOC) estimation within the battery management system (BMS). Running system-level simulations helps engineers understand the interactions among subsystems.

Using Simulink, engineers can model an EV’s powertrain, while the Optimization Toolbox helps determine the ideal battery pack size to meet range and cost targets. Once the pack size is identified, Simscape can be used to model the battery pack and BMS algorithms — including SOC estimation, state of health (SOH) estimation, and cell balancing.

To achieve accurate results, engineers model the right level of physics, including thermal behavior, and design control algorithms within the same environment. These same models in Simulink can then be used to automatically generate C code or Hardware Description Language (HDL) code for hardware-in-the-loop (HIL) testing, enabling real-time validation of BMS algorithms.

In a real-time simulation, the models run at the same rate as the actual system — for example, if a battery takes 30 minutes to charge from 60% to 80%, it takes the same time in simulation. This virtual environment allows engineers to validate BMS functionality before creating a hardware prototype.

The process is iterative — engineers can refine algorithms, regenerate the code, and re-test it in the hardware-in-the-loop setup. By the time physical testing begins, the algorithms are already well validated, reducing the need for extensive hardware trials. While more time is spent upfront on simulations, this results in faster, more successful hardware testing and a shorter overall development cycle.

When engineers model batteries, a key question is: how accurately does the model represent real battery behavior? Cell characterization addresses this by fitting a battery model to experimental data. It’s crucial because BMS algorithms rely on accurate models to set control parameters — such as Kalman filter tuning for SOC estimation or power limits based on SOC and temperature — helping prevent overvoltage or undervoltage conditions.

Accurate characterization improves simulation precision, leading to better BMS design. To achieve this, engineers follow a structured process involving data collection, model selection, parameter fitting, and validation, ensuring the model reflects experimental data effectively.

1. Data Collection: Engineers first determine what tests to run in a battery lab, gathering voltage, current, temperature, and charge data during charge and discharge cycles. Current profiles must sufficiently excite the battery to capture its behavior — for instance, through Hybrid Pulse Power Characterization (HPPC) or other pulsed current profiles.

2. Model Selection: Choosing the right battery model is critical. Options include equivalent circuit models, electrochemical models, and data-driven (AI-based) models. The equivalent circuit model is most commonly used for BMS design because it offers a good balance between simplicity, fidelity, and computational efficiency.

3. Parameter Fitting: Once a model is chosen, engineers adjust its parameters to match experimental data using curve fitting, optimization algorithms, or machine learning techniques. This minimizes the difference between model predictions and real measurements, ensuring accuracy across different conditions.

4. Validation: Engineers then validate the model by comparing its predictions against a different set of experimental data — for example, a drive cycle profile not used during fitting. Based on validation results, the model may be refined iteratively by adjusting parameters or adding new data.

In short, cell characterization is a foundational process that aligns the battery model closely with experimental behavior. By systematically following these steps — data collection, model selection, parameter fitting, and validation — engineers can develop accurate models that significantly enhance BMS design.

  • One key tool is the Battery Pack Model Builder app, which automates the creation of battery pack architectures — from cell to module and pack levels. It allows engineers to include elements like cooling or thermal plates and enables interactive 3D visualization to inspect geometry, layout, and thermal interfaces. This significantly speeds up and simplifies the process of building battery packs once the cell characterization is complete.
  • Next, the Simscape Battery tool provides flexible model fidelity options. Engineers can choose low-fidelity models for early design stages that simulate faster, or high-fidelity models for detailed analysis.
  • Thermal coupling is another important feature. Engineers can easily integrate cooling systems and simulate cell-to-cell temperature variations — a critical factor under high-temperature conditions, such as those in India.

The toolset also includes BMS block libraries within Simulink for key algorithms like SOC and SOH  estimation, fault detection, and cell balancing. These ready-to-use blocks act as starting points for engineers to build and parameterize their own BMS control architectures.

Once the BMS algorithms are developed, engineers can use verification and validation tools for both functional testing and design error detection. This includes identifying issues such as dead code, unused logic, or divide-by-zero errors — all of which are critical for ensuring safety and reliability in battery management systems.

Together, these tools enable engineers to rapidly iterate, test control strategies, and perform hardware-in-the-loop (HIL) validation within a unified environment — streamlining the overall BMS and battery development process.

Challenges in the two- and three-wheeler EV segments include tight packaging constraints, highly cost-sensitive markets, and diverse usage conditions. Manufacturers must design vehicles that perform reliably across all these scenarios. Simulation plays a key role here by enabling virtual prototyping and optimization before any physical testing begins.

Extending the end-to-end BMS workflow to an end-to-end EV development workflow, engineers can simulate drive cycles for both urban and rural conditions, optimize component sizing (battery, motor, and controller), and balance trade-offs between performance and cost. They can also design and test control algorithms for critical vehicle functions like regenerative braking, ABS, and thermal management — the latter being especially important in Indian operating conditions.

User Story – Ather Energy

Ather used simulation extensively to evaluate design concepts across various riding and usage scenarios and to make informed trade-offs. For instance, increasing battery capacity improves range but adds cost, size, and affects the EV’s centre of gravity. To find the optimal balance, Ather built a system-level vehicle model incorporating the main components and vehicle dynamics.

Using a first-principles approach, they developed empirical models of battery cells and then designed control algorithms for battery charging, power management, and temperature management in Simulink. They ran closed-loop simulations to validate their control design and used Embedded Coder to generate deployable code for the ARM Cortex processor and D PIC2000 controller.

As a result, Ather reduced its design cycle time from months to weeks and cut testing time by nearly 50%, as claimed by their team. Field issues were also resolved much faster.

It’s worth mentioning that Ather benefited from the MathWorks Startup Program, which provides qualifying startups access to MATLAB and related tools — sometimes complimentary through partner incubation centers. This includes technical support and collaboration with our application engineering team, helping startups scale efficiently.

With the availability of large datasets today, MathWorks provides AI-based workflows for both battery modeling and BMS design. Engineers can use AI techniques to create reduced-order models of batteries using the Reduced-Order Modeler App. This app helps generate simplified yet accurate battery models when engineers have large amounts of data—either from high-fidelity simulations or experimental testing.

These AI-based models can then be integrated into Simulink for system-level simulations, C-code generation, and hardware-in-the-loop (HIL) testing.

For battery state estimation, engineers can leverage the Deep Learning Toolbox to estimate the state of charge or even develop virtual sensors that estimate parameters like internal battery temperature. Similarly, using the Predictive Maintenance Toolbox, engineers can estimate the remaining useful life of the battery—information that’s crucial for both developers and end users to understand battery health and longevity.

These AI-driven models can also be deployed to real-time target machines for virtual and real-time testing, helping engineers validate and optimize battery performance more efficiently.

User Story – KPIT

KPIT is a leading software integrator in the automotive domain. They used deep learning tools—specifically a deep neural network approach —for SoC and SoH estimation in BMS development. Many engineers find traditional methods, such as Coulomb counting and Kalman filtering, quite complex to implement. By using deep learning–based techniques, KPIT achieved high accuracy in SoC and SoH estimation, comparable to, and in some cases better than, traditional approaches. Moreover, they were able to deploy their AI algorithms on an embedded platform.

Thermal management in EVs isn’t just about cooling batteries anymore. Modern electric vehicles have interconnected thermal loops for batteries, motors, power electronics, and even cabin HVAC systems. That adds complexity — engineers need to balance heat loads and maintain energy efficiency under varying environmental conditions.

For example, if you’re driving in hot weather with a low state of charge, the vehicle control unit has to decide whether to prioritize cabin cooling or range — these trade-offs are part of the system logic. Thermal management is also safety-critical, especially during fast charging or under extreme temperature conditions.

Simulation allows engineers to model and test multi-domain systems — electrical, thermal, and control — together. They can simulate scenarios like high-speed driving or cabin cooling, and evaluate optimization strategies to minimize energy consumption and maximize range.

User Story – Mahindra & Mahindra

Mahindra used MathWorks tools to build a flexible real-time simulation setup. This enabled their engineers to develop and validate EV thermal system controls even before the Electronic Control Unit (ECU) hardware was available — significantly speeding up development and reducing costs. By leveraging rapid control prototyping using MATLAB and Speedgoat, they could test control strategies and logic in real time.

Skilling is one of the biggest challenges for the Indian automotive industry. According to a report by SIAM on the EV Talent Landscape in India, it is estimated that the country will need around 1 to 2 lakh skilled professionals—including engineers, scientists, and technicians—to achieve the 30% EV adoption target by 2030.

The report also highlights that 43% of EV-related technical competencies have minimal overlap with existing ICE skills, while 27% have a high overlap, meaning some reskilling is possible. Overall, India will need to develop 15,000 to 30,000 EV-ready professionals every year to meet this target.

At MathWorks, we have multiple initiatives to support both professionals and students in building EV-related skills. We even have a dedicated webpage titled Upskill for the Electric Vehicle Transition, which provides structured resources.

Our approach focuses not just on tool proficiency but also on core technology understanding. For example, we have video series on topics like motor control and battery management system development, as well as ready-to-use models that serve as starting points for engineers using MATLAB.

For hands-on learning, we offer free Onramp courses that anyone can access online to learn MATLAB and Simulink. In addition, we provide instructor-led training for deeper skill development.

MathWorks also places strong emphasis on industry-academia collaboration. We actively work with universities to co-develop EV-focused curricula and help bridge the skill gap—ensuring that the next generation of engineers is well-prepared for the electric mobility transition.

Visit MathWorks Website to learn more about simulation solutions for battery systems and BMS.

Also read: Hydrogen fuel cells: Clean energy for the transportation sector

Subscribe & Stay Informed

Subscribe today for free and stay on top of latest developments in EV domain.

Leave a Reply

EVreporter
error: Content is protected !!