Fill. Drain. Test the tangent.
A nonlinear gravity-drained tank beside its local linear prediction. Explore operating points, bounded pump flow and PI disturbance rejection.
A tangent is a local model
Will a linear model around h₀ = 0.5 m match both a small and a large flow change?
Pin the +0.0002 m³/s step. Change only Δq to +0.0015. Compare nonlinear height with the linear prediction driven by the identical applied pump flow.
Synchronized signals
Select a trace or use the replay slider. The first current signal is cyan; secondary signals and numbered pinned runs are dashed. Every setting change recalculates from the initial state.
Compare one change 0/3
Keep initial state, inputs and seed matched when comparing controllers. Pinned traces retain their original settings and stop time.
Observed result
Recorded duration: 0 s · Clipped command time: — s
Final target error: — m
These observations describe a finite run, not a general stability or robustness guarantee.
Equations, assumptions and method
A h′ = qin − c√h − d; δh′ = [δqin − c δh/(2√h₀) − d]/A
Constant area, incompressible fluid, ideal pump; no valve lag, sensor noise or fluid momentum. RK4 at 10 ms, continuous PI, samples every 100 ms. q₀ = c√h₀ biases manual and PI commands; Δq applies only to manual mode. The linear predictor receives the actual nonlinear-loop pump flow. Extra drain is a persistent step at 30 s; zero removes it. Stop at h = 0 or 2 m, interpolating the crossing within a physics step; overflow after the rim is not modeled. The linear predictor is not clipped and can be physically invalid far from h₀.