Start from the governing relation
This is the smallest equation that preserves the physics needed for the formula.
FORMULA / 017
Interactive derivation module for PID controller.
Problem Definition
A motor position loop that responds quickly may overshoot and oscillate if the gains are not balanced.
| Symbol | Quantity | Unit | Meaning |
|---|---|---|---|
| $K_p$ | Proportional gain | 依系統而定 | Immediate error correction. |
| $K_i$ | Integral gain | 依系統而定 | Accumulated error removal. |
| $K_d$ | Derivative gain | 依系統而定 | Error trend damping. |
Analytical Derivation
| Item | Assumption |
|---|---|
| Assumption 1 | Linear time-invariant or locally linear behavior is assumed when using transfer functions. |
| Assumption 2 | Parameters are treated as constant over the analysis interval. |
| Assumption 3 | Numerical plots are educational approximations, not full circuit or field solvers. |
This is the smallest equation that preserves the physics needed for the formula.
The model is simplified so the dominant mechanism is visible.
The final form is the one used for design, simulation, or measurement review.
parameter $\to0$dominant term remainsThe formula reduces to its simplest physical behavior.
parameter $\to\infty$parasitics and implementation limits dominateThe closed-form equation becomes a warning rather than a full implementation model.
Parametric Verification
Use the sliders to change the physical parameters and watch the formula expose its behavior. The metric panel keeps sample count and compute latency visible so the visualization remains an engineering instrument, not only a picture.
INTERACTIVE MODULE
Engineering Application
class PID:
def __init__(self, kp, ki, kd):
self.kp, self.ki, self.kd = kp, ki, kd
self.i = 0.0
self.prev = 0.0
def update(self, e, dt):
self.i += e * dt
d = (e - self.prev) / dt
self.prev = e
return self.kp*e + self.ki*self.i + self.kd*d