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

Symbolic linearization

Symbolic linearization

Hi,
I tried to used the linearize function of OpenModelica 1.9.0 beta4 with a simple thermal model composed of 3 thermal conductors and 2 heat capacitors, so called 3R2C model.
I want to obtain the symbolic state-space representation :
A,B,C,and D= f(C1,C2, G1,G2,G3)
where C1 is the parameter C value of the 1st heat capacitor, G1 the parameter G value of the 1st conductor...
However when I used the linearize function I get the A,B,C and D matrixes in a numerical form.
Is there some flags to set to get this true symbolic form (including the parameter "influences").
Regards,
Gilles

Re: Symbolic linearization

Hello Gilles,

actually there is no flag to get the symbolic expressions,
since we are calculation the matrixes with an generic
directional derivative. Even more we don't differentiate
with respect to parameters.
But you can have a look at that directional derivative
with the debug flag: +d=dumpindxdae
Then you get for example for the VanDerPol model followinig
output:

Code:


Variables (2)
========================================
1:  $DER$Py$pDERA$PdummyVarA:STATE_DER()  type: Real
2:  $DER$Px$pDERA$PdummyVarA:STATE_DER()  type: Real


Equations (2, 2)
========================================
1/1 (1): $DER$Py$pDERA$PdummyVarA = lambda * (-2.0 * x$pDERA$Px * x * y + (1.0 - x ^ 2.0) * y$pDERA$Py) - x$pDERA$Px
2/2 (1): $DER$Px$pDERA$PdummyVarA = y$pDERA$Py

Where the equation represent directional derivative you can obtain
the columns of the Matrix A, by replacing the vector:
{ y$pDERA$Py, x$pDERA$Px}
by {1,0} and {0,1}.

I hope that helps a bit.
so long.
Willi

Re: Symbolic linearization

Hi Willi,
Thanks for the respond and sorry for the delay.

Actually I don't want to differentiate with respect to the parameters, I missspoke when I talk about parameters influences.
I want to differentiate with respect to the state variables, as it is done in the "linearize" function, but without the hard-coded parameter's value.
Therefore I want a form like A,B,C,and D= f(C1,C2, G1,G2,G3).

As you said I wil try to investigate the debug flag (dumpindxdae...).
Thanks again.
Regards,
Gilles

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