next up previous contents
Next: 5 asptrlslattice Up: 5 Lattice Adaptive Algorithms Previous: 3 asptlfpef   Contents


4 asptlmslattice

Purpose
Performs filtering and coefficient update for the LMS Lattice (joint process estimator) adaptive filter.

Syntax
[k,c,b,P,y,e]=asptlmslattice(k,c,b,P,x,d,mu_p,mu_c,upk)



Description
asptlmslattice() implements the joint process estimator shown in Fig. 5.6. The joint process estimator estimates a process $d(n)$ from another correlated process $x(n)$. It consists of two separate parts, the lattice predictor part and the linear combiner part. The main function of the lattice predictor part is to transform the input signal samples $x(n), x(n-1), \cdots, x(n-M+1)$ that might be well correlated to the uncorrelated backward prediction errors $e_{b0}(n), e_{b1}(n), \cdots, e_{bM}(n)$. The linear combiner part calculates the equivalent transversal filter output according to the relationship
\begin{displaymath}
y(n) = \sum \limits_{i=1}^{M} c_i \; e_{bi}(n).
\end{displaymath} (46)

The adaptive joint process estimator adjusts both the PARCOR coefficients $k_i;\; i=1,2,\cdots,M; $ and the linear combiner coefficients $c_i;\; i=1,2,\cdots,M$ simultaneously. The PARCOR coefficients are adjusted to minimize the forward and backward prediction error powers and the linear combiner coefficients are adjusted to minimize the mean square of the error signal $e(n) = d(n) - y(n)$.

The input and output parameters of asptlmslattice() of $L$ stages are summarized below.
Input Parameters:: 
   k   : vector of lattice predictor coefficients (PARCOR)
   c   : vector of linear combiner coefficients
   b   : vector of backward prediction error
   P   : vector of last estimated power of b
   x   : new input sample
   d   : new desired sample
   mu_p: adaptation constant for the predictor coefficients
   mu_c: adaptation constant for the linear combiner coef.
   upk : flag if 0 will not update k
Output parameters::
   k   : updated lattice predictor coefficients
   c   : updated linear combiner coefficients
   b   : updated backward prediction error
   P   : updated power estimate of b
   y   : linear combiner output
   e   : error signal [e = d - y]



Figure 5.6: Block diagram of the adaptive Joint Process Estimator.


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


Example
% LMSLATTICE 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 LMSLATTICE with a filter of 10 coef.
L    = 10;                   % filter length
mu_c = .01;                  % linear combiner step size
mu_p = 0.001;                % lattice predictor step size
uk   = 1;
[k,w,b,P,d,y,e] = init_lmslattice(L); 

%% Processing Loop
for (m=1:iter)
   % stop updating the PARCOR coef. after 2000 samples
   if (m == 2000), uk=0; end  
   x = xn(m,:);                % new input sample
   d = dn(m,:) + 1e-3*rand;    % additive noise var = 1e-6 
   [k,w,b,P,y,e]=asptlmslattice(k,w,b,P,x,d,mu_p,mu_c,uk);
   
   % save the last error sample to plot later
   en(m,:) = e;  
end;

% display the results
subplot(2,2,1);stem([real(w) imag(conj(w))]); grid;
subplot(2,2,2);
eb = filter(.1,[1 -.9], en .* conj(en));
plot(10*log10(eb  ));grid



Figure 5.7: The adaptive linear combiner coefficients after convergence and the learning curve for the complex system identification problem using the LMSLATTICE algorithm.
Running the above script will produce the graph shown in Fig. 5.7. 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 mean 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 final misadjustment is greatly affected by the fluctuations of the PARCOR coefficients when they are adapted. The estimation error drops sharply when adaptation of the PARCOR is stopped after 2000 samples. By that time the PARCOR should have reached their optimal values and should be fixed to allow lower final misadjustment.


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


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 part. This has the undesirable effect of increasing the final misadjustment due to the perturbation of the PARCOR coefficients. When the input is stationary, this problem can be solved by stopping the adaptation of the PARCOR coefficients after some time (as was done in the above example). This however does not help when the input $x(n)$ is non-stationary. The following points are also of interest.
  • asptlmslattice() supports real as well as complex signals.
  • The PARCOR coefficients always satisfy the relation $\vert k_{m}\vert \leq 1$.
  • The power of the forward prediction error $E[e_{fm}^2(n)]$ and the backward prediction error $E[e_{bm}^2(n)]$ of the same stage are equal.
  • The backward prediction errors $e_{b0}(n), e_{b1}(n), \cdots, e_{bM}(n)$ are uncorrelated with one another for any input sequence $x(n)$. This accelerates the convergence of the linear combiner coefficients.

Algorithm
asptlmslattice() performs the following operations
  • Calculates the forward and backward prediction errors for the lattice structure stages using the order update equations (see section 2.2.4),
  • Calculates the power estimate of the backward prediction errors,
  • Updates the PARCOR coefficients of the lattice predictor,
  • Evaluates the linear combiner output,
  • Evaluates the error signal,
  • Updates the linear combiner coefficients.



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


  upk = 0 upk = 1
     
MEMORY $6L + 7$ $6L + 7$
MULTIPLY $10L -2 $ $30L -2 $
ADD $7L - 2 $ $9L - 2 $
DIVIDE L 2L

See Also
INIT_ LMSLATTICE, MODEL_ LMSLATTICE.

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


next up previous contents
Next: 5 asptrlslattice Up: 5 Lattice Adaptive Algorithms Previous: 3 asptlfpef   Contents