| Purpose |
Performs filtering and parameter update for the
band-pass Second Order IIR type-2 adaptive filter.
The filter is derived from type-1 by substituting
|
| Syntax |
[y,a,b,e,t,s] = asptsoiir2(u,y,a,b,e,t,s,mu_t,mu_s,t_lim,s_lim)
|
| Description |
asptsoiir2() is a special second order IIR adaptive filter algorithm optimized for extracting and tracking narrow-band signals buried in a wide-band signal. Therefore, it is widely used in applications such as Adaptive Line Enhancers (ALE) where a weak carrier signal is required to be recovered from a strong wide-band noise. Another common application of asptsoiir2() is removing the 50/60 Hz power line noise usually introduced into weak sensor signals. asptsoiir2() is derived from asptsoiir1() by substituting asptsoiir2() takes an input delay line asptsoiir2() are summarized below.
Input arguments [Size]:
u : the last 3 input samples [3 x 1]
y : the last 3 output samples [3 x 1]
a : the last 3 t gradients [3 x 1]
b : the last 3 s gradients [3 x 1]
e : the last 3 error samples [3 x 1]
t : filter center freq. parameter {-1 1} [1 x 1]
s : filter bandwidth parameter {0 1} [1 x 1]
mu_t : adaptation constant for t [1x1]
mu_s : adaptation constant for s [1x1]
t_lim : [t_min t_max]; min. & max. bounds for t
s_lim : [s_min s_max]; min. & max. bounds for s
Output Parameters:
y : updated output buffer
a : updated t-gradient buffer
b : updated s-gradient buffer
e : updated error buffer
s : updated filter BW parameters
t : updated filter CF parameters
|
|
| Example |
iter = 5000; t = (1:iter)/1000; % time index @ 1kHz xn = 2*(rand(iter,1)-0.5) ; % Input signal, zero mean random. xn = xn + .5 * cos(2*pi*50*t'); yn = zeros(iter,1); % error signal en = yn; % Initialize SOIIR2 t_lim = [-.99 0.99]; % bounds for w s_lim = [0.1 .9]; % bounds for s mu_t = 0.1; % step size for w mu_s = 0.01; % step size for s [s,t,u,y,a,b,e]=init_soiir2(0.3,0.1); % initialize soiir1 %% Processing Loop for (m=1:iter) u = [xn(m); u(1:2)]; [y,a,b,e,t,s] = asptsoiir2(u,y,a,b,e,t,s,mu_t,mu_s,t_lim,s_lim); yn(m,:) = y(1); en(m) = e(1); end; % display the results h = filter([cos(t)*(1-s) -(1-s)],[1 -cos(t)*(1+s) s],[1;zeros(255,1)]); f = (0:128)*500/128; H = 20*log10(abs(fft(h))); subplot(2,2,1);plot(f,H(1:129)); grid; subplot(2,2,2); plot([yn(4800:5000)]);gridRunning the above script will produce the graph shown in Fig. 6.12. The left side graph of the figure shows the adaptive filter frequency response after convergence. The right side graph shows the last 200 samples of the filter output which shows that the filter output coincide with the narrow-band 50 Hz superimposed on the white noise input signal. |
|
| Algorithm |
asptsoiir2() performs the following operations
|
| Remarks |
|
| Resources |
The resources required to implement the SOIIR2 recursive adaptive filter in real time is given in the table below. The computations given are those required to process one sample.
|
| See Also |
| INIT_ SOIIR2, ALE_ SOIIR2, ASPTSOIIR1. |
| Reference |
| [2] and [10] for introduction to recursive adaptive filters. |