functioninitialResponse
Initial condition response plot of a discrete state space system
Extends from Modelica_LinearSystems2.Internal.PartialPlotFunctionMIMO (Interface of a plot function for MIMO systems).
Information
Syntax
DiscreteStateSpace.Plot.initialResponse(ss); or DiscreteStateSpace.Plot.initialResponse( dss, tSpan, x0, defaultDiagram=Modelica_LinearSystems2.Internal.DefaultDiagramTimeResponse(), device=Modelica_LinearSystems2.Utilities.Plot.Records.Device())
Description
This function plots the initial responses of a discrete state space system for the initial state vector x0 for each system corresponding to the transition matrix. It is based on timeResponse.
Example
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])
Real x0={1,0.5,0.5};
Real Ts = 0.1;
Modelica_LinearSystems2.Types.Method method=Modelica_LinearSystems2.Types.Method.StepExact;
DiscreteStateSpace dss=DiscreteStateSpace(dss,Ts,method);
algorithm
Modelica_LinearSystems2.DiscreteStateSpace.Plot.initial(dss, x0=x0)
See also
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| DiscreteStateSpace | dss | ||
| Real | tSpan | 0 | Simulation time span [s] |
| Real[size(dss.A, 1)] | x0 | zeros(size(dss.A, 1)) | Initial state vector |
| Boolean | subPlots | true | True, if all subsystem time responses are plotted in one window with subplots |
| Plot.Records.Diagram | defaultDiagram (from PartialPlotFunctionMIMO) | Default diagram layout | |
| Plot.Records.Device | device (from PartialPlotFunctionMIMO) | Modelica_LinearSystems2.Utilities.Plot.Records.Device() | Properties of device where figure is shown |