Demo entry 6662971

BNLMS

   

Submitted by anonymous on Nov 28, 2017 at 20:19
Language: C. Code size: 789 Bytes.

// Updating the input buffer ( regB ) :
for ( i =N+ 1; i >0; i −−)
regB [ i ] = regB [ i1 ];
/ / Calculating some acumulative parameters :
for ( i = 0 ; i <= N; i++){
a = regB[ i + 1] ;
y+= regB [ i ]  w[ i ] ;
y_1+= aw[ i ] ;
p+= regB [ i ]regB [ i ] ;
alpha += regB[ i ]a ;
}
/ / Calculating single parameters:
D = pp_1  alpha  alpha ;
e0_1= din1y_1 ;
e0= diny ;
/ / Finding the deltas :
if (D<eps ){
delta1 =mue0 / ( p+eps ) ;
ctrl = 0;
} e l s e {
l1 = ( e0p 1e0_1 alpha) / D;
l2 = ( e0_1pe0 alpha ) / D;
delta1 =mu l1 ;
delta2 =mu l2 ;
ctrl = 1;
}
/ / Updating the adaptative filter coeffs :
for ( i = 0 ; i <= N; i ++ )
{ a= regB [ i+1 ] ; / / local copy of input buffer
w[ i ]=w[ i ] + ( delta1regB [ i ]+ c t r l  delta2a ) ;
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).