Simscape Matlab FMU do not show internal variables.

I have a very simple simscape/simulink block that I am trying to export it as model exchange FMU from Matlab 2025b.
The model is as below
Although when I use the FMU export utility, I dont see any internal variables(state variables as export)
Moreover, when I use the exported FMU, and import it in python using fmpy, i see the following model variables names.
{'In1': 0, 'Out1': 1, 'Out2': 2, 'Out3': 3, 'time': 4, 'ContState1': 5, 'ContState2': 6, 'ContState3': 7, 'ContState4': 8, 'ContState5': 9, 'Deriv1': 10, 'Deriv2': 11, 'Deriv3': 12, 'Deriv4': 13, 'Deriv5': 14}
In1 -> Input Port on the left side.
Out1, Out2 and Out3 -> Output ports on the right side
Although the states "ContState1", "ContState2", ... do not exactly specify what states are these and what do they represent. I think they are simscape internal state variables belonging to simscape components. ( voltages/potentials, currents, etc at resistor and capacitor terminals)
Similarly for "DerivX"
I am assuming that I have to name them somewhere (maybe) and then I might get some meaningful state variable names.
In the FMU export window, I also dont see any internal variables as well
The question is:
How do I get meaningfull names in my fmu me export instead of just "ContStateX" and so on.. (DerivX)
Thank you!!!

Answers (0)

Categories

Asked:

on 11 Aug 2026

Community Treasure Hunt

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

Start Hunting!