Skip to content

ControlPID Control

Proportional Control

Command = Kp times the error, limited to what the motor can give.

Not started Jump to practice

The simplest feedback rule: push harder the farther you are from the goal.

Key idea

A proportional controller sends $u = K_p\, e$. The gain $K_p$ sets how hard it pushes per unit of error. Real motors have limits, so the command is clipped to what the motor can give (this is called saturation).
Change $K_p$. Small: slow. Large: fast, then overshoot and wobble.

Why it works

Far from the goal the command is big; near it, small. So the robot slows as it arrives. But with friction or a load, a small error makes too small a push to move, so P control alone often stops a little short. That leftover is called steady-state error.

Worked example: Command

$K_p = 3$, setpoint 40, measurement 25.
  1. $e = 15$.
  2. $u = 3 \times 15 = 45$.

Answer: 45.

Worked example: Saturated

$K_p = 8$, $e = 40$, motor limit Β±255.
  1. $u = 320$, past the limit.
  2. Clipped to 255.

Answer: 255.

Common mistake

Forgetting the motor's limit. Big gains with big errors ask for commands the motor cannot give.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.

Loading practice…

Builds on

Leads to

Sources and further reading