ca2tf

Convert coupled allpass filter to transfer function form

Syntax

[b,a]=ca2tf(d1,d2)
[b,a]=ca2tf(d1,d2,beta)
[b,a,bp]=ca2tf(d1,d2)
[b,a,bp]=ca2tf(d1,d2,beta)

Description

[b,a]=ca2tf(d1,d2) returns the vector of coefficients b and the vector of coefficients a corresponding to the numerator and the denominator of the transfer function

H(z)=B(z)/A(z)=12[H1(z)+H2(z)]

d1 and d2 are real vectors corresponding to the denominators of the allpass filters H1(z) and H2(z).

[b,a]=ca2tf(d1,d2,beta) where d1, d2 and beta are complex, returns the vector of coefficients b and the vector of coefficients a corresponding to the numerator and the denominator of the transfer function

H(z)=B(z)/A(z)=12[(β¯)H1(z)+βH2(z)]

[b,a,bp]=ca2tf(d1,d2), where d1 and d2 are real, returns the vector bp of real coefficients corresponding to the numerator of the power complementary filter G(z)

G(z)=Bp(z)/A(z)=12[H1(z)H2(z)]

[b,a,bp]=ca2tf(d1,d2,beta), where d1, d2 and beta are complex, returns the vector of coefficients bp of real or complex coefficients that correspond to the numerator of the power complementary filter G(z)

G(z)=Bp(z)/A(z)=12j[(β¯)H1(z)+βH2(z)]

Examples

Create a filter, convert the filter to coupled allpass form, and convert the result back to the original structure (create the power complementary filter as well).

[b,a]=cheby1(10,.5,.4);

 

[d1,d2,beta]=tf2ca(b,a);

% tf2ca returns the denominators of the allpasses

[num,den,numpc]=ca2tf(d1, d2,beta);

% Reconstruct the original filter plus the power complementary one

[h,w,s]=freqz(num,den);

 

hpc = freqz(numpc,den);

 

s.plot = 'mag';

 

s.yunits = 'sq';

 

freqzplot([h hpc],w,s);

% Plot the mag response of the original filter and the power complementary one

Examples

collapse all

Create a filter, convert the filter to coupled allpass form, and convert the result back to the original structure (create the power complementary filter as well).

[b,a]=cheby1(10,.5,.4);
 [d1,d2,beta]=tf2ca(b,a);

tf2ca returns the denominators of the allpass filters

[num,den,numpc]=ca2tf(d1, d2,beta);

Plot the magnitude response of the original filter and the power complementary one.

fvtool(num,den,numpc,den,'Analysis','magnitude','MagnitudeDisplay',...
    'Magnitude Squared')

Extended Capabilities

See Also

| | |

Introduced in R2011a