Quote:
Originally Posted by martin417
In almost every case, a simple proportional control is more than sufficient.
|
"Almost every case" is really pushing it, but the sentiment that not every application requires I and D is definitely correct.
For mechanisms that are well-approximated as a linear first-order system near the expected operating point (i.e. negligible inertia for position control; near constant inertia for velocity control), sure, P might be enough. Flywheels, lightweight turrets and conveyors, and counter-balanced elevators can fall into this category if you don't care about being lightning fast and/or can tolerate some overshoot or steady-state error.
However, drivetrains, arms, and heavier servo mechanisms definitely benefit from damping and/or integral action much of the time. The best policy is to always start with P-only, then add other terms from there as necessary.
To the OP's question: if the same PID gains work well for you in autonomous mode, then you must ask yourself what is different in teleop? It could be timing, other things your robot is doing when in teleop (are other mechanisms drawing from the battery or is your code taking much longer to execute?), or different initial conditions (e.g. are you trying to auto-align when you are much further off target in teleop and/or still moving, in which case you may need to re-tune your controller to these conditions)?