Sequential Convex Optimization for Detecting and Locating … · 2020. 6. 1. · 7...

41
Sequential Convex Optimization for Detecting and Locating Blockages in 1 Water Distribution Networks 2 Filippo Pecci 1 , Panos Parpas 2 , and Ivan Stoianov 3 3 1 Dept. of Civil and Environmental Engineering (InfraSense Labs), Imperial College London, 4 London, UK (corresponding author). Email: [email protected] 5 2 Dept. of Computing, Imperial College London, London, UK. Email: 6 [email protected] 7 3 Dept. of Civil and Environmental Engineering (InfraSense Labs), Imperial College London, 8 London, UK. Email: [email protected] 9 ABSTRACT 10 Unreported partially/fully closed valves or other type of pipe blockages in water distribution 11 networks result in unexpected energy losses within the systems, which we also refer to as faults. 12 We investigate the problem of detection and localization of such faults. We propose a novel 13 optimization-based method, which relies on the solution of a non-linear inverse problem with 14 1 regularization. We develop a sequential convex optimization algorithm to solve the resulting 15 non-smooth non-convex optimization problem. The proposed algorithm enables the use of non- 16 smooth terms within the problem formulation, and exploits the sparse structure inherent in water 17 network models. The performance of the developed method is numerically evaluated to detect and 18 localize blockages in a large water distribution network using both simulated and experimental 19 data. In all experiments, the sequential convex optimization algorithm converged in less than three 20 seconds, suggesting that the proposed fault detection and localization method is suitable for near 21 real-time implementation. Furthermore, we experimentally validate the developed method for near 22 real-time fault diagnosis in a large operational water network from the UK. The method is shown 23 to successfully detect and localize blockages, with real system modelling uncertainties. 24 1 Pecci, January 21, 2020

Transcript of Sequential Convex Optimization for Detecting and Locating … · 2020. 6. 1. · 7...

  • Sequential Convex Optimization for Detecting and Locating Blockages in1

    Water Distribution Networks2

    Filippo Pecci1, Panos Parpas2, and Ivan Stoianov33

    1Dept. of Civil and Environmental Engineering (InfraSense Labs), Imperial College London,4

    London, UK (corresponding author). Email: [email protected]

    2Dept. of Computing, Imperial College London, London, UK. Email:6

    [email protected]

    3Dept. of Civil and Environmental Engineering (InfraSense Labs), Imperial College London,8

    London, UK. Email: [email protected]

    ABSTRACT10

    Unreported partially/fully closed valves or other type of pipe blockages in water distribution11

    networks result in unexpected energy losses within the systems, which we also refer to as faults.12

    We investigate the problem of detection and localization of such faults. We propose a novel13

    optimization-based method, which relies on the solution of a non-linear inverse problem with14

    `1 regularization. We develop a sequential convex optimization algorithm to solve the resulting15

    non-smooth non-convex optimization problem. The proposed algorithm enables the use of non-16

    smooth terms within the problem formulation, and exploits the sparse structure inherent in water17

    network models. The performance of the developed method is numerically evaluated to detect and18

    localize blockages in a large water distribution network using both simulated and experimental19

    data. In all experiments, the sequential convex optimization algorithm converged in less than three20

    seconds, suggesting that the proposed fault detection and localization method is suitable for near21

    real-time implementation. Furthermore, we experimentally validate the developed method for near22

    real-time fault diagnosis in a large operational water network from the UK. The method is shown23

    to successfully detect and localize blockages, with real system modelling uncertainties.24

    1 Pecci, January 21, 2020

  • INTRODUCTION25

    Water distribution networks (WDNs) are faced with multiple challenges due to aging infras-26

    tructure, growing water demand, and more stringent environmental standards. Advanced pressure27

    control schemes are being implemented to improve WDN management and operation (Wright et al.28

    2015; Pecci et al. 2019), and enable the dynamically adaptive control of both hydraulic conditions29

    and network connectivity (Wright et al. 2014). These advances have resulted in an increased level30

    of instrumentation (e.g. pressure control valves, isolation valves) throughout the network. In order31

    to benefit from these technological innovations, accurate hydraulic models, together with monitor-32

    ing and diagnostic tools, are critical to support intelligent and efficient network operation. In this33

    work, we consider WDNs whose hydraulic models have been calibrated to achieve a level of accu-34

    racy that is compliant with model calibration guidelines (Water Research Centre 1989). After the35

    initial model calibration, monitoring and diagnostic tools are necessary to continuously validate36

    and maintain the hydraulic model performance.37

    This paper investigates the detection and localization of blockages, which are due to unreported38

    changes to status or location of valves, following various network interventions, or other type of39

    blockages (e.g. the accumulation of particles at strainers of flow meters). In the following, block-40

    ages are interchangeably referred to as faults. These faults cause unexpected energy losses (local41

    losses), and result in inaccurate hydraulic models, affecting WDNs operation. We formulate42

    the problem of detection and localization of blockages in WDNs as a non-linear inverse problem,43

    where we estimate the blockage location using measured hydraulic data - for a review on inverse44

    problems, see (Aster et al. 2012). Non-linear inverse problems have been previously studied to45

    address a variety of estimation problems in WDNs. Some examples include hydraulic model cali-46

    bration (Kapelan 2002; Piller et al. 2012; Kang and Lansey 2011; Do et al. 2016), state estimation47

    (Preis et al. 2011; Piller et al. 2014), and leak detection (Pudar and Ligett James 1992; Sopho-48

    cleous et al. 2019). Previous methods to identify partially/fully closed valves include Delgado49

    and Lansey (2009), Wu et al. (2012), and Do et al. (2018). Delgado and Lansey (2009) imple-50

    mented a transient model to detect a closed valve in a single pipeline. In comparison, studies by51

    2 Pecci, January 21, 2020

  • Wu et al. (2012) and Do et al. (2018) formulated and solved an inverse problem to calibrate valve52

    local loss coefficients in WDNs. In particular, Do et al. (2018) implemented a combination of53

    a genetic algorithm with a Levenberg-Marquardt method to identify the location of partially/fully54

    closed valves in a water network with 147 pipes, with a reported overall computational time of55

    more than 4 hours. As observed by Do et al. (2018), methods implemented in previous literature56

    require a significant computational effort and are not suitable for near real-time implementations57

    of monitoring and diagnostic tools when large scale WDNs are considered.58

    The inverse problem of detection and localization of blockages in WDNs is ill-posed, due to the59

    availability of fewer measurements than possible fault locations (Do et al. 2018). A standard tech-60

    nique to solve ill-posed inverse problems is based on `2 (or Tikhonov) regularization (Neumaier61

    1998), which was implemented by Piller et al. (2012) to regularize a joint hydraulic and water62

    quality model calibration problem. The resulting optimization problem was then solved using a63

    Gauss-Newton method. In this study, we assume that most of the potential faults (blockages) are64

    not present at the same time. Therefore, the vector of fault states is expected to be sparse. In com-65

    parison to `2 regularization, `1 regularization techniques are more effective in promoting sparsity66

    within the solution vector (Tibshirani 1996), and they are commonly employed for sparse signal67

    recovery (Donoho 2006). The implementation of `1 regularization within inverse problem formu-68

    lations for fault estimation has been considered in other engineering frameworks (Gorinevsky et al.69

    2009). However, to the best of the authors knowledge, `1 regularization techniques has not been70

    applied to fault diagnosis problems in water networks.71

    In this paper, we propose a novel inverse problem formulation to detect and localize blockages72

    in WDNs. The considered formulation aims to detect and localize a blockage by estimating the73

    corresponding fault state, defined as deviation from the nominal state of the head difference across74

    a given pipe or valve. Our problem formulation is simplified with respect to the non-linear model75

    used by Wu et al. (2012, Do et al. (2018) to calibrate local loss coefficients. The objective func-76

    tion to be minimized relies on the sum of squares residuals (Pudar and Ligett James 1992; Kang77

    and Lansey 2011; Piller et al. 2012; Piller et al. 2014; Do et al. 2018). Moreover, we add a `178

    3 Pecci, January 21, 2020

  • penalty term to promote sparsity within the fault state vector. Standard gradient-based optimiza-79

    tion methods implemented in previous literature (Pudar and Ligett James 1992; Kang and Lansey80

    2011; Piller et al. 2012; Piller et al. 2014) are not suitable for solving the considered `1 regular-81

    ized inverse problem, which result in a non-smooth non-convex optimization problem. Therefore,82

    we propose a sequential convex optimization algorithm to solve the considered non-smooth non-83

    convex optimization problem. The developed algorithm relies on the solution of a series of convex84

    sub-problems within a trust region algorithm (Conn et al. 2000). The proposed solution algorithm85

    exploits the sparse structure inherent in WDN models, which is retained by the constraints of the86

    convex sub-problems. In contrast to previous literature (Kang and Lansey 2011; Piller et al. 2012;87

    Piller et al. 2014), the developed algorithm does not require the computation of the full inverse of88

    large matrices to evaluate the derivatives of the residual vector with respect to the unknowns.89

    Benefits and limitations of the proposed method are investigated using a large operational wa-90

    ter network as a case study. Firstly, we test the ability of the method to accurately detect and91

    localize single and multiple faults using simulated data. Furthermore, we demonstrate and validate92

    a near real-time implementation of the developed fault detection and localization method using93

    experimental data from the considered case study.94

    PROBLEM FORMULATION95

    In the following, we formulate the problem of detection and localization of blockages in WDNs96

    by using a single snapshot of network operation. For multiple demand conditions, the proposed97

    fault detection and localization method is implemented sequentially to solve an inverse problem at98

    each time step. We consider a WDN with np links (e.g. pipes and valves), nn demand nodes, and99

    n0 known head nodes (e.g. water sources, reservoirs). Known nodal demands are defined by the100

    vector d ∈Rnn (measured in m3/s). The hydraulic heads at water sources (e.g. reservoirs, network101

    inlets) are known. The vector of known hydraulic heads is given by h0 ∈Rn0 (measured in meters).102

    In addition, we assume that when the network model includes pumps and tanks, hydraulic heads103

    at pump and tank outlets are measured. In this case, we can remove pumps and tanks from the104

    network, modelling them as known hydraulic heads nodes. We denote with h ∈ Rnn the vector105

    4 Pecci, January 21, 2020

  • of unknown hydraulic heads (measured in meters), while the vector q ∈ Rnp represents unknown106

    flow rates across network links (measured in m3/s) . In addition, frictional head losses within link107

    j ∈ {1, . . . ,np} are modelled by a function φ j : R→ R defined as:108

    φ j(q j) = r jq j|q j|n j−1, (1)109

    Resistance coefficient r j and exponent n j take different values depending on the energy loss model110

    used. When link j corresponds to a valve, we set n j = 2 and r j = 8K j/(gπ2D4j), where K j and111

    D j are valve local loss coefficient and diameter, respectively (Larock et al. 1999, Section 2.2.5).112

    In comparison, when link j represents a pipe, different frictional energy loss models can be used.113

    Darcy-Weisbach (D-W) and Hazen-Williams (H-W) formulae are two commonly used frictional114

    energy loss models (D’Ambrosio et al. 2015) - see also the Appendix. Both the D-W and H-W for-115

    mulae have unbounded second order derivatives around the origin (D’Ambrosio et al. 2015). How-116

    ever, their first order derivatives are continuous (Abraham and Stoianov 2016). In the numerical117

    experiments presented in this manuscript, we consider the hydraulic model of a large operational118

    WDN from the UK, where D-W formula is used to represent frictional energy losses. In this case,119

    we have n j = 2, while r j depends implicitly on the flow q j. Here, we formulate the D-W friction120

    head loss model using the explicit approximation implemented in the hydraulic modelling soft-121

    ware EPANET (Rossman 2000) - see the Appendix and Simpson and Elhay (2010) for a detailed122

    formulation. When other frictional energy loss formulae are used, the considered fault detection123

    and localization problem results in analogous formulations to what described in the following.124

    Given a link ij−→ k, let u j be the corresponding fault state (measured in meters). The energy125

    conservation equation is written as126

    hi−hk = φ j(q j)+u j. (2)127

    In contrast to previous literature (Wu et al. 2012; Do et al. 2018), we model faults caused by128

    blockages as slack variables, which appear linearly within the energy conservation equations. As129

    5 Pecci, January 21, 2020

  • a result, the proposed formulation has a reduced degree of non-linearity with respect to previously130

    published methods (Wu et al. 2012; Do et al. 2018). When u j = 0 in (2), there is no fault at link131

    j and the head difference is equal to the frictional energy loss. On the contrary, when u j 6= 0, the132

    head difference does not correspond to the frictional energy losses. Hence, an anomaly is detected133

    on link j. When modelling and measurement errors are present, to determine if an actual fault134

    (blockage) occurred, we consider the magnitude of u j, compared to the level of uncertainty - see135

    Figure 9a and the related discussion in the Case Study section.136

    In order to write (2) for all links in matrix form, we introduce the edge-unknown head node137

    incidence matrix A12 ∈ Rnp×nn defined as138

    A12( j, i) =

    1 if link j enters node i

    0 if link j is not connected to i

    −1 if link j leaves node i

    (3)139

    Analogously, we define the edge-known head node incidence matrix A10 ∈ Rnp×n0 . The energy140

    conservation equations can be written in compact form as:141

    φ(q)+A12h+A10h0 +u = 0 (4)142

    where vector u ∈ Rnp represents the unknown fault states. Furthermore, the conservation of mass143

    is formulated as:144

    AT12q−d = 0 (5)145

    Let x = [qT hT ]T ∈ Rnp+nn be the vector of hydraulic states. Then, the network conservation laws146

    can be written as:147

    f(x,u) :=

    φ(q)+A12h+A10h0 +uA12T q−d

    = 0. (6)148We observe that function f(·) is continuously differentiable (Abraham and Stoianov 2016) and we149

    6 Pecci, January 21, 2020

  • have150

    ∂ f(x,u)∂x

    =

    G(q) A12A12T 0

    (7)151where G(q) denotes the Jacobian matrix of function φ(·). The matrix in (7) has a saddle-point152

    structure, so it is non-singular if and only if Ker(A12T )∩Ker(G(q)) = {0} (Benzi et al. 2005,153

    Theorem 3.2). Such condition holds if and only if the water network model does not include loops154

    with all zero flows (Nielsen 1989; Elhay et al. 2014; Abraham and Stoianov 2016). When this is155

    not verified, the links involved in the loop can all be removed from the network model.156

    In this manuscript, we assume that there exists a vector of flows satisfying the mass conser-157

    vation laws (5). Moreover, we assume that matrix A12 ∈ Rnp×nn is full column rank. Under such158

    assumptions, given a vector of fault states, there exists a unique vector of hydraulic states such that159

    equation (6) is satisfied (Collins and Cooper 1978; D’Ambrosio et al. 2015) - for a detailed proof160

    see Appendix. Therefore, the implicit function theorem guarantees that we can define a continu-161

    ously differentiable function c : Rnp →Rnp+nn such that f(c(u),u) = 0. Function c(u) is evaluated162

    by solving equation (6) for fixed u. This can be achieved using standard algorithms for hydraulic163

    analysis (Todini and Pilati 1988), which are implemented in various commercial or open source164

    software packages (Rossman 2000). In this work, we use the null space algorithm proposed by165

    (Abraham and Stoianov 2016), a computationally efficient implementation of the Newton method166

    tailored for hydraulic analysis.167

    Assume that hydraulic head measurements ĥ ∈Rm1 and flow measurements q̂ ∈Rm2 are avail-168

    able at different locations throughout the network. Set m := m1+m2 and let the vector of measured169

    hydraulic states y ∈ Rm be y := [q̂T ĥT ]T . Define a selection matrix A ∈ Rm×Rnp+nn to select the170

    hydraulic state corresponding to each measurement. Typically, water networks are characterized171

    by scarce measurement data, compared to the number of unknown parameters, i.e. m

  • following regularized non-linear inverse problem:174

    minimizeu

    12‖Ac(u)−y‖22 +λ‖u‖1 (8)175

    where λ ≥ 0 is a positive scalar. The `1 regularization term in (8) is expected to induce spar-176

    sity within the solution vector u∗, i.e. only few components of u∗ will be non-zero (Tibshirani177

    1996). For this reason, `1 regularization has been previously implemented for fault estimation in178

    other engineering frameworks - as example, see (Gorinevsky et al. 2009). However, the formula-179

    tion of fault detection and localization in water networks as a non-linear inverse problem with `1180

    regularization has not been previously investigated. The proposed novel formulation results in a181

    non-smooth non-convex optimization problem.182

    SOLUTION METHOD183

    In this work, we investigate mathematical optimization methods for solving Problem (8). Since184

    second order derivatives of c(·) may not be well defined for some vectors u ∈ Rnp , solution algo-185

    rithms for Problem (8) rely only on first order derivatives of c(·). Previously implemented methods186

    for solving non-linear least-squares problems in WDNs include reduced gradient method (Pudar187

    and Ligett James 1992; Kang and Lansey 2011), and Gauss-Newton based methods (Piller et al.188

    2012; Piller et al. 2014). However, these methods are not suitable when non-smooth terms are189

    included within the objective function. In comparison, here we investigate solution methods for190

    inverse problems whose formulations include convex non-smooth functions. The proposed method191

    enables a variety of objective function modelling choices, which can be be tailored for the appli-192

    cations in study - some examples can be found in (Boyd and Vandenberghe 2004, Chapters 6 and193

    7). Furthermore, numerical methods proposed in previous literature relied on the computation of194

    the full Jacobian matrix of c(·) at each iteration - as examples, see (Kang and Lansey 2011; Piller195

    et al. 2012; Piller et al. 2014). The Jacobian matrix is computed as follows. By definition of c(u),196

    we have197

    f(c(u),u) = 0. (9)198

    8 Pecci, January 21, 2020

  • Differentiating the above equation, we obtain:199

    ∂ f(x,u)∂x

    J(u)+∂ f(x,u)

    ∂u= 0, (10)200

    where J(u) is the Jacobian matrix of function c(·). Water distribution networks have a sparse struc-201

    ture, which is retained by the network conservation laws (6) and matrices ∂ f(x,u)∂x and∂ f(x,u)

    ∂u - see202

    (Abraham and Stoianov 2016). Nonetheless, matrix J(u) is not necessarily sparse. As a conse-203

    quence, solving equation (10) requires significant computational effort when large water networks204

    are considered. In this paper, we implement a solution algorithm that does not require the com-205

    putation of J(u), offering a scalable method to solve the considered problem in large scale water206

    networks.207

    We formulate a sequential convex optimization algorithm for the solution of the non-convex208

    optimization problem (8). Because of non-convexity, mathematical optimization methods to com-209

    pute globally optimal solutions for Problem (8) requires the implementation of global optimization210

    techniques (Tawarmalani and Sahinidis 2002). However, these algorithms require a large com-211

    putational effort, and can be impractical when large water networks are considered (Pecci et al.212

    2018). For this reason, we investigate the implementation of gradient-based optimization algo-213

    rithms, and develop a trust-region based sequential convex optimization algorithm for solving214

    Problem (8). Trust-region techniques are used to evaluate the progress achieved by the sequen-215

    tial convex optimization algorithm, and modify the search space to achieve convergence to locally216

    optimal solutions (Conn et al. 2000, Chapter 11).217

    The considered sequential convex optimization method is an iterative algorithm, which gener-218

    ates a sequence of approximate solutions to Problem (8). Given an iterate uk, a new trial iterate is219

    obtained by minimizing a convex approximation of the original objective function in Problem (8):220

    221

    12‖Ac(u)−y‖22 +λ‖u‖1 ≈

    12‖A(c(uk)+J(uk)(u−uk))−y‖22 +λ‖u‖1 (11)222

    where J(uk) is the Jacobian matrix of c(·) evaluated at uk. The convex function in (11) is expected223

    9 Pecci, January 21, 2020

  • to be a good approximation of the original objective function in a neighbour of uk. Therefore, the224

    minimization of the approximated objective function is restricted to a trust region around uk:225

    minimizeu

    12‖A(c(uk)+J(uk)(u−uk))−y‖22 +λ‖u‖1

    subject to ‖u−uk‖∞ ≤ ∆k(12)226

    where ∆k > 0 is the trust region radius. As discussed in the previous Section, matrix J(uk) is the227

    solution of the adjoint equation:228∂ fk∂x

    J(uk)+∂ fk∂u

    = 0 (13)229

    where ∂ fk∂x :=∂ f(c(uk),uk)

    ∂x and∂ fk∂u :=

    ∂ f(c(uk),uk)∂u . Since matrix J(uk) is not necessarily sparse, solv-230

    ing (13) at each iteration can become impractical when large water networks are considered. In231

    this manuscript, we implement an alternative approach. Firstly, we introduce auxiliary variables232

    and rewrite Problem (12):233

    minimizeu,x

    12‖Ax−y‖22 +λ‖u‖1

    subject to x = c(uk)+J(uk)(u−uk)

    ‖u−uk‖∞ ≤ ∆k

    (14)234

    As observed in the previous Section, we can assume without loss of generality that matrix ∂ fk∂x is235

    non-singular. Hence, Equation (13) implies that236

    J(uk) =∂ fk∂x

    −1 ∂ fk∂u

    (15)237

    Consequently, Problem (14) is equivalent to the following convex problem:238

    minimizeu,x

    12‖Ax−y‖22 +λ‖u‖1

    subject to∂ fk∂x

    (x−xk)+∂ fk∂u

    (u−uk) = 0

    ‖u−uk‖∞ ≤ ∆k

    (16)239

    10 Pecci, January 21, 2020

  • where xk = c(uk). Observe that the equality constraints in Problem (16) preserve the sparsity struc-240

    ture inherent in water distribution network models. Hence, Problem (16) can be efficiently solved241

    by state-of-the-art convex optimization methods (Boyd and Vandenberghe 2004), or specialized242

    algorithms for large scale sparse convex problems (Zheng et al. 2017).243

    The implemented sequential convex optimization method is outlined in Algorithm 1 and Figure244

    1b. The algorithm starts from a given initial solution u0 and computes x0 = c(u0). At iteration k,245

    we solve Problem (16) and obtain trial iterates (x+,u+). Then, we compute the following ratio:246

    ρk =12‖Axk−y‖

    22 +λ‖uk‖1−

    12‖Ac(u

    +)−y‖22−λ‖u+‖112‖Axk−y‖

    22 +λ‖uk‖1−

    12‖Ax+−y‖

    22−λ‖u+‖1

    . (17)247

    The value ρk compares the reduction in the original objective function achieved by (x+,u+),248

    with the predicted reduction. If the ρk is large enough, iteration k is defined as successful and249

    uk+1 = u+,xk+1 = c(u+), while the trust region radius is increased. If ρk is too small, we con-250

    clude that the approximate model is not a good estimate of the original objective function within251

    the current trust region, and the radius is reduced. Then, if a termination criterion is met, the algo-252

    rithm stops. Otherwise, a new iteration is performed. We observe that each iteration of Algorithm253

    1 requires solving one sparse convex problem and one system of non-linear equations (6).254

    The proposed fault detection and localization method relies on the formulation of Problem (8),255

    and the implementation of Algorithm 1 to solve the resulting non-convex optimization problem,256

    with with u0 = 0 and ∆0 = 20. The overall process is summarized in Figure 1. In the next Section,257

    the developed method is tested using a large operational network as case study.258

    CASE STUDY259

    The developed method is implemented to detect and localize blockages occurring in BWFLnet,260

    the hydraulic model of a large operational water network from the UK operated by Bristol Water,261

    Cla-Val, and Imperial College London (Wright et al. 2014) - see Figure 2. Frictional head losses262

    across network pipes are modeled according to the D-W formula (Simpson and Elhay 2010). The263

    network consists of 2546 nodes, 2606 pipes, 545 valves and 2 inlets (known head nodes). BWFLnet264

    11 Pecci, January 21, 2020

  • Algorithm 1 Trust region based sequential convex optimization

    1: Initialization: η = 0.01, γ = 1.1, α = 0.5, ε1 = 10−3, ε2 = 10−42: Select u0 and ∆0;3: Set k = 0 and x0 = c(u0);4: repeat5: Trial iterate computation. Solve Problem (16), let (x+,u+) be the computed solution;6: Acceptance of trial iterate.7: If ρk ≥ η then uk+1 = u+, xk+1 = c(u+), ∆k+1 = γ∆k , and

    relchange =12‖Axk−y‖

    22 +λ‖uk‖1−

    12‖Axk−1−y‖

    22−λ‖uk−1‖1

    12‖Axk−1−y‖

    22 +λ‖uk−1‖1

    ;

    else uk+1 = uk, xk+1 = xk, and ∆k+1 = α∆k;8: until relchange ≤ ε1 or min(|12‖Axk−y‖

    22 +λ‖uk‖1|,∆k)≤ ε2

    is equipped with a dynamically adaptive topology, where two dynamic boundary valves (DBVs)265

    are open during the diurnal operation and closed at night (Wright et al. 2014), while 3 pressure266

    control valves (PCVs) are optimally operated to minimize average zone pressure - see Figure 2.267

    The dynamic boundary valves in BWFLnet are closed between 23:30 and 04:15, and open at 40%268

    for the remaining part of network daily operation.269

    PCVs and DBVs are equipped with sensors, measuring inlet and outlet hydraulic heads, and270

    flow rates. Moreover, flow from both inlets is measured. Additional 27 hydraulic head mea-271

    surements are available from other locations throughout BWFLnet - see Figure 2. All measured272

    hydraulic data used in this manuscript have time steps of 15 minutes. We observe that the net-273

    work model in study is an order of magnitude larger than those considered in previous literature,274

    and it has a lower density of measurement devices - as example see (Do et al. 2018). All ex-275

    periments reported in this section are conducted in MATLAB 2018b-64 bit for Linux, installed276

    on a 2.50 GHz Intel Xeon(R) CPU E5-2640 0 with 12 Cores and 12 GB of RAM. The convex277

    sub-problems within Algorithm 1 are reformulated as quadratic optimization problems and solved278

    using GUROBI (Gurobi Optimization 2017).279

    We expect the quality of the fault diagnosis to depend on sensors number and locations, and280

    the value of the regularization parameter λ . The results reported in the next Sections were ob-281

    12 Pecci, January 21, 2020

  • tained with λ = 10−2. Future work should investigate strategies to select the best regularization282

    parameter. In many applications, a practical approach to select the parameter λ is cross-validation,283

    which requires solving the problem for different values of the regularization parameter, computing284

    a portion of the regularization path (Friedman et al. 2010).285

    In the experiments presented in sub-sections “Single fault scenarios” and “Multiple fault sce-286

    narios”, we assume perfect data information, and we do not explicitly consider the effect of uncer-287

    tainty. The ability of the proposed method to detect and localize blockages in presence of modelling288

    uncertainties is investigated using experimental data in the third sub-section, named “Experimental289

    validation”.290

    Single fault scenarios291

    In order to demonstrate our fault detection and localization method, we generate flow and hy-292

    draulic head measurements by simulating the water network model under different fault scenarios.293

    We set customer demands and hydraulic heads at the inlets to the values corresponding to 08 : 00294

    am, which corresponds to peak demand.295

    Firstly, we evaluate the performance of the method for detecting changes in network connec-296

    tivity, i.e. fault caused by closure of links that are assumed to be open (Wu et al. 2012; Do et al.297

    2018). In order to generate measurement data, we simulate the network under different fault sce-298

    narios. From the set of all network links, we select 1231 links whose closure does not result in299

    isolated nodes, i.e. nodes not connected to any water source - see Figure 2.300

    We simulate N = 1231 different faults, one for each considered link. To simulate each fault301

    (e.g. closed valve), we define a new network model, where the selected link is removed. Hydraulic302

    heads and flows are computed by solving the hydraulic equations for the modified network model,303

    using the null space newton method developed by (Abraham and Stoianov 2016). Let y(1), . . . ,y(N)304

    be the vectors of measurements generated for each fault scenario. Models of operational water305

    networks are subject to multiple sources of data and modelling errors. In these experiments, we do306

    not explicitly consider uncertainty. However, when faults result in residuals that are smaller than307

    the level of uncertainty experienced in WDNs models, methods based on hydraulic models can fail308

    13 Pecci, January 21, 2020

  • to correctly detect and localize them. In addition, faults resulting in small residuals are expected309

    to have limited impact on WDN operation. In this study, we focus our analysis on fault scenarios310

    that result in large residuals. We define the analysed scenarios S as follows311

    S :={

    i ∈ {1, . . . ,N}∣∣∣∣ 12‖Ac(0)−y(i)‖22 ≥ 1

    }(18)312

    For the considered case study, we have |S | = 334 - see Figure 2. For each i ∈ S , we formu-313

    late Problem (8) given measurements y(i), where all network links are considered as possible fault314

    locations (e.g. possible closed valves). Observe that, the formulation of of Problem (8) includes315

    np = 2606 unknowns. We implement Algorithm 1 to solve Problem (8) with λ = 0.01. The inves-316

    tigation of alternative strategies to select the regularization parameter for the considered problem317

    is subject of future work.318

    Results and discussion319

    The developed sequential convex optimization method converge to a solution in all experi-320

    ments, with an average computational time of 0.787 (s). This is a significant reduction compared321

    to the method by Do et al. (2018), where a computational time of more than 4 hours was required322

    to localize closed valves in a case study network smaller than BWFLnet. Let u∗(i) be the vector of323

    parameters computed by solving Problem (8) for fault scenario i ∈S . We expect the `1 regular-324

    ization to promote sparsity in u∗(i), and this is confirmed by the results reported in Figures 3b-3f.325

    Since the number of possible fault locations is 2606, while the total number of available mea-326

    surements is 44, we do not expect an absolute fault localization. Instead, we expect the solution327

    of Problem (8) to be sparse and to provide a set of candidate fault locations. When the absolute328

    value of the fault state assigned to a link is larger than 10−3 meters, we consider such link to be329

    a candidate fault location (e.g. fault hotspot area). Since these experiments are conducted under330

    the assumption of perfect data, such threshold is arbitrary, and it corresponds to the smallest mag-331

    nitude of fault state that we aim to detect and localize. In presence of modelling uncertainty, the332

    threshold can be identified using uncertainty quantification and state estimation techniques (Puig333

    14 Pecci, January 21, 2020

  • 2010; Vrachimis et al. 2018). Therefore, for i ∈S , we define the fault location candidates C (i) as334

    the index set:335

    C (i) :={

    j ∈ {1, . . . ,np}∣∣∣∣ |u∗(i)j | ≥ 10−3}, (19)336

    Figure 3a shows an example of successful fault detection and localization. In this case, the337

    solution of Problem (8) corresponds to a link sequence, which includes the actual closed link. We338

    now focus on inexact and wrong diagnoses. Figure 3c shows an inexact fault localization result,339

    where the fault location was not included in the set of candidates but the correct network branch340

    was identified. Hence, we do not consider this experiment as unsuccessful. In comparison, the341

    results reported in Figure 3e corresponds to the worst fault localization performance. The fault342

    location is not included within the set of candidates and the distance to fault is equal to the 16,343

    the maximum value found in this experiment. Even though the correct part of the network was344

    identified, we consider this case a wrong fault localization.345

    In order to evaluate the overall performance of the implemented fault detection and localization346

    method, we introduce performance criteria based on graph theory. To do so, we first give some347

    essential definitions.348

    Definition 4.1 (Link adjacency). Two links of a WDN graph are adjacent if they have an end in349

    common.350

    Definition 4.2 (Line graph). (Diestel 2000, Section 1.1) The line graph of a WDN graph is a graph351

    whose vertices correspond to the links of the WDN graph. Two vertices in the line graph are352

    adjacent if and only if the corresponding links are adjacent.353

    Definition 4.3 (Connected components). A connected component of a graph (or sub-graph) is a354

    maximal set of nodes such that each pair of nodes is connected by a path. Connected components355

    of a graph (or sub-graph) form a partition of the set of graph (or sub-graph) vertices.356

    Firstly, we introduce a metric to assess the ability of the method to correctly identify the actual357

    fault location as a fault candidate. In particular, we consider the graph distance of the set of can-358

    didates to the actual fault location. Let δ (i) be the minimum length of the shortest paths between359

    15 Pecci, January 21, 2020

  • the fault location and the links in C (i), computed in the line graph of the graph of BWFLnet. We360

    consider the following distribution function361

    F1(t) :=100|S |

    ∣∣∣∣{i ∈S ∣∣δ (i)≤ t}∣∣∣∣. (20)362Figure 4 reports the distribution of the distance to fault in all instances. The actual fault location363

    was included in the set of candidate fault locations in the majority of experiments - resulting in364

    δ (i) = 0. Moreover, the distance from the set of candidates to the actual fault location is less than365

    5 in roughly 80% of the experiments.366

    In order to evaluate the precision of the fault localization method, we consider the cardinality of367

    the set of candidate fault locations as second performance metric. Let χ(i) := |C (i)| be the number368

    of candidate fault locations found in experiment i. We define the following distribution function:369

    F2(t) :=100|S |

    ∣∣∣∣{i ∈S ∣∣χ(i)≤ t}∣∣∣∣. (21)370As shown in Figure 5, the number of selected fault candidates in each experiment is never greater371

    than 31. Considering that the number of possible fault locations is np = 2606, solving Problem (8)372

    has considerably reduced the set of candidate fault locations, in all experiments.373

    Hydraulic models of operational water networks often include link sequences to represent long374

    pipes, or to align hydraulic models and GIS information. As observed by Do et al. (2018), when a375

    link sequence is considered, different combinations of head losses within individual links result in376

    the same overall energy loss along the sequence. Therefore, when few measurements are available,377

    all links involved in the sequence are reported as candidate fault locations - see Figure 3. As a378

    consequence, we consider the fault localization method to be precise when the set of candidate fault379

    locations includes the actual fault, and the sub-graph induced by the candidate links is connected.380

    Hence, as third performance metric, let σ(i) be number of connected components of the sub-graph381

    16 Pecci, January 21, 2020

  • defined by links in C (i). We set382

    F3(t) :=100|S |

    ∣∣∣∣{i ∈S ∣∣σ(i)≤ t}∣∣∣∣. (22)383Figure 6 shows that C (i) corresponds to a single link sequence in the majority of the experiments. In384

    particular, in all successful experiments where the actual fault location is identified as a candidate,385

    the sub-graph induced by the candidate links has a unique connected component, i.e. the set of386

    candidate links is connected.387

    Multiple fault scenarios388

    We evaluate the proposed method to detect and localize multiple simultaneous faults in BWFLnet.389

    In the first experiment, 3 faults were simulated at different locations - see Figure 7a. All links were390

    assumed to be open in the nominal hydraulic model. Faults 1 and 3 correspond to incorrect mod-391

    elling of two partially closed valves. To simulate Fault 1 we set the corresponding valve local loss392

    coefficient to 1000, while Fault 3 corresponds to a valve whose local loss coefficient is set to 500.393

    In addition, Fault 2 corresponds to a closed link, and it is simulated by removing such link from394

    the model before performing the hydraulic simulation - analogously to the previous section. We395

    formulate Problem (8) with λ = 0.01, where the measured hydraulic heads and flows are generated396

    by simulating the 3 faults. Then, we implement Algorithm 1 to compute a solution and define the397

    set of candidate fault locations as in (19) - see also Figure 7b.398

    Results and discussion399

    Similarly to the results reported in the previous section, Algorithm 1 required only 1.12 seconds400

    to converge.The proposed method results in a successful fault detection and localization, with all401

    3 faults being identified. Moreover, the the set of candidate fault locations has exactly 3 connected402

    components - see Figures 7c - 7e. These results are not surprising, the considered links correspond403

    to locations of individual faults that were correctly identified in the single-fault experiments.404

    In comparison, when the set of multiple faults includes a link corresponding to an individual405

    fault that was not successfully identified, the method results in incorrect localization. This is406

    17 Pecci, January 21, 2020

  • illustrated in the following. Analogously to the previous experiment, we simulate three faults in407

    BWFLnet, namely Fault 4, 5 and 6 - see Figure 8a. Again, the nominal hydraulic model considers408

    all links to be fully open. To simulate Fault 4, which corresponds to a partially closed valve,409

    we set the local loss of the corresponding valve to 1000, while we simulate Fault 6 changing the410

    local loss coefficient of the corresponding valve to 500. Finally, Fault 5 corresponds to a closed411

    link. We formulate Problem (8) for fault detection and localization in BWFLnet, with λ = 0.01.412

    Then, Algorithm 1 is implemented to compute a solution to Problem (8). The computational time413

    required to converge is 0.87 seconds. The set of candidate fault locations is defined as in (19) and414

    the results are reported in Figure 8. The implemented method has successfully identified Faults 4415

    and 6, but it has missed Fault 5. Note that the individual failure of the link corresponding to Fault416

    5 was also missed in the previous section experiments.417

    Experimental validation418

    We validate the proposed optimization based fault detection and localization method using419

    experimental data from BWFLnet. In the following, we consider experimental data recorded in420

    BWFLnet, including pressure data from 27 locations, together with inlet and outlet pressure and421

    flow measurements from the PCVs and DBVs. All measured hydraulic data used in this manuscript422

    have time steps of 15 minutes. A complete description of the dataset, together with the measured423

    data, is available at http://dx.doi.org/10.17632/srt4vr5k38.2. The hydraulic model of424

    BWFLnet was calibrated as shown in Waldron et al. (2019) using measured hydraulic data from a425

    24 hr training day. Then, recorded data from a different day (24 hours) was used to validate the426

    developed method. In the formulation of Problem (8), we assume that pressure and flow measure-427

    ments from DBVs are not available and that their opening level is 40% for the all day. As a result,428

    the closure of the DBVs at night results in unexpected energy losses, captured by the recorded data.429

    These energy losses can be considered as the effect of blockages occurring at the DBV locations.430

    We investigate the application of the developed method to detect and localize such blockages using431

    recorded experimental data.432

    At each time step, measured hydraulic heads at inlets and pressure control valves operation433

    18 Pecci, January 21, 2020

    http://dx.doi.org/10.17632/srt4vr5k38.2

  • were modelled within the network conservation laws (6). Moreover, the total measured demand434

    was distributed according to the original demand allocation determined by the network operator,435

    as described in Do et al. (2018). Observe that the main source of modelling errors is represented436

    by demand uncertainty and variability within the system, which might differ from the assumptions437

    made when modelling BWFLnet.438

    Results and discussion439

    Problem (8) was formulated and solved to detect and localize blockages in BWFLnet, consid-440

    ering all links as potential blockage locations. At each time step, Algorithm 1 required on average441

    2.7 seconds to converge, demonstrating that the proposed method is suitable for near real-time im-442

    plementation in monitoring and diagnostic tools for WDNs. In Figure 9, we report the fault state443

    for the two DBVs, computed by solving Problem (8), and the measured flow, which was recorded444

    but not used within the implemented fault diagnosis process. As shown in Figure 9a, estimating the445

    status of DBV 1 is challenging due to model uncertainty. In fact, DBV 1 experiences a small head446

    difference during diurnal operation, with a limited measured flow. Therefore, the incorrect mod-447

    elling of DBV 1 does not have a significant impact on the operation of BWFLnet. In comparison,448

    Algorithm 1 resulted in an accurate estimation of the status of DBV 2, with the fault state equals449

    to zero during daylight (i.e. the valve is open) and non-zero at night (i.e. the valve is closed). This450

    is also confirmed by the flow data shown in Figure 9b. We conclude that the implemented method451

    resulted in accurate diagnosis when this can be expected.452

    To further investigate the performance of the developed method to localize closed valves, we453

    consider BWFLnet operation at 03:00. Both boundary valves are closed at this time of the day, but454

    our model assumes that they are open at 40%. As discussed above, the effect of valve closure at455

    DBV 1 is smaller than the level of modelling uncertainty experienced in BWFLnet. Therefore, the456

    incorrect modelling of DBV 1 has little impact on the operation of BWFLnet, and it is not identi-457

    fied by the method. In contrast, as shown in Figure 10a, the fault vector computed by Algorithm458

    1 sharply identifies a set of candidate fault locations, which are shown in Figure 10b. The imple-459

    mented fault detection and localization procedure has correctly identified a link sequence including460

    19 Pecci, January 21, 2020

  • DBV 2.461

    CONCLUSION462

    We have proposed a novel optimization based method for detecting and localizing blockages463

    in WDNs. These faults are caused by unreported partially/fully closed valves or other pipe block-464

    ages. We have formulated the considered problem as a non-linear inverse problem with `1 regu-465

    larization. We have presented a sequential convex optimization algorithm for solving the resulting466

    non-smooth non-convex optimization problem. The method is based on the solution of a sequence467

    of sparse convex problems, which are solved efficiently using convex optimization techniques. Nu-468

    merical experiments on a large operational water network show that the optimization based fault469

    detection and localization performs well, achieving accurate fault diagnosis in most cases. In fact,470

    in over 80% of the tested 334 fault scenarios, the actual fault location is separated from the set471

    of estimated fault candidates by less than 5 links. In addition, in all experiments, the solution of472

    the inverse problem via the proposed sequential convex optimization algorithm requires less than473

    three seconds of computations, reducing the computational time by 4 to 5 orders of magnitude474

    compared to Do et al. (2018). Furthermore, the developed method was validated for near real-475

    time fault diagnosis using recorded data from a large operational water network with dynamically476

    adaptive topology from the UK. The method is shown to successfully detect and localize network477

    blockages using experimental data, despite unmodeled measurement noise and other modelling478

    uncertainties present in the system. The results reported in this study suggest that the proposed op-479

    timization based method enables the implementation of real time fault diagnosis in water networks480

    with a dynamically adaptive topology. Finally, we suggest that the developed framework is ex-481

    tended to other fault diagnosis problems in WDNs, including burst/leak detection and localization.482

    483

    DATA AVAILABILITY STATEMENT484

    The hydraulic data and model of BWFLnet used during the study are available in a repository in accor-485

    dance with funder data retention policies: http://dx.doi.org/10.17632/srt4vr5k38.2486

    ACKNOWLEDGEMENTS487

    This research was supported by EPSRC (EP/P004229/1, Dynamically Adaptive and Resilient Water488

    20 Pecci, January 21, 2020

    http://dx.doi.org/10.17632/srt4vr5k38.2

  • Supply Networks for a Sustainable Future). We thank Cla-Val and Bristol Water for their support in the489

    implementation and operation of BWFLnet.490

    21 Pecci, January 21, 2020

  • APPENDIX I. EXISTENCE AND UNIQUENESS OF HYDRAULIC SOLUTIONS491

    The hydraulic conservation laws in (6) are:492

    φ(q)+A12h+A10h0 +u = 0

    A12T q−d = 0,(23)493

    where function φ j(q j) represents the frictional head loss within link j, for all j ∈ {1, . . . ,np}. As494

    stated in the Problem Formulation section, we assume that the set {q ∈Rnp |A12T q−d = 0} is not495

    empty. Moreover, we assume that the columns in matrix A12 ∈ Rnp×nn are linearly independent.496

    We have that497

    φ j(q j) = r jq j|q j|n j−1, (24)498

    where r j and n j depends on the type of link (i.e. valve or pipe) and the frictional head loss formula499

    that is used. In particular, when link j corresponds to a valve, we have:500

    φ j(q j) =8K j

    gπ2D4jq j|q j| (25)501

    where K j and D j are valve local loss coefficient and diameter, respectively (Larock et al. 1999,502

    Section 2.2.5). In comparison, when link j corresponds to a pipe, the frictional head losses can503

    be modelled by either Hazen-Williams (H-W) or Darcy-Weisbach (D-W) formulae. When H-W is504

    used, we set:505

    φ j(q j) =10.67L j

    C1.852j D4.781j

    q j|q j|0.852, (26)506

    where L j, D j and C j are length, diameter and H-W coefficient of pipe j, respectively. In the case of507

    D-W, the relation between r j = r j(q j) and q j is defined implicitly. Here, we implement the explicit508

    22 Pecci, January 21, 2020

  • approximation used in EPANET (Rossman 2000) and discussed in (Simpson and Elhay 2010):509

    φ j(q j) =

    128υπg

    L jD4j

    q j |q j| ≤ 2000 νL j8

    π2gL jD5j

    (∑3l=0

    α lj+βlj

    θ j ηl) · |q j|q j 2000 νL j < |q j| ≤ 4000 νL j

    2(ln10)2

    π2gL jD5j

    1(lnθ j)2

    · |q j|q j 4000 νL j < |q j|,

    (27)510

    where ν is the kinematic viscosity, while L j and D j are length and diameter of pipe j, respectively.511

    Coefficients α j, β j, η j and θ j are defined as in (Simpson and Elhay 2010). In particular,512

    θ j =ε j

    3.7D j+

    5.74(πν/4)0.9D0.9j|q j|0.9

    (28)513

    where ε j is the pipe roughness.514

    Consider the optimization problem:515

    minimizeq

    E(q)

    subject to A12T q−d = 0(29)516

    where517

    E(q) :=np

    ∑j=1

    ∫ q j0

    φ(s)ds+qT (A10h0 +u) (30)518

    The next result follow was proved by Collins and Cooper (1978) in a different context. For the519

    sake of completeness, we derive it in a our framework.520

    Theorem I.1. A pair of vectors (q,h) solves (23) if and only if q is optimal solution of Problem521

    (29) and h is the corresponding Lagrangian multiplier.522

    Proof. Since function φ j(·) are monotonically increasing, the objective function E(·) is strictly523

    convex. Hence, Problem (29) satisfies strong duality and the associated KKT condition are a nec-524

    essary and sufficient condition for optimality (Boyd and Vandenberghe 2004, Chapter 5). There-525

    fore, q is an optimal solution of Problem (29), with associated Lagrangian multiplier h, if and only526

    23 Pecci, January 21, 2020

  • if (q,h) satisfies the following set of non-linear equations:527

    ∇E(q)+A12h = 0

    A12T q−d = 0(31)528

    The above equations yield529

    φ(q)+A10h0 +u+A12h = 0

    A12T q−d = 0(32)530

    Since we assume rank(A12) = nn, given q∗ ∈ Rnp optimal solution of Problem (29), there exists a531

    unique associated vector of Lagrangian multipliers h∗ ∈ Rnn .532

    The following theorem holds.533

    Theorem I.2. Problem (29) has a unique optimal solution.534

    Proof. As observed in the previous Theorem, E(·) is strictly convex. Therefore, the solution of535

    Problem (29) (if it exists) is unique.536

    In order to prove existence of a solution to Problem (29), it suffices to show that function E(·)537

    is coercive Bertsekas (1999, Proposition A.8), i.e. lim‖q‖→∞ E(q) = +∞ . Assume that link j538

    corresponds to a valve. We have539

    ∫ q j0

    φ(s)ds = r j|q j|3

    3. (33)540

    When link j corresponds to a pipe, it is necessary to investigate separately H-W and D-W head541

    loss formulae.542

    • H-W formula. In this case, we have543

    ∫ q j0

    φ(s)ds = r j|q j|2.852

    2.852(34)544

    24 Pecci, January 21, 2020

  • • D-W formula. Let ω j = 4000 νL j . Firstly, we observe that function φ j(·) is odd, i.e.545

    −φ j(s) = φ j(−s). Hence, Definition (27) implies that546

    ∫ q j0

    φ(s)ds =∫ |q j|

    0φ(s)ds

    =∫ ω j

    0φ(s)ds+

    ∫ |q j|ω j

    φ(s)ds

    =∫ ω j

    0φ(s)ds+

    ∫ |q j|ω j

    2(ln10)2

    π2gL jD5j

    (ln(

    ε j3.7D j

    +5.74(πν/4)0.9D0.9j

    |s j|0.9

    ))−2s2 ds

    ≥∫ ω j

    0φ(s)ds+

    ∫ |q j|ω j

    2(ln10)2

    π2gL jD5j

    (ln(

    ε j3.7D j

    +5.74(πν/4)0.9D0.9j

    ω0.9j

    ))−2s2 ds

    ≥ I j +2(ln10)2

    π2gL jD5j

    (ln(

    ε j3.7D j

    +5.74(πν/4)0.9D0.9j

    ω0.9j

    ))−2|q j|3

    3

    (35)

    547

    where548

    I j =∫ ω j

    0φ(s)ds− 2(ln10)

    2

    π2gL jD5j

    (ln(

    ε j3.7D j

    +5.74(πν/4)0.9D0.9j

    ω0.9j

    ))−2 ω3j3. (36)549

    In conclusion, for all cases, we have550

    E(q)≥np

    ∑j=1

    (γ j +G j|q j|µ j

    )+qT (A10h0 +u) (37)551

    where γ j ∈ R and G j ≥ 0 and µ j > 2 are opportunely defined. Since552

    lim‖q‖→+∞

    np

    ∑j=1

    (γ j +G j|q j|µ j

    )+qT (A10h0 +u) = +∞, (38)553

    inequality (37) implies that554

    lim‖q‖→+∞

    E(q) = +∞, (39)555

    556

    25 Pecci, January 21, 2020

  • REFERENCES557

    Abraham, E. and Stoianov, I. (2016). “Sparse Null Space Algothims for Hydraulic analysis of large558

    scale water supply networks.” Journal of Hydraulic Engineering, 142(3).559

    Aster, R. C., Borchers, B., and Thurber, C. H. (2012). Parameter Estimation and inverse problems.560

    Elsevier.561

    Benzi, M., Golub, G. H., and Liesen, J. (2005). “Numerical solution of saddle point problems.”562

    Acta Numerica, 14.563

    Bertsekas, D. (1999). Nonlinear programming. Athena Scientific, Belmont.564

    Boyd, S. and Vandenberghe, L. (2004). Convex optimization. Cambridge University Press.565

    Collins, M. and Cooper, L. (1978). “Solving the pipe network analysis problem using optimization566

    techniques.” Management Science, 24(7), 747–760.567

    Conn, A. R., Gould, N. I. M., and Toint (2000). Trust-Region Methods. SIAM.568

    D’Ambrosio, C., Lodi, A., Wiese, S., and Bragalli, C. (2015). “Mathematical programming tech-569

    niques in water network optimization.” European Journal of Operational Research, 243(3), 774–570

    788.571

    Delgado, D. M. and Lansey, K. E. (2009). “Detection of Closed Valves in Water Distribution572

    Systems.” Proceedings of the 10th Annual Water Distribution Systems Analysis Conference573

    WDSA2008, 932–938.574

    Diestel, R. (2000). Graph Theory (Graduate Texts in Mathematics).575

    Do, N. C., Simpson, A. R., Deuerlein, J. W., and Piller, O. (2016). “Calibration of Water De-576

    mand Multipliers in Water Distribution Systems Using Genetic Algorithms.” Journal of Water577

    Resources Planning and Management, 142(11), 04016044.578

    Do, N. C., Simpson, A. R., Deuerlein, J. W., and Piller, O. (2018). “Locating Inadvertently Par-579

    tially Closed Valves in Water Distribution Systems.” Journal of Water Resources Planning and580

    Management, 144(8), 04018039.581

    Donoho, D. L. (2006). “Compressed sensing.” IEEE Transactions on Information Theory,582

    52(March 2008), 1289–1306.583

    26 Pecci, January 21, 2020

  • Elhay, S., Simpson, A. R., Deuerlein, J., Alexander, B., and Schilders, W. (2014). “A Reformulated584

    Co-tree Flows Method competitive with the global Gradient Algorithm for solving the water585

    distribution system equations.” Journal of Water Resources Planning and Management, 140(12),586

    04014040.587

    Friedman, J., Hastie, T., and Tibshirani, R. (2010). “Regularization Paths for Generalized Linear588

    Models via Coordinate Descent.” Journal of Statistical Software, 33(1), 1–22.589

    Gorinevsky, D., Boyd, S., and Poll, S. (2009). “Estimation of faults in DC electrical power system.”590

    Proceedings of the American Control Conference, 4334–4339.591

    Gurobi Optimization (2017). “Gurobi Optimizer Reference Manual,592

    .593

    Kang, D. and Lansey, K. (2011). “Demand and Roughness Estimation in Water Distribution Sys-594

    tems.” Journal of Water Resources Planning and Management, 137(1), 20–30.595

    Kapelan, Z. (2002). “Calibration of Water Distribution Networks.” Ph.D. thesis, Exeter University,596

    Exeter University.597

    Larock, B. E., Jeppson, R. W., and Watters, G. Z. (1999). Hydraulics of Pipeline Systems. CRC598

    press.599

    Neumaier, A. (1998). “Solving ill-conditioned and singular linear systems: a tutorial on regular-600

    ization.” SIAM Review, 40(3), 636–666.601

    Nielsen, B. (1989). “Methods for analyzing pipe networks.” Journal of Hydraulic Engineering,602

    115(2), 139–157.603

    Pecci, F., Abraham, E., and Stoianov, I. (2018). “Global optimality bounds for the placement of604

    control valves in water supply networks.” Optimization and Engineering.605

    Pecci, F., Abraham, E., and Stoianov, I. (2019). “Model reduction and outer approximation for606

    optimising the placement of control valves in complex water networks.” Journal of Water Re-607

    sources Planning and Management, 145(5), 04019014.608

    Piller, O., Gilbert, D., and Van Zyl, J. E. (2012). “Dual Calibration for Coupled Flow and Trans-609

    port Models of Water Distribution Systems.” Proceedings of Water Distribution System Analysis610

    27 Pecci, January 21, 2020

  • 2010 - WDSA 2010, Tucson (Arizona), 722–731.611

    Piller, O., Moltalvo, I., Deuerlein, J. W., Denis, G., and Braun, M. (2014). “A Gradient-type612

    Method for Real-Time State Estimation of Water Distribution Networks.” Proceedings HIC 2014613

    11TH International Conference on Hydroinformatics, New York.614

    Preis, A., Whittle, A. J., Ostfeld, A., and Perelman, L. (2011). “Efficient Hydraulic State Estima-615

    tion Technique Using Reduced Models of Urban Water Networks.” Journal of Water Resources616

    Planning and Management, 137(4), 343–351.617

    Pudar, R. S. and Ligett James, A. (1992). “Leaks in Pipe Networks.” Journal of Hydraulic Engi-618

    neering, 118(7), 1031–1046.619

    Puig, V. (2010). “Fault diagnosis and fault tolerant control using set-membership approaches: Ap-620

    plication to real case studies.” International Journal of Applied Mathematics and Computer621

    Science, 20(4), 619–635.622

    Rossman, L. A. (2000). Epanet 2 Users Manual. U.S. Environmental Protection Agency, Cincin-623

    nati.624

    Simpson, A. and Elhay, S. (2010). “Jacobian Matrix for Solving Water Distribution System Equa-625

    tions with the Darcy-Weisbach Head-Loss Model.” Journal of Hydraulic Engineering, 137(6),626

    696–700.627

    Sophocleous, S., Savić, D., and Kapelan, Z. (2019). “Leak Localization in a Real Water Distri-628

    bution Network Based on Search-Space Reduction.” Journal of Water Resources Planning and629

    Management, 145(7), 04019024.630

    Tawarmalani, M. and Sahinidis, N. V. (2002). Convexification and Global Optimization in Contin-631

    uous and Mixed-Integer Nonlinear Programming. Springer US, 1 edition.632

    Tibshirani, R. (1996). “Regression Selection and Shrinkage via the Lasso.” Journal of the Royal633

    Statistical Society, 58(1), 267–288.634

    Todini, E. and Pilati, S. (1988). “A Gradient Algorithm for the Analysis of Pipe Networks.” Com-635

    puter Applications in Water Supply: Vol. 1—systems Analysis and Simulation, B. Coulbeck and636

    C.-H. Orr, eds., Research Studies Press Ltd., 1–20.637

    28 Pecci, January 21, 2020

  • Vrachimis, S. G., Eliades, D. G., and Polycarpou, M. M. (2018). “Leak Detection in Water Distri-638

    bution Systems Using Hydraulic Interval State Estimation.” 2018 IEEE Conference on Control639

    Technology and Applications, CCTA 2018, 565–570.640

    Waldron, A., Pecci, F., and Stoianov, I. (2019). “BWFLnet + data.” Mendeley Data.641

    Water Research Centre (1989). “Network Analysis - A Code of Practice.642

    Wright, R., Abraham, E., Parpas, P., and Stoianov, I. (2015). “Control of water distribution net-643

    works with dynamic DMA topology using strictly feasible sequential convex programming.”644

    Water Resources Research, 51(12), 99259941.645

    Wright, R., Stoianov, I., Parpas, P., Henderson, K., and King, J. (2014). “Adaptive water distribu-646

    tion networks with dynamically reconfigurable topology.” Journal of Hydroinformatics, 16(6),647

    1280–1301.648

    Wu, Z. Y., Song, Y., and Syed, J. L. (2012). “Optimization model for identifying unknown valve649

    statuses and settings.” WDSA 2012: 14th Water Distribution Systems Analysis Conference, Ade-650

    laide, Sout Australia, Barton, A.C.T.: Engineers Australia, 975–983.651

    Zheng, Y., Fantuzzi, G., Papachristodoulou, A., Goulart, P., and Wynn, A. (2017). “Fast ADMM652

    for semidefinite programs with chordal sparsity.” Proceedings of the American Control Confer-653

    ence 2017, 3335–3340.654

    29 Pecci, January 21, 2020

  • List of Figures655

    1 Flow charts describing the implemented fault detection and localization method. . . 32656

    (a) Proposed fault detection and localization method. . . . . . . . . . . . . . . . 32657

    (b) Sequential convex optimization algorithm. . . . . . . . . . . . . . . . . . . 32658

    2 Control valves and pressure sensors locations. Locations of the faults correspond-659

    ing to links in S are highlighted. . . . . . . . . . . . . . . . . . . . . . . . . . . 33660

    3 Fault estimation results for three example cases: successful fault detection and lo-661

    calization (Top); inexact fault localization (middle); wrong fault localization (bot-662

    tom). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34663

    (a) Successful fault localization: fault location and candidate links are highlighted. 34664

    (b) Successful fault localization: u∗ is the estimated fault state computed by665

    solving Problem (8). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34666

    (c) Inexact fault localization: fault location and candidate links are highlighted. . 34667

    (d) Inexact fault localization: u∗ is the estimated fault state computed by solving668

    Problem (8). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34669

    (e) Wrong fault localization: fault location and candidate links are highlighted. . 34670

    (f) Wrong fault localization: u∗ is the estimated fault state computed by solving671

    Problem (8). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34672

    4 Distribution of the distance of the set of candidates to the actual fault location. . . . 35673

    5 Distribution of the number of candidates . . . . . . . . . . . . . . . . . . . . . . . 36674

    6 Distribution of the number of connected components of the set of candidates. . . . 37675

    7 Results of the first experiment with multiple faults, where candidate links are high-676

    lighted. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38677

    (a) Location of the 3 simulated faults. . . . . . . . . . . . . . . . . . . . . . . . 38678

    (b) Estimated fault state u∗ computed by solving Problem (8). . . . . . . . . . . 38679

    (c) Localization performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . 38680

    (d) Localization performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . 38681

    30 Pecci, January 21, 2020

  • (e) Localization performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . 38682

    8 Second experiment with multiple faults, where candidate links are highlighted. . . 39683

    (a) Locations of the 3 simulated faults. . . . . . . . . . . . . . . . . . . . . . . 39684

    (b) Estimated fault state u∗ computed by solving Problem (8). . . . . . . . . . . 39685

    (c) Localization performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . 39686

    (d) Localization performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . 39687

    (e) Localization performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . 39688

    9 Estimated fault state u∗ at all time steps, and measured flow across the two dynamic689

    boundary valves. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40690

    (a) DBV 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40691

    (b) DBV 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40692

    10 Results of the experiment at 03:00, where candidate links are highlighted. . . . . . 41693

    (a) Estimated fault state u∗ computed by solving Problem (8). . . . . . . . . . . 41694

    (b) Localization performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . 41695

    31 Pecci, January 21, 2020

  • 1. WDN hydraulic model

    2. Pressure and flow

    measurements

    Non-linear inverse problem formulation

    Sequential convex optimization algorithm

    Estimated fault states

    (a) Proposed fault detection and localizationmethod.

    Set and ( )= =0 0 0u 0 x c u

    Compute a new iterate ( , )

    solving Problem (16) (Step 5 in Algorithm 1)

    + +x u

    Sufficient reduction?

    Yes No

    Reduce the

    size of the trust

    region

    Update the current

    solution and

    increase the trust

    region

    Termination criteria are satisfied?

    (Step 8 in Algorithm 1)

    Yes

    Stop

    No

    Step 7 in

    Algorithm 1

    (b) Sequential convex optimization algorithm.

    Fig. 1. Flow charts describing the implemented fault detection and localization method.

    32 Pecci, January 21, 2020

  • Valve

    Sensor

    DBV 2

    DBV 1

    PCV 2

    PCV 1

    PCV 3

    Fig. 2. Control valves and pressure sensors locations. Locations of the faults corresponding tolinks in S are highlighted.

    33 Pecci, January 21, 2020

  • Valve

    Sensor

    (a) Successful fault localization: faultlocation and candidate links are high-lighted.

    0 1000 2000 30000

    0.1

    0.2

    0.3Fault

    (b) Successful fault localization: u∗ is theestimated fault state computed by solvingProblem (8).

    Valve

    Sensor

    (c) Inexact fault localization: fault loca-tion and candidate links are highlighted.

    0 1000 2000 30000

    0.5

    1

    1.5

    2

    2.5Fault

    (d) Inexact fault localization: u∗ is the es-timated fault state computed by solvingProblem (8).

    Valve

    Sensor

    (e) Wrong fault localization: fault loca-tion and candidate links are highlighted.

    0 1000 2000 30000

    0.05

    0.1

    0.15

    0.2

    Fault

    (f) Wrong fault localization: u∗ is the es-timated fault state computed by solvingProblem (8).

    Fig. 3. Fault estimation results for three example cases: successful fault detection and localization(Top); inexact fault localization (middle); wrong fault localization (bottom).

    34 Pecci, January 21, 2020

  • 0 5 10 150

    50

    100

    Fig. 4. Distribution of the distance of the set of candidates to the actual fault location.

    35 Pecci, January 21, 2020

  • 0 10 20 300

    50

    100

    Fig. 5. Distribution of the number of candidates

    36 Pecci, January 21, 2020

  • 0 2 40

    50

    100

    Fig. 6. Distribution of the number of connected components of the set of candidates.

    37 Pecci, January 21, 2020

  • Valve

    Sensor

    (a) Location of the 3 simulated faults.

    0 1000 2000 30000

    1

    2

    3

    4

    5

    Fault 1

    Fault 2

    Fault 3

    (b) Estimated fault state u∗ computed bysolving Problem (8).

    Valve

    Sensor

    (c) Localization performance.

    Valve

    Sensor

    (d) Localization performance. (e) Localization performance.

    Fig. 7. Results of the first experiment with multiple faults, where candidate links are highlighted.

    38 Pecci, January 21, 2020

  • Valve

    Sensor

    (a) Locations of the 3 simulated faults.

    0 1000 2000 30000

    0.5

    1

    Fault 4

    Fault 5

    Fault 6

    (b) Estimated fault state u∗ computed bysolving Problem (8).

    Valve

    Sensor

    (c) Localization performance.

    Valve

    Sensor

    (d) Localization performance.

    Valve

    Sensor

    (e) Localization performance.

    Fig. 8. Second experiment with multiple faults, where candidate links are highlighted.

    39 Pecci, January 21, 2020

  • 00:00 12:00 00:000

    0.05

    0.1

    -0.5

    0

    0.5

    (a) DBV 1.

    00:00 12:00 00:000

    0.5

    1

    0

    2

    4

    (b) DBV 2.

    Fig. 9. Estimated fault state u∗ at all time steps, and measured flow across the two dynamicboundary valves.

    40 Pecci, January 21, 2020

  • 0 1000 2000 30000

    0.5

    1

    DBV 1

    DBV 2

    (a) Estimated fault state u∗ computed by solvingProblem (8).

    DBV 2

    Valve

    Sensor

    (b) Localization performance.

    Fig. 10. Results of the experiment at 03:00, where candidate links are highlighted.

    41 Pecci, January 21, 2020

    Single fault scenariosResults and discussion

    Multiple fault scenariosResults and discussion

    Experimental validationResults and discussion