| Purpose |
| Block filtering and coefficient update in frequency domain using the Partitioned Block Frequency Domain Adaptive Filter (PBFDAF) algorithm. |
| Syntax |
[W,X,x,y,e,Px,w]=asptpbfdaf(M,x,xn,dn,X,W,mu,n,c,b,Px)
|
| Description |
asptpbfdaf() solves the problem of long processing delay introduced by the BFDAF algorithm. This is
achieved by splitting the adaptive filter into asptpbfdaf() performs filtering and coefficient update in
the frequency domain using the overlap-save method, and therefore, provides an efficient implementation for
long adaptive filters in applications such as acoustic echo cancelers where the adaptive filter
can be a few thousand coefficients long. asptpbfdaf() is a block processing algorithm; every
call processes asptpbfdaf() are summarized below ( see Fig. 4.2 ).
|
Input Parameters [Size]::
M : partition length
x : previous overlap-save vector [B x 1]
xn : new input block [L x 1]
dn : new desired block [L x 1]
X : previous matrix of F-domain input samples [B x P]
W : previous matrix of F-domain filter coef. [B x P]
mu : adaptation constant
n : normalization flag, 0 means no normalization
c : constrain flag, 0 means use unconstrained PBFDAF,
otherwise == all partitions are constrained.
b : forgetting factor for input power estimation
Px : previous estimate of the power of X [B x 1]
Output parameters::
W : updated filter coefficients (F-domain)
X : updated matrix of past frequency input samples
x : updated overlap-save input vector
y : filter output block
e : error vector block
Px : updated estimate of the power of X
w : time domain filter (calculated only if required)
|
| Example |
iter = 5000; % Number of samples to process
% Complex unknown impulse response
h = [.9 + i*.4; 0.7+ i*.2; .5; .3+i*.1; .1];
xt = 2*(rand(iter,1)-0.5); % Input signal
% although xn is real, dn will be complex
dt = osfilter(h,xt); % Unknown filter output
en = zeros(iter,1); % estimation error
% Initialize PBFDAF with a filter of 2*4 coef.
P = 2; L = 4; M = 4;
[W,x,d,e,y,Px,X,w]=init_pbfdaf(L,M,P);
%% Processing Loop
for (m=1:L:iter-L)
xn = xt(m:m+L-1,:); % input block
dn = dt(m:m+L-1,:)+ 1e-3*rand; % desired block
% call BFDAF to calculate the filter output,
% estimation error and update the filter coef.
[W,X,x,y,e,Px,w] = asptpbfdaf(L,x,xn,dn,X,W,...
0.06,1,1,0.98,Px);
% save the last error block to plot later
en(m:m+L-1,:) = e;
end;
% display the results
subplot(2,2,1);stem([real(w) imag((w))]); grid;
subplot(2,2,2);
eb = filter(.1, [1 -.9], en(1:m) .* conj(en(1:m)));
plot(10*log10(eb ));grid
|
Running the above script will produce the graph shown in Fig. 4.13. The left side graph of the figure shows the adaptive filter coefficients after convergence which are almost identical to the unknown filter h. The right side graph shows the square error in dB versus time during the adaptation process, which is usually called the learning curve. The lower limit of the error signal power in the learning curve is defined here by the additive white noise added at the filter output (-60 dB).
|
| Algorithm |
asptpbfdaf() performs the following operations (see Fig. 4.2).
|
| Remarks |
|
| Resources |
The resources required for direct implement of the PBFDAF algorithm in real time is given in the table below. The computations given are those required to process L samples using the constrained PBFDAF. Unconstrained PBFDAF uses
|
| See Also |
| INIT_ PBFDAF, ECHO_ PBFDAF, ASPTBFDAF, ASPTRCPBFDAF. |
| Reference |
| [1] and [9] for detailed description of frequency domain adaptive filters. |