Home > complex-toolbox > Split_Complex_NGD > scngd.m

scngd

PURPOSE ^

FUNCTION scngd() implements the Split Complex NGD algorithm

SYNOPSIS ^

function y = scngd(x,N,mu)

DESCRIPTION ^

 FUNCTION scngd() implements the Split Complex NGD algorithm

 Based on the book "Signal Processing Techniques for Knowledge Extraction and Information Fusion"
 Springer US, 2008.


 INPUT:
 x: input signal which should be scaled according to the dynamic range of nonlinearity 
 N: filter length
 mu: step-size

 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 scngd() implements the Split Complex NGD algorithm
0002 %
0003 % Based on the book "Signal Processing Techniques for Knowledge Extraction and Information Fusion"
0004 % Springer US, 2008.
0005 %
0006 %
0007 % INPUT:
0008 % x: input signal which should be scaled according to the dynamic range of nonlinearity
0009 % N: filter length
0010 % mu: step-size
0011 %
0012 % OUTPUT:
0013 % y: filter output
0014 %
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 = scngd(x,N,mu)
0042 
0043 M = 1;% prediction horizon
0044 L = length(x)-M; % run length
0045 filterinput = zeros(N,L); 
0046 RWNGD = zeros(N,1); % weight vector of standard input vector
0047 IWNGD = zeros(N,1);
0048 realoutput = zeros(1,L);
0049 imagoutput = zeros(1,L);
0050 output = zeros(1,L);
0051 eReal = zeros(1,L);
0052 eImag = zeros(1,L);
0053 
0054 
0055 for i = 1:L
0056     for m = 1:N
0057         if (i-m+1)>0
0058             filterinput(m,i) = x(i-m+1);
0059         else
0060             filterinput(m,i) = 0;
0061         end
0062     end % inputing FIR
0063     realinput = real(filterinput);
0064     imaginput = imag(filterinput);
0065     realoutput(i) = transpose(realinput(:,i)) * RWNGD;
0066     imagoutput(i) = transpose(imaginput(:,i)) * IWNGD;
0067     output(i) = realoutput(i) + j * imagoutput(i);
0068     eReal(i) = real(x(i+M)) - f(realoutput(i));
0069     eImag(i) = imag(x(i+M)) - f(imagoutput(i));
0070     RWNGD = RWNGD + mu * eReal(i) * fderive(realoutput(i)) * realinput(:,i);
0071     IWNGD = IWNGD + mu * eImag(i) * fderive(imagoutput(i)) * imaginput(:,i);
0072 end
0073 y = output;
0074 
0075

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