The Analysis of Water Supply Operating Conditions Systems by Means of Empirical Exponents

: The stochastic character of water consumption by consumers and the technical condition of water supply systems are the main deterministic random factors inﬂuencing the observed changes in ﬂow rate and pressure. The implementation of Supervisory Control and Data Acquisition (SCADA) systems resulted in the creation of dispersed data sets coming from the devices controlling the operation of the water supply system. Thanks to the use of metadata and advanced computer systems of analysis, data from various sources can be analyzed to detect the operating conditions of the water supply system. The aim of the research was to analyze an empirical exponent, determined on the basis of ﬂow rate and pressure measurements for one of the District Metered Areas (DMAs). Modern supervised and unsupervised machine learning systems were implemented to classify the obtained results. The results of the research showed that on the basis of the established empirical exponent in the systems in which the pressure is reduced at night, it is possible to qualify the operating conditions of the water supply system in the DMA with accuracy of up to 90%. The conducted tests may be implemented as a component of expert diagnostic systems in water companies. The lowest exponent values of α III − II are achieved between III–II degree of analyzed parameters.


Introduction
The conditions of operation for water supply systems depend on many deterministic random factors influencing the observed changes in flow rate and pressure. The theory of exploitation of technical systems distinguishes technical and operational conditions of technical objects. The operational condition of a system, facility or technical device is a momentary phase of exploitation, described by the results of measurements of physical quantities characterizing the functional features of a water supply system [1]. The flow rate and pressure are the parameters of the operating condition of the water supply system. The distribution of these parameters is most strongly influenced by the stochastic character of water consumption by consumers. Water consumption by consumers using the water supply system shows quantitative changes both in time and in the space supported by a given water supply system. The random character of water consumption in particular points of the water supply system causes the recorded time series of instantaneous flow rate and hydrostatic pressure to be treated as a stochastic process. Recognition of the stochastic process of demand is of particular importance for developing control of the operation of equipment for water intake, treatment and distribution. The stochastic character of water demand causes the analysis of the results of flow and pressure variability in selected points of the water supply system to not allow for their simple use in the assessment of its technical condition and prediction of emergency status.
The technical condition of a system (facility) is understood as a matrix of features describing the physical properties of system components, taking into account the level of risk for loss of technical performance under the influence of operating time or external factors. Experience has shown that the quality of water and the physical and chemical processes taking place on the internal and external surfaces of water pipes determine the speed of their ageing [2,3]. Changes in technical condition are reflected in an increase in the number of failures, increased costs of pumping water and real losses during its distribution to customers. The technical condition is closely related to the age of the pipes, the material from which they are made, the water pressure in the pipelines, the composition of the water supply system and other factors having a direct or indirect impact on the change in the strength and hydraulic parameters of the water supply pipes. The analysis of data from Polish water supply companies showed that in the years 2004-2013 the network failure rate decreased three times [4]. The failure rate of the Polish water supply system (excluding house connection pipes) in 2010 was 0.61 failure/km/year and in 2014 it decreased to 0.40 failure/km/year (according to The Polish Waterworks Chamber of Commerce). However, these values are much higher than the failure rates of water supply systems in other European countries, ranging from 0.10 to 0.30 failure/km/year. The decrease in the failure rate of the water supply system observed in Poland is a result of popularization of charges for water supply system, which resulted in implementation of the principles of operation of water supply systems based on economic calculation and translated into increased care for their technical condition.
The implementation of Supervisory Control and Data Acquisition (SCADA) systems in water supply companies resulted in the creation of multidimensional, disperse data sets coming from devices controlling the operation of the water supply system. Thanks to the use of metadata and advanced IT systems of collection analysis, data from various sources can be analyzed in order to detect the phenomena important for decision making in water companies [5]. At the turn of the 20th and 21st centuries, it was pointed out that data from continuous monitoring of industrial processes, necessary for supervision and automatic control, can also be used to detect failure situations using numerical diagnostic tools [6,7]. Initially, procedures were introduced to control the correctness of measuring devices and then to detect unusual states of operation of technical devices [8,9]. Quick detection and diagnosis of malfunctions of measuring devices and the operation of the controlled technical system result not only from economic considerations, but also from the need of limiting environmental effects by reducing the risk of failure [10]. The monitoring of the state of operation of the water supply system should not be considered only in the aspect of emergency situations. For rational operation of water supply systems, the parameters of their operating status should also be recognized during unusual water consumptions, e.g., during holidays, public holidays, during popular or very interesting TV programs and in academic cities, taking into account the academic year. Depending on the purpose of the analyses: failure detection, assessment of the condition of the water supply system or location, a number of specialized methods of digital processing of the parameters of the water supply system conditions are implemented.
Among the methods of detecting the working conditions of the water supply network currently used in practice, one can distinguish hardware and software methods [11]. In hardware methods, which can also be called instrumental methods, diagnosis is performed mainly by using specialized equipment or test and diagnostic apparatus. In software methods, computer systems for data collection are used to diagnose, and using specialized calculation algorithms, the occurrence of phenomena that may affect the safety or operating costs of the water supply system is assessed. Software methods include analysis of water consumption, flow rate and pressure in selected points of the system in order to detect unusual situations and search for causes of their occurrence, including failure and pre-failures states.
The software methods include a number of solutions based on water balance and analysis of Minimum Night Flow (MNF) between 02:00-04:00 [12]. The water balance is used in the implementation of good water supply practices aimed at rational, economically justified exploitation of water supply systems, based on the minimization of actual water losses [13]. Silva et al. [14] have demonstrated that a significant drawback of balance for diagnostic purposes methods is that too little data is available and that the reliability of the data is poor. In order to improve balance based diagnosis, the methods used include the High-Density Regions (HDR) probability distribution method [14]. More advanced software solutions have implemented Multi-Criteria Decision Analysis (MCDA), which supports water supply system management and abnormal state detection [15]. The authors of these studies implemented a fuzzy, multi-criteria method of hierarchical analysis of decision-making problems, i.e., Analytic Hierarchy Process (AHP) and a method of linear ordering of the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) objects. Both methods support decision-making processes and their implementation consists in assigning significance to particular activities undertaken to reduce water losses and the number of failures, taking into account the condition of the water supply system. The analyses have shown that the most important impact on the number of failures is related to the way of pressure management in the water supply system and implementation of water balance methods in District Metered Areas (DMAs). The Fixed and Variable Area Discharges (FAVAD) solution is one of the software methods. The FAVAD method is known as the Pressure and Leakage Management strategy (PLM) [16]. Reducing the water pressure in the DMA at night to the level resulting from the size of the water demand and the required geometric lifting height and hydraulic losses contributes to reducing the actual water losses. As part of the FAVAD pressure management strategy, during minimum night-time flows in the DMA water supply pipeline, the pressure in the system is reduced by using Pressure Reducing Valve (PRV). The idea of the FAVAD solution determines the dependence of the amount of failure discharge on the Average Zone Pressure (AZP) [17,18]. The effect of pressure on the flow rate through the orifice considers the relationship between the initial and final flow rates, depending on the prevailing operating pressure.
Advanced methods of flow rate and pressure analysis, registered on active water supply systems with SCADA systems have not been widely used so far due to the complexity of calculation procedures. For this reason, technical infrastructure diagnostics is a young and constantly evolving field. Apart from basic analyses of the parameters of water supply system operation, data mining techniques and learning systems, which are the basis for data mining, are seeing increasingly frequent use to detect abnormal situations. It is customary to divide the learning systems into learning solutions with the so-called supervision and without supervision. The classification of operating states of the water supply system, based on the analysis of flow rate and pressure parameters, includes cluster analysis using hierarchical trees, Support Vector Machine (SVM) and Decision Trees (DC). So far, most of the research results aimed at the recognition of the possibility of using data mining methods have not been implemented in many countries, including Poland, in the creation of advisory systems for services supervising the operation of complex water supply systems. One of the reasons for this situation is the lack of research conducted on real water supply systems. Most of the studies conducted so far are limited to laboratory conditions or a semi-technical scale [19,20]. The analysis of operation conditions (flow rate and pressure) is used to assess the condition of water supply systems. Review of the subject literature shows that analytical tools, such as support vector machine (SVM) and the k-nearest neighbor algorithm are used to detect operation status of water supply networks [21]. The cited research indicates that the highest accuracy of water supply operation status based on pressure parameter (94.8%) in case of failure detection had a naïve Bayes classifier. The lowest accuracy (78.51%) used a k-nearest neighbor algorithm. Neural networks [22] and decision trees [23] were also used to detect operation status of water supply systems.
Water supply infrastructure diagnostics have many limitations. Barriers to the implementation of diagnostic tools in water and sewage companies are high costs and a lack of qualified diagnostic staff who understand the essence of phenomena occurring in water supply networks and who know modern IT methods of signal analysis, including artificial intelligence methods necessary to classify phenomena based on signals from the monitoring of the water supply system. Measurements of the water supply network have caused a situation where a huge number of measurement results exceed the perceptive abilities of network dispatchers and operators, and there is a misconception about the non-interpretability of data sets generated by extensive SCADA systems. Attention is also drawn to restrictions on the ability to register and manage large databases, mainly due to the lack of implemented signal processing procedures at the place of their creation [19]. As far as extended water supply systems are concerned, time synchronisation of measurement data coming from different control points is also a problem [24]. One of the most frequently mentioned barriers to the detection of water supply operation status is a limited number of field studies. Because of this, most of the diagnostic methods presented in the literature have limited scope of application [25].
The main goal of the research presented in this article was to assess the possibility of using the modified assumptions of the FAVAD method to diagnose the operating conditions of the actual water supply system. The analyses were carried out on the basis of time series of pressure and flow rate changes. On the basis of the values of these parameters and the assumptions of the FAVAD approach, an empirical exponent α was determined. The research included verification as to whether the controlled, step change of pressure during the MNF allows to qualify the states of operation of the water supply network in the DMA. An additional aim of the research was to check whether the empirical values of α exponents, determined for the phases of pressure reduction and increase, can be used as an element of classification of operating states of water supply systems. In the research conducted so far, the FAVAD method was used to determine the amount of unexpected leakages of water as a result of failure at variable pressure. The new approach presented in the paper allows to consider the determination of the exponent linking the flow rate-pressure relationship, which is an analytical problem that has not yet been addressed in the context of water supply network diagnostics.
The paper is organized in four Sections. In Section 2 the operating parameters of the water supply system are described. The same Section outlines measurement events proposed for analysis, FAVAD method assumptions and its modifications that lead to the calculation of the empirical exponent α k−n and methods used to assess the accuracy of classifiers. Research results presented in Section 3 are thematically organised into two parts. In the first, the values of exponents α k−n for both the pressure reduction and growth phases are analyzed. The second part contains the results of the classification of the empirical exponent α k−n with the use of supervised and unsupervised learning systems as well as the assessment of accuracy of classifiers. The final conclusions are provided in Section 4.

Monitoring of Hydraulic Parameters and Study Area
The recording of the operating parameters of the water supply system-flow rate and pressure-was carried out on a main pipeline with a nominal diameter of 800 mm. Water is supplied through the pipeline to a separate water supply of the DMA, which is under the management of Municipal Water and Sewage Company S.A. in Wroclaw (Poland). The selected region is inhabited by about 22,400 people and the DMA daily receives 4000 m 3 of water. The night-time pressure reduction procedure is carried out by a zone water pumping station, in which three pump sets are operated, each consisting of four single-stage centrifugal pumps with a power of 18.5 kW. The total capacity of the pump sets is 2184 m 3 /h and the head is 35 mH 2 O. In each pump set, one pump unit cooperates with a variable frequency drive and the others are equipped with soft-start devices and a soft-braking controller, which prevents excessive pressure amplitudes.
Changes in pressure and flow rate in the experimental facility were recorded from April 2017 to January 2018. Flow rate measurements were taken from a permanently installed electromagnetic flow meter with a measurement accuracy of ±0.25%. The measurement interval in the period considered was 1 min and the momentary value of the signal was measured at a given interval. Pressure value measurements were performed with a portable electronic set to measure and record data. The pressure sensor used in the device was characterized by a measurement error of ±0.05%. The time step of pressure recording was equal to 1 s for the daytime period and 0.01 s for the night-time pressure reduction. Figure 1 shows examples of pressure and flow rate changes at the pumping station located before the selected DMA. For this area, a FAVAD strategy was implemented to reduce the actual night-time water losses. The step-by-step pressure function forces a controlled change in the operating parameters of the water supply system in the DMA. It should be noted that the controlled pressure change is a deterministic action, as opposed to pressure changes caused by random factors during the traditional operation of water supply systems. After a sudden change in pressure, the observed changes in this parameter are the result of random factors connected with dynamic changes in water consumption by consumers. For the purposes of the research, a definition of a water supply day was introduced, calculated from 15:00 on the current day to 15:00 the following day. During the day, a constant pressure at the level of about 450 kPa (phases I and V) was maintained. From 00:00 to 05:00, the pressure was reduced by applying a two-stage pressure reduction from approximately 450 kPa to approximately 420 kPa (phase II) and then 340 kPa (phase III). The pressure was increased in the reverse order (phases IV and V in turn). The pressure changes between the individual phases lasted about 2 min. The duration of phases II and IV was 50 min, and phase III lasted 3 h and 50 min. The duration of 50 min for transition phases II and IV was caused by the necessity of avoiding too rapid pressure reductions and increases that could lead to water hammers, which, in turn, contribute to pipe failures. Phase III is a period of almost steady-state water supply operation conditions during the minimum night flow. pressure change is a deterministic action, as opposed to pressure changes caused by random factors during the traditional operation of water supply systems. After a sudden change in pressure, the observed changes in this parameter are the result of random factors connected with dynamic changes in water consumption by consumers. For the purposes of the research, a definition of a water supply day was introduced, calculated from 15:00 on the current day to 15:00 the following day. During the day, a constant pressure at the level of about 450 kPa (phases I and V) was maintained. From 00:00 to 05:00, the pressure was reduced by applying a two-stage pressure reduction from approximately 450 kPa to approximately 420 kPa (phase II) and then 340 kPa (phase III). The pressure was increased in the reverse order (phases IV and V in turn). The pressure changes between the individual phases lasted about 2 minutes. The duration of phases II and IV was 50 minutes, and phase III lasted 3 hours and 50 minutes. The duration of 50 minutes for transition phases II and IV was caused by the necessity of avoiding too rapid pressure reductions and increases that could lead to water hammers, which, in turn, contribute to pipe failures. Phase III is a period of almost steady-state water supply operation conditions during the minimum night flow.

Modification of the FAVAD Method
The possibilities of the FAVAD method, in which the dependence of the magnitude of the leakage on the pressure is shown, was a prerequisite for undertaking the original tests. The original assumptions of the FAVAD method can be described as Equation (1): where: L1 leak flow rate at adjusted pressure P1, m 3 /hr; L0 initial leak flow rate at pressure P0, m 3 /hr; P1 adjusted average zone pressure at leak flow rate L1, Pa; P0 initial average zone pressure at leak flow rate L0, Pa; α* leakage exponent, -. The leakage exponent α*, which is usually calculated under laboratory conditions during steadystate water flows and with no water demand, is affected by the type of leakage, the size of the pipe crack, the material of which the pipeline is made, the flow conditions (laminar, turbulent) and the type of ground in which the pipe is placed. Leak areas vary with pressure depending on the pipe material's behavior [26]. The purpose of the base approach is to present how the leakage volume changes for a given value of the empirical exponent due to failure during various pressure conditions.

Modification of the FAVAD Method
The possibilities of the FAVAD method, in which the dependence of the magnitude of the leakage on the pressure is shown, was a prerequisite for undertaking the original tests. The original assumptions of the FAVAD method can be described as Equation (1): where: L 1 leak flow rate at adjusted pressure P 1 , m 3 /h; L 0 initial leak flow rate at pressure P 0 , m 3 /h; P 1 adjusted average zone pressure at leak flow rate L 1 , Pa; P 0 initial average zone pressure at leak flow rate L 0 , Pa; α* leakage exponent, -.
The leakage exponent α*, which is usually calculated under laboratory conditions during steady-state water flows and with no water demand, is affected by the type of leakage, the size of the pipe crack, the material of which the pipeline is made, the flow conditions (laminar, turbulent) and the type of ground in which the pipe is placed. Leak areas vary with pressure depending on the pipe material's behavior [26]. The purpose of the base approach is to present how the leakage volume changes for a given value of the empirical exponent due to failure during various pressure conditions. Methodological meaning was inverted in the research presented in the article. The aim was to calculate the empirical exponent based on a known flow rate and pressure. It has been shown that in the conditions of the actual water supply network, when the empirical exponent α differs from the laboratory values, it is necessary to monitor the leakage exponent parameter, which is additionally affected by the dynamic and random character of water consumption. Its calculation and analysis during the operation of a real water supply system becomes, therefore, a multi-faceted task, because not only the emergency status of the water supply network is taken into account, but also the operational status variability. In the presented research, an attempt was made to analyze the empirical exponent in the context of assessing the condition of a single pipe with known and invariable material and soil properties and variable operating status of the water supply (failure, holiday events, working days). Due to the labor needed and time-consuming nature of the chosen method in the future, its automation will allow to develop tests taking into account other pipes made of different materials and different locations of the DMA zones.
Within the framework of these tests, the original assumptions of the FAVAD method have been modified. In order to link the values of average flows with the average values of pressure, recorded in each of the five phases of the water supply day, an empirical relationship analogous to Equation (1) in the form of Equation (2) was proposed: where: Q k average flow rate in the k-th phase of the experiment, m 3 /s; Q n average flow rate in the n-th phase of the experiment, m 3 /s; P k average pressure at k-th phase of the experiment, Pa; P n average pressure in the n-th phase of the experiment, Pa; α k−n empirical exponent binding the average values of pressure and average values of flow rate in the k and n phases of the experiment, -.
The final form of the empirical exponent α k−n between the different phases of the experiment was determined with Equation (3): Equation (3) has no theoretical justification, but it allows to determine the empirical relationship between the data sets recorded in the time domain for each phase of the system's operation. The calculation of exponent values α k−n is simple to analyze, so it can be implemented to detect the operating status of the water supply system, being a specific characteristic of a selected DMA, combining the parameters of flow rate, depending on the demand for water, and pressure.

Database
The database consists of 30 measurement events which were selected for analysis. They were recorded in the period from 26 April 2017 to 14 January 2018 ( Table 1). Most of them were selected randomly, but the following public holidays were purposefully analyzed: 15 August 2017 (in Poland it is the church holiday of the Blessed Virgin Mary), 25-26 December 2017 (Christmas Day), 31 December 2017 to 1 January 2018 (New Year's Eve) and holidays (weekends). During the measurement period, there was a serious failure of the water mains (7 May 2017), which resulted in the lack of water in many places in Wroclaw and, practically in the whole city, a reduced pressure in the network was observed. This event was also included in the input database. In Table 1, holidays are marked in blue, events analyzed in the context of an accident in red and weekends in green (Saturday-Sunday). Events on the 26-27 April 2017 and 5-6 May 2017 were analyzed with reference to the days preceding the failure occurring on 7 May 2017, while events from the 09-10 May 2017 were analyzed 24 h after the failure.  Each water supply day was divided, according to the chosen methodology, into five phases of the experiment (see Figure 1). This procedure was applied both to mean values of flow rate and pressure. Finally, 150 time series of pressure and 150 flow rates were obtained for the analyses, on the basis of which empirical coefficients were determined. α k−n for experimental phase relationships during pressure reduction: II-I (α II−I ), III-I (α III−I ) and III-II (α III−II ) and also during its morning increase for phases: IV-III (α IV−III ), V-III (α V−III ) and V-IV (α V−IV ).
After the stage of determining the size of empirical exponents, machine learning was used to classify the operating states of the water supply network of a selected DMA on the basis of α k−n . Cluster Analysis (CA) with the use of hierarchical trees was used as a method of unsupervised learning. CA included grouping algorithms based on Euclidean distance measurement separately for the process of pressure reduction and increase. Euclidean distance is understood as a measure expressed in a straight line between measuring points located in a two-dimensional system of coordinates. It can be expressed by means of Equation (4): where: x,y vectors of values of properties of compared objects in space; STATISTICA 13.1 was used to perform cluster analysis. Supervised machine learning was implemented using the Classification Learner library of MATLAB R2019a. Calculations were made using automatic classification based on SVM, algorithm k-kNN (k-Nearest Neighbours), Quadratic Discriminant. Measuring events were divided into three categories: pre-failure and failure condition, working days as a reflection of typical conditions and non-working days, which included holidays and weekends (i.e., Saturday-Sunday). Within these groups, empirical exponents α k−n between experimental phases were analyzed: II -I, III-I, III-II, IV-III, V-III  A schematic representation of the research stages is presented in Figure 2. A schematic representation of the research stages is presented in Figure 2.

Tests on the Value of Empirical Exponents for Pressure Reduction and Increase
In accordance with the adopted methodology, the exponent sizes of α were determined for the pressure reduction and pressure increase phases and the calculation results are shown in Figure  3 and in Table 2.
The values of exponents α for the pressure reduction phase are shown in Figure 3 by green markers, while the growth is shown by blue markers. The dispersion of the value of rate α indicates the existence of a close relationship between its size and the time of the water supply system day. It can be seen that the smallest values of the exponent α during the reduction of pressure,

Tests on the Value of Empirical Exponents α k−n for Pressure Reduction and Increase
In accordance with the adopted methodology, the exponent sizes of α k−n were determined for the pressure reduction and pressure increase phases and the calculation results are shown in Figure 3 and in Table 2. The values of exponents α k−n for the pressure reduction phase are shown in Figure 3 by green markers, while the growth is shown by blue markers. The dispersion of the value of rate α k−n indicates the existence of a close relationship between its size and the time of the water supply system day. It can be seen that the smallest values of the exponent α k−n during the reduction of pressure, network status parameters III and II, are achieved, i.e., when there are minimal night flows. The greatest fluctuations are observed between the second and the first stage, which is the result of the impact of the random nature of water consumption by system users.
Minimum extremes, which correspond to stage II-I and III-II during the emergency day, i.e., 07 May 2017, are noticeable. In addition, a smaller value of the exponent in relation to other measurement events for all relations was obtained also for the holidays 25 December 2017 and New Year's Day. It was caused by a significant drop in household's usage of water on these days, which generated lower flow rate values. Analogously to the analyses of the exponent α k−n in the variant of pressure reduction, its interpretation was made in the case of pressure increase for the phase relations IV-III, V-III and V-IV. The lowest achieved values of the rate α k−n were obtained for ratios of network state parameters for stages IV-III during the pressure increase. The highest were for the time corresponding to the maximum flow rates, i.e., V-IV levels, covering the morning water demand. For degrees IV-III and V-III, a clearly outstanding α k−n for 25 December 2017 and New Year was observed.
Water 2019, 11, x FOR PEER REVIEW 9 of 18 greatest fluctuations are observed between the second and the first stage, which is the result of the impact of the random nature of water consumption by system users. Minimum extremes, which correspond to stage II-I and III-II during the emergency day, i.e., 07 May 2017, are noticeable. In addition, a smaller value of the exponent in relation to other measurement events for all relations was obtained also for the holidays 25 December 2017 and New Year's Day. It was caused by a significant drop in household's usage of water on these days, which generated lower flow rate values. Analogously to the analyses of the exponent α in the variant of pressure reduction, its interpretation was made in the case of pressure increase for the phase relations IV-III, V-III and V-IV. The lowest achieved values of the rate α were obtained for ratios of network state parameters for stages IV-III during the pressure increase. The highest were for the time corresponding to the maximum flow rates, i.e., V-IV levels, covering the morning water demand. For degrees IV-III and V-III, a clearly outstanding α for 25 December 2017 and New Year was observed.   Table 2 shows holidays in blue, events analyzed in the context of a failure in red and weekends in green (Saturday-Sunday). The remaining events were analyzed in the context of typical states of operation of the water supply system. For the relations of degree II-I, the lowest value of the rate α II−I was observed during the failure: −1.59. It then became negative as a result of a drop in pressure and had an almost zero flow rate during an anomaly. A negative value was only calculated for the phase during which a failure took place, which results from the measured pressure values and flow rates between individual phases of the research. Moreover, the public holidays 15 August 2017, 25 December  Between the experiment stages III-I, i.e., the minimum night flow MNF and the stage satisfying the evening, maximum water demand, the lowest value of the exponent α III−I , results were also negative, recorded for the emergency 24 h as −4.30. On public holidays, α III−I is much smaller than its average value for the selected relationship of degrees of network state parameters. The highest value was achieved for the day 18 October 2017, which is a derivative of the recorded mean value of the flow rate. It remained at the level of 218.93 m 3 /h, whereas typically, for the first level, for all events the average for all events was 184.88 m 3 /h. It is not possible to unequivocally identify the cause of this state of affairs. Consultations with the network manager did not reveal any failures. This day is also a working day (Wednesday), which suggests the influence of anthropogenic behavior.
The lowest exponent values of α III−II are achieved between III-II degree of analyzed parameters. Exponent α III−II on average amounts to 3.36 therefore, in relation to the research conducted by Thornton and Lambert [27], it can be concluded that conditions in this period are close to those steady-state. Stage III falls temporarily between 00:00 and 04:00, although according to literature reports, more precise flow in water supply systems takes place between 02:00 and 04:00 [28]. The smallest exponent, α III−II , was obtained for the New Year s Eve, i.e., 1.66. The largest (4.67) for the day preceding the failure, which suggests that its current analysis could lead to earlier detection of a failure and prevent the total destruction of the pipe. Equally, a high α III−II was noted for nights during weekends on 20-21 May 2017 (i.e., Saturday-Sunday) and during public holidays 15 August 2017 and 25-26 December 2017.
Between phases of experiment IV and III, in which the MNF are contained, the smallest value of the exponent α IV−III negative, was recorded for the New Year's water supply day: −2.38. Negative exponents α IV−III were also obtained in the case of the holiday of 25 December 2017 and 15 August 2017. Its greatest value was achieved for the water supply day 26 April 2017, analyzed in the context of the breakdown of the preceding day and the day on which it occurred. The mean value of the exponent α IV−III for relations IV-III degree is 2.23, which corresponds to its limits set by Thornton and Lambert [27]. It can therefore be concluded that the conditions most relevant to those steady-state are between stage IV and stage III.
For the relations of degree V-III, the lowest rate α V−III was observed during the New Year's Eve: 1.50, which is almost four times lower than the average. In addition, the public holiday 25 December 2017 also shows α V−III value lower than mean: 3.77. The highest exponent α V−III was recorded during the weekend 22 September 2017-6.68-and the day of failure-6.25. An equally high value of α V−III , exceeding the mean value for V-III, was recorded for 15 August 2017.
The highest values of the α k−n exponent are achieved between V and IV degrees of the analyzed parameters. At this stage of pressure changes, the value of α k−n on average amounts to 19 Initial analysis of α k−n demonstrates its close relationship with the state of operation of the water supply system, understood both in technical and operational terms. The dependence on the fact that the exploitation condition is to the greatest extent caused by sociodemographic factors, resulting in irregularity and randomness of water consumption becomes clearly visible. The results of the research confirm the assumptions that the values of the exponents α k−n depend to the greatest extent on the random nature of water consumption by consumers on the measuring day, thus reaching the lowest values during the minimum night flow periods. Due to the fact that the obtained test results are difficult to interpret as a point cloud, in the next stage of the study, the following systems of supervised and unsupervised learning were implemented.

Classification of Operating Conditions of the Water Supply System with the Use of Unsupervised Learning
The analysis of the determined values of exponents α k−n used cluster analysis with hierarchical trees. Figure 4 shows the dendrograms for the phase of pressure reduction and increase.
Both dendrograms show that the values of the exponents α k−n are associated with the day of the week, holidays and their value is also affected by failure conditions. Better diagnostic properties of failure states result from the analysis of values of exponents α k−n for the pressure reduction phase, because in this case, greater Euclidean distances were obtained. In addition, the days off from work constitute clusters with the largest Euclidean distances, especially for the pressure reduction process. This suggests that more different habits in the use of tap water are observed as part of the evening consumption than in the morning. the week, holidays and their value is also affected by failure conditions. Better diagnostic properties of failure states result from the analysis of values of exponents α for the pressure reduction phase, because in this case, greater Euclidean distances were obtained. In addition, the days off from work constitute clusters with the largest Euclidean distances, especially for the pressure reduction process. This suggests that more different habits in the use of tap water are observed as part of the evening consumption than in the morning. The analytical work carried out showed that it is advisable to continue the research on the multistage change of pressures during the night and to determine the values of exponents α , that provide information on the operating statuses of DMAs. It is also important to note that in the phase of pressure reduction, the values of exponents α allow to identify more accurately non-typical operating states in DMA compared to the pressure rise phase.
The operator of the water supply network, at the signaling of unusual conditions during the reduction of pressure in the night hours, has the possibility to make a detailed analysis of the results obtained. From the observations of the Wroclaw water supply system, it appears that the failure usually occurs during the pressure increase and the maximum daily demand. The information collected during the pressure reduction phase is pre-emptive in relation to the period of failure occurrence, which is of great diagnostic value.

Classification of Operating Conditions of a Water Supply System using Supervised Learning Systems
A set of obtained results in the form of empirical exponents α was divided into three categories of events: pre-failure and failure status, working days and non-working days (holidays). The classification with the use of learning methods under supervision was conducted for all six relationships between the various phases of the experiment (II-I, III-I, III-II, IV-III  The analytical work carried out showed that it is advisable to continue the research on the multistage change of pressures during the night and to determine the values of exponents α k−n , that provide information on the operating statuses of DMAs. It is also important to note that in the phase of pressure reduction, the values of exponents α k−n allow to identify more accurately non-typical operating states in DMA compared to the pressure rise phase.
The operator of the water supply network, at the signaling of unusual conditions during the reduction of pressure in the night hours, has the possibility to make a detailed analysis of the results obtained. From the observations of the Wroclaw water supply system, it appears that the failure usually occurs during the pressure increase and the maximum daily demand. The information collected during the pressure reduction phase is pre-emptive in relation to the period of failure occurrence, which is of great diagnostic value.

Classification of Operating Conditions of a Water Supply System Using Supervised Learning Systems
A set of obtained results in the form of empirical exponents α k−n was divided into three categories of events: pre-failure and failure status, working days and non-working days (holidays). The classification with the use of learning methods under supervision was conducted for all six relationships between the various phases of the experiment (II-I, III-I, III-II, IV-III, V-III, V-IV). Table 3 presents the results of the classification carried out using the designated exponents α k−n for the three classification methods for which the best match results were obtained for each data set. The best classifier match (90.0%) was obtained for the II-I phase relation of the experiment by Quadratic Discriminant and Naive Bayes Classifier during the pressure reduction process. At minimal night-time MNF flows, the accuracy percentage was 73.3% for Quadratic Discriminant analysis. This means that the best effects of diagnosing the state of the water supply system are obtained by analyzing the values of the exponents α II−I and α III−I during pressure lowering, which are simultaneously determined for the phases with the highest water demand. The accuracy of 83.3% was obtained for the phase IV-III relation between the minimum night flow and the morning pressure increase for α IV−III . The lowest classifier value (70.0%) was determined for α V−IV .
The percentage of proper match in the three groups of states of operation of the water supply system was determined on the basis of an error matrix. Table 4 shows the values of positive match rates for each real and predictive class, known in the literature under the acronym TPR. Events from the working day group were best matched. For almost all phases and their exponents, α k−n 100% match to the appropriate category of condition of the water supply system was obtained. Within the public holidays class, the best classification value of 83% was obtained for degrees II-I during pressure reduction and IV-III during pressure increase (67%). The lowest match quality, i.e., only 17%, was obtained for the group of non-working days for phase relations during minimum night flows. Breakdowns and pre-failure states were correctly categorized in 67% for phase II-I pressure reduction. Since the best accuracy of the classification process was obtained on the basis of an empirical exponent α II−I , which is responsible for the experimental phases concerning the evening use of the water supply system by users, further on, error matrices for the results obtained through Quadratic Discriminant analyses were prepared. Figure 5a contains the percentage of correct positive predictions of the aforementioned TPR, also known in the literature as sensitivity. The results are the same as in Table 3. Moreover, the percentage of incorrect FNR was determined. It can be noted that within the actual class for holidays, 17% of events were incorrectly predicted to be working days events. In the actual class of failure and pre-failure events, 33% of events were incorrectly classified as working days. Within the true class of working days, only 5% of events were incorrectly predicted to the group characteristic for non-working days. Therefore, it can be concluded that the easiest time to distinguish between the states of water supply system operation is during working days and holidays, while the most difficult is to distinguish pre-and failure states from working days.
Positive Predictive Value (PPV) and False Discovery Rate (FDR) are shown in Figure 5b. PPV is an indicator of the predictive quality of a test and is also called precision. Within the group of days off work, 83% of positive predictions are confirmed with the actual state of affairs, within the group of failure and pre-failure conditions this percentage is 100%, while within the group of working days, 91% of positive predictions are confirmed. Since the best accuracy of the classification process was obtained on the basis of an empirical exponent α , which is responsible for the experimental phases concerning the evening use of the water supply system by users, further on, error matrices for the results obtained through Quadratic Discriminant analyses were prepared. Figure 5a contains the percentage of correct positive predictions of the aforementioned TPR, also known in the literature as sensitivity. The results are the same as in Table 3. Moreover, the percentage of incorrect FNR was determined. It can be noted that within the actual class for holidays, 17% of events were incorrectly predicted to be working days events. In the actual class of failure and pre-failure events, 33% of events were incorrectly classified as working days. Within the true class of working days, only 5% of events were incorrectly predicted to the group characteristic for non-working days. Therefore, it can be concluded that the easiest time to distinguish between the states of water supply system operation is during working days and holidays, while the most difficult is to distinguish pre-and failure states from working days.
Positive Predictive Value (PPV) and False Discovery Rate (FDR) are shown in Figure 5b. PPV is an indicator of the predictive quality of a test and is also called precision. Within the group of days off work, 83% of positive predictions are confirmed with the actual state of affairs, within the group of failure and pre-failure conditions this percentage is 100%, while within the group of working days, 91% of positive predictions are confirmed.  Due to the fact that the process of classification of the states of operation of the water supply system was most successful for empirical exponents α II−I , the accuracy of classifiers was evaluated using ROC curves. The vertical axis of the ROC curve, which describes the values of the TPR match factor, is called the "sensitivity" axis, while the horizontal axis determines the frequency of false alarms of FPR and is called the "specificity". The classification requires the determination of the optimal cut-off point of the ROC curve, which indicates the balance between the sensitivity parameter and the specificity of the classifier. The most optimal cut-off point coordinates are values equal to 0 for specificity and 1 for sensitivity, i.e., coordinates (0,1) [29,30]. A very important parameter in classifier accuracy assessment is the area under the ROC curve, the so called area under ROC curve. The closer the AUC is to 1, the better is the matching accuracy of the classifier. It is assumed that the AUC in the range 0.9-1.0 is of very good may quality, 0.8-0.9 is good and 0.7-0.8 is sufficient. Figure 6 shows the ROC curves for the three accepted groups of water supply system statuses: failure and pre-failure (Figure 6a), working days ( Figure 6b) and holidays (Figure 6c). In terms of the surface area parameter under the AUC diagram, the best classification quality was obtained for the group of events containing failure and pre-failure conditions (AUC = 0.95), which indicates a very good matching quality. Subsequently, a good match was obtained for the working day class (AUC = 0.94) and non-working day class (AUC = 0.92). All ROC curves indicate a very good quality of matching the classification model using Quadratic Discriminant.
AUC in the range 0.9-1.0 is of very good may quality, 0.8-0.9 is good and 0.7-0.8 is sufficient. Figure 6 shows the ROC curves for the three accepted groups of water supply system statuses: failure and pre-failure (Figure 6a), working days ( Figure 6b) and holidays (Figure 6c). In terms of the surface area parameter under the AUC diagram, the best classification quality was obtained for the group of events containing failure and pre-failure conditions (AUC = 0.95), which indicates a very good matching quality. Subsequently, a good match was obtained for the working day class (AUC = 0.94) and non-working day class (AUC = 0.92). All ROC curves indicate a very good quality of matching the classification model using Quadratic Discriminant. The conducted research on classification of operating conditions of water supply systems using supervised learning methods showed that the best accuracy of classifiers was obtained using Quadratic Discriminant. The best classification quality of failure and pre-failure conditions was obtained for empirical exponents of phase II-I of the experiment. The best matching results were obtained for working days (95%-100%). This is of particular importance for the implementation of machine learning procedures for data from exploited water supply systems. Each situation for which the measurement results differ from the generated classifier for individual days can be qualified as an abnormal state of operation of the water distribution system and should be subject to detailed analysis by the operator supervising the water supply system.

Conclusions
Water losses resulting from uncontrolled and undetected emergency leakages are important problems during the operation and management of a water supply system, as is the need to diagnose them. None of the methods used so far to detect the state of operation of the water supply system is universal. They have numerous advantages and disadvantages, and are differentiated in terms of implementation costs, speed of anomaly detection and the possibility of their classification. The process of assessing the condition of the water supply system should be divided into two main parts. The first consists of a global diagnosis by means of software solutions which analyze the parameters The conducted research on classification of operating conditions of water supply systems using supervised learning methods showed that the best accuracy of classifiers was obtained using Quadratic Discriminant. The best classification quality of failure and pre-failure conditions was obtained for empirical exponents of phase II-I of the experiment. The best matching results were obtained for working days (95-100%). This is of particular importance for the implementation of machine learning procedures for data from exploited water supply systems. Each situation for which the measurement results differ from the generated classifier for individual days can be qualified as an abnormal state of operation of the water distribution system and should be subject to detailed analysis by the operator supervising the water supply system.

Conclusions
Water losses resulting from uncontrolled and undetected emergency leakages are important problems during the operation and management of a water supply system, as is the need to diagnose them. None of the methods used so far to detect the state of operation of the water supply system is universal. They have numerous advantages and disadvantages, and are differentiated in terms of implementation costs, speed of anomaly detection and the possibility of their classification. The process of assessing the condition of the water supply system should be divided into two main parts. The first consists of a global diagnosis by means of software solutions which analyze the parameters of the working condition recorded within the monitoring framework. The indirect solution (software) has been devoted to this research. Issues related to the indirect detection of the condition of the water supply system are a new field which is undergoing continuous scientific and technological development. Only after the software diagnosis should the detailed detection of causes and/or place of anomalies be implemented by use of precise tools and hardware.
In this article, to assess the state of the operation of the water supply system, the empirical exponent α k−n was used based on an analogy to the Fixed and Variable Area Discharges (FAVAD) approach in a modified form. In the research so far, e.g., Thornton and Lambert [27], the FAVAD method was used in order to calculate the volume of uncontrolled water leakages caused by failures in variable pressure. The new approach presented in the paper considers the determination of the exponent binding the flow rate-pressure relationship to assess the condition of the water supply network, which is an analytical problem that has not been addressed so far. The research was conducted into a real water supply network with a dynamic water flow and consumption, which constitutes a multi-faceted task compared to analyses performed under laboratory conditions.
The study was carried out in the Wroclaw DMA of reduced night-time pressure. Based on the results of studies and analytical work, it can be concluded that the introduction of controlled, cascading pressure reduction before the period of minimum night flow and cascading pressure increase before the morning increase of water demand allows to implement new analytical procedures for the analysis of time series of pressure and flow rate. Based on these procedures, it is possible to qualify the operating statuses of the water supply system in the DMA. Analysis of empirical exponents α k−n can, according to the original assumption of the FAVAD, be used to assess the operating conditions in separate DMAs of the actual water supply system. Changes in empirical exponents bring important information for diagnosing the operating states of water supply systems due to the fact that this value is a binding parameter of pressure and flow rate, depending on the deterministic random character of water consumption. Supervised and unsupervised learning systems were used in the research. The use of these tools made it possible to classify the operating statuses of the water supply systems with an accuracy of 90%. Despite the fact that neural network, naïve Bayes classifier [31] and decision tree [23] methods are used for the detection of working conditions of water supply networks, machine learning methods, based on the empirical factor that can be considered a base for real-time monitoring in the future, have not been used. The research results may significantly contribute to diagnosing operating conditions of water supply networks and may constitute one of the tools supporting the assessment of water supply network conditions in water supply companies.
It is necessary to implement new technical solutions and procedures, enabling the recording and analysis of the empirical exponent α k−n . It is advisable to conduct further research, because increasing the number of recorded events on water supply systems will allow to develop algorithms necessary to implement the classification of operating conditions of water supply systems and to develop consulting systems, using methods of machine learning with supervision and without supervision.