- Index
- » Developer
- » OpenModelica development
- » discussion on linearization
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
- Index
- » Developer
- » OpenModelica development
- » discussion on linearization