← Back to Resources

Work in progress: this PID racerbot resource is still being refined. The simulators are educational models and may continue to receive behavior and calibration updates.

SFU Racerbot Educational Resource

Interactive PID Visualizer for Learning and RoboRacer Wall-Following

This webpage is a hands-on learning tool for understanding PID control. You will start with a simple general-purpose simulator to learn what the proportional, integral, and derivative terms do. Then you will explore a RoboRacer wall-following visualizer that shows how similar control ideas help a small racecar stay aligned with a wall or target path.

No prior PID knowledge should be assumed.

PID Foundations

What the PID Formula Means

The controller compares what we want to what we have. The difference is error. PID turns that error into a correction command.

PID Equation

u(t) = Kp · e(t) + Ki · ∫e(t)dt + Kd · de(t)/dt

u(t): control output sent to the system.

e(t): error = setpoint − measured value.

Kp: reacts to current error (faster response, can overshoot if too high).

Ki: reacts to accumulated past error (removes offset, can wind up).

Kd: reacts to how fast error changes (adds damping, helps reduce oscillation).

Changing Kp

Setpoint Low Kp Medium Kp High Kp

Higher Kp usually rises faster, but too much Kp can create oscillation and overshoot.

Changing Ki

Setpoint Low Ki Medium Ki High Ki

Ki removes steady-state error, but too much Ki can produce slow recovery and extra overshoot.

Changing Kd

Setpoint Low Kd Medium Kd High Kd

Kd adds damping. It can smooth the response and reduce overshoot when tuned reasonably.