Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Problem since FMI Kit 3.0 with 1D Lookuptables #481

@EH-SC911

Description

@EH-SC911

The Problem arises when defining a Simulink Model with a 1D, 2D, 3D, nD-Lookuptable; The Table is in Workspace as Simulink.LookupTable with dimension 1,2,3, n initialized; Compiling with the Catia FMIKit-Simulink v2.9 works fine, since the modelDescription.xml shows correctly defined BP1 and Table Values;
For Example, for the first point of the 1D Table:

<ScalarVariable name="Parameters.TEST_1D.BP1[0]" valueReference="66" causality="parameter" variability="tunable">
  <Real/>
 </ScalarVariable>
...
<ScalarVariable name="Parameters.TEST_1D.Table[0]" valueReference="71" causality="parameter" variability="tunable">
  <Real/>
</ScalarVariable>

but when compiling with the FMI Kit Version 3.0 or higher, there is a problem in the definition of the Points; first you inverted since Version 3.0 the Breakpoint Definition and the Table Values (that could be a Problem!); but the Definition of the Table Point looks wrong, since you define two dimensions in the table; here for example, the same first Breakpoint with the first value:

<ScalarVariable name="Parameters.TEST_1D.Table[0,0]" valueReference="66" causality="parameter" variability="tunable">
  <Real start="0"/>
</ScalarVariable>
....
<ScalarVariable name="Parameters.TEST_1D.BP1[0]" valueReference="71" causality="parameter" variability="tunable">
  <Real start="0"/>
</ScalarVariable>

I have noticed, that the FMU compiled with FMIKit 2.9 simulates correctly (although version 2.9 had a Problem with 3D -> nD Lookuptables, so I could test it only with 1D and 2D LookupTables), but the one generated with 3.0 or 3.1 still interpolates the 1D Lookuptable surprisingly correctly, but the 2D-3D-4D Lookuptables are completely wrong interpolated.

Hier is an Example, with a small Simulink Model with a 0D, 1D and 2D Lookuptable and a .mat File with the Workspace Variables of type Simulink.LookupTable TEST_0D, TEST_1D and TEST_2D; the three FMUs were compiled with the FMIKit v2.9, v3.0 and v3.1-rc respectively
TEST_0D_1D_2D_Lookuptable.zip

And a Second Example with also 3D and 4D Lookuptables compiled just with the FMIKit 3.1rc:
TEST_0D_bis_4D_Lookuptable.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions