| Purpose |
| Performs filtering and coefficient update using the Variable Forgetting Factor Recursive Least Squares (VFFRLS) Adaptive algorithm. |
| Syntax |
[w,y,e,R,k,a] = asptvffrls(x,w,d,R,a,k,e,roh,a_min,a_max)
|
| Description |
asptvffrls() is an improved version of the conventional RLS algorithm optimized
for tracking applications. VFFRLS not only optimizes the filter coefficients but also
simultaneously optimizes the forgetting factor parameter for stability and fast tracking
in a similar manner as performed in the variable step size LMS algorithm.
The input and output parameters of asptvffrls() of length
Input Parameters [Size]::
x : vector of input samples at time n, [L x 1]
w : vector of filter coefficients w(n-1), [L x 1]
d : desired response d(n), [1 x 1]
R : last estimate of the inverse of the weighted
auto-correlation matrix of x, [L x L]
a : forgetting factor, [1 x 1]
k : last gain vector
e : last error sample
roh : forgetting factor step size [1 x 1]
a_min : lower bound for the forgetting factor [1 x 1]
a_max : higher bound for forgetting factor [1 x 1]
Output parameters::
w : updated filter coefficients w(n)
y : filter output y(n)
e : error signal, e(n)=d(n)-y(n)
R : updated R
|
| Example |
% VFFRLS used in a simple system identification application. % By the end of this script the adaptive filter w % should have the same coefficients as the unknown filter h. 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. % although xn is real, dn will be complex since h is complex dn = osfilter(h,xn); % Unknown filter output en = zeros(iter,1); % vector to collect the error a = 0.9; % initial forgetting factor av = zeros(iter,1); % storing changes in a % Initialize the VFFRLS algorithm with a filter of 10 coef. [w,x,d,y,e,R,k] = init_vffrls(10,.1); |
%% Processing Loop for (m=1:iter) % update the input delay line x = [xn(m,:); x(1:end-1,:)]; d = dn(m,:) + 1e-3*rand; % additive noise of var = 1e-6 % call VFFRLS to calculate the filter output, estimation error % and update the coefficients. [w,y,e,R,k,a]=asptvffrls(x,w,d,R,a,k,e,.01,.8,1-.0001); en(m,:) = e; % save the last error sample av(m) = a; % save the last value of a end; % display the results subplot(3,3,1);stem([real(w) imag(conj(w))]); grid; eb = filter(0.1,[1 -0.9], en .* conj(en)); subplot(3,3,2); plot(10*log10(eb ) );grid subplot(3,3,3);plot(av); grid; |
Running the above script will produce the graph shown in Fig. 4.22. The left side graph of the figure shows the adaptive linear combiner coefficients after convergence which are almost identical to the unknown filter h. The middle graph shows the square error in dB versus time during the adaptation process, which is usually called the learning curve. The lower limit of the error signal power in the learning curve is defined here by the additive white noise added at the filter output (-60 dB). The right side graph shows the evolution of the forgetting factor with time during the adaptation process.
|
| Algorithm |
asptvffrls() performs the following operations
|
| Remarks |
|
| Resources |
The resources required to implement ta VFFRLS filter of length
|
| See Also |
| INIT_ VFFRLS, ASPTRLS, ASPTVSSLMS. |
| Reference |
| [2] and [4] for analysis of the adaptive Lattice filters. |