Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem since FMI Kit 3.0 with 1D Lookuptables #481

Open
EH-SC911 opened this issue Aug 9, 2024 · 0 comments
Open

Problem since FMI Kit 3.0 with 1D Lookuptables #481

EH-SC911 opened this issue Aug 9, 2024 · 0 comments

Comments

@EH-SC911
Copy link

EH-SC911 commented Aug 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant