Quote:
|
Originally Posted by Rick TYler
Our programmer is convinced that his encoder-enabled PD code isn't working right because the robot is on the cart with the wheels off the ground, and that it would work if it was tried on the floor. Is this your experience?
|
When your robot isn't dragging 130+ lbs around, the PID controller will generally be massively overcontrolling. As the other poster says, the mass of the system is basically a very large D control. So I'd really recommend dialing back the control while it's on the blocks.
Last year, I ended up having the team code in two sets of PID constants: the normal tuned ones, and some majorly scaled back ones for testing the robot up on blocks so that you can tell that autonomous code is doing the right thing.
Since we're talking about it, the other major PID caveats are:
1. Making sure you sanity check your integral control (i.e. put a cap on the integral so that it can't overflow and wrap around, since that causes a major spazz)
2. Make sure you are applying the corrections in the right direction. And check your math to make sure you aren't overflowing variables.
3. The I and D control should be small.
4. Resist the temptation to adjust all the factors at once.