An immersed heater warms a stirred thermal bath while a cooling coil removes heat. You tune proportional, integral and derivative action and watch the separate controller terms, output saturation and temperature response.
• A stirred thermal bath that starts at 20 °C, a 0-5 kW immersion heater, a cooling coil and an ideal temperature probe. • Controls for temperature target (30-70 °C), Kp, Ki, Kd, a conditional-integration anti-windup check box and an extra-cooling disturbance after 15 s. • Readouts of bath temperature, temperature error, heater output and the P, I and D terms separately. • Experiments: proportional only, integral removing feasible offset, and an unreachable target with windup.
C dT/dt = 5000u − H(T − 20) with C = 1000 J/K and H = 50 W/K (110 after the cooling disturbance). The controller uses e = r − T, P = Kp e, I = ∫Ki e dt and D = −Kd dT/dt through a 0.2 s low-pass filter, with u = clamp(P + I + D, 0, 1).
The plant is an ideal well-mixed first-order thermal system with a sampled numerical controller and filtered derivative. There is no transport delay, sensor noise or heater thermal mass, and cooling can make high setpoints unattainable at the power limit. Editing settings restarts the trial so tuning comparisons are reproducible.
No. Excess integration can create overshoot and windup.
No. The plant energy balance constrains the reachable temperature, so after the cooling disturbance a 70 °C target can exceed what the heater can sustain.
Steady temperature remains below the target because heat loss requires sustained output, and proportional action only delivers output in proportion to a nonzero error. Adding integral action supplies the steady heat-loss compensation.
Conditional-integration anti-windup integrates only when the output is unsaturated or when the error unwinds saturation, so integral demand does not accumulate while the heater is at its limit.