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

discussion on linearization

discussion on linearization

Consider this as a proposal


In the present “OMCompiler v1.16.0”  the workflow for linearization as follows:

Code:


omc --generateSymbolicLinearization  --linearizationDumpLanguage=modelica  buildMODEL.mos
./MODEL -l 0.0   #then a “linearized_model.mo” is created

with this model I can work now, using OM.

my approach: Separate code from data
In some cases it can be useful to run linearization with different sets of parameters. The dataset for ABCD presently is available as MODELICA Code. This makes parameter-studies less efficient. I'm using the ABCD matrices in post-processing routines for eigenvalue decomposition, transfer-function, participation-factors, … preferred in python language.

I also tried to use  --linearizationDumpLanguage=python  : the generated python code  is not correct.

A workaround attached.
I added some code in “linearize.cpp” to create a MAT4 file with ABCD,x0.  The names for states/input/output are found in MODEL_init.xml


Thanks for your comments.
BR / Johann

Re: discussion on linearization

I agree that a "Data" output (MAT or CSV or other typical format) would be useful. Perhaps you could open a ticket, especially since you have a patch ?

There are 0 guests and 0 other users also viewing this topic
You are here: