PID Controller
Proportional-Integral-Derivative Control
Precise control loops with auto-tuning
The PID Controller provides precise closed-loop control for actuators and motors. Features anti-windup protection to prevent integral term overflow, configurable output limits, and Ziegler-Nichols auto-tuning for automatic gain optimization. Runtime adjustable gains allow dynamic reconfiguration.
Control Formula
Responds to current error. Higher values = faster response but potential overshoot.
Eliminates steady-state error. Accumulates error over time. Anti-windup prevents saturation.
Predicts future error. Reduces overshoot and improves settling time. Sensitive to noise.
API Endpoints
/api/v1/robotics/control/pid/:id/compute
Compute control output for given setpoint and process variable.
{
"setpoint": 100.0,
"process_variable": 95.5,
"dt": 0.1
}
/api/v1/robotics/control/pid/:id/gains
Set PID gains at runtime.
{
"kp": 1.0,
"ki": 0.1,
"kd": 0.05
}
/api/v1/robotics/control/pid/:id/auto_tune
Run Ziegler-Nichols auto-tuning to find optimal gains.