The nonlinear tank
A pump fills a tank, and water drains out of a hole in the floor. The deeper the water, the harder it pushes, so it drains faster. We want a transfer function from pump flow q to level h.
Water in minus water out changes the level: A·dh/dt = q − c·√h. In the block diagram, the sum takes in minus out, the store block turns that into level, and the outflow block feeds c·√h back.
Outflow grows with the square root of depth: four times deeper drains only twice as fast. The curve bends, so the equation is nonlinear, and the Laplace transform cannot turn √h into anything times H(s).
Linearise
First choose where the tank normally runs. With the pump at 0.1 m³/s, the level settles where outflow equals inflow: 0.1·√h = 0.1, so h₀ = 1.00 m. Nothing changes there. That resting point is the operating point.
Close to h₀ the curve is almost straight, so replace it by its tangent line. Its slope is c/(2√h₀) = 0.05. A small rise δh in level then adds δh/R to the outflow, with R = 2h₀/q₀ = 20 s/m².
Now track only changes from the operating point: δh = h − h₀ and δq = q − q₀. The constants q₀ and c·√h₀ cancel, and what is left is linear: A·dδh/dt = δq − δh/R.
Laplace-transform it from rest: (A·s + 1/R)·δH(s) = δQ(s). The loop reduces to one block, G(s) = R/(A·R·s + 1) = 20/(20s + 1): a first-order system with time constant A·R = 20 s.
Test it
Test it. Raise the pump 10 %, to 0.11 m³/s. The real tank settles at 1.21 m; the linear model says 1.20 m. Close: near the operating point the tangent is a good copy of the curve.
Now double the pump, to 0.2 m³/s. The real tank climbs to 4.00 m but the model says 3.00 m, and the tank is slower too: 34 s, not 20 s, to cover 63 % of its rise. Far from h₀ the tangent misleads.
The recipe: find the operating point, take the slope of every curved term there, and write the equation in small changes. You get a transfer function that is good near that point only. Move far away, and linearise again there.
What is happening
# step 1/10 · tank # about: Pump q, Tank h, Hole pump flow q (m³/s) the input water level h (m) the output tank floor A = 1 m² water out of the hole: q_out = c·√h (Torricelli's law; c = 0.1 sums up the hole's size)
The tank is a simple model with illustrative numbers: floor area 1 m², outflow 0.1·√h m³/s. Every curve and number in the figure is computed from it: the real tank by step-by-step integration (RK4, 0.01 s), the linear model by its exact solution. The Python on the steps is plain Python 3 with the math module (simple Euler steps of 0.01 s, accurate to the two decimals shown). The transfer function line uses the python-control library; control.linearize does the slope-taking automatically for a nonlinear model.