Appraising the Impact of Pressure Control on Leakage Flow in Water Distribution Networks

: Water losses in Water Distribution Networks (WDNs) are inevitable. This is due to joints interconnections, ageing infrastructure and excessive pressure at lower demand. Pressure control has been showing promising results as a means of minimising water loss. Furthermore, it has been shown that pressure information at critical nodes is often adequate to ensure effective control in the system. In this work, a greedy algorithm for the identiﬁcation of critical nodes is presented. An emulator for the WDN solution is put forward and used to simulate the dynamics of the WDN. A model-free control scheme based on reinforcement learning is used to interact with the proposed emulator to determine optimal pressure reducing valve settings based on the pressure information from the critical node. Results show that ﬂows through the pipes and nodal pressure heads can be reduced using this scheme. The reduction in ﬂows and nodal pressure leads to reduced leakage ﬂows from the system. Moreover, the control scheme used in this work relies on the current operation of the system, unlike traditional machine learning methods that require prior knowledge about the system.


Introduction
The existence of leakages in water supply systems is inevitable. The nature of their interconnection renders them susceptible to wear and tear and therefore resulting in water losses. Management of these leakages now becomes a critical task considering the scarcity of the resource, mostly in sub-Saharan Africa.
For water distribution networks (WDNs), leakage minimisation has been the subject of research dating from the early 80s [1]. With the ageing water supply infrastructures, water utilities and municipalities are faced with more frequent occurrences of pipe breaks and increased leakages. In South Africa, it is estimated that annually, 7 billion ZAR is lost as a result of leakages on the nodes, pipes or valves [2,3]. Furthermore, the United State of America experiences almost 20% of water loss due to leakages [4].
Globally, the demand for water supply has increased due to steady population growth [5]. However, a significant portion of water is lost as a result of leakages in WDNs [6]. However, it is asserted in [7] that reducing the leakage component to zero is neither technically nor economically feasible. Water loss may pose a great threat to the availability of this important scarce resource [8]. The quantity of water lost due to leakages varies from different networks. The operation, state of the network and the location of the network determine the quantity of water lost.
To date, pressure management is a strategy under research for effective leakage minimisation [9][10][11][12]. Installation of pressure reduction valves (PRVs) and their appropriate setting has the potential to reduce the pressure profile of the network [13]. In addition, this intervention was shown to not affect the water age and quality [14]. However, the type of the PRVs and the control strategy to be used may need to be carefully selected, given that the laboratory tests in [15] showed some pressure oscillation when using the piston-actuated PRVs. Furthermore, it was shown in [16] that model formulation of the said PRVs bears relevance in the solution of the nonlinear programming (NLP) formulated for pressure control.
Consequently, various strategies are being proposed to determine the appropriate setting of PRVs based on hydraulic simulation of the network. Radical advances in control theories are unlocking the potential for effective leakage management in a water distribution network (WDN) and enhanced efficiency in their operation. The foundation for applications of control theories is based on fixed outlet pressure control (FOPC), timemodulated pressure control approach (TMPC), flow modulated pressure control (FMPC), closed-loop pressure control (CLPC) [5,17,18].
Various strategies ranging from classical [19] to more recent advanced [20] control laws are being used for PRVs settings. The shortfall of control precision of classical control laws was raised in refs. [21,22]. As a result, efforts to mitigate the shortfalls are evident in [21] where the fuzzy-based system was integrated into the classical PID controller for pressure control. Furthermore, Page et al. proposed a parameter-less P controller to adjust the pressure in WDN instead of classical P-controller. Further improvements could are considered in [23] and the stability of the controller, approaches for stability improvements are put forward. The strength of the proposed improvement relates to their performance as the demand offset becomes higher. Advanced control schemes, such as model predictive control [24,25] and adaptive reference control [26,27], were also applied for pressure regulation in water distribution. The strength of these schemes lies in the fact that they re-develop a control problem into an optimisation problem [28]. Different optimisation formulations exist for pressure regulation in water supply systems. More recently, a nonconvex NLP-based control scheme was proposed in [29]. This scheme was seen to be superior to the state-of-the-art global optimisation solvers Without a consensus in optimisation formulation, this area has been left open to further development. In addition, the Water 4.0 [30] imperatives could lead to a need for further improvement in the optimisation formulation given that the possibilities of sensing and communication are opening up. An extension of the work is presented in [31], whereby the grey-box model developed from simulated step response experiments consists of sum of transport delays.
An inherent problem in pressure is the availability of adequate measurements. However, it was shown in [26] that partial pressure information from a critical node could be used to effectively control the system's pressure. In [32], a graph theory approach was adopted to identify vulnerable components of the WDN. It was observed that 77% of the identified critical links are connected to the actuator node. Kazeem et al. identify critical links as pipes with leakages above the given threshold [2].
This work proposes the utilisation of a model-free scheme to control pressure via settings of PRVs. The model-free scheme comprises the water network emulator based on a quadratic approximation of the hydraulic simulation. A reinforcement learning scheme is put forward as a controller, interacting with the hydraulic simulation's emulator and providing an optimal setting for pressure-reducing valves in water distribution networks. The strength of this scheme could be attributed to its ability to generate control settings without interaction with the model. This could be useful in case that an ageing infrastructure needs to be managed in order to reduce water and prevention of introduction of a harmful agent into the water network. In addition, this work put a novel greedy algorithm for the identification of the critical node in WDNs. The significance of the identification of these nodes stems from the fact that they could be easily experienced under or overpressure as the demand varies and special treatment must be given by the control agent.
The rest of the paper is organised as follows: In Section 2 the model for the hydraulic simulation of the WDNs is presented. In addition, the procedure for the determination of critical nodes is also given in Section 2. Section 3 gives the formulation of of the quadratic approximation and the reinforcement learning approach used for PRVs control. The leakage flow model is given in Section 4. The results of the numerical experiment and their discussions are presented in Section 5, while some concluding remarks are given in Section 6.

Water Distribution Network Modelling
Ordinarily, the solution (hydraulic simulations) of the water distribution networks (WDNs) is obtained by solving the system of equations in (1) In Equation (1), Q and L are the flows through the pipes and the quantity of water withdrawn at the demand nodes. The known pressure head at the supply nodes is denoted by h s , while h l represents the pressure head at the demand nodes. A is the diagonal matrix of head losses along the pipes. C s and C l represents the components of the decomposed incidence matrix. The incidence matrix is defined as:

Identification of Critical Node
A critical node in WDNs is commonly referred to as the sensitive node (i.e., the node with highest pressure head variation as the demand changes) [33,34]. This node could easily encounter under or over pressure as the varies over the day. To identify the critical node, this work expresses the sensitive index as and where h re f is the reference head pressure. For the demand at period i, a vector ranking nodes in descending order of the head variation could be written as where S 1 is the node with the highest variation and S n has the lowest variation. Given the variation threshold as Θ, nodes with a variation that is less than Θ could be eliminated to have a vectorS with length z. The number of critical nodes z is predetermined and remains the same for all variations (i.e., for each variation, only z nodes are taken as critical). For m demand variation, the critical node's index (CNI) matrix is obtained as A vectorC NI could be obtained by reshaping CN I.C NI 1 will be the node with the highest appearances in CN I and the one having the largest variations. The solution to the critical node identification can be obtained using a greedy algorithm in Algorithm 1. Run hydraulic simulation (Equation (1)); if all demands has been used then 13 Convergence ← True 14 Reshape CN I to be vectorC NI,C NI 1 , the node with the highest variation ; 15 returnC NI 1 ;

Model-Free Approach
Determination of optimal settings of the PRVs has been widely used to control the pressure in WDNs. However, in most cases, only limited measurements are available to make a judgement on the state of affairs. However, it has been shown that the information on the critical node could be sufficient to give an overall picture of the pressure in the system [26]. In addition, control based on these selected nodes can affect the excessive pressure in other nodes [35].
Given a set of measurement of pressure at a critical node (h cn,i ) with corresponding demand L i , the control problem would be to determine optimal PRVs settings to regulate the pressure within the given bounds. Using model-based approaches, these settings could be determined and the generated dataset be used to develop an emulator for the process [31]. The emulator could be in the form of a function p, such that, In view of the quadratic nature of the WDN in Equation 1, this work uses a quadratic function as where x is a vector of comprising of a set of control inputs and the demand (i.e., x = U L ). γ and β are the matrices of coefficients of the quadratic formula and c is the constant. In matrix form, Equation (8) can be expressed as Optimal PRVs Control In this work, a reinforcement learning approach to determine the optimal control of the PRVs is presented. As a subset of machine learning, reinforcement learning differs from the supervised and unsupervised scheme in that it interact with the agent that is controlling and therefore makes it more suitable for dynamic environments.
In Figure 1, the state (s) and action (a) are the demand (L) and the proposed PRV settings (U). The reward r is given to the agent, and it is based on the effectiveness of the proposed action (i.e., based on the value function V(s)). The agent is rewarded with a positive integer if the actions proposed yield satisfactory results and a negative integer for the opposite. To avoid undesirable conditions, the actions are constrained to be 0 < a ≤ 1, 0 being a fully closed valve and 1 as a fully open valve. The resulting r and a are used to update the control policy π of the agent. A value iteration algorithm is used in this work to update the policy of the agent. The flowchart of the algorithm is shown in Figure 2.

Leakage Flow Model
Leakages in WDNs occur in both the nodes and along the pipes. The leakage flow along the pipe could be expressed as where β and l are the leakage discharge coefficient and length of the pipe, respectively. The mean pressure along the pipe in Equation (10) is represented by H. For N b number of pipes, Equation (10) can be written in vector format as The topological matrix in Equation (2) may be used to describe the H as where Ψ = |C| (13) It can be seen in Equations (10) and (11) that the pressure along the pipes and the actual length of the pipes have a directly proportional relationship to the quantity of water leaks along the pipes.  Application of Algorithm 1 with the maximum and minimum residential demand pattern in [36] identified node 59 as the critical node. The sensitivity index rankings are presented in Table 1 for maximum and minimum demand. Evidently, it can be seen that the maximum demand yields the highest sensitivity index. This can be attributed to a dip in pressure head and therefore leading to a higher ∂h i . The flow in normal pipes and leakage flows are shown in Figure 4. It can be seen that the leak is in fact a fraction of the total flow. However, given the scarcity of water resources, these losses cannot be afforded. Furthermore, since it occurs continuously over time, the effect of this loss could be detrimental. Moreover, these leaks could introduce infections into the network should the pressure not be properly managed and if there are inflows through the orifices [11]. Figure 5 shows the effect of the implementation of the control scheme proposed. Evidently, the flow through the pipes is reduced. This can be attributed to the fact that pressure-reducing valves (PRVs) reduce the effective diameter of the pipes where they are installed. The reduced flow in the pipes leads to reduced leakage flows. Moreover, unnecessary flows are alleviated and therefore reduce the stresses commonly confronting the pipes with low nodal withdrawals. Nodal leakage flows are presented in Figure 6. It can be seen that the leakage flows through the nodes are reduced. This is the direct evidence of pressure control interventions. The results support various studies carried out in the literature [12,13,35,37,38]. It can further be seen that nodes with the highest leakages prior to pressure control have the greatest reduction in leakage flow post the implementation of the proposed scheme. The largest reduction from Figure 6 stands at 10.64% while the lowest is at 1.71%. As expected, the node with the highest leakage flow reduction is at a lower stream of the PRV (Pipe 102). The node with the lowest decrease (Node 18) has no PRV connected to it. Nevertheless, this shows that few PRVs connected in the network affect the operation of the system.

Results and Discussion
Among the methods reviewed in [39,40], it was evident that machine-learning-based techniques would play a huge role in the future of WDN management. Nevertheless, the methods then relied heavily on the existence of the huge dataset of measurements to build the model. The reinforcement learning scheme applied in this work does not require previous information (flows along the pipes and pressure heads at withdrawal nodes) to operate the network optimally. The scheme relies heavily on the interaction with the system and the reward receives. The model-free emulator for WDNs applied in this work, also provides an avenue to resolve the computational issues commonly raised by various authors [41,42].

Conclusions
In this work, the impact of pressure control on leakage flows is investigated. A novel model-free control scheme was proposed and implemented in a simulated WDS. An emulator is used to avoid the computational complexities raised previously in the literature. Evidently, the method proposed in this work has the capacity to emulate and produce PRV settings to control the pressure. The pressure control scheme applied in this work has effectively reduced the leakages in the water supply system. This could be attributed to the relationship between water and pressure at the withdrawal points. It was found that the highest percentage reduction peaked at 10.64% for a node that is directly connected to the PRV. The proposed is also effective for nodes that are remote to PRVs, with a minimum 1.71% leakage reduction recorded for these nodes. In addition, the minimisation of the leakages could reduce the rate at which the orifices expands. Moreover, the scheme proposed in this work does not rely on prior knowledge of the system to propose the control settings. Unlike the supervised and unsupervised learning schemes, reinforcement learning learns and improves as it interacts with the system under control.
Future research could be directed on the development of the quadratic approximation on measurements obtained from a real network and the application of a reinforcement learning controller.

Conflicts of Interest:
The authors declare no conflict of interest. Table A1. Pipe data for case study network 2.  Table A2. Node data for case study network 2.