VehicleSim Technology

All of the math model solver programs in BikeSim, CarSim, and TruckSim have been produced using a symbolic multibody program developed and maintained within Mechanical Simulation. From 1996 to 2006, the program was AutoSim, developed by one of the company founders (Dr. Michael W. Sayers) at The University of Michigan Transportation Research Institute (UMTRI) in 1989.

In 2006, AutoSim was replaced with a new program called VehicleSim, now in use for developing all solver programs at Mechanical Simulation. VehicleSim is built on the same computer algebra and dynamics formalism as AutoSim. Both are extensions of the Common Lisp language, with all its capabilities for defining new languages and support of automated symbolic processing. In addition, VehicleSim supports the modern simulation environment by providing extensive run-time capabilities for extending the models and interacting live with other simulation software. Some of the essential symbolic capabilities have been ported from Common Lisp to ANSI C, where they support run-time options for extending models even on real-time systems.

VehicleSim Capabilities

Some key features of the VehicleSim (VS) technology are:

  • The math models maintain the same high efficiency associated with models from past versions, allowing real-time operation for hardware in the loop (HIL) testing and driving simulators.
  • The models are extendible by users. Some of the symbolic capabilities previously associated with AutoSim are now available at run time, allowing users to add new output variables, controllers, and automation options.
  • The models communicate with a standard application program interface (API) that is well documented and can be used to connect with nearly any simulation environment.

VehicleSim Commands

VS solvers support a symbolic calculator that allows inputs to be expressed either numerically (as in past versions), or in terms of equations involving other model parameters and variables.

The solver programs also include a preprocessor with advanced commands that allow users to customize and extend the models by adding equations at run time. Import variables can be assigned to equations involving other model variables. For example, the imported road friction variables for each tire can be defined with equations defined at run-time that are based on other variables in the model.

New variables can be defined at run-time for a variety of purposes: import, export and output, constant parameters, or auxiliary variables used in other equations.

New variables added with VS commands can be calculated with equations that are also defined with VS commands. The equations can be algebraic, involving all existing and new variables and parameters in the model. Further, algebraic equations can be defined at run time for the derivatives of the new variables, allowing users to add degrees of freedom via differential equations.

The event capabilities from past versions our solvers have been extended to include algebraic equations for defining thresholds, and for defining new parameters and controls. For example, an event can now be triggered when a complicated algebraic equation involving several output variables is satisfied. When the event occurs, controls can be defined using scaling based on algebraic combinations of current variable states. (For example, the scale factor for a table for steering can be defined by an equation involving a level of lateral acceleration and speed.)

The VehicleSim API

The VS solvers are Windows DLL modules with the VehicleSim application program interface (VS API). The same solver DLL is used in all Windows simulation environments (built-in, Simulink, LabView, ASCET, command-line EXE, etc.). When no other software is used, the DLL's are loaded and run directly by the SGUI. Support for other software such as Simulink and LabView is handled by small "wrapper programs" that load and run the VS solver and communicate as needed with the other software.

The VS API design has been applied to the real-time (RT) versions of VS Solvers in CarSim 7 and TruckSim 7 to provide consistent support of all features on all RT platforms.

The VS API also provides access to the 3D geometry of the VS roads for use with external models such as user-defined vehicle models and advanced driver models that look ahead at the road geometry.

Example source code (ANSI C) is provided showing how to use the VS API to run the VS solvers from programs written in any language that can load a DLL (C, C++, Visual Basic, Excel (with VB macros), etc.). Examples are also provided showing how to extend existing models with custom C code, with the equivalent of the new VS commands.

General Information

VS commands are used to constrain the vehicle and simulate a K&C rig. Click to see VS commands and plots. (Full size)
A wrapper program can link a VS solver to other software, such as Simulink, using the VS API. Click for full size.