PID Control Loop Simulator — Tune Kp, Ti & Td on a Live Process Trend

Interactive PID feedback-loop simulator with a live trend of setpoint and process variable, adjustable Kp, Ti and Td, and a loop diagram showing controller output and feedback.

← PLC / SCADA / Automation Labs
About this tool — how it works & FAQOpen ▾Close ▴

About the PID Control Loop Simulator

This simulator closes a control loop around a simple process, a first-order lag with a 15 second time constant, and lets you be the tuner. A live trend plots the process variable against the setpoint while a diagram shows the PID controller, the process and the feedback path. Change Kp, Ti and Td and watch for overshoot, oscillation or sluggish response.

What the simulator shows

• A trend of PV (green) and SP (amber) covering the last two minutes, with a live PV label. • A loop diagram: SP to PID controller to process (tank level) to PV, with a dashed feedback path and the current CO value. • Sliders for setpoint (10-90 percent), Kp (0.1-10), Ti (5-120 s) and Td (0-20 s), a 1×/5× speed toggle and a Reset loop button. • Readout tiles for SP, PV, error and CO, with expandable notes, formulas and a worked example.

How the controller works

Error is the setpoint minus the process variable. The proportional term multiplies error by Kp; the integral term accumulates error at a rate of Kp/Ti and is clamped between 0 and 100 percent to prevent windup; the derivative term reacts to the rate of change of the measurement, filtered to limit noise. Their sum, clamped to 0-100 percent, is the controller output. The process responds with a first-order lag of 15 seconds and a gain of 0.8, with a little measurement noise.

Tuning by observation

With only proportional action the loop settles with an offset; adding integral action removes it, at the cost of overshoot if Ti is too short. A high Kp speeds the response until it starts to oscillate. Derivative action adds damping but magnifies noise. Because the process is slow, use the 5× speed button while exploring, then return to real time to judge the feel. The lab is a teaching model, so tuned values do not transfer directly to a real plant.

Frequently asked questions

What do Kp, Ti and Td do?

Kp is the proportional gain that scales the present error. Ti is the integral time, where a shorter value means stronger integral action that removes steady-state error. Td is the derivative time, which reacts to how quickly the process variable is changing and adds damping.

Why does the loop settle with an error when Ti is very long?

Proportional action alone needs a non-zero error to hold a non-zero output. The integral term is what slowly drives that error to zero, so very long integral times leave the offset in place for longer.

What process is being controlled?

A simulated tank level modeled as a first-order lag with a 15 second time constant and gain of 0.8, plus small measurement noise. It is a teaching model and does not include dead time, valve nonlinearity or disturbances.

How is this different from the PID Control Loop Tuning web app?

The PID Control Loop Tuning web app is a separate tool. This lab is a compact, fixed loop simulator focused on the relationships between setpoint, PV, error and controller output.

Related tools & guides