.Modelica_LinearSystems2.DiscreteStateSpace.Internal.timeResponse1

Information

Computes the time response of a system in discrete state space form:

     x(Ts*(k+1)) = A * x(Ts*k) + B * u(Ts*k)
     y(Ts*k)     = C * x(Ts*k) + D * u(Ts*k)
     x_continuous(Ts*k) = x(Ts*k) + B2 * u(Ts*k)

Note that the system input u must be sampled with the discrete system sample time Ts.

Interface

encapsulated function timeResponse1
  import Modelica;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.DiscreteStateSpace;
  input DiscreteStateSpace dss "Linear system in discrete state space form";
  input Real u[:, size(dss.B, 2)] = ones(3, size(dss.B, 2)) "System input (dimension: (input samples) x (number of inputs))";
  input Real x0[size(dss.A, 1)] = zeros(size(dss.A, 1)) "Initial system state";
  output Real y[size(u, 1), size(dss.C, 1)] "System response (dimension: (input samples) x (number of outputs))";
  output Real x[size(u, 1), size(dss.A, 1)] "State trajectories (dimension: (input samples) x (number of states)";
end timeResponse1;

Generated at 2024-12-26T19:25:54Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos