| Purpose |
| Simulation of an adaptive forward modeling application using an adaptive transversal filter updated with the autoregressive modeling version of the LMS-Newton algorithm. |
| Syntax |
model_arlmsnewt
|
| Description |
The block diagram of the system identification (forward modeling) problem using the
autoregressive LMS-Newton adaptive algorithm is shown in Fig. 10.41, (see
Section 4.1 for more details on the ARLMSNEWT algorithm). The
input signal init_arlmsnewt(), and the input signals are read from files, then a
processing loop is started. In each iteration of the loop asptarlmsnewt()
is called with a new input sample and a new desired sample to calculate the filter
output (estimated desired signal) and update the adaptive model coefficients.
This simulation script uses the standard ASPT iteration progress window (IPWIN). The
IPWIN has four buttons which allow you to stop and continue the simulation, show or
hide the simulation graph window, break out of the processing loop, and quit the
simulation. After processing all the samples, or on pressing the break or stop
buttons, the sensor signal
|
| Code |
clear all; load .\data\h512; % for verification % Data files infile = '.\wavin\scinwn.wav'; % input signal, white noise dfile = '.\wavin\scdwn512.wav'; % system output % Simulation parameters L = 512; % adaptive model length M = 3; % AR model coef. mu_w = .4/L; % FIR filter step size mu_p = 1e-6; % lattice predictor step size maxk = .99; % maximum value for PARCOR %% Initialize storage [k,w,x,b,u,P,d,y,e] = init_arlmsnewt(L,M); % Init LMS Newton [xn,inFs,inBits] = wavread(infile); % read input signal [dn,inFs,dBits] = wavread(dfile); % read desired signal inSize = min(length(dn),length(xn)); % samples to process E = init_ipwin(inSize); % Initialize IPWIN %% Processing Loop for (m=1:inSize) x = [xn(m,:);x(1:end-1,:) ]; % update the delay line d = dn(m); % new desired sample % update the adaptive model [k,w,b,u,P,y,e] = asptarlmsnewt(k,w,x,b,u,P,d,mu_p,mu_w,maxk); % update the iteration progress window [E, stop,brk] = update_ipwin(E,e,d,'m',w,h512); % handle the Stop button while (stop ~= 0), stop = getStop; end; % handle the Break button if (brk), plot_model(w,h512,E); break; end; end; plot_model(w,h512,E); |
| Results |
Running the above script will produce the graph shown in Fig. 10.42. The two top-left panels in Fig. 10.42 show the time and frequency responses of the unknown system for which this application is intended to provide a FIR model. The time and frequency responses for the model obtained by the adaptive filter are shown in the two top-right panels. The bottom-left panel shows the learning curve and the bottom-right panel shows the error in the filter coefficients by the end of the simulation.
|
| See Also |
| INIT_ ARLMSNEWT, ASPTARLMSNEWT. |
| Reference |
| [2] and [4] for analysis of the adaptive Lattice filters, [2] and [11] for analysis of the LMS-Newton algorithm. |