<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I meant to send it to the list, but looks like I responded
personally. Here is the response to the whole list. <br>
<br>
<b>Murry asked:</b><b><br>
</b><b>
Is there any particular benefit in that u(t) formula over what
many of the
</b><b><br>
</b><b>
existing PID algorithms do? Or is this just a different way of
expressing
</b><b><br>
</b><b>
it?
</b><br>
<br>
<br>
It is simpler to compute. <br>
<br>
And it does not need as much memory. <br>
<br>
Sorry about the A thing. It was a copy and paste, and those should
have been on different lines. <br>
<br>
Do not worry about the z transform, it just explains how you get
from one to another and that the two end equations are the same. <br>
<br>
That final u(t) equation is what you are looking for. <br>
<br>
u(t )=u(t−1)+ A<font size="-2">1 </font>e(t )+ A<font size="-2">2
</font>e(t−1) + A<font size="-2">3</font> e(t−2)<br>
<br>
u(t-1) is the answer from the previous PID equation </p>
<p>e(t) is the difference between the desired output and the
measured output</p>
<p>e(t-1) is the e(t) from the previous time you ran the PID</p>
<p>e(t-2) is the e(t) from two previous times you ran the PID<br>
<br>
so after you have computed u(t)</p>
<p>e(t-2) = e(t-1)<br>
e(t-1) = e(t)<br>
u(t-1) = u(t)<br>
for the next time you run the PID calculation <br>
<br>
And the equations for the A terms were not clear in the paper. <br>
<br>
A<font size="-2">1</font> = K<font size="-2">p</font> + K<font
size="-2">i</font> + K<font size="-2">d</font><br>
A<font size="-2">2</font> = K<font size="-2">p</font> - 2K<font
size="-2">d</font><br>
A<font size="-1">3</font> = K<font size="-2">d</font><br>
<br>
And since the K<font size="-2">p</font> , K<font size="-2">i</font>,
K<font size="-2">d </font>terms are constants, the A terms are
constants also. <br>
<br>
This is way faster than worrying about the integration
calculation.<br>
<br>
If you do not use the K<font size="-2">d</font> term then make it
0, (zero) and it simplifies the A<font size="-2">2</font> term and
gets rid of the A<font size="-2">3</font> and e(t-2) terms. <br>
<br>
I think it is pretty cool. I used it when I ran PID at 50 kHz on a
simple 16-bit custom microcontroller with a 16 clock multiply
peripheral. A divide took forever, because it was in software. For
that project a 24-bit computer would have been ideal. 16-bit was
too little, and 32-bit was overkill. But I made it work. <br>
<br>
Kip<br>
</p>
<br>
<div class="moz-cite-prefix">On 10/1/20 3:24 AM, Murray Altheim via
DPRGlist wrote:<br>
</div>
<blockquote type="cite"
cite="mid:4b38259e-a141-3a22-c590-f4d7c9ffe228@altheim.com">On
1/10/20 10:16 am, Kipton Moravec via DPRGlist wrote:
<br>
<blockquote type="cite">I found the writeup of the control
equations for the power supply I did in December 2012 and pulled
out just the PID part. The PID is
<br>
faster for a computer to calculate.
<br>
<br>
I do not remember where it came from, but it is pretty cool and
unrecognizable.
<br>
<br>
I made a PDF because equations do not work in email.
<br>
</blockquote>
<br>
Hi Kip,
<br>
<br>
Thanks, while I actually took a differential equations course at
university
<br>
I will own up to how absolutely minimal is my memory of any of
that. So
<br>
when I get to that Z-transform I can kinda make out what it means
but on
<br>
my own there'd be no way I'd have figured that out on my own.
<br>
<br>
That final formula does seem to be quite powerful but you almost
lost me
<br>
at the A1 = formula as I didn't notice that specific line was
actually
<br>
expressing all three relationships (A1, A2 and A3 are all defined
on that
<br>
line). Once I'd (in my head) separated out those three it was
clearer on
<br>
how I'd implement that in Python.
<br>
<br>
Is there any particular benefit in that u(t) formula over what
many of the
<br>
existing PID algorithms do? Or is this just a different way of
expressing
<br>
it?
<br>
<br>
Cheers,
<br>
<br>
Murray
<br>
<br>
...........................................................................
<br>
Murray Altheim <murray18 at altheim dot
com> = = ===
<br>
<a class="moz-txt-link-freetext" href="http://www.altheim.com/murray/">http://www.altheim.com/murray/</a>
=== ===
<br>
= = ===
<br>
In the evening
<br>
The rice leaves in the garden
<br>
Rustle in the autumn wind
<br>
That blows through my reed hut.
<br>
-- Minamoto no Tsunenobu
<br>
<br>
_______________________________________________
<br>
DPRGlist mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:DPRGlist@lists.dprg.org">DPRGlist@lists.dprg.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org">http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org</a>
<br>
</blockquote>
</body>
</html>