Computes the time response of the system
dss = DiscreteStateSpace( A=[0.99005, 0.00985; 0, 0.9802], B=[0.01,0; 0,0.01], C=[1,0; 0,1], D=[0,0; 0,0], Ts=0.01, B2=[0,0; 0,0], method=Modelica_LinearSystems2.Types.Method.StepExact),
sampled at Ts=0.01 with inititial state x0=[0;0] subject to the system input u = ones(300,2) (which results with Ts=0.01 in 3 sec).
function analysisTimeResponse extends Modelica.Icons.Function; import Modelica_LinearSystems2.DiscreteStateSpace; import Modelica_LinearSystems2.Utilities.Plot; input Real u[:, 2] = ones(300, 2); output Real y[samples, 2] "System response (dimension: (input samples) x (number of outputs))"; output Real t[samples] "Time vector used for simulation"; output Real x[samples, 2] "State trajectories (dimension: (input samples) x (number of states)"; end analysisTimeResponse;