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
video + plots
AVS Echo fileis organized into sections that give information about model parts. Each parameter is shown with a keyword, value, units, and description. Click for more detail.

VehicleSim products include three major types of programs:

  1. A custom VS Browser provides the graphical user interface (GUI).
  2. VS Solvers calculate the response of the vehicle math models in simulated tests.
  3. VS Visualizer shows simulation results using animation and plotting.

This page describes VS Solvers.

VS Solvers and Math Models

The purpose of a VS Solver is to calculate time histories of variables in a math model. The design was introduced in 1990 for dynamic vehicle models, in which the variables of interest include motions (coordinates, angles, speeds, accelerations), forces and moments, controls, and many other types of information. The VS Solver architecture has more recently been used for the multibody program in SuspensionSim, which handles a sequence of quasi-static equilibrium conditions for suspensions and similar mechanical systems. The VS Solver architecture is also used for a tire simulator program included with BikeSim, CarSim, and TruckSim.

Custom Parametric Math Models

The math models within VS Solvers are customized to define parameters based on physical properties that are familiar to users. The equations are formulated in a highly efficient manner, such that the simulations usually run much faster than real-time on modern PCs.

Machine-Generated Multibody Equations

Much of the source code in a VS Solver is machine-generated by a symbolic multibody program called VS Lisp (originally called AutoSim). With over 25 years of continued use and development, VS Lisp is routinely used by the Mechanical Simulation development team to generate highly optimized equations of motion customized for specific 3D multibody systems such as motorcycles, cars, and trucks. Model descriptions involving rigid bodies, connection kinematics, and working forces and moments are made in VS Lisp, which then derives equations of motion for the 3D multibody physics, and writes those equations in ANSCI C source code that can be compiled for nearly any modern operating system, including Windows, Linux, and most real-time (RT) systems. Thus, the same model code used for all platforms, with no revisions needed for the equations.

The ability to automatically generate correct and efficient code for 3D parametric models is used to make VS Solvers that use measurable vehicle properties as parameters (rather than generic multibody coordinates, axis directions, force locations, etc.). Custom solvers are generated for fundamentally different models, such as two-wheeled motorcycles, three-wheeled motorcycles, automobiles with independent front and rear suspensions, automobiles with independent front and solid-axle rear suspensions, etc.

Because VS Lisp generates all of the code for nonlinear 3D kinematic and dynamical equations for the vehicle multibody system, the development team at Mechanical Simulation is able to focus attention writing sophisticated code by hand for systems, components, and controls that are not based on 3D motions of rigid bodies (tire models, powertrain, closed-loop controllers, ground geometry, etc.), ADAS sensors, and moving objects.

Parameters and Configurable Functions

The math model in a VS Solver is parametric; it has built-in equations that perform calculations using parameters as placeholders in those equations. Values are provided to the VS Solver at runtime for hundreds of parameters.

Parameters have numerical values. A value can be set with a number, a formula involving numbers (e.g., 1/16), or a formula involving other parameters (e.g., Y_S = -L_TRACK(1)/2). All parameters are assigned default values before reading input Parsfiles; if a parameter is not given a new value, the default value remains in effect.

About half of the calculations in a typical vehicle model involve fixed relationships between internal variables that might be nonlinear. Some examples: target speed vs. time; tire forces and moments vs. slip and load; suspension toe and camber vs. jounce. These relationships might be created with spreadsheets, measured with lab test equipment, or obtained with simulation of subsystems with SuspensionSim or other multibody tools. Or, depending on the type of test and model, they might be replaced with linear coefficients or disabled completely. VS Solvers originally represented these relationships with tables. More recently, they are represented with VS Configurable Functions. As indicated by the name, the functions can be configured by parameters to use constants, linear coefficients, 1D tables with various built-in interpolation and extrapolation methods, and in some cases, 2D tables with various built-in interpolation and extrapolation methods. In some cases, functions can be replaced with symbolic formulas provided at runtime.

Indexed Parameters and Functions

VehicleSim models use consistent names for parameters of parts that are repeated in a model, such as tires, wheels, springs, etc. Parameters and Configurable Functions for repeated parts are indexed, such that a single text file can be used multiple times to set values for different components. For example, it is common to use the same set of tire properties for multiple tires in the vehicle model. Although the model contains separate equations and values in memory, the values can be set from the same file if it is read multiple times.

Modularized Solvers Introduced for version 2018.0

A four-year project was undertaken to combine the high efficiency of the machine-generated physics equations with the convenience of having a single vehicle multibody model that handles all vehicle configurations. The project was successful, and the new modular design was introduced for CarSim and TruckSim 2018.0 (released Dec 2017). Prior to this release, TruckSim included separate solver programs for 84 distinct configurations, for both 32-bit and 64-bit applications (a total of 168 DLL files for Windows); TruckSim 2018.0 has just two: trucksim_32.dll and trucksim_64.dll.

Standard I/O Files

VS Solvers receive all configuration information from simple keyword-based text files called Parsfiles. These files are generated automatically by the VS Browser (GUI and database manager) for use in VS Solvers and VS Visualizer. The format is simple and well-documented; advanced users often generate Parsfiles using external software for custom automation setups.

In addition to the primary role of solving equations, VS Solvers generate a number of documentation files:

  1. The VS Solver writes an Echo Parsfile just before the simulation starts, and another just after the simulation ends. The Echo file lists every parameter that was used, along with every configurable function. It provides comprehensive information about all of the options used in the run.
  2. A Log file is written that lists all Parsfiles encountered in setting up the run, along with status reports and possibly warnings or error messages.
  3. Documentation files can be generated listing all state variables in the model, all output variables, and all import variables. These features are typically accessed using the View button from the Run Control screen of the VS Browser. The documentation files are written as simple text files, tabbed text files (to support point-and-click controls in the GUI), and spreadsheet files.

Highly Extensible

VS Solvers are provided for Windows OS as dynamically linked library (DLL) files. They are typically run under the control of the VS Browser (based on GUI controls), but can also be run from any program that can load and interact with DLLs. For Linux, they are provided as shared object (SO) files. For RT Systems, they are typically provided as compiled S-Function solvers for use with Simulink Coder (formerly known as Real-Time Workshop) from the MathWorks.

  1. The models are extensible by users through the use of VS Commands. Symbolic capabilities are available at runtime, allowing users to add new output variables, controllers, and automation options.
  2. The models communicate as needed with external simulation programs such as Simulink, LabVIEW, and ASCET through arrays of import and export variables. These arrays are configured at runtime as needed to integrate with external models.
  3. The models communicate with a standard application program interface (API) that is well documented and can be used to work with nearly any simulation environment.
  4. The source code is standard ANSI C, and is recompiled as needed for Windows (32-bit and 64-bit) and various real-time systems. This ensures compatibility between the many available simulation environments.


video + plots
The top part of a VS Echo file gives information about system parameters. Click for more detail.
video + plots
VS Solvers provide extensive machine-generated documentation customized for each simulation setup. Documents are provided as text, tabbed text, and spreadsheet. This figure shows a spreadsheet listing all available output variables for a simulation involving range and tracking sensors. Click for more detail.
video + plots
This figure shows part of a text file listing all state variables. These include variable that are standard for the vehicle model, variables added with options such as moving target objects, and variables defined by users with VS Commands. Click for more detail.
synched plot and video
The machine-generated source code in a TruckSim VS Solver is lengthy, correct, and efficient. Click for more detail.
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.