StateSpace.Plot.step(ss); or StateSpace.Plot.step( ss, dt, tSpan, x0, defaultDiagram=Modelica_LinearSystems2.Internal.DefaultDiagramTimeResponse(), device=Modelica_LinearSystems2.Utilities.Plot.Records.Device())
This function plots the step responses of a state space system for each system corresponding to the transition matrix. It is based on timeResponse.
Modelica_LinearSystems2.StateSpace ss=Modelica_LinearSystems2.StateSpace( A=[-1.0,0.0,0.0; 0.0,-2.0,3.0; 0.0,-2.0,-3.0], B=[1.0; 1.0; 0.0], C=[0.0,1.0,1.0], D=[0.0]) algorithm Modelica_LinearSystems2.StateSpace.Plot.step(ss, tSpan=3) // gives:
impulse, ramp, initialResponse
encapsulated function step import Modelica; import Modelica_LinearSystems2; import Modelica_LinearSystems2.StateSpace; import Modelica_LinearSystems2.Utilities.Types.TimeResponse; input StateSpace ss "State space system"; input Modelica.Units.SI.Time dt = 0 "Sample time"; input Modelica.Units.SI.Time tSpan = 0 "Simulation time span"; input Real x0[size(ss.A, 1)] = zeros(size(ss.A, 1)) "Initial state vector"; input Boolean subPlots = true "True, if all subsystem time responses are plotted in one window with subplots" annotation( Dialog, choices(checkBox = true)); extends Modelica_LinearSystems2.Internal.PartialPlotFunctionMIMO(defaultDiagram = Modelica_LinearSystems2.Internal.DefaultDiagramTimeResponse(heading = "Step response")); input TimeResponse response = TimeResponse.Step "type of time response"; end step;