Numerical clamp of .fmu export

5 vues (au cours des 30 derniers jours)
Marco
Marco le 10 Juil 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

Réponses (0)

Catégories

En savoir plus sur Deployment, Integration, and Supported Hardware dans Help Center et File Exchange

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by