PID controller calculator, simulator & tuning tool
Free online PID calculator — compute Kp, Ki and Kd, auto-tune with Ziegler–Nichols, Cohen–Coon or IMC, and simulate overshoot, settling time and stability margins.
Kp 3.8000 · Ki 0.0600 · Kd 25.0000
Ti 63.3333 s · Td 6.5789 s
G(s) = 2.5·e^(−15s) / (120s + 1)
Runs the discrete PID against the plant with RK4 integration at the chosen sample time. Dead time is applied as a transport delay on the actuator signal.
Controller comparison uses the current Kp/Ki/Kd, disabling the terms each structure does not contain.
Computed from the open loop L(jω) = C(jω)·G(jω). Aim for a phase margin of 30–60°, a gain margin above 6 dB, and Ms ≤ 1.8 (Åström). This is a linearised estimate — confirm with the time-domain simulation and a model-error sweep.
Run a simulation to populate rise time, overshoot, settling time, steady-state error and the IAE / ISE / ITAE integrals.
Frequency response — Bode & Nyquist
Open loop L(jω) = C(jω)·G(jω). Updates live with the gains and plant — no simulation needed.
Bode — magnitude
Bode — phase
Nyquist
The red point is the critical −1. Distance from the curve to it is the stability margin. Ms is the peak of |1/(1+L)| — keep it at or below 1.8 for a robust loop.
The full documentation explains every term, tuning method, metric and advanced feature in depth.
How to calculate PID gains and simulate the closed loop
This PID tuning calculator combines a step-by-step Kp Ki Kd calculator with a full closed-loop PID controller simulator. Enter a first-order, first-order-plus-dead-time (FOPDT) or second-order process model, choose a P, PI, PD or PID structure, and the solver integrates the loop numerically to produce the complete time response: setpoint versus process variable, error, controller output and the individual P, I and D contributions.
The auto tuner computes gains from the classical PID controller design formulas — Ziegler–Nichols (reaction curve and ultimate cycle), Cohen–Coon, IMC/Lambda, SIMC, AMIGO and Tyreus–Luyben — and the optimiser searches numerically for Kp, Ki and Kd that minimise overshoot, settling time, rise time, steady-state error, IAE, ISE or ITAE. Bode and Nyquist plots plus gain and phase margin tell you how robust the loop is. Paste a bump-test CSV to identify FOPDT parameters, or run relay autotune for Ku and Pu.
PID temperature controller, motor speed and tank-level examples
Load a ready-made engineering example — electric-oven temperature control, DC motor speed, tank level, flow or pressure — then retune it as a free online PID simulator with anti-windup, derivative filtering and exportable CSV, PNG and PDF reports.
PID calculator FAQ
Sample time, Kp/Ti/Td conversion, anti-windup and derivative filtering in this solver.