wiki:ControlSystems/SoftwareTeam/Training/GettingStarted/PIDControl

Version 4 (modified by dosheroff, 6 years ago) (diff)

--

In the last example we learned about proportional closed loop control where we helped the robot drive straight by increasing/decreasing power to the left/right motors in proportion to the error between the distance traveled by the left/right wheels.

While proportional control works in many cases, it can take time to achieve the proper power balances, can be slow to react to changes, and in some cases can even oscillate or never reach the proper power levels. PID control is a more sophisticated solution that takes more factors into consideration:

  • P = Proportion - the current error
  • I = Integral - the error accumulated over time
  • D = Derivative - the rate error is increasing/decreasing

PID control gives a more concrete control over speed, and leaves less up to chance in terms of speed control. Possible examples of usage include

  • Arm control
  • Precise turning (in the case of auto)
  • Flywheel speeds, to ensure that the flywheels are maintaining a constant speed
  • And much more. If you have an idea for a usage of PID loops, come see a mentor or software student leader!!

Code examples are coming soon