Skip to main content

PID Controller Simulator

Choose a plant, tune the gains, and watch it respond.

A heater and cooler bring a metal plate from 20°C to 60°C. Heat leaks into the room.

dy/dt = (20 - y + u/10)/2

y: °C · u: W (-800 to 800) · t: seconds

Step response

20 → 60 °C · 20 seconds

0.00 / 20 s

Heated plate

Temperature: 20 °C at 0.00 seconds. Target: 60 °C. Heating / cooling: 800 W. The dashed marker shows the target. The drawing uses the same samples as the response curve.60°CMetal plate · 20 J/K20°C room · heat loss 10 W/K
Temperature20 °CHeating / cooling800 W
Output over 20 seconds, starting at 20 °C. The target is 60 °C. The current response ends at 60 °C. Response metrics are listed below the chart.0204060800s5s10s15s20s

Controller

Reacts to the current error.

Accumulates error to remove an offset.

Opposes rapid output changes.

View response ↑
Rise time
2.21 s
10–90% of requested step
Overshoot
0.0%
% of requested step
Settling time
3.97 s
Within the 2% band
Final error
0 °C
Target − output at 20 s
Model & measurement notes

u = Kp·error + Ki·∫error dt − Kd·dy/dt. The derivative acts on measured output with a 0.1 s filter; anti-windup limits integral accumulation when the actuator saturates.

Idealized models: no noise, delay, or tank overflow. The controller updates every 0.01 s; RK4 advances the plant between updates. Extreme gains can make fixed-step results unreliable. Drawings scale to each run. These presets are not tuning advice for real equipment.

Settling requires staying within the 2% band through 20 s, for at least 1 s. Final error is rounded to three decimal places.