Leaving the pure simulation of mechatronic systems behind, Hardware-in-the-Loop test rigs provide cost effective ways to test new control algorithms with existing hardware. For this purpose, Modelica models can be included into Simulink models. This hybrid model can be compiled and run on a xPC Target system, providing a hard real-time environment. Unlike workstation simulations, where the real-time condition can not be guaranteed because of operating system techniques like multi-threading and multi-processing, the real-time simulation assures the execution of the model with a constant simulation rate, which is essential for hardware control.
Using this real-time simulation system allows the safe, direct control of external hardware for HiL simulations and is used for example in the steer-by-wire test rig and for the test of robot control algorithms.