4

I am new to the topic of co-simulation. I am familiar with the definitions (based on Trcka "COMPARISON OF CO-SIMULATIONAPPROACHES FOR BUILDING ANDHVAC/R SYSTEM SIMULATION "):

  • Quasi-dynamic coupling, also called loose coupling, orping-pongcoupling, where distributed models run in sequence, and one model uses the known output values, based on the values at the previous time steps, of the coupled model.
  • Fully-dynamic coupling, also called strong coupling, oronion coupling, where distributed models iterate withineach time step until the error estimate falls within a predefined tolerance.

My question: Is FMI/co-simulation a loose coupling method? What is FMI/model-exchange? From my understanding, it is not a strong coupling method. Am I understanding it correct that in model-exchange, the tool that imports the FMU is collecting all ODE and algebraic equations and the tool solve the entire system with a single solver. So it is more a standard to describe models in a unified way so that they can be integrated in different simulation environments?

Thank you very much for your help

Matias
  • 581
  • 1
  • 5
  • 16

2 Answers2

1

FMI/Model-exchange is targeted at the distribution of models (systems of differential algebraic equations), whereas FMI/Co-Simulation targets the distribution of models along with an appropriate solver.

Due to the many challenges in coding solvers with an appropriate support of rollback, it is hard to come by exported FMUs that can be used in a strongly coupled co-simulation.

So, to answer your question: it depends on the scenario. If you wish to simulate a strongly coupled physical system using FMI/Co-simulation, and you wish to do so with multiple FMUs, it better be that these support rollback, to avoid stability issues. If you have, for example, a scenario where one FMU simulates the physical system, and another FMU simulates a controller, then you may do well with a loose coupling approach.

It is hard to pinpoint exactly how strongly coupled two FMUs need to be before you need to apply a stabilization technique. Have a look at the following experiment, which compares a strong coupling master with a loose coupling one. Both master are used for the co-simulation of a strongly coupled mechanical system: https://github.com/into-cps/case-study_mass-springer-damper

Also, see the following report (disclosure: I contributed to it :) ) for an introduction to these concepts: https://arxiv.org/pdf/1702.00686v1

Claudio
  • 11
  • 1
0

I'm not an expert on simulation solver but I'm involved in an implementation of an FMI Co-Simulation slave. First, you are entirely right about the model-exchange.

Regarding the co-simulation, The solver sets the input values, do a step and read the output values. There is no interactions within timestep. I would say that is more a Quasi-dynamic coupling. But it is possible for the solver to cancel the previous step in order to refine time step and redo computation, ...And so on until the error estimate falls within a predefined tolerance. That is more close to a fully-dynamic coupling.

Because it is the responsibility of the solver (Co-simulation master) to set/get input/output values and to do step (and refining timesteps), definition of coupling with other model will depends on solver.

regards,

fred
  • 192
  • 1
  • 12