<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=4&amp;t=15094&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2016-04-12T06:42:59+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=15094&amp;mode</id>
<entry>
<author><name><![CDATA[mg101]]></name></author>
<updated>2016-04-12T06:42:59+01:00</updated>
<published>2016-04-12T06:42:59+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15094&amp;p=158339#p158339</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15094&amp;p=158339#p158339"/>
<title type="html"><![CDATA[Re: Dwa modele i regulator PID - jak zaimplementować?]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15094&amp;p=158339#p158339"><![CDATA[
Rzuć okiem <!-- l --><a class="postlink-local" href="http://forum.atnel.pl/topic4099.html" >topic4099.html</a><!-- l --><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=683">mg101</a> — 12 kwi 2016, o 06:42</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Lagun_25]]></name></author>
<updated>2016-04-11T20:10:00+01:00</updated>
<published>2016-04-11T20:10:00+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15094&amp;p=158297#p158297</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15094&amp;p=158297#p158297"/>
<title type="html"><![CDATA[Re: Dwa modele i regulator PID - jak zaimplementować?]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15094&amp;p=158297#p158297"><![CDATA[
Co prawda ja regulowałem prędkość silników krokowych, ale Tobie chyba chodzi o coś bardzo podobnego, więc to może będzie wskazówką:<br /><br />[syntax=c]OCR2A= (255 - constrain( pid_Controller(ram_cfg.zero_angle,comp_angle,&amp;PID_DATA_struct) ) );[/syntax]<br /><br />A constrain() wygląda następująco(UWAGA: nie jest to optymalnie napisane):<br />[syntax=c]uint8_t constrain(float x){<br /><br />float abs_value;<br /><br />if (x&lt;-ram_cfg.stop_angle) {<br /><br />motors_flag=1;<br />DIR_BACKWARD;<br /><br />abs_value=abs(x);<br /><br />    if(abs_value &gt; ram_cfg.max) return ram_cfg.max;<br />    else return abs_value;<br /><br />}<br /><br />else if (x&gt;ram_cfg.stop_angle){<br /><br />motors_flag=1;<br />DIR_FORWARD;<br /><br />    if(x &gt; ram_cfg.max) return ram_cfg.max;<br />    else return x;<br /><br />}<br /><br />motors_flag=0;<br />return 0;<br /><br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=4953">Lagun_25</a> — 11 kwi 2016, o 20:10</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[2m7]]></name></author>
<updated>2016-04-11T18:56:07+01:00</updated>
<published>2016-04-11T18:56:07+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15094&amp;p=158286#p158286</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15094&amp;p=158286#p158286"/>
<title type="html"><![CDATA[Dwa modele i regulator PID - jak zaimplementować?]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15094&amp;p=158286#p158286"><![CDATA[
Witajcie,<br />implementuję regulator PID wg. noty AVR221 do sterowania wyjściem PWM oraz sygnałem 0;1 dla kierunku przepływu prądu. Regulowana będzie temperatura za pomocą ogniw Peltiera w komorze termicznej, w związku z czym mam dwa modele matematyczne, odrębne dla chłodzenia oraz grzania. Jak zatem: <br />1. Uzależnić parametry regulatora w zależności od funkcji grzania/chłodzenia? <br />2. Gdzie wsadzić instrukcję warunkową sterowania kierunkiem przepływu prądu zależną od uchybu regulacji wraz ze strefą nieczułości?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=10132">2m7</a> — 11 kwi 2016, o 18:56</p><hr />
]]></content>
</entry>
</feed>