|
Re: Gyro with Labview to drive straight
Quote:
Originally Posted by apalrd
We usually use an I controller for straight driving. It's essentially an 'adaptive drift constant' in our application, as it finds a 'drift bias' between the two sides but it's treated as a constant to the rest of the distance based controls.
The integral eventually finds a happy place which causes the robot to drive straight, and holds it indefinitely. We also have some speed adaption of the output, so the same integral keeps the drive straight at various output speeds, and we inhibit the control loop (but latch the integral) at low speeds. We also hold the integral between runs of the function, so multiple drive steps can keep the integral. If we were really smart we would store the integral over power cycles, but we don't.
If the gain is good, it can come out of a turn with quite a lot of error (I tested it to around 15 degrees), and come back to the correct heading very quickly. Past a certain error the control loop was unstable, we did not worry about it because our turns were more reliable than the unstable threshold. But, you should take up turn error in the turn function, not the straight function.
|
That's actually really interesting. The Take-Back-Half (TBH) algorithm is actually a form of Integral control, so it may work well for this application.
__________________
2013 MUC DC 3rd Place, FRC DC Regional, FRC Chesapeake Regional
2012 FRC DC Regional, FRC Chesapeake Regional
ERHS Robotics Club
- FRC Team 53 "Area 53"
www.erhsroboticsclub.org
|