.Modelica_LinearSystems2.StateSpace.Plot.timeResponse

Information

Syntax

StateSpace.Plot.timeResponse(ss);
   or
StateSpace.Plot.timeResponse(
  ss,
  dt,
  tSpan,
  response,
  x0,
  defaultDiagram=Modelica_LinearSystems2.Internal.DefaultDiagramTimeResponse(),
  device=Modelica_LinearSystems2.Utilities.Plot.Records.Device())

Description

This function plots the time response of a state space system. The character of the time response if defined by the input response, i.e. Impulse, Step, Ramp or Initial.

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])

  Types.TimeResponse response=Modelica_LinearSystems2.Types.TimeResponse.Step;

algorithm
  Modelica_LinearSystems2.StateSpace.Plot.timeResponse(ss, response=response)
// gives:

See also

impulse, step, ramp, initial

Interface

encapsulated function timeResponse
  import Modelica;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.StateSpace;
  import Modelica_LinearSystems2.Utilities.Types.TimeResponse;
  import Modelica_LinearSystems2.Utilities.Plot;
  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 Modelica_LinearSystems2.Utilities.Types.TimeResponse response = Modelica_LinearSystems2.Utilities.Types.TimeResponse.Step;
  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 = "Time response"));
end timeResponse;

Generated at 2024-04-24T18:15:52Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos