# Power Hardware and Driver-in-the-Loop for Battery Testing applied to Electrified Vehicles

Florian Tournez, Walter Lhomme, Alain Bouscayrol, Ronan German, Betty

Lemaire-Semail, Aurélien Lièvre, Mariam Sanchez-Torres

► To cite this version:

Florian Tournez, Walter Lhomme, Alain Bouscayrol, Ronan German, Betty Lemaire-Semail, et al. Power Hardware and Driver-in-the-Loop for Battery Testing applied to Electrified Vehicles. The 26th European Conference on Power Electronics and Applications, GDR SEEDS France & EPE Association, Mar 2025, Paris, France. 10.34746/epe2025-0335. hal-05071144

HAL Id: hal-05071144

https://utc.hal.science/hal-05071144v1

Submitted on 16 May 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Power Hardware and Driver-in-the-Loop for Battery Testing applied to Electrified Vehicles

Florian Tournez¹, ID, Walter Lhomme¹, Alain Bouscayrol¹, Ronan German¹,
Betty Lemaire-Semail¹, Aurélien Lièvre², Mariam Sanchez-Torres²

¹UNIV. LILLE, ARTS ET METIERS INSTITUTE OF TECHNOLOGY, CENTRALE LILLE,
JUNIA, ULR 2697 - L2EP
F-59000 Lille, France.

E-mail: florian.tournez@univ-lille.fr

²VALEO EQUIPEMENTS ELECTRIQUES MOTEUR
2 rue André Boulle, Créteil F-94017 Cedex, France.

## Acknowledgements

This work has been achieved within the frame of the EE40 (Electrical Energy 4.0) and PANDA projects. EE4.0 is co-financed by European Union with the financial support of the European Regional Development Fund (ERDF), the French state, and the French Region of Hauts-de-France. PANDA was financed by the European Union's Horizon 2020 research and innovation program me under grant agreement no. 824256 (PANDA).

The results were obtained on the scientific "electricity & Vehicles" (eV) platform at the L2EP - Laboratory of Electrical Engineering and Power Electronics, F-59000 Lille, France.

## Keywords

«Battery», «Electric vehicle», «Hardware-in-the-Loop», «Energetic Macroscopic Representation», «Driver concepts»

## Abstract

This paper presents a unified approach to include a driver and a power subsystem in a testing simulation loop. The aim is to create a kind of lab-based vehicle offering an alternative to the Vehicle-in-the-Loop (ViL) approach or vehicle prototype for battery testing. This lab-based vehicle is built around experimental test benches and a driving simulator to reproduce a vehicle in laboratory. A unified approach is used to easily identify inputs and outputs between the model vehicle and the emulation interfaces. The unified approach is based on the Energetic Macroscopic Representation

(EMR) formalism. A Power Hardware-in-the-Loop (P-HiL) simulation is introduced for battery testing. Furthermore, standalone battery testing is extended to include a Driver in the Loop (DiL). A case study based on a retrofitted Plug-in Hybrid Electric Vehicle (P-HEV) is presented with experimental results.

## Introduction

Nowadays, several approaches are used to integrate the human into a simulation loop to test vehicle power subsystems. A classic method consists in recording data based on vehicle prototype during track driving cycles [1]. These data are compared to the simulation results for models validation. The main problem lies in the inability to manage the external conditions such as the vehicle environment, the traffic or the external temperature, which can impact the behavior of the subsystems and the drivers.

To solve this problem, the vehicle external environment must be precisely controlled. However, the many influencing factors make assessment difficult. Testing the vehicle on a dynamometer test bench could be a solution to remedy to this problem. This method provides a fictive external environment and a more accurate assessment of the power subsystem. It is particularly useful for testing in conditions complicated to replicate. Nevertheless, a dynamometer test bench is not suitable for involving a driver impact during testing [2]. Drivers are often replaced by robotized systems to simulate driver actions with a harmonized cycle [3]. In order
to include the driver impact, an alternative
solution is to use a hubbed test bench coupled with
an immersive 3D environment [4]. The hubbed test
bench offers the possibility to rotate the wheel
during testing, unlike the dynamometer bench. This
test bench concept links the vehicle wheel to the
load machines [5]. Therefore, it offers high
flexibility in controlling the external environment
thanks to programmed scenarios [4]. Though, it
requires the development of advanced prototypes,
which are generally costly with limited flexibility
to change components. Furthermore, the changes of
components or subsystems on the prototype
vehicles can be cumbersome and time consuming.
Nowadays, it is important to test vehicle
subsystems quickly to speed up the introduction of
electrified vehicles into the automotive market. Due
to their constant improvement, batteries need to be
tested efficiently and accurately. Experimental tests
must cover various conditions to validate their
performances, including factors like aging,
chemistry and temperature [6]. For the
dynamometer and the hubbed test benches, the
main issue is the vehicle itself, which limits fast
development.

Compared to existing methods, this paper proposes
an alternative approach which consists of
combining Power Hardware-in-the-Loop [7] and
Driver-in-the-Loop simulation for battery testing to
reduce development time. The key innovation is the
integration of experimental test benches with a
driving simulator using a unified approach. It
enables to get as close as possible to the real vehicle
while keeping flexibility in testing, problem
identification and resolution. In this way it avoids
to design complex prototypes for testing
subsystems or components. Furthermore, DiL
testing makes it possible to directly study the
stresses on the battery when driving the vehicle.
Meanwhile, programmed 3D external environment
is mandatory to immerse the human in the
simulation loop compared to classical
dynamometer and hubbed test benches. In the
phases of development, DiL is an intermediary step
between HiL and ViL, like represented in Fig.1 [8].
It can be noticed that DiL principles already exist in
the literature, but they are mainly focused on
internal combustion engine applications [9].

The paper objective is to couple DiL and P-HiL to
test a battery using a real driver. The paper is
divided into two main parts. The first part is about

the unified framework from Power Hardware-in-the-Loop to Driver-in-the-Loop for battery testing. The second part focuses on a case study of a retrofitted Plug-in Hybrid Electric Vehicle along with initial results and a discussion on DiL.

<figure><img src="image_2.png" /><figcaption>Fig. 1: Test accuracy VS development stage
modified from [8].</figcaption></figure>

P-HiL and DiL organization

P-HiL for battery testing

P-HiL aims to make the tested subsystem believe it
is operating within the real system. Therefore, an
emulation interface is required [7]. The nature of
the emulation interface depends directly on the
subsystem under test. Here, the battery is
considered as a voltage source. This imposes the
emulation interface to be considered as a
bidirectional controlled current source. The
emulation interface therefore needs to be controlled
via a current reference from the virtual model
simulated in real-time (real-time emulation). The
approach is most commonly used to reproduce the
human behavior, which is in this case, a controller
based on a prerecorded velocity cycle. As an
example, the organization of the P-HiL is presented
in Fig.2 for battery testing (also available for
module and cell).

The challenge is to correctly define the inputs and
outputs between the virtual model and the
emulation interface. Here, the battery is tested
subsystem. The emulation interface is composed of
a controlled current source. The vehicle traction
model with environment is simulated in real-time.
As the vehicle velocity is obtained from the real-
time model.
<figure><img src="image_3.png" /><figcaption>Fig. 2: Battery testing using P-HiL.</figcaption></figure>

## DiL for battery testing

The P-HiL is extended to include a human in the simulation loop. The aim is to easily introduce the influence of the driver behavior during battery testing. It avoids the development of advanced controller trying to reproduce human behavior. As every human being is unique, it is challenging to create driver models. The human driver is included by using a driving simulator (emulation interface). The driving simulator is equipped with emulation interfaces to provide users with a realistic vehicle experience. The principles of emulation interfaces are as follows:

* **Cockpit interface:** a real driving cockpit with acceleration/brake pedal, gearbox lever and car seat.

* **Kinesthetic interface:** a steering wheel including force feedback to reproduce driving sensations (generally included in cockpit interface).

* **Motion interface:** a motion platform with 6 degrees of freedom is the best option to satisfy the driver. It reproduces the effects of acceleration/deceleration, cornering and road roughness.

* **Visual interface:** a high resolution and enough large to cover a field of vision of around 160°.

* **Sound interface:** a sound system installed around the cockpit to reproduce the sound effects of the environment, vehicles, etc.

* **Acoustic vibration interface:** vibration transducers are incorporated at different levels on the cockpit to reproduce the various vibrations encountered while driving, based on acoustic signals.

The behavior of the emulation interfaces depends on the 3D environment where the human driver interacts during the sessions. This 3D environment

is managed and generated by specific software, generally from the driving simulator. Typically, all driving interfaces are provided with the driving simulator. The 3D environment part interacts directly with the virtual vehicle model running in real-time. The degree of integration between them depends on the software used and the granularity of the virtual model. It is important to note that the 3D environment replaces part of the virtual environment of the standalone P-HiL model. Through the software simulation, it is possible to gather the necessary variables to send into the vehicle control. The integration of the human requires adjustments to vehicle control compared to standalone P-HiL. In this case, the reference is no longer fixed by cycle setpoint, but by the human through the driving simulator.

## EMR-based P-HiL testing

A challenge is to clearly define the inputs and outputs between the emulation interfaces, the virtual model and the subsystem under test, ensuring natural interconnection. An effective way to simplify this is to adopt a unified method. This method harmonizes all the models across different software platforms for an easy models and real subsystems interconnection, trough well-defined testing interfaces. A frequent harmonization method is the Functional Mock-up Interface (FMI). FMI is a free standard for exchanging dynamic simulation models via XML files, binaries, and C code packaged in a ZIP file. Supported by over 200 tools, some FMI solutions are capitalized by the Modelica Association [10]. FMI provides a standardized interface that enables the coupling of models from different software tools, facilitating co-simulation across diverse platforms [11]. However, FMI has notable limitations. The main drawback is its low support for discrete-event simulations, real-time applications with highly dynamics and the use of specific solvers sometimes leads to real-time issues [12]. Moreover, it does not help to organize models and identify clearly inputs/outputs variables.

The European PANDA project [14] proposed a unified approach based on the Energetic Macroscopic Representation (EMR) formalism [15]. EMR is a graphical formalism used to describe energetic systems, such as electrified vehicles, by linking elements through action and reaction
variables to represent causality-based energy exchanges [15]. A relevant advantage of EMR is the integral causality, which defined the inputs and outputs of the model in physical causality, enabling simple solvers with low computing resources to be used for real-time applications. The PANDA method has been validated and demonstrated through three different electrified vehicles: a fuel cell vehicle, a hybrid vehicle and a battery electric vehicle [16]. It is an effective way to organize the unification of vehicle models and the various interfaces identification to couple Power Hardware-in-the-Loop and Driver-in-the-Loop simulation.

# Application to a P-HEV

## Studied vehicle

The reference vehicle is a Peugeot 308 SW, a standard passenger vehicle available on the automotive market from Stellantis manufacturer. The vehicle was retrofitted into P0-P4 parallel Plug-in Hybrid Electric Vehicle, using a low-voltage hybridization system of 48V (Fig.3). A low-voltage hybridization system has been added to recover braking energy and reduce fuel consumption [15]. Testing battery before final integration would be useful to observe its performance in the retrofitted case.

<figure><img src="image_4.png" /><figcaption>Fig. 3: Architecture of the studied P-HEV.</figcaption></figure>

The EMR and control of the P-HEV is not detailed in this paper. However, all details about the modeling, control and Energy Management Strategies (EMS) are given in the following publications [17] – [18]. The EMR formalism uses four main symbols: source elements, accumulation elements, conversion elements and coupling elements (see appendix: table II). Blue pictograms are used for the control organization. The EMR and

control of the vehicle is shown in Fig.4. The battery, the internal combustion engine, the mechanical brakes and the road are energy sources (green ovals). The electric drives are multi-domain energy conversion elements (orange circles). The gearboxes and the wheels are mono-domain energy conversion elements (orange squares). The chassis in an energy accumulation element (orange crossed rectangle). Coupling elements (orange overlapped squares) are used to distribute energy within the vehicle propulsion system. The EMR is inverted to obtain an inversion-based control structure [14]: closed-loop control for accumulation elements, direct inversion for conversion elements and distribution inputs for coupling elements. The distribution inputs are computed by EMS.

# Application to the DiL

The characteristics of the battery module are given in Table I. This is typically the high-power type (15 C) of battery used in plug-in hybrid vehicles for low-voltage hybridization. Sixteen K-type thermocouples were installed on the battery at various strategic points to monitor temperature during the tests. The thermocouples are connected directly to an acquisition card installed on the real-time platform. The battery is installed on a test bench with all hardware and software safety measures in place in case of any issues. If tests at specific temperatures are required, the battery is placed in a climatic chamber allowing the application of temperatures ranging from -20 to 80 degrees Celsius. In this way, we have a flexible setup to test different batteries in varied and precise contexts.

<table><caption>Table 1: Main characteristics of the battery</caption><thead><tr><th colspan="2">Main characteristics</th></tr></thead><tbody><tr><td>Chemistry</td><td>NMC</td></tr><tr><td>Nominal voltage (V)</td><td>54.6</td></tr><tr><td>Maximum Voltage (EOCV V)</td><td>63</td></tr><tr><td>Minimal voltage (EOD V)</td><td>45</td></tr><tr><td>Capacity (Ah)</td><td>80</td></tr><tr><td>Weight (kg)</td><td>46</td></tr></tbody></table>
<figure><img src="image_5.png" /><figcaption>Fig. 4: EMR and control of the studied vehicle.</figcaption></figure>

For a retrofitted vehicle, it is relevant to test the battery with a human in the testing loop. The behavior of the vehicle must match the original then the human driver experience is essential in this case. Furthermore, the constraints related to the modernization context limit the possible adjustments in energy management, making human feedback essential to approximate the behavior of a conventional vehicle. A dynamic power adaptation is required between the real battery and the emulation interface, as only one of the two modules is tested (2 in parallel). The organization of the DiL battery testing is given in Fig.7. A reduced-scale P-HIL setup is implemented to satisfy this physical limitation. The model of the vehicle is implemented into a real-time platform Typhoon HiL. The battery

module model is replaced by the real battery and connected to the emulation interface. The emulation interface is a bidirectional DC load source (Cinergia - Fig.5). The virtual model gives the current reference to the emulation interface. The battery voltage is measured and sent to the real-time model to close the loop. Different real-time platforms could be used, such as dSPACE, provided that the EMR library is integrated (software library). Inclusion of the human driver in the testing loop requires modification of the virtual real-time model. The velocity controller traditionally used to represent the human driver, is replaced by an estimator which defines a reference force deduced from the position pedal for the control of the vehicle.
<figure><img src="image_6.png" /><figcaption>Fig. 5: Power part of the DiL.</figcaption></figure>

Subsequently, the velocity simulated in the real-time model is retrieved and displayed on the driving simulator. In this way, the human driver can adjust his/her velocity using the accelerator and brake pedals through the cockpit interface (Fig.6). It is also possible to retrieve the position of the different knobs like HVAC system, turn signal etc. A sensible part is to define all variables and required for the vehicle ground link.

<figure><img src="image_7.png" /><figcaption>Fig. 6: Cockpit of the driving simulator of the DiL.</figcaption></figure>

The level of precision depends on the 3D environment software used and the model granularity. To simplify this phase, the vehicle chassis is simulated directly using SCANeR software. With this manufacturer software, all connections between the chassis and the ground link are automatically generated. The UDP communication protocol is used to exchange the data needed between the virtual model part and the

chassis under SCANeR. The main variables are the torque and wheel speed. In this context, a unified approach is very useful for the coupling. During driving session, all emulation interfaces of the simulator are working. They are set up with the SCANeR software based on the reference vehicle. Various scenarios could be implemented with control over environmental factors such as traffic, weather conditions and the behavior of other drivers. This capability enables identical scenarios to be reproduced, providing consistent test conditions compared with unpredictable road tests. As a result, different drivers are evaluated on the driving simulator under identical conditions. It is therefore possible to analyze several factors such as the influence of drive behavior on battery performance.

## Experimental Results

The results of the DiL are presented in this section (Fig.8). The cockpit interface of the driving simulator has been set up beforehand, enabling the human to drive through the cockpit interface. Here, the driver tries to track the WLTC cycle reference velocity on a straight line in a 3D environment. This first approach on a straight line provides a point of reference to compare with P-HiL simulation, which is not presented in the paper. Fig.8.a and b illustrate the positions of the acceleration pedal and brake from the cockpit interface and are directly sent to the control of the vehicle. Fig.8.c shows the reference and measured velocity. It is possible to see that the driver is able to track the velocity by acting on the pedals. Fig.8.d shows the fuel consumption of P-HEV influenced by the energy management. The fuel consumption is minimal as the P-HEV operates almost all the time in electric mode. Fig.8.e shows the reference current and the current measured on the battery module (zoom available on the Fig.8.g). Fig.8.f illustrates the voltage of the battery. Fig.8.h traces the evolution of the battery temperature with an initial temperature of 20°C to a final value of around 22°C. This low self-heating is linked to the high power characteristics of the battery (Table I). Finally, Fig.8.i illustrates the evolution of the state of charge (SoC) of the battery during the driving session. During this scenario, the behavior of the battery module remains within its nominal characteristics, allowing its performance to be validated in this experimental test.
<figure><img src="image_8.png" /><figcaption>Fig. 7: DiL and P-HiL organization.</figcaption></figure>

## Discussions

The tests carried out on this experimental test did not demonstrate the ability of the simulator to immerse the driver in real-life driving conditions, hence WLTC cycle tracking. A related perspective is to validate the various remaining emulation interfaces of the driving simulator, namely: visual, sound, kinesthetic, vibratory acoustic and motion interfaces. It is not easy to validate these interfaces independently, as they are closely interconnected to each other.

So, even if the aim is to validate a single interface, it is necessary to obtain the presence of the other interfaces to immerse the driver as fully as possible in the driving session. Therefore, it becomes essential to define specific scenarios that highlight the interface to be validated, while minimizing as much as possible the effects of other interfaces. By adopting this approach, it becomes possible to single out the interface that needs to be validated. A reference point is essential to validate the emulation interface. This interface is typically based on the prototype vehicle or its real equivalent virtual model. This allows the comparison of the results obtained in specific cases and scenarios.

A second important point is the flexibility of the framework implemented for DiL. This topology allows to test different kinds of batteries by just replacing them, while using the same measurement points and the same interface. The cockpit interface is also designed to be generic, allowing any other driver to be tested on the simulator without any modifications. In addition, the model of the vehicle could be easily replaced by another model, while retaining interfaces without modifications. In this context, driver behavior can play an important role in the design and use of batteries. It can directly influence the wear and energy efficiency of the batteries. To maximize battery lifespan, integrating the driver into the simulation loop can enable the incorporation of smarter battery management systems (BMS) capable of adapting to the driver habits. Other key topics, such as vehicle energy management or control of subsystems affecting the battery, should also be adapted and improved. Furthermore, the unified approach through EMR formalism is helpful for the development phases of the different models. Additionally to the batteries, other subsystems can also be tested such as, electric drives, internal combustion engines and heating systems.
<figure><img src="image_9.png" /><figcaption>Fig. 8: DiL and P-HiL results (battery testing).</figcaption></figure>

These types of models require diverse skills and knowledge, as well as the use of different software tools. It is then important to establish a unified method that facilitates the future coupling of these models, aiming to approach a fully functional lab-based vehicle. Using EMR formalism, the complexity of the coupling between the numerous models appears clearly when it comes to the exchange of the different variables. Additionally, the virtual model can be updated quickly on different aspects as control and EMS. Test benches can also be designed in a flexible way for quick replacement of the subsystems under test. Beyond the unified framework methodology aspect, the test demonstrates that it is possible to reproduce a lab-based vehicle.

## Conclusion

This paper has demonstrated that it is possible to couple power subsystems with a human driver into the testing loop (DiL). EMR allows to reduce the cumbersome setting up the DiL experimentation. The lab-based vehicle offers potential advantages in terms of reducing time development of electrified vehicles, while offering lower overall costs compared to conventional methods involving hubbed/dynamometer test benches or vehicle prototypes requiring on-road testing. The main advantages are flexibility, quick changeovers, and efficient adaptation for potential problems solving while avoiding vehicle prototyping. EMR allows a clear definition of various interfaces between the emulation interface and the real-time model. Thanks to this unified approach through the EMR
<table><caption>Table II: Appendix</caption><tr><td>EMS</td><td>Energy management Strategy</td></tr><tr><td></td><td>Source of Energy</td></tr><tr><td></td><td>Accumulation Element (yellow)<br>And the corresponding closed-loop control<br>(blue)</td></tr><tr><td></td><td>Mono and Multi physical converters (yellow)<br>And the corresponding open-loop control<br>(blue)</td></tr><tr><td></td><td>Mono and Multi physical coupling<br>device (yellow)<br>And the corresponding open-loop control<br>(blue)</td></tr></table>