Signal Processing Toolbox | Help Desk |
zp2sos
Zero-pole-gain to second-order section conversion.
sos = zp2sos(z,p,k)
sos = zp2sos(z,p,k,'
order
')
zp2sos
converts a zero-pole-gain representation of a given system to an equivalent second-order section representation.
sos = zp2sos(z,p,k)
finds a matrix sos
in second-order section form equivalent to the zero-pole-gain system represented by input arguments z
, p
, and k
. Vectors z
and p
contain the zeros and poles of the system H(z), not necessarily in any order:k
is a scalar gain. The zeros and poles must be real or come in complex conjugate pairs. sos
is an L-by-6 matrix:sos
is the maximum of the ceiling of N/2 and the ceiling of M/2, where N and M are the lengths of z
and p
, respectively.
sos = zp2sos(z,p,k,'
order
')
specifies the order of the rows in sos
, where order
is
down
, to order the sections so the first row of sos
contains the poles closest to the unit circle
up
, to order the sections so the first row of sos
contains the poles farthest from the unit circle (default)
[z,p,k] = butter(5,0.2); sos = zp2sos(z,p,k);
zp2sos
uses a four-step algorithm to determine the second-order section representation for an input zero-pole-gain system:
cplxpair
function.
zp2sos
groups real poles into sections with the real poles closest to them in
absolute value. The same rule holds for real zeros.
zp2sos
normally orders the sections with poles closest to the unit circle last in the cascade. You can tell zp2sos
to order the sections in the reverse order by specifying the down
flag.
Putting "high Q" sections at the beginning of the cascade, by specifying the
down
flag, reduces the response sensitivity of the filter to quantization noise
near those poles. Putting "high Q" sections at the end of the cascade (the default) prevents reduction in signal power level early in the cascade. zp2sos
orders all zero sections according to the minimum of |zi| and |zi-1| where
zi (for i = 1, 2) are the zeros in the section. References [1] and [2] provide detailed discussions of section ordering.
zp2sos
scales the sections so the maximum of the magnitude of the transfer function of the first N sections in cascade is less than 1:subject to the constraint that the overall gain, k
, stays the same: