.Modelica_LinearSystems2.DiscreteZerosAndPoles.Import.fromModel

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]

Interface

function fromModel
  import Modelica;
  import DymolaCommands;
  import Simulator = DymolaCommands.SimulatorAPI;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.StateSpace;
  import Modelica_LinearSystems2.DiscreteStateSpace;
  import Modelica_LinearSystems2.DiscreteZerosAndPoles;
  input String modelName "Name of the Modelica model" annotation(
    Dialog(__Dymola_translatedModel(translate = true)));
  input Real T_linearize = 0 "Point in time of simulation to linearize the model";
  input String fileName = "dslin" "Name of the result file";
  input Modelica.Units.SI.Time Ts = 1 "Sample time";
  input Modelica_LinearSystems2.Utilities.Types.Method method = Modelica_LinearSystems2.Utilities.Types.Method.Trapezoidal "Discretization method";
  output DiscreteZerosAndPoles dzp[:, :];
end fromModel;

Generated at 2024-04-18T18:15:58Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos