functionfromModel

Generate a DiscreteZerosAndPoles data record from a state space representation resulted from linearization of a model

Information

Syntax

dzp = DiscreteZerosAndPoles.Import.fromModel(modelName, T_linearize, fileName, Ts, method)

Description

Generate a matrix of DiscreteZerosAndPoles data records by linearization of a model defined by modelName. The linearization is performed at time T_linearize of the simulation. The system is genrated by using StateSpace.Import.fromModel followed by a conversion from state space to discrete zeros-and-poles transfer function representation.

Example

  String modelName = "Modelica_LinearSystems2.Utilities.Plants.DoublePendulum";
  Real T_linearize = 5;
  Modelica.Units.SI.Time Ts=0.01;

algorithm
  dzp = Modelica_LinearSystems2.DiscreteZerosAndPoles.Import.fromModel(modelName=modelName, T_linearize=T_linearize, Ts=Ts);

//  dzp [4.48586e-006*(q^2 - 2.03695*q + 1.0381)*(q^2 - 1.9622*q + 0.963301)*(q^2 + 2*q + 1)/( (q - 1)^2*(q^2 - 2.03237*q + 1.03391)*(q^2 - 1.96572*q + 0.967206) )
 //    Ts = 0.01
 //    method = Trapezoidal;
 //
 //    0.000897172*(q + 1)*(q^2 - 2.03695*q + 1.0381)*(q^2 - 1.9622*q + 0.963301)/( (q - 1)*(q^2 - 2.03237*q + 1.03391)*(q^2 - 1.96572*q + 0.967206) )
 //    Ts = 0.01
 //    method = Trapezoidal;
 //
 //    -5.60444e-006*(q^2 - 1.99889*q + 1)*(q^2 + 2*q + 1)/( (q^2 - 2.03237*q + 1.03391)*(q^2 - 1.96572*q + 0.967206) )
 //    Ts = 0.01
 //    method = Trapezoidal;
 //
 //    -0.00112089*(q - 1)*(q + 1)*(q^2 - 1.99889*q + 1)/( (q^2 - 2.03237*q + 1.03391)*(q^2 - 1.96572*q + 0.967206) )
 //    Ts = 0.01
 //    method = Trapezoidal;
 //
 //    4.16386e-006*(q^2 - 1.99989*q + 1)*(q^2 + 2*q + 1)/( (q^2 - 2.03237*q + 1.03391)*(q^2 - 1.96572*q + 0.967206) )
 //    Ts = 0.01
 //    method = Trapezoidal;
 //
 //    0.000832773*(q - 1)*(q + 1)*(q^2 - 1.99989*q + 1)/( (q^2 - 2.03237*q + 1.03391)*(q^2 - 1.96572*q + 0.967206) )
 //    Ts = 0.01
 //    method = Trapezoidal]

Inputs

TypeNameDefaultDescription
StringmodelNameName of the Modelica model
RealT_linearize0point in time of simulation to linearize the model
StringfileName"dslin"Name of the result file
Modelica.Units.SI.TimeTs1Sample time
Modelica_LinearSystems2.Utilities.Types.MethodmethodModelica_LinearSystems2.Utilities.Types.Method.TrapezoidalDiscretization method

Outputs

TypeNameDefaultDescription
DiscreteZerosAndPoles[:,:]dzp