The math models in VehicleSim products can be extended several ways:
- The VS Math Model can be connected to a model in another simulation environment, such as Simulink.
- Equations and and variables can be added using VS Commands.
- Variables can be exchanged with custom programs as is done with Simulink.
- Variables in the math model can be accessed directly by custom programs that support C/C++ pointers.
This page describes the option for working in external simulation environment.
Simulink, FMI/FMU, LabVIEW, and ASCET
CarSim, TruckSim, and BikeSim models are complete with respect to simulating conventional vehicles in a full range of test and driving conditions. The programs that solve the equations of the math models are called VS Solver programs; they use core equations that describe the basic 3D kinematical and dynamical equations of a vehicle with pneumatic tires and conventional suspension, steering, braking, and powertrain systems.
The VehicleSim architecture is designed so the core vehicle models can be extended to account for advanced electronic controllers, alternative component models (tires, steering, powertrain, etc.), driver control, advanced test procedures, etc. The same architecture also supports the use of our vehicle models in other simulation environments, such as MATLAB/Simulink, LabVIEW, and ETAS ASCET. Read more about compatible software packages.
Import and Export Variables
Communication with other software is accomplished with arrays of import and
export variables. The math model equations include effects of variables
that are defined in other software and imported as the simulation runs.
Output variables are computed by the model and can be sent to other software
(exported) during a run. For example, CarSim models have about 400 available
import variables and 800 available output variables. More import and export
variables are easily defined using the VS
Simulink provides a graphical user interface for building math models as block diagrams. The graphical interface is popular for developing dynamical models for many fields, such as electronics, hydraulics, chemistry, and especially, control systems.
The VS browser simplifies the connection VS Math Models and Simulink, as shown in this 6-minute video.
- Work in the VS Browser (on the main Run Control screen) and use Simulink models the same way you would use the built-in math models. You can use models created by Simulink users even if you have little or no knowledge about how to use Simulink. Just click the Run Now button whenever you want to run a new simulation.
- Work in Simulink and use our S-function plug-ins the same way you would use other S-functions. You can use our vehicle dynamics models from within Simulink with little knowledge about the VS Browser or our model details. Click the Send to Simulink button to transfer all necessary data to Simulink, and then do your work in Simulink. Besides the normal viewing of results from within Simulink, you can transfer back to the VS Browser at any time to adjust vehicle properties or use VS Visualizer to view the results you generated in Simulink.
Although our vehicle models have hundreds of variables available for import and export, you do not need to handle all of them when including the vehicle model in Simulink. A typical Simulink model will use only a few of the available variables. They are activated by pointing-and-clicking from VS Browser screens that you use to activate specific variables for import and export to and from Simulink.
Functional Mock-up Interface (FMI)
Functional Mock-up Interface (FMI) is an open standard interface for for linking multiple simulation tools together. FMI supports model exchange and co-simulation of dynamic models (see the web site https://www.fmi-standard.org for details).
A Functional mock-up unit (FMU) is a block that can run in a simulation workspace.
BikeSim, CarSim, and TruckSim can automatically generate a VS FMU as a co-simulation slave for the following options:
- FMI versions 1.0 and 2.0.
- "Flat" and "Structured" I/O definitions.
- Both self-contained FMUs and FMUs that work with external files.
- The FMU that uses external data files operates in a similar fashion to a Simulink S-Function, accessing external database files, and generating output files that can be viewed with VS Visualizer.
- The self-contained version contains the solvers and all supporting data in the single FMU file. Output files are written in a temporary folder.
- Compiled for both 32-bit and 64-bit Windows OS. (Versions for RT opertating systems are currently in development.)
LabVIEW and ETAS ASCET
National Instruments LabVIEW and ETAS ASCET are simulation environments that can also be used to extend our vehicle models. The VS browser GUI supports the same type of simple-click configuration and connection controls that are provided for Simulink.
Fast, Consistent, and Compatible
The core vehicle models are compiled as dynamically linked library (DLL) files that all support the VehicleSim application program interface (VS API). The same DLL is used for stand-alone runs (the core vehicle model running with no external software), or with Simulink, or LabView, or ASCET, or custom programs written in any language that can use DLLs. The DLL always runs at high speed, giving results much faster than real-time on typical PCs. Identical behavior is obtained regardless of the simulation environment, because there is just one DLL used in different contexts.
VS Vehicle Model FeaturesPaths and Roads
Moving Objects and ADAS Sensors
Core VehicleSim TechnologyGUI, Database, and Documentation
Fast and Parametric Math Model Solvers
Viewing Results: Animation and Plotting
Advanced ApplicationsSimulink, LabVIEW, and ASCET
Automation and COM
Real-Time OptionsReal-Time HIL Testing