• No se han encontrado resultados

Asynchronous distributed pressure controller for a water distribution network

N/A
N/A
Protected

Academic year: 2020

Share "Asynchronous distributed pressure controller for a water distribution network"

Copied!
36
0
0

Texto completo

(1)January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. Asynchronous Distributed Pressure Controller for a Water Distribution Network Diego Ricardo Diaz. ∗. and Nicanor Quijano. Universidad de los Andes, Bogota, Colombia; (January 2012) A novel control technique is presented based on a microscopical view of population dynamics. It solves the pressure regulation problem of a water distribution network using an agent-based model under a non well-mixed social structure which is representative of the physical network topology. This controller has been developed under an asynchronous update scheme and properly modeled by replicator dynamics equation, reaching a stable equilibrium point using local information only. Keywords: Replicator Dynamics; Agent Based Models; Evolutionary Graph Theory; Water Distribution System; Pressure Reducing Valve; Asynchronous Distributed Controller;. 1. Introduction. The losses in water distribution systems (WDS) are a serious problem for provider companies. In the worst cases it could be near to 65% (Todini 2008, Tucciarelli et al. 1999). Leakage in pipes is the principal cause of these losses, which is a pressure dependent variable. Provider companies also need to maintain certain quality of service associated with minimum levels of pressure in each node of the water distribution network (WDN), despite the variable demand and disturbances. In this point, and according to (Ulanicki et al. 1999), a pressure regulation is introduced to reduce leakage of the WDS satisfying all the quality service restrictions. Different pressure control techniques have been proposed to solve this problem. Most of them are based on optimal control (Cembrano et al. 2000, Savic and Walters 1996, Tucciarelli et al. 1999, Vairavamoorthy and Lumbers 1998, Jowitt and Xu 1990, Araujo et al. 2006), robust control (Eker and Kara 2003), real-time control (Schutzea et al. 2004), adaptive control (Georges 1994), hierarchical control (Marinaki and Papageorgiou 1997, Marinaki et al. 1997) and population dynamics based control (Ramirez-Llanos and Quijano 2009, 2010). Even though all these techniques reach an adequate pressure level, none of them take advantage of the network topology in the pressure control performance. Also, most of them assume ideal communication channels, which have to transport great quantities of information at the same time (a general problem of networked control systems (Murray 2006)). Here, a novel control technique is proposed based on concepts taken from evolutionary graph theory (Nowak 2006) (specifically the replicator equation on graphs (Ohtsuki and Nowak 2006)) and agentbased models (Szabo and Fath 2007). The first approach uses population dynamics concept to macroscopical model the interaction of a finite number of individuals interacting (playing games) under a specific social structure defined by a graph. Each vertex represents an individual, and the weighted edges denotes reproductive rates which determine how often individuals place offsprings into adjacent vertices. So far, the main application of this approach is modeling the fixation of ∗ Email:. [email protected].

(2) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. 2. (a). (b). Figure 1. a), water distribution system example (primary network). b), pressure variation for one pipe including a pressure reducing valve (PRV).. an advantageous mutant specimen into microbial communities constrained to a specific social structure (Nowak 2006). The second approach describes a method to model interaction between agents playing games who are linked in a specific social network, considering each agent as the basic unit of the analysis. This model is commonly applied in non-equilibrium statistical physics problems (Szabo and Fath 2007). Using these two approaches, an asynchronous distributed pressure controller is proposed supported on an agent-based model where each agent plays games under a specific social structure (representative of the physical topological configuration of the WDS) reaching, asynchronously and with local information only, a desired pressure equilibrium point macroscopically modeled with the so called ‘replicator equation on graphs’ (Ohtsuki and Nowak 2006) extended here to a time varying payoff matrix problem. The remainder of this paper is organized as follows. Section 2. Preliminaries, where basic concepts of water distribution network modeling, replicator dynamics and agent-based models are presented. Section 3 Asynchronous Distributed Pressure Controller, where the proposed control technique is introduced. Section 4. Simulation Results, where the performance of the pressure controller is presented, including a comparative evaluation against other pressure control techniques, and Section 5 provides some final conclusions and directions for future work.. 2. Preliminaries. The main purpose of a water distribution system (WDS) is to transport the drinkable water from one or several main reservoirs to the final users through a fixed pipe network. All users are physically distributed among the city and have different variable flow demands that need to be covered by the provider company with a minimum pressure level. Typically, the reservoirs are located in high places (with high potential energy) and distribute the water by gravity (see Figure 1(a)). During distribution, water looses energy mainly because friction within the internals walls of the pipes and also looses mass caused by leakage. The energy loss can be seen as a pressure loss and it is proportional to the flow in the pipe (the higher nodes demand are, the higher flow and pressure losses in the pipes are). On the other hand, mass loss can be seen as a volumetrical loss and it is directly proportional to the pressure. Due to the great quantity of users in a typical WDN, the analysis is made on the primary network only (which has the largest diameter pipes), where each node has aggregated the demand of many users of one specific hydraulic sector called district metered area (DMA). In order to cover this variable demand and the minimum pressure level (required by norm) for all nodes,.

(3) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP 3. provider companies deliver high pressure levels that are appropriate for the worst cases (with the higher demands). But during the low demand period, the system remains with pressure excess that represents considerable and unnecessary leakage loss. Including various pressure reducing valves (PRV) among the primary network, it is possible to reduce the pressure excess (and consequently the leakage loss) during the low demand period. These valves loose by friction a specific amount of energy, proportional to a pilot screw reference. The setting of these references can be seen as a distribution of specific pressure losses in every PRV of the primary network, constrained to the satisfaction of all minimum pressure levels despite the variable demand. Here, an appropriate pressure loss distribution is reached using a population dynamic approach. For a better understanding of the proposed control technique it is necessary to introduce first some concepts about water distribution modeling, replicator dynamics, and agent-based models.. 2.1. Water Distribution Network Modeling. In order to model the dynamical behavior of the water distribution network (WDN), three main equations are used: energy balance, mass balance, and PRV dynamics (Todini 2011, Ulanicki et al. 1999). The first equation (energy balance) defines the pressure losses among an ij pipe (see Figure 1(b)), as follows: ∂Hij = ∆Hij = Hi − Hj = −Kij |Qij |np−1 Qij ∂x. (1). where ∆Hij is the pressure difference between nodes i and j, Qij is the flow of the ij pipe directed to the ith node, Kij is the resistant coefficient of the ij pipe, and np is the flow exponent. The parameters Kij and np depend on the equation selected to describe the friction inside the pipe. Here, the physics based Darcy-Weisbach equation is selected. This equation depends only on physics parameters of the pipes and water (Saldarriaga 2007) and it uses np = 2 and a resistant coefficient defined by, ( ) lij 1 Kij = fij + kmij dij 2gArij 2. (2). where lij , dij , and Arij are respectively the length, the diameter, and the transversal area of the ij pipe. kmij is the minor loss associated with losses in accessories and connections of the ij pipe, g is the gravitational attraction, and fij is the Darcy coefficient defined by, fij = √1. fij. 64 Reij. = −2log10. ( ksij 3.71dij. +. 2.51 √ Reij fij. ). if. Reij < 2000. if. Reij ≥ 2000. (3). where ksij is the absolute roughness coefficient of the material of the pipe ij and Reij is the Reynolds number of the flow Qij inside the ij pipe. Re < 2000 denotes laminar flow and Re ≥ 2000 denotes turbulent flow. It is defined by Reij =. |V lij |dij ν. (4). where ν is the kinematic viscosity of the water and V lij is the velocity of the flow Qij calculated as V lij = AQrijij ..

(4) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. 4. Figure 2. Scheme of a Pressure Reducing Valve (PRV). Sagittal cut. The second differential equation (mass balance) is defined as follows: ∂Vi ∂Hi ∑ = Ωi (Hi ) = Qik + qi ∂t ∂t ni. (5). k. where Vi is the volume of water storage in the i tank, Qik is the flow in the pipe connecting nodes i and k, ni is the number of nodes connected to node i, and qi is the flow demand of the ith node (as it leave the node it is negative). Note that in Equation (5) the change in volume of the ith tank can be expressed as a function of its transversal area Ωi (Hi ) and the change in its high Hi . To model a consumption node (without tank) it is only necessary assume Ωi = 0. In this work, the leakage in pipes and joints is aggregated in the nodal demand as follows (Saldarriaga 2007), qf i = κ i H i η i. (6). where κi is the emitter coefficient and ηi is the emitter exponent, both associated with geometrical characteristics of the leakage. Then, the node demand can be expressed as follows, qi = qd i + qf i. (7). where qd i is the nodal demand associated with users consumption. The third equation (PRV dynamics) describes the PRV operation based on the behavioral model proposed in (Ulanicki et al. 1999). Basically, a PRV (Figure 2) is a valve that receives certain pressure level (hin ) and delivers a lower pressure level (hout ) fixed by a pilot screw. The valve maintains the output pressure level despite changes in the input pressure, showing an exponential response. This relationship is modeled by a first order differential equation, i.e., { ẋm =. αopen (xset − xout ) αclose (xset − xout ). ẋm ≥ 0 ẋm < 0. √ qm = Cv (xm ) hin − hout. (8). (9). where xm is the movement of the diaphragm since the closed position (proportional to the pilot screw), qm is the main output flow, αopen and αclose are variables associated with the servo-valve speed, Cv(·) is the capacity function of the valve, hin is the input pressure of the valve, xset is the desired valve opening (associated with the desire output pressure), and xout is the real valve opening (associated with the real output pressure hout ). Equation (8) describes the movement of the main valve and Equation (9) describes the relation between main flow inside the valve and the pressure loss..

(5) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP 5. In this work, the position xm of the diaphragm is expressed as a percentage of its maximum displacement Xm , i.e., ∀γ : 0 ≤ γ ≤ 1. xm = γXm. (10). For simulation simplicity, it is assumed in the simulation that follow that αopen = αclosed = α. Then, Equation (8) can be rewritten in terms of percentage opening as follows, γ̇ =. α (γset − γ) Xm. (11). On the other hand, Equation (9) is rewritten to express the pressure loss as a function of flow and percentage opening as follows, hin − hout =. qm |qm | [Cv (γXm )]2. (12). where qm ≥ 0. A common PRV does not work with reverse flow. In the Water Distribution problem presented, it is assumed that each ij pipe on the network has installed a single PRV located in the middle of it (see Figure 1(b)), where each node has to have at least one actuator associated. In this case the valve flow qm is the same pipe flow Qij . Then, Equations (11) and (12) can be respectively expressed as, γ̇ij = Ax ij (γset ij − γ ij ) HV ij = Hin ij − Hout ij =. (13) Qij |Qij | [Cv (γ ij Xm ij )]2. (14). ij ij where coefficient Ax ij = Xαmijij , Hin (Hout ) is the input (output) pressure of the ij PRV, αij , Xm ij , and γ ij are respectively, the servo-valve speed coefficient, the maximum pilot screw displacement, and the percentage opening of the ij PRV, and Qij is the flow of the ij pipe. In the network it is possible that some specific demands cause reverse flow in some pipes that has installed a PRV. In this case the upstream node becomes a downstream node. If a common PRV is used, the valve will block itself avoiding fully supply of the node and possibly its disconnection from the network. For this reason, in this work it is assumed that all PRVs in the system have a reverse flow feature that fully opens the main valve to back feed water in case of negatives flows (in this flow direction the PRV does not reduce pressure, only transport water)1 . According to Figure 1(b), the pressure loss between nodes i and j are caused by friction with the internal pipe wall (see Equation (1)), and by the controlled pressure reduction made by the PRV (see Equation (14)). Then, the energy balance equation can be rewritten as,. Hi − Hj = −Kij |Qij |Qij − Bij (Hin ij − Hout ij ). (15). where Bij is the variable that models the reverse flow feature, as follows, { Bij =. 1 An. 1, 0,. Qij ≥ 0 Qij < 0. example of this kind of valve is the PRV Ross Valve Model 40WR.. (16).

(6) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. 6. Rewriting Equation (15), ) Bij |Qij |Qij [Cv (γ ij Xm ij )]2. ( Hi − Hj = − Kij +. (17). Summarizing, the model of Water Distribution System used in this work is given by: ( ) ∂Hij Bij = ∆Hij = − Kij + |Qij |Qij ∂t [Cv (γ ij Xm ij )]2 { 1 Qij ≥ 0 Bij = 0 Qij < 0. (18) (19). ∂Vi ∂Hi ∑ = Ωi (Hi ) = Qik + qi ∂t ∂t. (20). ∂γij = Ax ij (γset ij − γ ij ) ∂t. (21). ni k. For each pipe in the network, there exists one pair of Equations (18) and (19) and for each node in the network, there exists one pair of Equations (20) and (21). The first Equation represents the pressure loss caused by the friction in the pipe walls and the PRV opening. Equation (20) correspond to the mass balance of each node and Equation (21) describes the exponential response of the PRV.. 2.2. Replicator Dynamics. Replicator dynamics describe the evolution of an homogeneous population playing a symmetric game under a well-mixed social structure (every individual of the population has the opportunity to play with all others players). Each individual is genetically programmed to play only a pure strategy. During the game, every individual receives an utility called fitness. When an individual reproduces, its offspring inherits the same strategy. Finally, the fitness of each individual varies proportionally to their reproduction rate (Hofbauer and Sigmund 1998, Weibull 1997). The evolution of the system is analyzed in term of the proportion of individuals playing a pure strategy, which can be described by, ṗi = pi (fi − f¯). (22). where pi is the relative frequency of individuals (also called agents) playing the strategy i = {1, ..., m}, m is the number of possible strategies, fi is the fitness of playing strategy i, and f¯ is the average fitness of the population defined as, f¯ =. m ∑. pi fi. (23). i=1. ∑m This system can only evolve inside the simplex defined by △p = {p ∈ Rm + : i=1 pi (t) = 1} (Hofbauer and Sigmund 1998). According to (Taylor and Jonker 1978), the replicator dynamics defined by Equation (22), can also be expressed in matrix form using a payoff matrix A that contains all the fitness information. This matrix is defined by A = [aij ]. (24).

(7) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP 7. where i = {1, . . . , m} and j = {1, . . . , m}. In this formulation the ith fitness fi corresponds to the expected payoff for ith strategy, defined by. fi =. m ∑. aij pj = (Ap)i. (25). j=1. where p = [p1 , . . . , pm ]⊤ . Replacing Equation (25) in (23) the average fitness is obtained as follows f¯ =. m ∑ m ∑. pi aij pj = p⊤ Ap. (26). i=1 j=1. Then, Equation (22) can be rewritten as follows, ( ) ṗi = pi (Ap)i − p⊤ Ap. (27). This formulation is convenient for problems that explore in detail all games played by each agent in the population.. 2.3. Agent-Based Models. The agent-based models are a low-level approach for the analysis of certain population dynamics. Commonly, the evolution of a population interacting under some dynamic rule is described in terms of a small number of strategy frequencies by differential equations (an aggregate-level or macroscopical-level as it is presented in Section 2.2). This approach is only appropriate under the assumptions of large number of individuals and a mean-field (well mixed) social structure (Taylor and Jonker 1978, Helbing 1998). If those premisses are not fully satisfied, a more detailed analysis is needed, usually called an agent-based. An agent-based model takes the agent itself as the basic unit of the theory (microscopic level). Here, the decision making process of each agent is modeled in a finite population, who interacts with other individuals under some social structure. Each agent updates its strategy in a specific time according to certain dynamic rules. The evolution of the whole population in terms of strategies is considered a macroscopical level where the state of all agents (known at any time) is aggregated as strategy frequencies. The dynamic of this evolution depends on the strategy updated time (synchronized or randomly sequential) and the strategy updated rule. The first one defines the update instant for each agent of the population, and the second one describes how agents get information from their surrounding, and how their strategy is updated during the game. Basically, an agent-based model defines a finite number of agents (N ) located in the vertices of a graph (the social structure) playing games. The agent located at site x plays a pure strategy sx of Q possible described by a set of Q-component unit vector, as follows (Szabo and Fath 2007):     1 0  ..   ..  sx =  .  , . . . ,  .  . 0 1. (28). where, x = {1, ..., N }. Each agent x plays a symmetric game with their own neighbors (at a specific time) and receives an income determined by the payoff matrix A. The total income for.

(8) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. 8. agent x is expressed by ux =. ∑. sx Asy. (29). y∈Ωx. where Ωx is the set of individuals who belong to the neighborhood of agent x. The social structure (and consequently the neighbors of each agent), is defined by a connectivity matrix W . This matrix is a square matrix (N × N ), where its ij components can take two possible values (Nowak 2006), i.e., Wij = {0, 1}. (30). where i = {1, ..., N } and j = {1, ..., N }. If Wij = 1 (Wij = 0) a connection between agents i and j do (does not) exist. As a special restriction Wii = 0, for all i, based on the concept that no agent could negotiate with itself. The actualization of each agent strategy is made checking first the strategy updated time and then the strategy update rule. In the context of this work, every agent strategy sx is updated asynchronously. It means that it changes independently of other agents choices and at random time. This is made by the random selection of an agent x with probability λ = 1/N , who receives the opportunity to change (sx → s′x ) or not (sx → sx ) its actual strategy. The updating decision is taken according to the selected updated rule that is defined by the individual transition rate w(sx → s′x ). This rate denotes the conditional probability per unit time that an agent, which has been selected for update, switch from strategy sx to s′x (Szabo and Fath 2007). In order to achieve a macroscopical replicator dynamics, the individual transition rate used here is proportional imitation (Helbing 1998, Schlag 1998, 1999). This rate depends on the strategy played by each agent in the neighborhood and its respective payoff, where w(sx → s′x ) = w(sx → s′x ; {sy , uy }y∈Ωx ). The agent x who has the opportunity to update, evaluates the payoff of all their neighbors and ‘copy’ or imitate the strategy which has the bigger positive payoff difference. This imitation is made with a probability proportional to that difference (Szabo and Fath 2007), i. e., w(sx → s′x ) =. µ |Ωx |. ∑. max[uy − ux , 0]. (31). ′ x. y∈Ωx (s ). where µ > 0 is a constant that constrains w < 1 (w is a probability). It is important to note that imitation cannot introduce a new strategy which is not already played in the population (Szabo and Fath 2007). Summarizing, an agent-based model describes different population dynamics using the agent itself as the basic unit. All agents play a specific game determined by the payoff matrix A, only with their own neighbors defined by the social structure W , and maintain or change their strategy (synchronously or asynchronously) according to some strategy update rule defined by a specific individual transition rate. The resulting strategy evolution can be analyzed aggregating all agent choices as strategy frequencies during all time. In some specific cases it can be analyzed also through a macroscopical model defined by a differential equation. Next, it is presented two different cases (with wellmixed and non well-mixed social structures) are presented, where an agent-based scheme is macroscopical modeled by this form. 2.3.1. Macroscopic Modeling of Agent-based Dynamics: Well-mixed Case. Consider an agent-based model implemented using a large number of agents N , playing games defined by the payoff matrix A under a well-mixed social structure W . Also, let us consider that the agent strategy actualization is made asynchronously (randomly sequential) and constrained.

(9) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP 9. by the strategy updated rule defined by the proportional imitation individual transition rate (see Equation (31)). Those premises are the base of replicator dynamics presented in Section 2.2 and, as it is expected, it is possible to demonstrate (Helbing 1998) that this system has the same or very similar macroscopic behavior as the replicator dynamics. The greater N is, the better the approximation is. If N → ∞ this behavior can be completely defined by Equation (27). Here, the traditional replicator equation is described as a special case of agent-based models under a complete graph (well-mixed structure) playing imitation rule. 2.3.2. Macroscopic Modeling of Agent-based Dynamics: Non Well-mixed Case. In the non well-mixed cases, many different social structures are used. In the particular case of homogeneous regular graphs (where all vertices have the same k number of neighbors), it is possible to approximate the macroscopical behavior to a ‘modified’ replicator dynamics (Ohtsuki and Nowak 2006). Assume an agent-based model that uses a large number of agents N , playing games defined by the payoff matrix A∗ under a social structure W defined by a homogeneous regular graph of degree k. As in the well-mixed case, let us assume that the agent strategies are updated asynchronously (randomly sequential) and the strategy updated rule is defined by the proportional imitation individual transition rate. According to (Ohtsuki and Nowak 2006), with this agent-based scheme, an approximate model of the macroscopical behavior can be expressed as follows, ( ) ṗi = pi (A∗ p)i − p⊤ A∗ p. (32). where all variables have the same meaning as in Equation (27). The big difference between Equations (27) and (32) is focused on the payoff matrix A∗ . It is a special matrix which not only contains the payoff of all different strategy selection but also it includes a term representative of the local competition among strategies (associate with the social structure). This matrix is defined by, A∗ = [a∗ij ]. (33). where i = {1, . . . , m} and j = {1, . . . , m}. This ‘modified’ payoff matrix results from the sum of two terms, i.e., A∗ = A + B. (34). where the m × m matrix A = [aij ] corresponds to a general payoff matrix for a well-mixed population game, and the m × m matrix B = [bij ] contains the local competition term that depends on the individual transition rate implemented. In this case, where proportional imitation rate is used, the matrix B is defined in (Ohtsuki and Nowak 2006), i.e., bij =. (k + 3)aii + 3aij − 3aji − (k + 3)ajj (k + 3)(k − 2). (35). where k is the regular degree of the graph and must satisfy that k > 2. The use of this special matrix carries on four remarkable concepts to highlight. According to (Ohtsuki and Nowak 2006), first the average fitness p⊤ A∗ p is the same as the one in than p⊤ Ap. Second, all diagonal terms of B are zero (bii = 0), which suggests that the payoff to agents playing the same strategy against each other will always be the same irrespective of the population structure. Third, matrix B is anti-symmetric i.e., (bij = −bji ), which represents that the gain of one strategy in local competitiveness is the loss of another. Finally, as it is expected,.

(10) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. 10. if k → ∞ (well-mixed structure) each term of B tends to zero (bij → 0) and Equation (32) becomes the replicator dynamics case. Summarizing, certain population games under regular homogeneous graphs, can be macroscopically modeled with a typical replicator dynamics equation with a modified payoff matrix A∗ .. 3. Asynchronous Distributed Pressure Controller for a WDN. The control problem of regulating the pressure levels of a water distribution network in order to satisfy all minimum pressure levels with lower leakage despite the variable and unknown demand (described in Section 2), is solved through the operation of several PRVs using a tracking reference approach based in replicator dynamics and agent-based model concepts (see Sections 2.2 and 2.3). The controller introduced above follows a reference pressure surface determined by Hiref , where i = {1, . . . , nd } and nd is the number of nodes in the WDN. This reference should be maintained despite the demand in order to supply all nodes without pressure excess. In this work, we propose the design pressure surface of the network as the pressure reference. This surface results as part of the design process of the WDN and guarantee, the minimum pressure level of the farthest node in the network under the worst demand case (with maximum demands). An example of this surface is shown in Figure 1(a) where the farthest node (number 7) has a pressure level (green bar) over and very close to the minimum (blue bar). Each ij PRV of the network (the actuators of the system) has associated a local part of the controller that calculates their respective percentage opening γset ij using only local data of pressure (of the nodes i and j) and flow (of the ij pipe) under an asynchronous scheme. The only unknown variable for the controller is the node demand qi (see Equation (7)). It is associated with leakage (which depends on the pressure levels) and with users consumption which is an independent variable that cannot be manipulated. Typically, it follows certain consumption patterns according to the city. For each node in the WDN, this demand pattern is an aggregated version of many user’s demands of the associated DMA. The formulation of the controller is based on the WDN model defined by Equations (18), (20) and (21), where pressures Hi and PRV opening percentages γij are considered as state variables of the system. Basically, a population game is proposed where a finite number of individuals play different games under a social structure representative of the physical pipe network. For each ij PRV in the WDN (which has associated a specific location in the social structure) a game is defined with two possible pure strategies: ‘loss pressure’ (p1 ij ) and ‘delivered pressure’ (p2 ij ). The relative frequency of ‘loss pressure’ strategy is associated with the the percentage opening reference γset ij which controls the pressure loss in the PRV. The payoff matrix of each of these ij games (G∗ ij ) depends on their respective strategy frequencies (p1 ij and p2 ij ) and the nodal pressure error ei = Hiref − Hi . As the pressure error and the strategy frequencies are time varying, consequently matrix G∗ ij is also time varying. The agent-dynamic of the population is defined by an asynchronous actualization with a proportional imitation updating rule (see Section 2.3), which drives the system to a zero error state. In a detailed view, the relation between the relative frequency of ‘loss pressure’ strategy (p1 ij ) and the percentage opening reference γset ij in the PRV is not direct. Based in the behavioral model of the PRV an appropriate relationship is presented. According to Equation (14), each ij PRV distributes its input pressure between the internal controlled loss HV ij and the delivered output pressure to the downstream node Hout ij (see Figure 1(b)). It can be expressed by, Hin ij = HV ij + Hout ij. (36). Associating HV ij with the ‘loss pressure’ strategy and Hout ij with the ‘delivered pressure’.

(11) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP 11. strategy, the Equation above can be rewritten as follows, Hin ij = p1 ij Hin ij + p2 ij Hin ij. (37). p1 ij + p2 ij = 1 0 ≤ p1 ij ≤ 1 0 ≤ p2 ij ≤ 1. (38). Constrained by. Using Equations (14) and (37), it is possible to find an expression which relates the opening percentage of the PRV and the percentage loss pressure as follows, p1 ij Hin ij =. Qij |Qij | [Cv (γ ij Xm ij )]2. (39). The equation above uses γ ij but the controller can only influence the real percentage opening by setting a percentage opening reference γset ij (see Equation (21)). According to this, γ ij is replaced by γset ij and rewriting Equation (39) an appropriate equation that relates those two variables can be defined by, γset ij =. (√. 1 Xm ij. Cv −1. Qij |Qij | p1 ij Hin ij. ) (40). Once the controller has calculated the relative frequency of strategy ‘pressure loss’ p1 ij , Equation (40) is applied in order to calculate the percentage opening to be set in the ij PRV. As we can see, Equation above requires the capacity function Cv (·) and the maximum displacement Xm ij of the valve, both measurable parameters. It also needs the flow (Qij ) and input pressure (Hin ij ). According to Figure (1(b)) this last variable can be expressed in two forms as follows, Kij |Qij |Qij 2 Kij |Qij |Qij + p1 ij Hin ij = Hi + 2. Hin ij = Hj −. (41). Hin ij. (42). In both equations above it is needed the friction coefficient Kij which, in a real scenario, is not easy to estimate. Based on the location of each PRV in their respective ij pipe (in the middle), the input pressure Hin ij is assumed as the average pressure between Hi and Hj defined by, Hin ij =. Hi + Hj 2. (43). Using Equations (14), (15) and (37), Equation (43) can be rewritten as, Hin ij = Hi +. Kij |Qij |Qij p1 ij Hin ij + 2 2. (44). showing that the average pressure is a good approximation of Hin ij . In Figure 3(a) the proposed social structure W is presented. The black points represent the location of each agent and the solid black lines represent the links with other agents. As we can see, it corresponds to an approximated regular graph where most of agents has 8 neighbors (only the few boundary agents has less neighbors). The green and red colors means respectively the.

(12) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. 12. (a). (b). Figure 3. a) Graphical representation of the social structure for the Asynchronous Distributed Pressure Controller. b) Payoff matrix distribution among the structures. ‘Delivered Pressure’ and the ‘Loss Pressure’ strategy played by each agent. Inside the complete structure there are sectors or clusters associated with each ij PRV (in the figure we can see 8 PRVs and respectively 8 clusters). Each ij cluster contains a specific number of agents that determine the local relative frequencies (p1 ij , p2 ij ). The games played inside the cluster are determined by the respective payoff matrix G∗ ij . In order to obtain a model of the controller that reaches a macroscopic behavior described by the ‘modified’ replicators dynamics for non-well mixed cases (see Sections 2.3 and 2.3.2), we propose to extend the concept of ‘modified’ payoff matrix (Ohtsuki and Nowak 2006) to the matrix G∗ ij . Then, it is defined by, G∗ ij,t = Gij,t + Fij,t. (45). where Gij,t = [gxy ij,t ], Fij,t = [fxy ij,t ], x = {1, 2} and y = {1, 2}. Here, Gij,t is a time varying payoff matrix corresponding to a ‘replicator dynamics’ case under a well-mixed social structure, and Fij,t is also a time varying matrix that contains the local competition term associated with the social non-well mixed structure W . The subindex t makes references to a time varying matrix. As we can see in Equation (45), it is necessary to define matrix Gij,t as a payoff matrix of a classical replicator dynamic case (see Section 2.2) which contains the information of the desired equilibrium points and its kind of stability under a well-mixed case. Here, it is introduced a non-well mixed case that uses the approximated regular graph W as the social structure. In order to approximately maintains the stability characteristics of matrix Gij,t in this non-well mixed case, the term Fij,t is added (local competition term) obtaining payoff matrix G∗ ij,t . As the proposed controller uses a proportional imitation strategy as the update rule under an asynchronous scheme (see Section 2.3), the additional term is defined here similar as B (Ohtsuki and Nowak 2006) in Section 2.3.2, as follows, fxy ij,t =. (k + 3)gxx ij,t + 3gxy ij,t − 3gyx ij,t − (k + 3)gyy ij,t (k + 3)(k − 2). (46). where k > 2 is the regular degree of the social structure (graph). Despite in Section 2.3.2 the local competition term used in Equation (34) is applied to matrix A∗ (which is a constant payoff matrix in a ‘repeated’ game scheme), the modified payoff matrix concept B (local competition term) applied to a time varying matrix G∗ ij still maintains good modeling results (at least in this case)..

(13) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP 13. According to this, in the next two subsections is presented, first the definition of matrix Gij,t including a stability analysis, and second the calculus of matrix G∗ ij including also its respective stability analysis.. 3.1. Definition of the Payoff Matrix Gij,t. For the classical replicator dynamic model presented as follows, ( ) ij ij ij ⊤ ij ṗij = p (G p ) − p G p r ij,t r ij,t r. (47). where r = {1, 2}. A time varying payoff matrix Gij,t is defined as, [ Gij,t =. ei. −ei p2 ij. ]. −ei. (48). ei = Hiref − Hi. (49). ei p1 ij. where. Using the restriction p1 ij + p2 ij = 1, the system above can be reduced to one variable as follows, ij ij ṗij 1 = −ei p1 (1 − p1 ). (50). The system above has two equilibrium points in: p̂ij 1 =0. (51). p̂ij 1. (52). =1. and one equilibrium point when ei = 0. It means if the zero error state is reached, it will be maintained over time (a desirable behavior for this tracking approach). Using Equations (49),(15),(36) and (??), the pressure error can be expressed as follows, ei = Hiref − Hj + Kij |Qij |Qij + p1 ij Hin ij. (53). if ei = 0 then the equilibrium is defined by, p̂ij 1 =. Hj − Hiref − Kij |Qij |Qij Hin ij. (54). In order to analyze the stability of the three equilibrium points above and using Equation (53), an expanded version of the system described in Equation (47) is defined by, 3. 2. ref ij ij ij ṗij − Kij |Qij |Qij )(p1 ij ) 1 = (Hin )(p1 ) − (Hin + Hj − Hi. +(Hj − Hiref − Kij |Qij |Qij )(p1 ij ). (55). For analysis simplicity, the equation above is rewritten as follows, 3. 2. ij ij ij ṗij 1 = (at )(p1 ) − (at + bt )(p1 ) + (bt )(p1 ). (56).

(14) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. 14. where, at = Hin ij. (57). bt = Hj − Hiref − Kij |Qij |Qij. (58). the subindex t is to note that these are time varying parameters. In a detail view, parameter at is constrained to at > 0 because Hin ij is a pressure value and for definition it could not be negative or zero (if Hin ij = 0, means that all pressure supplied by the upstream node is lost in friction among half pipe and it is impossible to supply downstream node). In the same way the parameter bt must satisfy bt > 0. By definition, the supply pressure Hj must be greater than the downstream pressure reference Hiref plus the friction loses. If bt = 0, then the pressure Hj barely covers the pressure reference and the pressure losses. In this case, the PRV should not exist. This relationship is defined as follows, Hj > Hiref + Kij |Qij |Qij. (59). If this restriction is not fully satisfied, it means that the upstream pressure is not capable to supply the demand and minimum pressure of the downstream node and any control action will be useless. Using Equations (42) and (58), the parameter bt could be expressed as follows, bt = at −. Kij |Qij |Qij − Hiref ; 2. (60). Since Kij > 0, Qij > 0 (when PRV pressure reduction is on) and Hiref > 0, then at > bt . All these restrictions are useful in the stability analysis next. Since we have a monovariable case, we could use ideas on plotting the phase plane of p1˙ij v.s. p1 ij in order to define the stability of the equilibria. In other words, the stability of each equilibrium point is determined through the revision of the sign of the next differentiation evaluated in each equilibrium point. ∂ ṗij 2 1 = 3(at )(p1 ij ) − 2(at + bt )(p1 ij ) + bt ∂p1 ij. (61). If it is negative (positive) the equilibrium point is stable (unstable). Evaluating the first equilibrium point p̂ij 1 = 0, the value of Equation (61) is: ∂ ṗij 1 = bt > 0 ∂p1 ij. (62). Since bt > 0 then p̂ij 1 = 0 is an unstable equilibrium point. Evaluating the second equilibrium point p̂ij 1 = 1, the value of Equation (61) is: ∂ ṗij 1 = at − bt > 0 ∂p1 ij. (63). Since at > bt then p̂ij 1 = 1 is an unstable equilibrium point. Now, evaluating the third equilibrium point p̂ij 1 =. Hj −Hiref −Kij |Qij |Qij , Hin ij. the value of Equation.

(15) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP 15. (61) is: ∂ ṗij bt (bt − at ) 1 = <0 ∂p1 ij at Since at > bt > 0 then p̂ij 1 = p̂ij 1. Hj −Hiref −Kij |Qij |Qij Hin ij. =. bt at. (64). is a stable equilibrium point and it must. satisfy 0 < < 1. Summarizing, the stability analysis above shows that the proposed matrix Gij,t in Equation (48) under a replicator dynamics scheme (for well-mixed structures only) modeled by Equation (47) could drive each local cluster ij to a stable equilibrium point with a zero error state.. 3.2. Definition of the Modified Payoff Matrix Gij,t ∗. With the stability analysis above which is appropriate for well-mixed structures only, it is now possible to define the modified payoff matrix Gij,t ∗ that drives the system under the non-well mixed social structure define by W , to a stable zero error state. Using a large number N of agents, a regular graph of degree k = 81 as the social structure W (see Figure (3(a)), a modified payoff matrix G∗ ij,t , and also using a proportional imitation individual transition rate (Equation (31)) under an asynchronous update rule (randomly sequential), it is possible to define a macroscopic model define by a ’modified’ replicator dynamics (see Section 2.3.2), as follows, ( ) ij ∗ ij ij ⊤ ∗ ij ṗij = p (G p ) − p G p r r r ij,t ij,t. (65). where r = {1, 2}. Using Equations (45), (46) and (48), the matrix G∗ij,t is calculated as follows, [ G∗ij,t =. ei. (. 23 22p1 ij. ei −ei ) 1 1 + 22p2 ij − 3. (. 1 22p1 ij. 23 + 22p ij − 2 −ei. 1 3. )] (66). Replacing Equation (66) in (65), the system can be expressed by, [ ( ) ( )] p2 ij 23 p2 ij ij ij 2 ij ij ij 2 = p1 ei p1 − + − − ei (p1 ) − p1 + p2 − (p2 ) 22p1 ij 3 22 [ ( ij ) ( )] p1 p1 ij 23 ij ij ij 2 ij ij ij 2 ṗ2 = p2 − ei − + p2 − − ei (p1 ) − p1 + p2 − (p2 ) 3 22p2 ij 22. ṗij 1. ij. (67) (68). Using the restriction p2 ij = 1 − p1 ij , the system above can be reduced to one variable as follows, ( ṗij 1. = ei. 1 2 ij 2 2 ij (p1 ) − p1 − 3 3 22. ) (69). 1 In the social structure proposed W , most of agents has 8 neighbors except those who are located in the edges and the corners which have 5 and 3 neighbors respectively. As it is used a large number of agents, the approximation of the degree of the graph k = 8 is appropriate..

(16) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. 16. The system above has two equilibrium points in √. 154 + 11 ≈ 1.064 22 √ − 154 + 11 ij p̂1 = ≈ 0.064 22. p̂ij 1. =. (70) (71). ij which are very closed to p̂ij 1 = 1 and p̂1 = 0 in Equation (50). It is important to note that Equation (69) is an approximated macroscopical model of the evolution of the relatives frequencies of strategies p1 ij and p2 ij under the agent-based scheme in a non-well mixed structure. In fact an equilibrium point p1 ij ≈ 1.064 means that the 106.4% of the population is playing strategy 1 which by definition is impossible. The real equilibrium points are p1 ij = 1 and p1 ij = 0 which means that every agent in the population is playing the same strategy and none can imitate any other strategy. The third equilibrium point correspond to ei = 0, meaning that if the zero error state is Hj −Hiref −Kij |Qij |Qij reached, it will be maintained over time. In this case p̂ij = abtt same as the 1 = Hin ij system in Equation (50)). Using Equations (57) and (58), the differentiation with respect to p1 ij is:. ∂ ṗij 4 2 1 2 1 = 2(at )(p1 ij ) − (at + bt )(p1 ij ) + bt − at ij ∂p1 3 3 22. (72). Same as the stability analysis above, the evaluation of the first equilibrium point p̂ij 1 ≈ 0.064, in the Equation (72) is: ∂ ṗij 1 = 0.0480at + 0.752bt > 0 ∂p1 ij. (73). Since at > 0 and bt > 0 then p̂ij 1 = 0.064 is an unstable equilibrium point. The evaluation of the second equilibrium point p̂ij 1 ≈ 1.064, in the Equation (72) is: ∂ ṗij 1 = 0.8000at − 0.752bt > 0 ∂p1 ij. (74). Since at > bt then p̂ij 1 = 1.064 is an unstable equilibrium point. The evaluation of the third equilibrium point p̂ij 1 = (72) is:. Hj −Hiref −Kij |Qij |Qij Hin ij. ∂ ṗij 3at 2 + 44bt (at − bt ) 1 =− <0 ij ∂p1 66at. =. bt at ,. in the Equation. (75). Hj −Hi −Kij |Qij |Qij Since at > bt then p̂ij = abtt is an stable equilibrium point. 1 = Hin ij Summarizing, the agent based controller proposed can reach a zero error equilibrium state for each ij cluster using only local information and asynchronously. For each updating time, the local agent selected for update sense Hi , Hj and Qij . Then using the ‘modified payoff matrix’ G∗ij,t , the selected agent plays against their neighbors and switch or not their strategy. Finally, the local relative frequency of the agent’s cluster is updated to finally calculates the respective ij percentage opening value γset to be applied to the associated ij PRV. ref.

(17) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP 17. The evolution of the population of each local cluster can be approximated by the macroscopic model defined by, ( ṗij 1 = ei. 2 ij 2 2 ij 1 (p1 ) − p1 − 3 3 22. ). ei = Hiref − Hi. (77). Hi = Hj − Kij |Qij |Qij − p1 ij Hin ij. 4. (76). (78). Simulation Results. The performance evaluation of the proposed asynchronous distributed pressure controller is presented next. We have implemented a WDN benchmark using a stochastic demand model that creates a typical scenario that imitates real conditions. The complete model is simulated using the extended global gradient algorithm (extended GGA) (Todini 2011). As the macroscopic model is based on an differential equation that approximately predicts the behavior of the agent based model proposed, an additional simulation is presented to show the attractiveness of the predicted equilibrium point. As an additional consideration, an special apart is presented where some updating issues are explored, and a leakage analysis is presented. Also, the proposed control technique is compared against a distributed proportional-integral (PI) pressure controller and a centralized optimal controller using the IAE index.. 4.1. WDN Benchmark. An appropriate WDN to evaluate the controller performance is the so called ‘two loops network’ (Alperovits and Shamir 1977). It is a benchmark network used for WDN design, extended here for pressure control purposes. The network (presented in Figure (1(a))) has a main supply reservoir (node 1) located in the highest location of the network that distributes drinkable water by gravity to the consumption nodes (nodes 2 to 7). These consumptions nodes are configured in a two loops structure where the flow direction is determined by high difference (from the highest j node to the lower i node). According to these directions, nodes 2, 3, 4, 6, and 7 receive water only from one node and distribute it to one or various nodes (distribution nodes). Node 5 receives water from 3 different nodes (3, 4 and 7) and does not distribute it (sink node). The two loops network presented in (Alperovits and Shamir 1977) considers the spatial location of each node, their respective aggregated maximum demands, the pipe diameters, lengths and materials. In this benchmark, a specific design pressure surface that satisfies a minimum pressure restriction under maximum demands exists. The node parameters are shown in Table 1: Node 1 2 3 4 5 6 7 Table 1.. High (m) 217 150 160 155 150 165 160. Minimum Pressure (m) 0 30 30 30 30 30 30. Maximum Demand (Lt/s) 0 27.78 27.78 33.33 75.00 91.67 55.56. Node parameters for ‘two loops’ water distribution network.. The original high of the reservoir (Node 1) documented in (Alperovits and Shamir 1977) is 210 meters. In this case it is necessary to assume 7 meters extra to compensate the energy.

(18) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. 18. losses caused by the PRV’s installed in the pipes. The original design does not include any valve. Respectively, the pipes parameters are shown in Table 2. Pipe 21 32 42 54 64 76 53 57 Table 2.. Diameter (m) 0.46 0.20 0.45 0.15 0.40 0.25 0.15 0.15. Length (m) 1000 1000 1000 1000 1000 1000 1000 1000. ks (m) 1.5 × 10−6 1.5 × 10−6 1.5 × 10−6 1.5 × 10−6 1.5 × 10−6 1.5 × 10−6 1.5 × 10−6 1.5 × 10−6. km 0 0 0 0 0 0 0 0. Pipe parameters for ‘two loops’ water distribution network.. According to the absolute roughness ks, all pipes are assumed to be made of PVC, and there is no losses caused by accessories (km = 0). Using those node and pipe parameters the corresponding design pressure surface is shown in Table 3. Node 1 2 3 4 5 6 7 Table 3.. Design Pressure (m) 0 53.4 30.8 44.1 30.0 30.0 30.0. Design pressure surface for ‘two loops’ water distribution network.. This design surface is the reference pressure surface that should be maintained during all the WDN operation for minimal pressure losses. The network reported in (Alperovits and Shamir 1977), does not consider any valve in the system but here, every pipe has to have a PRV described by Equations (13) and (14). Then the model uses also a capacity function C(·), a maximum opening Xm ij , and the αij servo-valve speed constant. For the simulation problem, these parameters are assumed as follows, C(γ ij Xm ij ) = 0.45Xm ij γ ij αij = 5 × 10 ij. −2. Xm = 0.7dij (mts). (79) (80) (81). The capacity function expressed in Equation (79) corresponds to a linear approximation of the one presented in (Ulanicki et al. 1999), and the servo speed parameter of Equation (80) is adapted from (Ulanicki et al. 1999) which assumes a stabilization time nearly to 20 seconds. The third parameter Xmij (Equation 81) is assumed to be at the 70% of the pipe diameter. Here the PRV signal γset ij is restricted to 0 ≤ γset ij ≤ 1 and the signal γ ij is restricted to 0.0001 ≤ γ ij ≤ 1. If γ ij = 0, a zero division is presented in Equation (14) which represents a completely closed valve. This situation causes a null flow in the pipe disconnecting nodes i from j. For the simulation test of the controller prosed here two demand scenarios are used. Both are described by a stochastic model presented in Section A. The first scenario considers a very small aleatory component (keeping the proportion between demand nodes all the time), and the.

(19) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP 19. Node Demand (Lt/s). 0. Node Demand (Lt/s). 0 −10. −10. −20. −20. −30. −30 −40. −40. −60 −70. −50. q1 q2 q3 q4 q5 q6 q7. −50. 0. 5. 10. t (hours). 15. 20. q1 q2 q3 q4 q5 q6 q7. −60 −70 −80. 25. 0. 5. 10. t (hours). 15. 20. 25. (b). (a). Figure 4. a) Balanced demand scenario. b) Unbalanced Demand Scenario.. second one presents a high aleatory component (the demand proportion given by the maximum demands between nodes is not maintained). For each consumption node in the two loops network is assumed a properly escaladed demand signal similar to the one presented in Figure (A2) where the maximum peak has the level as the maximum node demand. Those demands scenarios are presented in Figure (4(a)) and (4(b)).. 4.2. WDS Simulation Algorithm. To simulate the system described by Equations (18) and (20), it is necessary to implement the extended global gradient algorithm (extended GGA) (Todini 2011). The solution of Equation (21) can be founded explicitly. The GGA solves a discretized version of the system expressed in matrix form finding the values of all Hi pressures and Qij flows. For each time step, the solution of the system is reached applying the Newton-Raphson method iteratively. It is important to note that the solution of the system carries certain precision error. The balance and mass equations can be expressed in matrix form as follows, [. At11 A12 A21 A22. ][. ] [ ] Qt −A10 H0t = Ht −qt∗. (82). where At11 is a nT × nT time varying diagonal matrix with the pressure loss information (energy balance), defined by At11 (k, k). ( = Kij +. ) 1 |Qij | [Cv (γij )]2. (83). where k = {1, . . . , nT }, nT is the number of pipes, and every k element corresponds only ij pipe. The nn × nn matrix A22 has the information about the tanks of the system. It is defined as { A22 (i, i) =. 0 Ωi − ϑ∆t. if consumption node if tank node. (84). where i = {1, ..., nn }, nn is the number of nodes with unknown pressure, Ωi is assumed constant, ϑ is a constant number related with the discretization, and ∆t is the duration of the step time..

(20) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. 20. The nT × nn matrix A21 is constant and has the information of the topology of the network and the directions of the flow for the nn nodes. It is defined by: { A21 (i, j) =. −1 1 0. if the flow leaves the i node if the flow comes to the i node if there is no pipe between nodes i and j. (85). The matrix A12 = A⊤ 21 . Qt is a time varying nT × 1 vector with all the ij flows. Ht is an nn × 1 vector with all the pressures of the consumption and tanks nodes. A10 is an nT × ns constant matrix which describes the information of topology of the network and the directions of the flow for the ns nodes with constant pressure (it corresponds to reservoirs that supply the system without pressure variation). This matrix is built with the same structure of A21 . H0 is the ns × 1 vector with the constant pressure of each reservoir. qt ∗ is the special demand nn × 1 vector defined by, ∗. qt =. {. qi qi +. 1−ϑ ϑ (A21 Qt−∆t. +. qit−∆t ). +. t−∆t Ωi ) ϑ∆t (Hi. consumption nodes tank nodes. (86). Based on the matrix system described in Equation (82), and using the Newton-Raphson method, it is possible to find an iterative expression that calculates the Qt and Ht vectors for t time step based on the information of the t − ∆t time step (Todini 2011). As it mentioned before, the solution obtained implies certain precision error.. 4.3. Stability Verification. In this section is simulated the evolution of the relative frequency of population p1 (under the control scheme describe in Section (3) using the hydraulic solver algorithm in Section (4.2)) for one pipe between a reservoir and a consumption node, which have a single PRV in the middle of it (in other words, one cluster only). Despite the macroscopic model of the controller proposed presented in Equations (76) and (77) has been proved to be stable in a zero error state, it is based on the approximated model described by Equations (45) and (46). According to this, the stability simulation is presented in this section in order to shows that the approach uses here is appropriate. The simulation occurs during 20 hours. From 0 to 17 hour the consumption node has a demand of 21 Lt/s, and from 17 to 20 hours the demand increases up to 34 Lt/s. The consumption node has to maintain a pressure reference level of 53.4 m. The high of the reservoir and consumption node are respectively 217 m and 150 m. The pipe used here has a length of 1000 m, it diameter is 0.46 m and it is made of PVC. The controller version used in this section uses a non-well mixed social structure of regular degree k = 8 similar to the one presented in Figure (3(a)). The number of agents of the game is N = 625. The period of actualization is 3 seconds (every 3 seconds a random agent is chosen for updating). According to this information, and using Equation 54, the equilibrium point which drive the system to a zero error state is: { p̂1 =. 0.05484 0.03626. 0 ≤ t < 17 17 ≤ t ≤ 20. hours hours. (87). To test the attractiveness of the equilibrium point above, several simulations were run starting from different initialization points of the relative frequency of strategy p1 (the initialization is the definition of the strategy played by each agent during the first iteration and it is aggregated as a relative frequency)..

(21) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP 21 Evolution of population to equilibrium point. 1 0.9. Relative Frequency p1. 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0. 0. 5. 10 time (hours). 15. 20. Figure 5. Time evolution of population from several initialization points to the time varying equilibrium point. Blue lines: population evolution. Red line: Equilibrium point.. Node Pressure. 56 54. pressure (m). 52 50 48 46 44 42 40. Node Demand (Lt/s). dT=3 N=15 dT=3 N=20 dT=3 N=25 dT=10 N=15 dT=10 N=20 dT=10 N=25 dT=20 N=15 dT=20 N=20 dT=20 N=25. Node Demand. −18 −20 −22 −24 −26 −28 −30 −32 −34. 0. 1. 2. 3 t (hours). (a). 4. 5. 6. −36 0. 1. 2. 3 t (hours). 4. 5. 6. (b). Figure 6. a) Several pressures output for different update time and number of agents. b) Demand of the node. According to Figure (5), the respective equilibrium point attracts and maintain the population from various starting points of 0 < p1 < 1 showing the stability of it. If the population is initialized, with one only strategy (p1 = 0, p2 = 1) or (p1 = 1, p2 = 0), the state of the population will maintain over time because all agents are playing the same strategy and no agent can imitate a different strategy because it is not already on the game.. 4.4. Updating Analysis. This section explore the relationship between the number of agents in each cluster and the appropriate updating time to achieve a proper response time. Figure(6(a)) present different pressure signal for one pipe and two nodes case, depending on the update time and the N number of agents selected. According to Figure (6(b)) between 0 and 2.5 hour the demand is 21 Lt/s and from 2.5 to 6 hour the demands is near to 35 Lt/s. As is presented in Figure(6(a)), depending on the actualization time and the number of agents.

(22) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. 22. Node Pressure for Uncontrolled Case. 60. 60. 50. 50. 40 30 H1 H2 H3 H4 H5 H6 H7. 20 10 0. 0. 5. 10. t (hours). (a). 15. Node Pressure for Controlled Case. 70. pressure (m). pressure (m). 70. 20. 40 30 H1 H2 H3 H4 H5 H6 H7. 20 10. 25. 0. 0. 5. 10. t (hours). 15. 20. 25. (b). Figure 7. a) Nodal pressure for uncontrolled case under unbalanced demand scenario. b) Nodal pressure for controlled case under unbalanced demand scenario. Dotted line is the respective nodal pressure reference. the controller respond (or not) as faster as it needs. There is a inverse relationship between the number of agents and time response. The greater the N number of agents is the smoother the response is and slower the time response is, and the lower the N number of agents is the noisier the response is and faster the time response is. The appropriate time step and number of agents must be selected depending on the time response needed and the noise maximum noise level allowed.. 4.5. Leakage Analysis. In this section is shown the leakage reduction achieved through the action of the pressure controller. In this work, the simpler leakage case is assumed were volumetrical loss are caused by fixed holes in the pipes and are aggregated as flow demand in the nodes. Those holes are called emitters and are modeled by Equation (6). According to (Tucciarelli et al. 1999) and (Pudar and Liggett 1992), in this case is appropriate to use the minimum emitter exponent ηi = 0.5. Nevertheless, (Germanopoulos 1985) proposes emitter exponents ηi > 1 that presents a worst leakage scenario. For all leakage simulation made in this work, all nodes have associated the leakage parameters κi = 5 × 10−4 and ηi = 0.5. Those parameters, under the demand scenarios presented in Section (A) cause emitters with a flow rate of 7 Lt/s approximately. Figures (7(a)) and (7(b)) present the pressure levels for both case controlled and uncontrolled. The simulation time step used is 3 seconds. In the controlled case the number of agents used by each cluster is 625 (square of 25 × 25). This number is greater enough to creates a smooth pressure signal and response with an appropriate speed. Figures (8(a)) and (8(b)) presents the flow loss in both cases controlled and uncontrolled. For a complete day exist an aggregated volumetrical demand of 5.3197 × 106 Lt. In the uncontrolled case the additional leakage loss is 3.7905 × 106 Lt which means a loss percentage of 71.25%. In the controlled case the additional leakage loss is 3.5963 × 106 Lt which means a loss percentage of 67.6%. The use of pressure controller in this case generates a water saving of 0.1942 × 106 Lt each day. Note that here is presented the simpler leakage scenario. In more complex cases the leakage reduction could be significant greater..

(23) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP 23. Node Leakage for Uncontrolled Case (Lt/s). −6 −6.2 −6.4 −6.6. −6.2 −6.4 −6.6. −6.8. −6.8. −7. −7. −7.2. −7.2. −7.4. −7.4. −7.6. −7.6. −7.8. −7.8. −8. Node Leakage for Controlled Case (Lt/s). −6. q1 q2 q3 q4 q5 q6 q7. 0. 5. 10. t (hours). 15. 20. −8. 25. q1 q2 q3 q4 q5 q6 q7 0. 5. 10. t (hours). 15. 20. 25. (b). (a). Figure 8. a) Nodal leakage for uncontrolled case under unbalanced demand scenario. b) Nodal leakage for controlled case under unbalanced demand scenario.. 4.6. Optimal and Distributed PI Pressure Controllers. For comparatives purposes, the control technique proposed here is evaluated against two different controllers, first an optimal controller and then a Distributed PI controller. The first technique is widely used on hydraulics designs and in this case for pressure control purposes (Cembrano et al. 2000, Savic and Walters 1996, Tucciarelli et al. 1999, Vairavamoorthy and Lumbers 1998, Jowitt and Xu 1990, Araujo et al. 2006). It is based on the minimization of certain objective function subject to physical restrictions of the network. The specific controller implemented here is based on (Tucciarelli et al. 1999) and (Vairavamoorthy and Lumbers 1998). Those author present the objective funtion as follows:. minγset =. nT ∑. k. (Hi − Hi. min 2. ) +. nT ∑. ρo (Hi min − Hi ). (88). k=1. k=1. where { ρo =. 0 αo. Hi > Hi min Hi < Hi min. (89). and where αo is a positive constant which penalties pressure values below Hi min . The first term of the Equation (88) (proposed by (Vairavamoorthy and Lumbers 1998)) is the common square error and the second term (proposed by (Tucciarelli et al. 1999)) correspond to a penalty for negative error. Despite the good result presented by the authors, here the objective function uses Hi ref instead of Hi min The reason of this change is that using the original objective function in this pressure system, the pressure level of the node 2 (which is the higher consumption node of the network) is not enough to fully supply the entire network. On the other hand when the controller minimize the error with respect to the pressure reference, good results are obtained. Then, using Equation (17), the complete optimization problem is defined as follows:.

(24) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. 24. minγset k. nT ( ∑ = Hj − Kij |Qij |Qij − k=1. Qij |Qij | − Hi ref ij 2 k [Cv (γset Xm )]. )2 +. nT ∑. ρo (Hi ref − Hi ). (90). k=1. where { ρo =. Hi > Hi ref Hi < Hi ref. 0 αo. (91). where αo is a positive constant which penalties pressure values below Hi ref subject to, i = {1, 2, ..., nn}. (92). 0 < γset k < 1 k = {1, 2, ..., nT }. (93). gi (γset , Q) = 0. where. Qij = 0.45γset k Xm k. √. Hj − Kij |Qij |Qij − Hi. (94). Equation 92 is associated with the flow continuity equation (volumetrical Equation 20). Equation 94 describe the flow as a function of the opening percentage. As the capacity function used here is linear, this set of restriction is linear too. The optimization problem is solved here using genetic algorithms. The second technique implemented for comparison purpose is a PI Distributed Controller. While the optimization technique is a centralized one, this is a completely decentralized technique same as the controller proposed in this work. The structure used here corresponds to the classical discrete PI version, presented next. γset ij (kτ ) = γset ij (kτ − 1) + (KPij + KIij τ )ei (kτ ) − KPij ei (kτ − 1). (95). where τ is the step time, ei is the pressure error of node i, KPij is the proportional constant and KIij is the integral constant. In this case each valve has implemented a PI controller who track their respective pressure level without considering the others controllers. The next section presents various simulation of this control technique.. 4.7. Performance Comparison. In this section is presented two scenarios were each control technique is implemented for performance evaluation. The first scenario corresponds to the balanced demand and the second corresponds to the unbalance demand, both presented in section (A). In all cases each controller receives the information needed from the network every 20 seconds. In the case of distributed PI and optimal control it means a time step of 20 seconds. In the case of the asynchronous distributed controller it means an updating time of 3 seconds. Every 3 seconds an agent (a cluster).

(25) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP 25. Node Pressure for Optimal Controller (Balanced Demand). 70. 60. 50. 50. 30 H1 H2 H3 H4 H5 H6 H7. 20 10 0. 0. 5. 10. t (hours). (a). 15. 20. pressure (m). 60. 50 40. 40 30 H1 H2 H3 H4 H5 H6 H7. 20 10. 25. 0. 0. 5. 10. t (hours). (b). 15. 20. Node Pressure for Distibuted PI Controller (Balanced Demand). 70. 60. pressure (m). pressure (m). Node Pressure for Asynchronous Distributed Controller (Balanced Demand) 70. 40 30 H1 H2 H3 H4 H5 H6 H7. 20 10. 25. 0. 0. 5. 10. t (hours). 15. 20. 25. (c). Figure 9. a) Node Pressure for Asynchronous Distributed Controller case under balanced demand scenario. b) Node Pressure for Optimal Controller case under balanced demand scenario. c)Node Pressure for Distributed PI Controller case under balanced demand scenario.. is randomly selected to give it the opportunity of update. Here, all controllers (PRV clusters) 20s have in average an updating opportunity of 20 seconds ( 8cluster = 2.5s ≈ 3s). Figures (9(a)), (9(b)) and (9(c)) present the output pressure of all nodes in the benchmark network under the balanced demand case, for each controller. The first graphic correspond to the controller proposed here. All pressure levels successfully track the reference despite the variable demand. Nodes 2 and 4 are the nearest nodes to the reservoir and has the higher pressure reference. In consequence, they have the lower error level because they did not carry the accumulated pressure error form other nodes upstream. In fact the rest of nodes carry the accumulated error of these nodes, in consequence the consumption nodes (with a reference near to 30) has a bigger error level. From 0 to 2 hours the system reach the zero state from the initialization point. From 2 to 6 hours the system maintain the zero pressure error. From 6 to 7 hours occurs the consumption peak were the demand in all node increases faster until the maximum level is reach. This quick increase in demand causes a peak error in all nodes. Consumptions downstream nodes experimented the biggest error level in the simulation near to 8 m. In this specific window time, the controller does not have the proper speed to respond (a possible solution will be use a variable updating time that increases in the peak time). Finally From 7 to 24 hours the controller maintain the system in a zero error state. Figure (9(b)), show the pressure level of the network which have implemented the optimal controller. It has an acceptable respond for the upstream nodes (2 y 4), but, despite the rest of nodes follow a pressure reference, the output pressure presents a highly noisy behavior and the system fail to supply (when pressure is zero) downstream nodes in the maximum demand period. In (Tucciarelli et al. 1999) and (Vairavamoorthy and Lumbers 1998) the optimal control technique was tested in networks with great quantity of nodes an a few valves (contrary to this case which even has a sink node who receives water from 3 different points). Note that this control technique requires the time varying friction parameter (Kij ) which has to be estimated (it can not be sense from the system). In this simulation environment, the parameter Kij is directly obtained by the hydraulic simulation algorithm. Figure (9(c)), present the output pressure of the network working under the PI distributed controller. All the integral an proportional constants were manually calibrated to obtain an acceptable respond. This type of controller drives the system very quickly to a zero error state. As a consequence (natural in PI controllers) there is a error peak which in the worst case reach 28m. Those peaks have a very small duration. In this case, the output pressure has no noise (note that the demand is aggregated in periods of half hour. Typically the real demand signal is highly noisy and could degenerate the controller respond). Another scenario is also analyzed here. The unbalanced demand signal presented in section before which has a bigger random component. While in the balanced case all node demands increase or decrease at the same time, here it is very common to see demand variation in all.

(26) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP. 26. Node Pressure for Optimal Controller (Unbalanced Demand). 70. 60. 50. 50. 30 H1 H2 H3 H4 H5 H6 H7. 20 10 0. 0. 5. 10. t (hours). 15. (a). 20. pressure (m). 60. 50 40. 40 30 H1 H2 H3 H4 H5 H6 H7. 20 10. 25. 0. 0. 5. 10. t (hours). (b). 15. 20. Node Pressure for Distibuted PI Controller (Unbalanced Demand). 70. 60. pressure (m). pressure (m). Node Pressure for Asynchronous Distributed Controller (Unbalanced Demand) 70. 40 30 H1 H2 H3 H4 H5 H6 H7. 20 10. 25. 0. 0. 5. 10. t (hours). 15. 20. 25. (c). Figure 10. a) Node Pressure for Asynchronous Distributed Controller case under unbalanced demand scenario. b) Node Pressure for Optimal Controller case under unbalanced demand scenario. c)Node Pressure for Distributed PI Controller case under unbalanced demand scenario.. direction each half hour. This is a more challenging scenario for the controllers. Figure (10(a)) shows the proposed controller respond. All the pressures maintain a very similar behavior as the case before, but the pressure error during the maximum demand period now is bigger reaching even 15m in the worst case. This error peak correspond to node 5 which is the sink node. This pressure level is influenced by three different valves making it the most difficult node to control. In this demand scenario the second demand peak between 16 and 18 hour now generates a considerable error specially in node 5. Figure (10(b)) presents the network pressure performance under the optimal controller. Same as before the pressure signal is highly noisy and the controller is not capable to supply all nodes all the time. The demand changes each half hours now generates an even more noisy signal. Figure (10(c)) shows the PI performance. It is very similar to the case before, but the demand changes cause a bigger error peak each half our. Despite those peaks have a small duration time, several times the down streams nodes are not supplied with water (the worst case). In a real context, the extremely rapid changes in pressure could broke pipes or damage other parts of the network. 4.7.1. Delay Analysis. In this section the robustness of the proposed controller is explorer to delays in the acquisition system. Here, every sensed variable (flow Qij and pressure Hi and Hj ) that is read by each controller has a time delay (a common problem in networked systems). In this case, each controller takes its decision based on information captured one time step in the past (t − ∆t). The unbalanced demand scenario is used and the controller performance is compared against the optimal and PI Distributed controllers. Figure (11(a)) presents the performance of the proposed controller. It has a very similar response as the unbalance case before. The only difference is an increasing in the error peaks of downstream nodes during a very short period. Figure (11(b)) presents the response of the optimal controller only during a period of 1.6 hour because the optimization algorithm fails to find a feasible solution. It needs updated information to offer an acceptable response. Figure (11(c)) presents the performance of the Distributed PI controller. Despite the controller had a good response and reached and maintained a zero error state in the other cases (without delays), it need the information of pressure exactly in the moment that happen. A single delay makes impossible the controller track the reference and finally drives the system to a highly oscillatory unstable state as we can see in the figure. As we can saw in Figure (11(a)), the proposed controller maintains the network in the reference pressure surface despite the delay data. It works even in the special case with a 10 iteration delay (Figure(12(a))). In this case the controller tracks references. This performance is supported in the asynchronously feature. No matter the arrival time of the information, the controller (specifically each agent strategy choice) drives the system to a stable equilibrium point. The updating time.

(27) January 20, 2012. 11:46. International Journal of Control. Bitacora˙EGT˙RDAP 27. Node Pressure for Optimal Controller (Unbalanced Demand). 70. 60. 50. 50. 30 H1 H2 H3 H4 H5 H6 H7. 20 10 0. 0. 5. 10. t (hours). 15. 20. pressure (m). 60. 50 40. 40 30 H1 H2 H3 H4 H5 H6 H7. 20 10. 25. 0. 0. 0.2. 0.4. 0.6. (a). 0.8 t (hours). 1. 1.2. 1.4. Node Pressure for Distributed PI Controller (Unbalanced Demand). 70. 60. pressure (m). pressure (m). Node Pressure for Asynchronous Distributed Controller (Unbalanced Demand) 70. 40 30 H1 H2 H3 H4 H5 H6 H7. 20 10 0. 1.6. 0. (b). 5. 10. t (hours). 15. 20. 25. (c). Figure 11. a) Node Pressure for Asynchronous Distributed Controller case under unbalanced demand scenario with a time delay of 1 time step. b) Node Pressure for Optimal Controller case under unbalanced demand scenario with a time delay of 1 time step. c)Node Pressure for Distributed PI Controller case under unbalanced demand scenario with a time delay of 1 time step.. Node Pressure for Asynchronous Distributed Controller (Unbalanced Demand) 70 60. pressure (m). 50 40 30 H1 H2 H3 H4 H5 H6 H7. 20 10 0. 0. 5. 10. t (hours). 15. 20. 25. (a) Figure 12. Node Pressure for Asynchronous Distributed Controller case under unbalanced demand scenario with a time delay of 10 time steps.. influences directly the response time. The shorter the interval time is, the faster the response of the controller can execute. 4.7.2. IAE Performance Index. The performance of the control techniques implemented here is also compared using the index IAE (Integral of Absolute Error), defined by, ∫. 24. IAEi =. |ei |dt. (96). 0. For each simulation, the IAE index has been calculated for all consumption nodes and its sum is considered the total performance index. Tables 4, 5, 6 and 7 present respectively the performance index of the simulations presented above: balance demand scenario, unbalanced demand scenario, delay scenario (kτ = 1) and delay scenario (kτ = 10). For comparatives purposes, the IAE index has been evaluated for each controller under different valve openings initialization scenarios. All scenarios consider different openings of the PRVs at time t = 0 as it is presented in Table 8, and have been proven for each control technique as is presented in Tables 9, 10 and 11..

Referencias

Documento similar

Supported ionic liquid phase (SILP) technology is based on an IL thin film containing a homogeneous catalyst, which is uniformly distributed in the pores and

After filtration of the drying agent, the solvent was removed under reduced pressure, and the residue purified by column chromatography on silica gel (eluent: heptane/ethyl

Firstly, an environment- categorization phase, where an on-line pattern recognition and catego- rization of the current agent sensory input data is carried out by a self

To calculate the deformation of the structure, it was used a Finite Element Model for a specific geometry and an evaluation of the variation of the pressure field is done to

The proposed solution is an extension to the IETF standard network mobility support protocol and relies on the communication through multiple geographically distributed Home Agents

This paper proposes a peer-to- peer based solution, called Peer-to-Peer Home Agent Network, in order to discover a close Home Agent.. The proposed solution is simple, fully

The proposed solution is an extension to the IETF standard network mobility support protocol and relies on the communication through multiple geographically

• Using OpenMP to parallelize the NPROMA blocks gather, the execution time is reduced by 68 seconds. • It is really important to make an scalable gather, because it could become