Dymola Logo

Dymola Real-time HIL simulation

Dymola provides unique support for real-time and hardware-in-the-loop (HIL) simulation through the use of symbolic manipulation to make simulation more efficient.  In addition Dymola has a number of additional features that are targeted at improving real-time performance.  These include mode handling, event detection and mixed-mode and inline integration.

Dymola supports HIL simulation using dSpace, xPC and McLaren Electronics vTag platforms.  Other platforms can be supported using the C-code export feature.

Mode Handling

The mathematical model of an automatic gearbox, for example, is a mixed system of boolean equations and differential-algebraic equations with hundreds of unknown variables.  There are no general-purpose solvers for such a problem and although DAE solvers could be used to solve the continuous part they are too slow. The traditional approach has been to manually manipulate the model equations for each mode of operation.  Dymola is able to do this automatically and generates different sets of code for each of the different operating conditions (or modes).

Mixed-mode and inline integration

Mathematical models often contain both fast and slow dynamics which can lead to stiff systems.  Use of explicit methods to solve these types of systems demand step sizes that are much lower than the given real-time step size.  Implicit methods allow larger step-sizes at the cost of solving a non-linear set of equations at each time step. Dymola uses a new approach called mixed-mode integration that takes a middle course.  The system is split up into fast and slow states.  Only the fast states are discretised implicitly.

To further increase the simulation speed, Dymola supports inline integration.  The discretisation formulas are inserted (in-line) into the problem and Dymola’s symbolic engine is applied to the resulting equations.  Speed-up factors from about 4-16 have been recorded for applications including a diesel engine and an industrial robot.

Discover Dymola