Home > complex-toolbox > AANGD > aangd.m

aangd

PURPOSE ^

FUNCTION aangd() implements the AANGD algorithm

SYNOPSIS ^

function y = aangd(x,N,mu,lambda,rho)

DESCRIPTION ^

 FUNCTION aangd() implements the AANGD algorithm

 Based on the paper "A complex-valued nonlinear neural adaptive filter with a gradient adaptive amplitude of the activation function"
 Neural Networks, vol. 16, issue 2, pp. 155-159, 2003.

 INPUT:
 x: input signal which should be scaled according to the dynamic range of nonlinearity 
 N: filter length
 mu: step-size
 lambda: initial value of amplitude of nonlinearity 
 rho: step-size of adaptive amplitude

 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 aangd() implements the AANGD algorithm
0002 %
0003 % Based on the paper "A complex-valued nonlinear neural adaptive filter with a gradient adaptive amplitude of the activation function"
0004 % Neural Networks, vol. 16, issue 2, pp. 155-159, 2003.
0005 %
0006 % INPUT:
0007 % x: input signal which should be scaled according to the dynamic range of nonlinearity
0008 % N: filter length
0009 % mu: step-size
0010 % lambda: initial value of amplitude of nonlinearity
0011 % rho: step-size of adaptive amplitude
0012 %
0013 % OUTPUT:
0014 % y: filter output
0015 %
0016 % Complex Valued Nonlinear Adaptive Filtering toolbox for MATLAB
0017 % Supplementary to the book:
0018 %
0019 % "Complex Valued Nonlinear Adaptive Filters: Noncircularity, Widely Linear and Neural Models"
0020 % by Danilo P. Mandic and Vanessa Su Lee Goh
0021 %
0022 % (c) Copyright Danilo P. Mandic 2009
0023 % http://www.commsp.ee.ic.ac.uk/~mandic
0024 %
0025 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0026 %    This program is free software; you can redistribute it and/or modify
0027 %    it under the terms of the GNU General Public License as published by
0028 %    the Free Software Foundation; either version 2 of the License, or
0029 %    (at your option) any later version.
0030 %
0031 %    This program is distributed in the hope that it will be useful,
0032 %    but WITHOUT ANY WARRANTY; without even the implied warranty of
0033 %    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0034 %    GNU General Public License for more details.
0035 %
0036 %    You can obtain a copy of the GNU General Public License from
0037 %    http://www.gnu.org/copyleft/gpl.html or by writing to
0038 %    Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA.
0039 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0040 % ...........................................
0041 function y = aangd(x,N,mu,lambda,rho)
0042 
0043 
0044 M = 1;% prediction horizon
0045 L = length(x)-M; % run length
0046 filterinput = zeros(N,L); 
0047 WAANGD = zeros(N,1); % weight vector of standard input vector
0048 eAANGD = zeros(1,L); % error
0049 filteroutput = zeros(1,L); 
0050 
0051 for i = 1:L
0052     for m = 1:N
0053         if (i-m+1)>0
0054             filterinput(m,i) = x(1,i-m+1);
0055         else
0056             filterinput(m,i) = 0;
0057         end
0058     end % inputting FIR
0059     filteroutput(i) = transpose(filterinput(:,i)) * WAANGD;% output of FIR filter
0060     output(i) = lambda * f(filteroutput(i));
0061     eAANGD(i) = x(i+M) - output(i);% error(k) of nonlinear FIR filter
0062     WAANGD = WAANGD + mu * eAANGD(i) * conj(fderive(filteroutput(i))) * conj(filterinput(:,i));% weight update
0063     lambda = lambda + rho * real(eAANGD(i) * conj(f(filteroutput(i)))); % update of adaptive amplitude
0064 end
0065 y = output;
0066 
0067 
0068

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