# Fault-Tolerant Model Predictive Control Applied to a Sewer Network
## 4 Case Study: Benchmark Simulation Model for Sewer Networks  
### Benchmark Model Description  
Figure 1 shows the sewer system used as a benchmark to test control algorithms [37]. It is made up of six wastewater and rainwater collection areas (numbered 1 to 6 in the figure), six wastewater storage tanks (ST1,..., ST6, one of them, ST5, is off-line), wastewater pipes, five valves and a pump for flow control, and a wastewater treatment plant (WWTP). It involves collecting all the wastewater and conveying it to the treatment plant, maintaining a supply flow rate with the least possible variability and as close to its nominal value. This is achieved by retaining the volume collected in the tanks during heavy rainfall and by releasing that volume during drought times. As part of the control algorithm, a simplified model of the process has been developed that will be used to predict the behavior of the system during a given time interval [40]. The simplified mathematical model of the process is made up of the following elements:  
* WATER COLLECTION AREA: all water collected in the area constitutes an inflow to the system that is treated as a disturbance. * LINK ELEMENTS: they are wastewater conductions by gravity in open channels. Its discrete mathematical model would be the following: \[q_{i}(k+1)=\bigg{(}1-\frac{T}{\tau_{i}}\bigg{)}q_{i}(k)+\bigg{(}\frac{T}{\tau_ {i}}\bigg{)}q_{u,i}(k),\ j=1,2,3\ldots 9,\] (8) where: \[q_{u,i}(k)\] is the sum of inflows to the link element \[i\] \[q_{i}(k)\] is the output flow of the element i \[\tau_{i}\] is the time constant of the element i \[T\] is the sampling period  
Figure 1: Catchment and sewer system. STORAGE TANKS: these are places where wastewater is stored. Its discrete model is the following: \[ \begin{array}{c}h_{i}(k+1)=h_{i}(k)+\frac{T}{A_{i}}[u_{in,i}(k)-u_{i}(k)-q_{ov,i }(k)]\\ u_{i}(k)=a_{i}(k)c_{0i}\sqrt{h_{i}(k)},\ V_{i}(k)=A_{i}h_{i}(k),\ V_{\max,i}=A_{ i}h_{\max,i},\ j=1,2,\ldots,5,\end{array} \] (9) where all parameters are related to tank \(i\) and instant \(k\): \[ \begin{array}{c}u_{in,i}(k)\text{ is the inlet flow rate}\\ u_{i}(k)\text{ is the outlet flow rate}\\ q_{ov,i}(k)\text{ is the overflow flow rate}\\ V_{\max,i}\text{ is the maximum capacity of the tank}\\ V_{i}(k)\text{ is the volume stored at the instant }k\\ c_{0i}\text{ is the discharge coefficient calculated empirically for each reservoir }i\\ A_{i}\text{ is the surface of the base of the tank }i\\ h_{\max,i}\text{ is the tank height }i\\ h_{i}(k)\text{ is the water level }i\\ a_{i}(k)\text{ is the opening of the deposit }i\text{ outlet gate (control variable: }a_{i}\in[0,1]\text{)}\end{array} \] - NODES: they represent places of confluence of several wastewater pipes. The resulting flow is the sum of the tributary flows: \[ \begin{array}{c}u_{in1}+u_{in2}+\ldots+u_{imm}=u_{out},\ j=1,2,3\ldots,9, \end{array} \] (10)  
The states considered are the levels of the tanks ST1, ST2, ST3, ST4 and ST6 (\(x_{1}\), \(\ldots\), \(x_{5}\)) and the output flows of the link elements that communicate the tanks ST2 and ST3, ST4 and ST6 and the ST6 with the WWTP, which correspond to the states (\(x_{6}\), \(\ldots\), \(x_{9}\)). The output flows of the link elements of the water collection zones 1, 2, 4, 5 and 6 and the flow collected in zone 3, will be considered as measurable disturbances in the process: (\(d_{1}\), \(\ldots\)\(d_{6}\)). The system inputs are the desired flows at the outlet of each of the tanks (manipulated variables): (\(u_{1}\), \(\ldots\), \(u_{5}\)). The model appears in detail in [40], where the equations of the linearized model of the system that is going to be used as a prediction model in the MPC algorithm are shown:  
\[ \begin{array}{c}\mathbf{x}(k+1)=\mathbf{A}\mathbf{x}(k)+\mathbf{B}_{p} \mathbf{u}(k)+\mathbf{B}_{d}\mathbf{d}(k),\text{ and }\mathbf{B}=[\mathbf{B}_{p}\quad\mathbf{B}_{d}],\end{array}  \tag{11}\]  
where:  
\[