What is HIL?

HIL (Hardware in the Loop) is a common term tossed around by our engineering team members frequently. 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).

Going back to HIL, 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 (donated by dSPACE), the major components are the dSPACE MicroAutoBox (which will serve as the vehicle master controller in its final implementation in the vehicle) and simulator (see above illustration). 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).

Thanks to dSPACE teaming up with The MathWorks (makers of MATLAB and Simulink software), rapid control prototyping is made easier. Simulink is a software package where if you can draw flow charts, you can program (you literally drag and drop in blocks and connect them with arrows). Rather than tediously typing in lines of code, careful not to make a mistake (a mistype not caught could cost you hoursĀ  in debugging), you and others who have never seen your program before can quickly figure out how your program works. You can then flash your Simulink logic into the dSPACE MicroAutoBox, see how the models in the simulator react (via a PC connected to your simulator). Don’t like the reaction? No problem, within minutes you can easily reprogram, re-flash, and re-test.

Sorry, the comment form is closed at this time.