Hybrid modeling and receding horizon control of sewer networks Bernat Joseph-Durana,∗, Carlos Ocampo-Martineza, Gabriela Cembranoa,b aInstitut de Rob`otica i Inform`atica Industrial (CSIC-UPC), Universitat Polit`ecnica de Catalunya, C/ Llorens i Artigas 4–6, 08028 Barcelona, Spain bCETAQUA Water Technology Center (Agbar-CSIC-UPC). C/ Esplugues, 75, Cornell`a, 07940 Barcelona, Spain. Abstract In this work, a control-oriented sewer network model is presented based on a hybrid linear modeling framework. The model equations are described independently for each network element, thus allowing the model to be applied to a broad class of networks. A parameter calibration procedure using data obtained from simulation software that solves the physically-based model equations is described and validation results are given for a case study. Using the model equations, an optimal control problem to minimize flooding and pollution is formulated to be solved by means of mixed-integer linear or quadratic programming. A receding horizon control strategy based on this optimal control problem is applied to the case study using the simulation software as a virtual reality. Results of this closed-loop simulation tests show the effectiveness of the proposed approach in fulfilling the control objectives while complying with physical and operational constraints. 1. Introduction Combined sewer networks are present in many large cities all over the world. These networks carry wastewater and storm water together. During low to moderate rain events, this water is carried to wastewater treatment plants, where it is treated before being released to the receiving environment (usually a river or the sea). However, during heavy-rain events, the network capacity can be easily overloaded, causing urban surface flooding as well as untreated water discharges to the environment, known as combined sewer overflows (CSO). To avoid these undesired discharges, detention tanks are built within the network to store water during the peak rain intensity periods and release it later at lower flow rates. Since these infrastructures are clearly expensive and hard to place in urban areas, its efficient operation has become a topic of major interest. The efficient management of combined sewer networks requires controlling the flows in the network and in and out of the detention tanks in real time. This process is strongly dependent on rainfall predictions, which are only available with acceptable precision for short time periods. Thus, real-time control (RTC) is regarded as the best option to provide control actions every few minutes, using the most recent rainfall predictions as well as data obtained through network telemetry [38]. A physically-based model for flow routing in sewers (open-channel flow), which describes the relation between flows and water levels, involves the solution of a set of partial differential equations (the de Saint- Venant equations). The numerical solution of this problem for mid- to large-scale networks takes too long to be included in real-time control. Therefore, control strategies based on the full de Saint-Venant equations remain only applicable to small-sized networks while simplified mathematical models have been developed in the recent years to be used in the management of large-scale networks. These models are expected to provide a trade-off between model accuracy and computational burden in order to be used in an RTC context. ∗Corresponding author. Tel.:+34 93 401 5805 Email addresses:
[email protected] (Bernat Joseph-Duran),
[email protected] (Carlos Ocampo-Martinez), cembra[email protected].edu (Gabriela Cembrano) Preprint submitted to Water Resources Research September 5, 2014
Following the seminal work of Gelormino and Ricker [13], where a reservoir-based simplified model was presented together with an optimal/predictive control strategy, other works have improved the model by including delays in the flow equations [22, 23] and piece-wise expressions for the overflows [5, 32, 30, 28, 19, 40] and coupling the resulting model with tailored nonlinear solvers for optimization-based control. These approaches are especially suited for big networks since they are based on a simplified conceptual model of the network topology obtained by describing entire city areas as linear reservoirs, also known as virtual tanks. Other authors have focussed on the modeling and control of smaller networks comprised of a few big interceptor sewers and lateral inflows from a few city sewer catchments [11, 37, 10]. In this case, to fully take advantage of the in-line detention capacity of the interceptor it is convenient to use a model including flows, water levels and backwater effects. Therefore, the models used in this context are closer to the physically-based one. Although some authors have developed models and algorithms for optimization-based control [11, 12, 31], the common practice is to use available simulation software based on simplified models (Muskingum-Cunge model, Nash cascade model, kinematic wave equations, diffusive wave equations) in connection with global derivative-free optimization algorithms [39, 36, 3, 33, 34, 24, 25]. Reviews of the most commonly used software can be found in Marinaki and Papageorgiou [23] and Sch¨utze et al. [36]. Other approaches also include the use of neural networks [9] or, if the control strategy does not involve optimization or intensive evaluation of the model, software solving the complete de Saint-Venant equations [4, 10]. In the present work, a simplified sewer network modeling approach is presented, based on the hybrid linear systems framework, which involves both continuous and logical variables. The objective is to obtain a model that is suitable for optimization-based control in large-scale networks. The main idea was to merge the delay-based flow equations of Marinaki and Papageorgiou [22, 23] with the piecewise-linear approach for overflow description of Puig et al. [32], Ocampo-Mart´ınez et al. [29, 30] in a network description including all specific network elements, thus not relying on reservoir-based conceptual simplification. Special attention is given to a novel approximation of the flow over weirs, the overflow in junctions and the flooding volume reentering the network after an overflow event. Modeling individual elements has two major advantages: firstly, the control model topology can be directly obtained from the network description, avoiding a simplification process that is not straightforward and requires expert knowledge of the network. Secondly, element-wise modeling allows for simple parameter calibration using data generated by a physically-based model simulator. The proposed modeling approach has been applied to the case study of a real network and has been validated against data provided by a physically-based model simulator. The simulator implementation has been provided by the company responsible of the network management and has been calibrated and validated using real measurement data. The model is shown to be easily adapted to an optimal/predictive control setting that allows for the computation of optimal control actions through mixed integer linear or quadratic programming, meeting real-time requirements [16, 17]. Unlike other works relying on optimization-based control, the optimization problem arising from the optimal control problem can be solved by standard solvers avoiding the need to implement ad hoc optimization routines [22, 12, 32]. The remainder of the paper is organized as follows: the physically-based model and the proposed simplified control model equations for each of the network elements are presented in Section 2. In Section 3, the hybrid linear delayed system expression of the model and the formulation of a model-based Optimal Control Problem are described together with the Receding Horizon Control strategy used to test the controller performance. Section 4 focusses on the calibration procedures to obtain the model parameters from data generated by the physically-based model simulator. The specific case study consisting of a part of the Barcelona sewer network is described in Section 5, together with validation results based on error indices and sensitivity analysis with respect to model parameters and rainfall intensity. In Section 6, performance results of the model-based controller for the case study network are presented and discussed. Finally, conclusions of the whole work and outlines of future research lines for further improvement of the proposed modeling and control techniques are described in Section 7. 2
2. Sewer Network Modeling The model described in this work has been developed for being used as a control model in optimizationbased real-time control. Two main features are expected from such a model: it must provide good approximations of the system dynamics and it must be possible to pose optimal control problems based on the model to compute control actions in real time using appropriate solvers. It is a well-known fact that structural nonlinearities in the system dynamics produce non-convex optimization problems for optimal control for which neither convergence in real time nor global optimality are guaranteed. The hybrid linear framework chosen for the presented model allows for acceptable approximations of the continuous (water transport with delays and wave attenuation, volumes in tanks) and switching (flow over weirs, overflows, flooding) phenomena of water transport along the network and the corresponding optimal control problem results into a Mixed Integer Linear Programming problem (MILP), which can be solved within the available times by state-of-the-art solvers to obtain global optimal solutions. The network control is achieved through gate management, redirecting flow into or out of detention tanks or to different parts of the network. According to the physically-based model, the flow under a sluice gate depends on the gate opening and the upstream and downstream water levels [20]. However, the presented model is a discrete-time model that describes only the flows through the network (the physically-based model involves flows and water levels, see Section 2.1). Therefore, the optimal controller described in this work acts as an upper level controller that computes the desired flows at gates, to be used as set-points for local controllers that regulate gate positions. Before presenting the control model developed in this work, a brief presentation of the physically-based model used for calibration, validation and closed-loop simulations of the controllers is given. Notice that the simplified control model is a conceptual model, thus, no direct mathematical relations are required between the physically-based model equations and the simplified ones. 2.1. Physically-based Model The physically-based model for water motion in sewer networks is based on the 1D de Saint-Venant equations with constant channel cross-sectional area and constant channel bed slope [23, 36, 28, 35]. These equations are hyperbolic nonlinear partial differential equations (PDE) relating the flow and water level in an open channel/sewer: ∂a ∂t +∂q ∂x = 0, ∂q ∂t +∂ ∂x q2 a+g a∂h ∂x =g aSb−Sf, where xis the longitudinal coordinate [m], tthe time [s], q(x, t) the flow hm3 si,a(x, t) the cross-sectional area of the flow [m2], h(x, t) the water level [m], gthe gravitational acceleration m s2,Sbthe bed slope [dimensionless] and Sf(x, t) the friction slope [dimensionless], approximated by the Manning formula [20]: Sf=q2n2 a2R4/3 h , where nis the Manning coefficient hs m−1/3i(depending on the channel physical properties) and Rhthe hydraulic radius [m]. The de Saint-Venant equations are applied to each sewer and coupled by means of internal and boundary conditions defined at junctions, sewer geometry changes and hydraulic structures. These internal and boundary conditions imply that the network dynamics must be solved as a single system, not for each sewer. Thus, the problem becomes computationally very demanding for big networks with complex topologies. The classical physically-based models for hydraulic structures can be found in a number of textbooks on hydrodynamics [7, 6] and control of hydrosystems [20, 21]. They relate the flow and water levels up- and 3
Figure 1: Flow model diagram. downstream of the structure. The most common structures present in sewer networks are weirs and gates. The equations for these hydraulic structures have the following general expression: q(t) = f(hu(t), hd(t), p(t)), where q(t) is the flow through the structure, hu(t) and hd(t) are the water levels upstream and downstream of the structure and p(t) the structure physical parameters. Overflows are modeled in the same way as weir flows, and therefore are defined to occur at junctions. In both cases the the overflow or flow to the spillway is subtracted in the mass balance internal conditions coupling the equations of the sewers attached to the junction. CSOs are modeled as normal sewer flows that go out of the network through a constant water level boundary condition. 2.2. Control-oriented Model Table 1: Notation for the variables of the system. Description Symbol Units Indexing Flow entering sewers qin i(t) m3/s i= 1 . . . nq Flow leaving sewers qout i(t) m3/s i= 1 . . . nq Volume in tanks vi(t) m3i= 1 . . . nv Flow under gates gi(t) m3/s i= 1 . . . ng Flow over weirs wi(t) m3/s i= 1 . . . nw Overflows fi(t) m3/s i= 1 . . . nf Flooding runoff flow qti(t) m3/s i= 1 . . . nf Overflow volume vti(t) m3i= 1 . . . nf Collector volume vci(t) m3i= 1 . . .nc Collector overflow fci(t) m3/s i= 1 . . . nc Rainfall-runoff inflow ri(t) m3/s i= 1 . . . nr 2.2.1. Flow Model As shown in Figure 1, for each sewer, two flows are considered: the upstream flow qin(t) (or inflow) and the downstream flow qout(t) (or outflow). Mass balance equations. The mass balance equations describe how, at each network junction, the total inflow must equal the total 4
outflow. For each sewer i= 1 . . . nq, the total inflow is computed as the sum of all inflows at the junction where it is connected, i.e., zqi(t) = nq X j=1 aq ijqout j(t) + nw X j=1 aw ijwj(t)+ ng X j=1 ag ijgj(t) + nc X j=1 ar ijrj(t). (1) See Table 1 for a description of the variables describing the different flows involved in this equation. Coefficients a∗ ij ∈ {0,1,−1}indicate which elements are interconnected; therefore they contain the topological information of the network. Notice that, for sewers iand jconnected to the same upstream junction, zqi(t) = zqj(t). The flow upstream of each sewer is now defined as a fraction αi∈(0,1] of the total inflow plus the effects of overflow f(t) and flooding runoff qt(t): qin i(t) = αizqi(t) + nf X j=1 af ijfj(t) + nc X j=1 aqt ij qtj(t).(2) The overflow variables f(t) describe the flow leaving the network at a junction when the total inflow is above a given threshold value and the flooding runoff variables qt(t) describe how the volume that left the network during an overflow returns to the network after the overflow has finished. The equations for these variables as a function of the junction inflow are provided in the following sections. The value of αidescribes whether sewer iis the only outgoing sewer from the junction where it is connected (αi= 1) or there are other outgoing sewers (αi<1). In the latter case, the αparameters of all the outgoing sewers of a junction should add to 1 for mass conservation. The presence of several outflowing sewers attached to a junction is not common in sewer networks, therefore in most cases α= 1. Flow equations. To account for transport delays and flow attenuation, the flow downstream of each sewer is computed as a convex combination of the upstream flows at two consecutive previous time steps. Hence, for each sewer i= 1 . . . nq, qout i(t) = aiqin i(t−ti) + (1 −ai)qin i(t−ti−1),(3) with ai∈(0,1]. This model has been chosen because the delay in sewers may not be a multiple of the sampling time unless the latter is chosen to be very small, which would lead to a high number of variables in the problem to cover reasonable simulation or optimization time windows. By means of a convex combination of flows at two consecutive time steps, delays of any magnitude can be suitably approximated. It is also worth noticing the fact that coefficients aiand 1 −aiadd to 1 implies that the model is mass conservative. 2.2.2. Tank Model To match the discrete-time equations of the flow transport, the volumes v(t) in the network tanks are described by the following discretization of the volume equation, with sampling time ∆t: v(t) = v(t−1) + ∆tgin(t−1) −gout(t−1). For ease of notation, it is supposed that both the inflow gin(t) and outflow gout(t) of the tanks are controlled by gates. However, the model could be easily extended to consider inflows and outflows from sewers or weirs. Notice that when using the model for control purposes a constraint forcing the tank volume to remain within its physical limits (0 ≤v(t)≤vmax) must be imposed. 5
Figure 2: Weir model diagram. 2.2.3. Weir Model Movable weir flows present in the network are considered as controlled variables in the same way as gate flows: to run the model for simulation weir flow values have to be provided as inputs while for optimal control purposes they are left as free variables to be computed by the optimization problem and later be used as setpoints for local controllers. Therefore, in the following only weirs with fixed position will be considered. Since the proposed model does not include water levels, an approximation for fixed weirs in terms of flow is used. The flow w(t) over a weir attached to a junction with total inflow zw(t) (see Figure 2) is computed as w(t) = max{0, aw(zw(t)−qmax w)},(4) where qmax wis the inflow value at which water starts flowing through the spillway. As mentioned before, the flow over a weir does not actually depend on flow values but on water level, thus it was observed in data obtained from a complete physically-based model simulator that flow values at the main sewer can reach values greater than qmax w. This fact is suitably approximated by the introduction of parameter aw∈(0,1]. Notice that for each weir in the network, the inflow zwi, i ∈ {1,2,...,nw},equals the total inflow zqj, for some j∈ {1,2,...,nq}. 2.2.4. Overflow Model Overflows are defined at junctions in a way completely analogous to the weir flow, i.e., f(t) = max{0, af(zf(t)−qmax f)},(5) where f(t) is the overflow, zf(t) the total inflow to the junction and qmax fthe inflow value at which overflow starts. Again, af∈(0,1] is introduced to better approximate the fact that the outflow can be greater than qmax f. Although overflows could be defined in every network junction, it is better to define them only at those prone to suffer from overflow events. This junctions can be easily determined from data generated by a physically-based model simulator. Avoiding the definition of overflow variables at those junctions where overflows are very unlikely to occur improves the model computational speed since it is strongly dependent on the amount of switching equations, specially in the optimal control case. Notice that, as in the weir inflow definition, for each overflow junction defined in the network, the inflow zfi, i ∈ {1,2,...,nf},equals the total inflow zqj, for some j∈ {1,2,...,nq}. 2.2.5. Flooding Runoff Model A novel feature of the proposed model consists in keeping track of the volume that goes out of the network through overflows to let it return to the network when the overflow event has finished. A similar model 6
Figure 3: Overflow and flood runoff diagram. The proposed overflow model keeps track of the overflow volume and lets it return to the network when the overflow event has finished. based on water levels is implemented in the physically-based model simulator used for calibration, validation and control. Therefore, this model is developed as a flow-based approximation of the one implemented in the physically-based model simulator. As shown in Figure 3, to keep track of the volume flowing out of the network through overflows, for each overflow variable f(t) a volume variable vt(t) is defined, which acts like a tank that stores all the overflow volume, i.e., vt(t) = vt(t−1) + ∆tf(t−1) −qt(t−1),(6) where qt(t) is the emptying flow defined as qt(t) = min max 0, bf(qmax f−zf(t)),vt(t) ∆t,(7) with bf∈(0,1]. To understand the meaning of (7), notice from the definition of the overflow variable (5) that f(t)>0 =⇒qt(t) = 0, therefore, the tank does not start emptying until the overflow event has finished. On the other hand (5) also implies that f(t) = 0 =⇒qt(t) = min bf(qmax f−zf(t)),vt(t) ∆t. This means that the tank can never provide more flow than that which would empty it in a single time step (i.e., vt(t)/∆t). If there is enough volume available (i.e., vt(t) ∆t> bf(qmax f−zf(t))), the tank empties at a rate bfproportional to the difference between the overflow threshold qmax fand the inflow zf(t). 2.2.6. Collector Model Collectors are big sewers with an in-line detention capacity of the same order as a tank. For optimal control purposes, collectors with a downstream gate controlling their outflow are best modeled as one or more tanks. This modeling allows to keep track of the volume vc(t) contained in the collector coming from upstream sewers q(t) so as to decide the amount available to be released through the downstream gate g(t). The equation, using a one-tank model, for the volume contained in the collector is, therefore, analogous to the one used previously for the volume contained in a tank: vc(t) = vc(t−1) + ∆tq(t−1) −g(t−1) −fc(t−1). An overflow variable fc(t) is also added to the tank that models the collector to take into account possible flooding. The overflow variable is defined as in the overflows in junctions: fc(t) = 1 ∆tmax n0, vc(t−1) + ∆tq(t−1) −g(t−1)−vmax co, 7
i.e., variable fc(t) equals the the part of the inflow q(t) that does not fit in the collector, which has the physical limitation vc(t)≤vmax c. When using the model for optimal control purposes, the overflow variable provides a way for the water to escape in case the collector becomes overloaded, thus keeping the optimal control problem from becoming infeasible. As will be described in Section 6, this situation is to be avoided by all means. This is achieved using a strong penalty function of variable fc(t) in the objective function of the optimal control problem. 2.2.7. Rainfall-Runoff Model The rainfall-runoff model used in this work is the one provided by the physically-based model simulator used for calibration, validation and control simulations so that both the control model and the physicallybased model have the same rain inflows. The rainfall-runoff model, called Kinematic Wave Model B [26], is based on modeling the rain catchments as nonlinear reservoirs, that is, reservoirs emptying at a rate which depends nonlinearly on the water volume contained therein. Each network catchment is connected to a network junction where the computed inflow is added. All the parameters involved in the equations of the previous model description can be calibrated using data generated with a physically-based model simulator solving the full PDE system as described in detail in Section 4. 3. Sewer Network Control Although the focus of this work is to present the control-oriented model together with calibration and validation procedures, it is also important to assess whether it fulfills the computational times and accuracy requirements to be used in real-time control. Notice that, for simulation only purposes, the complete de Saint-Venant equations provide more accurate results and specialized academic and commercial software for this kind of simulations already exists (see, for example, Bach et al. [1] and the references therein). Therefore, in this section, a brief outline of the setup of a receding horizon controller based on the proposed model is given, which can be used to assess the controller performance, as shown in Section 6. 3.1. Optimal Control Problem Formulation The Optimal Control Problem (OCP) is concerned with minimizing overflows and untreated water discharges to the environment and maximizing WTTP usage over a time horizon that is related to the concentration time of the network. In order to formulate optimal control problems, the previously described model equations are written in matrix form. For the model equations involving maximum and minimum functions matrix expressions are obtained through the Mixed Logical Dynamic system formalism. The Mixed Logical Dynamic (MLD) systems is a framework for modeling and control of systems whose dynamics are described by linear equations and inequalities involving continuous and binary variables [2]. It provides a set of rules to define binary variables describing the truth value of logical statements involving linear inequalities in the system variables (continuous or already defined binary ones). These variables can be used to define the system dynamics allowing for switching behaviors. MLD systems have been shown to be equivalent to other system modeling formats including linear complementarity systems,extended linear complementarity systems,piecewise affine systems, and max-min-plus-scaling systems [14]. Details on the MLD reformulation of the proposed sewer network model equations can be found in Joseph-Duran et al. [18]. Putting together all the system dynamic equations and the MLD inequalities, the model can be written in the Hybrid Linear Delayed System format T X i=0 MiX(t−i) = m(t), T X i=0 NiX(t−i)≤n(t), (8) 8
where vector X(t) collects all the system variables at time step t, including additional binary variables defined during the MLD reformulation, and Tis the maximum sewer delay in (3), defined as follows: T= max i=1,...,nq ti+ 1. Details on how matrices Mi, Ni,i= 1,...,T, and vectors m(t) and n(t) are constructed can be found in Joseph-Duran et al. [18]. The terms m(t) and n(t) contain the influence of rainfall-runoff inflows ri(t) and system parameters. The OCP consists of computing admissible control strategies that optimize the some operational goals (such as overflow and CSO minimization) over a time horizon. It is formulated as a constrained optimization problem where equations and inequalities (8) at time steps t+ 1,...,t+H, where His called the prediction horizon, are the constraints. The system variables at the current and the previous time steps t,...,t−T+1, are used as initial conditions. After writing the resulting set of equalities and inequalities in a compact matrix form the OCP has the following form: min X(t)J(X(t)) = c⊤X(t), s.t. M1X(t) = M2X0(t) + M3(t), N1X(t)≤ N2X0(t) + N3(t), Aeq X(t) = beq(t), Aineq X(t)≤bineq(t), (9) where Jis a cost function describing the system performance according to the operational goals, X(t) = X(t+H)⊤,...,X(t+ 1)⊤⊤ , are the problem unknowns, corresponding to future values of the system variables, X0(t) = ˆ X(t)⊤,..., ˆ X(t−T+ 1)⊤⊤ , are the measured or estimated initial conditions and matrices Mi,Ni, i = 1,2,3,are block-matrices build using matrices Miand Niin (8), as detailed in Joseph-Duran et al. [16]. Additional constraints of the form Aeq X(t) = beq(t) and Aineq X(t)≤bineq(t), are added to the OCP to take into account bounds on variables, bounds on the variation of the gate flows for smooth control actions and mass balance in junctions with outflowing gates. Details of the form of the cost function J(X(t)) used to quantify the management objectives of the network are given sin Section 6. In this case, a linear function of the problem variables has been used and the corresponding optimization problem becomes a MILP. More generally, a quadratic function could be used and the corresponding optimization problem would become a Mixed Integer Quadratic Programming problem (MIQP). Both the MILP and the MIQP versions of the OCP can be efficiently solved by using appropriate optimization software. 3.2. Receding Horizon Control and Simulation Algorithm Receding Horizon Control (RHC) is a high level control strategy which involves solving consecutive OCPs and applying only the control actions corresponding to the first part of the solution to the system. The usual strategy consists of solving a finite horizon OCP with a prediction horizon of Htime steps, applying the solution corresponding to the first time step, letting the system evolve for one time step and measuring/estimating the state of the system to formulate the OCP for the next control interval with measured data as initial conditions. The time step used in the control model to provide sufficient accuracy may not be adequate to be used in the RTC strategy as described above. This fact is due to additional time required to gather system 9
Figures 9 and 10 show respectively the flows at an overflowing node and over a weir as computed by the presented control model and by physically-based model simulator for the most intense rain event (09-10- 2002). 100 200 300 400 500 0 10 20 30 40 Time (min) Flow (m3/s) 17−09−2002 q139 MOUSE q139 Model 100 200 300 400 500 600 0 10 20 30 40 50 60 Time (min) Flow (m3/s) 09−10−2002 q139 MOUSE q139 Model 50 100 150 200 250 300 350 0 10 20 30 40 Time (min) Flow (m3/s) 15−08−2006 q139 MOUSE q139 Model 50 100 150 200 250 300 0 10 20 30 40 50 Time (min) Flow (m3/s) 30−07−2011 q139 MOUSE q139 Model Figure 8: Flow at sewer q139, at the downstream part of the network as computed by the presented control model and by MOUSE simulator. The maximum error E2occurs in this sewer for the four simulated rain events. 5.3. Sensitivity Analysis in the Riera Blanca Network The use of simplified control-oriented models implies that some aspects of the system dynamics are omitted. To compensate this fact parameters are included into the model to be calibrated and better approximate the system behavior. In the present problem, the values of the parameters are highly dependent on the characteristics of the exogenous disturbance: the rainfall-runoff flow entering the network, which is determined by the rain intensity. Depending on the rain intensity the flow velocity through the network pipes changes, resulting into variable transport delays and affecting the flow-level relationships. These phenomena are not explicitly taken into account by the model and should be reflected by means of the parameter values, obtained by the calibration procedures. Therefore, in order to obtain a suitable set of parameters the studied rain events used for calibration and control should be of similar intensities. In the following, a discussion of the model performance against variations of the rain intensity is presented. The selected rain events for calibration, validation and closed loop control simulation used in this work have different profiles and peak values (see Figure 7) but result in peak flows and velocities of the same order. Therefore, as shown in Table 4, they produce similar parameters. Figures 11 and 12, show the variations on the predictions of weir flow and outflow at an overflowing node for slightly different values of the model parameters. It can be noticed that small variations in these parameters already turn into bad approximations at several time instants. Moreover, due to the network structure, these errors would be propagated and accumulated to all the following downstream sewers. To evaluate the model sensitivity against the variation of the rain intensity, simulations have been performed using a design rain event (DRE). Design rain events are artificially generated rain profiles used for simulation purposes. The specific procedures are developed to meet standard intensities and durations for a given climate and are out of the scope of this work. Table 5 shows the error indices introduced in 16
0 100 200 300 400 500 600 700 0 5 10 15 20 25 30 35 Time (min) Flow (m3/s) Inflow to overflowing node (Rain event 09−10−2002) q93 MOUSE q93 Model 0 100 200 300 400 500 600 700 0 5 10 15 20 25 Time (min) Flow (m3/s) Outflow to overflowing node (Rain event 09−10−2002) q116 MOUSE q116 Model Figure 9: Inflow and outflow at an overflowing node as computed by the presented control model and by MOUSE simulator. 0 100 200 300 400 500 600 700 0 2 4 6 8 10 Time (min) Flow (m3/s) Weir flow (Rain event 09−10−2002) w3 MOUSE w3 Model Figure 10: Weir flow as computed by the presented control model and by MOUSE simulator. Table 4: Values of selected model parameters obtained by the calibration procedure for the different rain events. Episode α33 aw3qmax w3af1qmax f1bf1a138 t138 15-08-2006 0.52 0.82 0.67 1.00 24.5 0.90 0.63 7 17-09-2002 0.53 0.83 0.75 0.97 24.0 0.85 0.71 8 09-10-2002 0.53 0.81 0.58 0.96 24.5 1.00 0.21 7 30-07-2014 0.52 0.84 1.19 1.00 24.5 0.97 0.87 7 Section 5.2 for a DRE which has been scaled with factors 1, 1.5, 2 and 2.5. As expected, the model accuracy decreases as the intensity increases. Figure 13 shows the model approximations and errors with respect to physically-based model simulator data for sewer q139, located at the downstream end of the network, where model error from all previous 17
100 150 200 250 300 0 2 4 6 8 10 Time step (min) Flow (m3/s) w3 MOUSE w3, aw = 0.9 w3, aw = 0.825 w3, aw = 0.7 Figure 11: Detail of the approximation of a weir flow for different values of the parameter aw. The solid grey line shows the flow values as computed using the parameters obtained from the calibration process. 150 200 250 300 350 5 10 15 20 25 30 Time step (min) Flow (m3/s) q116 MOUSE q116, af = 0.975 q116, af = 0.9 q116, af = 0.8 150 200 250 300 350 5 10 15 20 25 30 Time step (min) Flow (m3/s) q116 MOUSE q116, bf = 0.95 q116, bf = 0.8 q116, bf = 0.7 Figure 12: Detail of the approximation of outflow to an overflowing node for different values of parameters afand bf. The solid grey line shows the flow values as computed using the parameters obtained from the calibration process. Table 5: Error indices for a design rain event with several increasing factors. Episode E1hm3 siE2hm3 sits DRE 1 0.073 0.838 480 DRE 1.5 0.096 1.110 480 DRE 2 0.138 1.486 480 DRE 2.5 0.214 2.048 480 elements accumulates. Looking at these approximation results with further detail, it can be noticed that the parts of the simulation events where the error takes its greatest values occur at two specific points. First, at the peak flow instants which are related to the overflow and weir flow threshold parameters qmax wand qmax f. These values are higher for intense rain events where flows reach higher velocities and flow values for a given water level are also higher. Secondly, at the end of the rain event, when a sudden decrease of the flow value occurs. Again, for high intensity events the higher flow velocities lead to shorter delays. In presence 18
of sudden flow changes, the delay accuracy is of capital importance in order to properly approximate the flows. In both situations, proper calibration of the model parameters using rain events of suitable intensities would lead to improved-accuracy approximations. Notice also that when the model is used for real-time control, it is expected that network measurements provided every few minutes are used as initial values for the model, correcting partially the approximation errors. All the simulations and plots shown in this section have been performed without any measurement update. 0 50 100 150 200 250 300 350 400 450 500 0 10 20 30 40 Time (min) Flow (m3/s) Design Rain Event Factor 1.0 q139 MOUSE q139 Model 0 50 100 150 200 250 300 350 400 450 500 −2 −1 0 1 2 3 4 Time (min) Flow Error (m3/s) q139 Error 0 50 100 150 200 250 300 350 400 450 500 0 10 20 30 40 50 Time (min) Flow (m3/s) Design Rain Event Factor 1.5 q139 MOUSE q139 Model 0 50 100 150 200 250 300 350 400 450 500 −5 0 5 10 Time (min) Flow Error (m3/s) q139 Error 0 50 100 150 200 250 300 350 400 450 500 0 20 40 60 Time (min) Flow (m3/s) Design Rain Event Factor 2.0 q139 MOUSE q139 Model 0 50 100 150 200 250 300 350 400 450 500 −5 0 5 10 15 Time (min) Flow Error (m3/s) q139 Error 0 50 100 150 200 250 300 350 400 450 500 0 20 40 60 80 Time (min) Flow (m3/s) Design Rain Event Factor 2.5 q139 MOUSE q139 Model 0 50 100 150 200 250 300 350 400 450 500 −5 0 5 10 15 20 Time (min) Flow Error (m3/s) q139 Error Figure 13: Flow at sewer q139 (as computed by the presented control model and by MOUSE simulator) and approximation error for a design rain event with different increasing factors. 6. Receding Horizon Control Results The RHC strategy described in Section 3.2 has been applied to the case study network with a control interval of tc= 5 time steps and a prediction horizon of H= 30 time steps. The four rain events which were used for model calibration and validation have been simulated with the RHC strategy to achieve the following control objectives: 1. Minimize overflows 2. Minimize CSO discharges 3. Maximize waste water treatment plant (WWTP) usage 19
These objectives are quantified in the following multi-objective cost function: J(X(t)) = γCOF JCOF (X(t)) + γOF JOF (X(t)) + γCSO JCSO(X(t)) + γW W T P JW W T P (X(t)),(10) where JCOF (X(t)) is the overflow of collector q139,JOF (X(t)) contains the sum the rest of the overflow variables at junctions, JCSO (X(t)) contains the sum of flow variables corresponding to the sewers connecting the network to the sea and JW W T P (X(t)) contains the sum of flow variables corresponding to the sewers connecting the network to the WWTP. The model is flexible enough to accommodate control objectives other than the ones proposed in objective function (10), e.g., tracking of a desired filling setpoint in tanks, minimization of CSOs caused by weir flow, prioritization of CSO events at different points of the network, prioritization of the use of different WWTPs, etc. The choice of the terms and weights in (10) reflects the order of importance of these individual control objectives. Moreover, the network topology plays an important role on the way objectives interact with one another and tests must be conducted to correct the weights to compensate individual objective and global objective performances. One possible procedure to determine objective function weights is to perform closedloop simulations using single-goal objective functions. The performance results of these simulations provide a reference for each objective to be compared with the multiple-objective simulation results. Then, starting with a multi-objective function with weights of different orders of magnitude according to the priority of the objectives (normalization factors must also be included if both flows and volumes are involved), closedloop simulation tests can be performed to assess whether the interactions among the different individual objectives cause global performance losses and then correct the weights accordingly. The choice of the weights in (10) for the topology of the case study network has been performed as follows. Notice that the fulfilling of all the proposed control objectives for the case study benefits from low flow rates, which encourage absence of overflows and contribute to not saturating collector q139 at the downstream end of the network, which, in turn, leas to avoiding CSO discharges. Taking into account that the values of the weights are only relevant relative to one another γOF and γCSO are set to 1. Overflows at the collector would be specially dangerous due to high flow rates, therefore γCOF has been set to 10, implying that this collector overflow is prevented possibly by means of allowing overflows to occur elsewhere upstream. Finally, the selected weight for the WWTP term is set to γW W T P =−10−1. The negative sign is used to obtain maximization of this goal (while the others are minimized). Trial and error tests showed that negative weights in the WWTP term of the same order as the CSO ones lead to higher CSO results due to the fact that the negative and positive terms of the two objectives compensated [16]. Table 6 shows the results of the presented control approach and the variations in the objectives compared with the no control results obtained by simulating the rain events with a passive system, i.e. with gates set at fixed positions. Currently, the actual network regulation is performed by expert operators and local control, but no data related to the real management of the network for the considered rain scenarios are available for comparison. The results show that appropriate management of the detention tanks at the upper part of the network can mitigate overflows almost completely (most overflow volume reported in Table 6 corresponds to overflow points upstream of any control action) by reducing the peak flows in the network sewers. The volume stored in the tanks can be later released at adequate flow rates to increase the volume treated in the WWTP. On the other hand, the use of the in-line capacity of sewer q139 results in a reduction of the CSO volumes. Aside from the performance results for the case study network, some relevant aspects of the presented control model are worth mentioning. Firstly, the closed-loop simulation results show that the volumetric physical limits of the tanks and the collector are always respected. Secondly, the setpoints computed by the control model can generally be achieved by the PID controllers implemented in the simulator in the given simulation times. These facts confirm that the flows computed by the model are of suitable accuracy to be used in a RTC context. All optimization problems were solved using CPLEX v12.5 [8] MILP solver with standard settings, available thanks to IBM Academic Initiative [15], on a machine with an Intel Core 2 Duo CPU with 3.33 GHz and 8 GB RAM. Table 7 shows the properties of the optimization problems together with the mean 20
Table 6: RHC results and variations with respect to passive control. Episode Overflow [×103m3] CSO [×103m3] WWTP [×103m3] 17-09-2002 0.16 (-96%) 21.81 (-79%) 164.90 (64%) 09-10-2002 0.90 (-97%) 345.04 (-31%) 257.77 (108%) 15-08-2006 0.25 (-96%) 7.51 (-92%) 149.86 (75%) 30-07-2011 0.75 (-96%) 54.07 (-63%) 159.57 (83%) and maximum computing times of all the problems solved, considering the four simulated events. Table 7: Details of the optimization problem for H= 30. Continuous variables 5850 Discrete variables 780 Equality constraints 5040 Inequality constraints 5400 Mean Solving Time [s] 0.203 Maximum Solving Time [s] 1.170 7. Conclusions and Future Work In this work, a control-oriented model for large scale sewer networks has been developed together with a parameter calibration procedure using data generated by a simulator based on a physically-based model. The model has been applied to the case study of a real network and validation results show that the model predicts the flows accurately. From the general mathematical expression of the model, a simple matrix-based procedure to formulate an Optimal Control Problem has been developed. The Optimal Control Problem has been used in a Receding Horizon Control strategy to minimize flooding and CSO and to maximize WWTP usage in the case study network. The closed-loop control demonstration has been performed using a physically-based model simulator as a virtual reality and results show significant improvements with respect to the passive control strategy. Future research focuses on three major topics: firstly, the development of a better model for big collectors since it is expected that this feature will improve the use of its in-line storage capacity leading to lower CSO discharges and increased WWTP usage. Secondly, the implementation of advanced optimization-based control strategies together with the corresponding optimization techniques. Finally, on-line calibration techniques for model adaptation to a wider range of rain events will be developed. Acknowledgments This work has been partially funded by the EU Project EFFINET (FP7-ICT-2011-8-31855) and the DGR of Generalitat de Catalunya (SAC group Ref. 2009/SGR/1491). The authors are especially grateful for the collaboration of the CLABSA staff in providing the test case, data and expert guidance. [1] Bach, P., W. Rauch, P. Mikkelsen, D. McCarthy, and A. Deletic (2014), A critical review of integrated urban water modelling – Urban drainage and beyond, Environmental Modeling & Software,54, 88–107. [2] Bemporad, A., and M. Morari (1999), Control of systems integrating logic, dynamics, and constraints, Automatica,35(3), 407–427. [3] Butler, D., and M. Sch¨utze (2005), Integrating simulation models with a view to optimal control of urban wastewater systems, Environmental Modelling & Software,20(4), 415–426. [4] Campisano, A., W. Schilling, and C. Modica (2000), Regulators’ setup with application to the Roma–Cecchignola combined sewer system, Urban Water,2, 235–242. [5] Cembrano, G., J. Quevedo, M. Salamero, V. Puig, J. Figueras, and J. Mart´ı (2004), Optimal control of urban drainage systems. A case study, Control Engineering Practice,12(1), 1–9. 21
[6] Chaudhry, M. H. (2008), Open-Channel Flow, Springer, New York. [7] Chow, V. T. (1959), Open-Channel Hydraulics, McGraw-Hill, New York. [8] CPLEXTM (2011), version 12.5 (2012), IBM ILOG, Sunnyvale, California. [9] Darsono, S., and J. Labadie (2007), Neural-optimal control algorithm for real-time regulation of in-line storage in combined sewer systems, Environmental Modelling & Software,22, 1349–1361. [10] Dirckx, G., M. Sch¨utze, S. Kroll, C. Thoeye, G. De Gueldre, and B. Van De Steene (2011), RTC versus static solutions to mitigate CSO’s impact, 12nd International Conference on Urban Drainage, porto Alegre, Brazil. [11] Duchesne, S., A. Mailhot, E. Dequidt, and J.-P. Villeneuve (2001), Mathematical modeling of sewers under surcharge for real time control of combined sewer overflows, Urban Water,3(4), 241–252. [12] Duchesne, S., A. Mailhot, and J.-P. Villeneuve (2003), Predictive real time control of surcharged interceptors: impact of several control parameters, Journal of the American Water Resources Association,39(1), 125–135. [13] Gelormino, M., and N. Ricker (1994), Model-predictive control of a combined sewer system, Int. J. Control,59(3), 793–816. [14] Heemels, W. P. M. H., B. De Schutter, and A. Bemporad (2001), Equivalence of hybrid dynamical models, Automatica, 37(7), 1085–1091. [15] IBM ILOG (2013), IBM Academic Initiative, http://www.ibm.com/academicinitiative. [16] Joseph-Duran, B., C. Ocampo-Martinez, and G. Cembrano (2013), Receding horizon control of hybrid linear delayed systems: Application to sewer networks, IEEE Conference on Decision and Control, firenze, Italy. [17] Joseph-Duran, B., C. Ocampo-Martinez, and G. Cembrano (2013), A control-oriented hybrid modelling approach for sewer networks: Barcelona case study, IWA Conference on Instrumentation, Automation and Control, narbonne, France. [18] Joseph-Duran, B., C. Ocampo-Martinez, and G. Cembrano (2013), Hybrid Linear Sewer Network Modeling,Tech. Rep. IRI-TR-09-07, Institut de Rob`otica i Inform`atica Industrial, CSIC-UPC, http://www.iri.upc.edu/download/scidoc/ 1413. [19] Joseph-Duran, B., M. Jung, C. Ocampo-Martinez, S. Sager, and G. Cembrano (2014), Minimization of sewage network overflow, Water Resources Management,28(1), 41–63. [20] Litrico, X., and V. Fromion (2009), Modelling and Control of Hydrosystems, Springer, London. [21] Malaterre, P.-O., and J.-P. Baume (1998), Modeling and regulation of irrigation canals: existing applications and ongoing researches, in Systems, Man, and Cybernetics, 1998. 1998 IEEE International Conference on, vol. 4, pp. 3850–3855, IEEE. [22] Marinaki, M., and Papageorgiou (1998), Nonlinear optimal flow control for sewer networks, Proc. American Control Conference,2, 1289–1293. [23] Marinaki, M., and M. Papageorgiou (2005), Optimal Real-time Control of Sewer Networks, Springer, London. [24] Meirlaen, J., B. Huyghebaert, L. Benedetti, and P. Vanrolleghem (2001), Fast, simultaneous simulation of the integrated urban wastewater system using mechanistic surrogate models, Water Science and Technology,43(7), 301–309. [25] Meirlaen, J., J. Van Assel, and P. Vanrolleghem (2002), Real time control of the integrated urban wastewater system using simultaneously surrogate models, Water Science and Technology,45(3), 109–116. [26] MOUSE (2007), MOUSE Surface Runoff Models, DHI Software. [27] MOUSE (2007), MOUSE User Guide, DHI Software. [28] Ocampo-Mart´ınez, C. (2011), Model predictive control of wastewater systems, Advances in industrial control, Springer, London. [29] Ocampo-Mart´ınez, C., A. Bemporad, A. Ingimundarson, and V. Puig (2007), On hybrid model predictive control of sewer networks, in Identification and Control: The Gap between Theory and Practice, chap. 4, pp. 87–114, Springer London. [30] Ocampo-Mart´ınez, C., V. Puig, G. Cembrano, and J. Quevedo (2013), Application of predictive control strategies to the management of complex networks in the urban water cycle [applications of control], IEEE Control Systems,33(1), 15–41. [31] Pleau, M., H. Colas, P. Lavall´ee, G. Pelletier, and R. Bonin (2005), Global optimal real-time control of the Quebec urban drainage system, Environmental Modelling & Software,20(4), 401–413. [32] Puig, V., G. Cembrano, J. Romera, J. Quevedo, B. Aznar, G. Ram´on, and J. Cabot (2009), Predictive optimal control of sewer networks using CORAL tool: application to Riera Blanca catchment in Barcelona, Water Science and Technology, 60(4), 869–878. [33] Rauch, W., and P. Harrem¨oes (1999), Genetic algorithms in real time control applied to minimize transient pollution from urban wastewater systems, Water Resources,33(5), 1265–1277. [34] Rauch, W., and P. Harrem¨oes (1999), On the potential of genetic algorithms in urban drainage modeling, Urban Water, 1(1), 79–89. [35] Rauch, W., J.-L. Bertrand-Krajewski, P. Krebs, O. Mark, W. Schilling, M. Sch¨utze, and P. Vanrolleghem (2002), Mathematical modelling of integrated urban drainage systems, Water science and technology,45(3), 81–94. [36] Sch¨utze, M., D. Butler, and M. Beck (2002), Modelling, Simulation and Control of Urban Wastewater Systems, Springer, London. [37] Schwanenberg, D., G. Verhoeven, and L. Raso (2010), Nonlinear model predictive control of water resources systems in operational flood forecasting, 55th Internationales Wessenchaftliches Kolloquium. [38] Sch¨utze, M., A. Campisano, H. Colas, W. Schilling, and P. Vanrolleghem (2004), Real time control of urban wastewater systems - where do we stand today?, Journal of Hydrology,299(3–4), 335–348. [39] Vanrolleghem, P., L. Benedetti, and J. Meirlaen (2005), Modelling and real-time control of the integrated urban wastewater system, Environmental Modelling & Software,20(4), 427–442. [40] Vezzaro, L., and M. Grum (2014), A generalised dynamic overflow risk assessment (DORA) for real time control of urban drainage systems, Journal of Hydrology,515(0), 292 – 303. 22