Hardware-In-the-Loop (HIL) for Electric Drive Applications
By Ravinder Venugopal
Over the last 20 years, Hardware-In-the-Loop (HIL) testing of Electronic Control Units (ECUs) has become an integral part of the embedded software verification and validation process. Specifically, ECU software is tested by running the actual controller with a real-time simulation of the system that it is designed to control, with actual signals exchanged between the ECU and the simulator. This technology is extensively used in the aerospace, automotive and rail transportation industries.
The benefits of using HIL testing are manifold: first, the ECU can be tested even before the actual plant that it will control (for example, an engine, motor or transmission) is built or available; second, the risk of damaging the plant is eliminated thus reducing cost and risk; third, fault conditions can easily be created; and fourth, the ECU can be tested with the plant running in off-design conditions. HIL testing has been very successfully used for testing mechanical systems which require system models to run at sample rates of around 1 KHz, significantly reducing ECU development and testing time. However, HIL systems for testing controllers for electric drives, which are being increasingly used in automobiles and aircraft, need to simulate much faster dynamics. Simulating these faster dynamics requires the development of high-performance hardware, software and models.
To ensure that the test simulation of an electric drive is accurate, high-fidelity motor models are required. While basic models are sufficient for testing control performance in nominal ranges, comprehensive testing for safety-critical transportation applications requires simulating complex nonlinear effects such as rotor asymmetry, back-Electro-Motive Force (EMF) harmonics, saturation effects and Insulated Gate Bipolar Transistor (IGBT) dead-time effects. Finite Element Analysis (FEA)-based motor models such as those developed by JMAG, Infolytica and ANSYS include these effects. As FEA simulations cannot be run in real-time at the time-steps required for accurate motor simulation (typically 1 µs or smaller), one solution to implement these models in real-time is to create current-to-inductance look-up tables based on FEA results. Furthermore, the controller should ensure safe operation and prevent over-current conditions when inverter faults occur. These faults need to be accurately simulated for HIL testing. Switching effects occur in the sub-microsecond range and in order to accurately simulate them, motor models need to be run on Field-Programmable Gate Arrays (FPGAs). Finally, the electric drives need to be integrated with simulations of other mechanical components such as transmissions, braking systems; and in the case of hybrid vehicles, internal combustion engines, which are typically simulated at time-steps of the order of 1 millisecond.
Another important area of research and development is in the design and implementation of Battery Management Systems (BMS). As the Boeing 787 Dreamliner incidents have highlighted, safe and effective management of lithium-ion (Li-ion) batteries in transportation applications is critical. At the highest level, the battery management system should ensure that dangerous conditions resulting in thermal runaway or explosions do not occur. At the next level, the BMS needs to ensure that the charging and discharging cycles are optimized for both vehicle range and battery life. BMSs also identify dead or weak cells and carry out pack balancing. As battery packs can be expensive and – in the case of Li-ion batteries – require careful testing, the use of HIL offers a safe and cost-effective way of testing BMSs.
A third area of research for hybrid vehicles is in the development of power-flow control algorithms to optimize vehicle range and fuel consumption. Balancing power distribution between different energy sources with varying power capacities and variable loads is always important as range extension is the primary goal in hybrid vehicle development. In addition, the potential for vehicle-to-grid power flow to stabilize power grids is another area of control system research.
In all these areas, the ability to run complex real-time models in time-steps ranging from the sub-microsecond level to the 10 millisecond level on a single platform is essential for HIL simulation. HIL technology has advanced to meet these requirements using commercial FPGAs and multi-core CPUs coupled with fast analog and digital interfaces. In addition to the hardware, efficient and accurate numerical solvers need to be integrated into the system. An example of a high-performance simulation platform that allows non-FPGA experts to implement complex power electronics models in real-time with FEA motor models is OPAL-RT’s eFPGAsim, which is coupled with its general purpose drive simulator, eDRIVEsim.
Ensuring the safe, efficient and reliable deployment of complex control systems for transportation drives, while meeting cost and development-time targets, is a challenge that consumes tremendous technical effort. HIL simulation provides a means of addressing this challenge while reducing costs and testing times.
Ravinder Venugopal is the director of advanced technologies at OPAL-RT Technologies Inc. His role is to develop the techno-business strategy of OPAL-RT in collaboration with its customers and partners. Dr. Venugopal holds a Ph. D. in aerospace engineering specializing in control systems from the University of Michigan, Ann Arbor, and master’s degrees in aerospace and electrical engineering. He holds three US patents and has published several technical articles on the development of control systems using real-time simulation, in fields ranging from sheet-metal stamping to smart grids. His focus in his 20 year career has been on the transition of research to practice.
About the Newsletter
TEC Call for Articles 2023 - Advances in Charging Systems
The TEC eNewsletter is now being indexed by Google Scholar and peer-reviewed articles are being submitted to IEEE Xplore.