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


1 asptadjlms

Purpose
Sample per sample filtering and coefficient update using the time domain Adjoint-LMS algorithm for single channel active noise and vibration control applications.

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



Description
Figure 7.1: Block diagram of the Adjoint-LMS algorithm.
asptadjlms() implements the ADJOINT-LMS algorithm widely used in control applications where a transfer function (the secondary path, $s$) exists between the filter output and the error signal (see Fig. 7.1). The consequence of this transfer function is twofold. (1) its phase response delays the filter output signal and makes it observable from the error signal after a delay. (2) the filter output signal is colored by the amplitude response of the secondary path $s$. To correct for those two effects, the ADJOINT-LMS algorithm uses a filtered version of the error signal to update the adaptive filter instead of directly using the error signal as shown in Fig. 7.1. This figure also shows the input and output parameters of asptadjlms() which are summarized below.


\epsfig{file=/home/john/winD/docs/aspt/aspt/figs/adjlms.eps,width=.9\textwidth}
Input Parameters :: 
    w  : vector of filter coefficients w(n-1) [L x 1]
    x  : vector of input samples  [x(n) x(n-1) .. x(n-(L+M-1))]
    e  : vector of error signal e(n-1) [N x 1]
    y  : vector of filter-output y(n-1) [M x 1]
    s  : accurate FIR model of the secondary path [M x 1]
    se : estimated FIR model of the secondary path [N x 1]
    d  : desired response at sample index n [1 x 1]
    p  : last estimated power of x(n) [1 x 1]
    mu : adaptation constant [1 x 1]
    b  : pole of Autoregressive filter used in estimating p 

Output parameters ::
    w  : updated filter coefficients w(n)
    y  : filter output vector [y(n) y(n-1) .. y(n-M-1)]
    e  : error vector [e(n) e(n-1) .. e(n-N-1)]
    p  : updated estimate of input vector power




Example
Figure 7.2: Sensor signal before and after applying the adaptive controller in a single channel ANVC system using the adjoint 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
xn   = 2*(rand(iter,1)-0.5);  % Input signal, zero mean random.
dn   = osfilter(ph,xn);       % Primary response at the sensor 
sens = zeros(iter,1);         % vector to collect sensor signal

% Initialize ADJLMS algorithm with a controller of 10 coefficients
[w,x,y,d,e,p] = init_adjlms(10,sh,se);   

%% Processing Loop
for (m=1:iter)
   % update the input delay line
   x = [xn(m,:); x(1:end-1,:)];  
      
   % call asptadjlms 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] = asptadjlms(w,x,e,y,sh,se,dn(m),p, 0.02, 0.98);

   % save the last calculated sensor sample for 
   %performance examination
   sens(m) = e(1);  
end;

% display the sensor signal before and after the control effort
plot([dn sens]);
Running the above script will produce the graph shown in Fig. 7.2. In this figure, the sensor signal with and without control, $sens$ and $dn$, respectively, are shown. The sensor signal before applying the controller $dn$ results from filtering the random variable $xn$ 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/adjlmsex1.eps,width=\textwidth}


Algorithm
asptadjlms() performs the following operations.
  • filters the input vector $x(n)$ through the adaptive filter coefficients vector $w(n-1)$ to produce the filter output vector $y(n)$
  • filters $y(n)$ through the secondary path filter $s$ to produce the secondary actuator response at the sensor $ys(n)$
  • evaluates the current error sample $e(n) = d(n) + ys(n)$. 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 mirrored error vector $e(n)$ through the estimate of the secondary path $se$ to produce the filtered-error signal $fe(n)$
  • uses $x(n)$ and $fe(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 $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 ADJOINT LMS algorithm are similar to the Filtered-x LMS algorithms for single channel systems. The real advantage of the ADJOINT LMS is in multi-channel applications.



Resources
The resources required to implement the ADJOINT LMS algorithm in real time is given in the table below where $L$ is the controller length and $N$ is the estimated secondary path length. The computations given are those required to process one sample.


MEMORY $2L + 2N + 5 $
MULTIPLY $2L + N + 4 $
ADD $2L + N$
DIVIDE $1$

See Also
INIT_ ADJLMS, ANVC_ ADJLMS, ASPTMCADJLMS, ASPTFDADJLMS, ASPTMCFDADJLMS.

Reference
[3], Chapter 3.

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