VehicleSim products include three major types of programs:
- A custom VS Browser provides the graphical user interface (GUI).
- Custom VS Solvers calculate the response of the vehicle math models in simulated tests.
- 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. 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. For example, CarSim includes 36 custom parametric models, TruckSim includes 52, and BikeSim 3.
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.). The code is all produced in ANSI C, which Mechanical Simulation compiles in support of Windows, along with all of the major real-time computer platforms. Thus, the same model code used for all platforms, with no revisions needed for the equations.
Because VS Lisp generates all of the code for nonlinear 3D kinematical and dynamical equations for the vehicle multibody system, the development team has been 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.).
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 vehicle models use consistent names for parameter 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.
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) 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:
- 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.
- 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.
- 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.
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 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.
- 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.
- 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.
- 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.
- 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.
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