.Modelica_LinearSystems2.TransferFunction.Plot.timeResponse

Information

Syntax

TransferFunction.Plot.timeResponse(tf);
   or
TransferFunction.Plot.timeResponse(
  tf,
  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 transfer function. The character of the time response if defined by the input response, i.e. Impulse, Step, Ramp, or Initial.

Example

  TransferFunction s = Modelica_LinearSystems2.TransferFunction.s();
  Modelica_LinearSystems2.TransferFunction tf =(s + 1)/(s^2 + 5*s + 12);

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

algorithm
  Modelica_LinearSystems2.TransferFunction.Plot.timeResponse(tf, dt=0.02, tSpan=3, response=response)
//  gives:

See also

impulse, step, ramp, initialResponse

Interface

encapsulated function timeResponse
  import Modelica;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.TransferFunction;
  import Modelica_LinearSystems2.Utilities.Types.TimeResponse;
  import Modelica_LinearSystems2.Utilities.Plot;
  input Modelica_LinearSystems2.TransferFunction tf;
  input Real dt = 0 "Sample time [s]";
  input Real tSpan = 0 "Simulation time span [s]";
  input Modelica_LinearSystems2.Utilities.Types.TimeResponse response = Modelica_LinearSystems2.Utilities.Types.TimeResponse.Step "type of time response";
  input Real x0[TransferFunction.Analysis.denominatorDegree(tf)] = zeros(TransferFunction.Analysis.denominatorDegree(tf)) "Initial state vector";
  extends Modelica_LinearSystems2.Internal.PartialPlotFunction(defaultDiagram = Modelica_LinearSystems2.Internal.DefaultDiagramTimeResponse(heading = "Time response of  tf = " + String(tf)));
end timeResponse;

Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos