.Modelica_LinearSystems2.ZerosAndPoles.Import.fromModel

Information

Syntax

zp = ZerosAndPoles.Import.fromModel(modelName, T_linearize, fileName)

Description

Generate a matrix of ZerosAndPoles data records by linearization of a model defined by modelName. The linearization is performed at time T_linearize of the simulation. The system is generated by using StateSpace.Import.fromModel followed by a conversion from state space to transfer function representation.

Example

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

algorithm
  zp = Modelica_LinearSystems2.ZerosAndPoles.Import.fromModel(modelName, T_linearize);

//  zp =[0.157605*(p + 0.706559)*(p + 12.3798)*(p^2-7.34273*p + 18.674)/( (p + 0.829834)*(p + 10.6304)*(p^2-7.27298*p + 18.1572)*(p^2 + 2.07022e-015*p + 3.38074e-015) );
         0.157605*(p + 0.706559)*(p + 12.3798)*(p^2-7.34273*p + 18.674)/( (p-1.94349e-015)*(p + 0.829834)*(p + 10.6304)*(p^2-7.27298*p + 18.1572) );
        -0.166305*(p^2-1.20297*p + 3.48327)/( (p + 0.829834)*(p + 10.6304)*(p^2-7.27298*p + 18.1572) );
        -0.166305*p*(p^2-1.20297*p + 3.48327)/( (p + 0.829834)*(p + 10.6304)*(p^2-7.27298*p + 18.1572) );
         0.283325*(p-5.23615)*(p + 0.551929)/( (p + 0.829834)*(p + 10.6304)*(p^2-7.27298*p + 18.1572) );
         0.283325*p*(p-5.23615)*(p + 0.551929)/( (p + 0.829834)*(p + 10.6304)*(p^2-7.27298*p + 18.1572) )]

Interface

function fromModel
  import Modelica;
  import DymolaCommands;
  import Simulator = DymolaCommands.SimulatorAPI;
  import Modelica_LinearSystems2.StateSpace;
  import Modelica_LinearSystems2.ZerosAndPoles;
  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";
  output ZerosAndPoles zp[:, :];
end fromModel;

Generated at 2024-11-26T19:26:15Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos