next up previous contents
Next: 4 asptfxlms Up: 7 Active Noise and Previous: 2 asptfdadjlms   Contents


3 asptfdfxlms

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
Figure 7.5: Block diagram of the Frequency Domain Filtered-X LMS algorithm.
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.


\epsfig{file=/home/john/winD/docs/aspt/aspt/figs/fdfxlms.eps,width=.8\textwidth}
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
Figure 7.6: Sensor signal before and after applying the adaptive controller in a single channel ANVC system using the frequency domain filtered-x LMS algorithm.
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, $sens$ and $da$, respectively, are shown. the sensor signal before applying the controller $da$ results from filtering the random variable $xa$ of zero mean and variance 1 through the primary path $ph$. The adaptive controller adjusts its coefficients to produce a control signal $y(n)$ to drive the secondary actuator that results in reducing the primary noise at the sensor.


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


Algorithm
asptfdfxlms() performs the following operations.
  • composes the overlap-save input vector $x(n)$ and computes its FFT, $x(f)$
  • filters $x(f)$ through the adaptive filter coefficients vector $W(f)$ in frequency domain to produce the filter output vector $y(f)$
  • filters $y(f)$ through the secondary path filter $s$ to produce the secondary actuator response at the sensor $ys(n)$ (this is also performed in frequency domain)
  • evaluates the current error sample $e(n) = d(n) + ys(n); n=0,1,\cdots,NL-1$. Note the error here is formed by adding the signals rather than subtracting them to be compatible with real world sensors such as microphones and accelerometers. The error vector is padded with zeros and transformed to frequency domain giving $e(f)$
  • filters the overlap-save input vector $x(f)$ through the estimate of the secondary path $se$ in frequency domain to produce the filtered input signal $fx(f)$
  • uses $e(f)$ and $fx(f)$ to calculate the normalized gradient vector and uses this to update the frequency domain adaptive filter coefficients $W(f)$. Normalization for both input signal and secondary path are performed at each frequency bin which guarantees faster convergence rate than time domain FXLMS.
  • computes the inverse FFT for the filter coefficients vector, and output vector producing $w(n)$, and $y(n)$, respectively

Remarks
  • Supports both real and complex signals.
  • Much more efficient than time domain processing for long controllers.
  • The Wiener solution to the above problem is given by $W(\omega) = S(\omega)^{-1} P(\omega)$, where $W(\omega)$ is the controller response at frequency $\omega$, $S(\omega)$ is the response of the secondary path and $P(\omega)$ is the response of the primary path at the same frequency. The adaptive controller will asymptotically approach this Wiener solution provided that $S(\omega)$ is a minimum phase function (does not have zeros outside the unit circle) and the controller length is large enough to accommodate the above convolution. If $S(\omega)$ is not a minimum phase function, the adaptive controller will approach the causal part of the solution. If the controller is too short, the solution will be truncated. In both cases, the noise reduction at the sensor is decreased.
  • The adaptive controller will approach the Wiener solution provided that the delay in the primary path is larger than that in the secondary path. This can be quickly checked by using $ph = [.9;.5;.3;.1]$ and $sh = [0;0.5;0.4;0.1]$ in the above example.
  • The performance, memory requirements, and processing load of the FDFXLMS algorithm are similar to the FDADJLMS algorithms for single channel systems. The FDADJLMS, however, is much more efficient in multi-channel applications, see ASPTMCFDADJLMS and ASPTMCFDFXLMS for more details.



Resources
The resources required to implement the constrained FDFXLMS algorithm in real time is given in the table below. In this table, $N_L$ is the block length and $N_B$ is the FFT length given by $N_B = 2^{nextpow2(N_L+N_C-1)}$, and $N_C$ is the controller length in time domain. The computations given are those required to process $N_L$ samples. Note that the unconstrained algorithm uses two FFT operations less than the case shown in the table.


MEMORY $7 N_B + 4 N_L +3 $
MULTIPLY $7 N_B $
ADD $2 N_B$
DIVIDE $N_B$
FFT $7$


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.


next up previous contents
Next: 4 asptfxlms Up: 7 Active Noise and Previous: 2 asptfdadjlms   Contents