| Purpose |
| Performs filtering and coefficient update for the Recursive Least Squares Lattice (joint process estimator) using the a posteriori estimation errors. |
| Syntax |
[ff,bb,fb,be,cf,b,y,e,kf,kb,c]=
asptrlslattice(ff,bb,fb,be,cf,b,a,x,d)
|
| Description |
asptrlslattice() implements the joint process estimator shown in Fig. 5.8.
Similar to the LMS joint process estimator (Fig. 5.6), it estimates a process |
The input and output parameters of asptrlslattice() of Input Parameters:: ff : last autocorrelation of forward prediction error (f) bb : last autocorrelation of backward prediction error (b) fb : last crosscorrelation of f and b be : last crosscorrelation of b and e cf : last conversion factor vector b : last backward prediction error vector a : forgetting factor x : newest input sample x(n) d : desired response d(n) Output parameters:: ff : updated autocorrelation of forward prediction error bb : updated autocorrelation of backward prediction error fb : updated crosscorrelation of f and b be : updated crosscorrelation of b and e cf : updated conversion factor vector b : updated backward prediction error vector y : linear combiner output e : error signal kf : updated forward lattice coefficients kf(n) kb : updated backward lattice coefficients kb(n) c : updated linear combiner coefficients c(n) |
| Example |
% RLSLATTICE 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; % 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
% although xn is real, dn will be complex since h is complex
dn = osfilter(h,xn); % Unknown filter output
en = zeros(iter,1); % error signal
% Initialize RLSLATTICE with a filter of 10 coef.
L = 10; % filter length
a = .99; % forgetting factor
[ff,bb,fb,be,cf,b,d,y,e,kf,kb,w] = init_rlslattice(L);
%% Processing Loop
for (m=1:iter)
x = xn(m,:); % new input sample
d = dn(m,:) + 1e-3*rand; % additive noise var = 1e-6
[ff,bb,fb,be,cf,b,y,e,kf,kb,w] = asptrlslattice(ff,bb,...
fb,be,cf,b,a,x,d);
% save the last error sample to plot later
en(m,:) = e;
end;
% display the results
subplot(2,2,1);stem([real(w) imag(w)]); grid;
subplot(2,2,2);
eb = filter(.1, [1 -.9], en .* conj(en));
plot(10*log10(eb ));grid
|
Running the above script will produce the graph shown in Fig. 5.9. 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 right side 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). Note that the RLSLATTICE does not suffer from the fluctuations of the PARCOR coefficients and the final misadjustment is not affected by this fluctuations. The filter also shows very fast convergence rate and high degree of stability once it converged.
|
| Remarks |
The joint process estimator simultaneously updates the PARCOR coefficients of the lattice predictor
and the coefficients of the linear combiner. Updating the PARCOR coefficients result in changing all
the backward prediction errors which are the inputs to the linear combiner. In the case
of the LMSLATTICE this has the undesirable effect of increasing the final misadjustment due to the
perturbation of the PARCOR coefficients. This problem does not appear to be of concern in the case
of RLSLATTICE since the backward and forward prediction errors are minimized in the RLS sense using
the exponentially windowed observed past prediction errors. The following points are also of interest.
|
| Algorithm |
asptrlslattice() performs the following operations
|
| Resources |
The resources required to implement the RLSLATTICE of length
|
| See Also |
| INIT_ RLSLATTICE, MODEL_ RLSLATTICE, ASPTRLSLATTICE2. |
| Reference |
| [2] and [4] for analysis of the adaptive Lattice filters. |