Home > complex-toolbox > Hybrid > hybrid.m

hybrid

PURPOSE ^

FUNCTION hybrid() implement the hybrid filter combining the CLMS

SYNOPSIS ^

function y = hybrid(x,N,mu1,mu2,lambda,mu3)

DESCRIPTION ^

 FUNCTION hybrid() implement the hybrid filter combining the CLMS
 algorithm and ACLMS algorithm.
 
 Based on the paper "Collaborative adaptive filtering in the complex domain"
 IEEE Workshop on Machine Learning for Signal Processing, 421-425, 2008.

 INPUT:
 x: input signal 
 N: filter length of CLMS (that of ACLMS is N1 * 2)
 mu1: step-size of CLMS
 mu2: step-size of ACLMS
 lambda: mixing parameter
 mu3: step-size of adaptation of lambda

 OUTPUT:
 y: filter output


 Complex Valued Nonlinear Adaptive Filtering toolbox for MATLAB
 Supplementary to the book:
 
 "Complex Valued Nonlinear Adaptive Filters: Noncircularity, Widely Linear and Neural Models"
 by Danilo P. Mandic and Vanessa Su Lee Goh
 
 (c) Copyright Danilo P. Mandic 2009
 http://www.commsp.ee.ic.ac.uk/~mandic
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
 
    You can obtain a copy of the GNU General Public License from
    http://www.gnu.org/copyleft/gpl.html or by writing to
    Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 ...........................................

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % FUNCTION hybrid() implement the hybrid filter combining the CLMS
0002 % algorithm and ACLMS algorithm.
0003 %
0004 % Based on the paper "Collaborative adaptive filtering in the complex domain"
0005 % IEEE Workshop on Machine Learning for Signal Processing, 421-425, 2008.
0006 %
0007 % INPUT:
0008 % x: input signal
0009 % N: filter length of CLMS (that of ACLMS is N1 * 2)
0010 % mu1: step-size of CLMS
0011 % mu2: step-size of ACLMS
0012 % lambda: mixing parameter
0013 % mu3: step-size of adaptation of lambda
0014 %
0015 % OUTPUT:
0016 % y: filter output
0017 %
0018 %
0019 % Complex Valued Nonlinear Adaptive Filtering toolbox for MATLAB
0020 % Supplementary to the book:
0021 %
0022 % "Complex Valued Nonlinear Adaptive Filters: Noncircularity, Widely Linear and Neural Models"
0023 % by Danilo P. Mandic and Vanessa Su Lee Goh
0024 %
0025 % (c) Copyright Danilo P. Mandic 2009
0026 % http://www.commsp.ee.ic.ac.uk/~mandic
0027 %
0028 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0029 %    This program is free software; you can redistribute it and/or modify
0030 %    it under the terms of the GNU General Public License as published by
0031 %    the Free Software Foundation; either version 2 of the License, or
0032 %    (at your option) any later version.
0033 %
0034 %    This program is distributed in the hope that it will be useful,
0035 %    but WITHOUT ANY WARRANTY; without even the implied warranty of
0036 %    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0037 %    GNU General Public License for more details.
0038 %
0039 %    You can obtain a copy of the GNU General Public License from
0040 %    http://www.gnu.org/copyleft/gpl.html or by writing to
0041 %    Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA.
0042 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0043 % ...........................................
0044 function y = hybrid(x,N,mu1,mu2,lambda,mu3)
0045 
0046 M = 1;% prediction horizon
0047 L = length(x)-M; %
0048 filterinput = zeros(N,L); 
0049 WCLMS = zeros(N,1); % weight vector of subfilter 1
0050 eCLMS = zeros(1,L); % error of subfilter 1
0051 suboutput1 = zeros(1,L); % output of subfilter 1
0052 
0053 WACLMS = zeros(2*N,1); % weight vector of subfilter 2
0054 eACLMS = zeros(1,L); % error of subfilter 2
0055 suboutput2 = zeros(1,L); % output of subfilter 2
0056 
0057 ehybrid = zeros(1,L);
0058 filteroutput = zeros(1,L); 
0059 
0060 for i = 1:L
0061     for m = 1:N
0062         if (i-m+1)>0
0063             filterinput(m,i) = x(1,i-m+1);
0064         else
0065             filterinput(m,i) = 0;
0066         end
0067     end
0068     suboutput1(i) =  transpose(filterinput(:,i)) * WCLMS;
0069     suboutput2(i) =  transpose([filterinput(:,i);conj(filterinput(:,i))]) * WACLMS;
0070     eCLMS(i) = x(1,i+M) - suboutput1(i);
0071     eACLMS(i) = x(1,i+M) - suboutput2(i);
0072     filteroutput(i) = lambda * suboutput1(i) + (1-lambda) * suboutput2(i);
0073     ehybrid(i) = x(1,i+M) - filteroutput(i);% error(k)
0074     WCLMS = WCLMS + mu1 * eCLMS(i) * conj(filterinput(:,i));% weight update of subfilter 1
0075     WACLMS = WACLMS + mu2 * eACLMS(i) * conj([filterinput(:,i);conj(filterinput(:,i))]);% weight update of subfilter 2
0076     lambda = lambda + mu3 * real(ehybrid(i) * conj(suboutput1(i)-suboutput2(i)));% update of lambda
0077 end
0078 y = filteroutput;
0079

Generated on Tue 21-Apr-2009 19:50:21 by m2html © 2003