[DPRG] PID Loop Question
Subject: [DPRG] PID Loop Question
From: Randy M. Dumse
rmd at newmicros.com
Date: Mon Feb 22 13:47:22 CST 2010
Quinones, Jose said: Monday, February 22, 2010 12:34 PM
> I am trying to get a better understanding of the PID Loop.
> So far, I think I understand the Proportional aspect this
good.
Yes, that is a reasonable basic representation.
> I think I have an idea of what Integral is.
Not so good on Integral.
The intergal is not for a big term, but more for a small term.
In fact if the integral gets too big it's actually a known
problem called "integral windup" or "integral runaway".
Instead, if the result has been a little off for a long time,
then the integral term is supposed to grow up enough to push the
system back to where it should be (zero error).
The problem is like this. When the proportional is really small,
it makes a really small push. Well, that small push can be too
small to actually cause system movement. If we model the action
as pushing something to center, you can probably imagine nudging
something might not work because of stiction of friction or what
not. So for little changes where the P term is also very little,
you could sit there off by a bit, and nothing would happen. But!
If every time that little error is added, and all the error is
of the same sign, meaning you're not hunting around the center,
but actually sitting there a bit off center, then that Integral
term will get big! Big enough to augment the underpowered P
term, and push, and break loose of the stiction, and get the
things centered again. So that's what the integral term does. It
builds up over time to produce a force big enough to stand in
for the P term, if the error is otherwise really small, but
constant.
> Not certain if I follow Derivative as well, but my
> impression is that it tells us how quick the error
> is changing and if so, then apply a correction.
Yes, that's a right impression. The derivative is the difference
between the error last time and this time. It works against the
other two terms. You can think of it in the I term example above
as seeing the I term got big enough to get the thing unstuck,
and it starts moving, you don't want to overshoot past center,
only to wind up on the other side of center, before the I terms
gets wound back down to zero. To the D term moderates both the P
and I terms once they start doing their jobs, lest they get to
good.
So that's the intuitive overview.
Now, how's your physics? If you can understand the equations of
motion as derived from Hooke's Law applied to Damped Harmoonic
Motion is a 2nd order differential equation, you can understand
how these three terms came to be.
http://hyperphysics.phyastr.gsu.edu/HBASE/hframe.html
You're adjusting the coefficients of the deplacement terms, so a
damped oscillator would move from one position to another, the
fastest possible way, with the least amount of overshoot and
ringing.
There are also slides there on critically damped, vs. under
damped and over damped motion, below on that same page. They
might help you gain perspective. PID is trying to make your
motion system exactly critically damped, so motion happens as
quickly, and with maximum precision.
If not, there's a good tutorial here:
http://www.engin.umich.edu/group/ctm/PID/PID.html
And a simpler one often refered to here:
http://www.embedded.com/2000/0010/0010feat3.htm
Or if there is still questions in your mind, ask, and I'll try
to offer simple answer. I've started to write a book on
robomagellan concepts, and I could let you see a preliminary
that discusses PID routines.
Randy
More information about the DPRG mailing list
