TEXAS TORQUE |
|
PID (Proportional-Integral-Derivative) is a continuous feedback loop that attempts to reach a certain real-life encoder value.
The Proportional part of the PID controller influences the output of the controller by a proportion of the error.
$$p = k_p*e$$
For example, let’s say we have an error value of 10. If we have a proportional value of 5 (often stylized Kp), then it will output 50 (10*5). Note that this often causes a system to overshoot by far exceeding the requested point, and then conversely undershoot on the way back down.
The Integral part of the PID controller increases the force applied as time passes without reaching zero error. It behaves like an integral in calculus.
$$i = \int_{0}^{t} e*k_idt$$
The Derivative part of the PID controller is linked to the rate of change of the error. It behaves like the derivative of a continuous function in calculus.
$$d = \frac{de}{dt}*k_d$$
The output of a PID is the summation of the p, i, and d terms.
$$output = p + i + d$$
Initially written by Jack Pittenger in July 2021