EV Engineering & Infrastructure

  • News
  • Articles
  • Batteries
  • Charging
    • Wireless Charging
    • Vehicle-to-Grid (V2G)
  • Electrification
  • Testing and Safety
  • R&D
  • Learn
    • Learning Center
    • Tech Toolboxes
    • Webinars
  • Resources
    • Digital Editions
    • Diversity & Inclusion
  • Advertise
  • Subscribe

How can hardware-in-the-loop support EV drive application testing?

By Rakesh Kumar PhD | February 3, 2025

Hardware-in-the-loop (HIL) testing is a sophisticated real-time simulation technique used extensively in developing and validating power electronics systems. It lets engineers test embedded control systems without physical hardware — reducing risks, costs, and development time.

But why is HIL necessary in electric vehicle (EV) drive testing? Testing EV motors physically without HIL simulation presents several challenges and risks.

These include:

  • Safety
  • Cost and time
  • Limiting testing scenarios
  • Risk of component damage
  • Environmental and regulatory concerns

EV motors and the related power electronics operate at high voltages and currents, posing safety hazards, particularly for testing purposes. Building physical prototypes for testing is costly. Each design iteration typically requires new prototypes, which increases the overall development cost.

Ensuring compliance with various safety and performance standards through physical testing alone can be challenging and may require extensive documentation and validation efforts. Figure 1 shows ways HIL offers advantages over the physical testing of EV motors.

Figure 1. An illustration of the advantages of using HIL over physical testing of electric motor drives. (Image: Speedgoat – YouTube)

Let’s look at two case studies where HIL was used in different ways to test EV electric motors.

Case study 1: HIL for speed control 

A research study was conducted to develop and experimentally validate an intelligent neural network-enhanced model predictive controller (MPC) for improved speed control of hybrid electric vehicles (HEV) using a cost-effective HIL approach. 

A low-cost HIL system using an Arduino Mega 2560 and a PC experimentally tested the MPC-based artificial neural network (NNMPC) for controlling HEV speed in real time. 

The NNMPC controller was evaluated against other controllers, such as PI, classical MPC, and different ANN configurations, for HEV speed control. The research study’s outcome was that HIL was found to be reliable for studying the characteristics of electric drive applications for testing purposes. 

Figure 2 compares the simulation results and HIL results to observe the HEV’s speed response. The simulation and HIL results are extremely close.

Figure 2. The simulation results (above) and HIL results (below) comparison of speed response for HEVs based on Adaptive ANNs. (Image: MDPI)

Other performance parameters studied were transient response, steady-state error, and robustness, where HIL was on par with the simulation results.

Case study 2: HIL for motion control and state estimation  

A signal HIL model was implemented for electric vehicles that integrates a driving system and a vehicle model running in real-time on a dSPACE-DS1103 control card.

The research study included two test cases. The first is a straight run test, which assessed the performance of the accelerator and brake pedals in the longitudinal direction. The second is a cornering test that assessed the system’s response to periodic steering inputs.

The experiment has multiple outcomes for testing the driving system. With the help of modeling with the S-function, which is built in MATLAB, the extraction of state variables was found to be easy. 

This HIL system also ensured that different EV models could be used in the same setup with only minor changes due to changing motor drive specifications.

Figure 3 shows the complete hardware setup where the external physical devices were the steering wheel and brake pedal.

Figure 3. A dSPACE – DS1103 is used with physical components such as the steering wheel, brake pedal, and a host PC. (Image: Springer Open)

The MATLAB software was installed on the host computer to control and analyze the setup. The dSPACE—DS1103 was the core of the HIL setup, which is compatible with the MATLAB S-function.

Summary

HIL can be used in various ways for EV motor drive testing. A very common use is for controller testing and validation with embedded software. HIL is a good choice for fault injection and safety testing, where the stakes are low compared to physical testing.

However, HIL has also penetrated integration testing, where other vehicle testing, such as battery management systems and power electronics, are simultaneously tested. Therefore, HIL is a promising technology that will likely increase in scope the EV technology advances.

References

  • Hardware-in-the-loop testing for electric vehicle drive applications, Embedded
  • Low-Cost Hardware in the Loop for Intelligent Neural Predictive Control of Hybrid Electric Vehicle, MDPI
  • A signal hardware‑in‑the‑loop model for electric vehicles, Springer Open
  • Hardware-in-the-Loop Testing for Electric Vehicle Drive Applications, APEC, IEEE
  • The What, Where and Why  of Real-Time Simulation, OPAL-RT

Images

  • Figure 1, Speedgoat – YouTube
  • Figure 2, MDPI, Page 13, Figure 11-12
  • Figure 3, Springer Open, Page 7, Figure 7

You Might Also Like


Filed Under: FAQs, Testing and Safety
Tagged With: FAQ, hardwareintheloop, testing
 

Next Article

← Previous Article
Next Article →


 
“ee
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EV professionals.

Featured Contributions

  • What role do thermal interface materials (TIMs) play in EV battery systems?
  • How evolving demands are driving innovations in EV battery safety and materials
  • How large EV battery packs can be safely recycled without disassembly
  • Changing from traditional powertrains to electrified machines requires optimizing the hydraulic system components to reduce energy consumption and extend vehicle range. What factors impact electric vehicle system design?
  • How to safely detect minute physical Li-ion battery flaws
More Featured Contributions

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

Learning Center

EE Learning Center
Search Millions of Parts from Thousands of Suppliers.

Search Now!
design fast globle

Sponsored Content

  • Converting custom materials for EV applications
  • Advantech Powers Versatile Electric Vehicle Charging Systems

EV Training Days

ev
EV Engineering & Infrastructure
  • 5G Technology
  • Analog IC Tips
  • Battery Power Tips
  • Connector Tips
  • Design Fast
  • EDABoard Forums
  • Electro-Tech-Online Forums
  • Engineer’s Garage
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • Contact Us

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search EV Engineering & Infrastructure

  • News
  • Articles
  • Batteries
  • Charging
    • Wireless Charging
    • Vehicle-to-Grid (V2G)
  • Electrification
  • Testing and Safety
  • R&D
  • Learn
    • Learning Center
    • Tech Toolboxes
    • Webinars
  • Resources
    • Digital Editions
    • Diversity & Inclusion
  • Advertise
  • Subscribe
We use cookies to personalize content and ads, to provide social media features and to analyze our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services. You consent to our cookies if you continue to use this website.OkNoRead more