PID Feedback Control Loop
See proportional, integral, and derivative action inside a closed feedback loop.
PID Feedback Control Loop
Compare a setpoint with a measured process value, watch the P, I, and D terms build a controller output, then see actuator limits and sensor feedback change the response.
The controller starts with error: setpoint minus measured process value.
P reacts now, I remembers persistent error, and D damps rapid change.
Real valves, heaters, motors, and pumps saturate at physical limits.
The measured result returns to the comparator on the next sample.
Closed Loop Animation
Compare: setpoint and measurement create error.Response Trace
Process value follows the setpoint through the plant dynamics.Term Contributions
Bars show signed contribution to controller output.Controls
Motor speed: moderate loop with encoder feedback.Scenario
Tuning
Current Reading
Sample time: 100 msMeasured process value after sensor noise and plant lag.
Raw controller output before actuator clamping.
Shows whether the physical actuator is limiting the command.
Fast feedback loops should run near the actuator when timing matters.
The measured value is below target, so controller output rises.
The command is inside the configured output limit.
Large present error makes the proportional term dominate early motion.
Technical accuracy notes
- PID gains are process-specific. A gain that works for motor speed can be unstable for temperature or too weak for a water tank.
- Integral action can reduce persistent steady-state error only when the actuator has enough authority. If the output is saturated, unchecked integral accumulation causes windup.
- Derivative action is sensitive to measurement noise. Practical controllers often filter the derivative term or take derivative on measurement to avoid derivative kick.
- Ziegler-Nichols is a tuning method, not a universal best setting. Safety-critical systems need bounded outputs, rate limits, validation, and domain-specific commissioning.
- For IoT systems, a cloud dashboard can monitor or supervise, but fast control loops normally need local execution near the sensor and actuator.
Formula trace
error = setpoint - measured_value
error_pct = error / process_span * 100
P = Kp * error_pct
I = Ki * integral(error_pct dt)
D = Kd * filtered_d(error_pct) / dt
output_raw = bias + P + I + D
output = clamp(output_raw, 0, actuator_limit)
pv_next = pv + ((plant_target - pv) / tau) * dt