functionfromPolesAndZeros

Generate a DiscreteZerosAndPoles data record from a set of zeros and poles

Information

Syntax

dzp = 'constructor'.fromPolesAndZeros(z, p, k, Ts, method)
dzp = 'constructor'.fromPolesAndZeros(z, p, k, Ts, method, uName, yName)

Description

This function constructs a DiscreteZerosAndPoles transfer function from denominator and numerator zeros, as well as a gain.

Since only transfer functions with real coefficients are supported, complex roots must be defined as conjugate complex pairs. It is required that complex conjugate pairs must directly follow each other as above. An error occurs if this is not the case.

Example

             (q + 0.1)
dzp = 4* -----------------
         (q + 1)*(q - 0.1)

is defined as

  import Complex;
  import Modelica_LinearSystems2.DiscreteZerosAndPoles;

  dzp = DiscreteZerosAndPoles(
          z = {Complex(-0.1,0)},
          p = {Complex(-1,0),
               Complex(0.1)},
               k=4);

Inputs

TypeNameDefaultDescription
Complex[:]zfill(Complex(0), 0)Zeros (Complex vector of numerator zeros)
Complex[:]pfill(Complex(0), 0)Poles (Complex vector of denominator zeros)
Realk1.0Constant multiplied with transfer function
Modelica.Units.SI.TimeTsSample time
Modelica_LinearSystems2.Utilities.Types.MethodmethodModelica_LinearSystems2.Utilities.Types.Method.TrapezoidalDiscretization method
StringuName""input name
StringyName""output name

Outputs

TypeNameDefaultDescription
DiscreteZerosAndPolesdzpZerosAndPoles transfer functions of the zeros, poles and k