Simulation Methodology with Control Approach for Water ...

9
Simulation Methodology with Control Approach for Water Distribution Networks Diego Ricardo Diaz Vela, Research Group, Aplicabilidad Tecnologica, Manuela Beltran University Abstract—This work presents and tests a simulation methodology for water distribution networks, developed as a simulation platform for dynamic pressure control purposes. The three model integra- tion presented by Diaz y Quijano in 2012 is extended here as a general methodology including the Extended Period Simulation Global Gradient Algorithm proposed by Todini in 2000, the dynamic Pressure Reducing Valves model presented by Ulaniki in 1999 and the Stochastic Demand Model presented by Garcia in 1999. All these models are properly described and included in a general algorithm that solves all node pressure signals and pipe flow signals in a water distribution network under a dynamic scenario. This methodology is qualitatively tested in a simplified two variable tank network presented by Todini in 2000, showing satisfactory results. Keywords—Distribution, EPS.GGA, Modeling, Network, Simula- tion, Water. I. I NTRODUCTION W ATER volume losses in Water Distribution Networks (WDN) represent a serious problem for provider com- panies. In some cases they could be near to 65% [1], [2]. The main cause of these losses is leakage in pipes, which is a pressure dependent variable. A strategy to reduce leakage in the WDN is to regulate pressure over the entire network using a control system [3]. This system has to maintain a certain pressure level for each node in the network under all the operation conditions (variable demand, disturbances, etc). There are different approaches for the control problem in WDN. Most of them includes optimal control techniques such as: [4] who use the WATERNET solver, [5] who solve the system using Linear Theory Method (LTM) based on loop equations, [1] who assume steady state conditions, , [6] that bases it formulation on LTM, [7] who use non-linear program- ming and LTM and [8] who support the solution of its model in EPANET. Other approaches consider hierarchical control [9], [10], robust control [11] that considers hydraulic models with non linear coupling, adaptive control [12] which includes modeling by identification, population dynamics based control [13], [14] and real-time control for wastewater systems [15]. Despite all these approaches contribute to the WDN control problem, many of them assume static conditions in their solvers (without dynamics) and present different tests with a maximum resolution of 1 hour. In order to develop a pressure control technique that considers the dynamics of the network in high resolution (in terms of seconds) it is necessary first D. Diaz is with the Research Group Aplicabilidad Tecno- logica, Manuela Beltran University, Bogota, Colombia e-mail: [email protected]. Manuscript received May 19, 2014; revised June. to proposed a preliminary stage where the WDN can be modeled and properly simulated (focus of this paper). Taking into account these items, it is important to have a simulation system capable of: 1) Dynamically 1 modelling the changes in the network. 2) Considering valves as time-varying actuators (not as static devices) 2 . 3) Managing a great quantity of variables. There are various software that provide a simulation plat- form for WDN like EPANET [16], [17], WaterGems [18] and MIKE [19]. All of them are based in the Global Gradient Algorithm (GGA) [20] to solve the hydraulic model. Despite this is a powerful algorithm, it decouples the steady-state analysis from the mass balance analysis at fixed times. This feature limits the application of the algorithm to networks with none variable storage devices (otherwise the system can reach a unsteady solution [20]). On the other hand, the valves included in many of these software are considered as static parameters, not as devices with variable setting (typically, valves are the actuators of pressure control systems, and have to be considered as variable devices). In order to reduce the water volume losses in a WDN using pressure control systems, none of the simulation software presented above seems appropriate. In a water distribution network, the presence of variable storage devices induces considerable dynamical changes that the controller has to take into account to accomplish the control goal. Also, it is required the time-varying manipulation of valves parameters. As the controller has to be designed and evaluated first in simulation, it is necessary the implementation of a specific control oriented WDN simulation methodology that includes variable tanks. In this paper, such simulation methodology is presented based on the integration of three different models: The Extended Period Simulation Global Gradient Algorithm (EPS-GGA) [20], the pressure reducing valve model developed by [3] and the stochastic network user demand model proposed by [21]. The integration of these three models and its extension to a general methodology are based on [22] where a specific two loops network with no variable storage devices was modeled with control purposes. The remainder of this paper is organized as follows. Section II; Water Distribution Model, section III; Dynamic WDN Simulation Algorithm, section IV; Results and Discussion: 1 Here dynamical makes reference to changes caused by variations in demand and water storage. It is not consider instantaneous changes as the water-hammer phenomena. 2 For pressure control purposes the valves in the system are consider actuators. Advances in Environmental Sciences, Development and Chemistry ISBN: 978-1-61804-239-2 37

Transcript of Simulation Methodology with Control Approach for Water ...

Page 1: Simulation Methodology with Control Approach for Water ...

Simulation Methodology with Control Approachfor Water Distribution Networks

Diego Ricardo Diaz Vela, Research Group, Aplicabilidad Tecnologica, Manuela Beltran University

Abstract—This work presents and tests a simulation methodologyfor water distribution networks, developed as a simulation platformfor dynamic pressure control purposes. The three model integra-tion presented by Diaz y Quijano in 2012 is extended here asa general methodology including the Extended Period SimulationGlobal Gradient Algorithm proposed by Todini in 2000, the dynamicPressure Reducing Valves model presented by Ulaniki in 1999 andthe Stochastic Demand Model presented by Garcia in 1999. All thesemodels are properly described and included in a general algorithmthat solves all node pressure signals and pipe flow signals in a waterdistribution network under a dynamic scenario. This methodologyis qualitatively tested in a simplified two variable tank networkpresented by Todini in 2000, showing satisfactory results.

Keywords—Distribution, EPS.GGA, Modeling, Network, Simula-tion, Water.

I. INTRODUCTION

WATER volume losses in Water Distribution Networks(WDN) represent a serious problem for provider com-

panies. In some cases they could be near to 65% [1], [2].The main cause of these losses is leakage in pipes, which isa pressure dependent variable. A strategy to reduce leakagein the WDN is to regulate pressure over the entire networkusing a control system [3]. This system has to maintain acertain pressure level for each node in the network under allthe operation conditions (variable demand, disturbances, etc).

There are different approaches for the control problem inWDN. Most of them includes optimal control techniques suchas: [4] who use the WATERNET solver, [5] who solve thesystem using Linear Theory Method (LTM) based on loopequations, [1] who assume steady state conditions, , [6] thatbases it formulation on LTM, [7] who use non-linear program-ming and LTM and [8] who support the solution of its modelin EPANET. Other approaches consider hierarchical control[9], [10], robust control [11] that considers hydraulic modelswith non linear coupling, adaptive control [12] which includesmodeling by identification, population dynamics based control[13], [14] and real-time control for wastewater systems [15].

Despite all these approaches contribute to the WDN controlproblem, many of them assume static conditions in theirsolvers (without dynamics) and present different tests with amaximum resolution of 1 hour. In order to develop a pressurecontrol technique that considers the dynamics of the networkin high resolution (in terms of seconds) it is necessary first

D. Diaz is with the Research Group Aplicabilidad Tecno-logica, Manuela Beltran University, Bogota, Colombia e-mail:[email protected].

Manuscript received May 19, 2014; revised June.

to proposed a preliminary stage where the WDN can bemodeled and properly simulated (focus of this paper). Takinginto account these items, it is important to have a simulationsystem capable of:

1) Dynamically1 modelling the changes in the network.2) Considering valves as time-varying actuators (not as

static devices)2.3) Managing a great quantity of variables.There are various software that provide a simulation plat-

form for WDN like EPANET [16], [17], WaterGems [18] andMIKE [19]. All of them are based in the Global GradientAlgorithm (GGA) [20] to solve the hydraulic model. Despitethis is a powerful algorithm, it decouples the steady-stateanalysis from the mass balance analysis at fixed times. Thisfeature limits the application of the algorithm to networkswith none variable storage devices (otherwise the system canreach a unsteady solution [20]). On the other hand, the valvesincluded in many of these software are considered as staticparameters, not as devices with variable setting (typically,valves are the actuators of pressure control systems, and haveto be considered as variable devices).

In order to reduce the water volume losses in a WDN usingpressure control systems, none of the simulation softwarepresented above seems appropriate. In a water distributionnetwork, the presence of variable storage devices inducesconsiderable dynamical changes that the controller has to takeinto account to accomplish the control goal. Also, it is requiredthe time-varying manipulation of valves parameters.

As the controller has to be designed and evaluated first insimulation, it is necessary the implementation of a specificcontrol oriented WDN simulation methodology that includesvariable tanks. In this paper, such simulation methodology ispresented based on the integration of three different models:The Extended Period Simulation Global Gradient Algorithm(EPS-GGA) [20], the pressure reducing valve model developedby [3] and the stochastic network user demand model proposedby [21]. The integration of these three models and its extensionto a general methodology are based on [22] where a specifictwo loops network with no variable storage devices wasmodeled with control purposes.

The remainder of this paper is organized as follows. SectionII; Water Distribution Model, section III; Dynamic WDNSimulation Algorithm, section IV; Results and Discussion:

1Here dynamical makes reference to changes caused by variations indemand and water storage. It is not consider instantaneous changes as thewater-hammer phenomena.

2For pressure control purposes the valves in the system are consideractuators.

Advances in Environmental Sciences, Development and Chemistry

ISBN: 978-1-61804-239-2 37

Page 2: Simulation Methodology with Control Approach for Water ...

Simulation Methodology Test, section V; Conclusion andsection VI; Future Work.

II. METHODS: WATER DISTRIBUTION MODEL

The main purpose of a WDN is to deliver drinkable waterfrom one or several main reservoirs to the final users whocan be spread over different rural and urban area. Usuallythe reservoirs are located in high places and distribute waterby gravity to the users located in lower areas. The water isdistributed using a pipe network where each node is consideredas a demand point that aggregates the user’s demand near toit.

During distribution, water looses energy mainly becausefriction within the internals walls of the pipes and also loosesmass caused by leakage. The energy loss can be interpreted asa pressure loss which is proportional to the flow in the pipe.Hence, the higher the nodal demands are, the higher flow andpressure losses in the pipes are.

The WDN considered here includes reservoirs (fixed storagedevices), tanks (variable storage devices), pipes and pressurereducing valves 3 (PRV). The simple nodes are consideredas demand nodes that follow certain pattern according to thelocation and the activity developed for the population in thearea.

The following subsections, the WDN model is described,followed by the valve type and model, and the nodal demandmodel. Finally all these models are integrated into a completeWDN model.

A. Water Distribution Network Model

In order to model the dynamical behavior of the WDN, twomain equations are used: energy balance and mass balance[20]. The energy balance equation defines the energy lossesinside a pipe as pressure losses. The mass balance equationmodels the volume of water storage at each node dependingon the inflow and outflow. Each equation is presented asfollows:

1) Energy Balance Equation: The balance of energy in aWDN is associated to the pressure difference between twoconnected nodes. This connection is made by an ij pipe,where the flow inside is directed from node j to node i. Thetransported water looses energy mainly because friction withinthe internals walls of the pipe. The higher the flow the higherthe pressure loss. According to [20] this pressure loss insidethe pipe can be expressed as the pressure difference betweenij nodes, as follows:

∂Hij

∂x= ∆Hij = Hi −Hj = −Kij |Qij |np−1Qij (1)

where ∆Hij corresponds to the pressure difference betweennodes i and j, Qij identifies the flow of the ij pipe, Kij isthe resistant coefficient of the ij pipe, and np is the flowexponent. The parameters Kij and np depend on the equation

3This type of valve looses certain quantity of pressure according to a pilotscrew reference. This characteristic is useful for the pressure control purposeswanted here.

(a) Scheme of a Pressure Reducing Valve(PRV). Sagittal cut.

(b) Stochastic Demand Scheme.

Fig. 2. WDN subsystems.

selected to describe the friction inside the pipe. In [20], theempiric Hazen-Williams equation was used, but here thephysics based Darcy-Weisbach equation is selected. This lastequation depends only on physics parameters of pipes andwater [23]. The calculation of the Kij parameter is describedin appendix A.

2) Mass Balance Equation: The second differential equa-tion used to model the WDN correspond to the mass balance[20]. This equation express the rate of storage water volumein a tank during a period, as the difference between inflowand outflow. It is defined as follows,

∂Vi

∂t=

ni∑k

Qik + qi (2)

In this equation i represents the node were the tank isconnected and k refers all others nodes connected to the tanknode i. Vi corresponds to the volume of water storage in thetank, Qik represents the flow4 in the pipe that connect nodesi and k. The parameter ni is the number of nodes connectedto the tank node i. Finally qi corresponds to the flow demandin the node tank. Here, demand is a flow that leaves the node,then it is considered negative.

According to [20] the change in volume of Equation (2) canbe expressed as a function of the transversal area of the tankand the change in high (denoted as Ωi(Hi)). Then Eq. 2 canbe rewritten as follows:

Ωi(Hi)∂Hi

∂t=

ni∑k

Qik + qi (3)

This last equation is particularly useful modeling a consump-tion node5 or cylindrical tanks. For the first case it is onlynecessary to assume Ωi = 0. In the second case the Ωi

function is constant equal to the transversal area AT .

B. Valve Model

A complete WDN model includes different kind of compo-nents such as valves, pumps, etc. The simulation methodologypresented here is intended to be used in a pressure control

4Flow that leaves the node is considered negative while flow that arrivesto the node is considered positive.

5Consumption node is a node without tank.

Advances in Environmental Sciences, Development and Chemistry

ISBN: 978-1-61804-239-2 38

Page 3: Simulation Methodology with Control Approach for Water ...

(a) Water distribution network example. (b) Pressure variation for one pipe including apressure reducing valve.

Fig. 1. Water Distribution System.

scheme where the pressure excess is reduced using PressureReducing Valves (PRV). For that reason, this model considersPRV as the only type of valve in the system.

The PRV dynamic proposed here is based on the behavioralmodel presented in [3]. The basic function of a PRV (Figure2(a)) is to regulate output pressure hout despite changes at theinput pressure hin, modifying the valve opening xm accordingto a pilot screw reference. The pressure regulation responds toan exponential behavior and it is expressed here as follows,

∂xm

∂t=

αopen(xmset − xm) ∂xm

∂t ≥ 0

αclose(xmset − xm) ∂xm

∂t < 0(4)

where xmset represents the desired opening associated to the

desired output pressure houtset and xm is the real opening

associated to the real output pressure hout. Here, the valveopening stop changing when the desired value and real valueare the same. The valve responds at different speeds dependingon the action (open or close) which are respectively associatedto the servo-valve speed parameters αopen and αclose.

The main flow qm depends on the pressure differencebetween input and output, and is expressed as follows,

qm = Cv(xm)√

hin − hout (5)

The bigger the difference between hin and hout, the biggerthe flow. Note that hin must be greater than hout in orderto obtain real values (the PRV is a passive device that onlylosses energy). Finally, the term Cv(·) is called the capacityfunction of the valve and it depends on the real opening xm

only. This function varies from valve to valve and dependson physical characteristics of each device.

1) Valve Opening Consideration: For simulation simplicitya main assumption is made in the valve model. The openingvalve xm is expressed here as a percentage of its maximumdisplacement Xm, then the PRV opening is manipulatedthrough the variable γ as follows,

xm = γXm ∀γ : 0 ≤ γ ≤ 1 (6)

It is important to remember that this simulation methodology isintended to be use in a pressure control scheme, then Equation

(6) allows the controller to use one single scale for all openingsvalves in the network despite their different sizes. Therefore,the complete valve model can be rewritten as,

∂γ

∂t=

αopen(γset − γ) ∂γ

∂t ≥ 0

αclose(γset − γ) ∂γ

∂t < 0

(7)

qm = Cv(γXm)√

hin − hout (8)

C. Users Demand Model

The users demand is modeled node by node, where all userslocated in the same area are aggregated as one and associatedto a specific node. Depending on the location and the activityof the users it is possible to model certain behavior patternfor each demand node. Typically, this pattern is constructed inperiods of 24 hours.

The simulation methodology proposed here considers theusers demand qi as a known flow that leaves the i node (seeEquation (3)). Here the value of variable qi responds to astochastic model proposed in [21]. It is important to note that,despite the selection made here, others demand models can beincluded as well.

The stochastic approach incorporated in this methodologyconsiders consumption as an aggregate signal of many demandevents. Each event obeys to certain probabilistic distributionand it is characterized by 3 parameters: occurrence time τi,duration time Ti and intensity Ii (see Figure 2(b)). Thisdemand model can be expressed for a j node in terms ofvolume as follows,

Vj =

Cj∑i=1

Ti(τi)Ii(τi) (9)

where Cj corresponds to the number of demand events forthe j node. The variable Ti and Ii depend on the occurrencetime τi and responds to exponential distribution and a Weibulldistribution respectively. The occurrence time τi correspondsto a non-homogeneous poisson process with a rate of occur-rence λj(t) defined as follows,

Advances in Environmental Sciences, Development and Chemistry

ISBN: 978-1-61804-239-2 39

Page 4: Simulation Methodology with Control Approach for Water ...

λj(t) = Cjg(t) + ε(t) (10)

where g(t) is the unit time pattern during a entire day6, andε(t) is a random term with zero average and standard deviationσr. According to [21] the function g(t) must satisfy,∫ 24

0

g(t)dt = 1 (11)

D. Integrated WDN ModelThe integration of models introduced in section II-A, II-B

and II-C is presented here. Basically, the complete modelincludes one mass equation for each node, one modifiedenergy equation for each pipe, and one PRV dynamic equationfor each valve. Also, there is one demand equation for eachnode according to the associated demand pattern.

1) Modified Energy Equation: As the PRV is a passivedevice that losses energy, it has to be included in the energyequation. According to this, PRV flow Equation (8) can berewritten as follows,

hin − hout =qm|qm|

[Cv(γXm)]2(12)

This formulation is conveniently presented as a pressuredifference between the input and output and can be associatedto the pressure losses by the PRV. Then, it can be included inthe ij pipe energy Equation (1) as follows,

∂Hij

∂x= ∆Hij = Hi −Hj =

−Kij |Qij |np−1Qij −(

|Qij |Qij

[Cv(γijXmij)]2

)(13)

where pressure difference between ij nodes corresponds to thesum of the pressure losses caused by friction inside the pipeand the controlled pressure losses caused by the PRV. As thefriction coefficient Kij is calculated using the Darcy-Weisbachequation, then np parameter is 2.

There are two important physical considerations about thePRV model presented here. First, not all pipes in the networkhas installed a PRV and second a typically PRV does not workwith reverse flow. Both cases are detailed next:

For the first case a Ponij parameter is included, where

Ponij =

1, ij pipe with PRV.0, ij pipe without PRV.

(14)

For the second case, if hin − hout < 0 (reverse flowcondition), the valve could operate in two forms dependingon the valve type: it can block itself or bypass the water.The blocking case implies a disconnection of the ij pipe anda change of the network topology. The bypassing case justimplies that the PRV has no effect on reverse flow. As a firstapproach, this work considers the bypassing case only7 usinga Bij parameter as follows,

6Associated to the typical 24 hours simulation time.7The blocking case where the network topology change is proposed as

future work.

Bij =

1, Qij ≥ 00, Qij < 0

(15)

It is important to note that the condition Qij ≥ 0 impliesthat the PRV is installed in the same direction as the pipe(from node j to node i).

Finally, including the np value and the physical considera-tions Equation (13) can be rewritten as follows,

∂Hij

∂x= ∆Hij = Hi −Hj =

−(Kij +

PonijBij

[Cv(γijXmij)]2

)|Qij |Qij (16)

Note that the PRV losses term in Equation(16) dependson the valve opening γij which responds to a exponentialbehavior given by Equation(7).

2) Complete WDN Model: Summarizing, the completemodel of Water Distribution System introduced in this workis given by:

∆Hij = −(Kij +

PonijBij

[Cv(γijXmij)]2

)|Qij |Qij (17)

Bij =

1 Qij ≥ 00 Qij < 0

(18)

Ponij =

1, ij pipe with PRV.0, ij pipe without PRV.

(19)

∂Vi

∂t= Ωi(Hi)

∂Hi

∂t=

ni∑k

Qik + qi (20)

Ωi(Hi) = ATi (21)

qi = Demand profile (22)

∂γij∂t

=

αopenij(γij

set − γij)∂γij

∂t ≥ 0

αcloseij(γij

set − γij)∂γij

∂t < 0

(23)

Equation (17) represent a differential equation expressed asthe pressure difference between two ij nodes. It represent theenergy losses caused by internal friction inside the ij pipeand the controlled pressure losses caused by the installedij PRV. There is one equation for each ij pipe. Equation(18) and (19) denote the configuration parameters for the ijpipes with a PRV installed. Bij considers the reverse flowcase. Pon

ij activates the PRV term in Equation (17). On theother hand, Equation (20) represents the mass balance foreach i node expressed in terms of its pressure Hi. It alsoincludes the demand flow qi as a negative flow that leaves thenode. Equation (22) models the flow demand for each i node.Finally, Equation (23) is a differential equation that models theexponential behavior of the PRV opening γij , which modifiesthe pressure losses in Equation (17). There is one equation foreach PRV.

III. DYNAMIC WDN SIMULATION ALGORITHM

The WDN model proposed in this work is intended to besimulated using the EPS-GGA algorithm proposed by Todini[20]. This algorithm is an improved version of the GGA

Advances in Environmental Sciences, Development and Chemistry

ISBN: 978-1-61804-239-2 40

Page 5: Simulation Methodology with Control Approach for Water ...

algorithm used in many water system simulation software likeEpanet [16], [17]. The EPS GGA solves the unsteady conditiongenerated by GGA in networks scenarios with variable storagedevices (variable tanks) [20]. As those variable tanks inducenotorious changes in network dynamic, it is necessary to havean algorithm capable of solving the WDN model under thiscircumstances. For this reason, the EPS-GGA algorithm isselected here as the simulation hydraulic engine.

It is important to note that the WDN model presented hereand the EPS GGA, have some assumption with respect toinertial effects and rapid dynamic changes [20]. Despite thismodel is useful solving a time varying WDN scenario, itconsiders a slow-time varying conditions such as relative slowchanges in demand and water storage accumulation. Hence,this model is not capable to solve water-hammer phenomena.

A. EPS-GGA consideration

In this work, the EPS GGA algorithm is implemented sameas proposed in [20]. The only modification corresponds to thenT × nT time varying diagonal matrix At

11 associated to theenergy balance equation (17) as follows,

At11(r, r) =

(Kr +

PonrBr

[Cv(γrXmr)]2

)|Qr| (24)

where nT corresponds to the number of pipes and r =1, . . . , nT . In this formulation, each ij pipe is renamedas r. It is important to note that, different as [20], thismatrix depends on the friction inside the pipe and pressurelosses associated to the installed PRV which responds to anexponential behavior.

B. ALGORITHM DESCRIPTION

The simulation methodology introduced here is resumed inthe algorithm description presented as follows.

Algorithm 1 Pressure Control Oriented WDN AlgorithmRequire: Definition of simulation length Ts and delta time

∆T .Require: Preset file with the physical description of the

network and valves γset(if needed).Require: Preset file with the demand profile q for all nodes.

1: k = 12: qk ← Demand values for all nodes at iteration k

loaded from file.3: [Hk, Qk]← Initial values loaded from file.4: γk ← Initial values loaded from file.5: for k = 2 to round(Ts/∆T ) do6: qk ← Demand values for all nodes at iteration k

loaded from file.7: [Hk, Qk]← EPS.GGA

′(qk, qk−1,Qk−1, Hk−1,γk−1).

8: γk ← PRVopening(γk−1, γkset, γk−1set, αopen,

αclose)9: end for

The algorithm requires pre-computed information beforeit starts calculating network pressure H and flow Q. Thephysical description of the network such as location, tanks,

Node parametersi Number of node.

easti East location coordinate (m).northi North location coordinate (m).elvi Node elevation (m).tti Type of node (0-Reservoir, 1-Var Tank, 2-No Tank).AT

i Tank area (if needed)(m2).Ho

i Initial pressure.qmax

i Maximum demand (m3/s).Pipe parameters

r Number of pipe.j Tail node.i Head node.

dij Pipe diameter (m).Apij Pipe transversal area (m2).lij Pipe length (m).ksij Pipe roughness coefficient (m).kmij Minor losses (m).Qo

ij Initial Flow (m3/s).PRVon

ij Enable PRV (boolean).αopen

ij Opening PRV parameter.αclose

ij Closing PRV parameter.

TABLE IREQUIRED PARAMETERS TO MODEL THE WDN.

pipes, valves, etc are preset in an external file (see table I).This information is saved in a preset file in order to initializethe algorithm. There is one set of parameters for each nodeand each pipe. The location parameters easti, northi and elviare for 3D representation purposes only. For fixed reservoirsthe parameter Ho

i corresponds to the fixed water level.The demand profile for each node is also pre-computed,

according to the demand model presented in section II-C andadjusted for the simulation length Ts and delta time ∆T .

Once all pre-computed information is available, the algo-rithm loads the initial values of demand q (Equation 22),PRV real opening γ, pressure H and flow Q corresponding toiteration k = 1. From iteration k = 2 onwards, the algorithmcalculates iteratively Hk and Qk solving the system expressedin Equations (17) to (20) using the modified EPS GGA

algorithm described in section III-A. For this calculation itis required all network physics parameters loaded from fileand the values of pressure Hk−1, flow Qk−1, demand qk,qk−1 and valve opening γk−1, described in line 7 of algorithmdescription.

Next, the real PRV opening γ is calculated according toEquation (23), where the exponential dynamic behavior isdescribed. The variable γk depends on the past value γk−1,the desired opening γk

set and γk−1set, the physics parameters

of the valve αopen/close and the valve capacity function C(·).This last function is assumed as a part of the PRVopening

function described in line 8.Finally, the iterative process from line 6 to 8 in the algo-

rithm description is repeated round(Ts/δT ) times, solving allpressure level H and flows Q.

IV. RESULTS AND DISCUSSION: SIMULATIONMETHODOLOGY TEST

In order to test the simulation methodology developed here,three main simulation scenarios are proposed. All of this

Advances in Environmental Sciences, Development and Chemistry

ISBN: 978-1-61804-239-2 41

Page 6: Simulation Methodology with Control Approach for Water ...

(a) Network topology for scenarios 1 and 3. (b) Network topology for scenario2. (c) Network topology for scenario 4.

Fig. 3. Test Networks.

i 1 2 3 uniteasti 50 0 100 mnorthi 0 86.6 86.6 melvi 0 0 0 mtti 0 1 1AT

i 0 9.79 9.79 m2

Hoi 0 20 30 m

qmaxi 0 0 0 m3/s

TABLE IINODE PARAMETERS OF THE TEST NETWORK.

scenarios are based in the 2 variable tanks network proposedby Todini in [20] where the original EPS-GGA algorithm waspresented. As this algorithm is relatively new and is also thecore of the simulation engine used here, it is necessary to testit in a reference scenario for performance comparison.

The first scenario replies the results presented in [20] butusing a Darcy-Weisbach resistant coefficient Kij as presentedin section II-A2. The second scenario is an extension of thefirst one and is intended to test a PRV inclusion in the samenetwork. Same as second one, third scenario is an extension ofthe first scenario but including a stochastic demand scheme aspresented in section II-C. Finally, the fourth scenario integratesthe three presented models.

A. First Scenario: Two Variable Tank Test

This test replies the simulation scenario presented in [20]where two interconnected variable tanks are emptying througha third open node (see Figure 3(a)). The tanks 1 and 2 areset to a initial water level of 30m and 20m respectively.Qualitatively, it is expected an initial flow in pipe 1 from tank1 to tank 2. After both tanks reach the same level, the flowin pipe 1 will stop and both tanks start to be emptied at thesame rate through pipes 2 and 3. In this scenario all nodedemands are set to zero. The parameters of the test networkare presented in Tables II and III. Pressure and flow resultsare presented in Figures 4(a) and 4(b).

Different as [20], the resistant coefficient Kij is calculatedhere using the Darcy-Weisbach physic based equation. Despitethis change, the flow and pressure results are very similar tothe ones presented in [20] and are consistent with the expectedqualitatively behavior. In both cases, during the first 15min the

r 1 2 3 unitj 2 2 3i 3 1 1

dij 0.2 0.1 0.1 mApij 31.4×10−3 7.9×10−3 7.9×10−3 m2

lij 100 100 100 mksij 1×10−4 1×10−4 1×10−4 mkmij 0 0 0 mQo

ij 150×10−3 35×10−3 45×10−3 m3/s

PRV ijon 0 0 0

αopenij 0 0 0

αcloseij 0 0 0

TABLE IIIPIPE PARAMETERS OF THE TEST NETWORK.

0 0.5 1 1.5 2 2.5 3 3.5 4−5

0

5

10

15

20

25

30

time (h)

Hea

d (m

)

H2H3

(a) Pressure results.

0 0.5 1 1.5 2 2.5 3 3.5 4−150

−100

−50

0

50

time (h)

Flo

w (

L/s)

Pipe 1Pipe 2Pipe 3

(b) Flow results.

Fig. 4. First Simulation Scenario. ∆t = 60s

tank 3 supplies tank 2 trough pipe 1 (which has a negative flowaccording to the tail-nail definition). After this, tanks pressurelevel are equaled where tank 2 reach a maximum of 23m andflow 1 decrease to zero. Next, both tanks are emptied by pipes2 and 3 at exponential rate during 4 hours approximately.

B. Second Scenario: PRV Test

The second simulation scenario is an extension of the firstscenario including a PRV installed in the middle of pipe 2.In this case it is assumed a valve with a servo-speed constantαopen/close = 1× 10−3 and a maximum opening Xm of 70%of the pipe diameter8. Capacity function of the PRV is based inthe one presented in [3] and assumed as Cv(γ) = 0.45γXm.

8A completely opened PRV does not have a pressure loss equal to zero.There is a bias losses and here are represented as a percentage of maximumopen, which is less than the pipe diameter.

Advances in Environmental Sciences, Development and Chemistry

ISBN: 978-1-61804-239-2 42

Page 7: Simulation Methodology with Control Approach for Water ...

0 1 2 3 4 5 6−5

0

5

10

15

20

25

30

time (h)

Hea

d (m

)

H2H3

(a) Pressure results.

0 1 2 3 4 5 6−150

−100

−50

0

50

time (h)

Flo

w (

L/s)

Pipe 1Pipe 2Pipe 3

(b) Flow results.

0 1 2 3 4 5 60

0.2

0.4

0.6

0.8

1

time (h)

Ope

nnin

g (%

)

γ21

set

γ21

(c) PRV opening.

Fig. 5. Second Simulation Scenario. ∆t = 60s.

Pressure, flow and PRV results are respectively presented inFigures 5(a), 5(b) and 5(c).

Initially, the valve starts open at maximum, which meansminimal pressure loss and opening signal γset = 1. After thefirst hour the reference opening signal decreases linearly to aminimal value γset = 0.001 and maintains during the rest ofsimulation. As is expected, the real opening signal γ shows thedynamic exponential response of the valve (see Figure 5(c)).The value γset = 0.001 corresponds to a maximum pressureloss, which means an almost closed valve. In this case, theflow through the pipe 2 should be minimum near to zero (as ispresented in Figure 5(c)). When the real PRV opening γ reachits minimum (approximately at 3 hours), tank 2 is practicallydisconnected from node 1, and the system can only be emptiedthrough pipe 3. At this point, tank 2 supplies tank 3 using theconnection pipe 1 (which has now a positive flow accordingto the tail-nail definition). As is qualitatively expected, bothtanks empty their content with the same pressure level, takingmore time than first scenario (2 more hours).

C. Third Scenario: Demand Model TestThe third simulation scenario is based on the first scenario

but including a flow demand profile in node 3. The demandprofile is built using model of section II-C using parameterspresented in table IV.

These parameters are based in real data taken from a resi-dential area in Valencia-Spain, presented in [21] and properlyscaled to the simulation network used here. The demand profilepresents an increasing behavior from 15 mins to 1.3 hoursapproximately, then during 1 hour decreases until zero. Thesignal presents 4 notable peaks at 0.7 hour, 0.9 hour, 1.3 hourand 1.7 hour. The maximum demand peak reaches 50L/s.

During the first 15 min the network has the same behavioras simulation scenario 1. After this, node 3 starts consumingaccording to the demand signal. As is expected, in orderto maintain same level between the connected tanks, tank 2supplies tank 3 through pipe 1 with a similar rate as demandprofile. The flow peaks in pipe 1 occurs at the same time as thepeaks in demand signal. As the total demand of the networkis higher than scenario 1, the tanks empty their content 4 hourearlier.

D. Fourth Scenario: Integrated Model TestThe last simulation scenario integrates the 3 nodes network,

the PRV model and the stochastic demand model. The topol-

Parameter Value DescriptionCj 100 Average number of events.α 0.4150 Average event length in hours.λ 0.0136 Parameter of scale intensity in Weibull dis-

tribution for the events. (Lt/s)β 2.3251 Parameter of form intensity in Weibull dis-

tribution for the events.Norm 1× 10−4 Normalized factor in demand pattern g(t).A1 −113.2367 Polynomial parameter of demand pattern

g(t). (h−1)A2 15.5405 Polynomial parameter of demand pattern

g(t). (h−2)A3 −0.4447 Polynomial parameter of demand pattern

g(t). (h−3)Co 326.8395 Polynomial parameter of demand pattern

g(t).σr 0.6609 Standard deviation in demand pattern.

TABLE IVPARAMETERS OF THE DEMAND MODEL BASED ON A RESIDENCE AREA IN

VALENCIA, SPAIN [21].

ogy is presented in Figure 3(c) where a PRV and a demandprofile are included in pipe 1 and node 3 respectively. In thiscase it is assumed a faster valve with a servo-speed constantαopen/close = 5×10−3 and a maximum opening Xm of 70%of the pipe diameter. Capacity function of the PRV is based inthe one presented in [3] and assumed as Cv(γ) = 0.45γXm.The demand profile has the same form as scenario 3 but withlower intensity (23L/s maximum). The simulation results arepresented in Figures 7(a) to 7(d).

During the first 15 mins, there is no demand in node 3 andthe PRV remains completely open. Hence the pressure andflow results are practically the same as first scenario. From15 mins to 45 mins, demand in node 3 increases causing apositive flow in pipe 1 maintaining both tanks at the samelevel. Therefore, the form of flow signal in pipe 1 is similarto the demand signal in node 3 (both have their peaks at sametime). From 45 mins to 1.2 hours, the PRV closes rapidly (avery small opening value γ23 = 0.001). This causes decreaseof flow 1 (near to zero) and the disconnection between nodes2 and 3. Hence, both tanks empty their content at differentrates (see Figure 7(a)). Tank 2 supplies only the sink node1 and empty it content at exponential rate until 3.5 hoursapproximately. On the other hand, tank 3 supplies sink node1 and satisfies it own demand, causing a faster emptying,delivering all water at 2.5 hours approximately.

Advances in Environmental Sciences, Development and Chemistry

ISBN: 978-1-61804-239-2 43

Page 8: Simulation Methodology with Control Approach for Water ...

0 0.5 1 1.5 2 2.5 3−5

0

5

10

15

20

25

30

time (h)

Hea

d (m

)

H2H3

(a) Pressure results.

0 0.5 1 1.5 2 2.5 3−150

−100

−50

0

50

time (h)

Flo

w (

L/s)

Pipe 1Pipe 2Pipe 3

(b) Flow results.

0 0.5 1 1.5 2 2.5 30

10

20

30

40

50

60

time (h)

Dem

and

(L/s

)

q

3

(c) Demand results. The demand parameters usedhere are presented in Table IV.

Fig. 6. Third Simulation Scenario. ∆t = 60s.

0 0.5 1 1.5 2 2.5 3 3.5 4−5

0

5

10

15

20

25

30

time (h)

Hea

d (m

)

H2H3

(a) Pressure results.

0 0.5 1 1.5 2 2.5 3 3.5 4−150

−100

−50

0

50

time (h)

Flo

w (

L/s)

Pipe 1Pipe 2Pipe 3

(b) Flow results.

0 0.5 1 1.5 2 2.5 3 3.5 40

0.2

0.4

0.6

0.8

1

time (h)

Ope

nnin

g (%

)

γ21

set

γ21

(c) PRV results.

0 0.5 1 1.5 2 2.5 3 3.5 40

5

10

15

20

25

time (h)

Dem

and

(L/s

)

q

3

(d) Demand results. The demand parameters used hereare presented in Table IV.

Fig. 7. Fourth Simulation Scenario. ∆t = 60s.

V. CONCLUSION

A pressure control oriented simulation methodology forwater distribution networks was introduced here based onthe integration of three different models [22]: EPS-GGAwater network model [20], PRV dynamic model [3] and astochastic demand model presented in [21]. The completemodel presented in Equations (17) to (23) was satisfactorysolved using the modify EPS-GGA algorithm [20] presentedin section III-A.

The complete algorithm formulation of the methodologywas presented in section III-B and tested in section IV. Asa reference point, the qualitatively results presented in [20](where the EPS-GGA algorithm was first presented) werereproduced here. A simplified 2 variable tank network wassuccessfully simulated despite both tanks were located rela-tively near. It is important to note, that this specific conditionis not possible to simulate using other simulators like EPANET[17] [20]. Using the same network topology, the PRV anddemand model were tested in other 3 new simulation scenarios,

showing a satisfactory performance.

The simulation methodology presented here proves to becapable of solving dynamic changes in water network. Inlight of the good result obtained, the methodology can beincluded under a pressure control scheme (phase two of thiswork). Despite the network used here is a very small one, themethodology presented is formulated to solve bigger scenariosincluding networks with i nodes, r pipes and m PRVs. Itjust changes the size of the input file and the processing timeaccording to the network size.

The applications of this methodology are not restricted onlyto pressure control. It could be used to simulate different net-works and scenarios for efficient urban planning, managementand operation purposes. For example, the dynamic analysisof disconnection in some part of the network, caused by aprogrammed repair or an emergency situation (like a brokenpipe).

As this simulation methodology is based in the relativelynew algorithm EPS-GGA [20] and is tested in scenarios that

Advances in Environmental Sciences, Development and Chemistry

ISBN: 978-1-61804-239-2 44

Page 9: Simulation Methodology with Control Approach for Water ...

are not possible to simulate in others simulators [20], [17], itis necessary to compare it performance against real data foraccuracy measurement purposes.

VI. FUTURE WORK

The simulation methodology presented here were intendedas a first stage of a pressure control problem. Therefore, phasetwo will be developed including dynamic pressure controltechniques in order to reduce volume water losses.

On the other hand, this work presents various ways ofadditional development. Different models could be added toexpand the application scope such as chlorine concentrationand water-hammer models. Also, many other devices couldbe included in the network, such as different types of valves(not only PRV) and pumping systems.

APPENDIXRESISTANT COEFFICIENT Kij

The resistant coefficient Kij is associated to friction insidethe ij pipe and calculated here using the Darcy-Weisbachequation as follows,

Kij =

(fij

lijdij

+ kmij

)1

2gApij2 (25)

where lij , dij , Arij and ksij are respectively length, diameter,transversal area and absolute roughness coefficient of the ijpipe. The minor losses kmij are associated with losses inaccessories and connections of the respective pipe. The param-eter fij corresponds to the Darcy coefficient and it is calculateddepending on the type of flow (laminar or turbulent).

The laminar case correspond to a Reynolds number lessthan 2000 [23] calculated as follows,

Reij =|V lij |dij

ν(26)

where ν is the kinematic viscosity of the water and V lij isthe velocity of the flow Qij calculated as V lij =

Qij

Apij. For

this case, the Darcy coefficient is calculated as follows anddepends on the Reynolds number only [23],

fij =64

Reijif Reij < 2000 (27)

The turbulent case correspond to a Reynolds number calcu-lated using equation (26) greater or equal than 2000. In thiscase the Darcy coefficient depends on the absolute roughnesscoefficient of the pipe material ksij , the diameter of the pipedij and the Reynolds number[23], as follows,

1√fij

= −2log10(

ksij3.71dij

+2.51

Reij√fij

)if Reij ≥ 2000 (28)

This equation is not explicit for fij , then it needs numericalalgorithms to find an approximate value of fij (knowing firstthe other variables).

REFERENCES

[1] T. Tucciarelli, A. Criminisi, and D. Termini, “Leak analysis in pipelinesystems by means of optimal valve regulation,” Journal of HydraulicEngineering, vol. Vol 125, pp. 277–285, March 1999.

[2] E. Todini, “Design, expansion and rehabilitation of water distributionnetworks aimed at reducing water losses. where are we?” inProceedings of the 10th Annual Water Distribution SystemsAnalysis Conference WDSA2008, K. V. Zyl, Ed. Kruger NationalPark, South Africa: ASCE, August 2008. [Online]. Available:http://dx.doi.org/10.1061/41024(340)33

[3] B. Ulanicki, J. Rance, and P. Bounds, “Control of pressure managementareas supplied by multiple prvs,” in Research Report Water SoftwareSystems. UK: De Montfort University, 1999.

[4] G. Cembrano, G. Wells, J. Quevedo, R. Perez, and R. Argelaguet,“Optimal control of a water distribution network in a supervisory controlsystem,” Control Engineering Practice, vol. Vol 8, Iss 10, pp. 1177–1188, October 2000.

[5] D. Savic and G. Walters, “Integration of a model for hydraulic analysisof water distribution networks with an evolution program for pressureregulation,” Microcomputers in Civil Engineering, vol. Vol 11, pp. 87–97, 1996.

[6] P. Jowitt and C. Xu, “Optimal valve control in water distributionnetworks,” Journal of Water Resources Planning and Management, vol.Vol 116, no. N 4, pp. 455–472, July August 1990.

[7] K. Vairavamoorthy and J. Lumbers, “Leakage reduction in water distri-bution systems: Optimal valve control,” Journal of Hydraulic Engineer-ing, vol. Vol 124, pp. 1146–1154, November 1998.

[8] L. S. Araujo, H. Ramos, and S. T. Coelho, “Pressure control forleakage minimisation in water distribution systems management,” WaterResources Management, vol. Vol 20, Iss 1, no. 1, pp. 133–149, 2006.

[9] M. Marinaki and M. Papageorgiou, “Central flow control sewer net-works,” Journal of Water Resources Planning and Management, vol.Vol 123, no. 5, pp. 274–283, September October 1997.

[10] M. Marinaki, M. Papageorgiou, and A. Messmer, “Multivariable regula-tor approach to sewer network flow control,” Journal of EnvironmentalEngineering, vol. 125, no. 3, pp. 267–276, March 1997.

[11] I. Eker and T. Kara, “Operation and control of a water supply system,”ISA Transactions, vol. Vol 42, Iss 3, pp. 461–473, September 2003.

[12] D. Georges, “Decentralized adaptive control for a water distributionsystem,” in Control Applications, 1994., Proceedings of the Third IEEEConference on, Aug 1994, pp. 1411–1416 vol.2.

[13] E. Ramirez-Llanos and N. Quijano, “E. coli bacterial foraging algorithmapplied to pressure reducing valves control,” in American ControlConference, Hyatt Regency Riverfront, St. Louis, MO, USA, June 2009,pp. 4488–4493.

[14] E. R. Llanos and N. Quijano, “A population dynamics approach for thewater distribution problem,” International Journal of Control, vol. 83,no. 9, pp. 1947–1964, September 2010.

[15] M. Schutzea, A. Campisanob, H. Colasc, W. Schillingd, and P. A.Vanrollegheme, “Real time control of urban wastewater systems wheredo we stand today?” Journal of Hydrology, vol. Vol 299, pp. 335–348,2004.

[16] E. P. Agency, “Epanet software,”http://www.epa.gov/nrmrl/wswrd/dw/epanet.html, 2000, lastVisit: 26th September 2013. [Online]. Available:http://www.epa.gov/nrmrl/wswrd/dw/epanet.html

[17] R. Lewis, Epanet 2 Users Manual, W. Supply and W. R. D. N. R. M. R.Laboratory, Eds. United States Enviromental Protection Agency, 2000.

[18] B. Systems, “Watergems v8 user manual,” 2006.[19] DHI, “Mike,” 2008, last Visit: 26th September 2013. [Online].

Available: http://www.mikebydhi.com/[20] E. Todini, “Extending the global gradient algorithm to unsteady flow

extended period simulations of water distribution systems,” Journal ofHydroinformatics, vol. 13, no. 2, pp. 167–180, 2011.

[21] V. J. Garcia, R. Garcia-bartual, E. Cabrera, F. Arregui, and J. Garcia-Serra, “Stochastic model to evaluate residential water demands,” Journalof Water Resources Planning and Management, vol. 130, Iss 5, pp. 386–394, 2004.

[22] D. Diaz and N. Quijano, Magister Thesis: Asynchronous DistributedPressure Controller for a Water Distribution Network, Uniandes, Ed.Uniandes, March 2012.

[23] J. Saldarriaga, Hidraulica de Tuberias. Abastecimiento de Agua, Redes,Riegos, AlfaOmega, Ed. Bogota, Colombia: Universidad de los Andes,2007.

Advances in Environmental Sciences, Development and Chemistry

ISBN: 978-1-61804-239-2 45