Converts transfer function form filter coefficients to second order section form.
TF2SOS(b, a)
(sos, gain) = TF2SOS(b, a)
b |
- |
A series. The numerator (i.e. zero) coefficients
in ascending powers of |
a |
- |
A series. The denominator (i.e. pole) coefficients
in ascending powers of |
An Nx6 column series, where the first 3 columns contain the numerator coefficients and the last three columns contain the denominator coefficients. Each row represents a 2nd order stage.
(sos, gain) = TF2SOS(b, a) returns the Nx6 second order stages and gain in two separate variables.
b = {1};
a = {1, -0.5, 0.2};
sos = tf2sos(b, a);
sos == {1, 0, 0, 1, -0.5, 0.2}
The direct form filter coefficients represent the following Z transform:
The resulting 2nd order section coefficients represent the equivalent Z transform:
Since the original coefficients represent a single 2nd order system, the SOS denominator coefficients are identical.
b = {1};
a = {1, -0.5, 0.2, 0.1};
(sos, gain) = tf2sos(b, a);
sos == {{1, 0, 0, 1, -0.754856, 0.392379},
{1, 0, 0, 1, 0.254856, 0}}
gain == 1
The direct form filter coefficients represent the following Z transform:
The resulting SOS coefficients represent the equivalent Z transform:
The direct form coefficients are represented by two stages of SOS coefficients.
TF2SOS converts direct form filter coefficients to second order section
form. The direct form coefficients represent the terms of the rational
polynomial
z^{ } |
=^{ } |
e^{ jω} complex frequency |
N |
= |
number of numerator terms |
M |
= |
number of denominator terms |
The second order section form of the coefficients represent the equivalent 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.
See SOS2TF to convert second order section form coefficients to direct form.