sos2tf
Converting the data of the second-order sections of the digital filter into a transfer function.
| Library |
|
Arguments
Input arguments
# sos — representation of the second-order section
+
the matrix
Details
The representation of the second-order section, defined as a matrix. Argument sos — this is a matrix of size
the rows of which contain the coefficients of the numerator and denominator
| Типы данных |
|
| Support for complex numbers |
Yes |
# g is the total gain of the system
+
scalar
Details
The total gain of the system, given as a real scalar.
| Типы данных |
|
Output arguments
# b,a are the coefficients of the transfer function
+
vectors
Details
Coefficients of the transfer function returned as row vectors. Output arguments b and a they contain the coefficients of the numerator and denominator of the function
Examples
Representation of a second-order partition system using a transfer function
Details
Let’s calculate the representation of a simple second-order partition system using a transfer function.
import EngeeDSP.Functions: sos2tf
sos = [1 1 1 1 0 -1; -2 3 1 1 10 1]
b, a = sos2tf(sos)
println("b = ", b, "\na = ", a)
b = [-2.0 1.0 2.0 4.0 1.0]
a = [1.0 10.0 0.0 -10.0 -1.0]
Algorithms
In sos2tf The function is used conv to multiply all second-order polynomials in the numerator and denominator. For higher-order filters (possibly starting from the 8th order), numerical problems may arise due to rounding errors when forming the transfer function.