% RDRNLMS used in a simple system identification application.
% The learning curves of the RDRNLMS is compared for several
% values of the number of data reusing cycles.
iter = 5000; % Number of samples to process
% Complex unknown impulse response
h = [.9 + i*.4; 0.7+ i*.2; .5; .3+i*.1; .1];
xn = 2*(rand(iter,1)-0.5); % Input signal, zero mean random.
xn = filter([.05],[1 -.95], xn);
dn = osfilter(h,xn); % Unknown filter output
M = [0, 2, 4, 8]; % data reusing cycles
en = zeros(iter,length(M)); % vector to collect the error
%% Processing Loop
for n = 1:length(M)
% Initialize the RDRNLMS algorithm with a filter of 10 coef.
[w,x,d,y,e,p]=init_rdrnlms(10,M(n));
for (m=1:iter)
x = [xn(m,:); x(1:end-1,:)]; % update the input delay line
d = [dn(m,:) + 1e-3*rand; d(1:end-1)];
[w,y,e,p]= asptrdrnlms(x,w,d,.005,p,.98);
en(m,n) = e(1);
end;
end;
% display the results
subplot(2,2,1);stem([real(w) imag(conj(w))]); grid;
subplot(2,2,2);eb = filter(0.1, [1 -.9] , en .* conj(en));
plot(10*log10(eb ));grid
Running the above script will produce the graph shown in Fig. 4.16.
The left side graph of the figure shows the adaptive filter coefficients after
convergence. The right side graph shows the learning curve for RDRNLMS for
. The case of is equivalent to the NLMS algorithm
and is included as a reference. Fig. 4.16 suggests that
the convergence speed improves as increases.
|