This page briefly discusses the theory and concepts behind "twin tank control". It does not present a single equation, let alone any calculus, and does not end in "recommended exercises" or such. Anyway, you did come here, so you must have some intrest.The End
What you want to do is control the water level in the second tank.The Means
The way you can control the water level in the second tank is by controlling the water level in the first tank. This works because the first tank is linked to the second. The way you control the water level in the first tank is by turning the four valves on and off, via the SCADA system.The Control Valves
The four control valves are in series (in line) with flow restriction valves, which have been set up such that each has a flow rate twice that of the valve on it's right. This means that, if the rightmost valve has a flow rate of x, then the centre - right valve's flow rate is 2x, then 4x and the leftmost valve's flow rate is 8x. Nerds amongst us will note that this is equivalent to four bit binary, which means that by using the sixteen different combinations of valves turned on or off, sixteen different flow rates (where no flow is counted as a flow rate) can be achieved. The table below illustrates this.....
Both of the tanks have drains in the bottom, which also affects the water level in the tanks. These drains also have restriction valves attatched to them, so that they can (manually, not by SCADA) be adjusted to set the drain flow rate.Pressures
To make life difficult, the amount of water that flows through a hole (pipe) is related to (among other things) the height of the water above that hole. The more water there is above the hole, the more pressure (or "head") there is on the water at the hole, which means the water flows out the hole faster. For this model, the consequences are that the more you fill a tank, the faster it drains. In the case of the first tank, this means that water will also flow into the second tank faster, provided that the water level in the second tank is lower than that in the first tank (if that were not the case, the water would flow from the second tank back into the first tank).Delays
The final phenomenon that plays a significant part for the demonstration system is delays. There are several delays built into the system:
If you put a whole lot of water into tank 1, tank 2's water level will rise. When you stop putting water into tank 1, tank 2's water level will continue to rise for some time. The point, therefor, is that if you want to get the water level in tank 2 to to some fixed level above it's current level, you will have to put more water into tank one, but will have to stop doing so before tank 2's level reaches it's target. Conversely, to reduce the water level in tank 2, the flow into tank 1 will have to be reduced until some time before tank 2's water level reaches it's target. Don't forget, however, to keep putting some water in, or it will all drain out. Overall, this behaviour means that the tanks system is a second order system with delay. If you want to know what that means, find a book on control theory.