Results are for reference only. A teaching simulation of an idealised plant — real tuning needs the real system. Check against other sources.
Control Systems · tuning

PID Control

Tune the three gains, watch the closed loop chase the setpoint.
u = Kₚe + Kᵢ∫e + Kₐ·de/dt

Controller

three gains
5.0
2.0
1.00

Plant

what you control
2.0
1.0

Step response

t = 0.0 s
setpoint output
Performance
Detail
Field notes

What each term does

Using this tool

Tuning a PID controller by feel

A PID controller steers a process toward a target (the setpoint) by reacting to the error between where it is and where it should be. It blends three responses: proportional (push harder the further off you are), integral (keep pushing until the leftover error is gone), and derivative (ease off as you approach, to avoid overshooting). Tuning is the art of balancing them — press play and watch the output chase the amber setpoint line.

Worked example

With proportional control alone on a stable plant, the output settles short of the target — a permanent steady-state error, because once the error shrinks, so does the push.

Add integral action and that offset disappears: the integral term accumulates the leftover error and keeps nudging until the output sits exactly on the setpoint. Add a touch of derivative and the overshoot on the way there shrinks too. That progression — P → PI → PID — is the whole story in miniature.

Why does P-only leave an offset?

Proportional output is the error times a gain. To hold any output you need some error, so it settles wherever the remaining error produces just enough push. Integral action removes this.

What does too much integral do?

It makes the loop sluggish and prone to overshoot and oscillation — the accumulated term keeps pushing even after you've arrived, so the output sails past before the integral unwinds.

Why add derivative at all?

Derivative anticipates: it reacts to how fast the error is changing and applies the brakes early, damping overshoot. The downside is sensitivity to noise, so it's often used sparingly.

Is there one correct tuning?

No — it's a trade-off between speed, overshoot, and robustness. The "best" gains depend on the real plant and what you care about. This sim is for intuition, not a substitute for tuning the real system.