FVSim

Back to Homepage
Article Image

A collection of realistic Car simulation software, with an outdated wireframe renderer.

What is it?

It is a 14-DOF car model, with look-up table-based, non-linear suspension kinematics and compliance, powertrain and differentials dynamic simulation. Plus a collection of simplified sub-models to speed-up specific analyses and allow for faster equilibrium calculation.

How is it built?

It employs, at its core, a case-specific version of the dynamic equations kSolver is built upon. However, rather than providing a flexible, generic solution to an arbitrary collection of inter-connected bodies, it focuses on the "car" case, i.e. it provides one rigid structure for the body, and four unsprung masses which are bound to move vertically with respect to the car body.

Steering and suspension geometry is handled through the use of 2D splines (look up tables), in a similar way to what commercial software like VI-Grade's CarRealTime and IPG CarMaker do. The same approach is applied to suspension compliance. A simplified "car factory" GUI has been built to allow to define a vehicle with a relatively limited set of parameters, falling back to linear K&C properties.

Powertrain is handled in ODE-form: each wheel rotation is associated to a specific degree of freedom, and transmission and engine components have each their inertia properties and their DOF. This makes it possible to study with decent accuracy the effects of limited-slip differentials and longitudinal tire stiffness.

In terms of tire models, the SW supports Pacejka-89 and Pacejka-96 models, with an approximate formula for combined friction; it however also supports a simplified Brush Model, as described in Massimo Guiggiani's the Science of Vehicle Dynamics. A demonstration of this integration is shown below.

What can it do?

It can simulate a vehicle's behavior during a typical objective characterization open-loop manuever in a rather realistic way. Since it runs in Python while remaining a relatively complete model, it cannot currently run in real-time, being limited to fractions (0.15x). However, its simplified 7-DOF and 3-DOF models siblings (obtained by removing dynamic pitch/roll/wheel jounces, plus ODE-based wheel rotations, respectively) can, in some cases, reach a comparable level of accuracy in RT.

You can see an example of a 6m/s2 step-steer maneuver for a 1960 Chevrolet Corvair model below.

Through the simplified definition GUI, a reasonably realistic full vehicle model can be quickly defined, with the ability to define, with good detail, such elements as springs, dampers, and differentials.

Article Image Article Image

Some typical, quick simulations can be directly launched through the GUI:

  1. Yaw-Moment Diagram
  2. GG Diagram (iterative search of max Ay)
  3. Ax vs Speed
  4. Simplified deterministic comfort events
  5. K&C toe/camber contributions in equilibrium
Article Image

Research example: Genetic Optimization of SWD maneuver

Each new passenger car in EU, USA and other territories is subjected to the ECE13H/FMVSS126 norm to certify its stability control program. These regulations, rather similar, prescribe a sequence of "Sine-With-Dwell" maneuvers at increasing amplitudes of steering wheel angle and check the residual values of yaw rate after the peak to make sure the vehicle stops turning in a reasonable amount of time after the driver input ended.

Since the point of the regulation is to make sure that the vehicle is equipped with an ESC, and that the ESC is working correctly, I thought it could be fun to try and optimize a completely passive vehicle (no ESC) to find if a combination of parameters existed, ensuring a test pass even without stability control.

I hence mapped most dimensional, mass/inertia, and K&C parameters of the 14 DOF model to a Genetic Algorithm and let it run for a while, animating the results with Blender in the video you see below. For each generation, the green car represents the individual with the best fitness value. White individuals are particles which, though sub-optimal, are allowed to reach the following generation; the red individuals are carried away by the cruelty of darwinian selection.

Results were prettier than they were interesting, as the algorithm converged towards vehicles with a 3.4 meter long wheelbase, very low mass (i.e. 1000kg) but, at the same time, extremely high values of polar inertia (two parameters that I should have bounded together to avoid this situation).

Furthermore, the algorithm, as it often tends to do, amazed me with his attempts to "break the rules", i.e. find a way around how the simulation is defined to minimize the target function in a completely different way than anticipated. In this case, since the "reference SWA" to calculate base amplitude for the actual test is taken from a steady-state maneuver at 80km/h, extracting the value of SWA to reach 3m/s2, the algorithm found ways to make the SWA-vs-Ay curve almost horizontal past the 3m/s2 threshold - i.e., past 3m/s2 the vehicle becomes extremely responsive.

With this trick, even the initial sine-with-dwell maneuver at 2*ReferenceSWA puts the front tires well above their peak slip angle, resulting in lower peak response throughout the whole SWA sequence, happily passing the maneuver at each SWA step.

Given the playful nature of this research, I found this rather blatant cheating attempt quite fun to watch; in a real project with real deadlines I would have been less than amazed...

Where is it going?

As the most "generic" vehicle model I currently have, this tends to be the backbone of most VD research I do in my spare time. I tend to expand it depending on what I am studying at a given moment, gradually implementing features or improvements to better represent some specific properties of the vehicles I'm trying to represent. Lately, I have slightly improved the interpolation functions, leading to improved efficiency and to a welcome reduction in calculation times. A natural evolution would be to port the whole model to C++ for speed, a long-desired task which I am sparing for some at least week-long vacation period.