Mixing tank: level and temperature

Hot and cold water into one tank. More of either raises the level, and each pulls the temperature its own way: neither valve controls just one thing. Which valve should control what, and does it pay to decouple them or hand both to an MPC?

Plant Dynamics at Nominal Point

FOPDT dynamics & controllability regime
Open on the bench🧩 Build in Block Studio
Dead time θ78.9 snothing happens for this long after the valve moves
Time constant τ360 sthen 63 % of the way in this long
Gain K0.35% of span the PV moves per % of valve
Balanced (0.2 ≤ θ/τ < 1) — ModerateDelay share: 18.0% (θ/τ = 0.22)
0% Pure lag (fast PI)50% Balanced100% Pure delay (needs Smith / MPC)
Linearized model at 35 °C:
G(s)≈0.35 e−78.9s360s+1G(s) \approx \frac{0.35\,e^{-78.9s}}{360s + 1}
Verdict: PID falls short

Decouple it: a static decoupler from the bump-test gains, or better, control total flow and hot fraction. Two loops tuned one at a time fight: a level change pulls the temperature by 6 °C, a demand change by 4 °C. With the decoupler, 0.1 °C and 0.03 °C.

MPC does about as well on interaction and better on the hot-supply upset (0.7 °C instead of 1.6 °C). Where it earns its place is at the limits: when the hot valve runs out, its weights decide what gives, and it recovers without the overshoot that two plain loops show. Tuned the same way it also has the lowest error overall: level and demand changes are about even, while setpoint changes and hot-supply upsets are two to six times better. On one tank the decoupler is still the cheaper answer if setpoint speed isn't what you are paid for: two numbers, against a model someone has to keep right. On a unit with five interacting variables and a few limits that often bind, it is.

Watch the operating point. λ₁₁ runs from 0.82 to 0.27 across the recipes: the pairing and the decoupler that suit 35 °C don't suit 55 °C.

Loading the comparison…