synched plot and video
The sine with dwell standard involves a sequence of tests that is handled in CarSim using Events to perform one simulation that covers the many conditions of interest. Writing to file is disabled between tests, to leave out transient behavior that is not of interest. Click for more detail.

Automation and COM

Much of the time spent using VehicleSim products involves interactively trying new ideas, evaluating new procedures, validating vehicle parameters, etc. But once you have a set of procedures and a set of variants (vehicles, controllers, etc.) you might want to run hundreds or thousands of simulated tests.

Automation can be applied using 100% built-in features of the VehicleSim product. Or, you can control the automation from external software, working with either the user interface (VS Browser) with Windows COM, or the VS Solver using the VS API.

Built-In VS Automation Options

Sequences of tests can be run from within the VehicleSim product with built-in GUI screens. Another option is to control the VS Solver using VS Events and other VS Commands.

Batch GUI Tools

The VS Browser for each product includes two libraries that are used to run a set of simulations with a single button click.

One simply goes through a set of Run Control datasets that were selected from the current database. The list of runs can include built-in models (no extensions), models with extensions in Simulink, LabView, ASCET, etc., and a mixture of extension environments (e.g., several Simulink models). The control screen even works with real-time hardware-in-the-loop systems, allowing you to set up days of testing under completely automatic control.

Another library offers a matrix approach, in which two lists of datasets are combined automatically to generate new runs. For example, a list of vehicles and a list of test conditions.

As with all other libraries, the datasets from both Batch libraries are normally saved, such that the list of runs can be repeated at any time with a single click.

VS Commands and Events

The capability for describing complex test sequences with events blurs the distinction between one long run covering many conditions, and many short runs each covering a single condition. A sequence of tests can be defined as a single run, with each segment treated as a separate event. For example, running a series of brake tests with a real-time HIL system might involve starting at zero speed, accelerating to 1 km/h above the brake test speed, coasting down, applying the brakes until the vehicle comes to rest, and then repeating. The repeat might involve a different speed, vehicle loading, surface condition, or other factor. Any number of these tests can be strung together using events to make a single (long) run.

Another example is the sequence of sine with dwell tests, required by regulations to test electronic stability controllers (ESC).

Automation from External Software

In normal interactive usage on Windows, the VS Browser provides the interface to control the VS Solvers (Math Model DLL files). Rather than interacting with the GUI controls of the VS Browser manually, external software can control the VS Browser via Windows COM. Another automation option is to use external software to control the VS Solver directly, bypassing the VS Browser.

Control through Windows COM

The VS Browser (e.g., carsim.exe) can run as a Windows COM server (also known as ActiveX). Almost anything you might do interactively can be done by sending COM commands from any environment that supports COM. Examples are provided for using Excel, MATLAB, and Visual Basic.

Control through VS API

Advanced users can provide automation with custom programs that work directly with the VS Solver, using the VS API. This approach works with any software on Windows that can load a DLL file and access the public functions (e.g., vs_run).

Managing Data Files (Parsfiles)

Besides providing the GUI for interactive use, the VS Browser generates all of the Parsfiles used by the VS Solver to set parameter values, read VS Commands, etc. Each Parsfile is a text file with a simple format that is well documented. It is common for advanced users to use a mixture of Parsfiles that were generated by the VS Browser, along with a few files generated by external software or written by hand.

The Parsfile format supports an "include" capability that allows references to data in other Parsfiles. For example, the main Parsfile might include a line "include myfile.par" that includes the contents of a file named myfile.par. You can replace that file with each run for sensitivity studies or other automated analyses.

Control by DOE and Optimization Software

The simple text input files used by the solvers in CarSim, TruckSim, and BikeSim provide an easy interface with most of the design, development and analysis software used by engineers. Design-of-experiments for optimizing chassis systems and components may be done using HyperStudy®, iSIGHT®, OPTIMUS® or any other DOE package. Since our products run much faster than real time, these optimization programs can be completed in record time.

The Batch Runs screen runs a set of simulations based on selected Run Control datasets. In this example, a set of Run Control datasets used to simulate a tire tester can be updated with a single button click. Click for more detail.
The Batch Matrix screen assembles a matrix of runs by taking all combinations of datasets specified as Factor 'A' (e.g., procedure datasets) and datasets specified as Factor 'B' (e.g., systems to run with the procedures). In this example, a set of procedures is used with a SuspensionSim model to generate a single VS Parsfile for use in CarSim based on results generated from six simulated procedures. Click for more detail.
A VS Browser (e.g., carsim.exe) can work as a Windows COM server, controlled by MATLAB or other software that supports COM. Click for more detail.
Contact Us
Subscribe to Newsletter