Kohonen Artificial Networks for the Verification of the Diameters of Water-pipes

.


Introduction
The design of the water distribution system is inherently linked to the execution of calculations, the purpose of which is, among other things, determination of the flow rate through the individual pipes, the selection of diameters for maintaining appropriate speeds, the calculation of pressure losses and pressure levels at the nodes.It seems that classical algorithms with a formalised course, can be supplemented with much more advanced computational techniques derived from the field known as artificial intelligence (Konar 2005, Bishop 1995).The scope of this approach includes such methods as artificial, neural networks, expert systems and genetic algorithms.In this paper, an attempt is made to supplement classical methodology by calculating water distribution systems using elements of artificial neural networks.A uni-directional artificial neural network, the so-called "neural network" was used in this paper, the Kohonen Network (Kohonen 2001, Kangas & Kohonen 1996).
An important challenge in the operation of water supply systems is the effective detection of leaks.In the article, by (Aksela et al. 2009) a method based on a self-organising map for the detection of leaks, in the water supply network, was presented.The data used for network training and validation consists of flowmeter readings and reported leak locations.The most important factor facilitating the self-organising, map-based modelling of leakages is the developed leakage function.The experimental results, presented, show that a model, trained on flow data, can detect leaks in a specific area of the water supply network.In the article by (Brentan et al. 2018) presented a grouping method based on self-organising maps, in combination with k-mean algorithms, in order to obtain groups that can be easily identified and used to make decisions supporting the design, operation and management of water distribution systems.In the article by (Blokker et al. 2016) the application of the self-organising, map technique of the SOM was analysed, in order to determine how this method could be used in the numerical analysis of water quality, in water distribution systems.An overview of the methods of artificial intelligence, including SOM, for water supply issues, is given in the work by (Czapczuk et al. 2015).The problem of assessing the accuracy of the selection of diameters of water supply pipes was also addressed in the work by (Dawidowicz et al. 2018) using the K-Nearest Neighbours method, and in the work also by (Dawidowicz 2012), where the method of inducing the rules of the expert system was used.A comparison of two artificial intelligence methods for predicting water supply failure is included in the paper (Kutylowska 2016).

Introduction to Kohonen Network
In the 1950's, the idea of a self-organising system, i.e., one that changes its structure on the basis of information coming to it from the environment, the so-called SOM -Self Organizing Map, was used for the first time.Kohonen used the concept of self-organisation for artificial neural networks and proposed a network called 'Self-organising mapping'.
This, today, but with various modifications, is the most popular type of self-organising network and is named after its inventor-Kohonen.

The Kohonen Network structure
Kohonen nets are used for a non-model classification.Their aim is to select from a certain population, described by a multi-dimensional data vector X = [x 1 ,x 2 ,…,x i ,…,x N ] T , possibly homogeneous groups (clusters) in terms of considered features (input variables).They consist of two layers: input and output.Figure 1 shows a two-dimensional network, while Figure 2 shows a two-dimensional network.The neurons of the input layer (i = 1,..., N), are only used for entering data into the network, without performing any processing.In the output layer of the network, there are radial neurons, hence it is called a radial layer.Individual radial neurons are connected to all inputs and a weight is assigned to each connection.The collection of all connection weights, for each radial neuron, creates a vector of weights W=[w 1 , w 2 ,…,w i ,…, w N ] T , the so-called prototype or codebook vector.The number of neurons in the output layer is determined by the network designer.Neurons in the output layer are not connected to each other and do not transmit information to each other but are connected by a neighbourhood relationship that affects the way neurons learn.

Learning the Kohonen network
Kohonen Networks are taught using an unsupervised learning algorithm (selforganising learning, unsupervised learning) where no 'd output values' of the teaching data are used.In the case of Kohonen Network, we are dealing with competitive learning, so-called.Network learning is done by repeatedly showing examples of learning data, in the vector form X, along with modifications of the output neuron scales 'W'.The network is presented with additional input data, without information on the output signal which the network is to generate for a particular learning vector.The input signal is assumed to belong to one of several classes, but the classes sought are not known and the network seeks to detect them on its own.Similar input signals should be recognised as belonging to the same class.In this way, Kohonen Network tries to determine the structure of the data and the clusters of learning examples present in them.
After training the Kohonen Network, individual neurons should be assigned appropriate class labels, if known.Only then can the radial neurons act as classifiers.Each input signal is assumed to belong to one of several classes and the network output value identifies the class to which the signal belongs.After the learning process, each radial neuron of the output layer, or more precisely the vector of its weights (the so-called master /pattern vector), becomes the pattern or "centre" of a group of closely related input signals.After assigning the corresponding labels (names) of the individual classes to the individual neurons of the output layer, a so-called topological map is created.Class assignment is performed using the K-L Nearest Neighbours algorithm, in which a given neuron is assigned a label, based on the labels of the K-Nearest teaching cases.However, the condition is that at least L of K Neighbours has the same class, otherwise the label of the neuron will be "unknown".
The topological map graphically determines the position in the output layer of neurons, describing individual classes, their neighbourhood and the presence of clusters.In the case of a trained network, it is expected that similar input signals should elicit similar network responses, hence the arrangement of neurons, representing similar classes, should be similar on a topological map, forming certain groups.

Kohonen Network in the assessment of the diameters of water pipes
Numerical experiments were carried out to test the applicability of Kohonen's Network in assessing the diameters of the water distribution system.Sequential learning is used, i.e., learning examples are repeatedly presented to the network.
In order to compile a data set for the teaching neural networks, information on 33 existing medium -and small-sized-water supply systems was collected.Hydraulic calculations were performed for the above water distribution systems for different variants of water uptake from nodes, so as to obtain the widest possible range of data for teaching neural networks.Due to the large amount of data, a procedure was developed to convert the calculations' results for individual sections of the calculation wires to the appropriate format and save them in a set of training examples.Calculations were performed for different values of the absolute roughness coefficient.Based on the results of the hydraulic calculations, for the maximum water intake hour Q hmax , 13,923 teaching examples were obtained.The calculation uses a methodology that takes into account nodal and sectional expenditure (Mielcarzewicz 2000).In this case, the teaching dataset was divided into two subsets: teaching and testing, covering 70% and 30% of the examples, respectively.

An overview of Kohonen Network solutions tested, in the assessment of the diameters of water pipes
Firstly, the network was trained in the form of a chain, consisting of 10 neurons in the output layer.In this case, at the learning stage, it is not possible to assign appropriate diameters to individual neurons, since the 'without a teacher' method was used.The purpose of this training was to verify whether the network automatically assigns input vectors corresponding to individual pipe diameters.
The set of input variables L, Q p , q odc ., Q k , k was assumed.The above network is shown schematically in Fig. 3. Kohonen Networks, with a square grid.The same set of input variables was used as for a one-dimensional network.The learning outcomes for these networks are presented in Table 1.The sensitivity analysis of the input variables for the Kohonen Network is presented in Table 2.The results indicate that two variables are relevant for this type of network Q p and Q k .
Network learning with two input variables: Q p and Q k described in Table 3. Sensitivity analysis for the above variables, showed that they are very important in the functioning of the network.A diagram of Kohonen net, in the form of a 10x10 rectangular grid is shown in Fig. 4.  Labels of individual pipe diameters were assigned to the neurons of the output layer of the Kohonen Network, thus determining their significance.In Kohonen Network, there is a regularity that says that the proximity of signals in the input space of the network equals the similarity of neighbouring objects on the topological map, described by these signals.Therefore, neurons describing the same diameters lie side by side in groups and gradually pass into diameters adjacent to the typeset.

A detailed description of Kohonen Network in the assessment of the diameters of water pipes
As a result of Kohonen neural networks learning, a structure with 2 neurons in the input layer and 900 neurons in the output layer was selected, arranged on a square grid with a width of 30 by 30 neurons (Table 3, item 5).The initial flow values p [l/s] in the Q branch are given at the network input together with the final flow Q k [l/s].In the case of the Kohonen Network, the effect of the remaining variables on the learning error was so insignificant that it was decided to abandon it.
Activation of Kohonen Network for the entire data set, after assigning labels describing the diameters of the wires to individual neurons, made it possible to evaluate the accuracy of the classifications obtained.The results presented in Table 4 indicate a certain number of incorrect classifications, which, however, represent a small percentage of all data.The accuracy of the classification for the learning set is 0.9758974, while, for the test set, it is 0.9717568.

Application of Kohonen Network in assessing the selected water pipe diameters of a water distribution system
Each calculation procedure is followed by an evaluation of the results and, if necessary, correction of the data and subsequent calculations.
The diagnostic method of Kohonen Network, classifies nominal diameters DN based on input data in the form of Q p and Q k .After the calculation of the new variant of the water distribution system, the individual sections of the calculation are assigned to the neurons of the topological map, drawn up for the nominal diameters.By comparing the diameter used for the calculation, with the diameter obtained on the topological map, the accuracy of the chosen diameter can be assessed.
A topological map, created as a result of the labelling neurons of the output layer, graphically shows the position of the classified diameter, relative to those diameters with similar input values.The position of a given diameter relative to other diameters may, for example, suggest the need to change the diameter of the duct, when the neuron describing the diameter, on a given section, is surrounded by neurons corresponding to other diameters.

Summary and conclusions
Various Kohonen Network structures, viz., the number and type of inputs and the size of the output layer were analysed.A sensitivity analysis was carried out to determine the impact of individual inputs on the way the network operates.A series of numerical experiments allowed a set of neural networks with different structures to be created and networks with the best parameters to then be selected.
Kohonen Networks can be used to assess the diameters of water supply lines.The advantage of this solution is the topological map, which graphically shows the position of a given diameter, relative to other diameters, depending on the parameters describing the computational section.

Fig. 1 .
Fig. 1.Diagram of an example of the two-dimensional Kohonen Network for N = 2 (source: own study)

Table 2 .
Sensitivity analysis of neural network input variables from Table 1 (source: own study)

Table 4 .
Results of the classification of water pipe diameters, using Kohonen Network for the test subset (source: own study)