View Single Post
  #4   Spotlight this post!  
Unread 30-03-2004, 11:19
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 10intheCrunch
...
Three, what circumstances are you dealing with integer overflow? We've never had anything close to that high an integral, much less wanted it (it would cause the motor to swing all the way over and jam the arm into the robot...). Perhaps we have radically different output systems, but our integral never really gets higher than 30-50 (and that can be dangerous).
Typically, if you are running near the edge of your control abilities (pushing your hardware to the limits, which I am *always* doing), when the output saturates (e.g. ->254 in IFI systems) and you have not made your setpoint (velocity or position) the error term grows without bounds. The solution is simple: stop accumulating errors if the output saturates.

In the code I posted (above), we have a torque limit and stop accumulating the integral error when that has been hit.

Cheers!