ExamRobotic

PID controller simulator

A PID controller is what keeps an oven's temperature, a tank's level or a network's pressure steady when conditions change. Tuning it by eye on the machine is slow and sometimes dangerous. Here you can try, on an electric oven and a water tank, what each action (P, I and D) does, how the open-loop step test used for tuning works, and what happens with an aggressive tuning, with the steady-state error of proportional action, or without anti-windup.

The process
Measurement, setpoint and output

Measurement (PV)Setpoint (SP)Output (CV)

Try this

    How to use it

    The control loop

    A loop has four parts: the measurement (PV, the process variable, for example the temperature from a probe), the setpoint (SP, what we want), the controller, which compares the two, and the final control element, which receives the controller output (CV, 0 to 100 %): a solid-state relay feeding the heaters, a valve, a drive. The difference between setpoint and measurement is the error, and the PID's whole job is to bring it to zero and keep it there when something changes.

    The three actions

    In industry the vast majority of loops are PI. D is kept for temperatures and slow processes with a lot of delay.

    How to tune it: the open-loop step test

    The most practical method for a technician is to measure the process before tuning:

    1. With the process steady, switch the controller to manual and change the output in one step, for example from 30 to 50 %.
    2. Read three figures from the chart: the dead time θ, how long the measurement takes to start moving; the time constant τ, how long it then takes to cover 63 % of the change; and the gain K, how much the measurement changes in total divided by how much the output changed.
    3. With those figures, a cautious and widely used PI tuning (lambda tuning) is: Ti = τ and Kp = τ / (K × (λ + θ)), where λ is how fast you want it; taking λ as one or two times θ gives a quick response without much overshoot.

    In the simulator's oven, K is 3.5 °C per % of output, τ about 120 s and θ about 15 s. With λ = 30 s you get Kp ≈ 0.76 and Ti = 120 s, which is exactly the «well-tuned PI». Do it yourself in manual and check the numbers.

    Many controllers, such as PID_Compact in TIA Portal or panel temperature controllers, have an auto-tune that runs a similar test on its own. It is useful, but it pays to understand what it does: if the process is disturbed during the test, the result can be poor.

    Integral windup

    A controller output has limits: it cannot give more than 100 % or less than 0 %. If the setpoint cannot be reached, or the process is very slow, the output sits at its limit and the integral, if nothing stops it, keeps growing. When the measurement finally gets there, the integral has built up so much that the output stays at 100 % for a good while and the process overshoots badly. Anti-windup stops integrating while the output is at its limit. Every industrial controller has it; untick it in the simulator to see what happens without it.

    Common mistakes

    A simulator is not an installationThe processes are first-order-plus-dead-time models, which resemble many real processes but not all of them: there is no noise, no valve backlash and no safety temperature limits. A real oven always has, besides the PID, an independent safety thermostat or limit relay that cuts the power if it overheats.

    Found it useful? Share it with your class or your team: WhatsApp · Telegram · LinkedIn · Email