The mixing tank: two loops that fight
Hot and cold water set both the level and the temperature. Which valve should control what, and is it worth decoupling them, or handing both to an MPC?
The situation
A tank blends hot water (70 °C) and cold water (15 °C) and supplies the mix by gravity. Both its temperature and its level are controlled, at 35 °C and 1 m. The mechanical view shows the catch: either valve raises the level, and each pulls the temperature its own way.
One loop: temperature on the hot valve
A PI on the temperature, the cold valve left where it is. The temperature is fine, but the level goes wherever the flows take it: it moves by up to 64 cm when the temperature setpoint changes, and by up to 72 cm as the demand changes. A second loop is needed.
Two loops, each tuned alone
Add a PI on the level, on the cold valve, each loop tuned by SIMC on its own pair with the other open. Now watch the temperature when only the level setpoint moves: it swings by 6 °C, because the level loop's cold water hits the temperature, and the temperature loop's hot water then disturbs the level again. A 30 % demand change costs 3.8 °C.
Which valve for which variable? The relative gain
The steady-state gains give the relative gain for "hot → temperature": , the cold share of the inflow. It is 0.64 at 35 °C: the right pairing, but with real interaction. At 55 °C it is 0.27, and the pairing should cross: the hot valve should hold the level and the cold valve the temperature.
The hot-recipe test runs at 55 °C. Paired the 35 °C way, a level change pulls the temperature by 7.3 °C; crossed, by 2.6 °C. The best pairing depends on the recipe.
A static decoupler
Between the PIDs and the valves, add and with , from the bump-test gains. When the level loop opens the cold valve, the hot valve opens in proportion, so the temperature doesn't notice; and the other way round.
A level change now moves the temperature by 0.1 °C instead of 6, and the demand change by 0.03 °C instead of 3.8. Two numbers did that. The same thing done physically is to control total flow and hot fraction; that version is exact at any temperature.
MPC
An MPC with the linearized model at 35 °C, planning 5 moves of both valves over 200 s, equal weights, and a Kalman filter estimating a load at each valve. On interaction it is about as good as the decoupler (0.4 °C on the level change, 0.15 °C on demand). It is faster on temperature steps (IAE 17 against 67) and better when the hot water cools (0.7 °C against 1.6 °C), because it sees the load directly rather than waiting for the error.
When not everything can be met
At 50 °C, demand goes to 120 %. Holding 1 m at 50 °C would need more hot water than FV-901 can pass, so something has to give.
- Two plain loops let the temperature sag to 47 °C. When demand falls again, the temperature overshoots to 55 °C as the hot loop unwinds.
- The decoupler and MPC with equal weights also settle at about 47 °C and 1 m, but recover cleanly.
- MPC with the temperature weighted 10× holds 48.4 °C and lets the level float down to 0.92 m instead.
Only MPC lets you say which variable gives. A PID structure would need an override for that.
Verdict
For one tank: decouple. Check the relative gain, pair accordingly, and add a static decoupler, or better, restructure to total flow and hot fraction. Two numbers remove almost all the interaction.
MPC matches it on interaction and wins on setpoint changes, on load upsets and at the limits, where its weights decide what gives; it has the lowest error overall in the Compare controllers table. On a single tank that doesn't always pay for a model someone has to keep right. On a unit with many interacting variables and constraints that bind every day, it does, which is why refineries and chemical plants run it.
Either way, the operating point matters: the relative gain runs from 0.82 at 25 °C to 0.27 at 55 °C, so a decoupler or a model taken at one recipe is off at another.