next up previous contents
Next: 8 asptmcfxlms Up: 7 Active Noise and Previous: 6 asptmcfdadjlms   Contents


7 asptmcfdfxlms

Purpose
Block filtering and coefficient update in frequency domain using the Multichannel Frequency Domain Filtered-x LMS (MCFDFXLMS) for multichannel active noise and vibration control applications.

Syntax
[W,w,x,y,e,p,yF,fxF] = asptmcfdfxlms(NC,W,x,xn,dn,yF,... fxF,S,SE,p,mu,b,c)



Description
Figure 7.13: Block diagram of the Multichannel Frequency Domain Filtered-X LMS algorithm.
asptmcfdfxlms() is the frequency domain implementation of asptmcfxlms(). The difference between MCFDFXLMS and its time domain counterpart MCFXLMS is that filtering and coefficient update are performed in frequency domain using the overlap-save method. Fig. 7.13 shows the parameters of asptmcfdfxlms() which are summarized below.


\epsfig{file=/home/john/winD/docs/aspt/aspt/figs/mcfdfxlms.eps,width=.9\textwidth}
Input Parameters :: 
    NC   : controller length in time domain
    W    : freq. domain filter coef. matrix [NB x Nref x Nact]
    x    : previous overlap-save input matrix [NB x Nref]
    xn   : new input samples block [NL x Nref]
    dn   : new primary samples block [NL x Nsens]
    yF   : previous buffer of y(n) [NB x Nact]
    fxF  : previous buffer of fx(n) [NB x Nact x Nsens*Nref]
    S    : FIR model of the secondary paths [NB x Nact x Nsens]
    SE   : estimated FIR model S [NB x Nact x Nsens]
    p    : last estimated power of fx(n) [NB x Nref x Nsens*Nref]
    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  
    w    : updated time domain filter coefficients  
    x    : updated overlap-save input matrix
    y    : controller output block 
    e    : new error block 
    p    : updated estimate of power of fx(n)
    yF   : updated output buffer 
    fxF  : updated filtered-x buffer




Example
Figure 7.14: Signals recorded by the sensors before and after applying the adaptive controller in a Multichannel ANVC system using the multichannel frequency domain filtered-x LMS algorithm.
% This example simulates a MIMO control system with a single
% primary (reference) signal, two actuators and two sensors.
iter = 5000;                  % Number of samples to process
ph   = [0 .9 .5 .3 .1 ; 0 .8 .5 .2 .5]';      
ph   = reshape(ph,5,1,2);     % Primary path impulse response
sh   = zeros(3,2,2);          % Secondary path impulse response
sh(:,1,1) = [0.5;0.4;0.1];
sh(:,2,2) = [0.5;0.4;0.1];
se   = 0.95*sh;               % estimation of sh
xa   = 2*(rand(iter,1)-0.5);  % Input signal, zero mean random.
da   = mcmixr(ph,xa,0);       % Primary response at the sensor 
sens = zeros(iter,2);         % matrix for sensors signal
NC   = 10;                    % controller length
NL   = 6;                     % block length
mu   = 0.01/NC;               % step size for block processing
c    = 1;                     % constrain filter to NC coef.
b    = 0.98;                  % AR pole 
% Initialize MCFDFXLMS algorithm 
[NB,W,w,x,y,d,e,p,S,SE,yF,fxF] = init_mcfdfxlms(NC,NL,1,2,2,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 asptmcfdfxlms to calculate the controller output 
   % and update the coefficients. 
   [W,w,x,y,e,p,yF,fxF] = asptmcfdfxlms(NC,W,x,xn,dn,...
                          yF,fxF,S,SE,p,mu,b,c);
   sens(m:m+NL-1,:) = e;       % save controlled sensors' signals    
end;
% display the sensors' signals before and after the control effort
subplot(2,2,1); plot([da(:,1) sens(:,1)]); grid
subplot(2,2,2); plot([da(:,2) sens(:,2)]); grid
Running the above script will produce the graph shown in Fig. 7.14. In this figure, the signals recorded by the sensors before and after applying the MIMO control effort, $dn$ and $sens$, respectively, are shown. The adaptive controller adjusts its coefficients to produce $N_{act}$ control signals $y(n)$ that result in reducing the primary noise at the sensors.


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


Algorithm
The MIMO control problem addressed by MCFDFXLMS is to reduce the noise (or vibration) produced by $N_{ref}$ primary sources at the positions of $N_{sens}$ sensors using a matrix of $[N_{ref} x N_{act}]$ controllers driving $N_{act}$ actuators. To achieve this goal, asptmcfdfxlms() performs the following operations.
  • composes the [NB x Nref] overlap-save input matrix $x(n)$ and computes its FFT, $x(f)$
  • filters $x(f)$ through the frequency domain matrix of adaptive filters $W(f)$ in frequency domain to produce the Nact signals $y(f)$
  • filters $y(f)$ through the matrix of secondary paths $s$ in frequency domain to produce the response of the actuators at the sensors' positions $ys(n)$
  • evaluates the current error $e(n) = d(n) + ys(n); n=0,1,\cdots,NL-1$ at all sensors. Note the error here is formed by adding the signal rather than subtracting them to be compatible with real world sensors such as microphones and accelerometers. The error matrix is padded with zeros and transformed to frequency domain giving $e(f)$
  • filters the frequency domain input matrix $x(f)$ through the estimate of the secondary path matrix $se$ in frequency domain to produce the filtered-input signals $fx(f)$
  • uses $fx(f)$ and $e(f)$ to calculate the normalized gradient vector and uses this to update the frequency domain adaptive filter coefficients $W(f)$. Normalization for both input signals and secondary paths are performed at each frequency bin which guarantees faster convergence rate than time domain MCFXLMS.
  • computes the inverse FFT for the filter coefficients matrix, and output vector producing $w(n)$, and $y(n)$, respectively.

Remarks
  • Supports both real and complex signals
  • The required resources to implement the MCFDFXLMS algorithm in real time are usually much larger than those required for the MCFDADJLMS. This is evident from the size of the filtered-input compared to the size of the filtered-error matrixes.
  • Much more efficient than time domain processing (MCFXLMS) 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 the inverse of $S(\omega)$ exists at each frequency and the controller length is large enough.
  • The adaptive controller will approach the Wiener solution provided that the delay in the primary paths is larger than that in the secondary paths. This can be quickly checked by removing the leading zero in $ph$ and adding a leading zero in $sh$ in the above example.



Resources
The resources required to implement the constrained MCFDFXLMS 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 * N_{ref}$ input samples. Note that the unconstrained algorithm uses $2 N_{act} N_{ref}$ FFT operations of length $N_B$ less than the case shown in the table.


MEMORY $N_B N_{ref}[2 N_{act} N_{sens} + N_{act} + 1)] + $
  $ N_B [N_{act} N_{sens} + N_{act} + N_{sens}] + N_L[2N_{sens}+N_{ref}]+4$
MULTIPLY $N_B N_{ref}(Nact)[5 N_{sens} + 2]$
ADD $N_B N_{ref}(Nact)[3 N_{sens}] - N_B N_{act}$
DIVIDE $N_B N_{act} N_{ref}$
FFT $N_{act} [2 N_{ref} (N_{sens} + 1)+ 1] + N_{sens}$

See Also
INIT_ MCFDFXLMS, ANVC_ MCFDFXLMS, ASPTFXLMS, ASPTFDFXLMS, ASPTMCADJLMS.

Reference
[3], Chapter 3 for detailed description of the MCFDFXLMS, [8] for the overlap-save method, and [9] for frequency domain adaptive filters.


next up previous contents
Next: 8 asptmcfxlms Up: 7 Active Noise and Previous: 6 asptmcfdadjlms   Contents