functiontimeResponse

Plot the time response of a system represented by a transfer function. The response type is selectable

Extends from Modelica_LinearSystems2.Internal.PartialPlotFunction (Interface of a plot function).

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

Inputs

TypeNameDefaultDescription
Modelica_LinearSystems2.TransferFunctiontfTransfer function of a system
Realdt0Sample time [s]
RealtSpan0Simulation time span [s]
Modelica_LinearSystems2.Utilities.Types.TimeResponseresponseModelica_LinearSystems2.Utilities.Types.TimeResponse.StepType of time response
Real[TransferFunction.Analysis.denominatorDegree(tf)]x0zeros(TransferFunction.Analysis.denominatorDegree(tf))Initial state vector
Plot.Records.DiagramdefaultDiagram (from PartialPlotFunction)Default diagram layout
Plot.Records.Devicedevice (from PartialPlotFunction)Modelica_LinearSystems2.Utilities.Plot.Records.Device()Properties of device where figure is shown