<?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>CodeWarrior for MCUのトピックRe: PID constants</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/PID-constants/m-p/413758#M11650</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you do to PID integral when you change PID constants? If close to the right anti windup control is implemented, then at least you should recalculate PID integral every time you change PID constants. IMO it is totally wrong to change PID constants (constants!) on the flight.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jun 2015 06:55:36 GMT</pubDate>
    <dc:creator>kef2</dc:creator>
    <dc:date>2015-06-03T06:55:36Z</dc:date>
    <item>
      <title>PID constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/PID-constants/m-p/413755#M11647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Iam using HCS08 and codewarrior studio.&amp;nbsp;&amp;nbsp;&amp;nbsp; I implemented a PID algorithm for a generator speed control by&amp;nbsp; valve control&amp;nbsp; using stepper motor. Here Iam measuring rpm of generator with hall effect&amp;nbsp; sensor as&amp;nbsp; a feedback.&lt;/P&gt;&lt;P&gt;It works fine, but in this algorithm I changed my Kp,Ki,Kd constants in different conditions. ie nearest of setpoint I changed these constants to get fine values and if there is a big difference changed to get large error value.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is , can i change PID constants in running condition? Is it favourable ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 May 2015 05:08:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/PID-constants/m-p/413755#M11647</guid>
      <dc:creator>binukannur</dc:creator>
      <dc:date>2015-05-30T05:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: PID constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/PID-constants/m-p/413756#M11648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To investigate the problem we need more info.&lt;/P&gt;&lt;P&gt;What is the development tool version you're using ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you provide us to code or example code&amp;nbsp; showing the behavior ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Pascal&lt;BR /&gt;Freescale Technical Support&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 13:06:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/PID-constants/m-p/413756#M11648</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2015-06-02T13:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: PID constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/PID-constants/m-p/413757#M11649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Iam using&amp;nbsp;&amp;nbsp; Code Warrior Development studio V.10.6, and controller MC9s08DZ128.&lt;/P&gt;&lt;P&gt;Here is the bit of code we want to investgate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(count &amp;gt; (rpm_setpoint-4) &amp;amp;&amp;amp; count &amp;lt;(rpm_setpoint+4))//fine tune PID constants when setpoint reached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PID=PID_Compute(0.5,0.2,0.01,1,-5,5);//kp, ki, kd, dt(time intervell) , outmin, outmax&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PID=PID_Compute(1,0.5,0.25,1,-20,20);//kp,ki,kd,dt,outmin,outmax&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;//////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;count&amp;nbsp; -- it is the feedback value .here it is generator RPM input&lt;/P&gt;&lt;P&gt;rpm_setpoint&amp;nbsp; --- set point&lt;/P&gt;&lt;P&gt;PID_Compute---- PID function&lt;/P&gt;&lt;P&gt;PID----&amp;nbsp; it is the output &lt;/P&gt;&lt;P&gt;outmin,outmax&amp;nbsp; -- Iterm minimum and max value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the first loop , PID value is small and in the second loop PID value is high compared to first.&lt;/P&gt;&lt;P&gt;So if there is a large error the second loop will run and faster the adjustments.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 04:44:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/PID-constants/m-p/413757#M11649</guid>
      <dc:creator>binukannur</dc:creator>
      <dc:date>2015-06-03T04:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: PID constants</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/PID-constants/m-p/413758#M11650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you do to PID integral when you change PID constants? If close to the right anti windup control is implemented, then at least you should recalculate PID integral every time you change PID constants. IMO it is totally wrong to change PID constants (constants!) on the flight.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 06:55:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/PID-constants/m-p/413758#M11650</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2015-06-03T06:55:36Z</dc:date>
    </item>
  </channel>
</rss>

