functionfromModel
Generate a ZerosAndPoles record array from a state space representation resulted from linearization of a model
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.fromFile followed by a conversion from state space to transfer function representation.
Example
String modelName = "Modelica_LinearSystems2.Examples.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) )]
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | modelName | Name of the Modelica model | |
| Real | T_linearize | 0 | Point in time of simulation to linearize the model |
| String | fileName | "dslin" | Name of the result file |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| ZerosAndPoles[:,:] | zp |