Preparing models for use in Real-Time

April 15th, 2016 by Mahdieh Mehrabi

A “Real-Time” function exists in the Claytex Library to ease the simulation of a model in real-time. This function allows to set number flags that are available in Dymola for inline integration and to improve performance for real-time simulation.

Figure 1.1

 Figure 1: Real-time function from the Claytex library

Inline integration is a combined symbolic and numeric approach to solving differential-algebraic equations systems. Discretization expressions representing the numerical integration algorithm are symbolically inserted into the differential algebraic equation model. The symbolic power of the Dymola translator is then exploited to transform the equations into a representation that is efficient for numeric simulation. The idea of inline integration is to let the Dymola translator manipulate the discretized problem to reduce and simplify the problem that has to be solved numerically at each step. A number of inline integration methods for real-time simulation can be used in Dymola, either as settings or as a built-in variable.

Table 1

Table 1: Choices of inline integration methods and associated values

The implicit Runge-Kutta order can be chosen between 2 and 4.

General options:

Options for non-linear solvers:

Profiling of execution time:

Options for implicit inline integration:

Other options:

Options not in the real-time function

Since these options are not currently available through the real-time function, they will need to be set manually.

Note for dSpace: If the model has to be later used in dSpace, we need to make sure it is not parameterized using any external file as dSpace does not accept data files.

By: Romain Gillot  – Project Engineer