PID Tuning Explained with a Step Response Simulator
What the P, I and D terms do, how to identify a process from a step test, and how Ziegler-Nichols, Cohen-Coon and SIMC tuning compare.

PID Tuning Explained with a Step Response Simulator
PID controllers run most of the world's control loops: temperature in ovens and 3D printers, flow and pressure in plants, speed in motors and level in tanks. Yet many loops are poorly tuned, oscillating or sluggish. The PID Controller Simulator lets you try settings on a model before touching real equipment. This guide explains how to use it.
The three terms
The controller looks at the error, set-point minus measurement, and computes an output:
u = Kp × (e + (1/Ti) × ∫e dt + Td × de/dt)
- Proportional: the output is proportional to the present error. Higher Kp responds faster but can oscillate. P alone leaves an offset, because a steady output needs a steady error.
- Integral: keeps adding up the error, so any lasting error makes the output grow until it disappears. Short integral times act strongly and can cause overshoot.
- Derivative: responds to how fast the measurement is changing and adds damping. It amplifies noise, so it is filtered and usually applied to the measurement rather than the error, to avoid a kick when the set-point changes.
Describing the process
Most processes, seen from the controller, look roughly like a delay followed by a first-order lag. Three numbers describe them:
- Gain K: how much the measurement finally changes per unit change in controller output.
- Dead time θ: how long before anything happens.
- Time constant τ: how long the response then takes to reach 63 % of its final change.
To find them, put the controller in manual, make a step in the output and record the response. A heater that rises 20 °C for a 10 % output step has K = 2 °C per %.
The ratio θ/τ indicates how hard the loop is to control. Below 0.1 is easy; above 1, dead time dominates and the loop must be detuned.
Tuning rules
Ziegler-Nichols (1942), from the reaction curve, gives aggressive settings: PI Kp = 0.9τ/(Kθ), Ti = 3.33θ; PID Kp = 1.2τ/(Kθ), Ti = 2θ, Td = 0.5θ. The response oscillates with a quarter-amplitude decay, often too lively for modern use.
Cohen-Coon (1953) corrects Ziegler-Nichols for larger dead-time ratios.
SIMC (Skogestad, 2003) is simple and robust. With the closed-loop time constant τc set equal to θ, PI settings are Kp = τ/(2Kθ) and Ti = min(τ, 8θ). It gives little overshoot and good disturbance rejection.
A worked comparison
Take K = 2, τ = 10 s and θ = 2 s.
SIMC PI gives Kp = 1.25 and Ti = 10 s. The simulated step response rises from 10 % to 90 % in about 3.8 s, overshoots by about 4 % and settles within 2 % in about 12 s.
Ziegler-Nichols PID gives Kp = 3, Ti = 4 s and Td = 1 s. The response is quicker but overshoots much more and rings before settling.
P-only control with Kp = 1 settles at 0.67, leaving a 33 % offset, exactly 1/(1 + K × Kp).
Reading the results
- Overshoot: how far past the set-point the measurement goes. For temperature, overshoot can damage product; for flow, it may not matter.
- Rise time: speed of response.
- Settling time: when the measurement stays within 2 % of the final value.
- IAE (integral of absolute error): one number to compare tunings.
The time-response table shows the measurement and controller output at intervals, so you can see whether the output swings to unrealistic values.
Real-world complications
- Actuator limits: valves and heaters saturate at 0 % and 100 %. While saturated, the integral keeps growing (windup), causing overshoot. Use anti-windup.
- Noise: filter the measurement, especially with derivative action.
- Changing process: gain and dead time may vary with flow or load; tune for the worst case or use gain scheduling.
- Different PID forms: ideal, series and parallel forms use different parameters. Check your controller's manual before entering settings.
- Proportional band: some controllers use PB = 100 / Kp in percent.
A tuning routine
- Do a step test and fit K, τ and θ.
- Use SIMC for robust starting values.
- Simulate to check overshoot and settling.
- Apply on the plant with small set-point steps, then fine-tune: increase Kp for speed, lengthen Ti if it oscillates slowly.
Summary
Identify the process with a step test, start with a robust rule such as SIMC, check the simulated response and refine on the plant. Try your own process numbers in the PID simulator and compare tuning rules side by side.



