| Purpose |
Performs filtering and parameter update for the
band-pass Second Order IIR type-1 adaptive filter.
The filter transfer function is given by
|
| Syntax |
[y,a,b,e,w,s] = asptsoiir1(u,y,a,b,e,w,s,mu_w,mu_s,w_lim,s_lim)
|
| Description |
asptsoiir1() 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 asptsoiir1() is removing the 50/60 Hz power line noise usually introduced into weak sensor signals. Fig. 6.9 shows the block diagram of the applications mentioned above which is basically an IIR forward prediction configuration. asptsoiir1() takes an input delay line asptsoiir1() 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 w gradients [3 x 1]
b : the last 3 s gradients [3 x 1]
e : the last 3 error samples [3 x 1]
w : filter center freq. parameter {-1 1} [1 x 1]
s : filter bandwidth parameter {0 1} [1 x 1]
mu_w : adaptation constant for w [1x1]
mu_s : adaptation constant for s [1x1]
w_lim : [w_min w_max]; min. & max. bounds for w
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
w : 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 SOIIR1 w_lim = [-.99 0.99]; % bounds for w s_lim = [0.1 .9]; % bounds for s mu_w = 0.1; % step size for w mu_s = 0.01; % step size for s [s,w,u,y,a,b,e] = init_soiir1(0.3,0.1); % initialize soiir1 %% Processing Loop for (m=1:iter) u = [xn(m); u(1:2)]; [y,a,b,e,w,s] = asptsoiir1(u,y,a,b,e,w,s,mu_w,mu_s,w_lim,s_lim); yn(m,:) = y(1); en(m) = e(1); end; % display the results h = filter([w*(1-s) -(1-s)],[1 -w*(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.10. 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 |
asptsoiir1() performs the following operations
|
| Remarks |
|
| Resources |
The resources required to implement the SOIIR1 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_ SOIIR1, ALE_ SOIIR1, ASPTSOIIR2. |
| Reference |
| [2] and [10] for introduction to recursive adaptive filters. |