Opened 5 years ago

Last modified 4 years ago

#5867 reopened defect

Implement fixed time step implicit Euler in FMI/CS

Reported by: Francesco Casella Owned by: Andreas Heuermann
Priority: normal Milestone: 1.16.0
Component: FMI Version:
Keywords: Cc:

Description (last modified by Vitalij Ruge)

Currently, FMI/CS only provides explicit Euler. This is good for real-time co-simulation of non-stiff models, but it doesn't work if the model is stiff, because it then requires very small time steps.

It is planned to add CVODE to FMI/CS; however, this only provides variable step-size solvers with error control. These are fine from the point of view of precision, but they will tend to require many internal steps for each main step of the FMI, because the step changes of the output will trigger fast transients which are totally irrelevant for the output at the end of the step, but that the CVODE solvers will nevertheless try to simulate with great accuracy.

A simple but effective solution could be to have fixed time step implicit Euler also implemented. This will solve most stability problems, since implicit Euler is L-stable.

I would therefore recommend that this solution is also implemented for FMI/CS, in addition to CVODE.

I would also recommend to include a parameter to set the maximum number of iterations of the implicit Euler algorithm. This could allow to implement almost-real-time algorithms with a fixed number (possibly only one) iteration, which will lose some accuracy during fast and large transients, but on the other hand ensure a bounded computation time for a single step.

Change History (7)

comment:1 by Vitalij Ruge, 5 years ago

Description: modified (diff)

comment:2 by Andreas Heuermann, 5 years ago

Owner: changed from Lennart Ochel to Andreas Heuermann
Status: newassigned

comment:3 by Andreas Heuermann, 4 years ago

Component: *unknown*FMI
Milestone: 1.16.01.17.0

comment:4 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:5 by Francesco Casella, 4 years ago

Milestone: 1.18.01.16.0
Resolution: fixed
Status: assignedclosed

This was actually fixed in 1.16.0, see #4273.

comment:6 by Andreas Heuermann, 4 years ago

We have one implicit method (CVODE from #4273) added to OpenModelica FMUs, but no implicit Euler method. Do we still want it for a minimal FMU that doesn't use SUNDIALS?

But then I would degrade the priority to normal or lower.

comment:7 by Francesco Casella, 4 years ago

Priority: criticalnormal
Resolution: fixed
Status: closedreopened

You are right, I overlooked that.

Note: See TracTickets for help on using tickets.