ZerosAndPoles.Plot.initialResponse(zp) or ZerosAndPoles.Plot.initialResponse( zp, dt, tSpan, y0, columnLabels, defaultDiagram=Modelica_LinearSystems2.Internal.DefaultDiagramTimeResponse(), device=Modelica_LinearSystems2.Utilities.Plot.Records.Device())
This function plots the initial response, i.e. the zeros input response of a zeros and poles transfer function. It is based on timeResponse.
ZerosAndPoles p = Modelica_LinearSystems2.ZerosAndPoles.p(); Modelica_LinearSystems2.ZerosAndPoles zp = (p + 1)/(p^2 + 5*p + 12); Real y0=1; algorithm Modelica_LinearSystems2.ZerosAndPoles.Plot.initialResponseZP(zp, y0=y0, dt=0.02, tSpan=3) // gives:
encapsulated function initialResponse import Modelica; import Modelica_LinearSystems2; import Modelica_LinearSystems2.ZerosAndPoles; import Modelica_LinearSystems2.Utilities.Types.TimeResponse; input ZerosAndPoles zp; input Real dt = 0 "Sample time [s]"; input Real tSpan = 0 "Simulation time span [s]"; input TimeResponse response = TimeResponse.Initial "type of time response"; input Real y0 "Initial output (for initial condition plot)"; extends Modelica_LinearSystems2.Internal.PartialPlotFunction(defaultDiagram = Modelica_LinearSystems2.Internal.DefaultDiagramTimeResponse(heading = "Initial response of zp = " + String(zp) + " with y0 = " + String(y0))); end initialResponse;