-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Yes, this is about states being outputs. Again.
(Maybe this is also a question for the specification)
Take e.g., the VanDerPol example, FMI3, both continuous states are also (the only) outputs.
In the state-space representation, this makes the "C" matrix the identity. The issues are that:
- The structure of the "C" matrix is not reflected by the dependencies of the outputs.
- Using only
directional_derivativesto obtain the "C" matrix actually yields the wrong result.
Sure, all the information that the outputs are in fact also states is contained in the modelDescription.xml and an importer can use it to generate the correct state space matrices. So, one could argue this is a "quality of implementation" thing.
One may also argue that e.g., output_1 = x0 has a constant dependency on x0 i.e., the current dependencies are wrong.
Either way, one could also make it easier on the importers here and add the dependencies + have the directional derivatives of (output) states with respect to themselves to be 1.
From the specification point of view, this seems somewhat like an edge case... ? Based on https://fmi-standard.org/docs/3.0/#ModelStructure -> Table 24:
Knowns vknown
in Event Mode and Continuous-Time Mode (ME) and at communication points (CS and SE) for Output and ContinuousStateDerivative elements are:
-[...]
- continuous states and discrete-time states,
So, an output double acting as continuous state is both an unknown and known.
Any thoughts/input welcome.
/Peter