Go To Mechanical Simulation Corporation Home Page
Go To Mechanical Simulation Corporation's Facebook Page
Go To Mechanical Simulation Corporation's LinkedIn Page
Go To Mechanical Simulation Corporation's YouTube Page
Testing an ECU connected to an Opal-RT target machine running CarSim RT (2000).

Real-Time (RT) Testing

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

For example, the system shown in the figure to the right has an antilock brake system (ABS) electronic control unit (ECU) being tested on a bench, working in a virtual car provided by CarSim. The ECU "thinks" it is in a car; intstead, it controls and communicates with the virtual brake system in the CarSim math 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.

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 the 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 models 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 packages are available in off-the-shelf CDs and downloads for six commercial RT families:

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.

Historically, the architecture of our software has enabled the math model solver programs to work on almost any modern computer. (Our code is written in ANSI C, which is the most widely supported language for engineering applications, even on computers that don't have file systems.) This contrasts with many older RT vehicle models (commercial or in-house) that have been developed for a single system, and require significant development work to be ported to work with other systems. For example, CarSim RT was selected in 2003 by the Japanese MathWorks Automotive Advisory Board (J-MAAB) as the benchmark for RT vehicle dynamics because it was the ONLY commercial software that could be run with more than a single RT system!

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.

CarSim RT with a dSPACE system (2006).
CarSim RT with a National Instruments system with LabView RT (2006).
CarSim RT with an ETAS LabCar system (2006).
Contact Us
Subscribe to Newsletter
© 2005-2020 Mechanical Simulation Corporation, All Rights Reserved. CarSim, SuspensionSim, TruckSim, BikeSim,
and VehicleSim are registered trademarks of Mechanical Simulation Corporation in the USA and other countries.