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
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica_LinearSystems2.TransferFunction | tf | Transfer function of a system | |
| Real | dt | 0 | Sample time [s] |
| Real | tSpan | 0 | Simulation time span [s] |
| Modelica_LinearSystems2.Utilities.Types.TimeResponse | response | Modelica_LinearSystems2.Utilities.Types.TimeResponse.Step | Type of time response |
| Real[TransferFunction.Analysis.denominatorDegree(tf)] | x0 | zeros(TransferFunction.Analysis.denominatorDegree(tf)) | Initial state vector |
| Plot.Records.Diagram | defaultDiagram (from PartialPlotFunction) | Default diagram layout | |
| Plot.Records.Device | device (from PartialPlotFunction) | Modelica_LinearSystems2.Utilities.Plot.Records.Device() | Properties of device where figure is shown |