next up previous contents
Next: 11 init_ soiir1 Up: 6 Recursive Adaptive Algorithms Previous: 9 init_ outerr   Contents


10 init_ sharf

Purpose
Creates and initializes the variables required for the Simple Hyperstable Adaptive Recursive Filter (SHARF) algorithm. The filter transfer function is given by
\begin{displaymath}
w(z) = \frac{A(z)}{1-B(z)}
\end{displaymath} (70)

where


$\displaystyle A(z)$ $\textstyle =$ $\displaystyle a_0 + a_1 z^{-1} + ... + a_{N-1} z^{-N+1}$ (71)
$\displaystyle B(z)$ $\textstyle =$ $\displaystyle b_1 z^{-1} + b_2 z^{-2} + ... + b_M z^{-M}$ (72)

Syntax
[u,w,e,c,d,mu,Px,Py]=init_sharf(N,M,L)
[u,w,e,c,d,mu,Px,Py]=init_sharf(N,M,L,u0,w0,e0,c0,d0,mu0)



Description
The variables of the SHARF algorithm are summarized below (see Fig. 6.7).
Input arguments:
   N   : Number of coefficients of A(z)
   M   : Number of coefficients of B(z)
   L   : Number of coefficients of error smoothing filter c
   u0  : initial composite input/output delay line [N+M x 1]
   w0  : initial composite filter coefficients vector [N+M x 1]
   e0  : initial error vector [L x 1]
   c0  : smoothing filter coefficients [L x 1]
   d0  : desired sample at time index 0 [1 x 1]
   mu0 : step size vector [N+M x 1]
Output Parameters:
   u   : Initialized composite delay line [zeros].
   w   : Initialized filter vector [zeros].
   e   : Initialized error vector [e=d-y].
   c   : Initialized error smoothing filter [fir1(L-1,.05)]
   d   : Initialized desired sample
   mu  : Initialized step size vector 0.01*[1 ... 1].
   Px  : Initialized power of x(n).
   Pd  : Initialized power of d(n).


Example
N  = 2;                   % Number of numerator coef. 
M  = 2;                   % Number of denumerator coef. 
L  = 5;                   % error smoothing filter length
u0 = rand(4,1);           % initial composite input vector
c0 = fir1(L-1,0.1);       % error smoothing filter
d0 = 0;                   % desired sample
mu = [0.1;0.1;0.01;0.01]; % step size vector

% Create and initialize an Output Error filter
[u,w,e,c,d,mu,Px,Py]=init_sharf(N,M,L,u0,[],[],c0,d0,mu);

Remarks
  • Supports both real and complex signals and filters.
  • Use input parameters 4 through 9 to initialize the algorithm storage. This is helpful when the adaptation process is required to start from a known operation point calculated off-line or from previous simulations.

See Also
ASPTSHARF, MODEL_ SHARF.

next up previous contents
Next: 11 init_ soiir1 Up: 6 Recursive Adaptive Algorithms Previous: 9 init_ outerr   Contents