Transfer function to coupled allpass
[d1,d2] = tf2ca(b,a)
[d1,d2] = tf2ca(b,a)
[d1,d2,beta] = tf2ca(b,a)
[d1,d2] = tf2ca(b,a)
where b
is
a real, symmetric vector of numerator coefficients and a
is
a real vector of denominator coefficients, corresponding to a stable
digital filter, returns real vectors d1
and d2
containing
the denominator coefficients of the allpass filters H1(z) and H2(z) such
that
$$H(z)=\frac{B(z)}{A(z)}=\left(\frac{1}{2}\right)[H1(z)+H2(z)]$$
representing a coupled allpass decomposition.
[d1,d2] = tf2ca(b,a)
where b
is
a real, antisymmetric vector of numerator coefficients and a
is
a real vector of denominator coefficients, corresponding to a stable
digital filter, returns real vectors d1
and d2
containing
the denominator coefficients of the allpass filters H1(z) and H2(z) such
that
$$H(z)=\frac{B(z)}{A(z)}=\left(\frac{1}{2}\right)\left[H1(z)H2(z)\right]$$
In some cases, the decomposition is not possible with real H1(z) and H2(z). In those cases a generalized coupled allpass decomposition may be possible, as described in the following syntax.
[d1,d2,beta] = tf2ca(b,a)
returns complex
vectors d1
and d2
containing
the denominator coefficients of the allpass filters H1(z) and H2(z),
and a complex scalar beta
, satisfying beta

= 1, such that
$$H(z)=\frac{B(z)}{A(z)}=\left(\frac{1}{2}\right)\left[\overline{\beta}\cdot H1(z)+\beta \cdot H2(z)\right]$$
representing the generalized allpass decomposition.
In the above equations, H1(z) and H2(z) are real or complex allpass IIR filters given by
$$H1(z)=\frac{fliplr(\overline{(D1(z))})}{D1(z)},H2(1)(z)=\frac{fliplr(\overline{(D2(1)(z)}))}{D2(1)(z)}$$
where D1(z) and D2(z) are
polynomials whose coefficients are given by d1
and d2
.
A coupled allpass decomposition is not always possible. Nevertheless, Butterworth, Chebyshev, and Elliptic IIR filters, among others, can be factored in this manner. For details, refer to Signal Processing Toolbox™ User's Guide.
[b,a]=cheby1(9,.5,.4); [d1,d2]=tf2ca(b,a); % TF2CA returns denominators of the allpass. num = 0.5*conv(fliplr(d1),d2)+0.5*conv(fliplr(d2),d1); den = conv(d1,d2); % Reconstruct numerator and denonimator. MaxDiff=max([max(bnum),max(aden)]); % Compare original and reconstructed % numerator and denominators.
ca2tf
 cl2tf
 iirpowcomp
 latc2tf
 tf2latc