Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# cl2tf

Convert coupled allpass lattice to transfer function form

## Syntax

[b,a] = cl2tf(k1,k2)
[b,a] = cl2tf(k1,k2,beta)
[b,a,bp] = cl2tf(k1,k2)
[b,a,bp] = cl2tf(k1,k2,beta)

## Description

[b,a] = cl2tf(k1,k2) returns the numerator and denominator vectors of coefficients b and a corresponding to the transfer function

where H1(z) and H2(z) are the transfer functions of the allpass filters determined by k1 and k2, and k1 and k2 are real vectors of reflection coefficients corresponding to allpass lattice structures.

[b,a] = cl2tf(k1,k2,beta) where k1, k2 and beta are complex, returns the numerator and denominator vectors of coefficients b and a corresponding to the transfer function

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

[b,a,bp] = cl2tf(k1,k2,beta) where k1, k2 and beta are complex, returns the vector of coefficients bp of possibly complex coefficients corresponding to the numerator of the power complementary filter G(z)

## Examples

[b,a]=cheby1(10,.5,.4);  %TF2CL returns the reflection coeffs
[k1,k2,beta]=tf2cl(b,a); % Reconstruct the original filter
% plus the power complementary one.
[num,den,numpc]=cl2tf(k1,k2,beta);
[h,w]=freqz(num,den); hpc = freqz(numpc,den);
% and the power complementary one.
subplot(211);
plot(w./pi,20*log10(abs(h)),'k'); hold on; grid on;
plot(w./pi,20*log10(abs(hpc)),'b');
xlabel('Normalized Frequency (x \pi radians/sample)');
ylabel('dB');
legend('Original Filter','Power Complementary Filter',...
'Location','best');
subplot(212);
plot(w./pi,unwrap(angle(h)),'k'); hold on; grid on;
xlabel('Normalized Frequency (x \pi radians/sample)');
plot(w./pi,unwrap(angle(hpc)),'b');