.Modelica_LinearSystems2.StateSpace.Analysis.stepResponse

Information

Syntax

(y, t, x) = StateSpace.Analysis.stepResponse(ss, dt, tSpan)

Description

Function stepResponse calculates the step response of a state space system. 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.

StateSpace.Analysis.stepResponse(ss, dt, tSpan)

gives the same result as

StateSpace.Analysis.timeResponse(ss, dt, tSpan, response=Types.TimeResponse.Step, x0=fill(0,size(ss.A,1))).

Example

  Modelica_LinearSystems2.StateSpace ss=Modelica_LinearSystems2.StateSpace(
    A=[-1],
    B=[1],
    C=[2],
    D=[0]);
  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):=StateSpace.Analysis.stepResponse(ss,Ts,tSpan);
//  y[:,1,1]={0, 0.19, 0.3625, 0.518, 0.659}
//         t={0, 0.1, 0.2, 0.3, 0.4}
//  x[:,1,1]={0, 0.0952, 0.1813, 0.2592, 0.33}

See also

StateSpace.Analysis.timeResponse

Interface

encapsulated function stepResponse
  import Modelica_LinearSystems2;
  extends Modelica_LinearSystems2.Internal.timeResponseMask2;
end stepResponse;

Revisions

Date Author Comment
2010-05-31 Marcus Baur, DLR-RM Realization

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