An integrated software architecture for the pollution-based real-time control of urban drainage systems
Abstract
The authors want to thank the Spanish national project DEOCS (DPI2016-76493-C3-3-R) and the European Commission research grant of project LIFE EFFIDRAIN (LIFE14 ENV/ES/000860) for the received support. Besides, the authors are grateful for support from Aigües de Barcelona. This work is also supported by the Spanish State Research Agency through the María de Maeztu Seal of Excellence to IRI (MDM-2016-0656).
Full text
An integrated software architecture for the pollutionbased real-time control of urban drainage systems Luis Romero, Bernat Joseph-Duran, Congcong Sun, Jordi Meseguer, Gabriela Cembrano, Ramón Guasch, Montse Martínez, Eduard Muñoz and Vicenç Puig ABSTRACT This paper presents a complete methodology for the development of an integrated software architecture, which can achieve a closed-loop application between the integrated real-time control (RTC) and a virtual reality simulation for the urban drainage system (UDS). Quality measurements are considered during the simulation and optimization process. Model predictive control (MPC) and rulebased control (RBC) are the two main RTC methods embedded in this architecture. The proposed integration environment allows the different software components to efficiently and effectively communicate and work in a system-wide way, as well as to execute all the necessary steps regarding input parameter management, scenario configuration and results extraction. The proposed approaches are implemented into a pilot based on the Badalona UDS (Spain). Results from different scenarios with individual control approaches and rain episodes are evaluated and discussed. Key words |key performance indicators, pollution-based control, software architecture, urban drainage system, water bodies protection HIGHLIGHTS •Closed-loop framework between the urban drainage system simulator and the real-time control module. •Integration of the wastewater treatment plant state in the control strategy. •Software architecture to handle operations and communication among specialized commercial software. •Both hydraulic and quality measurements are considered during the control process. •Implementation of the architecture to a case based on a real network. Luis Romero (corresponding author) Congcong Sun Gabriela Cembrano Vicenç Puig Institut de Robòtica i Informàtica Industrial (CSICUPC), 46 Llorens i Artigas Street, 08028 Barcelona, Spain E-mail: [email protected] Bernat Joseph-Duran Jordi Meseguer Gabriela Cembrano CETaqua, Water Technology Centre (SUEZ Spain Group), 75 Esplugues Road, 08940 Barcelona, Spain Ramón Guasch Montse Martínez Aquatec, Proyectos para el Sector del Agua (SUEZ Spain Group), 48 Passeig de la Zona Franca, 08038 Barcelona, Spain Eduard Muñoz Aquambiente Servicios para el Sector del Agua, SAU (SUEZ Spain Group), 48 Passeig de la Zona Franca, 08038 Barcelona, Spain INTRODUCTION Combined urban drainage systems (UDS) have a fundamental role in collecting stormwater and wastewater together and conveying them to wastewater treatment plants (WWTPs) to minimize the associated pollution of the receiving environment (Butler et al. ). Their importance in developed areas lies in the influence over the modern society and the natural water cycle. The increasing urbanization, installation of complex infrastructure and frequent storm weather cause floodings and combined sewer overflows (CSO) due to the inability to manage high-intensity rainfalls, hence seriously polluting the receiving water This is an Open Access article distributed under the terms of the Creative Commons Attribution Licence (CC BY-NC-ND 4.0), which permits copying and redistribution for non-commercial purposes with no derivatives, provided the original work is properly cited (http://creativecommons.org/ licenses/by-nc-nd/4.0/). 671 © 2021 The Authors Journal of Hydroinformatics |23.3 |2021 doi: 10.2166/hydro.2021.149 Downloaded from http://iwaponline.com/jh/article-pdf/23/3/671/892961/jh0230671.pdf by guest on 16 February 2022
bodies (Cembrano et al. ). New water detention and diversion infrastructure is typically installed in order to confront these challenges, but advanced control approaches are still required to proficiently operate the UDS. Real-time control (RTC) is considered as an appropriate option among the different possible control strategies, iteratively computing the optimal control set-points through real-time measurements or even predicted values while benefiting from the development of Information and Communication Techniques (ICTs; Schüetze et al. ). According to the recent literature, there are numerous and different kinds of RTC approaches applied to the UDS, which can be generally classified into model-based strategies and knowledge-based algorithms. Model predictive control (MPC; Joseph-Duran et al. ) and linear-quadratic regulator (LQR; Lemos & Pinto ) are the representative of model-based approaches which require a mathematical model of the system behaviour, together with an objective function and boundary constraints, to produce the optimal strategy. Knowledge-based algorithms do not require a model, but a complete expertise about the network characteristics. One example of this technique is rule-based control (RBC), which considers different scenarios that may happen during the system operation by means of the assessment of if-else conditions and applies on-line predefined rules to generate control actions (Aulinas et al. ). In order to validate these advanced control approaches for their application in a real system, they may be tested in conjunction with a high-fidelity simulator. This term is utilized in this work as presented in Lund et al. (). It behaves as virtual reality, playing the role of the sewer network (SN) and the WWTP. Typically, the implementation of a closedloop software architecture (CLSA) for UDS is executed using asinglesoftwareplatform(Achleitner et al. ), limiting the utilization of powerful commercial tools. Most of the existing integrated frameworks only focus on the hydraulic model, so quality dynamics are not included into the optimization and simulation processes. Moreover, the integration problem is usually faced through the literature by means of the development of specialized software tools like SYNOPSIS (Butler & Schütze ), OpenMI (Gregersen et al. ), DynaMind (Urich et al. )andCityDrain3(Burger et al. ). This paper proposes a methodology for the development of an integrated software architecture with the aim of achieving a closed-loop application between the RTC module and the wastewater system. The platform is prepared to allow the integration of the WWTP state in the control approaches, and therefore, different individual models (Bach et al. ) must be coordinated. Besides, quality measurements (Sun et al. ) can be considered into the closed-loop. In Rauch et al. (), the need for integration to cope with water-quality-based approaches is remarked due to the importance of identifying the most effective action in the UDS to solve any issue affecting the receiving water body properties. Hence, the development of the integrated multi-software pollution-based control architecture presented in this paper entails a further step on the path to emulate the particular behaviour of a complex water system under the influence of a certain control approach, with sufficient reliability to be capable of extracting firm conclusions from the achieved results. In addition, the effects of including quality and integrating the WWTP in the control operation can be evaluated and this information can be employed as a decision-making tool. METHODS The general software architecture of an integrated closedloop framework for UDS is presented in Figure 1. The closed-loop coordination environment enables the communication between the integrated model simulator and the RTC controller. Therefore, the SN and WWTP simulation results are gathered, extracting the necessary data for the control algorithm operation. The RTC software computes the next required actuators set-points, which are, in turn, applied to the simulators for the next time instant. Figure 1 |General scheme of the CLSA framework. 672 L. Romero et al. |Integrated software architecture for pollution-based RTC of UDS Journal of Hydroinformatics |23.3 |2021 Downloaded from http://iwaponline.com/jh/article-pdf/23/3/671/892961/jh0230671.pdf by guest on 16 February 2022
In this section, a detailed explanation of the different software constituents of the CLSA framework is provided, introducing the essential aspects defining each component and its operation. Those individual functionalities are linked with their role inside the closed-loop structure by explaining the coordination architecture. Therefore, a complete and hierarchic view of the proposed solution will be presented. Integrated model simulator The integrated model simulator consists of a set of individual high-fidelity models, representing different components of a complete UDS, whose operations are mutually influenced, as presented in Schüetze et al. (). In the case of this paper, the integrated model is considered to be composed of two parts: a model to emulate the complex dynamics of an SN and another operating as a sufficiently convenient replacement of the real WWTP. SN simulator As mentioned earlier, an SN simulator consists of a software module that implements a high-fidelity physically based model of the network dynamics, in the form of a set of partial differential equations. The involved hydraulic variables in those expressions may include the sewer flow rates and velocities, pressure heads, surcharge level, as well as the water depths. Besides, in this work, quality measurements are also considered in order to obtain optimal pollutionbased performance. These models emulate both hydraulic and quality behaviour of the SN, through routing rain scenarios with empirical surface runoff expressions and solving the related equations (Rubinato et al. ). A comparison among different water network simulators is presented in Bach et al. (). The majority of software platforms utilized for this purpose gather a particular set of functionalities apart from the network dynamics simulation: •Network generation: SN simulation packages normally include a graphical user interface (GUI) which allow the user to design a new network or represent an existing one by placing the necessary components (e.g. sewers, nodes, pumps, gates and catchments, etc.). Besides that, property details for these components can be configured due to the requirements of the SN structure. •Rainfall definition: In the case of combined drainage networks, the water input to the system comes from two main sources: wastewater and stormwater. Regarding the fact that SN control approaches evaluation relies on the performance analysis in demanding scenarios, primarily characterized by intense and/or long-lasting rainfall events, the proper definition of those rain episodes becomes a capital task. Therefore, the precipitations configuration must be considered as a prior stage of any project dealing with UDS, generating a large database of real or fictitious scenarios with enough diversity to be capable of carrying out a proper evaluation of the control strategy operation. •Simulation configuration: Several parameters must be set to achieve correct and effective simulations. Depending on the selected software, the amount and complexity of the settings may vary, though various of them need to be available at any simulator: simulation date and time, duration, rain event, build-up time (number of hours/ days, depending on the simulation software units parametrization, from the previous rain event end to the starting point of the current simulation), numerical solver settings, wastewater profile (complementing the stormwater to supply the SN model with the total water input), control mode (apart from receiving external regulator set-points, the virtual drainage structure may employ local rule-based approaches to manage the actuators operation), hotstart file (record of a certain state of the virtual network, commonly used to feed the model as an initial condition), among others. •Results extraction: It is a mandatory feature regarding the necessity of supplying several measurements of the virtual network state to the external controller (unless an internal local management approach is selected). Depending on the control strategy, the required input data may differ, but tank and catchment volumes and/or pollutants mass, certain sewers flow or water quality and water level at critical points are typically needed. Moreover, these results are also indispensable to perform an analysis of the virtual network representation resemblance to the modelled real system. 673 L. Romero et al. |Integrated software architecture for pollution-based RTC of UDS Journal of Hydroinformatics |23.3 |2021 Downloaded from http://iwaponline.com/jh/article-pdf/23/3/671/892961/jh0230671.pdf by guest on 16 February 2022
WWTP simulator To consider an integrated control strategy, the presence of a WWTP model inside the simulation framework is essential. The physical, chemical and biological degradation processes that treat the pollutants contained in the water reaching the treatment plant are represented, and operation results are gathered to get information about the benefits of exploiting the integration in the considered control approach. Moreover, the collected data allows us to compare the performance regarding quality measurements between pollution-based and volume-based controllers. The WWTP simulation software packages allow the inclusion of several operational blocks representing wellknown processes like pre-treatment, clarifiers, gravity thickeners or bio-reactors (each one of them defined by a set of equations) (Jeppsson ); whose connection and configuration implies the implementation of the WWTP model. As in the case of the SN simulation software, several general settings are mandatory for the WWTP operation, e.g. date, time, duration, hoststart information, among others. Moreover, depending on the designed WWTP type and its composing elements, various parameters regarding biological aspects of the plant functioning are required. If the SN simulator does not provide the necessary information as a result, an intermediate process must be designed to generate the parameters for the virtual treatment plant from the available pollutants information at the SN simulation results. Regarding the integration implementation, a certain scope for action at the WWTP model performance is necessary. The degree of freedom in the treatment facility management from an external source is a design aspect for the closed-loop framework. Real-time controller (RTC) Through the UDS state produced by the integrated model simulator, the RTC module must be capable of computing the set-points for the different actuators. As previously mentioned, there are several control strategies that can be implemented to accomplish this set-point computation. Thus, the approach selection ought to consider numerous aspects like its associated economic/ technological cost and the network characteristics and complexity, highlighting the control degrees of freedom due to the number of accessible actuators at the system. In addition, the RTC module must include a component whose function consists of allowing the integration of the WWTP with the control strategy, so that the treatment facility actual state is taken into account during the UDS management operation. Control algorithm Regarding the control strategy, model-based and knowledgebased approaches will be considered. In this work, about the former, an algorithm based on MPC is utilized as an example (it is extensively described in Sun et al. ()); whereas regarding the latter, a rule-based scheme referred to as RBC is introduced. A review of these and other approaches can be found in García et al. (). In both cases, hydraulic and quality dynamics are considered into the RTC controllers. The distinctive features of these two control approaches will be presented, stressing issues like necessary input information or required software resources, as well as highlighting their advantages and drawbacks from the integrated UDS closed-loop architecture point of view. Model predictive control (MPC).MPCisamodel-based control strategy that employs the prediction of the system response to compute a set of suitable future control actions for a certain time horizon, using a simplified mathematical model of the system dynamics and an optimization process to minimize a certain cost function J.Itsdefinition is essential and mainly includes an analysis of the different desired goals, like minimization of the floodings and/or CSO spilled to the water receiving bodies (in both quantity and quality), the WWTP efficient usage, safe and smooth operation of SN and WWTP, etc. All these objectives are represented by a term in the cost function, where each element is multiplied by its associated weight. The non-linear optimization problem 674 L. Romero et al. |Integrated software architecture for pollution-based RTC of UDS Journal of Hydroinformatics |23.3 |2021 Downloaded from http://iwaponline.com/jh/article-pdf/23/3/671/892961/jh0230671.pdf by guest on 16 February 2022
associated with the MPC can be expressed as follows: minimize J(x,u,w) x,u s:t:x(t)¼x0; x(kþ1) ¼f(x(k), u(k), w(k)), k¼t,...,tþH1; (1) h(x(k), u(k), w(k)) ¼0; k¼t,...,tþH; g(x(k), u(k), w(k)) 0, k¼t,...,tþH; xmin x(k)xmax,k¼t,...,tþH; umin u(k)umax,k¼t,...,tþH; where x(t) corresponds to system states at time step t,typically representing water volume and pollutants mass in tanks; u(t) is the vector of control actions at time step t (it depends on the studied network) and w(t) represents the disturbances at time step t(normally related to rain intensity and runoff). Function f(·) mainly includes mass and volume balance equations, while h(·) and g(·) represent the general constraints of the MPC problem, and u min ,u max ,x min and x max are the control actions and states physical limits. Constraints are given by the capacity of tanks/WWTP and flow limits at pipes/actuators. Finally, kis an index that represents time, which goes from the current time instant tto tþH(or tþH 1 considering f(·)), where His the optimization horizon. Therefore, the utilization of an optimization specialized software would be necessary if the MPC approach is considered, and a simplified model of the SN should be derived in order to implement the modelling equations at the optimizer. These conceptual models involve network components like nodes, pipes and tanks, as well as the evolution of their associated variables, like flow, total suspended solids (TSS; it is considered as a pollution representative in this paper; see Woodward & Curran ()for more information about this quality indicator), volume and mass. They mainly consider the flow and mass balances at the nodes and the tank volume and mass evolutions. Other elements like weirs may need custom models for the considered SN. The set-points for the network actuators are derived from the optimization results. The achieved data for a certain set of sewers at the simplified model, at the first time step in the horizon, is evaluated by means of a flow-to-setpoint function. It allows the conversion of the corresponding flows into reference values for the position of the actuators. This function depends on the network characteristics and it must be meticulously designed. Besides, as the optimization scheme employs the SN simplified model to emulate its dynamics by means of the implemented equations, information regarding the water inputs to the network is required. This knowledge may come from a conversion function that transforms the rain forecast into the flow reaching the network by each one of its basins. Rule-based control (RBC). RBC consists of a decisionmaking approach that exploits gathered knowledge about system features to generate a certain set of rules that defines the cause–effect relation for a specific problem. The obtained set-point explicitly depends on the fulfilment of a settled group of conditions involving variables directly measured at the considered system. In the case of UDS, variables (involving tanks level or volume, water level at critical points for flooding prevention, quality measurements at certain sewers or nodes, CSOs, etc., as well as WWTP inflow capacity in integrated strategies) must be evaluated to generate proper regulator values affecting the different system actuators. As discussed in Aulinas et al. (), this system knowledge is usually converted into if-else structures like decision trees, although this implementation presents some disadvantages for complex networks, like less flexibility and lack of reasoning capabilities. Other approaches which are more suitable for complex water systems rely on fuzzy logic-based schemes as presented in García et al. (). WWTP inflow capacity calculator The information about the WWTP state is crucial for any considered regulator generation approach within an integrated architecture, since the selected control strategy must take this knowledge into consideration when deriving the controller set-points for the next time instant. 675 L. Romero et al. |Integrated software architecture for pollution-based RTC of UDS Journal of Hydroinformatics |23.3 |2021 Downloaded from http://iwaponline.com/jh/article-pdf/23/3/671/892961/jh0230671.pdf by guest on 16 February 2022
There exist different approaches to improve the WWTP operation under demanding conditions: 1. Increasing the WWTP inflow depending on its capacity instead of using a maximum inflow considered for the worst-case scenario (Müller & Krauth ). 2. Increasing the WWTP inflow, but bypassing the extra flow to be introduced into the secondary clarifier (Ahnert et al. ). The first strategy is selected due to the larger leeway for action considering the integration of the WWTP state during the RTC operation, since the second approach considers WWTP internal procedures which are beyond the scope of this article. Thus, an inflow capacity computation module, henceforth referred to as a capacity calculator, must provide the plant state from measurements produced by the virtual reality UDS: input water flow and quality results from the SN simulator, as well as the current state of the WWTP, which is derived from the information achieved by the WWTP simulator. This maximum capacity applies to the plant entrance, but it may be computed considering the primary or secondary clarifier state, depending on the control objective, plant management goal and the facility layout. Therefore, the manner to design this WWTP inflow capacity calculator may vary among different projects. Finally, this capacity value is provided to the control algorithm, so the way it handles this information about the WWTP state may differ among distinct RTC strategies: •Considering MPC as the selected control approach, the WWTP inflow capacity knowledge must be utilized to compute an objective function term that increases the penalty as the difference between actual WWTP inflow and the mentioned capacity augments. •Regarding RBC, the WWTP information may be used to evaluate a condition or for the explicit computation of a certain actuator set-point. The integration scheme would depend on the RBC algorithm definition. Closed-loop coordination environment To develop a complete closed-loop framework from the different presented ingredients, a binding element must be employed to host the intra-application operations and accomplish the necessary inter-application functionalities. The scheme of the complete architecture is presented in Figure 2. The closed-loop approach implies the coordination of the different functionalities forming the framework. The SN simulation is configured, considering the event date, rain forecast and network initial state as internal configurations settings of the SN simulator, and the actuators setpoints as external inputs to the simulation software. Then, this simulation is executed and the achieved results are extracted. The information about the water quality, required for the WWTP simulation, is obtained from a quality transformation process (referred to as Quality Parameters Transformation in Figure 2). It is supplied with the gathered hydraulic and hydrologic results from the SN simulation and generates the required chemical and biological parameters for the WWTP simulator. The inflow capacity of the WWTP, used by its simulator, is computed by a capacity calculator (WWTP Capacity Calculator in Figure 2) from the previous treatment plant state and current SN information. After the WWTP detailed simulator launching, the resulting data can be gathered to compute the inflow capacity in the next iteration. Finally, the RTC algorithm must be fed with the required SN results such as flows, quality and initial volumes; the capacity for the WWTP and, depending on the control approach, a rain forecast and previous control module results. The outcome of running the controller is a set of data that has to be converted from SN flows to actuator setFigure 2 |Detailed scheme of the CLSA framework. 676 L. Romero et al. |Integrated software architecture for pollution-based RTC of UDS Journal of Hydroinformatics |23.3 |2021 Downloaded from http://iwaponline.com/jh/article-pdf/23/3/671/892961/jh0230671.pdf by guest on 16 February 2022
points to configure the next step SN simulation. The selection of the coordination environment highly depends on the software elements performing the presented individual tasks: •It must hold complete compatibility with all the applications, to carry out their launching and pull off the required communication demands. •Files management involving numerous formats is indispensable to fulfil data inputting, software configuring and results extraction/presentation assignments. •The importance of elaborating a closed application varies according to the purpose of the CLSA framework development, e.g. academic research and proprietary software; and the set of possible coordination software environments may be reduced if considering a professional application. However, a simpler environment may be enough for more relaxed development demands, so that the involved tasks are accomplished without including application layers to the solution. However, the main tasks involving the closed-loop execution are conceptually identical regardless of the selected binding platform: virtual reality simulation preparation and control approach data feeding, as is represented in Figure 1. Different programming languages like MATLAB ® (Joseph-Duran et al. ), Python (Urich et al. ), as well as combinations of both of them (Riaño-Briceño et al. ), have been considered through the literature for this moderation task. CASE STUDY The case study consists of a realistic pilot based on the Badalona UDS. It considers a combined SN (represented in Figure 3 by the area that is highlighted in blue) and a WWTP that treats the collected water and releases it to the Mediterranean Sea. There is a single detention tank in this drainage network (DLES in Figure 3), which stands Figure 3 |Map of the Badalona SN. The tank is marked as DLES, while the LX elements are CSO points (Sun et al. 2020). Please refer to the online version of this paper to see this figure in colour: https://doi.org/10.2166/hydro.2021.149. 677 L. Romero et al. |Integrated software architecture for pollution-based RTC of UDS Journal of Hydroinformatics |23.3 |2021 Downloaded from http://iwaponline.com/jh/article-pdf/23/3/671/892961/jh0230671.pdf by guest on 16 February 2022
out due to its importance considering the control problem. It is conceived to be voluminous enough to be capable of fully storing the vast majority of the water coming from rainfalls. Additional information about the case study pilot characteristics, structure and location can be found in Sun et al. (). When high-intensity rainfall occurs, the stormwater together with the sewage water may exceed the WWTP inflow capacity, so polluted water would reach the receiving body by means of the CSO, economically, environmentally and socially harming the area. The local control strategy is based on two operative modes, both implementing a rule-based system that checks several SN hydraulic measurements. The anti-flooding approach is utilized as the main operation mode, basing its functioning on the water level at the most critical point of the network. Besides, an anti-CSO approach is also implemented, but due to its simplicity, the scope for action is large. In order to improve the currently implemented local control strategy in the Badalona UDS, three different control approaches using the proposed CLSA are developed: 1. Volume-Based Model Predictive Control (VBMPC): Model-based strategy characterized by the main role of the CSO volume spilled to the environment during the optimization process. Despite the WWTP integration is possible due to the utilized architecture, the feature is not exploited by this approach for comparison with the next strategy. 2. Pollution-Based Model Predictive Control (PBMPC): The only differences with respect to the previous approach are the inclusion of the quality (TSS mass) during the optimization process and the integration with the WWTP. 3. Rule-Based Control (RBC): A set of simple rules is defined with the aid of various decision trees. They consider both hydraulic and quality features of the network state as well as the treatment plant inflow capacity, hence entailing a further step with respect to the local control approach. Its development is based on the gathered knowledge about the UDS characteristics during the development of the previous control approaches. Therefore, the CLSA framework presented in this work must be implemented to be capable of applying the desired control strategies and assess their potential benefits. The coordination application that hosts the activities of the different software components has been programmed in Ruby, due to the facility of connection of this programming language with certain exploited commercial tools. Following the structure of Section ‘Methods’, the individual software elements composed of the closed-loop framework for the case study will be presented; closing the exposition by defining the binding platform used to synchronize the previous elements. Integrated model simulator The elaboration, configuration and calibration of the integrated virtual reality simulator based on the Badalona UDS were developed as part of the LIFE EFFIDRAIN (LIFE14 ENV/ES/000860) project. The description of the integrated model simulator must be divided into its two different composing ingredients. SN simulator The demonstration SN, used as virtual reality for the simulation of the hydraulic and hydrology dynamics of the UDS, was developed using InfoWorks Integrated Catchment Modelling (or simply InfoWorks ICM). The SN hydraulic and sediment transport dynamics are based on the 1D Saint Venant equations and the Velikanov model (Zug et al. ), respectively. The virtual network includes 14,280 nodes and 15,055 sewers approximately, together with 4 gate elements to control the amount of water entering the tank (there is a pair of InfoWorks ICM gates for each gate at the real network, as they convey water by two possible paths: to the tank or down to the network), and a pump for its emptying. The detention tank is included among the sewers, due to the impossibility of representing it as a node due to problems with the sedimentation phenomena. Both the gates and the pump, which compose the SN complete actuators set, are managed by means of a regulator whose origin may be internal to InfoWorks ICM, via its local control scheme, or external, coming from the approach selected for the CLSA framework. 678 L. Romero et al. |Integrated software architecture for pollution-based RTC of UDS Journal of Hydroinformatics |23.3 |2021 Downloaded from http://iwaponline.com/jh/article-pdf/23/3/671/892961/jh0230671.pdf by guest on 16 February 2022
The simulation software presents the mentioned functionalities in Section ‘Methods’, Subsection ‘SN simulator’: •Network generation at InfoWorks ICM: As previously commented, the definition of the virtual SN is part of a larger project that started with simpler network versions, even using a different SN modelling software, and ended with the latest improvements considering new data for calibration, gathered from Supervisory Control And Data Acquisition (SCADA) systems and measuring devices installed at the real network in the frame of external projects. Therefore, a deep explanation of this task goes beyond the scope of this paper. •Rainfall events definition at InfoWorks ICM: To generate the stormwater information, historical data regarding rain scenarios that occurred during the last years at Badalona were employed. This knowledge can be converted into rainfall databases which are accessible from the InfoWorks ICM user interface. Then, during the simulation configuration, the selection of a certain precipitation dataset allows the user to assign the correct rainfall pattern to the particular simulated event. In the Badalona-based pilot, the alert criteria to classify the distinct rain scenarios, established by the city hall, was utilized to select a set of episodes ranging from small to large rainfalls. •Simulation configuration at InfoWorks ICM: Events are prepared to be simulated once the previously commented aspects of the SN definition have been generated (network, rain database, wastewater profiles, etc.), as well as others like the time step duration, corresponding to 5 min for every simulation of the case study. The configuration process can be carried out manually, by means of the InfoWorks ICM GUI, as well as via external source, which is the main interest for this paper. •Results obtained from InfoWorks ICM: It provides numerous sources of information about effectuated simulations regarding hydraulic and quality results, as well as computation performance. The simulation results files, generated in .csv format, present node and sewer-related variables like water depth (or height), flow rate and velocity, TSS, volume, pressure head and sedimentation depth. WWTP simulator The WWTP detailed model is implemented using the commercial software GPS-X, which allows the mathematical modelling, control and management of WWTPs. GPS-X provides a large suite of tools that allow generation of complex treatment plant models, run simulations and analyze the results. The design, creation and implementation of the model of the plant consist of a prior task with respect to the purpose of this paper. In this case study, the Besòs WWTP was employed as a reference for the detailed virtual reality plant, including the same processes but scaling them considering the input flow to the designed model to be 14% of the real one (this resizing of the plant is required because the real WWTP treats water from different locations, whereas the case study only considers the Badalona area, which represents a 14% of the total). The modelled plant counts on a simplified sludge line without biosolid treatment. The water line is formed by a gravity clarifier as primary treatment, an aerated reactor and a conventional decantation as secondary treatment; and a biological treatment based on the Activated Sludge Model ASM1 (Henze et al. ). Apart from various simulation settings which depend on the selected episode, different input parameters are required depending on the designed GPS-X model characterization, being related to the biological processes executed in the treatment operation. Regarding the Badalona-based pilot, the selection of the ASM1 model implies the utilization of several equations whose involved variables (see Jeppsson ()for a detailed explanation) value must be provided to GPS-X as prior information for each simulation. As InfoWorks does not directly generate all the required quality parameters for the GPS-X procedure, the utilization of a conversion process becomes essential. This task is carried out by the fractionation module (Martin & Vanrolleghem ), by means of information about the entrance flowandTSSconcentrationtothe treatment plant and the event date. This process produces almost all the necessary data required by the WWTP simulator. Real-time controller (RTC) The RTC module for this pilot is composed of a control algorithm dependent on the selected approach and an operational unit in charge of the WWTP integration. Both of 679 L. Romero et al. |Integrated software architecture for pollution-based RTC of UDS Journal of Hydroinformatics |23.3 |2021 Downloaded from http://iwaponline.com/jh/article-pdf/23/3/671/892961/jh0230671.pdf by guest on 16 February 2022
involved tasks, has been implemented inside a coordination environment. A pilot based on the Badalona UDS has been presented to exemplify the usage of the proposed methodology in several scenarios, as well as demonstrating the capabilities of the advanced framework to generate effective control commands for the SN management. Results involving various rainfall events are exposed to highlight the appropriateness, efficiency and superiority of the presented methodology. Therefore, new control strategies can be designed and initially tested by implementing a sufficiently representative pilot of a UDS by means of the proposed methodology, achieving different conclusions via the employment of a virtual reality application. The generated closed-loop architecture deals with standalone and/or proprietary software components whose operation was not conceived to be coordinated by an external element. The election of the programs and applications composing the architecture of this case study arises from different reasons. The high-fidelity simulators correspond to proprietary software selected by the network and plant operators involved in the project. The optimization software was chosen due to the wide previous experience at its usage. Finally, the coordination platform was designed in Ruby because of the existence of an API to manage one of the simulators, facilitating its operation. These constraints in the software selection lay bare the difficulty of developing a proper coordination algorithm. However, the proposed solution entails a successful solution to the inclusion of these commercial tools, making the most of their outstanding capabilities while efficiently and effectively coordinating their tasks. These achievements entail a further step in the UDS control field, due to the wide range of possible software solutions that can be incorporated to the presented methodology, as well as the several features that it allows to exploit, like pollution-based approaches, WWTP integration, etc. Several future lines of work remain open. Regarding the software development, the design of a closed application would be of interest, including an application layer in order to improve the operator experience. Moreover, the efficiency of the methodology might be tested and compared with other approaches. About the water system operation, numerous control strategies can be implemented and evaluated, as well as new case studies may be considered. Finally, the implementation of the methodology into a real network would be the definitive step to assess the effectiveness of the solution. ACKNOWLEDGEMENTS The authors want to thank the Spanish national project DEOCS (DPI2016-76493-C3-3-R) and the European Commission research grant of project LIFE EFFIDRAIN (LIFE14 ENV/ES/000860) for the received support. Besides, the authors are grateful for support from Aigües de Barcelona. This work is also supported by the Spanish State Research Agency through the María de Maeztu Seal of Excellence to IRI (MDM-2016-0656). DATA CONFIDENTIALITY STATEMENT Data, tools and models employed in this work are confidential or commercial, and hence, we refer other researchers to contact SUEZ Spain Group (for access to detailed, simplified models; the Closed-loop Simulation Framework software; and the rain data) and Innovyze (for licenses to InfoWorks ICM). DATA AVAILABILITY STATEMENT Data cannot be made publicly available; readers should contact the corresponding author for details. REFERENCES Achleitner, S., Möderl, M. & Rauch, W. CITY DRAIN © –an open source approach for simulation of integrated urban drainage systems.Environmental Modelling & Software 22 (1), 1184–1195. https://doi.org/10.1016/j.envsoft.2006.06.013. Ahnert, M., Günther, N., Kuehn, V., Krebs, P., Svardal, K. & Spatzierer, G. Modelling of enhanced CSO treatment in secondary clarifiers with a modified Activated Sludge Model No. 3.Water Science & Technology 58 (3), 609–615. https:// doi.org/10.2166/wst.2008.673. Aulinas,M.,Nieves,J.C.,Cortés,U.&Poch,M. Supporting decision making in urban wastewater systems using a knowledge686 L. Romero et al. |Integrated software architecture for pollution-based RTC of UDS Journal of Hydroinformatics |23.3 |2021 Downloaded from http://iwaponline.com/jh/article-pdf/23/3/671/892961/jh0230671.pdf by guest on 16 February 2022
based approach.Environmental Modelling & Software 26 (5), 562–572. https://doi.org/10.1016/j.envsoft.2010.11.009. Bach,P.M.,Rauch,W.,Mikkelsen,P.S.,McCarthy,D.T.&Deletic,A. A critical review of integrated urban water modelling –urban drainage and beyond.Environmental Modelling & Software 54, 88–107. https://doi.org/10.1016/j.envsoft.2013.12.018. Burger, G., Bach, P. M., Urich, C., Leonhardt, G., Kleidorfer, M. & Rauch, W. Designing and implementing a multi-core capable integrated urban drainage modelling Toolkit: lessons from CityDrain3.Advances in Engineering Software 100, 277–289. https://doi.org/10.1016/j.advengsoft.2016.08.004. Butler, D. & Schütze, M. Integrating simulation models with a view to optimal control of urban wastewater systems. Environmental Modelling and Software 20 (4), 415–426. https://doi.org/10.1016/j.envsoft.2004.02.003. Butler, D., Digman, C. J., Makropoulos, C. & Davies, J. W. Urban Drainage. CRC Press, Boca Raton. Cembrano, G., Quevedo, J., Salamero, M., Puig, V., Figueras, J. & Martí, J. Optimal control of urban drainage systems. A case study.Control Engineering Practice 12 (1), 1–9. https:// doi.org/10.1016/S0967-0661(02)00280-0. García, L., Barreiro-Gómez, J., Escobar, E., Téllez, D., Quijano, N. & Ocampo-Martínez, C. Modeling and real-time control of urban drainage systems: a review.Advances in Water Resources 85,120–132. https://doi.org/10.1016/j.advwatres.2015.08.007. Gregersen, J. B., Gijsbers, P. J. A. & Westen, S. J. P. OpenMI: open modelling interface.Journal of Hydroinformatics 9(3), 175–191. https://doi.org/10.2166/hydro.2007.023. Henze, M., Gujer, W., Mino, T. & van Loosdrecht, M. Activated Sludge Models ASM1, ASM2, ASM2d and ASM3. IWA Publishing, London. Jeppsson, U. Modelling Aspects of Wastewater Treatment Processes. PhD Thesis, Department of Industrial Electrical Engineering and Automation, Lund Institute of Technology, Lund, Sweden. Joseph-Duran, B., Ocampo-Martínez, C. & Cembrano, G. Output feedback control of combined sewer networks through receding horizon control with moving horizon estimation.Water Resources Research 51 (10), 8129–8145. https://doi.org/10.1002/2014WR016696. Lemos, J. M. & Pinto, L. F. Distributed linear-quadratic control of serially chained systems: application to a water delivery canal [applications of control].IEEE Control Systems Magazine 32 (6), 26–38. https://doi.org/10.1109/MCS.2012.2214126. Lund, N. S. V., Falk, A. K. V., Borup, M., Madsen, H. & Mikkelsen, P. S. Model predictive control of urban drainage systems: a review and perspective towards smart real-time water management.Critical Reviews in Environmental Science and Technology 48 (3), 279–339. https://doi.org/10.1080/10643389.2018.1455484. Martin, C. & Vanrolleghem, P. A. Analysing, completing, and generating influent data for WWTP modelling: a critical review.Environmental Modelling & Software 60, 188–201. https://doi.org/10.1016/j.envsoft.2014.05.008. Müller, J. R. & Krauth, K. Wastewater flow management to maximise the capacity of sewage treatment plants.Water Science & Technology 37 (9), 49–56. https://doi.org/10.1016/ S0273-1223(98)00270-4. Rauch, W., Seggelke, K., Brown, R. & Krebs, P. Integrated approaches in urban storm drainage: where do we stand? Environmental Management 35 (4), 396–409. https://doi.org/ 10.1007/s00267-003-0114-2. Riaño-Briceño, G., Barreiro-Gómez, J., Ramírez-Jaime, A., Quijano, N. & Ocampo-Martínez, C. MatSWMM –an open-source toolbox for designing real-time control of urban drainage systems.Environmental Modelling & Software 83, 143–154. https://doi.org/10.1016/j.envsoft.2016.05.009. Romero, L., Sun, C., Guasch, R., Joseph-Duran, B., Meseguer, J., Cembrano, G. & Puig, V. A feedback simulation procedure for real-time control of urban drainage systems. IFAC-PapersOnLine 52 (23), 101–106. https://doi.org/10. 1016/j.ifacol.2019.11.016. Rubinato, M., Shucksmith, J., Saul, A. J. & Shepherd, W. Comparison between InfoWorks hydraulic results and a physical model of an urban drainage system.Water Science & Technology 68 (2), 372–379. https://doi.org/10.2166/wst.2013.254. Schüetze, M., Butler, D. & Beck, M. B. Optimisation of control strategies for the urban wastewater system –an integrated approach.Water Science & Technology 39 (9), 209–216. https://doi.org/10.1016/S0273-1223(99)00235-8. Schüetze, M., Campisano, A., Colas, H., Schilling, W. & Vanrolleghem, P. A. Real-time control of urban wastewater systems –where do we stand today? Journal of Hydrology 299 (3/4), 335–348. https://doi.org/10.1016/j. jhydrol.2004.08.010. Sun, C., Romero, L., Joseph-Duran, B., Meseguer, J., Muñoz, E., Guasch, R., Martínez, M., Puig, V. & Cembrano, G. Integrated pollution-based real-time control of sanitation systems.Journal of Environmental Management 269, 110798. https://doi.org/10.1016/j.jenvman.2020.110798. Urich, C., Burger, G., Mair, M. & Rauch, W. DynaMind –a software tool for integrated modelling of urban environments and their infrastructure. In: Paper Presented at the 10th International Conference on Hydroinformatics, Vol. 14, p. 18, Hamburg, Germany. Wahlberg, E. J. WERF/CRTC Protocols for Evaluating Secondary Clarifier Performance. Water Environment Research Foundation, Alexandria. Woodward, F. & Curran, A. Industrial Waste Treatment Handbook, 2nd edn. Butterworth-Heinemann, Oxford. Zug, M., Bellefleur, D., Phan, L. & Scrivener, O. Sediment transport model in sewer networks –a new utilisation of the Velikanov model.Water Science & Technology 37 (1), 187–196. https://doi.org/10.1016/S0273-1223(97)00769-5. First received 6 October 2020; accepted in revised form 2 February 2021. Available online 2 March 2021 687 L. Romero et al. |Integrated software architecture for pollution-based RTC of UDS Journal of Hydroinformatics |23.3 |2021 Downloaded from http://iwaponline.com/jh/article-pdf/23/3/671/892961/jh0230671.pdf by guest on 16 February 2022