<?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 IIR Filter with SDK doesn't work properly in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/IIR-Filter-with-SDK-doesn-t-work-properly/m-p/185465#M4465</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear to all forum,&lt;BR /&gt;I have a some problems with implentation of an IIR filter via SDK DSP library.&amp;nbsp;&lt;BR /&gt;I started a new project with these :&lt;BR /&gt;&lt;BR /&gt;1) Motorola&amp;nbsp; MC56F8357EVM board&lt;BR /&gt;2) CodeWarrior 5.5.1v&lt;BR /&gt;3) Processor expert v 2.93 for Motorola 56800 family.&lt;BR /&gt;&lt;BR /&gt;So I generated a simple sinusoid at 50Hz with 8000 Hz of sample frequency and then I filtered it but sometime the filter doesn't not work well.&lt;BR /&gt;&lt;BR /&gt;I extract the following IIR filter from help docs of processor expert.&lt;BR /&gt;&lt;BR /&gt;/* The order of coefficients : a2,a1/2,b0,b1,b2 for each biquad&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Note that |b0|,|b1| and |b2| ahould all be lesser than 1.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Test Case Filter Specifications:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Type: Chebychev2&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Order: 4&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Passband edge: 1000Hz&lt;BR /&gt;&amp;nbsp;&amp;nbsp; StopBand Edge: 2000Hz&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Maximum Ripple in PassBand: 1db&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Attenuation in Stopband : 30db&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Sampling Frequnecy: 8000Hz&lt;BR /&gt;&lt;BR /&gt;const Frac16 IIR_Coef_F1[] =&lt;BR /&gt;{&lt;BR /&gt;FRAC16(-0.1310),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* a2*/&lt;BR /&gt;FRAC16(0.27805),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* a1/2*/&lt;BR /&gt;FRAC16(0.1808),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* b0*/&lt;BR /&gt;FRAC16(0.2133),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* b1*/&lt;BR /&gt;FRAC16(0.1808) ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* b2*/&lt;BR /&gt;&lt;BR /&gt;FRAC16(-0.6107),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* a2*/&lt;BR /&gt;FRAC16(0.4944),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* a1/2*/&lt;BR /&gt;FRAC16(0.3892),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* b0*/&lt;BR /&gt;FRAC16(-0.1566),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* b1*/&lt;BR /&gt;FRAC16(0.3892)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* b2*/&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;The first problem is: &lt;STRONG&gt;How I can generated these coefficient? I tried with QEDESign Lite sw but the results&amp;nbsp; doesn't macth? Why?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;The second problem is when I set the sinusoid amplitude to 1 value. Infact the filter output is something strange not so close to be considered a sinuosid.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;STRONG&gt;Are there some problem with use of Frac16?&amp;nbsp; Some saturation problem are possible?&lt;/STRONG&gt;&lt;BR /&gt;This problem disappear if I set the amplitude sin to 0.5 or less.&lt;BR /&gt;&lt;BR /&gt;The third problem is the following. When I generated a sinusoid outide the passband filter (for example 1500Hz) the output isn't close to zero value. So the filter doesn' t kill the sin.&lt;BR /&gt;&lt;BR /&gt;I attached the entire project&amp;nbsp; generated vith processor expert. It is in zip&amp;nbsp; format&lt;BR /&gt;&lt;BR /&gt;Thank in advance for any help you will give to me!&lt;BR /&gt;Please It's very urgent.&lt;BR /&gt;&lt;BR /&gt;Sw Eng&lt;BR /&gt;Francesco Chirico&lt;BR /&gt;Mer Mec Spa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.freescale.com%2Ffiles%2Fcommunity_files%2FCWDSPCOMM%2F829_Test_Esempio_IIR_CodeW.zip" rel="nofollow" target="_blank"&gt;Test_Esempio_IIR_CodeW.zip&lt;/A&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-15&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;05:41 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Feb 2008 18:29:44 GMT</pubDate>
    <dc:creator>Lapo</dc:creator>
    <dc:date>2008-02-04T18:29:44Z</dc:date>
    <item>
      <title>IIR Filter with SDK doesn't work properly</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/IIR-Filter-with-SDK-doesn-t-work-properly/m-p/185465#M4465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear to all forum,&lt;BR /&gt;I have a some problems with implentation of an IIR filter via SDK DSP library.&amp;nbsp;&lt;BR /&gt;I started a new project with these :&lt;BR /&gt;&lt;BR /&gt;1) Motorola&amp;nbsp; MC56F8357EVM board&lt;BR /&gt;2) CodeWarrior 5.5.1v&lt;BR /&gt;3) Processor expert v 2.93 for Motorola 56800 family.&lt;BR /&gt;&lt;BR /&gt;So I generated a simple sinusoid at 50Hz with 8000 Hz of sample frequency and then I filtered it but sometime the filter doesn't not work well.&lt;BR /&gt;&lt;BR /&gt;I extract the following IIR filter from help docs of processor expert.&lt;BR /&gt;&lt;BR /&gt;/* The order of coefficients : a2,a1/2,b0,b1,b2 for each biquad&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Note that |b0|,|b1| and |b2| ahould all be lesser than 1.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Test Case Filter Specifications:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Type: Chebychev2&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Order: 4&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Passband edge: 1000Hz&lt;BR /&gt;&amp;nbsp;&amp;nbsp; StopBand Edge: 2000Hz&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Maximum Ripple in PassBand: 1db&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Attenuation in Stopband : 30db&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Sampling Frequnecy: 8000Hz&lt;BR /&gt;&lt;BR /&gt;const Frac16 IIR_Coef_F1[] =&lt;BR /&gt;{&lt;BR /&gt;FRAC16(-0.1310),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* a2*/&lt;BR /&gt;FRAC16(0.27805),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* a1/2*/&lt;BR /&gt;FRAC16(0.1808),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* b0*/&lt;BR /&gt;FRAC16(0.2133),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* b1*/&lt;BR /&gt;FRAC16(0.1808) ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* b2*/&lt;BR /&gt;&lt;BR /&gt;FRAC16(-0.6107),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* a2*/&lt;BR /&gt;FRAC16(0.4944),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* a1/2*/&lt;BR /&gt;FRAC16(0.3892),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* b0*/&lt;BR /&gt;FRAC16(-0.1566),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* b1*/&lt;BR /&gt;FRAC16(0.3892)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* b2*/&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;The first problem is: &lt;STRONG&gt;How I can generated these coefficient? I tried with QEDESign Lite sw but the results&amp;nbsp; doesn't macth? Why?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;The second problem is when I set the sinusoid amplitude to 1 value. Infact the filter output is something strange not so close to be considered a sinuosid.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;STRONG&gt;Are there some problem with use of Frac16?&amp;nbsp; Some saturation problem are possible?&lt;/STRONG&gt;&lt;BR /&gt;This problem disappear if I set the amplitude sin to 0.5 or less.&lt;BR /&gt;&lt;BR /&gt;The third problem is the following. When I generated a sinusoid outide the passband filter (for example 1500Hz) the output isn't close to zero value. So the filter doesn' t kill the sin.&lt;BR /&gt;&lt;BR /&gt;I attached the entire project&amp;nbsp; generated vith processor expert. It is in zip&amp;nbsp; format&lt;BR /&gt;&lt;BR /&gt;Thank in advance for any help you will give to me!&lt;BR /&gt;Please It's very urgent.&lt;BR /&gt;&lt;BR /&gt;Sw Eng&lt;BR /&gt;Francesco Chirico&lt;BR /&gt;Mer Mec Spa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.freescale.com%2Ffiles%2Fcommunity_files%2FCWDSPCOMM%2F829_Test_Esempio_IIR_CodeW.zip" rel="nofollow" target="_blank"&gt;Test_Esempio_IIR_CodeW.zip&lt;/A&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-15&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;05:41 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 18:29:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/IIR-Filter-with-SDK-doesn-t-work-properly/m-p/185465#M4465</guid>
      <dc:creator>Lapo</dc:creator>
      <dc:date>2008-02-04T18:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: IIR Filter with SDK doesn't work properly</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/IIR-Filter-with-SDK-doesn-t-work-properly/m-p/185466#M4466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You're using an old version.&lt;/DIV&gt;&lt;DIV&gt;The DSC V8.2 is availale.&lt;/DIV&gt;&lt;DIV&gt;On this version there is the&amp;nbsp;Processor Expert 2.98.03 for Freescale 56800/E.&lt;/DIV&gt;&lt;DIV&gt;Can I suggest you to check with this version ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;See below details to download it:&lt;/DIV&gt;&lt;DIV&gt;Freescale 56800/E Digital Signal Controllers Version 8.2&lt;BR /&gt;You can download this version on our web site via the link:&lt;BR /&gt;&lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CWS-568-CX" rel="nofollow" target="_blank"&gt;http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CWS-568-CX&lt;/A&gt;#&lt;BR /&gt;The Special edition license is installed by default.&lt;BR /&gt;If you need another version of the license please contact your local distributor.&lt;BR /&gt;You can have several versions installed on the same PC.&lt;BR /&gt;There is only one restriction: install them on separate folder.&lt;BR /&gt;If you're using an old version, please backup your project before to try it with this new version.&lt;BR /&gt;If you will meet some compatibility issue you could back to the older version without problem.&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;Regards&lt;/DIV&gt;&lt;DIV&gt;Pascal&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 17:26:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/IIR-Filter-with-SDK-doesn-t-work-properly/m-p/185466#M4466</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2008-02-08T17:26:48Z</dc:date>
    </item>
  </channel>
</rss>

