|What is a HIL system ?|
Driven by governmental regulations and market demand for better fuel economy and greater performance, the design of modern automobiles and the process of developing them have changed. Pushed by these challenges, the automobile has evolved from a mostly mechanical-hydraulic system to include complex automotive electronics and software algorithms implemented on electronic control units 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. HIL stand for "Hardware in the Lop" It is a system to help automotive engineers develop a vehicle controls system faster than ever before, hence it is also referred to as Rapid Control Prototyping (RCP).
In today’s vehicles, there are literally tens of controllers scattered around under the hood, behind interior body panels, and even in some cases under your seat, each dedicated to a certain task (some as simple as unlocking your doors when you press your key fob, some as important as deploying air bags, and some for controlling vehicle propulsion systems such as engines/transmissions/motors). What has helped in revolutionizing control development over the last years is the Controller Area Network (CAN). Simply put, CAN is an automotive standard communication done digitally over two wires, each controller physically harnessed to those wires. You can issue hundreds of commands over a short time period, dramatically limiting the number of wires needed to create complex and smarter vehicle intelligence. A controller consists of a processor receiving/sending messages over CAN, and is wired to sensors and actuators (actuator is a device activated by a controller, such as a throttle valve turned by an engine controller).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.
Hardware-in-the-loop testing allows the designer to simulate the real-time behavior and characteristics of their physical system, so that prototype or production control system software can be tested without the need for the actual hardware or operational environment. In order to do this the plant model must be real-time capable.
A typical HIL system will at minimum consist of a simulator and peripherals wired to the simulator. Typical peripherals that are wired in such a setup are controllers, sensors, actuators, and any needed CAN buses. In our HIL setup the major components are the dSPACE MicroAutoBox (which will serve as the vehicle master controller in its final implementation in the vehicle) and simulator. We like to call the simulator “a car in a box,” it is a dedicated processor board system with wire harness interfaces. In those processors, downloaded are simulated computer models that imitate major vehicle components such as engines, electric motors, or high-power batteries. What’s the advantage here? In the old days, you would program a controller, and hoped for the best in that the actual device you were controlling would behave as planned (sometimes a simple mistake in control code can damage an expensive part, costing you big bucks). To avoid costly trial and error, you can catch mistakes during simulation, early on before applying the controller to the actual device. With proper modeling skills, you can make a realistic simulation (the controller you are programming doesn’t know the difference between the actual device and the simulated device, you can develop your controls on that device before physically connecting it to the device, or even before having a car in front of you).
The most evident advantage of HIL simulation is that real-world conditions are achieved without the actual risks involved. For example, an autopilot can be tested thoroughly without putting a $200 million plane at risk. But, there are many other benefits to HIL simulation. With HIL, you can test the control units with extreme conditions that might not be feasible in the real world. You can simulate winter road conditions for the vehicle under test even in the heat of summer. You can test the control unit to the limits – up to the very maximum speed a car can theoretically be driven. HIL enables you to isolate deficiencies in the control unit even if they occur only under certain circumstances. With HIL, outputs can be calculated as a function of existing inputs as well as a combination of past inputs. A hardware subsystem can be tested using HIL without having the entire system ready, thus making testing an effective part of the development process, from design to deployment. With HIL, you can make early decisions on specific design alternatives on a sound basis, which leads to designs that function effectively in situations that will be encountered by the control unit when it is in the hands of the customer. Robust, high-fidelity real-time HIL simulations not only enable shorter time to market by reducing the development period, but also reduce cost by eliminating the need for actual hardware during testing, as well as associated maintenance costs.
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.
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
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, engineerscan 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.
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:
There are many options for implementing HIL
simulation as part of a test system. 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.
There are many options for implementing HIL simulation as part of a test system. 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.
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.