| Purpose |
|
Sample per sample filtering and coefficient update using the Output Error recursive adaptive algorithm. The filter transfer function is given by
|
| Syntax |
[u,w,c,y,e,Px,Py]=asptouterr(N,M,u,w,c,x,d,mu,Px,Py)
|
| Description |
asptouterr() implements the output error LMS adaptive algorithm used to update recursive adaptive filters. The output error algorithm adjusts the composite filter coefficients vector by minimizing the error signal as shown in Fig. 6.5. asptouterr() takes an input samples asptouterr() for a recursive adaptive filter of Input arguments: N : Number of coefficients of A(z) M : Number of coefficients of B(z) u : composite input vector w : vector of adaptive filter coefficients c : composite gradient vector x : new input sample d : new desired sample mu : adaptation constant vector Px : variance of x(n) Py : variance of y(n) Output Parameters: u,w,c,Px,Py are the updated input variables y : filter output y(n) e : error signal e(n) |
| Example |
iter = 5000; % Number of samples to process
xn = 2*(rand(iter,1)-0.5) ; % Input signal, zero mean random.
dn = filter([0.6 -.01],[1 -0.4 0.6],xn); % Filter output
en = zeros(iter,1); % error signal
% Initialize OUTERR
N = 2; M = 2;
[u,w,c,y,d,e,mu,Px,Py]=init_outerr(N,M);
%% Processing Loop
for (m=1:iter)
x = xn(m);
d = dn(m) + 1e-3*rand;
% update the filter
[u,w,c,y,e,Px,Py]=asptouterr(N,M,u,w,c,x,d,mu,Px,Py);
% save the last error sample to plot later
en(m,:) = e;
end;
wp = filter(w(1:N),[1 ; -w(N+1:N+M)],[1; zeros(19,1)]);
% display the results
subplot(2,2,1);stem(wp); grid;
xlabel('filter response after convergence')
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. 6.6. The left side graph of the figure shows the adaptive filter impulse response after convergence. 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).
|
| Algorithm |
The output error algorithm is a direct extension of the Wiener filter theory to recursive filters. The filter transfer function is given by
The current implementation of asptouterr() performs the following operations
|
| Remarks |
|
| Resources |
The resources required to implement the OUTERR algorithm for a recursive adaptive filter of
|
| See Also |
| INIT_ OUTERR, MODEL_ OUTERR, ASPTEQERR. |
| Reference |
| [2] and [10] for introduction to recursive adaptive filters. |