Converts second order section form filter coefficients to zeros, poles and gain.
SOS2ZP(sos, g)
(z, p, k) = SOS2ZP(sos, g)
sos |
- |
A Nx6 array where the first 3 columns are the numerator terms and the last 3 columns are the denominator terms. Each row represents a 2nd order stage. |
g |
- |
Optional. A real, the system gain. Defaults to 1.0. |
A Nx3 array where the first column contains the zeros, the second column contains the poles and the third column contains the gain.
(z, p, k) = SOS2ZP(sos, g) returns the zeros, poles and gain as three separate arrays.
sos = {{1, -2, 0, 1, -0.7, 0.1}};
(z, p, k) = sos2zp(sos);
z = {0.0, 2.0};
p = {0.5, 0.2};
k = 1.0;
The 2nd order section filter coefficients represent the following Z transform:
z contains the zeros, p contains the poles and k is the gain of the system.
SOS2ZP converts second order section coefficients to zeros, poles and gain of a discrete system where the input coefficients represent the following Z transform:
or:
where G is the system gain, b_{k} and a_{k} are the filter coefficients for the k^{th} stage.
The SOS form is an Nx6 array:
{{b_{10}, b_{11}, b_{12}, 1.0, a_{11}, a_{12}},
_{ }{b_{20}, b_{21}, b_{22}, 1.0, a_{21}, a_{22}},
...
{b_{N0}, b_{N1}, b_{N2}, 1.0, a_{N1}, a_{N2}}}
Each row of the SOS coefficients represents a second order stage.
SOS2ZP also works for analog cascade coefficients. In this case, the cascade system function becomes:
or equivalently:
See ZP2SOS to convert zeros, poles and gain to SOS form.