# Robust Controller Decorated by Nonlinear S Function and Its Application to Water Tank
## 2 Mathematical Model
### Application of Robust Control in the Level Control of Water Tank  
#### 2.2.1. _Mathematic Model of Water Tank_  
Figure 1 shows a simplified physical model; the switch sign indicates the water pump. In a single tank system (Figure 1), \(Q_{i}\) indicates the steady-state value of input water flux, and \(\Delta Q_{i}\) means the increment of input water flux. \(Q_{o}\) indicates the steady-state value of output water flux, and \(\Delta Q_{o}\) means the increment of output water flux. \(h\) means the height of water level, and \(h_{o}\) means the steady-state value of water level, \(\Delta h\) is the increment of the water level. \(u\) is the opening value of the adjustable input valve. \(A\) is the cross sectional area, \(R\) is the water resistance at the output valve, and \(V\) is the water volume in the tank. According to the correlation of material balance, the initial tank balance is displayed as: \(Q_{o}=Q_{i}\), \(h=h_{o}\). When the adjustable input valve has an increment \(\Delta u\), the actual water level will change correspondingly. Thus, the output water flux will change, which is mainly caused by the variety of water levels while keeping the other output valves unchanged.  
In this manuscript, the tank model is a first-order inertial system, and the tank inlet control valve model is equivalent to an integral, as shown in (Figures 2 and 3)  
The difference between the input and output water flux is  
\[\Delta Q_{i}-\Delta Q_{o}=\frac{\mathrm{d}V}{\mathrm{d}t}=A\frac{\mathrm{d} \Delta h}{\mathrm{d}t} \tag{3}\]  
In Formula (3), \(\Delta Q_{i}\) is caused by \(\Delta u\), then  
\[\Delta Q_{i}=K_{u}\Delta u \tag{4}\]  
where \(K_{u}\) is the constant of water flow of valve.  
Figure 1: Single water tank. Adapted with permission from [13].  
Figure 2: Model of Inlet Control Valve for Water Tank. Adapted with permission from [18].  
The output water flow is relevant with the height of the water level, \(A_{0}\) is the cross-sectional area of the output pipe, shown as  
\[Q_{o}=A_{o}\sqrt{2 gh} \tag{5}\]  
The above formula can be further linearized at the balance point \((h_{o},Q_{o})\), then  
\[R=\frac{\Delta h}{\Delta Q_{o}} \tag{6}\]  
We can substitute the Formulas (4) and (6) into (3), and adopt Laplace transformation to obtain the transfer function for a single water tank  
\[G(s)=\frac{H(s)}{Q_{i}(s)}=\frac{K_{0}}{s(T_{0}s+1)} \tag{7}\]  
where \(K_{0}=K_{u}R,\ T_{0}=RA\). The linear model of (7) is used to design the controller and the nonlinear model of (3)-(5) is used as the simulative model to test the robustness of the designed controller.  
If we assume the parameters of a water tank are: the height of the tank is 2 m, the area of the tank base is 1 m\({}^{2}\), the sectional area of the pipe is 0.05 m\({}^{2}\), the initial water level is 0.5 m, and the max inlet ratio of water intake is 0.5 m\({}^{3}\)/s. Then, the formula of water level and inlet ratio is  
\[G(s)=\frac{H(s)}{Q_{i}(s)}=\frac{K_{0}}{s(T_{0}s+1)}=\frac{0.8}{s(2s+1)} \tag{8}\]  
where \(H\) represents the water level in the tank, and \(Q_{i}\) represents the input flux ratio.  
Formula (7) can also be shown as  
\[T_{0}\ddot{H}+\dot{H}=K_{0}Q_{i} \tag{9}\]  
If taking the disturbance term into consideration (interference is used to prove the stability of the system.), then Formula (9) can be improved as  
\[T_{0}\ddot{H}+\dot{H}=K_{0}Q_{i}+w \tag{10}\]  
where the \(w\) is limited disturbance term, and also \(\left\|w\right\|_{\infty}\leq\rho\).  
Figure 3: Tank model.