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,    3.715,  -1.299   -3.374   0.116;
//          0.0,  0.0,    0.0  ,   1.0      0.0     0.0  ;
//          0.0,  0.0,  -12.738,   2.064  -23.625   4.437;
//          0.0,  0.0,    0.0  ,   0.0      0.0     1.0  ;
//          0.0,  0.0,   26.720,   4.435   36.990  -6.370 ],
// ss.B = [ 0,  0.157,  0, -0.167,  0,  0.285 ],
// 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
StateSpaceresultState space description of model linearized at initial point

Revisions

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