Engee documentation

sos2zp

Converting the parameters of the second-order sections of a digital filter into a form with zeros, poles, and a gain factor.

Library

EngeeDSP

Syntax

Function call

  • z,p,k = sos2zp(sos) — returns the zeros, poles, and gain of the system, the representation of which in the second-order sections is given by the argument sos.

  • z,p,k = sos2zp(sos,g) — returns the zeros, poles, and gain of the system, the representation of which in the second-order sections is given by the argument sos with a gain factor g.

Arguments

Input arguments

# sos — representation of second-order sections

+ the matrix

Details

The representation of the second-order sections, defined as a matrix. Argument sos — this is a matrix of size

the rows of which contain the coefficients of the numerator and denominator and second-order sections of the function :

Типы данных

Float32, Float64

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.

Типы данных

Float32, Float64

Output arguments

# z — zeros

+ vector

Details

The zeros of the system returned as a vector.

# p — poles

+ vector

Details

The poles of the system, returned as a vector.

# k is the scalar gain

+ scalar

Details

The scalar gain of the system, returned as a scalar.

Examples

Zeros, poles, and system gain

Details

Let’s calculate the zeros, poles, and gain of a simple system in the form of second-order sections.

import EngeeDSP.Functions: sos2zp

sos = [1  1  1  1  0 -1; -2  3  1  1  10  1]
z, p, k = sos2zp(sos)
println("z = ", z, "\np = ", p, "\nk = ", k)
z = ComplexF64[-0.5 - 0.8660254037844385im, -0.5 + 0.8660254037844385im, -0.28077640640441515 + 0.0im, 1.7807764064044151 + 0.0im]
p = [-1.0, 1.0, -9.898979485566356, -0.10102051443364381]
k = -2

Algorithms

Function sos2zp finds the poles and zeros of each second-order section by repeatedly calling the function tf2zp.