TITLE:  Memory improved proportionate affine projection algorithm

 

Abstract: A new proportionate affine projection sign algorithm is proposed for network echo cancellation. It uses a recursive procedure and takes into account the previously computed proportionate coefficients. It is shown that the proposed algorithm can obtain a lower steady-state misalignment than other affine projection sign algorithms for different echo paths, impulsive interferences and step sizes.

function [m,w]=mip_apsa(x,d,miu,ord,p,h1,delta,a)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MEMORY IMPROVED PROPORTIONATE AFFINE PROJECTION SIGN ALGORITHM (MIP-APSA)
%
% F. Albu and H. K. Kwan, "Memory improved proportionate affine projection
% sign algorithm," IET Electronics Letters, volume 48, No. 20, pp. 1279-1281, 
% 27 September 2012
% Felix Albu
% http://falbu.50webs.com
% Electronics Faculty, Valahia University of Targoviste,
% 18-24 Bd.Unirii,130082, Targoviste, Romania
% INPUT PARAMETERS:
%   x: excitation signal 
%   d: desired signal 
%   miu: step size value (tipically smaller than 0.1 and greater than 0)
%   ord: filter length
%   p: projection order 
%   h1: impulse response
%   delta: regularization factor (small value)
%   a: proportionality factor (between -1 and 1)
%
% OUTPUT PARAMETERS:
%
%   m: normalized misalignment
%   w: filter weights
%
 
L1=length(h1);
N=length(x);
w=zeros(ord,1);
x1=zeros(ord,1);
D=zeros(p,1);
X=zeros(ord,p);
m=zeros(N,1);
epsilon = 0.001; % a small constant
P=zeros(ord,p);
for n=1:N
   x1=[x(n);x1(1:ord-1)];
   X=[x1,X(:,1:p-1)];
   D=[d(n);D(1:p-1)];
   E=D-X'*w;
   kd=(1-a)/(2*ord)+(1+a)*abs(w)/(epsilon+2*sum(abs(w)));
   P=[kd.*x1,P(:,1:p-1)]; 
   xs=P*sign(E);   
   R = xs'*xs+delta; 
   w=w+miu*xs/sqrt(R);
   m(n)=20*log10(norm([w',zeros(1,L1-ord)]-h1)/norm(h1));
end

 

load mip_apsa_file.mat % click and download the file to the current path

[m,w]=mip_apsa(x,d,miu,ord,p,h1,delta,a);

figure(1)

plot(m, 'r','linewidth',1);  

legend('MIP-APSA, p=8'), 

xlabel('\bf\fontsize{12}Samples')

ylabel('\bf\fontsize{12}Normalized misalignment, dB')

figure(2)

hold on

plot(w,'r'), plot(h1)

legend('estimated path','real path')

 

function [m,e,w]=mip_apsam_(x,d,miu,ord,p,h1,h2,N0,delta,a)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% MEMORY IMPROVED PROPORTIONATE AFFINE PROJECTION SIGN ALGORITHM (MIP-APSA)

%

% F. Albu and H. K. Kwan, "Memory improved proportionate affine projection

% sign algorithm," IET Electronics Letters, volume 48, No. 20, pp. 1279-1281, 

% 27 September 2012

% Felix Albu

% Valahia University of Targoviste,

% 18-24 Bd.Unirii,130082, Targoviste, Romania

% INPUT PARAMETERS:

%   x: excitation signal 

%   d: desired signal 

%   miu: step size value

%   ord: filter length

%   p: projection order

%   h1: impulse response for the first part of the simulation

%   h2: impulse response for the second part of the simulation

%   delta: regularization factor

%   a: proportionality factor

%

% OUTPUT PARAMETERS:

%

%   m: normalized misalignment

%   e: output error

%   w: filter weights

%

 

L1=length(h1);

L2=length(h2);

N=length(x);

w=zeros(ord,1);

x1=zeros(ord,1);

D=zeros(p,1);

X=zeros(ord,p);

m=zeros(N,1);

e=zeros(N,1);

epsilon = 0.01;

%delta = 0.01;

P=zeros(ord,p);

for n=1:N0

   x1=[x(n);x1(1:ord-1)];

   X=[x1,X(:,1:p-1)];

   D=[d(n);D(1:p-1)];

   Y=X'*w;

   E=D-Y;

   e(n)=E(1);

 

   kd=(1-a)/(2*ord)+(1+a)*abs(w)/(epsilon+2*sum(abs(w)));

   vect=kd.*x1;

   P=[vect,P(:,1:p-1)]; 

 

   xs=P*sign(E); 

     

   R = xs'*xs+delta; w=w+miu*xs/sqrt(R);

   m(n)=norm([w',zeros(1,L1-ord)]-h1)/norm(h1);

end

 

for n=N0+1:N

   x1=[x(n);x1(1:ord-1)];

   X=[x1,X(:,1:p-1)];

   D=[d(n);D(1:p-1)];

   Y=X'*w;

   E=D-Y;

   e(n)=E(1);

   kd=(1-a)/(2*ord)+(1+a)*abs(w)/(epsilon+2*sum(abs(w)));

   P=[kd.*x1,P(:,1:p-1)]; 

   xs=P*sign(E);  

   R = xs'*xs+delta; w=w+miu*xs/sqrt(R);

   m(n)=norm([w',zeros(1,L2-ord)]-h2)/norm(h2);

end