Numerical clamp of .fmu export

7 views (last 30 days)
Marco
Marco on 10 Jul 2025
Hi,
I've got a model containing a LTI system with a discrete dynamic implemented in Stateflow. I'm using a fixed step solver discrete (no continues states) so the integration is explicitly performed through Euler Forward method inside the Stateflow through the following formula: x = Ad*x_prev+Bd*u.
Specifically matrix Ad is as follows:
Ad =
0.999988000000000 0.000010000000000
0.000012500000000 0.999984375000000
When I perform the .fmu export matrix and I compare the Simulink model with the .fmu the behaviors are different due to a numerical clamp of matrix Ad which results as follows:
Ad =
0.99999 0.000019
0.0000125 0.99998
.fmu export is performed by using Save -> Standalone FMU and by keeping all default settings.
Could you help me? I don't know why this clamping occurs.
Some remarks:
  1. Ad is a double;
  2. I've tried to generate C code from the same block and Ad didn't figure out this clamping.
Kind regards,
Marco

Answers (0)

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!