Two-Tank Cascade System: Understanding Process Dynamics
This article is available in English only.
Why Two Tanks Are More Than Twice as Complex as One
Connect two tanks in series — the outlet of the first feeds into the second — and you've created something qualitatively different from a single tank. The combined system is second-order: two state variables (two liquid levels), two time constants, and behavior that a first-order model can never capture.
This two-tank (or interacting/non-interacting cascaded) configuration appears everywhere in process industries: surge tanks in series, bioreactor trains, CSTR chains, wastewater treatment stages. Understanding its dynamics is essential for process control.
Non-Interacting vs Interacting Tanks
Non-interacting: Flow from Tank 1 to Tank 2 depends only on Tank 1's level. Flow from Tank 2 depends only on Tank 2's level.
Qin
│
▼
┌─────────┐
│ Tank 1 │ h1
│ │ ↓
└───┬─────┘
│ Q12 = Cd·a1·√(2g·h1)
▼
┌─────────┐
│ Tank 2 │ h2
│ │ ↓
└───┬─────┘
│ Q23 = Cd·a2·√(2g·h2)
▼
Qout
Interacting: Flow between tanks depends on the difference in levels h1-h2 (they share a connecting pipe near the bottom rather than overflowing from the top).
Q12 = Cd·A12·√(2g·|h1-h2|) · sign(h1-h2)
Interacting tanks are more complex: the system's effective time constants change depending on the relative levels.
Mathematical Model: Non-Interacting Case
Linearized around an operating point, the two-tank system has transfer function:
H2(s) K
──── = ─────────────────────
Qin(s) (τ1s+1)(τ2s+1)
Where:
τ1 = A1 / (Cd·a1·√(g/(2·h10))) Tank 1 time constant
τ2 = A2 / (Cd·a2·√(g/(2·h20))) Tank 2 time constant
K = steady-state gain
This is a second-order overdamped system (two real poles, no imaginary part). It cannot oscillate on its own, but a poorly tuned controller can make it oscillate.
Building in Twinsys
Qin ┌────────────────────────────────────────────────────┐
│ │ TANK 1 │
▼ │ ┌───────┐ ┌───────┐ ┌────────────┐ │
┌──────┐ │ │ Sum(+)│ │ 1/A1 │ h1 │ Torricelli│ │
│ Step │───► │ │─────► │ 1/s │─────► │ sqrt(2gh) │─┬│
│ (Qin) │ │ └──┬───┘ └───────┘ └────────────┘ │ │
└──────┘ │ │ (-Q12) │ │
│ └─────────────────────────────────────────┘ │ Q12
│ │ TANK 2 │
│ │ ┌───────┐ ┌───────┐ ┌──────────┐ │
│ ▼ │ Sum(+)│ │ 1/A2 │ h2 │ Scope │ │
│ Q12─► │ │─────► │ 1/s │─────► │ (h1,h2) │ │
│ └──┬───┘ └───────┘ └──────────┘ │
│ │ (-Q23) │
└─────────└─────────────────────────────────────────┘
System Identification: What Step Responses Tell You
The two-tank step response has a characteristic S-shape that single-tank (first-order) responses never show:
Level h2(t)
1.0 | ─────────── final
0.8 | /
0.6 | /
0.4 | / ← inflection point (unique to 2nd order!)
0.2 | /
0.1 | //
0.0 |______/
0 τ1 τ1+τ2 2(τ1+τ2)
The lag before the level starts rising significantly
is approximately equal to τ1 (first tank time constant).
The total settling time is approximately 3(τ1 + τ2).
This S-shape is the fingerprint of higher-order process dynamics. When you see it in real process data, you know you need at least a second-order model.
Controller Design: PID with Smith Predictor
For a two-tank system with significant total lag (τ1 + τ2) — especially when a long feed pipe adds a transport delay — basic PI control can be sluggish. A Smith Predictor runs an internal model of the plant, delay included, so the controller acts on the model's undelayed response instead of waiting for the delayed measurement.
In Twinsys, the Smith Predictor structure:
h2_ref ┌───────┐ PI ┌───────┐ Qin ┌──────────┐ h2
──────► │ Sum │───► │ │─────► │ Two Tanks │─►
│ (-) │ └───────┘ └──────────┘
└──┬───┘ │
│ h2_predicted │
┌────────────────────────────┐ │
│ Internal Plant Model │◄───┘
└────────────────────────────┘
Key Insights from Simulation
Insight 1 - Time constant interaction:
If both tanks have equal time constants (τ1 = τ2 = 100s), the combined response is slower than you'd intuitively expect. The system effectively has no single dominant time constant — both contribute equally.
Insight 2 - Controller tuning:
A PI controller tuned for a single-tank (τ=100s) will be too aggressive for the two-tank system. Detuning by at least 2x is typically needed.
Insight 3 - Measurement point matters:
Controlling h2 (the second tank) based on measuring h1 only is a fundamental mismatch. Always feedback the controlled variable directly.
Insight 4 - Feed-forward improves response:
Knowing the inflow Qin as a measured disturbance allows feed-forward action that dramatically reduces the settling time after flow upsets.
Conclusion
The two-tank cascade system teaches second-order process dynamics in a physical, intuitive context. The S-shaped step response, the appearance of multiple time constants, and the challenges of controller tuning for higher-order plants are all directly observable in Twinsys simulation.
These lessons extend directly to more complex industrial processes: CSTR trains, multi-stage heat exchangers, distillation column sections — all exhibit similar second (and higher) order behavior. Understanding the two-tank model is the foundation.
Try this: make the two tanks interacting by changing the Q12 formula to depend on (h1-h2) instead of just h1. Observe how the step response changes and why the interacting configuration has effectively longer time constants than the non-interacting case.