One controller output drives two opposing valves. Below the 50 % split the drain opens; above it the make-up opens. Both are shut exactly at the split point.
A level loop sits on an integrator (A·dh/dt = net flow), so a PI controller gives a double integrator. The defaults (Kp = 0.5, Ki = 15) are deliberately reset-heavy: τi = Kp/Ki = 0.033 s gives ζ ≈ 0.007 — the loop overshoots hard and rings between the floor and the rim. Load PI (tuned) for a calm loop (ζ ≈ 0.6), or raise Kp to damp the ring.
Turn σ up with Kd > 0 to see why derivative action is avoided on a noisy level signal — the valve chatters.
The defaults are not authority-matched at the new setpoint: Kv1√hsp/50 = 1.1·√13/50 ≈ 0.079 vs Kv2/50 = 0.050 m³/s per %. The drain branch is ~1.6× stronger. To match them at hsp = 13 m, set Kv2 = Kv1√13 ≈ 3.97, or Kv1 = Kv2/√13 ≈ 0.69. Unbalanced branches behave differently in the two halves of the split.
This is the load disturbance. Drag it slowly across qL = qf = 1.0 to hand control from V₂ to V₁ through the split dead band.
Step the level setpoint while running and watch which valve takes the move.
Everything this simulation uses, written out for study.
| qL (m³/s) | Branch | Needed flow | u (%) | Valve (%) |
|---|---|---|---|---|
| 0.2 | drain | 0.80 | 33.74 | V₁ 32.5 |
| 0.4 | drain | 0.60 | 37.80 | V₁ 24.4 |
| 0.8 | drain | 0.20 | 45.93 | V₁ 8.1 |
| 1.0 | dead band | 0.00 | 50.00 | both 0 |
| 1.2 | make-up | 0.20 | 54.00 | V₂ 8.0 |
| 1.6 | make-up | 0.60 | 62.00 | V₂ 24.0 |
| 2.0 | make-up | 1.00 | 70.00 | V₂ 40.0 |
Every row above is reproduced by the running simulation to within 0.01 m. At exactly qL = qf the loop needs no flow at all, so it parks at u = 50 % with both valves shut — the split dead band, where the loop temporarily has zero gain. It is not an error: it is the price of the fail-safe split.
Why the defaults look odd (Kp = 0.5, Ki = 15): the plant is an integrator, so the loop transfer function with PI control is KpK(τis+1)/(τiAs²). Comparing with the standard second-order form gives
Derivative action is avoided here. A level signal is noisy, and Kd amplifies that noise straight onto the valve stem. Set σ = 0.05 m and raise Kd — the valve opening becomes a blur and the stem would wear out in the field. The default is Kd = 0.
| Symbol | Meaning | Default |
|---|---|---|
| A | Drum cross-section | 4.0 m² |
| Kv1 | Drain capacity coefficient | 1.10 |
| Kv2 | Make-up capacity coefficient | 2.50 |
| qf | Constant feed | 1.00 m³/s |
| qL | Draw-off load (disturbance) | 1.60 m³/s |
| SP | Level setpoint (1–15 m) | 13.0 m |
| usplit | Split point (fixed) | 50 % |
| Kp | Proportional gain | 0.5 |
| Ki | Integral gain | 15.0 |
| Kd | Derivative gain | 0.00 |
1 — Walk the load across the split. Run (10x default — crank to 100x for a quicker walk), then drag Draw-off qL slowly from 1.8 down to 0.4. The controller output slides from 62 % to 37.8 %: V₂ closes, both valves are briefly shut at u = 50 %, then V₁ takes over. The level barely moves.
2 — Unbalance the valves. Set Kv1 = 2.5 to make the drain as big as the make-up. Now 1 % of output buys far more drain flow than make-up flow: the drain branch overshoots and rings while the make-up branch stays calm.
3 — Sit in the dead band. Set qL = qf = 1.0 and step the setpoint. Both valves stay shut and nothing happens — the loop has no authority until the level drifts far enough to push the output off 50 %.
4 — Feel the new default ring. With Kp = 0.5 and Ki = 15 the loop is far underdamped (ζ ≈ 0.007): the level swings from the drum floor to the 15 m rim, the drum overflows at the top, and control hands back and forth between V₁ and V₂. Press PI (tuned) to see the same load handled calmly (ζ ≈ 0.6).
5 — Make it noisy. Set σ = 0.05 m and raise Kd to 2. The valve strokes chatter continuously — the classic reason derivative action is left off level loops.
6 — Run the drum up to its new 15 m range. Drag the Level Setpoint slider up to 12–14 m and watch the level scale and the schematic fill re-range automatically. Push it all the way to 15 m (the rim): the drum saturates at the brim, the excess spills as overflow (the mass balance still closes exactly), and the level can no longer overshoot — the setpoint line, water, and V₁/V₂ all stay consistent on the new scale.