Jack
Jack

Reputation: 1242

How to assign the variables used in Modelica_LinearSystems2.ModelAnalysis.Linearize?

I'd like to use Modelica_LinearSystems2.ModelAnalysis.Linearize to analyze the dynamic characteristics of my model, so I execute the following commands, but in the result, the variables that I am interested in don't show up.
My question is:
How could I assign the specific variables used in the function of Modelica_LinearSystems2.ModelAnalysis.Linearize?

enter image description here

enter image description here

Upvotes: 2

Views: 175

Answers (1)

Hans Olsson
Hans Olsson

Reputation: 12527

That linearization is just based on the inputs, outputs, and states and you cannot change that function to linearize something else.

However, you can modify those sets of variables.

  • If you want to linearize the computation of any variable you can either change it to an output or add an new output as output Real my1=IWantToLinearize;
  • For states you can change so that some other variable is a state by using the stateSelect-attribute.
  • If you want to see how a change in another variable influences the result you cannot directly make it an input, but you could replace the use of internal variable xint by xint+u and declare u as an input, to linearize w.r.t. changes here. However, you have to be careful so that the computation of xint is unchanged.

Upvotes: 5

Related Questions