Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

FIRLMSMR

jeremyfleming
Beginner
352 Views
I have used the FIR and FIRLMS functions, however it appears that when I use FIRLMSMR functions I cannot get an output other than zero from the funtion. Have these algorithms been completed or are they not yet finished?
I use the InitAlloc function to load in filter taps and a delay line, and I set the appropriate paramters, then I call then main FIRLMSMR function to compute an output and it always appears to be zero.
Anyone else have luck with these functions?
Jeremy
0 Kudos
5 Replies
Vladimir_Dudnik
Employee
352 Views
Hi,
every function in IPP is definetely completed. The only thing can be some bug or wrong usage. Could you please specify what version of IPP do you use and piece of code how do you call IPP function.
Regards,
Vladimir
0 Kudos
Vladimir_Dudnik
Employee
352 Views
By the way, there is sample from expert
Code:
/*
   Deconvolution test
*/
TestResult ta_lms_deconv_32f( void* ) {

   const int dataLen = 1000, tapsLen = 33, watch = 900;
   int errnum = 0;

   Ipp32f *x   = tsMalloc( dataLen );
   Ipp32f *xx  = tsMalloc( dataLen ), *pxx;
   Ipp32f *ref = tsMalloc( dataLen ), *pref;

   Ipp32f dlyLine[tapsLen*2];
   Ipp32f tapsInv[tapsLen];

   tsDefault mu( 0.03f, 0.0001f, 0.7f, " Adaptation step", "mu" );  g_istrm >> mu;

   tsRandU zero( 0,0 );

   for( int firlen=3; firlen( x, ref, dataLen, 16, (Ipp32f)1, 1.5f );
      genTaps32f( tapsInv, firlen, 1 );

      int indx, n, minum = tsmin( 7, dataLen );
      g_ostrm << "
 #taps " << firlen << ". some original source and found values : 
";
      for( n=watch; n; g_ostrm << "
";

      indx = 0;
      pref = ref;
      zero.fill( dlyLine, firlen*2 );
      for( n=0; n, pref++, tapsInv, firlen, dlyLine, &indx );

      IppsFIRLMSState_32f* ctx;
      ippsFIRLMSInitAlloc_32f( &ctx, 0, firlen, 0, 0 );
      ippsFIRLMS_32f( ref, x, xx, dataLen, mu/firlen, ctx );
      ippsFIRLMSGetTaps_32f( ctx, tapsInv );
      ippsFIRLMSFree_32f( ctx );

      for( n=0; n, tapsInv[firlen-n-1] );
      indx = 0;
      pxx = xx;
      zero.fill( dlyLine, firlen*2 );
      for( n=0; n, pxx++, tapsInv, firlen, dlyLine, &indx );

      indx = firlen * 2;
      double stdev = tsStdDev( x+indx, xx+indx, dataLen-indx );

      for( n=watch; n; g_ostrm << "
";
      g_ostrm << " std dev of desired and output signal for "
         << dataLen-indx << " values " << stdev << "
";

      if( !ipp_finite( stdev ) || stdev > 0.3f ) errnum++;
   }
   tsFree( ref );
   tsFree( xx );
   tsFree( x );
   return errnum ? resFAIL : resOK;
}
Regards,
Vladimir
0 Kudos
jeremyfleming
Beginner
352 Views
Do you have an example for the FIRLMSMR functions?

Jeremy
0 Kudos
borix
Beginner
352 Views
Jeremy, actual goal of LMS is to reduce to zero the difference between reference and out signals that would indicate that you found/fit your filter. So in some sense zero is ok. If you are talking about your output signal which is zero then you have to check the convergence step value (mu), it is very critical in the adaptation process.
0 Kudos
borix
Beginner
352 Views
the multi rate example looks like the single rate one. only init should be with "MR", again, sampling factor as well as mu affect convergency process much
0 Kudos
Reply