| Purpose |
| Implements the adaptive RLS Lattice Backward Prediction Error Filter. |
| Syntax |
[ff,bb,fb,cf,b,y,e,kf,kb,c]=asptrlslbpef(ff,bb,fb,cf,b,a,x)
|
| Description |
asptrlslbpef() is a lattice implementation of the backward prediction error filter shown in Fig. 5.12. asptrlslbpef updates the PARCOR coefficients of the lattice predictor by minimizing the backward and forward prediction errors in the recursive least squares sense. The backward prediction error of the last lattice stage is returned as the error signal
The input and output parameters of asptrlslbpef() 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 cf : last conversion factor vector b : last backward prediction error vector a : forgetting factor x : newest input sample x(n) Output parameters:: ff : updated autocorrelation of forward prediction error bb : updated autocorrelation of backward prediction error fb : updated crosscorrelation of f and b cf : updated conversion factor vector b : updated backward prediction error vector y : linear combiner output e : forward prediction error kf : updated forward lattice coefficients kf(n) kb : updated backward lattice coefficients kb(n) c : equivalent transversal backward predictor coefficients. |
| Example |
% RLSLBPEF used in a adaptive line enhancer application. % By the end of this script, the backward prediction error % is the wide-band signal and the output of the equivalent % transversal predictor is the narrow-band signal. iter = 5000; t = (1:iter)/1000; % time index @ 1kHz xn = 2*(rand(iter,1)-0.5) ; % Input signal, zero mean random. xn = xn + 1 * cos(2*pi*50*t'); yn = zeros(iter,1); % narrow-band signal en = yn; % error signal % Initialize RLSLBPEF M = 10; % filter length a = 0.99; % forgetting factor [ff,bb,fb,cf,b,y,e,kf,kb,x] = init_rlslbpef(M); %% Processing Loop for (m=1:iter) x = [xn(m); x(1:end-1)]; [ff,bb,fb,cf,b,y,e,kf,kb,c]=asptrlslbpef(ff,bb,fb,cf,b,a,x); yn(m,:) = y; % save narrow-band en(m,:) = e; % save wide-band end; % Transfer function between e(n) and x(n-L). h = filter([ 1;(-c)],1,[1; zeros(1023,1)]); f = (0:512)*500/512; H = 20*log10(abs(fft(h))); % display the results subplot(2,2,1);plot(f,H(1:513,:)); grid; subplot(2,2,2); plot([yn(4800:5000)]);gridRunning the above script will produce the graph shown in Fig. 5.13. The left side graph of the figure shows the frequency response of the equivalent transversal prediction error filter after convergence. This frequency response shows that the predictor adjusts itself to pass the narrow-band signal at 50 Hz and attenuate all other input components so that the error signal contains the wide-band signal only. The right side graph shows the last 200 samples of the filter output which shows that the filter output coincide with the narrow-band 50 Hz superimposed on the white noise input signal. |
|
| Algorithm |
asptrlslbpef() performs the following operations
|
| Remarks |
The adaptive Lattice Prediction Error Filter is a useful tool in linear prediction and autoregressive modeling applications. The following remarks apply to the RLS lattice backward prediction error filter:
|
| Resources |
The resources required to implement the RLSLBPEF of
|
| See Also |
| INIT_ RLSLBPEF, PREDICT_ RLSLBPEF, ASPTRLSLFPEF, ASPTRLSLATTICE. |
| Reference |
| [2] and [4] for analysis of the adaptive Lattice filters. |