ZerosAndPoles.Plot.timeResponse(zp); or ZerosAndPoles.Plot.timeResponse( zp, dt, tSpan, response, x0, columnLabels, defaultDiagram=Modelica_LinearSystems2.Internal.DefaultDiagramTimeResponse(), device=Modelica_LinearSystems2.Utilities.Plot.Records.Device())
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.
ZerosAndPoles p = Modelica_LinearSystems2.ZerosAndPoles.p(); Modelica_LinearSystems2.ZerosAndPoles zp =(p + 1)/(p^2 + 5*p + 12); Types.TimeResponse response = Modelica_LinearSystems2.Utilities.Types.TimeResponse.Step; algorithm Modelica_LinearSystems2.ZerosAndPoles.Plot.timeResponse(zp, dt=0.02, tSpan=3, response=response) // gives:
impulse, step, ramp, initialResponse
encapsulated function timeResponse import Modelica_LinearSystems2; import Modelica_LinearSystems2.ZerosAndPoles; import Modelica_LinearSystems2.Utilities.Types.TimeResponse; import Modelica_LinearSystems2.Utilities.Plot; input ZerosAndPoles zp; input Real dt = 0 "Sample time [s]"; input Real tSpan = 0 "Simulation time span [s]"; input TimeResponse response = TimeResponse.Step "type of time response"; input Real x0[ZerosAndPoles.Analysis.denominatorDegree(zp)] = zeros(ZerosAndPoles.Analysis.denominatorDegree(zp)) "Initial state vector"; extends Modelica_LinearSystems2.Internal.PartialPlotFunction(defaultDiagram = Modelica_LinearSystems2.Internal.DefaultDiagramTimeResponse(heading = "time response of zp = " + String(zp))); end timeResponse;