DiscreteZerosAndPoles.Plot.timeResponse(dzp); or DiscreteZerosAndPoles.Plot.timeResponse( dzp, tSpan, response, x0, columnLabels, defaultDiagram=Modelica_LinearSystems2.Internal.DefaultDiagramTimeResponse(), device=Modelica_LinearSystems2.Utilities.Plot.Records.Device())
This function plots the time response of a discrete zeros and poles transfer function. The character of the time response if defined by the input response, i.e. Impulse, Step, Ramp, or Initial.
DiscreteZerosAndPoles q = Modelica_LinearSystems2.DiscreteZerosAndPoles.q(); DiscreteZerosAndPoles dzp=(q^2 - 1.5*q + 0.6)/( (q - 0.8)*(q - 0.75) ) dzp.Ts = 0.1; Types.TimeResponse response = Modelica_LinearSystems2.Utilities.Types.TimeResponse.Step; algorithm Modelica_LinearSystems2.DiscreteZerosAndPoles.Plot.timeResponse(dzp, tSpan=3, response=response) // gives:
impulse, step, ramp, initialResponse
encapsulated function timeResponse import Modelica_LinearSystems2; import Modelica_LinearSystems2.DiscreteZerosAndPoles; import Modelica_LinearSystems2.Utilities.Types.TimeResponse; import Modelica_LinearSystems2.Utilities.Plot; input DiscreteZerosAndPoles dzp; input Real tSpan = 0 "Simulation time span [s]"; input TimeResponse response = TimeResponse.Step "Type of time response"; input Real x0[DiscreteZerosAndPoles.Analysis.denominatorDegree(dzp)] = zeros(DiscreteZerosAndPoles.Analysis.denominatorDegree(dzp)) "Initial state vector"; extends Modelica_LinearSystems2.Internal.PartialPlotFunction(defaultDiagram = Modelica_LinearSystems2.Internal.DefaultDiagramTimeResponse(heading = "Time response of dzp = " + String(dzp))); end timeResponse;