| Purpose |
| Block filtering and coefficient update in frequency domain using the Frequency Domain Filtered-X LMS (FDFXLMS) algorithm for single channel active noise and vibration control applications. |
| Syntax |
[W,w,x,y,e,p,yF,fxF] = asptfdfxlms(NC,W,
x,xn,d,yF,fxF,S,SE,p,mu,b,c)
|
| Description |
asptfdfxlms() is the frequency domain implementation of asptfxlms().
The difference between FDFXLMS and its time domain counterpart FXLMS is that filtering
and coefficient update are performed in frequency domain using the overlap-save method as shown in
Fig. 7.5. The parameters of asptfdfxlms() which are summarized below.
Input Parameters [size] ::
NC : controller length in time domain
W : frequency domain filter coef. vector [NB x 1]
x : previous overlap-save input vector [NB x 1]
xn : block of new input samples [NL x 1]
d : block of new primary response [NL x 1]
yF : previous output buffer [NB x 1]
fxF : previous filtered input buffer [NB x 1]
S : frequency domain secondary path [NB x 1]
SE : frequency domain estimated s [NB x 1]
p : last estimated power of fx(f) [NB x 1]
mu : adaptation constant
b : pole of AR filter used in estimating p
c : if not zero, uses the constrained bfdaf algorithm.
Output parameters ::
W : updated frequency domain filter coefficients vector
w : updated time domain filter coefficients vector
x : updated overlap-save input vector
y : controller output block
e : new error block
p : updated power estimate of fx(n)
yF : updated output buffer
fxF : updated filtered input buffer
|
| Example |
iter = 5000; % Number of samples to process
ph = [0;.9;.5;.3;.1]; % Primary path impulse response
sh = [0.5;0.4;0.1]; % Secondary path impulse response
se = 0.95*sh; % estimation of s
xa = 2*(rand(iter,1)-0.5); % Input signal, zero mean random.
da = osfilter(ph,xa); % Primary response at the sensor
sens = zeros(iter,1); % vector to collect sensor signal
NC = 10; % controller length
NL = 6; % block length
mu = 0.02/NC; % step size for block processing
c = 1; % constrain filter to NC coef.
b = 0.98; % AR pole
% Initialize FDFXLMS algorithm with a controller of NC coef.
% and block length of NL samples
[NB,W,w,x,y,d,e,p,S,SE,yF,fxF] = init_fdfxlms(NC,NL,sh,se);
% Processing Loop
for (m=1:NL:iter-NL)
xn = xa(m:m+NL-1); % new input block of NL samples
dn = da(m:m+NL-1); % new desired block of NL samples
% call asptfdfxlms to calculate the controller output
% and update the coefficients.
[W,w,x,y,e,p,yF,fxF] = asptfdfxlms(NC,W,x,xn,dn,yF,...
fxF,S,SE,p,mu,b,c);
% save the last calculated sensor block of samples for
%performance examination
sens(m:m+NL-1) = e;
end;
% display the sensor signal before and after the control effort
plot([da sens]);
Running the above script will produce the graph shown in Fig. 7.6. In this figure,
the sensor signal with and without control,
|
| Algorithm |
asptfdfxlms() performs the following operations.
|
| Remarks |
|
| Resources |
The resources required to implement the constrained FDFXLMS algorithm in real time is given in the table below.
In this table,
|
| See Also |
| INIT_ FDFXLMS, ANVC_ FDFXLMS, ASPTMCFXLMS, ASPTMCFDFXLMS, ASPTFXLMS. |
| Reference |
| [3], Chapter 3 for detailed description of the FDFXLMS, [8] for the overlap-save method, and [9] for frequency domain adaptive filters. |