Rapid Validation of Battery Management System with a Dymola Hardware-in-the-Loop Simulation Energy Storage Test Bench

The paper presents a concept and an implementation of a hardware-in-the-loop (HIL) energy storage test bench. This system permits to simulate energy management strategies or battery models in real time in combination with a real energy storage system. A vehicle behavior is simulated on computer, such as longitudinal dynamics, internal combusting engine (IEC), electric motors etc. and a software interface to a Data Acquisition Card (DAQ) provides real signal inputs and outputs from the simulation environment. The presented HIL system is an adequate platform for the verification and validation of battery models, thermal management models or battery management models.


INTRODUCTION
Hardware-in-the-loop (HIL) is the integration of real components and system models in a common simulation environment.In this simulation environment some parts of a system are virtual and other parts are real.HIL allows function tests of electric or mechanic systems or components of such systems under simulated real conditions.Therefore HIL helps to save cost and time compared to conventional test runs on a real prototype.A HIL simulation environment helps also to verify and validate implemented models.
A HIL energy storage test bench can be used in a large range of applications and is helpful for: Testing energy storage systems, for example batteries, ultra capacitors or fuel cells Verification and validation of simulation models, such as battery models or thermal models Testing battery management systems and thermal management systems Typical test cases are for example simulations of drive cycle like the Federal Test Procedure (FTP) or the New European Drive Cycle (NEDC).
In this paper a HIL simulation of a four wheel drive Hybrid Electric Vehicle is presented.This simulation integrates the longitudinal simulation of the HEV, the simulation of electric components and the Battery Management System (BMS) with a real Lithium-Ion battery in a common environment.The HIL simulation results, a part computed on an inexpensive Windows PC platform and a part measured on the HIL test bench, are shown for a full NEDC drive cycle.

HYBRID ELECTRIC VEHICLE SIMULATION IN DYMOLA/MODELICA
Dymola, Dynamic Modelling Laboratory, is a tool for modelling and simulation of complex physical systems [1].Dymola is a simulation environment for Modelica, which is an open object-oriented simulation language for the simulation of dynamic behaviour and complex interactions between systems of many engineering fields.Basic ready-to-use models for Dymola already exist in the Modelica standard library.This standard library was extended and improved by further libraries developed by Arsenal Research.Such libraries are for example the SmartElectricDrives Library (SED), which includes all components necessary to simulate a modern electric drive system or the SmartPowerTrains Library, which is a library for longitudinal dynamics simulation of vehicles [2], [3].Using both libraries together enables the user to model a hybrid electric vehicle as a single unit.Various concepts of hybrid electric drive trains can be modelled and suitable control strategies or energy management systems can be easily tested in Dymola.

THE SMARTELECTRICDRIVES LIBRARY
The SED library is a tool for simulating and tuning of electric drives in complex electromechanical systems.This library is specifically designed for simulations of electric drive systems with a Modelica development platform.Main components of the SED library are: drives, converter, sources, loads and controllers.Besides the variety of these elementary components for the simulation of electric drives the SED library also contains powerful ready-to-use models.These drive models include all features and characteristics of full modern electric drives in only one single component.Furthermore, the SED library facilitates simulations on different levels of abstraction.

THE HIL SIMULATION ENERGY STORGE TEST BENCH
The hardware in the loop simulation environment presented in this paper is a very cost efficient system because it is based on a normal Windows PC platform.This system does not need an expensive true real-time platform.
The communication between simulations PC and the energy storage test bench is realized by analoge inputs and outputs card.By using a commercial data acquisition card this interfaces are available for each Windows PC.
For a HIL system it is important that the simulation tool can communicate with the interface card.In the provided system this problem was solved by a C-coded software interface for Dymola.By using the DAQmx functions from National Instruments the simulation tool can directly communicate with the interface card.It is also important that the simulation is processed in real-time and that there is synchronization between the real-time and the digital simulation-time in the simulation tool.With the provided system sample rates up to 30 Hz can be realized, depending on simulation model complexity and available CPU performance.
The main components of the energy storage test bench are a stack of electronic high power supplies and a stack of high power electronic loads.The stack of power supplies are the source for electric power and the electronic loads are the sink for the electric power.Different control modes are possible, for example constant voltage, constant current, constant power and also constant resistance for the electronic load.
Main technical data of the proposed energy storage test bench are: Voltage: 0V-480V Current: 600A charge and 750A discharge Peak Power: 96 kW

APPLICATION EXAMPLE: BATTERY MANAGEMENT SYSTEM SIMULATION IN MODELICA WITH A REAL LI-ION BATTERY
The functional diagram for this HIL simulation example is shown in Figure 1.In example the hybrid electric vehicle model calculates the loads for the real battery.During the simulation the instantaneous real battery conditions (Voltage, Current and Temperatures) are considered by Dymola.The electric drives are modelled using the SmartElectricDrives library and all mechanic components are modelled using the SmartPowerTrain library.On this Dymola HIL simulation a real Lithium-Ion Battery is connected by the energy storage test bench.The following results show the simulated test run of a New European Drive Cycle (NEDC) on an electric four wheel drive HEV.In Figure 2 is shown the velocity of the vehicle in Meters per Second for such a test cycle.In Figure 3 is shown the current demand for the electric drives and reciprocally for the real battery stacks.As convention, with a current demand in positive direction the real battery is charged by the power supply and with a negative demand the battery is discharged by the electronic load.
In Figure 4 the measured voltage of one real Li-Ion cell is shown and in Figure 5 the calculated voltage of a full battery stack with 96 serial single cells is shown.With such a HIL simulation it is possible to validate the simulation model and the parameter of a battery model, e.g. is possible to match the models resistance or thermal parameter with the correct real parameter.

206
ISSN 2032-6653 does not need an expensive real-time PC; it is based on a normal Windows PC and a communication interface card for inputs and outputs.The implementation of the Dymola Real Time interface employed less then 8 man-month labours.On this system complex models can be simulated with an in-/output sample rate up to 30 Hz.With this HIL energy storage test bench particularly long-time simulations can be executed, for example drive cycles test of energy storage systems or verifications of battery models can be done.Finally, as application example the simulation of a on a virtual electric four wheel drive HEV in combination with a real Li-Ion battery was shown.The HIL simulation of a full NEDC cycle for testing the battery management system of this battery stack was shown.

Fig. 1
Fig. 1 Functional overview of HIL simulation of a HEV with a real battery