.Modelica_LinearSystems2.DiscreteStateSpace.Analysis.rampResponse

Information

Syntax

      (y) = DiscreteStateSpace.Analysis.rampResponse(dss)
(y, t, x) = DiscreteStateSpace.Analysis.rampResponse(dss, tSpan, x0)

Description

Function rampResponse calculates the time response of a discrete state space system for ramp imput u = t. 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*dss.Ts. The function call

DiscreteStateSpace.Analysis.rampResponse(dss, tSpan)

gives the same result as

DiscreteStateSpace.Analysis.timeResponse(response=Types.TimeResponse.Ramp, dss, tSpan, x0=fill(0,size(ss.A,1))).

Note that an appropriate ramp response of a discrete system that is comparable to the ramp response of the corresponding continuous system requires the "RampExact" conversion from continuous system to discrete system.

Example

   Modelica_LinearSystems2.DiscreteStateSpace dss=Modelica_LinearSystems2.DiscreteStateSpace(
      A=[0.904837418036 ],
      B=[0.095162581964],
      C=[2],
      D=[0.0967483607192],
      B2=[0.0483741803596],
      Ts=0.1,
      method = Modelica_LinearSystems2.Types.Method.RampExact);

  Real tSpan= 0.4;

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

algorithm
  (y,t,x) := Modelica_LinearSystems2.DiscreteStateSpace.Analysis.rampResponse(dss,tSpan);
//  y[:,1,1] = {0, 0.00967, 0.03746, 0.08164, 0.14064}
//         t={0, 0.1, 0.2, 0.3, 0.4}
//  x[:,1,1] = {0, 0.00484, 0.01873, 0.04082, 0.07032}

See also

DiscreteStateSpace.Analysis.timeResponse, StateSpace.Analysis.rampResponse

Interface

encapsulated function rampResponse
  import Modelica;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.DiscreteStateSpace;
  extends Modelica_LinearSystems2.Internal.timeResponseMask_discrete;
end rampResponse;

Generated at 2024-04-24T18:15:52Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos