functionfromModel
Generate a TransferFunction data record from a state space representation resulted from linearization of a model
Information
Syntax
tf = TransferFunction.Import.fromModel(modelName, T_linearize, fileName)
Description
Generate a matrix of TransferFunction 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.fromFile followed by a conversion from sate space to transfer function representation.
Example
String modelName = "Modelica_LinearSystems2.Utilities.Plants.DoublePendulum";
Real T_linearize = 5;
algorithm
tf = Modelica_LinearSystems2.TransferFunction.Import.fromModel(modelName, T_linearize);
// tf = [(0.13*s^4 + 0.05558*s^3 + 1.12241*s^2 - 5.16971*s + 9.04744)/(s^6 + 0.09*s^5 + 9.13717*s^4 - 32.0637*s^3 + 58.78*s^2 + 6.3659e-014*s - 1.1703e-014);
(0.13*s^4 + 0.05558*s^3 + 1.12241*s^2 - 5.16971*s + 9.04744)/(s^5 + 0.09*s^4 + 9.13717*s^3 - 32.0637*s^2 + 58.78*s - 2.7929e-015);
(-0.014*s^2 + 0.31906*s - 0.8106)/(s^4 + 0.09*s^3 + 9.13717*s^2 - 32.0637*s + 58.78);
(-0.014*s^3 + 0.31906*s^2 - 0.8106*s)/(s^4 + 0.09*s^3 + 9.13717*s^2 - 32.0637*s + 58.78);
(-0.1*s^2 - 0.160918*s - 0.21842)/(s^4 + 0.09*s^3 + 9.13717*s^2 - 32.0637*s + 58.78);
(-0.1*s^3 - 0.160918*s^2 - 0.21842*s)/(s^4 + 0.09*s^3 + 9.13717*s^2 - 32.0637*s + 58.78)]
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 |
|---|---|---|---|
| TransferFunction[:,:] | tf |