Quote:
Originally Posted by David Fort
|
FYI, we downloaded Kevin Watson's example PID last night and reworked it for our situation and it worked OK once we got some good tuning numbers in it. (it was easier to tune our Vex robot than our FRC robot. On the other hand, the FRC robot was a much more exciting process)
One thing that has always puzzled me is where he divides the integral of the error by the pid_time. This seems like it calculates the average error, not the accumulated error. We deleted that part and it worked better. YAMMV.
Also on the "anti windup" stuff - we basically don't add the error to the error_i if the motor is already turning as fast as it can.
Not working 100%, but getting close.
David Fort
Team 1001
Hacksaw