View Single Post
  #27   Spotlight this post!  
Unread 21-03-2004, 23:40
Larry Barello Larry Barello is offline
http://www.barello.net
#0492 (Titan Robotics Club)
Team Role: Mentor
 
Join Date: Jan 2002
Location: Bellevue, WA
Posts: 85
Larry Barello has a spectacular aura aboutLarry Barello has a spectacular aura about
Re: PID control loops - closed loop feedback

Quote:
Originally Posted by maxlobovsky
Wouldn't it be vice-versa? I thought that the integral is neccesary for reaching the right value.



how is this the integral? This looks proportional to me, just the current error.
Note the "+=" that says add the right hand side to the left hand side. Which is an integral

e.g.

Foo += Something

is equivalent to

Foo = Foo + Something;

Therefore Foo is accumulating the integral of Something.

You are correct that the integral is needed to drive the error term to zero, but for position stuff that is rarely needed (particularly in low performance systems like what we are working on). WHat is really needed is to drive the servo *close* enough to the correct position that you don't care about the residual error. Integral terms are hard to get right and lead to a lot of instability and are really useless in a dynamic environment as they are fighting your ability to change the setpoint. They only make sense if your servo is relatively static or has a constant force in one direction that needs to be compensated for with the integral term. But if the error amount is dynamic and changing sign, the integral term just gets in the way.