thedropbears / pystronghold

Python control code for 2016 FRC - Stronghold
2 stars 6 forks source link

Heading Hold PID Tuning #29

Closed ArthurAllshire closed 8 years ago

james-ward commented 8 years ago

I've been thinking about this over night. We are having issues with massive overshoot, leading to oscillation. So we want to drive it hard when we are a long way from the setpoint, but start ramping the inputs down much earlier so we have a chance to stop. Thus, I think we want high maximum outputs (but maybe not +/-1) and much lower Kp. This will mean that we still saturate the controller if we are a long way from the setpoint (eg doing a 180) but the saturation will stop further from the setpoint. Perhaps we could test by disabling the PID then spinning at full speed. When we stop, we see how much further it goes under inertia. We need the saturation point to be higher than this (ie tune our Kp to saturate at an angular error higher than that).

james-ward commented 8 years ago

We are getting better, but I think it could be more aggressive, with a lower maximum output. Might help with #34

james-ward commented 8 years ago

Still needs tuning after Sydney.

james-ward commented 8 years ago

Closed in d34e0dd0f6e9acb2110c172b081cf5e8a09df3e4