Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Variable step-size NLMS adaptive algorithm

Status
Not open for further replies.

AnotherPenName

Newbie level 1
Joined
Oct 31, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,288
Hello all,

I am trying to create the variable step-size NLMS algorithm in the paper “A New Variable Step Size NLMS Algorithm and Its Performance Analysis” by Hsu-Chang Huang and Junghsi Lee, but the performance is only comparable to the standard NLMS algorithm. I though it would performs far better then the standard NLMS algorithm. I’ve checked and double checked the code, but I don’t see anything wrong with it. Please take a look at the code below and let me know if I did anything wrong.

Thanks,

-Andrew

A picture of the algorithm can be found here: https://imageshack.us/photo/my-images/855/vsmlms.png/
View attachment VSMLMS.bmp

Code:
%=================================================
clear all; close all; clc;

k           = 5000;      % number of samples
run         = 100;
tap         = 64;        % number of filter weights
sigma_n2    = 0.01;  	% noise power
sigma_x2    = 1;        % signal power

unknown_system = fircband(tap-1,[0 0.4 0.5 1], [1 1 0 0],[1 0.2], {'w' 'c'});
x = sqrt(sigma_x2)*randn(k,1); % Creating the input signal
n = sqrt(sigma_n2)*randn(1,k);       % noise

d = zeros(k,1);     % desired signal = unknown_system' * x + n
X = zeros(tap,1);
for p = 1:k
	X       =   [x(p,1); X(1:(tap-1),1)];     % input signal (tapped delay line)
	d(p)    =   (unknown_system*X(:,1)) + n(p);       % desired signal
end

xk = [zeros(1,tap-1) x'];
w0 = zeros(tap,1);
weight(:,1) = reshape(w0,length(w0),1);

mu = 1;
alpha = 0.998;
beta = 15;
epsilon = 0.01;
sigma2_e = 0;
sigma2_x = 0;
RexHat = 0;

for i = 1:k;
    Xk(1:tap,1) = xk(i+(tap-1):-1:i);
    Yk(i) = weight(:,i)' * Xk;
    e(i) = d(i) - Yk(i);

      sigma2_e = alpha*sigma2_e + (1-alpha)*e(i)^2;		% Estimate MSE
      sigma2_x = alpha*sigma2_x + (1-alpha)*mean(Xk)^2;	% Estimate input power
      RexHat = alpha*RexHat + (1-alpha)*Xk*e(i);
      sigma2_v = sigma2_e - (1/sigma2_x)*(RexHat'*RexHat);

      mu = alpha*mu + (1-alpha)*sigma2_e/(beta*sigma2_v);

      weight(:,i+1) = weight(:,i) + (mu/(epsilon+Xk'*Xk))*conj(e(i))*Xk;
end

plot(1:length(e),20*log10(e.^2));
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top