ControlsIntermediate

PID Control for Robot Mechanisms

PID control pushes a mechanism toward a setpoint by reacting to present, accumulated, and changing error.

PIDControlsFRCFeedback

Site connection

The robotics season used PID-style control for pivot, shooter, intake, and other mechanisms.

Visual model

A mechanism response curve

Tune proportional gain and derivative damping to see how overshoot and settling change.

Interactive

PID tuning changes speed, overshoot, and settling

The Feedback Loop

A controller compares the desired setpoint with the measured state. The difference is error.

The proportional term reacts to current error, the integral term reacts to accumulated error, and the derivative term reacts to how fast error is changing.

A useful controller is not the most aggressive one. It is the one that reaches the target quickly without unstable motion.

Robot Examples

A pivot can use position PID to reach an angle. A shooter can use velocity PID to hold RPM. An intake can use sensor feedback to stop after capturing a game piece.

The same feedback pattern applies, but the measurement, setpoint, and acceptable error all change.

MechanismSetpointMeasurement
PivotTarget angleEncoder angle
ShooterTarget RPMWheel velocity
ElevatorTarget heightEncoder position
Drivetrain headingTarget angleGyro yaw

Common Pitfalls

  • Raising P until the mechanism oscillates and calling it tuned.
  • Adding integral control before understanding steady-state error.
  • Ignoring sensor noise in the derivative term.
  • Testing with no load and expecting the same behavior during a match.

Quick check

Quiz

Which PID term reacts to the current error?
  1. P
  2. I
  3. D
  4. None of them

The proportional term scales the current error.

Sources and Further Reading

Related Explainers