.Modelica_LinearSystems2.DiscreteZerosAndPoles.Plot.bode

Information

Syntax

DiscreteZerosAndPoles.Plot.bode(dzp)
   or
DiscreteZerosAndPoles.Plot.bode(
  dzp,
  nPoints,
  autoRange,
  f_min,
  f_max,
  magnitude=true,
  phase=true,
  defaultDiagram=Modelica_LinearSystems2.Internal.DefaultDiagramBodePlot(),
  device=Modelica_LinearSystems2.Utilities.Plot.Records.Device() )

Description

This function plots the bode-diagram of a DiscreteZerosAndPoles transfer function.

Example

  DiscreteZerosAndPoles q = Modelica_LinearSystems2.DiscreteZerosAndPoles.q();
  Modelica_LinearSystems2.DiscreteZerosAndPoles dzp=(q^2 - 1.5*q + 0.6)/( (q - 0.8)*(q - 0.75) )

algorithm
  Modelica_LinearSystems2.DiscreteZerosAndPoles.Plot.plotBode(dzp)
//  gives:

Interface

encapsulated function bode
  import Modelica;
  import Modelica.ComplexMath;
  import Complex;
  import Modelica_LinearSystems2.Internal;
  import Modelica_LinearSystems2.ZerosAndPoles;
  import Modelica_LinearSystems2.DiscreteZerosAndPoles;
  import Modelica_LinearSystems2.Utilities.Plot;
  import Modelica.Units.SI;
  input DiscreteZerosAndPoles dzp "DiscreteZerosAndPoles function to be plotted";
  input Integer nPoints(min = 2) = 200 "Number of points";
  input Boolean autoRange = true "True, if abszissa range is automatically determined";
  input SI.Frequency f_min(min = 0) = 0.1 "Minimum frequency value, if autoRange = false" annotation(
    Dialog(enable = not autoRange));
  input SI.Frequency f_max(min = 0) = 10 "Maximum frequency value, if autoRange = false" annotation(
    Dialog(enable = not autoRange));
  input Boolean magnitude = true "= true, to plot the magnitude of dzp" annotation(
    choices(checkBox = true));
  input Boolean phase = true "= true, to plot the phase of dzp" annotation(
    choices(checkBox = true));
  extends Internal.PartialPlotFunction(defaultDiagram = Internal.DefaultDiagramBodePlot(heading = "Bode plot: " + String(dzp)));
  input Boolean Hz = true "= true, to plot abszissa in [Hz], otherwise in [rad/s] (= 2*pi*Hz)" annotation(
    choices(checkBox = true));
  input Boolean dB = false "= true, to plot magnitude in [], otherwise in [dB] (=20*log10(value))" annotation(
    choices(checkBox = true),
    Dialog(enable = magnitude));
end bode;

Generated at 2024-12-03T19:25:34Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos