Towards sustainable water networks: automated fault detection and diagnosis

. The paper will present an overview of one of the Fault Detection and Diagnosis (FDD) systems developed within the Waternomics project. The FDD system has been developed basing on the hydraulic modeling of the water network, the real time values of flow and pressure obtained from installation of innovative ICT and commercial smart meters and the application of the Anomaly Detection With fast Incremental ClustEring (ADWICE) algorithm adapted for the drinking water network. The FDD system developed is useful when we have to consider more than one parameter at the same time to determine if an anomaly or fault is in place in a complex water network and the system is designed on purpose to cope with a larger features set. The new FDD system will be implemented in an Italian demo site, the Linate Airport Water network in Milan, where a large water distribution network is in place and where, due the many variables coming into play, it could be very difficult to detect anomalies with a low false alarm rate.


Introduction
In many water distribution systems, a significant amount of water is lost due to leakage from distribution pipes.The problem of leaks in water distribution systems has generated significant interest due to the financial cost borne by utilities, potential risks to public health and environmental burden associated with wasted energy.In recent years, such concerns have led to the introduction of stricter penalties against water authorities for ignoring leakage and have provided the necessary incentives for the investment in better leak detection technology and enhanced leak reduction strategies.
Leak detection methods are broadly classified in terms of internal and external monitoring methods: internal methods involving intrusive measurements to monitor fluid state, and externa1 methods applied to the environmental condition of a pipe.Pipelines are designed and engineered for full load operations assuming steady state flow conditions.Operational parameters will range from maximum allowable operating pressure in exceptional circumstances to a depressurized state corresponding to a no-flow situation.Normal pipeline operations may involve day-to-day transients such as pump start/stop operations, the operation of control valuing and changes in delivery rates.Internal leak detection system must therefore operate over wide range of process conditions, some of which may appear to have the characteristic of leak patterns.
The basic problem of leak detection is to distinguish between the normal operational transients and the occurrence of non-typical process conditions that would indicate a leak.Whereas steady state can be achieved for many pipeline operations, in general it is assumed that most pipelines undergo continual transient changes.In addition, hydraulic noise and instrument noise are characteristic of normal operation, forming a background base threshold to discrimination of any unusual event.The characteristic of a leak is that the pressure profile in the pipeline becomes distorted, flow rate curve plotted against distance exhibits a step discontinuity whereas the pressure profile exhibits cusp.These pressure and flow variations can be sensed to indicate that a significant event has occurred.The efficiency of a leak detection system in recognizing a leak, locating it and estimating the size of a leak depends on factors such as: (i) location of sensors, (ii) accuracy of sensors, (iii) size of leak.
A fault is a malfunction of a system component, which ultimately leads to a decline in the system's intended performance and/or efficiency.The Fault Detection Diagnosis (FDD) systems aim to recognize, locate and quantify faults: the Detection is the recognition of when and where there is a fault present in the system.Diagnosis is the act of isolating the location and nature of the fault to the extent that it can be rectified, so as to restore the effected system's performance to its intended level.To implement FDD to a system, at the very minimum, the full extent of a system's operational capacities must be understood and information from a system must be received so that its state/operation can be characterised at any one time.The desired attributes of an FDD system include the following:

•
Early Detection and Diagnosis: the longer that a fault persists, the greater the cumulative effect of the associated inefficiency's.More importantly, the more time that a systems fault goes undetected and undiagnosed, the more likely it is to develop into a component failure which could lead to economic loss and potential human injury/fatality.Timely identification and rectification is key.
• Fault Segregation: this is the ability of an FDD system identify the offending component and to distinguish the faulty part from others.Ambiguous fault reports lead to chaotic maintenance procedures.
• Fault Characterisation: this is to estimate the severity, type or nature of a fault.To fix a fault, the exact issue with the component must be known.
• Robustness: expected variability of the system leads to uncertainty in the fault detection.A fault detection algorithm able to handle uncertainty is called robust and its robustness is the degree of sensitivity to faults compared to the degree of sensitivity to uncertainty.
• Adaptability: a useful FDD system can be applied to multiple machines and systems of the same genre, without the need for a completely new set up and reprogramming.
Various FDD methods are applied to different systems, based on the nature of the system and requirements of the FDD.The different groups of approaches may be defined in many ways, as has been done in (Bruton et al. 2013;Katipamula, and Brambley 2005;Venkatasubramanian et al. 2003).A synthesis of the different classification schemes is presented herein (Figure 1).On the limits of the fundamental FDD classification continuum, there is: • Empirical (a priori) reasoning, which will draws conclusions about how a system should operate under different conditions based entirely on models formulated from first principal theory (laws of conservation, Newtonian mechanics, thermodynamics, etc.) • Analytical (posteriori) reasoning, which will draw conclusions about how a system should operate under different conditions based entirely on models formulated from historical measurement data.(Katipamula, and Brambley 2005) Katipamula and Brambley, defined the following classification scheme for FDD methods: In accordance with this structure, a Quantitative Model-Based system in the form of a Detailed Physical Model detailed in Section 3.3 and Qualitative Model-Based system in the form of a rule-based, limits and alarms approach are developed as case studies for the Waternomics Project.Some of the fundamental logic underlying FDD common approaches are (i) Rule Based FDD, (ii) Data Driven FDD and (iii) Law Driven FDD.These are further explained in Table 1.The various groups of FDD which can be applied have inherent strengths and weaknesses in comparison to each other, and thus make them more suitable to certain systems than others.With regard to Rule Based FDD, its strengths reside in the fact that it is the simplest to develop and deploy and that its reasoning is fundamental and transparent, so that can be understood easily.Its weaknesses include that the rules created for a system will be very specific and so they will not be transferrable as well as that it is difficult to ensure that all rules are always applicable and to find a complete set of rules.Rule based FDD is best suited to simple, non-critical processes that require a cheaper FDD solution.Model based methods are attractive when the system does not have well developed theory for observed performance and when training data is plentiful and inexpensive to collect.Its deficiencies stem from the fact that large amounts of data are required and that sometimes this training data can contain hidden faulty states which compromise the validity of the models created.Model based FDD is most applicable to systems which are not suited to rules and that have recognisable patterns in their operation.Law based approaches main proficiency is that the models developed are based on sound physical and engineering principals.As a result of this, they can provide the most accurate estimators for output when they are well formulated.However, they can be very complex to develop and computationally expensive.The time investment to create them is also significant.They are most applicable for complex systems which have critical failure consequences.This paper presents the model based FDD approach adepted in the Waternomics project and the initial results obtained with it.

The model based FDD methodology introduced by the Waternomics project
The need for an efficient Water Management System is strongly highlighted by Water utilities, Municipalities and in general by Corporates that have to face every day with problems dealing with water usage and supply.So it is essential to develop an automated system to implement the fault detection in the water network at an early stage in order achieve a more sustainable water management by avoiding the waste of natural resources and the consequent economical losses.Whichever water network we consider "the leakages exist; and they have to be localized and measured" and solved (B. Brunone, 2008).This problem is more relevant when large water networks are considered.
In this case many variables come into play and it is very difficult to detect anomalies or faults in the system especially when faults are not major issues concentrated in one place and not not necessarily affect the service level of the network (e.g main pipes breakdown).The Linate airport water network represent one of the above mentioned cases (large network comparable to a small city), and the innovative approach proposed here is based on the combined use of an hydraulic model simulation with an FDD algorithm (ADWICE -Anomaly Detection With fast Incremental ClustEring) to detect anomalies in the operational phase of the water network.The objective of the novel FDD proposed in the Waternomics project is to create and automated FDD suitable for large water network.
In doing so the Linate pilot water network has been chosen to test the method.The methodology here proposed is based on the construction of an hydraulic model by using the EPANET software, distributed as open source by EPA -US Environmental Protection Agency, which describe the behaviour of the water network in a normal scenario (without leakages).Outputs (pressure and flow) of this hydraulic model are compared with the data gathered in real time from the pressure and flow meters installed in place by an algorithm (ADWICE) able to point out the faults in the WDS by arising an alert that will be shown in the Waternomics information platform.The methodology proposed is made up of 5 phases described in the figure below (Figure 2).In the following a detailed description of each phase is proposed.
Phase 1 -Building Hydraulic reference model Water network information, as pipes geometry material and age, is necessary in this phase.This kind of information can be gathered both through design documents study and on site surveys.In Linate pilot 12 technical meetings have been held in order to get an accurate knowledge of the WDS and its characteristics as the pumping stations system, the materials of the pipes, the spot height map of the pilot area, the depth of installation of pipelines.For estimating the water demand also an accurate survey of all the building within the pilot area was conducted in order to deveop for each building an inventory of the water equipment installed on each floor.The UNI 9182/2008 law was utilized in order to get for each building a corresponding water demand.The UNI 9182 is an Italian law for design, testing and management criteria for hot and cold water supply and distribution installation and it is generally used in the design and hydraulic consultancy field for sizing of water pipes through the calculation of the estimated flow rate flowing out.The water demand is estimated by conducted a loading units methodology.Loading Unit value is assumed conventionally according to the flow of a delivery point, its characteristics and its frequency of use, used for the calculation of the contemporaneous maximum flow in a water distribution network.The method basically consist in assigning to each water equipment a number of load units in accordance with the UNI 9182.These load units already take into consideration the contemporaneity of utilization of different water equipment.
The table used to assign the load units is the following.By knowing the loads units for each building is possible to obtain the estimated water demand (UNI9182).The geometry of the pipes in the WDS, the materials, the depth of installation the water demand calculated in accordance to th UNI EN 9182/08 are all input data for the Epanet software and for the development of the hydraulics model of the WDS.EPANET is a computer program that performs extended period simulation of hydraulic within pressurized pipe networks.A network consists of pipes, nodes (pipe junctions), pumps, valves and storage tanks or reservoirs.EPANET tracks the flow of water in each pipe, the pressure at each node, the height of water in each tank during a simulation period comprised of multiple time steps.EPANET can be used for many different kinds of applications in distribution systems analysis, sampling program design, hydraulic model calibration, chlorine residual analysis, and consumer exposure assessment are some examples.EPANET can help assess alternative management strategies for improving water quality or distribution throughout a system.Running under Windows, EPANET provides an integrated 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.Full-featured and accurate hydraulic modeling is a prerequisite for doing effective water network modeling.EPANET contains a state-of-the-art hydraulic analysis engine that includes the following capabilities: 1. Places no limit on the size of the network that can be analyzed 2. Computes friction headloss using the Hazen-Williams, Darcy-Weisbach, or Chezy-Manning formulas 3. Includes minor head losses for bends, fittings, etc. 4. Models constant or variable speed pumps 5. Models various types of valves including shutoff, check, pressure regulating, and flow 6. Considers multiple demand categories at nodes, each with its own pattern of time variation 7. Models pressure-dependent flow issuing from emitters (sprinkler heads) 8. Can base system operation on both simple tank level or timer controls and on complex rule-based controls.
Typically the following steps should be carried out when using EPANET to model water distribution system: 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 analysis 6.View the results of the analysis.
The output of the Epanet model helpful to implement the reference performance metrics are: -Pressure in the juncions (nodes) -

Flow in the pipes
In the following the hydraulic model developed with the Epanet model of the Linate Pilot WSD (Figure 3).The objective is to realize a real time monitoring of the water network and make data available for the Waternomics Information Platform and for the end-users.
These meters will allow the researcher to have a real time status of the water network by metring for every pipes the flow and for each node the pressure.These data helps to understand the network behaviour and to gat data helpful to be compared with the output of the Epanet mode Phase 3 -ADWICE algorithm A large water distribution network is in place in the case study of Linate Water network that leads to a large amount of variables influencing the effectiveness of the fault detection this resulted in choosing anomaly detection techniquesas depicted in Figure 4.This class of algorithms is based on modelling the system selecting the best set of parameters that characterize the operational conditions (in our case they can be the flow rate, pressure, energy consumption for pumps system, ground water level for the wells, etc.) assuming normal operation, i.e. absence of problems (leaks, faults, etc.).This model will be used as a comparison baseline with the operational values observed by the water sensors installed in the network in real time.Whenever the system under observation is not found to be operating in the modelled normal region and the deviation between the normality and the current situation exceeds a certain threshold, an alarm is raised (Figure 4).The anomaly detection module will be based on an existing algorithm, called ADWICE.ADWICE (Anomaly Detection With fast Incremental ClustEring) is a clustering-based anomaly detector that has been developed in an earlier project targeting critical infrastructures protection.Originally designed to detect anomalies on network traffic sessions using features derived from TCP or UDP packets, ADWICE represents the features of the observed system as multidimensional numeric vectors, in which each dimension represents a single feature.The vectors are therefore treated as data points in the multidimensional space.Similar observations (i.e.data points that, using a certain distance metric, are relatively close to each other) can be grouped together to form clusters.The basic idea of the algorithm is then to model normality as a set of clusters that summarize the normal behaviour of the system observed during the algorithm's learning process.ADWICE assumes semi-supervised learning, where the data instances provided in the learning phase to create the normality clusters are given labelled and known to be good examples of the system's normality.
Once ADWICE is trained, it can be used for online detection of anomalies or faults.During the detection phase, when a new observation of the parameters of the system is made, a feature vector is produced.When the resulting multidimensional datapoint is close enough (using a threshold) to any normality clusters, ADWICE classifies it as an instance of a normal behaviour, otherwise it considered the data point as an outlier and an alert is generated (Figure 5).347 The third element, the sum of points, is used to check how large a circle is that would cover all the points in the cluster, which is the radius With all this information one can measure how far is a new datapoint from the centre of the cluster (as Euclidean distance between the cluster centroid and the new point) and whether the new point falls within or nearby the radius of the cluster.
When a new data point is processed, both during training and detection, the search of the closest cluster needs to be efficient (and fast enough for the application).We need therefore an efficient indexing structure that helps to find the closest cluster to a given point.The cluster summaries, that constitute the normality observations, are organised in a tree structure.Each level in the tree summarizes the CFs at the level below by creating a new CF which is the sum of them.The search then proceeds from the root of the tree down to the leaves, which is efficient as it takes logarithmic computational time.
The implementation of ADWICE consists of a Java library that can be embedded into the platform.The required interface is a data pre-processing unit (a module that collects the parameters of the system under observation and generates the numerical feature vectors to feed the ADWICE algorithm) and the graphical interface that displays the output of the algorithm.
Phase 4 -Data analysis If system under observation is not found to be operating in the modelled normal region and the deviation between the normality and the current situation exceeds a certain threshold, an anomaly is detected.
Phase 5 -Dashboard visuzlization A notification event is araised through the Waternomics Platform to inform the users about the anomaly detected (Figure 6).The users will have the option to act immediately on the notification (Figure 6).

Conclusions
The model based FDD methodoly presented is helpful in detectin leakages in water networks.The method is based on the analysis of both pressure and flow variation produced by leakage in the WDS, for this reason this technique differs from the others we can find in the literature because it is not based on the transient analysis of the pressure waves but on the comparison of real pressure and flow data with their estimation using the simulation of the mathematical network model.

Aknowledgements
WATERNOMICS project is supported by the EC under grant agreement n.The authors gratefully acknowledge Simin Nadjm-Tehrani and Kalle Burbeck for sharing the source code of ADWICE, the Waternomics partners and the demonstration sites for their support in the project development.

Fig. 5 .
Fig. 5. ADWICE clustering schemaIn ADWICE, each cluster is represented through a summary denoted Cluster Feature (CF).CF is a data structure that has three fields CF i = (n, S, SS) where n is the number of points in the cluster, S is the sum of the points and SS is the square sum of the points in the cluster.The first two elements are used to compute the average for the points in the cluster used to represent its centroidv 0 =

Table 1 .
Different FDD methods This is used for both building up the normality model (is the new point close enough to any existing clusters so it can become part of it or should it form a new cluster?), and during detection (is the new point close enough to any normality clusters or is it an outlier?).Using this structure, during the training phase, a new point can be easily included into a cluster and two clusters can be merged to form a new cluster just by computing the sums of the individual components of the cluster features