Thread: PID Loops
View Single Post
  #16   Spotlight this post!  
Unread 13-03-2011, 14:43
Chris27's Avatar
Chris27 Chris27 is offline
Registered User
AKA: Chris Freeman
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Mountain View
Posts: 196
Chris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant future
Re: PID Loops

Quote:
Originally Posted by theNerd View Post
when PID loops are used?
An example of a use of PID is our autonomous mode. We want to be able to drive out exactly x inches to our rack in a perfectly straight line to put us in a position to score a tube on the high rack. This isn't so straightforward as a 150lb robot has a lot of momentum and it is easy to overshoot a target distance (and crash into the wall). We can record the distance the robot has traveled by putting an encoder on the right side of the drive train. Using PID, we set the set point to x and read the encoder to get the current position. With our gains set correctly, we arrive at distance x rather smoothly.

However, we also want to drive in a perfectly straight line. If, say there is more friction on one side of the drive train, this will cause the robot to drive in an arc. You can add a gyro to the bot, use PID on it with the set point of whatever heading is defined to be "straight". Add this correction to the speed of the left wheel motors and you are 80% of the way to having a perfect one tube autonomous mode.