HIL Real-Time (RT) Support

Physical testing and simulation join in real-time to evaluate hardware being driven by a software vehicle dynamics model.


From the simulation point of view, the ECU is hardware-in-the-loop (HIL)—simulation results depend on both the math model and the physical hardware, which interact in real-time. From the hardware point of view, the CarSim model is software-in-the loop (SIL), contributing to the effectiveness of a hardware test procedure.

Dr. Jin Hu, head of the HIL real-time team, testing CarSim on the Speedgoat platform.

How It Works

Thanks to VehicleSim technology, CarSim, TruckSim, and BikeSim models run on most computers faster than real-time—a simulation of a 30-second test is completed in less than 30 seconds. The models support the MATLAB/Simulink block control interface, the LabView interface, and others. This not only gives compatibility with Simulink and LabView, but also provides a full support for any real-time testing software that uses the same interface. To run in HIL, the model receives measured variables from the hardware. The hardware in turn receives calculated variables from the math model.

To obtain real-time operation, the software obtains calculations from the model and then waits for the clock to catch up. (A 30-second simulated test must take exactly 30 seconds to run when there is HIL.) The precise timing needed to communicate with electronic controllers is provided by RT software running on a special RT operating system.

We provide libraries to construct VS Math Models ready to run on the major RT operating systems, including QNX, RT-Linux, dSPACE, and others. A host computer with Windows runs the VS GUI, VS Visualizer, and other supporting software. A target computer with the RT OS runs the math VS Math Model together with data acquisition/transfer software provided with the RT system.

Live and Post-Processing Visualization

Any commercial RT system includes live plotting and analysis options, which can be applied to the CarSim/TruckSim/BikeSim models, along with any hardware in the loop. Further, all of the post-processing capabilities from our software still work, including VS Visualizer (with overlays, synchronized plotting and animation, slow motion, etc.), and automatic export to Excel, MATLAB, and other external software. In addition, the RT versions of our simulations support live animation of the vehicle during testing with VS Visualizer. During live animation mode, VS Visualizer uses the same shape files, camera settings, etc. as it uses in the off-line mode, so no extra learning or setup is required.

Compatible with Many Systems

CarSim, TruckSim, and BikeSim RT libraries and examples are included as part of the Windows installers. Here are the current Model and License options for CarSim, TruckSim, and BikeSim, and here are the current System and Software Compatibility requirements (PDF).

In all cases, the same models are used, with the same equations, solution methods, inputs, outputs, and post-processing tools. You can run datasets in real-time on different systems based on HIL needs, and exchange data sets with other users running on different systems, and users running off-line on ordinary Windows machines.

RT versions of CarSim, Bikesim, and TruckSim can be added to existing HIL systems at a low cost similar to our off-line versions. If you are buying a new RT system, you can make the selection based on your HIL application (hardware testing? rapid prototyping? evaluating proprietery controllers?) with the confidence that all of the options listed above work well with BikeSim RT, CarSim RT, and TruckSim RT.

Contact Us
Subscribe to Newsletter