next up previous contents
Next: 2 ale_ soiir1 Up: 10 Applications and Examples Previous: 10 Applications and Examples   Contents


1 ale_ csoiir2

Purpose
Simulation of an Adaptive Line Enhancer (ALE) application using a cascade of M second order type-2 recursive adaptive filter.

Syntax
ale_csoiir2



Description
Figure 10.1: Block diagram of a Cascade of M second order adaptive line enhancer sections.
This application demonstrates the capability of the line enhancer to separate a wide-band signal from multiple narrow-band signals at different frequencies even when the narrow-band signals are time-varying. The block diagram of the cascaded adaptive line enhancer is shown in Fig. 10.1. The input signal $u(n)$ (a speech fragment contaminated with three sinusoidal noise signals with time-varying frequencies) is stored in the file infile. The application attempts to separate the speech from the sinusoidal noise and stores the former in the file wbfile and the latter in nbfile. First the variables for the cascade adaptive line enhancer filters are creates and initializes using init_csoiir2(), and the input signal is read from file, then a processing loop is started. In each iteration of the loop asptcsoiir2() is called with a new input sample to calculate the line enhancer output $y(n)$ (the sum of estimated narrow-band signals), the error sample $e(n)$ (the wide-band signal) and update the filter parameters $s$ and $t$. The evolution of the adaptive parameters is also tracked for later examination.


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


Code
clear all;	
infile = '.\wavin\hnramp.wav';     % input, speech + sinusoidal
wbfile = '.\wavout\csoiir2wb.wav'; % wide-band signal (speech) 
nbfile = '.\wavout\csoiir2nb.wav'; % narrow-band signal (harmonic) 

[xn,inFs,inBits] = wavread(infile); % read input	
[L,ch]           = size(xn);        % get data size

M     = 3;                  % No. of harmonics.
s0    = 0.25*ones(1,M);     % initial s
t0    = 0.5*ones(1,M);      % initial t
mu_s  = 0.001*ones(1,M);    % s-parameter adaptation constant
mu_t  = 0.05*ones(1,M);     % t-parameter adaptation constant
s_lim = [.1 .9];            % bounds for s
t_lim = [0.05 3.1];         % bounds for t
sv    = zeros(L,M);         % tracking vector for s
tv    = zeros(L,M);         % tracking vector for t
yv    = zeros(L,M);         % filter output
ev    = zeros(L,M);         % filter output

% Initialize the csoiir2 filters
[s,t,u,y,a,b,p]=init_csoiir2(M,s0,t0); 

for k=2:L
   % Call CSOIIR2 
   [y,a,b,u,t,s,p] = asptcsoiir2(xn(k),u,y,a,b,t,s,p,...
                     mu_t,mu_s,t_lim,s_lim);
   sv(k,:)	= s;             % save s-state
   tv(k,:)	= t;             % save t-state
   ev(k,:)	= u(1,2:end);    % error signals
   yv(k,:)	= y(1,:);        % narrow-band components
end

% Show tracking behavior
figure
subplot(2,2,1)
plot([tv]);grid
xlabel('Time [samples]')
ylabel('Center freq. [rad.]')
subplot(2,2,2)
plot(sv);grid
xlabel('Time [samples]')
ylabel('s parameter')

% save the narrow-band and wide-band signals
wavwrite(ev(1,M+1),inFs,inBits,wbfile);
wavwrite(sum(yv,2),inFs,inBits,nbfile);



Results
Figure 10.2: Convergence and tracking behavior of the cascade second order type-2 IIR adaptive line enhancer.
Running the above script will produce the graph shown in Fig. 10.2. The left panel in Fig. 10.2 shows the values taken by the $t$ parameter for each of the three SOIIR2 sections versus time. The right panel shows the values taken by the three $s$ parameters. The first second order section adapts and tracks the strongest sinusoidal component in the input signal. As it approaches its target, its s-parameter saturates to its maximum value as shown in the first vertical line in the right graph in Fig. 10.2. As soon as the first section has converged, the second section starts adapting to the strongest sinusoidal component in its input signal (the error signal of the preceding section). This process continues until each section has converged to one sinusoidal component. The error signal of the last section is the wide-band signal and the sum of the outputs of all sections is the output of the cascade combination and contains the estimated narrow-band signals.


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


Audio Files
The following files demonstrate the performance of the CSOIIR2 algorithm in the adaptive line enhancer application mentioned above.
wavin.wav input signal, speech + sinusoidal noise.
wavout2wb.wav error signal, separated speech.
wavout2nb.wav filter output, narrow-band signals.

See Also
INIT_ CSOIIR2, ASPTCSOIIR2, ASPTSOIIR1, ASPTSOIIR2.

Reference
[2] and [10] for introduction to recursive adaptive filters.


next up previous contents
Next: 2 ale_ soiir1 Up: 10 Applications and Examples Previous: 10 Applications and Examples   Contents