zp2tf
Converting filter parameters with zeros, poles, and gain into the form of a transfer function.
| Library |
|
Arguments
Input arguments
# z — zeros
+
vector | the matrix
Details
The zeros of the system are specified as a column vector or matrix. Argument z It has as many columns as there are output signals. The zeros must be real or represent complex conjugate pairs. Use values Inf as placeholders in z if some columns have fewer zeros than others.
| Типы данных |
|
| Support for complex numbers |
Yes |
# p — poles
+
vector
Details
The poles of the system, defined as a column vector. The poles must be real or represent complex conjugate pairs.
| Типы данных |
|
| Support for complex numbers |
Yes |
# k — gain factors
+
vector
Details
The system’s gain coefficients, set as a column vector.
| Типы данных |
|
Output arguments
# a — coefficients of the denominator of the transfer function
+
vector
Details
The coefficients of the denominator of the transfer function, returned as a string vector.
Examples
Transfer function of the mass-spring system
Details
Let’s calculate the transfer function of the damped mass-spring system satisfying the differential equation
The measured value is acceleration , and — the driving force. In Laplace space, the system is represented as follows:
The system has a single gain factor, double zero at and two complex conjugate poles.
k = 1
z = [0, 0]
p = roots([1, 0.01, 1])
2×1 Matrix{ComplexF64}:
-0.0050000000000000044 + 0.999987499921874im
-0.004999999999999977 - 0.999987499921874im
Using the function zp2tf to find the transfer function.
import EngeeDSP.Functions: zp2tf
b, a = zp2tf(z, p, k)
([1.0 0.0 0.0], [1.0 0.009999999999999981 0.9999999999999999])