Logo Studenta

DocsTec-11707

¡Este material tiene más páginas!

Vista previa del material en texto

INSTITUTO TECNOLÓGICO Y DE ESTUDIOS 
SUPERIORES DE MONTERREY 
MONTERREY CAMPUS 
GRADUATE PROGRAM IN MECHATRONICS AND 
INFORMATION TECHNOLOGIES 
TEC de Monterrey 
DEL SISTEMA TECNOLÓGICO DE MONTERREY 
MULTI-LEAK DETECTION WITH WAVELET ANALYSIS 
OF PRESSURE SENSITIVITIES IN WATER 
DISTRIBUTION NETWORKS 
THESIS 
PRESENTED AS A PARTIAL FULFILLMENT OF THE 
REQUIREMENTS FOR THE DEGREE OF: 
MASTER OF SCIENCE IN AUTOMATION 
B Y 
CLAUDIA DENISS ESCALERA AVITIA 
MONTERREY, N. L. DICIEMBRE 2011 
INSTITUTO TECNOLÓGICO Y DE ESTUDIOS SUPERIORES DE MONTERREY 
MONTERREY CAMPUS 
GRADUATE PROGRAM IN MECHATRONICS AND INFORMATION 
TECHNOLOGIES 
TECNOLÓGICO 
DE MONTERREY 
MULTI-LEAK DETECTION WITH WAVELET ANALYSIS OF PRESSURE 
SENSITIVITIES IN WATER DISTRIBUTION NETWORKS 
THESIS 
PRESENTED AS A PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE 
DEGREE OF: 
MASTER OF SCIENCE IN AUTOMATION 
BY: 
CLAUDIA DENISS ESCALERA AVITIA 
MONTERREY, N . L. DECEMBER 2011 
MULTI-LEAK DETECTION WITH WAVELET ANALYSIS OF 
PRESSURE SENSITIVITIES IN WATER DISTRIBUTION NETWORKS 
B Y : 
CLAUDIA DENISS ESCALERA AVITIA 
THESIS 
Presented to the Graduate Program in Mechatronics 
And Information Technologies 
This Thesis is a partial requirement for the degree of 
Master of Science in 
Automation 
INSTITUTO TECNOLÓGICO Y DE ESTUDIOS 
SUPERIORES DE MONTERREY 
December 2011 
3 
4 
To my parents Norma and Fernando whom I love and admire very much. 
To my brothers Joelito, Davidcito and Fernandito, I miss you greatly all the time!! 
I may not be there yet, but I'm closer than I was yesterday. 
5 
ACKNOWLEDGEMENTS 
The realization of this work was only possible due to the several people's collaboration, to 
which I desire to express my gratefulness. 
To Dr. Luis Eduardo Garza, my advisor, for the continuous support, for his patience, 
motivation, enthusiasm, and great knowledge. His guidance helped me in all the time 
during the research and writing of this thesis. Without his help, this work would not be 
possible. 
Besides my advisor, I would like to thank the rest of my thesis committee: PhD. Adriana 
Vargas Martinez and M.C. Luis Rosas Cobos for their encouragement and valuable 
comments. 
My sincere thanks also goes to Dr. Francisco Palomera for offering me this job which have 
gave me a lot of opportunities and I have enjoyed so much. 
I am grateful to my colleagues and coworkers, Luis Enrique, Andres, Angelo, Gabriel, 
Denisse, Carlos M . , Jorge N . , Mario, Alberto, Jesus, Mariana, Claudia, Amparo, Juan, 
Eduardo and Antonio, for the encouragement, advices, and suggestions; and for the 
friendship that always demonstrated along these months of realization of this work. 
I would also like to thank to Ernesto whom has been there since the beginning always by 
my side, inspiration in many ways. 
Finally, I would like to thank to my parents and my brothers, their love gave me forces to 
make this work. 
6 
ABSTRACT 
Leak detection becomes an important issue for managers of water supply networks. 
They need to detect quickly all the unexpected events that could occur in the network, such 
as leakages, damage, or sensor malfunction. The cost of water is increasing; therefore loss 
of water by leaks must be reduced because damages are often expensive. In most water 
distribution networks, a large percentage of water is lost in transit from treatments units to 
consumers. Around 25% of production is lost or unaccounted due to several causes but 
mainly leakages, false measurements errors, public usage such as fire-fighting, earthquakes 
and sometimes severely cold weather. 
Most of the research until now proposes several methods for leak detection, 
considering only one leak in the system. In this work, detection of several leaks is 
proposed, using an extended horizon analysis of pressure sensitivities. The proposed 
method is a combination of different detection methods, such as pressure sensitivities 
matrix, wavelet analysis, phase-quadrant demodulation code, and finally a weighting and 
voting system. This approach is tested in simulations for two different networks; a network 
with high consumption, Hanoi network, and a larger network, Quebra. Simulation results 
showed that in presence of two leaks, the detection of these two leaks is around 80%, 
detecting the leak node or one of the neighbors nodes around, and of 95% detecting the leak 
node or the second order neighbors nodes, being these the neighbors of the neighbors; in 
presence of three leaks, the detection of the three leaks is around 97% detecting the leak 
node or the second order neighbors nodes. Extensive simulations were realized for each of 
the water networks to validate the algorithm performance. 
Keywords: Multiple leak detection, Wavelet Analysis, Water Distribution Systems, Phase-
quadrant demodulation code. 
7 
INDEX 
A C K N O W L E D G E M E N T S 6 
A B S T R A C T 7 
I N D E X 8 
F I G U R E I N D E X 10 
T A B L E I N D E X 11 
T A B L E O F S Y M B O L S 12 
T A B L E O F A B B R E V I A T I O N S 13 
1 I N T R O D U C T I O N 14 
1.1 OBJECTIVE OF T H E THESIS 15 
1.2 HYPOTHESIS 15 
1.3 SCOPE 16 
1.4 R E S U L T S A N D ORIGINAL CONTRIBUTIONS 16 
1.5 C H A P T E R ORGANIZATION 16 
2 L I T E R A T U R E R E V I E W 18 
3 T H E O R E T I C A L F R A M E W O R K 22 
3.1 MATHEMATICAL MODELING 23 
3.2 WAVELET ANALYSIS 24 
3.2.1 What is a wavelet system? 24 
3.2.2 Continuous Wavelet Transform 25 
3.2.3 Scaling 25 
3.2.4 Complex Shannon Wavelets 26 
3.2.5 Why is a wavelet analysis effective? 27 
3.3 P H A S E - Q U A D R A N T DEMODULATION C O D E 27 
4 E P A N E T 29 
4.1 DESCRIPTION 30 
4.2 P R O G R A M M E R ' S T O O L K I T 30 
4.3 How TO USE E P A N E T 31 
4.3.1 Steps in Using EPANET 31 
4.4 N E T W O R K M O D E L IN E P A N E T 31 
4.4.1 Physical Components 31 
4.4.2 Non-Physical Components 35 
4.5 FUNCTIONS IN E P A N E T 36 
4.5.1 Project Setup 36 
4.5.2 Setting Map Options 37 
4.5.3 Constructing a Network Model 37 
4.5.4 Setting Properties 38 
4.5.5 Adding a Pump Curve 40 
4.5.6 Saving and Exporting Projects 40 
4.5.7 Running an Extended Period Simulation 40 
5 E X P E R I M E N T A T I O N 42 
8 
5.1 M E T H O D O L O G Y 42 
5.1.1 Sensitivity matrix algorithm 43 
5.1.2 Angle between vectors method 46 
5.1.3 Wavelet Analysis Method 46 
5.1.4 Leak isolation 48 
5.1.5 Multiple leak isolation method 50 
5.2 DESCRIPTION OF W A T E R N E T W O R K S FOR T H E EXPERIMENTS 54 
5.2.1 Hanoi network 54 
5.2.2 Quebra Network 64 
5.3 E X P E R I M E N T S A N D R E S U L T S 74 
5.3.1 Applications of the methods to the networks 74 
5.3.2 Hanoi Results 76 
5.3.3 Quebra Results 77 
5.3.4 Results Interpretation 78 
6 C O N C L U S I O N S 81 
6.1 METHODS ANALYSIS 81 
6.2 FUTURE WORK 82 
7 A P P E N D I X 83 
7.1 A P P E N D I X A : M A T L A B F I L E S 83 
7.1.1 Leak Isolation (Main Program) 83 
7.1.2 Sensitivities Matrices Generation 87 
7.1.3 Binary Matrices Generation 92 
7.1.4 Leak isolation Wavelet Analysis and Angle between vector method 94 
7.1.5 Multiple leak isolation. Residues Generation 101 
7.1.6 Multiple leak isolation, indexes selection 104 
7.1.7 HANOI neighbors 107 
7.1.8 Multiple Leak Isolation, Voting And Grading 108 
8 B I B L I O G R A P H Y 113 
9 
Figure Index 
Figure 1. Wavelet 24 
Figure 2. Wavelet Transform 25 
Figure 3. Scaling 26 
Figure 4. Complex Shannon Wavelet 0.5-1 27 
Figure 5. Phase Demodulation process (Daugman, 2004) 28 
Figure 6. Physical Components in a Water Distribution System 32 
Figure 7. Water Distribution Network 36 
Figure 8. Property Editor 38 
Figure 9. Block diagram of detection, isolation and estimation of leaks in a WDS 43 
Figure 10. Algorithm for the Leak Isolation Process with Wavelet Analysis 49 
Figure 11. Multiple Leak Isolation Process 53 
Figure 12. Hanoi network 54 
Figure 13. Hanoi Demand Pattern 56 
Figure 14. Sensitivity matrix considering a leak in the 15 thnode, Hanoi Network 57 
Figure 15. Sensitivity matrix at the hour of highest consume, Hanoi network 57 
Figure 16. Residues at node 15 59 
Figure 17. Angle between vectors, simulating leak 15 59 
Figure 18. Wavelet Analysis for node 15 at the hour of highest consume 60 
Figure 19. Binary matrix of the leak in node 15 at the hour of highest consume 60 
Figure 20. Wavelet analysis simulating leak at node 15 61 
Figure 21. Multiple leak detection Hanoi network 63 
Figure 22. Quebra network 64 
Figure 23. Quebra Demand Pattern 67 
Figure 24. Sensitivity matrix considering a leak in the 34 t h node, Quebra Network 68 
Figure 25. Sensitivity matrix at the hour of highest consume, Quebra network 68 
Figure 26. Residues at node 34 69 
Figure 27. Angle between vectors, simulating leak 34 70 
Figure 28. Wavelet Analysis for node 34 at the hour of highest consume 71 
Figure 29. Binary matrix of the leak in node 15 at the hour of highest consume 71 
Figure 30. Wavelet analysis simulating leak at node 34 72 
Figure 31. Multiple leak detection Quebra network 73 
10 
Table Index 
Table 1. Symbols 12 
Table 2. Abbreviations 13 
Table 3 Summary of research in the area of Leak Detection in Water Distribution Networks 
21 
Table 4. Node Properties 39 
Table 5. Link Properties 39 
Table 6. Setup parameters for the Hanoi network 55 
Table 7. Setup parameters for the Quebra network 66 
Table 8. Comparison of the Angle between vectors method versus the Wavelet Analysis 
method in the Hanoi network with 1 leak simulated 76 
Table 9. Leak identification for the different scenarios of leaks for the Hanoi network with 
2 leaks simulated 76 
Table 10. Leak identification for the different scenarios of leaks for the Hanoi network 
with 3 leaks simulated 76 
Table 11. Comparison of the Angle between vectors method versus the Wavelet Analysis 
method in the Quebra network with 1 leak simulated 77 
Table 12. Leak identification for the different scenarios of leaks for the Quebra network 
with 2 leaks simulated 77 
Table 13. Leak identification for the different scenarios of leaks for the Quebra network 
with 3 leaks simulated 77 
11 
Table of Symbols 
p Nominal Pressures Matrix 
n Number of Nodes in the Network 
m Number of Samples 
Pa Current Pressures Matrix 
B Pressures Residues 
Pressures of Current Residues 
l Leak Magnitude in liters per second 
s Sensitivity Matrix 
Sa Sensitivity Matrix of the current leak 
a Angle between Vectors 
ahte Angle between Vectors along the time horizon 
a Wavelet Scale 
fc Wavelet center frequency 
fb Wavelet bandwidth 
C Complex Wavelet coefficient 
Cs Complex Wavelet Matrix of S 
Csa Complex Wavelet Matrix of Sa 
Csb Binarized Matrix of Cs 
CM Comparison Matrix 
h Number of proposed intervals of leak magnitude 
nindex Neighbors nodes for each node 
V Number of neighbors for each specific node 
oh+1,n Number of occurrences of the node n in the column h + 1 from the matrix IC 
gh+1,n Grade obtained of the node n in row h+1 
Head loss (length) 
q Flow rate (volume/time) 
A Resistance coefficient 
B Flow exponent 
Table 1. Symbols 
12 
Table of Abbreviations 
D M A District Metered Area 
WDS Water Distribution System 
IC Comparison Index 
X O R Exclusive OR 
Table 2. Abbreviations 
13 
1 INTRODUCTION 
Earth's surface consist of 70% water, but the 97.5% of water on Earth is salty water, 
while from the rest 2.5% of fresh water, over two thirds is frozen in glaciers an polar ice 
caps. The remaining unfrozen fresh water is mainly found as groundwater, with only a 
small fraction present above ground or in the air. Fresh water is a renewable resource 
although the world's supply of clean, fresh water is steadily decreasing. Water demand 
exceeds the one supplied in many parts of the world. With the increase of the population at 
an unprecedented rate, the increase of the supply needs from the industry, the agriculture 
and the farming, many more areas are expected to experience this imbalance in the near 
future. 
In most water distribution networks, a large percentage of the water is lost in transit 
from treatment units to consumers. Typically around 25% of production is lost or 
unaccounted due to several causes but mainly leakages, false measurement errors, public 
usage such as fire-fighting, earthquakes and sometime severely cold weather (Ragot & 
Maquin, 2006). 
The distribution system (in urban areas or strategically important trunk mains) is 
subdivided into discrete zones or district meter areas (DMA), by the permanent closure of 
valves. A D M A will generally comprise 500-3000 properties. Flow (and sometimes 
pressure) sensors are placed on the D M A boundaries and the collected data is subsequently 
analyzed for leakage trends. The most popular operational use of in flow data is the analysis 
of measured minimum night flows. Night flows (usually measured between midnight and 
5:00 am) are used because water use is at a minimum and is easier to identify and subtract 
legitimate flows. Any remaining unusual jumps in volumes will signify leakage in the 
14 
absence of any other factors. If leakage has increased sufficiently then further investigation 
is needed to find the location of leaks (Mounce, 2003). 
Most of the research until today shows different leak detection methods, assuming 
only one leak present in the network. This can be considered as ideal because is most likely 
that multiple leaks are present at the same time in a big network being that the main reason 
to address this problem in this research. 
1.1 Objective of the thesis 
The main objective of the thesis is to develop a methodology for the detection of 
multiple leaks based on the wavelet analysis of the pressure residues in a Water 
Distribution System. 
The specific objectives are: 
1. To update the state of the art concerning to leak detection, and multiple leak 
detection in a Water Distribution System. 
2. To generate a leak detection scenario of a Water Network, with which is possible to 
generate the necessary pressure data, assuring its reliability with the help of 
EPANET. 
3. To develop a detection method based on the pressure data. 
4. To implement the algorithm of detection based in a Wavelet Analysis. 
5. To validate the obtained results. 
6. To compare results with the angle between vectors method, proposed in (Casillas, 
2012). 
1.2 Hypothesis 
The base hypothesis in this thesis is that is possible to detect multiple leaks in a 
Water Distribution Network taking as raw data the pressure in all the nodes of the same. 
The data will be obtained through simulations of a network in the presence of leaks and in 
absence of any disturbance, and by making comparisons of both. 
15 
1.3 Scope 
The scope of this work is the implementation and validation of the proposed 
algorithm, in simulated scenarios of a Water Distribution Network, in order to detect from 
small leaks to larger leaks, in presence of one, two and three leaks at the same time and 
with different magnitude sizes. 
1.4 Results and original contributions 
The main original contributions of this work are: 
• The implementation and validation of a method that detects multiple leaks in Water 
Distribution Systems. 
• The detection of leaks in water distribution systems using Wavelet Analysis, and 
subsequent phase-quadrant demodulation code. 
1.5 Chapter organization 
This thesis consists of 6 chapters: 
Chapter 2: Literature Review 
In this chapter a review of the work developed until now concerning the leak detection in 
Water Distribution Systems is presented. The level of research is stated and a comparison 
between the works, presented in the last years, is realized. 
Chapter 3: Theoretical Framework 
In this chapter the basic definitions are given to understand this research. Concepts as 
wavelet analysis, phase quadrant demodulation and mathematical modeling of a water 
network are clarified. 
16 
Chapter 4: EPANETThis chapter describes the software EPANET, base of the simulations performed in this 
thesis, answering questions such as: What is EPANET capable of? How to use EPANET? 
How does EPANET works? 
Chapter 5: Experimentation 
In this chapter the methodology is described, the experiments to be implemented are 
proposed, the water networks Hanoi and Quebra are described and all the experiments and 
results are presented. 
Chapter 6: Conclusions 
In this chapter the interpretation and qualification of the results of this investigation and the 
opportunities areas for future work are discussed. 
17 
2 LITERATURE REVIEW 
The analysis of Distribution Water Networks has been a research topic since the 
decade of 1970's, with the work of (Sato, 1975), where he proposes the use of channel 
identification of blind spots, even when leak detection is not applied yet. In the 90's 
(Liggett 1992) develop a leak detection method for pipe lines by applying the inverse 
problem, using pressure and flow measurements. In this work assumptions of the orifice of 
the leak in the pipe line must be done. Nevertheless the interest for leak detection since the 
year 2000 has grown with different publications; below a brief description of these 
researches is done, and after that, Table 3 presents a summary of the research in the area of 
Leak Detection in Water Distribution Networks. 
In (Yang, Wen, & L i , 2008) a method to identify leaks is proposed using blind spots 
based on previously leak detection researches that uses the analysis of acoustic and 
vibrations signals (Fuchs & Riehle, 1991) models of buried pipelines to predict wave 
velocities (Muggleton, Brennan, & Pinnington, 2002). 
In (Mashford, 2009), a method to locate leaks is presented using Support Vector 
Machines (SVM). This research presents a method to analyze data obtained by a set of 
pressure control sensors of a pipeline network to locate and calculate the size of the leak. In 
(Covas & Ramos, 2001), a method to detect and locate leaks based on the transitory inverse 
analysis is presented. The main idea of this methodology is the identification of the location 
of leaks in a network based on the pressure observed data collected during the occurrence 
of the transitory events and the minimization of the difference of the observed and 
calculated parameters. In (Ragot & Maquin, 2006), a technique to isolate leaks using fuzzy 
analysis of the residuals is presented. This method finds the residuals between the nominal 
18 
measurements (no fault presence) and the faulty measurements. In (Blesa et al., 2010), 
model estimation with LPV systems and zonotopes, and leak detection with residual 
analysis are introduced and tested in a small water network. In (Perez R. a., 2011), a 
method that uses pressure measurements and the sensitivity residuals is presented. In this 
methodology, first a model free of leaks is obtained offline and then the residuals are 
analyzed on-line against a proposed threshold. If any inconsistency is found, an analysis to 
detect and isolate the leaks begins using an established mapping. Although this approach 
has good efficiency under ideal conditions, its performance is diminished with changes in 
demand and noise in measurements. In (Casillas, 2012) an extended-horizon analysis of 
pressure sensitivities and residuals is performed introducing adequate isolation algorithms 
to locate the leaks; also a comparison between different leak detection methods is done, 
presenting the Angle between Vectors method as the best one, even when good results were 
obtained, it was only for simple leaks and moderate noise. 
As mentioned in the investigation above, there has been many and different ways to 
address the problem of leak detection, having each method its advantages and 
disadvantages. The research done untill today it is mainly focused to detect one leak in 
WDS, and detect multiple leaks in smaller systems with few nodes. The next work will 
propose a new methodology to address the problem of leaks detection in a Water 
Distribution Network; which address the detection of multiple leaks, and will prove the 
effectiveness detecting multiple leaks, by identifying the node containing the leak or some 
nearby node on the Network. 
19 
SUMMARY OF RESEARCH IN THE AREA OF LEAK DETECTION IN WATER DISTRIBUTION NETWORKS 
YEAR AUTOR 
APPLICATION 
CHARACTERISTICS 
ADVANTAGES DISADVANTAGES REF. 
2011 
Violeta Casillas, 
Luis Garza 
Leak detection using 
an extended time 
horizon analysis of 
pressure sensitivities. 
Presents a 
comparison between 
different methods 
based on pressure 
sensitivities 
It was implemented for 
single leaks. 
Performance is 
diminished with noise 
in demand and 
measurements. 
(Casillas, 
2012) 
2010 
Ramon Perez, 
Vicenc. Puig, et al. 
Detection by 
binarization of 
sensitivities and 
residue matrices. 
Optimal location of 
measurement sensors. 
The use of 
sensitivities in the 
nodes based on 
changes in pressure is 
presented 
The threshold selection 
is difficult and a 
determinant factor for 
the detection. 
Implemented just for 
single leaks. 
(Perez, Puig, 
Pascual, 
Quevedo, 
Landeros, & 
Peralta, 
2010) 
2010 
J. Gertler, J. 
Romera, V. Puig 
and J. Quevedo 
Leak location using 
Principal Components 
Analysis. 
It uses a structural 
residue design, and 
manages to detect 
two leaks. 
Is limited by the use of 
PCA, because is not 
adequate for large 
networks. Tested with 
small networks. 
(Gertler, 
Romera, 
Puig, & 
Quevedo, 
2010) 
2009 
M. Tabesh, A.H. 
Asadiyani Yekta, 
R. Burrows 
Annual water balance 
and minimum night 
flow analyses are 
applied. 
It detects 
unauthorized 
consumptions, 
operations errors, 
management errors 
of faulty meters 
Is based on the annual 
water balance and 
needs this factor; the 
reading of each meter 
is needed. 
(Tabesh, 
2009) 
2009 
Jhon Mashford et 
al. 
Leak location using a 
vector machine. 
It uses known pattern 
recognition 
techniques. 
The results are poor, 
between 32 and 57% 
of leak location. 
(Mashford, 
2009) 
2008 Jin Yang et al. 
Leak identification 
using blind spots 
through vibration and 
acoustic analysis 
The speed 
propagation is easy to 
calculate, which helps 
to the identification. 
It requires of the 
application of a lot of 
complex methods. 
(Yang, Wen, 
& Li, 2008) 
2007 
Marco Ferrante, 
Bruno Brunone, 
M.ASCE, and Silvia 
Meniconi. 
Use the Wavelets for 
the Transient Pressure 
Signals for Leak 
detection 
It detects 
abnormalities in the 
signals despite the 
white noise 
A steady-oscillatory 
flow must be created 
in order to apply this 
method; is not applied 
in a real network. 
(Ferrante, 
2007) 
20 
2006 
Jose Ragot, Didier 
Maquin. 
Diffuse analysis of 
residues based in the 
model of the process. 
It uses the Euclidian 
distance between the 
leak signatures and 
the residues to locate 
a leak. 
Positive and negative 
thresholds are needed, 
which makes the 
localization difficult. 
(Ragot & 
Maquin, 
2006) 
2005 
Javier Almandoz, 
Enrique Cabrera, 
M.ASCE, Francisco 
Arregui, Enrique 
Cabrera Jr., and 
Ricardo Cobacho. 
Discrimination or the 
physical losses and 
volume of water 
consumed but not 
measured. 
It identifies 
uncontrolled flow 
rate in a distribution 
network 
It does not detect 
leaks. 
(Almandoz, 
Cabrera, 
M.ASCE, 
Arregui, 
Cabrera Jr., 
& Cobacho, 
2005) 
2005 
Dalius Misiunas, 
Martin Lambert, 
Angus Simpson, 
and Gustaf Olsson 
Based on the 
calculation of the 
transient wave and 
transmission 
coefficients 
Bursts of relatively 
small sizes are 
detected. Sensors in 
all the nodes are not 
necessary. 
It only detects bursts 
leaks. 
(Misiunas, 
Lambert, 
Simpson, & 
Olsson, 
2005) 
2001 
Didia Covas and 
Helena Ramos 
Leak detection based 
in the inverse 
transient analysis. 
It takes advantage of 
certain interest 
instants. 
Itwas only proven for 
one specific leak. 
(Covas & 
Ramos, 
2001) 
2000 
Osama Hunaidi 
and Alex Wang 
Uses the Cross-
correlation method for 
leak detection. 
Low cost, flexible, 
improves accuracy. 
Is not applied to a 
water network. 
(Hunaidi & 
Wang, 
2000) 
1992 
Ranko S.Pudar 
and James A. 
Liggett. 
Leak detection in pipe 
lines by solving the 
inverse problem, using 
pressure and flow 
measurements. 
The leaks are 
expressed in terms of 
pressure. 
Is necessary to assume 
the approximated 
orifice of the leak. 
(Pudar& 
Liggett, 
1992) 
1975 Y. Sato. 
Proposes the use of 
channel identification 
of blind spots. 
The proposed method 
is used in many of the 
posterior works. 
The leak detection is 
not applied. 
(Sato, 
1975) 
Table 3 Summary of research in the area of Leak Detection in Water Distribution Networks 
21 
3 THEORETICAL FRAMEWORK 
This chapter is divided into three main sections: The first part describes the 
mathematical model of a Water Distribution Network. The second part describes the main 
concepts of Wavelet Analysis, What a Wavelet System is, How to perform a Continuous 
Wavelet Transform, What a scale is, How to implement a Complex Shannon Wavelet 
Transform, and why a wavelet analysis is efficient. And, the third part describes how to 
implement a Phase Quadrant Demodulation Code, taking as the basis of the analysis a 
complex matrix. 
22 
3.1 Mathematical modeling 
The governing laws for flow in pipe systems under steady conditions are 
conservation of mass and energy. The law of conservation of mass states that the rate of 
storage in a system is equal to the difference between the inflow to and outflow from the 
system in pressurized water distribution networks. No storage can occur within the pipe 
network, although tank storage may change over time. Therefore, in a pipe or junction 
node, the inflow and the outflow must balance. For a junction node 
Y.Rin-1. Rout = E Qext CI) 
Where qin and q o u t are the pipe flow rates into and out of the node and qext is the 
external demand or supply. Conservation of energy states that the difference in energy 
between two points is equal to the energy added to the flow in components between these 
points minus the frictional losses. An energy balance can be written for paths between the 
two end points of a single pipe, between two fixed graded nodes (a node for which the total 
energy is known, such as a tank) through a series of pipes, valves, and pumps, or around a 
loop that begins and ends at the same point. In a general form for any path 
Ei ey p hpj - Y.ieiv hu = (2) 
Where h I i t is the headloss across component /along the path, hPj is the head added 
by pump j, and AE is the difference in energy between the end points of the path. The 
primary network component is a pipe. The relationship between pipe flow q and energy 
loss caused by friction Hi in individual pipes can be represented by a number of equations, 
including the Darcy-Weisbach and Hazen-Williams equations. The general relationship is 
of the following form: 
HL =Kq r (3) 
Where K is a pipe coefficient that depends on the pipe's diameter, length, and 
material and r is an exponent in a range of 2 (Perez R. a., 2011). 
23 
3.2 Wavelet Analysis 
A wave is usually defined as an oscillating function of time or space, such as a 
sinusoid. A wavelet is a "small wave", which has its energy concentrated in time to give a 
tool for the analysis of transient, non- stationary, or time-varying phenomena. It still has the 
oscillating wave-like characteristics but also has the ability to allow simultaneous time and 
frequency analysis with a flexible mathematical foundation. 
The main idea is to take wavelets and use them in a series expansion of signals or 
functions much the same way Fourier series uses the wave or sinusoid to represent a signal 
or function. The signals are functions of a continuous variable, which often represents a 
signal or function. 
3.2.1 What is a wavelet system? 
The wavelet expansion set is not unique. There are different wavelets systems that 
can be used effectively, but all seem to have the following three general characteristics 
(Burrus, Ramesh, & Haitao, 1998). 
A wavelet system is a set of building blocks to construct or represent a signal or 
function. Is a two-dimensional expansion set (usually a basis) for some class of one- (or 
higher) dimensional signals. 
Figure 1. Wavelet. 
24 
The wavelet expansion gives a time-frequency localization of the signal. This means 
most of the energy i f the signal is well represented by a few expansion coefficients. The 
calculation of the coefficients from the signal can be done efficiently. 
3.2.2 Continuous Wavelet Transform 
The continuous wavelet transform (CWT) is defined as the sum over all time of the 
signal multiplied by scaled, shifted version of the wavelet function W: 
C(scale, position) = j^oof(t)xV (scale, position, t)dt (4) 
The results of the CWT are many wavelet coefficients C, which are a function of 
scale and position. Multiplying each coefficient by the appropriately scaled and shifted 
wavelet yields the constituent wavelets of the original signal. 
Signal Constituent wavelets of different scales and positions 
Figure 2. Wavelet Transform. 
3.2.3 Scaling 
Scaling a wavelet means stretching (or compressing it). The scale factor is often 
denoted by the letter a. The smaller the scale factor, the more "compressed" the wavelet 
(The MathWorks, Inc., 1984-2009). 
25 
Figure 3. Scaling. 
3.2.4 Complex Shannon Wavelets 
The expansion used in this work is the Complex Shannon Wavelets which is 
obtained from the frequency B-spline wavelets by setting m to 1. A complex Shannon 
wavelet is defined by 
TO) = 4TbSinc(fbR)e2™f*K (5) 
Depending on two parameters: 
fb = bandwidth parameter 
fc = wavelet center frequency 
26 
The condition Fc > is sufficient to ensure that zero is not in the frequency 
support interval (Teolis, 1998). 
3.2.5 Why is a wavelet analysis effective? 
The wavelets are near optimal for a wide class of signals for compression, 
denoising, and detection. 
The wavelet expansion allows more accurate local description and separation of 
signal characteristics. A wavelet expansion coefficient represents a component that is itself 
local and is easier to interpret. The wavelet expansion may allow a separation of 
components of a signal that overlap in both time and frequency. 
Wavelets are adjustable and adaptable. Because there is not just one wavelet, they 
can be designed to fit individual applications. 
3.3 Phase-quadrant demodulation code 
Based on the phase demodulation process used to encode iris patterns (Daugman, 
2004), each pressure residue is transformed into a complex matrix using wavelets, and then 
is demodulated to extract its phase information. The phase demodulation process, Figure 5, 
is used to encode pressure residues in a DMA. Residues are projected onto complex 
Shannon wavelet (5), generating complex-value coefficients whose real and imaginary 
parts specify the coordinates of a phasor in the complex plane. The angle of each phasor is 
27 
quantized to one of the four quadrants, setting two bits of phase information. This process 
is repeated for each residue generated by each leak and for each residue of the time horizon 
being analyzed, generating as many matrices as residues exists. This means fixm matrices, 
being n residues for each Sensitivity Matrix and m the number of samples in the time 
horizon). 
Then, H'(R) can be regarded as a complex-valued bit whose real and imaginary 
parts are either 1 or 0. 
Figure 5. Phase Demodulat ion process (Daugman, 2004). 
28 
4 EPANET 
This Chapter is dedicated to the Simulation Software EPANET, describing how was 
it developed, how to use it, how to interphase it with other software, what are its main 
characteristics, and an example of a networkcreation and simulation. 
29 
4.1 Description 
Developed by EPA's Water Supply and Water Resources basically, EPANET is a 
software package that models water distribution piping systems. Is a Windows program that 
performs extended-period simulation of the hydraulic and water quality behavior within 
pressurized pipe networks. 
Pipe networks consist of pipes, nodes (pipe junctions), pumps, valves, and storage 
tanks reservoirs. EPANET tracks the flow of water in each pipe, the pressure at each node, 
the height of the water in each tank, and the concentration of a chemical species, 
throughout the network during a simulated period. Chemical species, water age, source, and 
tracing can be simulated. 
EPANET provides an integrated computer environment for editing network input 
data, running hydraulic and water quality simulations, and viewing the results in a variety 
of formats. These include color-coded network maps, data tables, time series graphs, and 
contour plots (U.S. Enviromental Protection Agency, 2011). 
4.2 Programmer's Toolkit 
For the realization of this thesis the EPANET Programmer's Toolkit were used in 
conjunction with M A T L A B . The Toolkit is a dynamic link library (DLL) of functions that 
allow developers to customize EPANET's computational engine according to their own 
needs. There are over 50 functions that can be used to open a network description file, read 
and modify various network design and operation parameters, run multiple extended-period 
simulations accessing results as they are generated or saving them to a file, and write 
selected results to a file in a user-specified format. 
The toolkit is useful for developing specialized applications, such as optimization or 
automated calibration models that require running many network analyses; it can simplify 
adding analysis capabilities to integrated network-modeling environments based on 
computer-aided design (CAD), geographical information system (GIS), and database 
packages. 
30 
4.3 How to use EPANET 
4.3.1 Steps in Using EPANET 
Usually the following steps must be carried out when using EPANET to model 
water distribution systems: 
(1) Draw a network representation of the distribution system. 
(2) Edit the properties of the objects that make up the system. 
(3) Describe how the system is operated. 
(4) Select a set of analysis options. 
(5) Run a hydraulic/water quality analysis. 
(6) View the results of the analysis. 
4.4 Network Model in EPANET 
This section describes how EPANET models the physical objects that constitute a 
distribution system as well as its operational parameters. 
4.4.1 Physical Components 
EPANET models a water distribution system as a collection of links connected to 
nodes. The links represent pipes, pumps, and control valves. The nodes represent junctions, 
tanks, and reservoirs. Figure 6 illustrates how these objects can be connected to one another 
to form a network. 
31 
Figure 6. Physical Components in a Water Distribution System. 
4.4.1.1 Junctions 
Junctions are points in the network where links join together and water enters or 
leaves the network. The basic input data required for junctions are: 
• elevation above some reference (usually mean sea level) 
• water demand (rate of withdrawal from the network) 
• initial water quality 
The output results computed for junctions at all time periods of a simulation are: 
• hydraulic head (internal energy per unit weight of fluid) 
• pressure 
• water quality 
Junctions can also: 
• have their demand vary with time 
• have multiple categories of demands assigned to them 
• have negative demands indication that water is entering the network 
• being use as water quality sources where constituents enter the network 
• contain emitters (or sprinklers) which make the outflow rate depend on the pressure 
32 
4.4.1.2 Reservoirs 
Reservoirs are nodes that represent an infinite external source or sink of water to the 
network. They are used to model such things as lakes, rivers, groundwater aquifers, and tie-
ins to other systems. Reservoirs can also serve as water quality source points. 
The primary input properties for a reservoir are its hydraulic head (equal to the 
water surface elevation if the reservoir is not under pressure) and its initial quality for water 
quality analysis. 
Because a reservoir is a boundary point to a network, its head and water quality 
cannot be affected by the dynamic within the network. Therefore it has no computed output 
properties. 
4.4.1.3 Tanks 
Tanks are nodes with storage capacity where the volume of stored water can vary 
with time during a simulation. The primary input properties for tanks are: 
• bottom elevation (where water level is zero) 
• diameter (or shape if non-cylindrical) 
• initial, minimum and maximum water levels 
• initial water quality 
The principal outputs computed over time are: 
• hydraulic head (water surface elevation) 
• water quality 
Tanks are required to operate within their minimum and maximum levels. EPANET 
stops outflow if a tank is at its minimum level and stops inflow if is at its maximum level. 
4.4.1.4 Pipes 
Pipes are links that convey water from one point in the network to another. 
EPANET assumes that all pipes are full at all times. Flow direction is from the end at 
33 
higher hydraulic head (internal energy per weight of water) to that at lower head. The 
principal hydraulic input parameters for pipes are: 
• start and end nodes 
• diameter 
• length 
• roughness coefficient (for determining head loss) 
• status (open, closed, or contains a check valve) 
Computed outputs for pipes include: 
• flow rate 
• velocity 
• head loss 
• Darcy-Weisbach friction factor 
• average reaction rate 
• average water quality 
The hydraulic head lost by water flowing in a pipe due to friction with the pipe 
walls can be computed using one of three different formulas: 
• Hazen-Williams formula 
• Darcy-Weisbach formula 
• Chezy-Manning formula 
The Hazen-Williams formula is the most commonly used head loss formula in the 
US. It cannot be used for liquids other than water and was originally developed for 
turbulent flow only. The Darcy-Weisbach formula is the most theoretically correct. It 
applies over all flow regimes and to all liquids. 
Each formula uses the following equation to compute head loss between the start 
and end node of the pipe: 
hL=A-qB (6) 
34 
Where 
h L = head loss (Length) 
q = flow rate (Volume/Time) 
A = resistance coefficient 
B = flow exponent 
4.4.1.5 Pumps 
Pumps are links that impart energy to a fluid thereby raising its hydraulic head. The 
principal input parameters for a pump are its start and end nodes and its pump curve (the 
combination of heads and flows that the pump can produce). In lieu of a pump curve, the 
pump could be represented as a constant energy device, one that supplies a constant amount 
of energy (horsepower or kilowatts) to the fluid for all combinations of flow and head. 
EPANET can compute the energy consumption and cost of a pump. 
4.4.1.6 Valves 
Valves are links that limit the pressure or flow at a specific point in the network. 
The principal input parameters include: 
• start and end nodes 
• diameter 
• setting 
• status 
The computed outputs for a valve are flow rate and head loss. 
4.4.2 Non-Physical Components 
4.4.2.1 Time Patterns 
A time pattern is a collection of multipliers that can be applied to a quantity to allow 
it to vary over time. Nodal demands, reservoir heads, pump schedules, and water quality 
source inputs can all have time patterns associated with them. The time interval used in all 
patterns is a fixed value. Although all time patterns must utilize the same time interval, 
35 
each can have a different number of periods. When the simulation clock exceeds the 
number of periods in a pattern, the pattern wraps around to its first periodagain. 
4.5 Functions in EPANET 
In this section will be described the analysis of a simple distribution network, Figure 
7, that consists of a source reservoir from which water is pumped into a two-loop pipe 
network. There is also a pipe leading to a storage tank that floats on the system. 
SOURCE 
Figure 7. Water Distribution Network. 
4.5.1 Project Setup 
The first task is to create a new project in EPANET following the next steps: 
1. Select File | New to create a new project. 
2. Select Project | Defaults to open the Project Default dialog form. 
3. On the ID Labels page, clear all of the ID Prefix fields and set the ID Increment to 
1. This will make E P A N E T automatically label new objects with consecutive 
numbers. This step is important in for the future use of the ID nodes, in order have 
a more easy to manage information. 
36 
4. On the Hydraulics page of the dialog choose G P M as Flow Units and Hazen-
Williams (H-W) as Head loss Formula. 
4.5.2 Setting Map Options 
Next step is to set some map display options so that the ID labels will be displayed 
as added objects to the network. 
1. Select View | Options to bring up the Map Options dialog form. 
2. Select the Notation page on this form and check off the boxes for Display Node 
IDs and Display Link IDs. Leave the others unchecked. 
3. Then switch to the Symbols page and check all of the boxes. 
4. Click the O K button to accept these choices and close the dialog. 
5. Finally, before placing objects on the map the dimensions should be set. 
6. Select View | Dimensions to bring up the Map Dimensions dialog form. 
4.5.3 Constructing a Network Model 
Once the parameters are all set, the next step is to draw the Network's nodes: 
1. First add the reservoir by clicking the button on the Map Toolbar. (If the 
toolbar is not visible then select View | Toolbars | Map). Then click the mouse on 
the map at the location where the reservoir belongs. 
2. Next to add are the junction nodes. Click the button on the Map Toolbar and 
then click on the map at the locations of nodes 2 through 7. 
37 
3. Now add the tank by clicking the button and then clicking the map where the 
tank is located. 
4. Now add all the pipes using the button to connect the corresponding nodes. 
5. Finally, add the pump by clicking the button, clicking on node 1 and then on 
node 2. 
6. To add map labels use button on the map. 
4.5.4 Setting Properties 
As objects are added to the project, EPANET assigns them a default set of 
properties. To change the value of a specific property for an object it must be selected the 
object into the Property Editor (Figure 8). If the Editor is already visible then simply click 
on the object or select it from the Data page of the Browser. If the Editor is not visible then 
it can appear by clicking the Browser's Edit button 
Figure 8. Property Editor. 
The nodes in the example network are assumed to have the following properties, 
Table 4: 
38 
Node Elevation Demand 
(ft) (gpm) 
1 700 0 
2 700 0 
3 710 150 
4 700 150 
5 650 200 
6 700 150 
7 700 0 
8 830 0 
Table 4. Node Properties. 
Double clicking each node, add the name parameters. The pipes in the network have 
the following lengths and diameters: 
Pipe Length Diameter 
(feet) (inches) 
1 3000 14 
2 5000 12 
3 5000 8 
4 5000 8 
5 5000 8 
6 7000 10 
7 5000 6 
8 7000 6 
Table 5. Link Properties. 
By clicking in each link and the properties listed and for all Roughness Coefficients 
(C-Factors) are 100. 
39 
4.5.5 Adding a Pump Curve 
For the pump, is necessary to assign a pump curve (head versus flow relationship). 
1. Select the pump (Link 9) into the Property Editor and enter the ID label 1 in the 
Pump Curve field. 
2. Create Pump Curve 1. From the Data page of the Browser window, select Curves 
from the dropdown list box and then click the Add button A new Curve 1 will 
be added to the database and the Curve Editor dialog will appear. 
3. Enter the pump's design flow (600) and head (150) into this form. E P A N E T will 
automatically create a complete pump curve from this single point. The curve's 
equation is shown along with its shape. 
4.5.6 Saving and Exporting Projects 
Once the project is completed, and after save the project, this can be exported by 
using File | Export | Network command, in this way is save as a readable text, this file has 
an n.inp "extension. 
4.5.7 Running an Extended Period Simulation 
In order to perform an extended period analysis of operation is needed the creation 
of a Time Pattern that makes demands at the nodes vary in a periodic way over the course 
of a day. To set the pattern time step as well as the simulation duration: 
1. Select Options -Times from the Data Browser. 
2. Click the Browser's Edit button to make the Property Editor appear. 
40 
3. Enter the pattern time step. 
4. Enter the simulation Duration. 
To create the time pattern: 
1 Select the Patterns category in the Data Browser 
2 Click the button (or press the Insert key). A new Pattern 1 will be created and 
the Pattern Editor dialog should appear. 
3. Enter the multiplier values 0.5, 1.3, 1.0, 1.2 for the time periods 1 to 4. 
4. Click the O K button to close the Pattern Editor. 
The multipliers are used to modify the demand from its base level in each time 
period. The pattern will wrap around to the start once again after each 24-hour interval of 
time. 
Now assign the Pattern 1 to the Demand Pattern property of all of the junctions in 
the network. 
To start running the simulation select Project | Run Analysis, select node pressures 
to see the results of the same (Rossman, 2000). 
41 
5 EXPERIMENTATION 
This chapter describes the methodology applied. The creation of the sensitivity 
matrices, the angle between vector method, the wavelet analysis, the phase demodulation, 
the detection of leaks in systems with one leak, and the detection of multiple leaks in 
systems with two or three leaks. 
It includes a description of the water networks in which the experiments would be 
performed, Hanoi and Quebra Networks. Finally it presents the experiments and results of 
the implementation of the algorithm. 
5.1 Methodology 
The main objective of the proposed scheme is to detect, isolate and identify multiple 
leaks in a hydraulic network, using pressure measurements in the nodes of the hydraulic 
network. A leak will be considered as a water flow loss through a defect of an element of 
the network that is being measured. Figure 9 shows the leak detection, isolation and 
identification process. It is considered the existence of two and three leaks of different 
sizes at a given time. The data of node pressures are obtained from extensive simulations of 
normal and leak scenarios. From these data, pressure sensitivities and residuals are obtained 
for a time window and then analyzed by the leak detector algorithm. 
42 
Figure 9. Block diagram of detection, isolation and estimation of leaks in a WDS. 
A l l the leaks are simulated in the nodes of the network. This is performed by adding 
an extra demand of water at a specific node. 
To compare the efficiency of the method, changes in the leak magnitude and noise 
in the demands were simulated. A time horizon of 24 hours was selected for the 
simulations. 
For the proposed method, sensitivity matrix that quantifies the effect of leaks in all 
nodes and pressure sensors in the network is needed to initiate the detection of the leaks. 
Matlab® and Epanet® are used altogether to simulate the leaks to obtain and analyze the 
network data using the algorithms proposed in this thesis. 
5.1.1 Sensitivity matrix algorithm 
In the first part of the algorithm, the normal operation scenario of the network is 
built and the simulated pressures at each node of the network are obtained; first, an ideal 
scenario without noise and without leaks is simulated, and a matrix with the pressuresin all 
the nodes is generated, one for each hour. And so (7) is defined. 
43 
(7) 
Where: 
P is the matrix of pressures in no leak situation 
Pij represent the pressure of node i at time j in no leak situation 
P a is the matrix of current pressures 
pa. is the current pressure of node I at time instant j 
n is the number of nodes in the network 
m is the number of samples through the simulation time 
The second part is the construction of scenarios with the presence of a leak. The 
pressures in nodes when a leak in the network is present are stored in the following matrix: 
(8) 
Where: 
Pf is the matrix of pressures when a leak is present at node k 
Pf is the pressure of node i at time instant j when a leak is present at node k 
n and m are the same as defined previously 
In the third part of the algorithm, the residual matrices are obtained as follows: 
(9) 
(10) 
44 
Where: 
Rk is the matrix of residuals when a leak is present at node k 
rfj = — p* is the residual of node i at time / when a leak is present at node k 
Ra is the matrix of current residuals 
ra.. = pij — pa.. is the current residual of node i at time j 
If is necessary to isolate the leak magnitude, the residuals are converted into sensitivities 
for each node, as in (11). 
(11) 
(12) 
Where: 
5^ is the matrix of sensitivities when a leak is present at node k 
is the sensitivity of node I at time j when a leak is present at node k 
I is the assumed leak magnitude (liter/second) 
5 a is the matrix of sensitivities when a leak is present on a specific and unknown 
node. 
Reordering the matrices of sensitivities in a way that each matrix contains the 
sensitivities from all nodes, give us equation (13): 
(13) 
Where: 
S m is the matrix of sensitivities when a leak is present at node /rat instant ttt. 
Sij measures the effect of leak fj in the pressure of node pt. 
45 
5.1.2 Angle between vectors method 
This method consist in calculate the existent angle between each vector of current 
residues, against each vector from the sensitivity matrices, in order to observe the vector 
with is the smaller angle. The angle is obtained according to: 
(14) 
Where: 
S(m,n) l s a vector of the matrix of sensitivities when a leak is present at node n at 
instant m 
Rcurrentres(jri) is the vector of current pressure residue at instant ftl 
This implies the calculation of m vectors of size ft, this according to the number of 
possible leaks for each sample along the time horizon. Based on the time horizon analysis, 
is necessary to obtain a media of the angle obtained, with (15). 
(15) 
Once <xhte is obtained, corresponding to the angles of all the possible leaks, is 
necessary to define the smallest angle, which will indicate the most likely indicator of a 
leak. 
indexleak = min(cchte) (16) 
5.1.3 Wavelet Analysis Method 
After obtaining the sensitivities matrices for each leak (getting as many matrices as 
nodes are in the network), the process of binarization using wavelet analysis is performed 
with the help of the M A T L A B toolbox, using the following parameters and based on 
equation (4) and (5) which were defined previously: 
46 
C(scale,position) = f (t)*P(scale,position, t)dt 
V(R) = J7bsinc(fbR)e2i"feR 
(4) 
(5) 
Where: 
fb = 1; Bandwidth parameter 
fc = 1.5; Wavelet center frequency 
a = 1:1:16 Scale 
Cs = cwt(Sm 1 : n n) = 
Csa - c w t ( 5 a 1 : n m ) = 
(17) 
(18) 
Where: 
C i s a complex wavelet coefficient obtained from (4) depending of the scale and 
position 
Cs is the complex matrix of each column from Sm, therefore obtaining n matrices 
for each sensitivity matrix obtained up until now. 
Csa is the complex matrix of each column from 5a, obtaining m matrices for each 
sample of the current leak. 
Once the n matrices for each hour are obtained, binarization is the next step, for 
which is used the phase demodulation process, shown previously in Figure 5: 
Csb = (19) 
47 
Where: 
Cba>1 = 
Cba_2 = 
Csb is the binarized matrix of Cs. The same process is repeated for the matrix Csa. 
Now the representation for each leak is one matrix Csb, for one sample. The same 
procedure is performed for current residues matrix Ra obtaining m number of matrices, 
one for each sample. 
5.1.4 Leak isolation 
The test for leak isolation is implemented by the Boolean Exclusive-OR operator 
(XOR) applied to the residues encoded (Figure 5), comparing each matrix Cbs against the 
binary matrix obtained from Jla. The result from this operation is a binary matrix with the 
differences between two pressure residues. Then all the differences in each matrix 
generated from the XOR operation are summed up and a new vector is generated 
containing these differences, repeating this process for all the leaks analyzed for the time 
horizon (itt), and generating the follow matrix: 
From the matrix above a voting system is now applied where the node with fewer 
votes is selected as the most likely place of a leak. The votes are obtained summing all 
columns, where every row represents each node in the network. The algorithm is shown in 
Figure 10. 
48 
Comparison Matrix(n,m) = CM(n,m) = (20) 
LEAK ISOLATION PROCESS 
Figure 10. Algorithm for the Leak Isolation Process with Wavelet Analysis. 
49 
5.1.5 Multiple leak isolation method 
In the case of multiple leaks the same methodology is performed, but the following 
steps are added. 
From the voting system, the first three leaks detected are taken, being the first 
column of matrix Index Comparison (IC): 
/CC3.1) = (21) 
After that, a range of possible leaks magnitude is selected, for example in the 
network Quebra from 0.01 l/s to 0.1 l/s. The number of intervals is also selected, in this 
case 10 intervals from 0.01 to 0.1 with a step of 0.01 l/s. 
The leak associated with the indexCM1 is simulated using the leak magnitude for 
each interval, obtaining a new residue for this leak and a new Rnk .The process of wavelet 
transform is performed again obtaining a complex matrix representing this residue Csn. 
The complex matrix Csris obtained as shown in equation (22): 
Csr = Csa — real{Csn) (22) 
Where Csr is the complex matrix derived from the subtraction of the complex 
matrix from the current residue minus the real part of the complex matrix from the 
simulated residue of index C M 1 with the corresponding interval of the leak magnitude. Only 
the real part of Csa is considered because is the most representative part when a change of 
the leak magnitude occurs. 
Then Csr is binarized according to (19) , and the leak isolation process is repeated, 
by using equation (20), applying the voting system once again, selecting the first three leaks 
detected, repeating this process for all the leaks magnitudes from the proposed interval, 
until the matrix IC is completed. 
50 
lC(3,h + 1) 
Where: 
h is the number of proposed intervals of leak magnitude. 
On the other side a matrix with all the index nodes is formed, 
Neighbors(n,v) = 
Where: 
(23) 
(24) 
nindex represents the indexes of the neighbors nodes for each node 
v represents the number of neighbors for each specific node 
//represents the number of nodes in the network 
After obtaining IC, each column is analyzed comparing the indexes obtained 
against each row of the neighbor's matrix, where each time a neighbor or the particular 
node appears a vote is given. For each column from IC, a row is formed with n columns 
with the votes. 
Voting _2{h+Xn) (25) 
Where: 
°h+i,n represents the number of occurrences of the node n in the column h+1 from 
the matrix IC, shown in (23). 
n represents the number of nodes in the network. 
h+1 is the number of columns on IC, an h is the number of proposed intervals for 
the leak magnitude. 
51 
Now a grading system is applied: for each row, the most voted node gets a 5, the 
second a 2 and the third a 1, this applies for all rows from equation (23) exceptfor the first 
one, because this contains the value of the first leak detected, where the indexCM{x,i) from 
(23) is the most likely to be one of the multiple leaks so this gets a grade of 25. The first 
most voted from the first column gets a 2 (if is not indexCM^^ ). 
Grading ( h + l i f l ) = ( 2 6 ) 
For glil:n 
31,1m = 
For 92:h+\,l:n 
9h+l,n — 
Where: 
9h+\,n represents the grade obtained of the node it in the row h+1 from equation 
(23). 
Finally all the columns from equation (26) are summed and the first five nodes with 
the highest values are selected and ordered from highest to lowest (based on their ranking). 
The complete algorithm is shown in Figure 11. 
52 
Figure 11. Multiple Leak Isolation Process. 
53 
5.2 Description of Water Networks for the Experiments. 
To test the methodology presented previously, two networks were used: Hanoi 
(Rodriguez, 2006), and Quebra provided by EPANET. 
5.2.1 Hanoi network 
This network is presented in Figure 12 and represents a network with big flows. The 
demand pattern is design and carried out in a simulation of 24 hours with a sampling time 
of 60 minutes. This gives a total of 25 samples (24 hours* 1 sample/hour=24+l for the 
initial sample hour). 
Figure 12. Hanoi network. 
This network has 31 demand nodes with indexes from 2 to 32, 34 pipes and a 
reservoir according to Figure 12. The setup parameters for this network are shown in Table 
6. 
54 
Pipes Length 
(m) 
Diameter 
(mm) 
Roughness 
(mm) 
MinorLoss 
Coeff. 
Node Demand 
(l/s) 
1 100 1016 120 0 2 247.22 
2 1350 1016 120 0 3 236.11 
3 900 1016 120 0 4 36.11 
4 1150 1016 120 0 5 201.39 
5 1450 1016 120 0 6 279.17 
6 450 1016 120 0 7 375 
7 850 1016 120 0 8 152.78 
8 850 1016 120 0 9 45.83 
9 800 1016 120 0 10 145.83 
10 950 762 120 0 11 138.89 
11 1200 610 120 0 12 155.56 
12 3500 610 120 0 13 261.11 
13 800 508 120 0 14 170.83 
14 500 300 120 0 15 77.78 
15 550 300 120 0 16 86.11 
16 2730 300 120 0 17 240.28 
17 1750 508 120 0 18 373.61 
18 800 508 120 0 19 16.17 
19 400 610 120 0 20 354.17 
20 2200 1016 120 0 21 258.33 
21 1500 508 120 0 22 134.72 
22 500 300 120 0 23 290.28 
23 2650 1016 120 0 24 227.78 
24 1230 762 120 0 25 47.22 
25 1300 762 120 0 26 250 
26 850 508 120 0 27 102.78 
27 300 300 120 0 28 80.56 
28 750 300 120 0 29 100 
29 1500 407 120 0 30 100 
30 2000 300 120 0 31 29.17 
31 1600 300 120 0 32 223.61 
32 150 300 120 0 
33 860 508 120 0 
34 950 610 120 0 
Table 6. Setup parameters for the Hanoi network. 
55 
According to the existing foundations a demand pattern is designed (Figure 13). 
This has a behavior based on the coefficient established for sampling instant. It must be 
guaranteed that the maximum pressure never exceeds the established one; this is obtained 
making the bigger coefficient less than 1, in this way the demand can be satisfied as 
planned. The model is designed with a simulation time of 24 hours. 
Figure 13. Hanoi Demand Pattern. 
For the leak design, a leak that will remain constant during the time of the 
simulation established for the network is considered. 
5.2.1.1 Sensitivity matrix algorithm for Hanoi network 
The first step of the detection process is the generation of the sensitivity. A leak of 
50 liters per second is applied to each node, (as mentioned before the network has 31 
nodes) in order to obtain the sensitivity matrixes, using equations (7) to (13). There are two 
possible representations of the sensitivity matrixes, the first considering a time horizon 
(Figure 14) and the second, being the representation used, having the sensitivity of each 
56 
node at each possible leak for a sampling instant (Figure 15). The simulation is performed 
using the EPANET's Programmer's Toolkit in M A T L A B . 
Figure 14. Sensitivity matrix considering a leak in the 15 th node, Hanoi Network. 
Figure 15. Sensitivity matrix at the hour of highest consume, Hanoi network. 
57 
Simulation is performed for the network in normal operation, without noise and 
leaks, the pressure matrices are saved for this part; another simulation to generate the 
sensitivities matrices is performed, and a matrix for each sample time is generated and 
saved in a file name SEN_M.mat. The availability of measurements in all nodes is assumed 
for this analysis. Finally the simulation for the "current leak" is performed; this is the leak 
to compare with the sensitivities either with a change in the leak magnitude, noise or both. 
The current residues are saved in a file named R32.mat 
5.2.1.2 Leak detection and isolation 
The matrices obtained before are the basis for the leak isolation. The Wavelet 
Analysis for the isolation of one leak is applied to Hanoi network, as well as the angle 
between vectors method. This method was selected to compare the results of the wavelet 
method, and was proposed by (Casillas, 2012) where the results demonstrated that the angle 
method is the one that shows better performance compared with several other isolation 
methods. 
An example is developed for each method on the ideal case, assuming that the 
current leak has a magnitude of 50 liters per second at node 15 without noise. 
To know if there is a leak or not, is necessary to observe the pressure residues of the 
measurements, to determinate if the pressure difference is significant or not. In Figure 16 
the residues corresponding to node 15 are shown, the pressure difference can be observed 
from the image which indicates a leak present in the system, nevertheless pressure changes 
are present in all nodes, and this is why up to this point the leak detection is possible but 
not the leak isolation. 
58 
Figure 16. Residues at node 15. 
5.2.1.3 Angle between vectors method 
The analysis to find the smallest angle between vectors starts with the calculation of 
the angle between each residue vector for each sample from the current simulation against 
each vector from the sensitivity matrix obtained for the corresponding sample. Figure 17 
shows the angle obtained respect each possible leak for the instant of highest consumes. We 
can observe that leak 15 is the one with the smallest angle, being the current leak. 
Figure 17. Angle between vectors, simulating leak 15. 
59 
5.2.1.4 Wavelet Analysis method 
For the wavelet analysis method the first step is to perform the wavelet analysis 
according to equation (17) for each sensitivity matrix, and equation (18) for the current 
leak. Figure 18 shows the results of this analysis for node 15 simulating the leak 15 at the 
hour of highest consume. 
Figure 18. Wavelet Analysis for node 15 at the hour of highest consume. 
After obtaining the complex matrix, delivered by Wavelet Analysis, the binarization 
is executed according to equation (19). Figure 19 shows the generated binary matrix. 
Figure 19. Binary matrix of the leak in node 15 at the hour of highest consume. 
60 
The next step is the comparison between the binary matrices generated for the 
current residue, for each sample, against the generated matrices generated from the 
sensitivities, and performs the XOR operation for each sample according to equation (20). 
Figure 20 shows the differences between the binary matrices generated with the wavelet 
analysis for the current leak (leak at node 15); respect each possible leak, being the node 15 
the one with the smallest difference representing the current leak. 
Figure 20. Wavelet analysis simulating leak at node 15. 
5.2.1.5 Multiple leak isolation method 
Two leaks will be proposed: leak at node 7 with a magnitude of 31.3119 l/s and leak 
at node 17 with a magnitude of 68.9133 l/s. 
The first step is to obtain matrix IC based on equations (21), (22) and (23) having an 
interval from 30 l/s to 80 l/s, with a step of 5 l/s: 
61 
IC = 
17 17 17 17 17 17 17 17 17 7 7 8 
16 16 16 16 16 18 18 18 18 8 8 7 
18 18 18 18 18 16 16 16 3 6 6 9 
(27) 
The voting system is applied,equation (25), and the grading system, equation (26), 
is shown in equation (28): 
Grading (ft + l ,n) = 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25 2 0 0 0 0 0 0 0 0 0 0 0 0 
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 2 0 0 0 0 0 0 0 0 0 0 0 0 
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 2 0 0 0 0 0 0 0 0 0 0 0 0 
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 2 0 0 0 0 0 0 0 0 0 0 0 0 
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 2 0 0 0 0 0 0 0 0 0 0 0 0 
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 2 0 0 0 0 0 0 0 0 0 0 0 0 
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 2 0 0 0 0 0 0 0 0 0 0 0 0 
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 2 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 5 1 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 1 5 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 1 5 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 1 5 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
(28) 
Where: 
Gradingh+ln represents the grade obtained of the node n in row h+1 from (25) 
n is the number of nodes in the network 
h+1 is the number of columns on IC, and h is the number of proposed intervals for 
the leak magnitude 
Finally the columns from (28) are summed up: 
62 
Figure 21. Multiple leak detection Hanoi network. 
From Figure 21 the possible leaks can be inferred, the ones with the biggest value in 
descending order are: 17, 7, 6, 18 and 8, being 17 and 7 the simulated leaks. The same 
procedure is performed for 3 leaks scenarios. 
63 
5.2.2 Quebra Network 
This network is presented in Figure 22 and represents a network of bigger size than 
the Hanoi network. Quebra is a network designed according to the method shown in the 
EPANET webpage. 
In this network, the demand pattern was designed using samples every hour; the 
simulation is carried out for 24 hours, giving a total of 25 samples. The parameters used in 
the simulation of the network are established: the network is composed of 54 nodes, the 
samples are taken every hour and the leak is placed in the node 34, which corresponds to 
the index 32. The sensitivity matrices were calculated with leak magnitude 0.01 liters per 
second using all the nodes. 
Figure 22. Quebra network. 
64 
The demand pattern is design and carried out in a simulation of 24 hours with a 
sampling time of 60 minutes. Giving a total of 25 samples (24 hours* 1 sample/hour = 24 + 
1 for the initial sample hour). 
This network has 54 demand nodes with indexes from 2 to 55, 62 pipes and a 
reservoir according to Figure 22. The setup parameters for this network are in Table 7. 
Pipes Length 
(m) 
Diameter 
(mm) 
Roughness 
(mm) 
MinorLoss 
Coeff. 
Nodes Elevation 
(m) 
Demand 
(l/s) 
1 187.67 50 140 0 1 8 0.2 
2 69.4 50 140 0 2 9 0.2 
3 60.06 50 140 0 3 8 0.2 
4 182.47 50 140 0 4 10 0.2 
6 292.82 75 140 0 5 11 0.2 
7 112.99 50 140 0 6 17 0.2 
8 195.9 50 140 0 8 10 0.2 
9 97.88 50 140 0 9 14 0.2 
10 113.32 200 140 0 10 20 0.2 
11 294.96 200 140 0 11 20 0.2 
12 53.33 75 140 0 12 23 0.2 
13 156.88 50 140 0 13 25 0.2 
14 70.69 50 140 0 14 24 0.2 
15 117.84 50 140 0 15 24 0.2 
16 144.74 50 140 0 16 26 0.2 
17 130.24 50 140 0 17 26 0.2 
18 221.82 50 140 0 18 28 0.2 
19 64.48 50 140 0 19 29 0.2 
21 271.96 50 140 0 21 32 0.2 
22 153.67 50 140 0 22 18 0.2 
24 127.77 50 140 0 23 16 0.2 
25 60.23 50 140 0 24 15 0.2 
26 203 50 140 0 25 10 0.2 
27 231.17 200 140 0 26 17 0.2 
28 376.47 200 140 0 27 26 0.2 
29 90.11 150 140 0 28 32 0.2 
30 53.82 150 140 0 29 26 0.2 
31 50.99 150 140 0 30 25 0.2 
32 82.31 50 140 0 31 26 0.2 
33 77.88 50 140 0 32 25 0.2 
34 95.71 150 140 0 33 25 0.2 
65 
35 62.43 150 140 0 34 26 0.2 
36 51.7 50 140 0 35 26 0.2 
40 100.75 50 140 0 36 24 0.2 
5 100.73 50 140 0 40 25 0.2 
23 110.23 50 140 0 41 27 0.2 
42 49.82 50 140 0 42 17 0.2 
43 325.36 50 140 0 43 17 0.2 
44 460.37 75 140 0 44 17 0.2 
45 54.28 50 140 0 45 18 0.2 
46 121.2 50 140 0 46 25 0.2 
47 108.66 50 140 0 47 18 0.2 
48 200.83 50 140 0 48 20 0.2 
49 185.26 50 140 0 49 26 0.2 
51 145.38 50 140 0 50 26 0.2 
52 131.6 50 140 0 52 20 0.2 
53 40.17 50 140 0 53 20 0.2 
54 123.04 200 140 0 54 17 0.2 
55 45.7 150 140 0 55 26 0.2 
20 76.59 50 140 0 7 17 1.1 
37 729.34 100 140 0 20 28 0 
38 306.91 100 140 0 37 15 0 
39 432.62 100 140 0 38 20 1.1 
41 159.4 100 140 0 39 20 1.1 
56 513.02 150 140 0 
57 366.62 200 140 0 
58 124.83 100 140 0 
59 211.92 100 140 0 
60 186.76 100 140 0 
61 406.38 100 140 0 
62 87.18 100 140 0 
Table 7. Setup parameters for the Quebra network. 
According to the existing basis, a demand pattern is designed, Figure 23, which has 
a behavior based on the coefficient established for sampling instant. The model is designed 
with a simulation time of 24 hours. 
66 
Figure 23. Quebra Demand Pattern. 
For the leak design is considered a leak that will remain constant during the time of 
the simulation established for the network. 
5.2.2.1 Sensitivity matrix algorithm for Quebra network 
Being the first step of the detection process the generation of the sensitivity, a leak 
of 0.01 liters per second is applied to each node, as mentioned before the network has 54 
nodes. According with equations from (7) to (13), the sensitivity matrixes are obtained. 
In Figure 24 the sensitivity matrix considering a time horizon is presented and in Figure 25 
the representation of the sensitivity for each node at each possible leak in a sampling 
instant. The simulation is performed using the EPANET's Programmer's Toolkit in 
M A T L A B . 
67 
Sample instants 
Figure 24. Sensitivity matrix considering a leak in the 34 t h node, Quebra Network. 
Figure 25. Sensitivity matrix at the hour of highest consume, Quebra network. 
68 
Simulation is performed for the network in normal operation; this is without noise 
and leaks, pressure matrices are saved for this part. Another simulation to obtain the 
sensitivities matrices is performed; a matrix for each sample time is generated and saved in 
a file name SEN_M.mat. Availability of pressure measurements in all nodes is assumed for 
this analysis. Finally the simulation for the "current leak" is performed; the current residues 
are saved in a file named R32.mat 
5.2.2.2 Leak detection and isolation 
An example is developed for each method on the ideal case, assuming that the 
current leak has a magnitude of 0.01 liters per second at node 34 without noise. 
Figure 26 shows the residues corresponding to node 34, the pressure difference can 
be observed from the image which indicates a leak present in the system. 
Figure 26. Residues at node 34. 
69 
5.2.2.3 Angle between vectors method 
The analysis to find the smallest angle between vectors starts with the angle 
between each residue vector for each sample from the current simulation against each 
vector from the sensitivity matrix obtained for the corresponding sample. Figure 27 shows 
the angle obtained respect each possible leak for the instant of highest consume, leak 34 is 
the one with the smallest angle, being this the current leak. 
Figure 27. Angle between vectors, simulating leak 34. 
5.2.2.4 Wavelet Analysis method 
For the wavelet analysis method the first step is to perform the wavelet analysis 
according to equation (17) for each sensitivity matrix, and equation (18) for the current 
leak. Figure 28 shows the results of this analysis for node 34 at the hour of highest 
consume. 
70 
Figure 28. Wavelet Analysis for node 34 at the hour of highest consume. 
After obtaining the complex matrix, delivered by the Wavelet Analysis, the 
binarization is executed according to equation (19). Figure 29 shows the generated binary 
matrix. 
Figure 29. Binary matrix of the leak in node 15 at the hour of highest consume. 
71 
The next step is the comparison between the binary matrices generated for the 
current residue, for each sample, against the generated matrices generated from the 
sensitivities, and performs the XOR operation for each sample according to (20). Figure 30 
shows differences between the binary matricesgenerated with the wavelet analysis for the 
current leak (leak at node 34), respect each possible leak, being the node 34 the one with 
the smallest difference representing the current leak. 
Figure 30. Wavelet analysis simulating leak at node 34. 
5.2.2.5 Multiple leak isolation method 
Two leaks will be proposed: leak at node 2 with a magnitude of 0.0379 l/s and leak 
at node 28 with a magnitude of 0.666 l/s. 
The first step is to obtain matrix IC based on equations (21), (22) and (23) having 
an interval from 0.01 l/s to 0.1 l/s, with a step of 0.01 l/s: 
72 
IC = 
2 2 2 2 28 33 33 33 33 33 33 
1 1 1 1 29 49 49 49 49 49 49 
4 4 4 4 27 28 27 25 25 25 25 
(29) 
The voting system is applied with equation (25) and the grading system equation (26): 
Grading = 
25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
5 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
5 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
5 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 5 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 
Where: 
(30) 
Gradingh+ln represents the grade obtained of the node tl in row h+1 from (25) 
n is the number of nodes in the network 
h+1 is the number of columns on IC, and h is the number of proposed intervals for 
the leak magnitude 
Finally the columns from (30) are summed up: 
Figure 31. Multiple leak detection Quebra network. 
73 
From Figure 31 can be inferred the most likely nodes with leaks, the ones with the 
biggest value, in descending order: 2, 33, 28, 49, 27 and 1, being 2 and 28 the simulated 
leaks. The same procedure is performed for 3 leaks. 
5.3 EXPERIMENTS AND RESULTS 
To test the proposed methodologies, the following experiments were developed. 
5.3.1 Applications of the methods to the networks 
For every network it was performed each one of the following experiments: 
1. Analysis of the impact of a change in the leak magnitude for 1, 2 and 3 leaks 
(having calculated sensitivity matrices with nominal magnitude 50 1/s for Hanoi, 
0.01 1/s for Quebra). 
2. Application of random demand noise between ± l % a n d +4% of the medium 
demand along the time horizon. 
3. Application of random demand noise between ± l % a n d ± 1 0 % of the medium 
demand along the time horizon. 
4. Application of random measurement noise between ± 1 % and ± 4 % of the medium 
demand along the time horizon. 
5. Application of random measurement noise between ± 1% and ± 1 0 % of the medium 
demand along the time horizon. 
6. Finally, it was tested the effects of both, demand noise and measurement noise with 
random leaks (1, 2 and 3 leaks) location. The leak magnitude depends of the 
network with sizes between 30 and 80 liters per second for the Hanoi Network, and 
from 0.01 to 0.1 liters per second for Quebra network. 
74 
Defining used terms: 
First order Neighbors: represents the index of the node (or nodes) to evaluate and 
the indexes of the neighbor's nodes (closest nodes). 
Second order Neighbors: represents the indexes of the first order neighbors, and the 
indexes of the neighbors of the neighbors. 
Efficiency percentage for one leak: represents the percentage corresponding to the 
number of times that the simulated leak was identified on the exact node. 
Efficiency percentage for first order neighbors: represents the percentage 
corresponding to the number of times that the exact node or a first order neighbor of the 
leaking node was identified. 
Efficiency percentage for second order neighbors: represents the percentage 
corresponding to the number of times that the exact node or a first order neighbor of the 
leaking node was identified. 
75 
5.3.2 Hanoi Results 
a. Leak detection and isolation for 1 leak. 
Table 8. Comparison of the Angle between vectors method versus the Wavelet Analysis 
method in the Hanoi network with 1 leak simulated. 
b. Leak detection and isolation for 2 and 3 leaks 
Table 9. Leak identification for the different scenarios of leaks for the Hanoi network 
with 2 leaks simulated. 
Table 10. Leak identification for the different scenarios of leaks for the Hanoi 
network with 3 leaks simulated. 
76 
5.3.3 
a. 
Quebra Results 
Leak detection and isolation for 1 leak. 
Table 11. Comparison of the Angle between vectors method versus the Wavelet Analysis 
method in the Quebra network with 1 leak simulated. 
b. Leak detection and isolation for 2 and 3 leaks 
Table 12. Leak identification for the different scenarios of leaks for the Quebra network 
with 2 leaks simulated. 
Table 13. Leak identification for the different scenarios of leaks for the Quebra network 
with 3 leaks simulated. 
77 
5.3.4 Results Interpretation 
5.3.4.1 Hanoi 
5.3.4.1.1 One leak scenario 
Under ideal conditions, without noise and with leak magnitude variation between 30 
and 80 1/s, there is a 100% of detection for the Angle between vectors method and for the 
Wavelet Analysis method; the angle between vectors shows better performance in presence 
of measurement noise, but the Wavelet Analysis is better in presence of demand noise for 
all the cases. 
5.3.4.1.2 Two leaks scenario 
For the identification of two leaks in the Hanoi Network, in the tests without noise, 
with leak magnitude variation between 30 and 80 1/s there are good results having an 82% 
of detection for first order neighbors, and 96% of detection of second order neighbors, a 
little better than for the Quebra Network; when demand noise is added (4% of noise), there 
is a degradation in the results having a 76% of detection of first order neighbors and a 91% 
of detection for the second order neighbors, like in the Quebra Network, there is a better 
performance in presence of demand noise than with measurement noise, 54% of detection 
of first order neighbors and 68% of detection of second order neighbors in presence of 
measurement noise. The last test, where the two kinds of noises are simulated 
(measurement noise and demand noise), shows similar behavior than the results obtained 
with measurement noise, demonstrating that the measurement noise affects more the 
behavior of the method. 
5.3.4.1.3 Three leaks scenario 
In the three leaks simulated scenario in the Hanoi Network, when there is no noise 
present, the detection of the three leaks have degradation, detecting first order neighbors 
with a 59% of detection, the detection of second order neighbors is almost the same 
detecting 96%. When adding noise demand the percentage of detection is reduced, for first 
order neighbors with 56% but is improved for the second order neighbors with 94% or 
detection, these are better results than the obtained in detection of two leaks with demand 
78 
noise (91%). For the tests with measurement noise, it also loses effectiveness, but shows 
better performance for three leaks detection (48% for first order neighbors and 79% for 
second order neighbors) than for two leaks detection in the detection of second order 
neighbors. 
5.3.4.2 Quebra 
5.3.4.2.1 One leak scenario 
For the one leak scenario the Wavelet Analysis has

Continuar navegando

Materiales relacionados

92 pag.
Random-boolean-networks-study-of-degeneracy

User badge image

Aprendiendo Matemáticas y Fisica

41 pag.
Programa DesignBuilder

User badge image

Materiales Generales

89 pag.
0704768

User badge image

Ingeniería Fácil