Hardware-In-The-Loop Simulation, Testing

HIL simulation and testing is gaining new attention for embedded electronics in safety-critical markets.


Embedded electronics are showing up nearly everywhere these days, in cars, smart appliances, medical devices—even fighter jets.

Making sure those real-time embedded systems will work correctly is the aim of hardware-in-the-loop simulation and testing, which puts the systems through their paces in a virtual environment. In effect, HIL simulation adds a mathematical representation of all functional areas within a system. That system can be quite large, even to the point where it encompasses an entire plant or factory, but more recently the biggest application area involves the growing amount of electronic content within cars.

As autonomous vehicle technology advances, the components of self-driving will need to pass HIL simulation and testing to qualify as automotive-grade electronics. And while automotive is a leading application in HIL, the technology also can be applied to offshore and marine systems, power systems (such as large-scale electrical grids, power management units, static synchronous compensator devices, and supervisory control and data acquisition systems), radar systems, and robotics, especially the complex controllers used in robots.

HIL testing approaches fall into two general categories, open- and closed-loop. Open-loop methodologies provide a replay of model-generated or recorded-scenario data to the device under test without feedback signals from the DUT into the scenario behavior. That could include the functional test of driver-assistance systems, for example, or validation of time/position behavior of onboard units.

Closed-loop methodologies, in contrast, offer model-based simulation of the traffic and physical environment with feedback signals from the device under test to the simulation environment, such as validation of complex application behavior or functional testing in complex environments, including autonomous driving, multiple vehicle interaction, and platooning algorithms.

Doug Farrell, principal solutions marketing manager at National Instruments, notes the proliferation of electronic control units in automotive vehicles, now and in the future. “Software complexity is increasing and making its way into places that have previously not had software,” he says.

Automotive engineers are now challenged to test both multiple ECUs and software, according to Farrell. “For the people who have to do the testing, they’re coming from a world of just doing simple hardware functional test, who now have to deal with testing software that’s running on these systems, and they’ve never previously had to deal with that,” he says. “And that’s happening all over the car, as we’re seeing this transition to everything being controlled by software. The people who do have software and are familiar with software, the software they have to test has grown exponentially, and now interacting with different domain controllers throughout the vehicle. Your turn signal is no longer acting in isolation. It now has to communicate with your lane-departure warnings and things like that. The interoperability of all these systems is really adding complexity and causing a need for a lot more systems integration testing that never previously had to happen.”

To be sure, HIL is only one of a slew of tests that need to be applied to devices where safety is an issue.

“Safety-critical applications will require additional testing as we better understand the defect mechanisms,” said Anil Bhalla, senior manager at Astronics. “The industry is assuming this will work based on early trials. More trials on a broader scale will support the gradual roll-out of this new technology.  The economics of autonomous driving is motivating the entire semiconductor ecosystem to evolve during this transition.”

HIL is just one piece of the testing that is required. There also is built-in self-test, system-level test, in-circuit monitoring, automated test for chips, testing of software, as well as an increasing amount of pre- and post-production simulation to ensure that systems such as the AI logic in autonomous vehicles continue to work as expected.

Growing role for HIL
Still, HIL has a growing role here, which may seem surprising considering that hardware in the loop testing and simulation are not new concepts. They have been actively deployed for at least a couple of decades. What’s changing is the complexity of the systems being simulated and tested is growing, there is an increasing focus on divide-and-conquer approaches, and the devices being used to test them are shrinking in size.

“Workflow-wise, we’re seeing a move toward more desktop testers,” said Farrell. “If you look at the point of hardware-in-the-loop testing, it was really to test earlier in the design process rather than having to wait for physical systems to be compiled and assembled to go to a track test or a dynamometer test or whatever. You could test it much earlier in the design process where it’s a lot cheaper to fix software bugs. If you take that a step further, the idea would be to test on smaller components rather than larger components. This is the idea of desktop HIL, where you give every software developer their own small hardware-in-the-loop test system so they can run tests on just the code that they’re responsible for. It’s not even the entire ECU anymore, just whatever subsection of the ECU they’re responsible for. It’s a much smaller, much cheaper system, because it has to be a lot less capable for just testing small snippets of code. It’s just continuing the trend of pushing testing further up in the design process. That’s called desktop HIL, and it’s a big trend we’re seeing in the market now.”

FPGAs are being included in electronics testing, rather than a regular, full-blown processor, as well. This helps in checking for package spoofing and software fault insertion. It also helps with preventing these systems from becoming obsolete as systems change.

Keeping systems current is one of the reasons why there is a trend toward commercial off-the-shelf architectures in automotive electronics. “What’s happening now is that you’re running through an entire cycle of validation and going back to the beginning and making a change, then running through an entire cycle of validation and going back to the beginning and making a change—or you’re having validation and design happening concurrently,” Farrell says.

Customers are asking for systems that are flexible and nimble. There’s a significant trend toward software-defined COTS architecture, rather than closed-off, vendor-defined systems, Farrell asserts. “You can’t be locked into a system like that anymore,” he notes. “Aerospace is just as big, if not bigger, as automotive in hardware-in-the-loop testing.”

This is partly due to more government regulation in aerospace electronics. Building “iron birds” to model aircraft under development is the traditional way to test systems and subsystems.

White goods – smart refrigerators, washing machines, and other household appliances – also benefit from HIL simulation and testing.

More competitors
NI isn’t alone in this market. The Mathworks offers HIL simulation technology. Other HIL vendors include Eontronix, IPG Automotive GmbH, LHP Engineering Solutions, MicroNova AG, Modeling Tech, Opal-RT Technologies, Speedgoat GmbH, Typhoon HIL, and Wineman Technology.

Fig. 1: HIL simulation. Source: The Mathworks

Vector Informatik Gmbh has a foothold in this market, as well, with modular testing across complex systems.

Vector targets the automotive aerospace, education and research, commercial vehicles, as well as support for the medical and military/aerospace markets. The company’s HIL test grew out of its CANoe software tool for developing, testing, and analyzing entire ECU networks and stand-alone ECUs, says John Simion, product line director for network development tools at Vector in North America.

Vector’s technology is “primarily designed around the automotive market,” Simion says, with I/O characteristics, current levels, and voltage levels. “We have similar-type requirements in the other aerospace/military and medical fields that allows us to expand out to support those customers that are utilizing our tools. But typically, it’s more a system-level test. You’re really testing the application and the code that’s running on that hardware. When I send a message to turn on a headlight, I want to make sure that the module responds correctly, but I also want to verify that the module generates a voltage or a signal that I’m expecting, a physical signal, so I can utilize the I/O characteristics on the boards themselves, to verify not only that the communication was correct, but the module is acting physically as I would expect it to.”

Vector primarily competes with dSPACE and ETAS in HIL, according to Simion. ETAS GmbH is a wholly owned subsidiary of the Bosch Group.

The company is dealing with the automotive industry transition to new communication protocols, such as CAN FD and Ethernet. There is a “continual quest” by Vector to provide easier set-up of its products, Simion notes. “Everybody wants the easy button.”

Hardware-in-the-loop simulation and testing can help improve quality control for safety-critical applications in automotive, medical, and military/aerospace electronics. There are a limited number of HIL vendors, and some are going through product and technology transitions. But it appears likely that those best able to meet customer requirements will find an increasing opportunity in the future as the complexity of these systems continues to grow.

Leave a Reply

(Note: This name will be displayed publicly)