Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

State space ODE

State space ODE

Hey,  my question:
Does Modelica transfer the DAE into state-space form (system of ODE's)?

If I want to model a system: For example a simpley model with a dynamic pipe and sink, source: Medium simple incompressible liquid water. What are the state variables (pressure, temperature,..?)?

Thank you for your help!

Re: State space ODE

Yes, OMC creates an ODE. If you run the translation with debug-flags, you can get the result:

Code:

-d=backenddaeinfo,stateselection

If you run omc from command-line, add those flags. OMEdit also has a place for compiler flags (Tools->Options->Simulation).
Note that OMC may use dynamic state selection, so you could have multiple variables corresponding to one state...

Re: State space ODE

Thank you very much for your reply! A general question: A model describes how the states evolve with time right? I read, that the states are the memory of
a sytem - if you know all state-varaibels you can describe the system. My question:  How can I chose/select state-variables, are they not give through the system-configuaration? For example. Mass-spring system: velocity and position? What would be states in that "pipe, source,sink" example?

What does "dynamic state selection" mean?

Once again -thank you very much

Re: State space ODE

If you have a higher-index problem, you do index reduction in order to get the system down to an ODE. This introduces artificial states, and which variable corresponds to a state can change over time (if I remember correctly).

If you want to select that a variable is always a state, you can do so by setting stateSelect=StateSelect.always for it. Then the tool will always choose it as a state (and it is an error if it cannot do so).

Re: State space ODE

Hello guys,

Thank you for your help in advance.

I am new to Modelica and i am using Dymola Software.
I have a thermal power plant model that was built by another person and I am trying to extract the differential equations or the state space representation of this model.

I translated the model to FMU file and exported it to Simulink. The model worked fine and gave proper simulation but it is treated as a black box with some inputs and outputs only and i cannot read the state variables of the system.

i got the dsmodel.mof file but it is not possible to read the ODE from there since it is a very complex system and i cannot extract the right equations. 

Does anyone know how to get a clear representation of the differential equations of the model in Dymola ?

Firas

There are 0 guests and 0 other users also viewing this topic