next up previous contents
Next: 20 asptvsslms Up: 4 Transversal and Linear Previous: 18 aspttdlms   Contents


19 asptvffrls

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 $L$ are summarized below.
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;



Figure 4.22: The adaptive filter coefficients after convergence, the learning curve, and the evolution of the forgetting factor for the complex system identification problem using the VFFRLS algorithm.
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.


\epsfig{file=/home/john/winD/docs/aspt/aspt/figs/vffrlsex1.eps,width=0.9\textwidth}

Algorithm
asptvffrls() performs the following operations
  • Filters the input signal $x(n)$ through the adaptive filter $w(n-1)$ to produce the filter output $y(n)$,
  • Calculates the error sample $e(n) = d(n) - y(n)$,
  • Recursively updates the gain vector $\vK (n)$ given by
    \begin{displaymath}
\vK (n) = \frac{\mR (n-1) \; \vx (n)}{a + \; \vx ^{T}(n) \; \mR (n-1) \vx (n)}.
\end{displaymath} (41)

  • Updates the adaptive filter coefficients,
  • Updates the forgetting factor.

Remarks
  • asptvffrls() supports real as well as complex signals. The complex linear combiner VFFRLS filter converges to the complex conjugate of the Wiener solution.
  • asptvffrls() does not update the delay line internally. The delay line must be updated before calling asptvffrls() as shown in the example listed above.



Resources
The resources required to implement ta VFFRLS filter of length $L$ in real time is given in the table below. The computations given are those required to process one sample.


MEMORY $6L + 14$
MULTIPLY $8L +23 $
ADD $8L + 14 $
DIVIDE 3


See Also
INIT_ VFFRLS, ASPTRLS, ASPTVSSLMS.

Reference
[2] and [4] for analysis of the adaptive Lattice filters.


next up previous contents
Next: 20 asptvsslms Up: 4 Transversal and Linear Previous: 18 aspttdlms   Contents