next up previous contents
Next: 9 init_ adjlms Up: 7 Active Noise and Previous: 7 asptmcfdfxlms   Contents


8 asptmcfxlms

Purpose
Sample per sample filtering and coefficient update using the Multichannel Filtered-X LMS (MCFXLMS) algorithm for multichannel active noise and vibration control applications.

Syntax
[w,y,e,p,fx] = asptmcfxlms(w,x,y,s,se,d,fx,p,mu,b)



Description
Figure 7.15: Block diagram of the Multichannel Adjoint-LMS algorithm.
asptmcfxlms() implements the Multichannel Filtered-X LMS algorithm widely used in control applications where a transfer function (the matrix of secondary paths, s) exists between the output of the multi input multi output (MIMO) controller $w(n)$ and the error sensors (see Fig. 7.15). The consequence of this matrix of transfer functions is that (1) the phase response of the transfer functions delay each of the controller's outputs and makes it observable from each error signal after a delay, (2) the controller's outputs are colored by the amplitude response of the secondary paths. To correct for those effects, the MCFXLMS algorithm uses filtered version of the input signals to update the adaptive controller instead of directly using the input signals as shown in Fig. 7.15. The figure also shows the input and output parameters of asptmcfxlms() which are summarized below.


\epsfig{file=/home/john/winD/docs/aspt/aspt/figs/mcfxlms.eps,width=.9\textwidth}
Input Parameters [size]:: 
    w  : matrix of filter coefficients w(n-1), [L x Nref x Nact]
    x  : matrix of input samples x(n) [max(L,N) x Nref]
    y  : matrix of filter-outputs y(n-1) [M x Nact]
    s  : accurate matrix of secondary paths [M x Nact x Nsens]
    se : estimated matrix of secondary paths [N x Nact x Nsens]
    d  : desired response at sample index n [1 x Nsens]
    fx : filtered input signals fx(n-1) [L x Nact x Nsens*Nref]
    p  : last estimated power of x(n) [1 x Nref]
    mu : adaptation constant
    b  : pole of AR filter used to smooth p 

Output parameters ::
    w  : updated filter coefficients w(n)
    y  : updated filter output vector y(n) 
    e  : error vector e(n) = d(n) - ys(n) [1 x Nsens ]
    p  : updated estimate of input vector power
    fx : updated matrix of filtered-x samples fx(n)




Example
Figure 7.16: Signals recorded by the sensors before and after applying the adaptive controller in a Multichannel ANVC system using the multichannel 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
xn   = 2*(rand(iter,1)-0.5);  % Input signal, zero mean random.
dn   = mcmixr(ph,xn,0);       % Primary response at the sensor 
sens = zeros(iter,2);         % matrix for sensors signal
% Initialize MCFXLMS algorithm with a controller of 10 coef.
[w,x,y,e,d,p,fx] = init_mcfxlms(10,1,2,2,sh,se);
%% Processing Loop
for (m=1:iter)
   % update the input delay line
   x = [xn(m,:); x(1:end-1,:)];      
   % call asptmcfxlms to calculate the controller output 
   % and update the coefficients. Below a step size of 
   % 0.02 and an AR pole of 0.98 are used.
   [w,y,e,p,fx] = asptmcfxlms(w,x,y,sh,se,dn(m,:),fx,p,0.02,0.98);
   % save the last calculated sensor vector for 
   %performance examination
   sens(m,:) = e(1,:);  
end;
% display the sensor signal signal before and after 
% applying the controller
subplot(2,2,1); plot([dn(:,1) sens(:,1)]); grid
subplot(2,2,2); plot([dn(:,2) sens(:,2)]); grid
Running the above script will produce the graph shown in Fig. 7.16. 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/mcfxex1.eps,width=\textwidth}


Algorithm
The MIMO control problem addressed by MCFXLMS 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, asptmcfxlms() performs the following operations.
  • filters the $N_{ref}$ input (reference) signals $x(n)$ through the matrix of adaptive filters $w(n-1)$ to produce the $N_{act}$ signals $y(n)$ used to drive the actuators
  • filters $y(n)$ through the matrix of secondary paths $s$ to produce the response of the actuators at the sensors' positions $ys(n)$
  • evaluates the current error $e(n) = d(n) + ys(n)$ 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
  • filters the input signals $x(n)$ through the estimate of the secondary path matrix $se$ to produce the filtered-x signals $fx(n)$
  • uses $fx(n)$ and $e(n)$ to calculate the normalized gradient vector and uses this to update the adaptive filter coefficients $w(n)$

Remarks
  • Supports both real and complex signals
  • 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 for real time implementation of the MCFXLMS algorithm having $N_{ref}$ reference signals, $N_{act}$ actuators, and $N_{sens}$ sensors with each filter of $L$ coefficients and estimated secondary path of $N$ coefficients is given in the table below. The computations given are those required to produce $N_{act}$ control signals.


MEMORY $LN_{ref}[N_{act}(N_{sens}+1)+1]+N_{sens}[NN_{act}+2]$
  $+N_{act}+N_{ref}+3$
MULTIPLY $ N_{ref}N_{act}[(L+N)N_{sens}+L]+N_{ref}[LN_{act}+3] $
ADD $ (N_{act}N_{ref})[N_{sens}(L+N+1)+2L-1]-LN_{act}$
DIVIDE $ Nref N_{act}$

See Also
INIT_ MCFXLMS, ANVC_ MCFXLMS, ASPTFXLMS, ASPTFDFXLMS, ASPTMCFDFXLMS.

Reference
[3], Chapter 3.


next up previous contents
Next: 9 init_ adjlms Up: 7 Active Noise and Previous: 7 asptmcfdfxlms   Contents