Opened 5 years ago

Last modified 4 years ago

#5581 new defect

FMU - ME accuracy

Reported by: ceraolo Owned by: lochel
Priority: blocker Milestone: 2.0.0
Component: FMI Version: v1.14.0-dev-nightly
Keywords: Cc: AnHeuermann

Description (last modified by ceraolo)

I'm not aware of possible reasons for which a simulation containing a FMU-ME created form a Modelica source should behave differently from a full-modelica simulation. Indeed I expect, at least in the simplest cases, perfect matching.

Consider the enclosed package fbSystemTest.mo. It contains:

  • fbSystem, a simple modelica model of a system to regulate the speed of the rotating inertia inertia1
  • fbSybSysDX, a part of fbSystem, with is used to create the enclosed fbSystemPkg.fbSubSysDX.fmu
  • fbSystemFMU, which corresponds to fbSystem, but contains the created fmu.

In principle the rotational speed of inertia1 should be the same when simulating fbSystem and fbSystemFMU. However, when everything is done with OpenModelica, significant differences are shown.
Note that if I use the same package fbSystemTest.mo to compare the two simulations, but do everything (including the fmu creation) with Dymola, no difference between the two simulations is shown. The values appear to be exactly the same, up to the last digit shown with numerical cursor.
These two behaviours can be checked looking at the enclosed "FMU issue.pdf", which compares plots from Dymola and from OM.

So I suppose there is a bug that causes the OM simulations not to have exactly the same values.

Attachments (3)

FMU issue.pdf (121.5 KB) - added by ceraolo 5 years ago.
fbSystemTest.mo (7.1 KB) - added by ceraolo 5 years ago.
fbSystemPkg.fbSubSysDX.fmu (592.6 KB) - added by ceraolo 5 years ago.

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by ceraolo

Changed 5 years ago by ceraolo

Changed 5 years ago by ceraolo

comment:1 Changed 5 years ago by casella

  • Priority changed from high to blocker

comment:2 Changed 5 years ago by ceraolo

  • Description modified (diff)

comment:3 Changed 5 years ago by ceraolo

The problem seems to be not in the FMU, but in the way the FMU is used when embedded in a Modelica model.
In fact, if the FMU created by OM is imported in Dymola and used in fbSystemFMU, no accuracy issue is evidenced.

comment:4 Changed 4 years ago by sjoelund.se

The importFMU stuff indeed does not work nearly as well as OMSimulator

comment:5 Changed 4 years ago by AnHeuermann

  • Cc AnHeuermann added
Note: See TracTickets for help on using tickets.