EMBEDDED TOOL
PID Controller Simulator
Tune Kp, Ki, and Kd and watch the closed-loop step response redraw live on an animated chart.
Hover the chart to read exact values. The plant is a fixed generic second-order process, G(s) = 1 / (s² + 10s + 20), driven by a step change in setpoint at t = 0.
About this tool
Drag the Kp, Ki, and Kd sliders to see exactly how each PID term reshapes a system's response to a step change in setpoint, redrawn live on the chart. The controller drives a fixed, generic second-order process — the same kind of textbook plant used to teach PID tuning — so you can isolate the effect of each gain without also having to account for a changing system.
Proportional (Kp) reacts to the current error and speeds up the response, but on its own it settles below the setpoint — a pure-P controller always leaves some steady-state error on this plant. Integral (Ki) accumulates past error over time and drives that steady-state error to zero, at the cost of extra overshoot and a slower approach if it's too aggressive. Derivative (Kd) reacts to the rate of change of the output (not the error, to avoid a "derivative kick" when the setpoint jumps) and damps oscillation, trading a bit of speed for a cleaner settle.
Frequently asked questions
- What process is being controlled?
- A fixed second-order transfer function, G(s) = 1 / (s² + 10s + 20) — a standard illustrative plant (equivalent to a mass-spring-damper system) used in many PID tuning tutorials. It's open-loop stable but, without integral action, a proportional-only controller can't fully eliminate steady-state error on it.
- Why does the response start moving before Kp, Ki, or Kd are "big"?
- The chart always simulates a unit step in setpoint (from 0 to 1) at t = 0, so you're seeing the closed-loop step response for whatever gains the sliders are set to — including the default starting values.
- Why is derivative action based on the output instead of the error?
- This is "derivative on measurement," the standard real-world implementation. Differentiating the error directly causes a huge instantaneous spike (a "derivative kick") the moment the setpoint changes, since the error itself jumps abruptly — differentiating the measured output instead avoids that spike while damping oscillation just as effectively.
- What do overshoot, rise time, settling time, and steady-state error mean?
- Overshoot is how far the output peaks above the final setpoint, as a percentage. Rise time is how long it takes to go from 10% to 90% of the setpoint. Settling time is when the output finally stays within ±2% of the setpoint for good. Steady-state error is the remaining gap between the output and the setpoint at the end of the simulated window.
- Why does increasing Ki sometimes make things worse before they get better?
- Integral action keeps accumulating error until it's driven to zero, which is great for eliminating offset but can overshoot and oscillate if it's too aggressive relative to Kp and Kd — this is the classic "PI without enough D" tuning tradeoff the sliders let you feel directly.