.Modelica_LinearSystems2.WorkInProgress.DiscreteStateSpace.'constructor'.fromReal

Information

Syntax

dss = 'constructor'.fromReal(r)
   or
dss = 'constructor'.fromReal(r, Ts, method)

Description

This function constructs a DiscreteStateSpace record dss from a Real value, i.e. a discrete state space system without a state and an output without dynamics:

y = r*u

Therefore, the matrices are defined by

dss.A = fill(0,0,0);
dss.B = fill(0,0,1);
dss.C = fill(0,1,0);
dss.D = [r];
dss.B2 = fill(0,0,1);

The default values of sample time Ts and discretization method method are

    Ts = 1
method = Modelica_LinearSystems2.Types.Method.Trapezoidal

respectively.

Interface

function fromReal
  import Modelica;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.WorkInProgress.DiscreteStateSpace;
  input Real r "Value of Real variable";
  input Modelica.Units.SI.Time Ts = 1 "Sample time";
  input Modelica_LinearSystems2.Utilities.Types.Method method = Modelica_LinearSystems2.Utilities.Types.Method.Trapezoidal "Discretization method";
  output DiscreteStateSpace dss(redeclare Real A[0, 0], redeclare Real B[0, 1], redeclare Real B2[0, 1], redeclare Real C[1, 0], redeclare Real D[1, 1]) "= r";
end fromReal;

Generated at 2024-11-23T19:25:52Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos