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.

Controller parameters

Kp 3.8000 · Ki 0.0600 · Kd 25.0000
Ti 63.3333 s · Td 6.5789 s

Process model & run

G(s) = 2.5·e^(−15s) / (120s + 1)

s
s
°C
°C
s
s
Control loop
SP = 180.00 °CΣ+e = 160.000PID ControllerKp 3.800 · Ki 0.060 · Kd 25.000u = Plant / ProcessG(s) = 2.5·e^(−15s) / (120s + 1)PV = feedback (measured process variable)

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.

P
OS 0.0 %
Ts
SSE 17.143
IAE 29658.05
PI
OS 0.0 %
Ts 248.0 s
SSE -3.052e-5
IAE 13075.46
PD
OS 0.0 %
Ts
SSE 17.143
IAE 29734.31
PID
active
OS 0.0 %
Ts 231.2 s
SSE 1.881e-8
IAE 13263.40

Controller comparison uses the current Kp/Ki/Kd, disabling the terms each structure does not contain.

Robustness & stability margins
marginal
Phase margin
41.4°
Gain margin
2.7 dB
Gain crossover ωc
0.087 rad/s
Phase crossover ωp
0.154 rad/s
Max sensitivity Ms
3.78
Max |T| Mt
2.80

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.

Results
Manual entry

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.

New to PID control?

The full documentation explains every term, tuning method, metric and advanced feature in depth.

Read the documentation

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.