Design Article
HIL simulation boosts automotive design efficiency
Chris Washington, National Instruments
5/9/2007 12:41 PM EDT

The techniques and tools that engineers use to develop automobiles have evolved as well. A result of this evolution, Hardware-in-the-Loop (HIL) simulation is a test technique that helps reduce development cost and increase the quality of a vehicle. Here we will examine the what, how, and why of HIL simulation and provide guidance on considerations that should be made when selecting a HIL system.
What is HIL simulation?
HIL simulation is a dynamic test technique that simulates the I/O behavior of a physical system that interfaces to an ECU in real-time. It is dynamic because the values of stimulus signals generated by a simulator are a function of an ECU's response from the previous cycle. Other variables such as test profiles and in-line analysis results may also influence the calculation of stimulus values, but it is dependence of signal values on the response from a unit under test that differentiates HIL simulation from other test techniques.
How does HIL simulation work?
In a closed-loop control system, the current state of the system being controlled is fed back to the controller through sensor measurements. The ECU uses these measurements to help determine the appropriate actuator values in order to attain a desired operating condition (see below).

To control wheel slippage while braking, for example, an antilock braking system (ABS) uses an ECU to provide closed-loop control of the vehicle's brakes. The ECU receives information regarding individual wheel speed, vehicle speed, brake position, and other conditions necessary to determine the appropriate brake actuator command for each wheel to maintain maximum traction while stopping in adverse conditions. Physical testing of the ABS ECU ultimately requires a vehicle and test track; however, engineers can thoroughly test the ECU without a vehicle or even a brake system using HIL simulation.
To understand how this is accomplished, let's first consider what an ECU "knows" about the world around it. A typical ECU consists of an embedded computer system with integrated electronics for sensor and actuator signal conditioning and digital communication protocols. Taking the ECU point of view, an accurate representation of the voltage, current, impedance, and timing characteristics of the physical system being controlled is indistinguishable from the actual system.
However, a HIL simulator must meet certain requirements in order to accurately represent a physical system.
A HIL simulator must be able to generate and acquire signals at the same amplitude and rate of change that a physical system would produce. To accurately represent how different operating conditions affect an ECU electrically, a HIL simulator must create the impedances that an ECU experiences. The impedance seen by ECU outputs determines the amount of current drawn from the device.
Although ECU hardware may meet all design requirements, faults external to an ECU or unexpected control algorithm results can produce ECU outputs states outside of the ECU hardware specification. In order to identify such issues, the impedance characteristics of a system must also be simulated in order to produce an accurate simulation. Finally, as vehicle technology advances, there are a growing number of communication buses, such as CAN and FlexRay, as well as custom digital protocols integrated into ECUs that require specialized interfaces.
In addition to being able to interface electrically with an ECU, a HIL simulator must determine the correct values to be produced relative to the signals it receives from an ECU. State charts, programming languages, and dynamic models are commonly used to represent the I/O behavior (dynamic response) of a physical system. However, it is critical that a HIL simulator also be able to produce these values with accurate timing characteristics. This typically requires a real-time operating system (RTOS) to ensure all signals can be updated at a rate that will preserve the realistic representation of a physical system in time.
Depending on the complexity of a system being simulated and the fidelity of its representation, parallel processing techniques such as FPGAs, multicore processors, and deterministic distributed processing interfaces may be necessary to complete output response calculations while maintaining timing accuracy.
Why is HIL important?Future vehicles are expected to have more features, lower emissions, greater fuel economy, and higher safety ratings. To meet this challenge, car makers are adopting ECU architectures because they are more reliable, more efficient, add less weight to a vehicle, and can offer more functionality. By the end of this decade, it is expected that electronics will represent close to 40 % of a vehicle's value.
The increased complexity inherent in these systems works against business pressures to reduce time-to-market and development cost. Fortunately, HIL simulation has proven to be a practical solution to these diverging challenges. While HIL simulation does not replace the need for physical testing, it does help engineers accomplish the following by enabling tests earlier in the development cycle and eliminating the need for a physical system during test:
Considerations when choosing a HIL system
There are many options for implementing HIL simulation as part of a test system. However, to ensure the short- and long-term success of the investment, the simulation must be both flexible and open.
With the drive to continually reduce the cost of test, a flexible solution is essential to making HIL simulation practical in the development process. The ability to test a variety of ECU configurations without downtime or the need for specialized services keeps the cost of ownership low. Furthermore, an effective HIL simulation should be able to rapidly adapt to changes encountered during and between development cycles. A small change in the test process or configuration should not require a major renovation of the HIL simulator.
As technologies advance and converge in the automobile, new communication buses, vision inspection systems, RF instrumentation, and other specialized instruments make implementation of HIL simulation test systems necessary. At the current rate of innovation, it is not practical to expect a single vendor to simultaneously meet the time-to-market, quality, and cost expectations for all the latest technologies. An open HIL simulation solution ensures that you will always be able to integrate the technologies required to test your ECU.
The future
Business and technical challenges will continue to grow in the automotive industry. As technology evolves to address these challenges, the role of HIL simulation in vehicle development will become increasingly important. By enabling tests earlier in the development cycle and removing the limitations of physical test, HIL simulation is helping to reduce development cost and increase the quality of vehicles in the face of these challenges.
For help in HIL simulation, the HIL Simulation Checklist provides a comprehensive list of topics you should consider when specifying a HIL simulation test system.
Chris Washington is HIL product manager at National Instruments.



