dss = 'constructor'.fromReal(r) or dss = 'constructor'.fromReal(r, Ts, method)
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.
encapsulated function fromReal import Modelica; import Modelica_LinearSystems2; import Modelica_LinearSystems2.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;