The Simulator library for Dymola is used to interface Modelica Vehicle Dynamics models built with the VDLMotorsports library with rFactor Pro so that they can be used in Driver in the loop (DiL) simulators. The VDLMotorsports library is used to create the full vehicle physics model and this is then exported using the Dymola Source Code Export feature and compiled into applications that are run within PTWinSim or vTAG environments. The PTWinSim and vTAG applications interface with rFactor Pro using plugins that are developed by Podium Technologies.
Using the VDLMotorsports and Simulator libraries, a Dymola multibody vehicle dynamics model can be quickly and conveniently compiled for use in driver-in-the-loop simulators.
rFactor Pro requires a large number of input and output signals to be able to run a third party vehicle model as part of a Driver-in-the-loop simulator. The Simulator interface template contains these required signals in a reusable Modelica template. The user simply extends this Modelica model and replaces the vehicle model with their own vehicle dynamics model.
Before exporting the model from Dymola it can be run in a test environment within Dymola. This is used to debug the model and ensure that it is working correctly and runs at a suitable rate for use with rFactor Pro. After it passes the tests, the model is built into an App to be used in vTAG/PTWinSim to interface with rFactor Pro.
The Dymola Simulator interface includes collision handling, the interface with the motion platform, the wheel to track interface, the atmosphere interface, a ground interface, the driver input interfaces as well as the other signals that are required by rFactor Pro.
The vehicle model has to be able to run in real-time so the models provided have been designed to be efficient and avoid unnecessary events. This is delivered by the VDLMotorsports library which is an extension to the standard Dymola Vehicle Dynamics Library tailored for real-time simulation and motorsport applications. The approach enables the same vehicle dynamics model to be used for offline experiments such as kinematic tests, 7 post rig and dynamic driving events as well as for the Driver-in-the-loop environment
A function in the Simulator library is used to export the Modelica models from Dymola and compile the vehicle dynamics models into PTWinSim or vTAG applications in one step.
The user selects the model to be exported and configures the settings for inline integration, step size and the advanced real-time simulation flags available in Dymola. In addition the user can choose between compiling a vTAG or PTWinSim App and specify the names, app number and version number to be used. There are also a number of debugging options available such as turning on profiling or sending the internal states of the solver to output signals from the model.
Once exported, the model parameters can be edited in Gredi or System Monitor. This enables the suspension setup to be changed without requiring the model to be recompiled.