PID Tuner
PID Tuner
PID Tuner finds optimal PID values using Yes/No questions to help new comers tune their PID
controller they coded themselves or from a template.
Teams that do not have a PID controller can use online templates like JAR or LemLib that incorporate these concepts into an easy-to-use template.
It is strongly advised that students learn the basics of what a PID controller is if they choose to
implement it into their robot in order to follow the REC Foundation's Student-Centered Policy:
"Teams that utilize example code or custom libraries from outside sources should use caution. The
program used should represent the students’ efforts and abilities, and libraries must be publicly
available. Blindly using code without understanding the code functionality is not consistent with
the educational goals of this program. Students should be able to understand and explain the code,
and students should be able to demonstrate that they can program on a level equivalent to the code
used in their mechanism." - REC Foundation
Use starting values to help jumpstart the process of PID tuning! If you do not have a guess,
compare the weight and motors to our example values and create a rough estimate. You do not need
to be accurate at all!
Oscillations is a technique where you increase kP to be as high as possible while oscillating
(overshooting and undershooting) below a set amount of times. You then increase kD until the
oscillations stop.
The amount of oscillations to stop at depends on the type of PID and you! The more oscillations you
pick, the higher chance you will have a unstable PID controller where any value of kD won't stop oscillations
with your kP value.
The kD First technique is made for robots that tend to tip or turn at the end of long lateral
motions, causing the limiting factor to be kD instead of kP. This is typically due to large kD
values causing rapid stopping. In this technique, we: - roughly tune our kP value and kD value with a normal driving distance where the robot can't
speed up enough to drift. If your guess for kD is too large, click Unstable to lower kD by
10%. You can click the Update button to update values and deltas.
- find the largest kD value possible with our kP value so that the robot can drive long
distances without tipping or drifting. Since we're lowering kD, your robot may start to
overshoot. Click the 'Unstable' button to lower kP by 10%. You can click the Update button to
update values and deltas.
- find the largest possible kP value possible without our robot oscillating. This gives us our
biggest possible kP value with our biggest possible kD value while preventing robot tips on
large drives.