next up previous contents
Next: 25 model_ outerr Up: 10 Applications and Examples Previous: 23 model_ lmslattice   Contents


24 model_ mvsslms

Purpose
Simulation of an adaptive forward modeling application using a transversal adaptive filter updated according to the Modified Variable Step Size LMS (MVSSLMS) algorithm.

Syntax
model_mvsslms



Description
Figure 10.47: Block diagram of an FIR forward modeling using the MVSSLMS adaptive algorithm.
The block diagram of the system identification (forward modeling) problem using the MVSSLMS adaptive algorithm is shown in Fig. 10.47 (see Section 4.10 for more details on the modified variable step size algorithm). The simulation considered here uses a transversal FIR filter for the adjustable filter and the coefficients of the filter are updated using the MVSSLMS algorithm. The input signal $x(n)$ (measured signal at the input of the system to be modeled) is stored in the file infile. The desired signal $d(n)$ (the signal measured at the system output in response to applying $x(n)$ at its input) is stored in the file dfile. First the variables for the adaptive model $w(n)$ are created and initialized using init_mvsslms(), and the input signals are read from files, then a processing loop is started. In each iteration of the loop asptmvsslms() is called with a new input sample and a new desired sample to calculate the filter output (estimated desired signal) and update the filter 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 $e(n)$ is written to a wave audio file and a graph presenting the echo canceler performance is generated.


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


Code

clear all;
load .\data\h32;                     % for verification
infile = '.\wavin\scinwn.wav';       % input signal, white noise
dfile  = '.\wavin\scdwn32.wav';      % system output 

L      = 32;                         % adaptive model length
roh    = 1e-3;                       % adaptation constant of mu
mu_min = 1e-6;                       % lower bound for mu
mu_max = 0.99;                       % higher bound for mu

%% Initialize storage 
[w,x,d,y,e,g,mu] = init_mvsslms(L);  % Initialize MVSSLMS				
[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
muv    = zeros(inSize,1);            % time evolution of mu

%% Processing Loop
for (m=1:inSize)
   x  = [xn(m); x(1:L-1,:) ];   % update the input delay line
   d  = dn(m);                  % get the new desired sample

   % Update the adaptive filter
   [w,g,mu,y,e] = asptmvsslms(x,w,g,d,mu,roh,mu_min,mu_max);
   muv(m) = mu;                 % save mu to display later

   % update the iteration progress window
   [E, stop,brk] = update_ipwin(E,e,d,'m',w,h32);

   % handle the Stop button
   while (stop ~= 0), stop = getStop; end;

   % handle the Break button		
   if (brk), plot_model(w,h32,E); break; end;	
end;

plot_model(w,h32,E);
subplot(3,2,6); 
plot(muv(1:m));grid



Results
Figure 10.48: Performance of the Modified Variable Step Size LMS (MVSSLMS) adaptive filter in a system identification application.
Running the above script will produce the graph shown in Fig. 10.48. The two top-left panels in Fig. 10.48 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 evolution of the step size variable with time during the simulation.


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


See Also
INIT_ MVSSLMS, ASPTMVSSLMS, ASPTVSSLMS.

Reference
[11] and [4] for extensive analysis of the LMS and the steepest-descent search method.


next up previous contents
Next: 25 model_ outerr Up: 10 Applications and Examples Previous: 23 model_ lmslattice   Contents