Simulink, LabView, ASCET, and API (C/C++, VB)
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 VehicleSim (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 VS architecture is designed so the core vehicle models in BikeSim, CarSim, and TruckSim can be extended as needed, 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
VS Commands
Before going over the ways that VS solvers can work with other software, you should know that the models can be extended with no external software: VehicleSim technology provides a command language that can be used to that add variables and equations at runtime (including differential equations for adding degrees of freedom). These extensions even work in real-time versions.
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 run proceeds. Output variables are computed by the model and can be sent to other software (exported) during a run. For example, CarSim 7 models have over 230 potential import variables and over 600 available output variables.
MATLAB/Simulink
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.
Simulink can also be used to run separate vehicles at the same time, with interactions defined in Simulink. (For details, see the 9-page tech memo: Running Multiple VS Vehicles in Simulink.)
The VS browser simplifies the connection between our vehicle models and Simulink.
- Work in the 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 from Here button whenever you want to make a new run.
- 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 and use the VS animator and plotter 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. Actually, 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.
For more detail, see the 12-page tech memo: Running a VS Vehicle Model in Simulink.
Current versions of BikeSim, CarSim, and TruckSim work with all versions of MATLAB going back to 6.5.1 (R13.1). Some new features in CarSim 8.0 require MATLAB R14 or newer.
LabView and ETAS ASCET
National Instruments LabView and ETAS ASCET are simulation environments that can also be used to extend our vehicle models. The SGUI 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. Starting in 2007 with CarSim 7, 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 C. The DLL always runs at high speed, giving results much faster than real-time on typical PCs. Of course, identical behavior is obtained regardless of the simulation environment, because there is just one DLL used in different contexts.
Older versions of our products (CarSim 6.xx, TruckSim 6.xx, BikeSim 1.xx) had separate DLL files for the different environments (Simulink, LabView, ASCET, stand-alone.) However, all of the DLL files are compiled from the same source code for the equations and solvers, to provide a similar level of compatibility.
The VS API and Custom Code (C/C++, Visual Basic, MATLAB, etc.)
All of our basic simulation packages provide the option for extending the models using custom C code, that can be compiled and linked to the core vehicle models.
The VS API provides a clean interface that allow a single custom C program to work with a VS DLL, without requiring recompilation with new versions or changes in vehicle type. (For example, the same custom C program can work with CarSim models with independent suspensions, solid axle, twist-beam, etc.)
When programming in ANSI C, you have full access to all named variables in the VS math model, including parameters and variables. You can also add new variables (including state variables with differential equations) that are handled the same as the built-in variables and equations.
Higher level languages such as MATLAB and Visual Basic (VB) can also interact with the VS solver through the API, using the import and export arrays. API functions that have calling conventions supported in your language can be used (generally, there are limits with functions that use C pointers.)
General Information
Main Products
CarSim
TruckSim
BikeSim
SuspensionSim (K&C)
Supporting VehicleSim Technology
Easiest to Use: GUI and Database
Viewing Results with the Animator
Plotting and Analysis
Advanced Applications
Simulink, LabVIEW, and Other Software
VS Commands and API
Automation: Batch, COM, Events
Custom Work
Real-Time Options






























