<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic IppsFIR and Initial Conditions in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/IppsFIR-and-Initial-Conditions/m-p/832519#M5683</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;"filter" in Matlab corresponds to IIR filter - when you use "null" delay line and a[0]=1 - it works as FIR, but when you use initialized delay line - "filter" considers it as IIR direct form 2 delay line (see description for "filter" in the manual); IPP FIR considers delay line as simple tapsLen-1 delayed source. For full correspondence with "filter" you should use IPP IIR functionality and recalculate zi (delay line) to direct form 2 as it's described in Matlab documentation (ippsIIR also uses direct form 2 delay line). Or if you need only FIR - you should use your direct form1 delay line for IPP and for Matlab you should recalculate it to the direct form2:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;for( i = 0; i &amp;lt; order; i++ ){&lt;BR /&gt; pDly&lt;I&gt; = 0;&lt;BR /&gt; for( n = order - i; n &amp;gt; 0; n-- ){&lt;BR /&gt; pDly&lt;I&gt; += pTaps[n+i] * pSrc[len-n]; /* b- corfficients */&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;for( i = 0; i &amp;lt; order; i++ ){&lt;BR /&gt; for( n = order - i; n &amp;gt; 0; n-- ){&lt;BR /&gt; pDly&lt;I&gt; -= pTaps[order+n+i] * pDst[len-n]; /* a- coefficients */&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Igor&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jan 2012 07:59:12 GMT</pubDate>
    <dc:creator>igorastakhov</dc:creator>
    <dc:date>2012-01-12T07:59:12Z</dc:date>
    <item>
      <title>IppsFIR and Initial Conditions</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/IppsFIR-and-Initial-Conditions/m-p/832518#M5682</link>
      <description>I'm trying to use IppsFIR() to get the same results as the MatLab function filter(). For example, if I do the following call in ML:&lt;BR /&gt;&lt;BR /&gt;y = filter( b, 1, x );&lt;BR /&gt;&lt;BR /&gt;and then use the IPP functions():&lt;BR /&gt;&lt;BR /&gt;IppsFIRState_64f *pState;&lt;BR /&gt;ippsFIRInitAlloc( &amp;amp;pState, *b, lenb, NULL );&lt;BR /&gt;ippsFIR( *x, *y, lenx, pState );&lt;BR /&gt;&lt;BR /&gt;I get the same results in ML and IPP.&lt;BR /&gt;&lt;BR /&gt;But if I do the following in MatLab:&lt;BR /&gt;&lt;BR /&gt;y = filter( b, 1, x, zi );&lt;BR /&gt;&lt;BR /&gt;and the following in IPP:&lt;BR /&gt;&lt;BR /&gt;IppsFIRState_64f *pState;&lt;BR /&gt;
ippsFIRInitAlloc( &amp;amp;pState, *b, lenb, *zi );&lt;BR /&gt;
ippsFIR( *x, *y, lenx, pState );&lt;BR /&gt;&lt;BR /&gt;The results are not at all the same. The ML results are ~ the same as point-by-point adding zi to the length zi number of points at the beginning of y. As for the IPP results, I don't have a clue as to what it's doing. The zi I'm using is symmetric, so it's not a matter of flipping it left-right, but obviously I'm missing something. The zi I'm using is symmetric, so it's not a matter of flipping it left-right, but obviously I'm missing something.&lt;BR /&gt;&lt;BR /&gt;Any ideas on how to get IPP to work like MatLab without simpling adding the intitial conditions to the output?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Jan 2012 15:38:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/IppsFIR-and-Initial-Conditions/m-p/832518#M5682</guid>
      <dc:creator>Jay_Schamus</dc:creator>
      <dc:date>2012-01-11T15:38:19Z</dc:date>
    </item>
    <item>
      <title>IppsFIR and Initial Conditions</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/IppsFIR-and-Initial-Conditions/m-p/832519#M5683</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;"filter" in Matlab corresponds to IIR filter - when you use "null" delay line and a[0]=1 - it works as FIR, but when you use initialized delay line - "filter" considers it as IIR direct form 2 delay line (see description for "filter" in the manual); IPP FIR considers delay line as simple tapsLen-1 delayed source. For full correspondence with "filter" you should use IPP IIR functionality and recalculate zi (delay line) to direct form 2 as it's described in Matlab documentation (ippsIIR also uses direct form 2 delay line). Or if you need only FIR - you should use your direct form1 delay line for IPP and for Matlab you should recalculate it to the direct form2:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;for( i = 0; i &amp;lt; order; i++ ){&lt;BR /&gt; pDly&lt;I&gt; = 0;&lt;BR /&gt; for( n = order - i; n &amp;gt; 0; n-- ){&lt;BR /&gt; pDly&lt;I&gt; += pTaps[n+i] * pSrc[len-n]; /* b- corfficients */&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;for( i = 0; i &amp;lt; order; i++ ){&lt;BR /&gt; for( n = order - i; n &amp;gt; 0; n-- ){&lt;BR /&gt; pDly&lt;I&gt; -= pTaps[order+n+i] * pDst[len-n]; /* a- coefficients */&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Igor&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2012 07:59:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/IppsFIR-and-Initial-Conditions/m-p/832519#M5683</guid>
      <dc:creator>igorastakhov</dc:creator>
      <dc:date>2012-01-12T07:59:12Z</dc:date>
    </item>
    <item>
      <title>IppsFIR and Initial Conditions</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/IppsFIR-and-Initial-Conditions/m-p/832520#M5684</link>
      <description>Doh! &lt;BR /&gt;
&lt;BR /&gt;
Thanks, Igor. I didn't make the connection that of course ML is always 
using an IIR filter even when the denominator coefficients are just 1. Been too 
long since I took my filters classes.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jan 2012 15:39:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/IppsFIR-and-Initial-Conditions/m-p/832520#M5684</guid>
      <dc:creator>Jay_Schamus</dc:creator>
      <dc:date>2012-01-12T15:39:13Z</dc:date>
    </item>
  </channel>
</rss>

