Battery electric trucks are driving a fundamental transformation in commercial vehicle development. Increasing system complexity, high energy densities, and stringent safety requirements make robust battery management system (BMS) validation a decisive factor for the success of vehicle programs.

Meeting the Challenges of Electrified Commercial Vehicles

At Volvo, these challenges are addressed through a hardware-in-the-loop (HIL) virtual validation approach that enables comprehensive testing of battery management systems (BMS) and hybrid propulsion control units (HPCU) at an early stage of development. Shifting essential validation activities into a virtual environment allows control software to be evaluated under realistic and fault-critical conditions long before physical battery systems are available. This approach reduces development risk, improves software maturity, and accelerates innovation in battery electric truck platforms.

From accurate cell voltage emulation to fault injection: Volvo uses a complete real-time environment for BMS validation.

Realistic HIL Test Scenarios for Battery Systems

The project focuses on a comprehensive, HIL-based test environment specifically designed for battery electric trucks. Within this environment, BMS and HPCU controllers operate in real time against high‑fidelity battery and vehicle simulation models. Battery cell behavior, shunt-based pack current measurement, electrical and thermal dynamics, and vehicle communication via CAN are faithfully reproduced.

Project Objectives and Validation Strategy

The primary objective of the project is to ensure the safe, robust, and reliable operation of the BMS across a wide range of operating conditions. Particular attention is given to complex multipack battery configurations at the energy storage system level, accurate state‑of‑charge and state‑of‑health estimation, reliable fault detection and protection mechanisms, and correct cell balancing behavior.

Relying on virtual validation instead of extensive physical battery testing allows the development team to shorten development cycles, reduce overall testing effort, and increase test coverage significantly. Early identification of software and integration issues is central to achieving these objectives.
 

Technical Challenges in BMS and HPCU Validation

Developing a realistic, real‑time‑capable HIL environment for battery systems involves several technical challenges. One of the most demanding tasks is the accurate emulation of battery cell voltage and temperature measurement circuitry, combined with reliable daisy‑chain communication between battery monitoring units. High‑fidelity electrical and thermal battery modeling, as well as precise pack current emulation, are equally critical.

Additional challenges arise from the need to maintain deterministic real‑time performance despite complex models, to synchronize simulation models with physical controllers, and to manage extensive CAN communication and signal mapping. The ability to safely inject faults without risking damage to hardware components and to switch between different battery types within a single test environment further increases system complexity.

How dSPACE Solutions Enable Robust HIL Testing

How dSPACE Solutions Enable Robust HIL Testing

These challenges are addressed by using the dSPACE SCALEXIO real-time platform in combination with an integrated dSPACE software tool chain. Optimized battery models based on the ASM modeling approach achieve the required balance between model fidelity and real-time capability. Cell voltages are emulated with production-relevant accuracy and resolution, enabling realistic interaction with BMS measurement hardware.

Deterministic real‑time execution ensures stable timing and reliable synchronization between the simulation and control units. Seamless integration with MATLAB and Simulink supports efficient model development and deployment, while scalable CAN interfacing allows complex communication topologies to be implemented. Built‑in fault injection mechanisms enable systematic validation of fault handling at cell, relay, and communication levels. In addition, the ModelDesk environment supports run-time switching between different battery types, increasing flexibility and reuse of the test setup.

Model-Based Development and Test Methodology

The project follows a modern model‑based development approach. Virtual fault injection testing is used extensively to verify system robustness, while automated regression testing ensures consistent behavior across software iterations. This structured methodology enables early error detection and significantly reduces integration risks later in the development process.

Comprehensive Test Coverage from Component to System Level

A broad range of test cases is executed across multiple integration levels, covering both battery system validation and combined battery and main controller testing. These tests include multipack configurations, charge and discharge operation, voltage and current protection, state-of-charge (SOC) and state-of-health (SOH) accuracy, thermal monitoring and runaway detection, communication loss handling, hardware fault injection at the analog front end, and controlled startup and shutdown behavior. This comprehensive approach ensures reliable system performance under both normal and extreme operating conditions.

Team Experience and Future Outlook

The project is carried out by a team of eight to ten engineers who specialize in HIL system integration and testing. Looking ahead, the team plans to expand test coverage to rare edge cases, improve battery and vehicle model fidelity, incorporate additional vehicle‑level simulations, and increase automation with CI/CD pipelines. The scalable HIL infrastructure provides a strong foundation for continuous improvement and future battery system development.

Short Interview with Ranjithh Raj Ram Prakash, Expert System Verification Engineering, Team Leader, Volvo

Why is hardware‑in‑the‑loop testing especially important for battery electric trucks?
Hardware‑in‑the‑Loop testing enables realistic validation of battery management systems under real‑time and fault‑critical conditions before physical battery systems are available. This significantly reduces development risk while accelerating software maturity and innovation.

What are the main advantages of virtual validation for BMS development?
Virtual validation allows extensive test coverage, safe fault injection, and early verification of complex battery architectures. It shortens development cycles, reduces dependence on physical prototypes, and improves overall system robustness.

How does HIL‑based testing contribute to battery safety and reliability?
HIL testing enables systematic validation of SOC and SOH estimation, protection mechanisms, fault handling, and communication behavior under both normal and extreme conditions, which is essential for ensuring safe battery operation.

Which validation challenges are best addressed through HIL testing?
HIL testing is particularly effective for validating complex multipack architectures, real‑time measurement behavior, deterministic execution, and fault scenarios that are difficult or unsafe to reproduce on physical battery systems.

How do scalable HIL platforms support future battery technologies?
Scalable HIL platforms allow flexible model updates, seamless integration of new battery types, extensive automation, and connection to CI/CD pipelines, enabling continuous improvement and long‑term support for evolving electrification technologies.
 

Courtesy of Volvo

dSPACE MAGAZINE, PUBLISHED SEPTEMBER 2026

This article was written in close collaboration with Ranjithh Raj Ram Prakash

Ranjithh Raj Ram Prakash

Ranjithh Raj Ram Prakash

Expert System Verification Engineering, Team Leader, Volvo

Stay up-to-date with our dSPACE direct newsletter service.

With our dSPACE newsletter service, we will keep you informed about current use cases and new solutions and products, as well as trainings and events. Sign up here for a free subscription.

Enable form call

At this point, an input form from Click Dimensions is integrated. This enables us to process your newsletter subscription. The form is currently hidden due to your privacy settings for our website.

External input form

By activating the input form, you consent to personal data being transmitted to Click Dimensions within the EU, in the USA, Canada or Australia. More on this in our privacy policy.