scieee AI-readable full text Open interactive document viewer

Control-oriented quality modelling approach of sewer networks

Xing, Congcong,Romero Ben, Luis,Joseph Duran, Bernat,Meseguer Amela, Jordi,Guasch Palma, Ramon,Martínez Puentes, Montse,Puig Cayuela, Vicenç,Cembrano Gennari, Gabriela

Abstract

A control-oriented quality modeling approach is proposed for sewer networks, which can represent quality dynamics using simple equations in order to optimize pollution load from combined sewer overflows in large scale sewer network in real time. Total suspended solid has been selected as the quality indicator, regarding it is easy to be estimated through measuring turbidity and correlated with other quality indicators. The model equations are independent for different elements in sewer network, which allows a scalable usage. In order to ensure accuracy of the proposed models, a calibration procedure and a sensitivity analysis have been presented using data generated by virtual reality simulation. Afterwards, a quality-based model predictive control has been developed based on the proposed models. To validate effectiveness and efficiency of the modelling and optimization approaches, a pilot case, based on the Badalona sewer network in Spain is used. Application results under different scenarios show that the control-oriented modelling approach works properly to cope with quality dynamics in sewers. The quality-based optimization approach can provide strategies in reducing pollution loads in real time.

Full text

Control-Oriented Quality Modelling Approach of Sewer Networks Congcong Sun¹ʼ²٭, Luis Romero¹, Bernat Joseph-Duran³, Jordi Meseguer³, Ramon Guasch Palma5, Montse Martinez Puentes⁴, Vicenç Puig¹, Gabriela Cembrano¹ʼ³ 1Advanced Control Systems Group at the Institut de Robòtica i Informàtica Industrial (CSICUPC), Llorens i Artigas, 4-6, 08028 Barcelona, Spain. 2Farm Technology Group, Wageningen University, P.O. Box 16, 6700 AA Wageningen, The Netherlands. 3CETaqua, Water Technology Centre, Barcelona, 08904, Spain. 4Aquatec, Proyectos para el Sector del Agua, Barcelona, 08038, Spain. 5Agbar, Aguas de Barcelona, Barcelona, 08028, Spain. ٭Corresponding author, email: [email protected] Highlights:  A simplified quality modelling approach for the sewer network is proposed.  Calibration and sensitivity analysis confirm its accuracy and scalability.  Quality-based optimization has been developed using model predictive control.  The simple model ensure pollution optimized in complex sewer network in real time.  The models and optimization approach have been validated in real life pilot. Abstract A control-oriented quality modeling approach is proposed for sewer networks, which can represent quality dynamics using simple equations in order to optimize pollution load from combined sewer overflows in large scale sewer network in real time. Total suspended solid has been selected as the quality indicator, regarding it is easy to be estimated through measuring turbidity and correlated with other quality indicators. The model equations are independent for different elements in sewer network, which allows a scalable usage. In order to ensure accuracy of the proposed models, a calibration procedure and a sensitivity analysis have been presented using data generated by virtual reality simulation. Afterwards, a quality-based model predictive control has been developed based on the proposed models. To validate effectiveness and efficiency of the modelling and optimization approaches, a pilot case, based on the Badalona sewer network in Spain is used. Application results under different scenarios show that the control-oriented modelling approach works properly to cope with quality dynamics in sewers. The quality-based optimization approach can provide strategies in reducing pollution loads in real time. 1. Introduction Considering the high concentrations of organic loads, metals and faecal bacteria (Becouze et al., 2009), combined sewer overflow (CSO), which consists a mixture of untreated wastewater and storm water runoffs from sewer networks (SN), can adversely affect the receiving environment (EPA, 2015). In order to protect ecosystem of the receiving body, optimization of a SN in real time to mitigate the pollution impact is cost-effective comparing with infrastructure construction (Joseph-Duran et al., 2015; Schütze et al., 2004; Sun et al., 2017a). In sewer networks, both hydraulics and hydrology are important factors to be considered for pollution control. So far, most of the approaches focus on the hydraulic aspects, aiming to reduce volume of CSO discharges to the environment. For instance, Joseph-Duran et al., (2014b) optimized CSO volume for a sewer network using a mixed integer linear program. Cembrano et al., (2004); Fu et al., (2010); and Vezzaro et al., (2014) reduced CSO volume through nonlinear approaches. Joseph-Duran et al., (2015) proposed a output-feedback control approach based on hybrid modelling to minimize CSO volume significantly. Moreover, predictive methodologies have also been developed in Lund et al., (2018); and Puig et al., (2009). Besides hydraulic-based approaches, quality-based objectives can open up new potential for the advanced management of SN (Fu et al., 2020; García et al., 2015; Schütze et al., 2004; Torres- Matallana et al., 2018). Moreover, regarding the increasing availability of sensors in recent years, inclusion of quality variables to the optimization becomes possible (Fu, et al., 2010; Hoppe et al., 2011; Lacour and Schütze, 2011). However, it is still a big challenge to develop a model that can describe quality dynamics in SN regarding the complex procedures (Sun, et al., 2018; Torres- Matallana et al., 2018). It is also not easy to obtain enough data with good quality to calibrate the models (Fu et al., 2020; Ledergerber et al., 2019). Nowadays, there exist detailed quality models, i.e. the Ackers White Model (Maciejowski, 2002), Velikanov and the KUL Model (Zug, et al., 1998) to describe sediments transportation in SN. There are also well-established tools embed with high fidelity quality equations for simulation such as the Storm Water Management Model (SWMM) (Rossman, 2015), MIKE Urban (DHI, 2007), WaterCress (Clark et al., 2002), InfoWorks CS (MWH, 2010) and UrbanCycle (Hardy et al., 2005). These models and tools can represent quality dynamics and processes in SN. But the tools mainly work as simulation platforms, which may not be able to use for optimization. The detailed models are not suitable for optimization either due to the high computational requirement. Control-oriented quality models which can describe complex dynamics using simple equations (generally linear) are in need for pollution optimization in real time, especially for large scale SN. Lacour and Schütze, (2011) proposed a turbidity-based approach, which uses turbidity measurements to generate “realistic” signals at the inflow time series. This approach provides evidence about the potential of quality-based control but does not map the quality dynamics inside SN. Vezzaro, et al., (2014) considered relevant water quality indicators (TSS - total suspended solids and ammonia concentration) in a global control of urban catchments through a simple model. Water quality is included in cost functions, which allows to change discharge priority to reduce pollution. However, the quality model does not refer to the sewer network. Torres-Matallana et al., (2018) developed a simplified semi-distributed urban water quality model, EmiStatR, to simulate emissions of pollutants in terms of chemical oxygen demand and NH4 concentrations. However, EmiStatR does not model the quality dynamics in sewer pipe explicitly either. Under this context, this paper contributes 1) a control-oriented quality modelling approach for different elements of SN. The model equations are developed independently for different elements, which allows scalable use of the models. These models are used to represent complex quality dynamics using simple equations, which can be embedded in real time optimization process. As a first step, TSS has been selected as a relevant quality indicator. This choice takes into account that TSS can usually be correlated with turbidity (Lacour and Schütze, 2011). Similarly, other quality parameters can also be estimated from TSS. 2) A calibration procedure based on data produced by a virtual reality simulator as well as a sensitivity analysis are presented to validate accuracy of the model. 3) Based on the proposed quality models, a quality-based optimization approach has been developed using model predictive control (MPC). 4) In order to validate the modeling and optimization approaches, a real life case study based on the Badalona SN in Spain has been demonstrated using different rain scenarios. Rest of this paper is organized as follows. In Section 2, the control-oriented quality modelling approach, the calibration procedure and the quality-based optimization scheme are presented. In Section 3, the proposed models are calibrated using data generated by virtual reality simulations. The efficient and effectiveness of the modeling and optimization approaches are demonstrated through the Badalona SN. Conclusions and discussions are provided in Section 4. 2. Methodology 2.1 Modelling approach The control-oriented modelling approach is used to estimate TSS dynamics in a certain horizon, including the TSS transportation in sewer pipes, TSS deposition and erosion in a detention tank, as well as TSS dynamics in the intersection nodes. There is no direct mathematical association between the models and the physical processes. Each type of element in SN is modelled using separated equations to enhance model scalability for different networks. Basic hydraulic models are provided firstly as background before introducing the quality models. In this paper, the italic bold font is used for vectors, italic font represents scalars. 1) Detention tank A detention tank is considered as container which collects water based on input and output flows: 𝒗𝒐𝒍(𝑘+1)=𝒗𝒐𝒍(𝑘)+∆𝑡(∑𝑓𝑖𝑛 𝑖(𝑘) 𝑛𝑖𝑛 𝑖=1 −∑𝑓𝑜𝑢𝑡 𝑖 𝑛𝑜𝑢𝑡 𝑖=1 (𝑘)) (1) 0≤𝒇(𝑘)≤𝒇𝑚𝑎𝑥 (2) 0≤𝒗𝒐𝒍(𝑘)≤𝒗𝒐𝒍𝑚𝑎𝑥 (3) where 𝒗𝒐𝒍∈ ℝ𝑛𝑡 represents vector for the water volumes [𝑚3] stored in detention tanks with physical ranges in [0, 𝒗𝒐𝒍𝑚𝑎𝑥]; ∆𝑡 is sampling time [s] and k is time step; 𝒇𝑖𝑛 =(𝑓𝑖𝑛 1, … 𝑓𝑖𝑛 𝑛𝑖𝑛)∈ ℝ𝑛𝑖𝑛 is the vector of flows into the tank [𝑚3/𝑠]; 𝒇𝑜𝑢𝑡 =(𝑓𝑜𝑢𝑡 1, … 𝑓𝑜𝑢𝑡 𝑛𝑜𝑢𝑡)∈ ℝ𝑛𝑜𝑢𝑡 is the vector of flows out of the tank [𝑚3/𝑠]; 𝒇𝑚𝑎𝑥 is the vector containing physical or operational limitations of flows. The parameters 𝑛𝑡,𝑛𝑖𝑛,𝑛𝑜𝑢𝑡 are numbers of tanks, inflow and outflow branches, respectively. 2) Controllable actuators The controllable actuators, gates or pumps, are usually located at the inlet or the outlet of a tank or an inline detention element. Flow from these elements is considered as control variable and bounded by physical and operational constraints: 𝒖(𝑘)≤𝒖𝑚𝑎𝑥(𝑘) (4) where 𝒖 is vector of control variables, 𝒖𝑚𝑎𝑥 includes the maximum constraints. 3) Junction node Mass balance is used for water in and out of a junction node: ∑𝑓𝑜𝑢𝑡 𝑖 𝑛𝑜𝑢𝑡 𝑖=1 (𝑘)=∑𝑓𝑖𝑛 𝑗𝑛𝑖𝑛 𝑗=1 (𝑘) (5) where 𝑓𝑜𝑢𝑡 𝑖, 𝑖=1,…,𝑛𝑜𝑢𝑡 are flows leaving the node; 𝑓𝑖𝑛 𝑗, 𝑗 =1,…,𝑛𝑖𝑛 are flows into the node. 4) Overflow Overflows at CSO locations occur, e.g. by means of weirs, when the capacity of a downstream element (for example, the WWTP) is exceeded by the flow in the upstream element, which is modelled as: 𝒇𝑐𝑠𝑜(𝑘)=max {0,𝒇𝑖𝑛(𝑘)−𝒎𝒂𝒙𝒄𝒂𝒑 (𝑘)} (6) 𝒇𝑜𝑢𝑡(𝑘)= 𝒇𝑖𝑛(𝑘)− 𝒇𝑐𝑠𝑜(𝑘) (7) where 𝒇𝑖𝑛 is the flow vector in the upstream elements, maxcap is the capacity vector of the downstream of the weirs (possibly WWTP inlets or interceptors), 𝒇𝑜𝑢𝑡 is the flow vector going to the downstream and 𝒇𝑐𝑠𝑜 is the CSO vector. 5) Total CSO The CSO volume released into the receiving environment is computed as: 𝑓𝑒𝑛𝑣𝑖𝑟𝑜𝑛𝑚𝑒𝑛𝑡(𝑘)= ∑𝑓𝑖𝑐𝑠𝑜(𝑘) 𝑛𝑐𝑠𝑜 𝑖=1 (8) where 𝑛𝑐𝑠𝑜 is number of CSO. Based on these equations, TSS models for different elements in SN are developed as follows: 1) TSS model for a sewer A sewer or a collection of sewers in a SN can be assumed as a tank which collects water based on the volumetric difference between input and output flows, as presented in equation (1). For the outflow vector 𝒇𝑜𝑢𝑡, besides complying with the physical constraints of equation (3), the values of 𝒇𝑜𝑢𝑡(𝑘) should also be proportional to the sewer volume 𝒗𝒐𝒍(𝑘) at the current time step 𝑘, which can be represented as: 𝒇𝑜𝑢𝑡(𝑘)=𝒄𝑖𝑛𝑡𝒗𝒐𝒍(𝑘) (9) where 𝒄𝑖𝑛𝑡 is a vector of parameters which relates the outflow of a sewer with the water volume stored in it. Here 𝒄𝑖𝑛𝑡 works as an intermediate variable in the modelling process. After combining equations (1) and (9), the following in-out relation can be expressed for a hydraulic transport in a sewer: 𝒇𝑜𝑢𝑡(𝑘+1)=(1− 𝒄𝑖𝑛𝑡∆𝑡)𝒇𝑜𝑢𝑡(𝑘)+ 𝒄𝑖𝑛𝑡∆𝑡 𝒇𝑖𝑛(𝑘) (10) where the outflow vector 𝒇𝑜𝑢𝑡 at time step 𝑘+1 is estimated through summing the proportional parts of the outflow vector 𝒇𝑜𝑢𝑡 and inflow vector 𝒇𝑖𝑛 at time step 𝑘. Taking into account the correlation between TSS dynamics and the flow rate inside a sewer, similar in-out relation of equation (10) is used to generalize the transport model for the TSS inside sewer with coefficients 𝒄1 and 𝒄2: 𝒔𝒔𝑜𝑢𝑡(𝑘+1)=𝒄1𝒔𝒔𝑖𝑛(𝑘)+ 𝒄2𝒔𝒔𝑜𝑢𝑡(𝑘) (11) where 𝒔𝒔𝑜𝑢𝑡 ∈ ℝ𝑛𝑜𝑢𝑡 is the TSS vector [mg/l] out of a sewer, 𝒔𝒔𝑖𝑛 ∈ ℝ𝑛𝑖𝑛 is TSS vector [mg/l] into a sewer; 𝒄1 and 𝒄2 are parameters need to be calibrated at the range of [0, 1]. 2) TSS model for a detention tank The TSS model in a detention tank is based on a simple representation of TSS mass evolution considering deposition and erosion processes. According to equation (1), a detention tank has the capacity to collect water volume based on input and output flows. Similarly, TSS mass could also be collected in detention tank based on the difference between mass input and output, as well as the deposition and erosion phenomena. Taking m ∈ ℝ𝒏𝒕 as the vector of total mass [mg] of the suspended solids in the detained water; 𝒔𝒔𝑖𝑛 and 𝒔𝒔𝑜𝑢𝑡 are the TSS vectors for the inflows and outflows of a tank; 𝝉 as the transport delay happens in the mixing process, the evaluation of m in the tank can be presented as: 𝒎(𝑘+1)=𝜶𝒎(𝑘)+∆𝑡 (𝒇𝑖𝑛(𝑘−𝝉)𝑠𝑠𝑖𝑛(𝑘−𝝉)−𝑓𝑜𝑢𝑡(𝑘−𝝉)𝑠𝑠𝑜𝑢𝑡(𝑘−𝝉)) (12) where 𝜶 is a vector representing mass deposition and/or erosion processes and should be calibrated using values between 0 and 10 for each tank; 𝝉 represents non-negative integer of transportation delays. The values of 𝜶 in the range of [0, 1] describes the deposition process while the values at the range of [1, 10] represents the erosion process. Here the erosion constraint 10 is only an estimated maximal constraint. Bigger constraint can be used in real implementations with stronger erosion. In order to achieve a model with accuracy, the items in equation (12) might be modified by considering more independent coefficients: 𝒎(𝑘+1)=𝜶𝒎(𝑘)+ ∆𝑡𝜷𝒇𝑖𝑛(𝑘−𝝉)𝒔𝒔𝑖𝑛(𝑘−𝝉)− ∆𝑡𝜸𝒇𝑜𝑢𝑡 (𝑘−𝝉)𝑠𝑠𝑜𝑢𝑡(𝑘−𝝉) (13) where 𝜷,𝜸 are positive vectors to be calibrated for each tank using values between 0 and 10. Assuming in the detention tank, TSS is the same throughout the stored water, which is also TSS at the tank outlets is (valid only for vol > 0): 𝒔𝒔𝑜𝑢𝑡(𝑘+1)= 𝒎(𝑘+1) 𝒗𝒐𝒍 (𝑘+1) (14) 3) TSS model for a junction node A junction node is considered as the element where volume and suspended solid mass are split or merged based on mass balance. Take a junction of two incoming sewers with one downstream sewer as an example, when suspended solid mass reaches a junction node, the dynamics of TSS is modelled as: 𝑒𝑜𝑢𝑡(𝑘)𝑠𝑠𝑜𝑢𝑡(𝑘)= 𝑒𝑖𝑛 1(𝑘)𝑠𝑠𝑖𝑛 1(𝑘)+𝑒𝑖𝑛 2(𝑘)𝑠𝑠𝑖𝑛 2(𝑘) (15) where 𝑒𝑜𝑢𝑡 is the coefficient for the TSS output flow, 𝑒𝑖𝑛 𝑖 is coefficient for the i-th TSS input flow. They are positive parameters need to be calibrated in range of [0, 10]. To give the same weight for each coefficient for the multi-input junction nodes, each coefficient should be close to 1. 2.2 Calibration procedure The proposed quality models should be calibrated before application. A virtual reality simulator of SN is used to produce data sets required by the calibration process, which has been designed and calibrated based on real life plants and measurements. So that the quality processes can be represented correctly by the simulator. As described in the modelling approach, water flows, TSS in and out of a sewer are the only information required by the calibration. Different historical rainfall data are used as inputs to the simulator to generate the required information. 1) Calibration for sewer model According to equation (11), 𝒄1,𝒄2 are parameters need to be calibrated. Defining 𝒔𝒔𝑚 as the observed TSS. The observed TSS and flow values at previous time step are 𝒇 𝑖𝑛,𝒇 𝑜𝑢𝑡,𝒔𝒔𝑖𝑛,𝒔𝒔𝑜𝑢𝑡 . The parameters of 𝒄1,𝒄2 are calibrated through minimizing difference between the observed TSS and the modelled TSS: (𝒄1 ∗,𝒄2 ∗)= (∑(𝒔𝒔𝑚(𝑘)−𝒄1𝒔𝒔𝑖𝑛(𝑘−1)−𝒄2𝒔𝒔𝑜𝑢𝑡(𝑘−1))2𝑁 𝑘=1 )12 ⁄ (𝒄1,𝒄2) arg𝑚𝑖𝑛 (16) where 𝑁 is duration of the event. 2) Calibration for tank model The parameters 𝜶,𝜷,𝜸,𝝉 need to be calibrated for the tank model. The sedimentation and erosion phenomena are represented through setting values at different ranges for the calibrated parameters. When the parameter takes value from 0 to 1, it means the sedimentation happens, when setting values at the range of [1, 10], erosion happens. There may have sedimentation and erosion two processes happen together in reality, however, we consider in this work only one process happens at each time. According to equations (1), (13) and (14), the parameters of 𝜶,𝜷,𝜸,𝝉 are calibrated as: (𝜶∗,𝜷∗,𝜸∗,𝝉∗)= (∑(𝒔𝒔𝑚(𝑘)−𝜶𝒎(𝑘−1)+ 𝜷∆𝑡𝒇 𝑖𝑛(𝑘−𝜏−1)𝒔𝒔𝑖𝑛(𝑘−𝝉−1)− 𝜸∆𝑡𝒇 𝑜𝑢𝑡 (𝑘−𝝉−1)𝒔𝒔𝑜𝑢𝑡(𝑘−𝝉−1) 𝒗𝒐𝒍(𝑘−1)+∆𝑡(𝒇 𝑖𝑛(𝑘−1)−𝒇 𝑜𝑢𝑡(𝑘−1)) )2𝑁 𝑘=1 )12 ⁄ (𝜶,𝜷,𝜸,𝝉) arg𝑚𝑖𝑛 (17) The initial mass (𝒎(0)) and water volume (𝒗𝒐𝒍(0)) at the tank can be set as 0 or other initial values read from the simulators. 3) Calibration for junction model The following equation should be met during calibration while 𝑒𝑖 and 𝑒𝑗 takes value from [0 10] but better as close as possible to 1: (𝑒𝑜𝑢𝑡∗,𝑒𝑖𝑛 1∗,𝑒𝑖𝑛 2∗)= (∑(𝑠𝑠𝑚 𝑖(𝑘)−𝑒𝑖𝑛 1𝑓󰆹𝑖𝑛 1(𝑘)𝑠𝑠𝑖𝑛 1(𝑘)+𝑒𝑖𝑛 2𝑓󰆹𝑖𝑛 2(𝑘)𝑠𝑠𝑖𝑛 2(𝑘) 𝑒𝑜𝑢𝑡𝑓󰆹𝑜𝑢𝑡(𝑘))2𝑁 𝑘=1 )12 ⁄ (𝑒𝑜𝑢𝑡∗,𝑒𝑖𝑛 1∗,𝑒𝑖𝑛 2∗) arg𝑚𝑖𝑛 (18) 4) Performance evaluation In order to evaluate the proposed modelling approaches, Nash Sutcliffe model efficiency coefficient (NSE) (Nash and Sutcliffe, 1970), which is sensitive to pollutograph peaks, and the Normalized Root Mean Square Error (NRMSE), a standard deviation of prediction errors (Functional, 2005) are selected (Bonhomme and Petrucci, 2017). 1. NSE index Defining average of the observed TSS as 𝒔𝒔𝑚      , which can be computed as: 𝒔𝒔𝑚      =∑𝑠𝑠𝑚(𝑘) 𝑁 𝑘=1 ∑𝑘 𝑁 𝑘=1 (19) Then performance in terms of NSE for the proposed models can be computed as: 𝑵𝑺𝑬𝑠𝑠 =1−∑ (𝒔𝒔𝑜𝑢𝑡(𝑘)−𝒔𝒔𝑚(𝑘))2 𝑁 𝑘=1 ∑ (𝒔𝒔𝑚(𝑘)− 𝒔𝒔𝑚       (𝑘))2 𝑁 𝑘=1 (20) The value of 𝑵𝑺𝑬𝑠𝑠 range from −∞ to 1. If 𝑵𝑺𝑬𝑠𝑠is equal with 1, it corresponds to a perfect match of the model. If 𝑵𝑺𝑬𝑠𝑠 can get value between 0.5 and 0.65, that indicate the model is sufficiently good to be used. 2. NRMSE index The value of 𝑵𝑹𝑴𝑺𝑬𝑠𝑠 is computed using equation (21): 𝑵𝑹𝑴𝑺𝑬𝑠𝑠 =1 max(𝑆𝑆 𝑚(𝑘))−min(𝑆𝑆 𝑚(𝑘)) √∑ (𝑠𝑠𝑜𝑢𝑡(𝑘)−𝑠𝑠𝑚(𝑘))2 𝑁 𝑁 𝑘=1 2 (21) In general, 𝑵𝑹𝑴𝑺𝑬𝑠𝑠 is expressed as a percentage, where the lower value indicate less errors. 5) Practical implementation Water quality measurements inside the SN or appropriate estimations are indispensable for model calibration. For sewer elements, these data may be estimated using a number of real turbidity sensors, complemented by TSS estimations of a detailed model. For the case of detention tanks, TSS measurements or estimations at the tank inlet and output are required. The sensors for the tank inlet and output may not be available in the real system and in the detailed quality simulators, this information is not readily available. In this case, we do not have reliable data for the TSS tank model calibration, and we suggest to use an approximation of the TSS in detention tank with perfect mixture hypothesis for the total mass as a conservative alternative. Then, the model coefficients for the tank model (𝜶,𝜷,𝜸,𝝉) would be (1, 1, 1, 0). 2.2 Quality-based optimization using MPC MPC has been selected as the optimization scheme because of its capacity to generate optimal control strategies especially for a complex network, as proved in García et al., (2015); Joseph- Duran et al., (2015); Pleau et al., (2005); Puig et al., (2009); Schütze et al., (2003); and Sun et al. (2020). The principal goal of the quality-based MPC optimization approach is minimizing both volume and pollutant load of CSO through efficient operation of controllable actuators (pumps, gates, etc.), taking into account hydraulic and quality models defined previously. 1) Optimization control problems The quality-based MPC optimization is defined using a state-space discrete-time model: min 𝒖(𝒌) 𝑱(𝒌) (22a) s.t.: 𝒙(𝑘+1)=𝑓(𝒙(𝑘),𝒖(𝑘),𝒅(𝑘)) (22b) ℎ(𝒙(𝑘),𝒖(𝑘),𝒘(𝑘))≥0, (22c) 𝑔(𝒙(𝑘),𝒖(𝑘),𝒘(𝑘))=0, (22d) 𝒙𝑚𝑖𝑛 ≤𝒙(𝑘)≤ 𝒙𝑚𝑎𝑥, (22e) 𝒖𝑚𝑖𝑛 ≤𝒖(𝑘)≤ 𝒖𝑚𝑎𝑥, (22f) where 𝒙(𝑘) is state vector represents water volume and mass in all tanks; 𝒖(𝑘) is the controlable vector of gate flows; 𝒅(𝑘) is disturbance vector related to rain intensity and runoff. The functions h(‧) and g(‧) include constraints, 𝒖𝑚𝑖𝑛, 𝒖𝑚𝑎𝑥, 𝒙𝑚𝑖𝑛,𝒙𝑚𝑎𝑥 are physical limits of vectors. 2) Objective function The objective function is a mathematical representation of the operational goals, including CSO discharges minimization 𝑱𝑐𝑠𝑜(𝑘), pollutant loads (TSS mass) from CSO minimization 𝑱𝑚(𝑘) and WWTP usage maximization 𝑱𝑤𝑤𝑡𝑝, expressed as: 𝑱(𝑘)=∑[𝑎𝑐𝑠𝑜𝑱𝑐𝑠𝑜(𝑘)+𝑎𝑚𝑱𝑚(𝑘)+𝑎𝑤𝑤𝑡𝑝𝑱𝑤𝑤𝑡𝑝(𝑘) 𝑁 𝑘=1 ] (23) where 𝑎𝑐𝑠𝑜,𝑎𝑚,𝑎𝑤𝑤𝑡𝑝 are weights of different objectives which can be generated through Pareto front computation for the multi-objective optimization problem in (23) or in practice, priorities of these items are mainly manipulated by the system operators in order to adjust to different situations (Lund et al., 2018; Toro et al., 2011). 3) Control optimization setup The quality-based MPC optimization produces control actions inside the prediction horizon of 𝐻, however, only the first solution is applied into simulation as set-points to validate the control actions without disturbing the real plant. In order to compensate uncertainty produced by the conceptual models, in each time step, the new system state (e.g. the tank volume, mass, etc.) of simulator is used as initial values for the next step optimization using MPC. This interaction between the controller and simulator is the so called closed-loop optimization scheme, which has been explained in detail in (Romero-Ben et al., 2019; Sun et al., 2015). 3. Case study 3.1 Badalona sewer network Badalona is a city at the east of Catalonia (Spain) facing to the Mediterranean Sea. Affected by the Mediterranean climate, 50% of the rainfall occurs at two or three heavy rainfall events in summer and autumn, which used to generate CSOs to the beach of Badalona. As shown in Figure 1, the Badalona SN (blue color) includes one detention tank (blue cylindrical). The WWTP is located on the side of the coast. Along the coast locates the outfall points (red color) from where the CSOs are released. Three rain gauges P1, P2, P3 are distributed in different area of this network. Proceedings of the 13th IWA international conference on Diffuse Pollution and Integrated Watershed Management, pp. 10 Seoul, South Korea. Clark, R., Pezzaniti, D., Cresswell, D., 2002. Watercress—Community Resource Evaluation and Simulation System—A tool for innovative urban water system planning and design. In: Proceedings of the 27th Hydrology and Water Resources Symposium, pp. 870 Melbourne, Australia. Cembrano G., Quevedo J., Salamero M., Puig V., Figueras J., Martí J., 2004. Optimal control of urban drainage systems, A case study. Control Eng. Pract. 12(1), 1-9. doi.org/10.1016/S0967-0661(02)00280-0 DHI, Danish Hydraulic Institute, 2017. MIKE URBAN. https://www.mikepoweredbydhi.com/products/mikeurban. EPA, 2015. Wastewater Management: Controlling and Abating Combined Sewer Overflows. Inspector General Evaluation Report. Washington D.C, USA. https://www.epa.gov/sites/production/files/2015- 12/documents/csofinal.pdf Functinoal Networks., 2005. Functional equations in applied sciences, 169-232. doi:10.1016/s0076- 5392(05)80012-8 Fu, G., Khu, S.T., Butler, D., 2010. Optimal distribution and control of storage tank to mitigate the impact of new developments on receiving water quality. J. Environ. Eng.-ASCE 136(3), 335-342. doi.org/10.1061/(ASCE)EE.1943-7870.0000161 Fu, B., Horsburgh, J. S., Jakeman, A. J., Gualtieri, C., Arnold, T., Marshall, L., et al., 2020. Modeling water quality in watersheds: From here to the next generation. Water Resour. Res. 56, e2020WR027721. https://doi.org/10.1029/2020WR027721. García, L., Barreiro-Gomez, J., Escobar, E., Télleza, D., Quijanoa, N., Ocampo-Martinez, C., 2015. Modeling and real-time control of urban drainage systems: A review. Adv. Water Resour. 85, 120-132. doi.org/10.1016/j.advwatres.2015.08.007 Ghazavi, R., Rabori, A. M., Reveshty, M. A., 2017. Effects of Rainfall Intensity-Duration-Frequency Curves Reformation on Urban Flood Characteristics in Semiarid Environment. Ecopersia. 5(2), 1801-1815. DOI: 10.18869/modares.Ecopersia.5.2.1801 Hardy, M.J., Kuczera, G., Coombes, P.J., 2005. Integrated urban water cycle management: The UrbanCycle model. Water Sci. Technol. 52(9), 1–9. doi.org/10.2166/wst.2005.0276 Hoppe, H., Messmann, S., Giga, A., Gruening, H., 2011. A real-time control strategy for separation of highly polluted storm water based on UV-Vis online measurements - from theory to operation. Water Sci. Technol. 63, 2287-2293. doi.org/10.2166/wst.2011.164 Joseph-Duran, B., Ocampo-Martínez, C., Cembrano, G., 2014a. Hybrid modelling and receding horizon control of sewer networks. Water Resour. Res. 50(11), 8497-8514. doi.org/10.1002/2013WR015119 Joseph-Duran, B., Jung, M.N., Ocampo-Martinez, C., Sager, S., Cembrano, G., 2014b. Minimization of sewage network overflow. Water Resour. Manag. 28, 41–63. doi.org/10.1007/s11269-013-0468-z Joseph-Duran, B., Ocampo-Martínez, C., Cembrano, G., 2015. Output-feedback control of combined sewer networks through receding horizon control with moving horizon estimation. Water Resour. Res. 51(10), 8129- 8145. doi:10.1002/2014WR016696 Lacour, C., Schütze, M., 2011. Real-time control of sewer systems using turbidity measurements. Water Sci. Technol. 63(11), 2628-2632. doi.org/10.2166/wst.2011.159 Lund, N.S.V., Falk, A.K.V., Borup, M., Madsen, H., Mikkelsen, P.S., 2018. Model predictive control of urban drainage systems: A review and perspective towards smart real-time water management. Crit. Rev. Env. Sci. Tec. 48(3), 279–339. doi:10.1080/10643389.2018.1455484 Maciejowski, J. M., 2002. Predictive Control with Constraints. Prentice Hall, Bergen, New Jersey, USA. Ledergerber, J.M., Maruéjouls, T., Vanrolleghem, P.A., 2019. Optimal experimental design for calibration of a new sewer water quality model, J. Hydrol. 574, 1020-1028. doi.org/10.1016/j.jhydrol.2019.05.004 MWH, 2010. InfoWorks CS. Innovyze. Newbury, UK. http://www.innovyze.com/products/infoworks_cs/ Martínez, M., Guasch, R., Ruiloba, L.C. Craviotto, E.M., Cembrano, G., Sun, C.C., 2019. D9 Mediterranean Pilot Set-up and Demonstrator Configuration. Deliverable of LIFE EFFIDRAIN project. http://www.lifeeffidrain.eu/uploads/pdf/cf7909da58070904aa99ad1b98e18e3f.pdf Nash, J.E., Sutcliffe, J.V., 1970. River flow forecasting through conceptual models part I-A discussion of principles. J. Hydrol. 10(3), 282-290. doi.org/10.1016/0022-1694(70)90255-6 Pleau, M., Colas, H., Lavallée, P., Pelletier, G., Bonin, R., 2005. Global optimal real-time control of the Quebec urban drainage system. Environ. Modell. Softw. 20(4), 401-413. doi.org/10.1016/j.envsoft.2004.02.009 Puig, V., Cembrano, G., Romera, J., Quevedo, J., Aznar, B., Ramón, G., Cabot, J., 2009. Predictive optimal control of sewer networks using CORAL tool: application to Riera Blanca Catchment in Barcelona. Water Sci. Technol. 60(4), 869-878. doi:10.2166/wst.2009.424 Rosenthal, R., 2013. GAMS – A User’s Guide, GAMS Development Corporation. http://www.gams.com/ help/topic/gams.doc/userguides/GAMSUsersGuide.pdf. Rossman, L., 2015. Storm Water Management Model Users’ Manual Version 5.1, Environmental Protection Agency, Washington DC, USA. Romero-Ben, L., Sun, C.C., Guasch-Palma, R., Joseph-Duran, B., Meseguer, J., Cembrano, G., Puig, V., 2019. A Feedback Simulation Procedure for Real-time Control of Urban Drainage Systems. In: Proceedings of the 1st IFAC workshop on Control Methods for Water Resource Systems, 52(23), pp. 101-106 Delft, The Netherlands. doi.org/10.1016/j.ifacol.2019.11.016 Schilling W., 1989 Real-time control of urban drainage systems. The state-of-art. London: IAWPRC Task Group on Real-time Control of Urban Drainage Systems, IWA Publishing. Schütze, M., Campisano, A., Colas, H., Vanrolleghem, P., Schiling. W., 2003. Real-time control of urban water systems. In: Proceedings of the International Conference on Pumps, Elctromechanical Devices and Systems Applied to Urban Water Management, pp. 1-19 Valencia, Spain. Schütze M., Campisano A.C., Colas H., Schilling W., Vanrolleghem P.A., 2004. Real time control of urban wastewater systems - where do we stand today? J. Hydrol. 299(3-4), 335-348. doi.org/10.1016/j.jhydrol.2004.08.010 Sun, C.C., Puig, V., Cembrano, G., 2015. Integrated simulation and optimization scheme of real-time large-scale water supply network: applied to Catalunya case study. Simulation 91(1), 59-70. doi.org/10.1177/0037549714559982 Sun, C.C., Joseph-Duran, B., Maruejouls, J., Cembrano, G., Muñoz, E., Meseguer, J., Montserrat, A., Sampe, S., Puig, V., Litrico. X., 2017a. Efficient integrated model predictive control of urban drainage systems using simplified conceptual quality models. In: Proceedings of the 14th IWA/IAHR International Conference on Urban Drainage, pp. 1848-1855 Prague, Czech Republic. Sun, C.C., Joseph-Duran, B., Maruejouls, T., Cembrano, G., Meseguer, J., Puig, V., Litrico, X., 2017b. Realtime control-oriented quality modelling in combined urban drainage networks. In: Proceedings of the 20th IFAC World Congress, pp. 3941-3946 Toulouse, France. doi.org/10.1016/j.ifacol.2017.08.142 Sun, C.C., Joseph-Duran, B., Cembrano, G., Puig, V., Meseguer, J., 2018. Advanced integrated real-time control of combined urban drainage systems using MPC: Badalona case study. In: Proceedings of the 13th International Conference on Hydroinformatics, pp. 2033-2041 Palermo, Italy. doi.org/10.29007/27gp Sun, C.C., Romero, L.B., Joseph-Duran, B., Meseguer, J., Craviotto, E.M., Guasch, R.P., Martinez, M.P., Puig, V., Cembrano, G., 2020. Integrated Pollution-based Real-time Control of Sanitation Systems. J. Environ. Manage. 269, 110798. DOI: 10.1016/j.jenvman.2020.110798 Toro R., Ocampo-Martinez C., Logist F., Van Impe J., Puig V., 2011. Tuning of predictive controllers for drinking water networked systems. In: Proceedings of the 18th IFAC Proceedings Volumes, 44(1), pp. 14507- 14512 Milano, Italy. doi.org/10.3182/20110828-6-IT-1002.00415 Torres-Matallana, J.A., Leopold, U., Klepiszewski, K., Heuvelink, G.B.M., 2018. EmiStatR: A Simplified and Scalable Urban Water Quality Model for Simulation of Combined Sewer Overflows. Water 10, 782. doi.org/10.3390/w10060782 Vezzaro, L., Christensen, M.L., Thirsing, C., Grum, M., Mikkelsen, P.S., 2014. Water quality-based real time control of integrated urban drainage systems: A preliminary study from Copenhagen, Denmark. Procedia Eng. 70, 1707-1716. doi.org/10.1016/j.proeng.2014.02.188 Zug, M., Bellefleur, D., Phan, L., Scrivener, O., 1998. Sediment transport model in sewer networks – a new utilization of the Velikanov model. Water Sci. Technol. 37 (1), 187-196. https://doi.org/10.2166/wst.1998.0046