functionfromModel

Generate a StateSpace data record by linearization of a model

Information

Syntax

ss = StateSpace.Import.fromModel(modelName, T_linearize, fileName)

Description

Generate a StateSpace data record by linearization of a model defined by modelName. The linearization is performed at time T_linearize of the simulation. The result of linearization is transformed into a StateSpace record.

Example

  String modelName = "Modelica_LinearSystems2.Utilities.Plants.DoublePendulum";
  Real T_linearize = 5;

algorithm
  ss = Modelica_LinearSystems2.StateSpace.Import.fromModel(modelName, T_linearize);

// ss.A = [ 0.0,   1.0,    0.0,            0.0,      0.0,     0.0;
            0.0,   0.0,          -2.26,    0.08,     1.95,   -0.45;
            0.0,   0.0,           0.0,            1.0,      0.0,     0.0;
            0.0,   0.0,          -3.09,   -1.38,     7.70,   -3.01;
            0.0,   0.0,           0.0,            0.0,      0.0,     1.0;
            0.0,   0.0,          -6.47,    1.637,   -2.90,    1.29],

// ss.B=[0.0; 0.13; 0.0; -0.014; 0.0; -0.1],
// ss.C=identity(6),
// ss.D=[0; 0; 0; 0; 0; 0]

Inputs

TypeNameDefaultDescription
StringmodelNameName of the model
RealT_linearize0Simulate until T_linearize and then linearize the model
StringfileName"dslin"Name of the result file
Stringmethod"Dassl"Integration method

Outputs

TypeNameDefaultDescription
StateSpaceresult= model linearized at initial point

Revisions

Date Author Comment
2010-05-31 Marcus Baur, DLR-RM Realization