.Modelica_LinearSystems2.TransferFunction.Analysis.stepResponse

Information

Syntax

(y, t, x) = TransferFunction.Analysis.stepResponse(tf, dt, tSpan, x0)

Description

Function stepResponse calculates the step response of a transfer function. The state space system is transformed to a appropriate discrete state space system and, starting at x(t=0)=0 and y(t=0)=C*x0 + D*u0, the outputs y and x are calculated for each time step t=k*dt.

TransferFunction.Analysis.stepResponse(tf, dt, tSpan)

gives the same result as

TransferFunction.Analysis.timeResponse(tf, dt, tSpan, response=Types.TimeResponse.Step, x0=fill(0,TransferFunction.Analysis.denominatorDegree(tf))).

Example

  TransferFunction s = Modelica_LinearSystems2.TransferFunction.s();
  Modelica_LinearSystems2.TransferFunction tf=1/(s^2+s+1);

  Real Ts=0.1;
  Real tSpan= 0.4;

  Real y[5,1,1];
  Real t[5];
  Real x[5,1,1]

algorithm
  (y,t,x):=TransferFunction.Analysis.stepResponse(tf,Ts,tSpan);
//  y[:,1,1]={0, 0.0048, 0.01867, 0.04, 0.0694}
//         t={0, 0.1, 0.2, 0.3, 0.4}
//  x[:,1,1]={0, 0.0048, 0.01867, 0.04, 0.0694}

See also

TransferFunction.Analysis.timeResponse

Interface

encapsulated function stepResponse
  import Modelica;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.TransferFunction;
  extends Modelica_LinearSystems2.Internal.timeResponseMask2_tf;
end stepResponse;

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