Performance optimization of a leak detection scheme for water distribution networks

Performance optimization of a leak detection scheme for water distribution networks

10th IFAC Symposium on Fault Detection, 10th IFAC Symposium on Fault Detection, Supervision and Safetyon for Technical Processes 10th IFAC Symposium D...

836KB Sizes 0 Downloads 41 Views

10th IFAC Symposium on Fault Detection, 10th IFAC Symposium on Fault Detection, Supervision and Safetyon for Technical Processes 10th IFAC Symposium Detection, Supervision and Safety forFault Technical Processes Available online at www.sciencedirect.com Warsaw, August 29-31, 2018 10th IFACPoland, Symposium on Fault Detection, Supervision and Safety for Technical Warsaw, Poland, August 29-31, 2018 Processes Supervision and Safety Technical Warsaw, Poland, Augustfor 29-31, 2018 Processes Warsaw, Poland, August 29-31, 2018

ScienceDirect

IFAC PapersOnLine 51-24 (2018) 914–921

Performance optimization of a leak detection Performance optimization of a leak detection Performance optimization of a leak detection scheme for water distribution networks Performance optimization of a leak detection scheme for water distribution networks scheme for water distribution networks scheme for water distribution networks Piotr Przystałka ∗∗ Piotr Przystałka ∗ Piotr Przystałka ∗ ∗ Piotr Przystałka of Fundamentals of Machinery Design, Silesian University ∗ Institute ∗ Institute of Fundamentals of Machinery Design, Silesian University Institute of Fundamentals of Machinery Design, Poland Silesian(e-mail: University of 18a Str., of Technology, Technology, 18a Konarskiego Konarskiego Str., Gliwice, Gliwice, ∗ Institute of Fundamentals of Machinery Design, Poland Silesian(e-mail: University of Technology, [email protected]) Konarskiego Str., Gliwice, Poland (e-mail: of Technology, [email protected]) Konarskiego Str., Gliwice, Poland (e-mail: [email protected]) [email protected])

Abstract Abstract Abstract The subject subject of of this this paper paper is is focused focused on on the the problem problem of of robust robust leak leak detection detection in in water water distribution distribution The Abstract The subject of this paper is focused on the problem ofthe robust leakfor detection in water distribution networks (WDNs). The main objective is to present method performance optimization of networks (WDNs). The main objective is toproblem presentofthe method for performance optimization of The subject of this paper is focused on the robust leak detection in water distribution networks (WDNs). The main objective isscheme. to present the method for performance optimization of a model-based multipath leak detection The primary part of the robust fault detection a model-based multipath leakobjective detectionisscheme. Thethe primary of the robust optimization fault detection networks The main to present methodpart for The performance of ascheme model-based multipath leakmodel detection Themethodology. primary part of themodel robustoffault detection is(WDNs). realized applying errorscheme. modelling the system system is scheme is realized applying model error modelling methodology. The model of the is a model-based multipath leak detection scheme. The primary part of the robust fault detection scheme is realized applying model error modelling methodology. The model of the system is created by means of a neural network autoregressive model with an exogenous input, whilst created byrealized means of a neural network autoregressive model with The an exogenous input, whilst scheme is applying model error modelling methodology. model of the system is created by error meansis of a neural network autoregressive model model with an exogenous input, whilst the model identified using aa linear autoregressive with an exogenous input. the model error is identified using linear autoregressive model with an exogenous input. created by error means a neural network autoregressive model with an exogenous input, whilst the model isofidentified using a linear autoregressive model with an exogenous input. The maximal performance of the method is achieved through an evolutionary optimization The maximal performance of using the method is autoregressive achieved through an with evolutionary optimization the model error is(relevant) identified a linear model an detection exogenous input. The maximal performance ofparameters the method is achieved through an evolutionary optimization of the the behavioural of the the elementary blocks of the the leak scheme. of behavioural (relevant) parameters of elementary blocks of leak detection scheme. The maximal performance of the method is achieved through an evolutionary optimization of the behavioural (relevant) parameters of the elementary blocks of the leak detection scheme. The merits merits and and limitations limitations of of the the method method are are discussed discussed and and highlighted highlighted taking taking into into account account The of themerits behavioural (relevant) of the blocks of the leak detection The and limitations ofparameters theleak method are elementary discussed and highlighted taking into scheme. account experimental results obtained for detection in aa real water distribution system. experimental results obtained for leak detection in real water distribution system. The merits and limitations theleak method are discussed and highlighted into account experimental results obtainedoffor detection in a real water distributiontaking system. © 2018, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd.system. All rights reserved. experimental results obtained for leak detection in a real water distribution Keywords: model-based model-based fault fault detection, detection, water water distribution distribution networks, networks, dynamic dynamic neural neural networks, networks, Keywords: Keywords: model-based fault detection, water distribution networks, dynamic neural networks, soft computing optimization, evolutionary algorithms. soft computing optimization, evolutionary algorithms. Keywords: model-based fault detection, water distribution networks, dynamic neural networks, soft computing optimization, evolutionary algorithms. soft computing optimization, evolutionary algorithms. 1. INTRODUCTION INTRODUCTION of the the ground). ground). The The detailed detailed description description of of the the most most 1. of 1. INTRODUCTION of the ground). The was detailed description of the(2003) most important approaches given by Geiger et al. important approaches was given by Geiger of et al. (2003) 1. networks INTRODUCTION of ground). detailed therequire most Water distribution distribution serve many many purposes purposes and and important approaches was givendescription by Geiger et al. (2003) andthe Puust et al. al.The (2010). The related methods Water networks serve and Puust et (2010). The related methods require Water distribution networks serve many purposes and important approaches was given by Geiger et al. (2003) therefore play an important role for industrial and individand Puust et al. (2010). The related methods require continuous updating of the structure of a model and its therefore play an important role for industrial and individcontinuous of structure of aa model its Water distribution networks many purposes and and Puust updating et al.to(2010). The related require therefore play an important roleserve for industrial and individual customers. In such systems, uncontrolled leaks caused continuous updating of the the structure of methods model and and its parameters due the changing characteristics of the ual customers. In such systems, uncontrolled leaks caused parameters updating due to the changing characteristics of the therefore play an industrial and individof the structure ofmaintenance a model and its ual customers. Inimportant such uncontrolled leaks caused by various various factors may systems, affectrole thefor proper maintenance and continuous parameters due to and the changing characteristics of (e.g. the system at the micro macro time of by factors may affect the proper maintenance and system at the micro and macro time of maintenance (e.g. ual customers. In such systems, uncontrolled leaks caused due to caused the macro changing characteristics of (e.g. the by variousoffactors maysystem affect the proper maintenance and parameters operation the whole (urban and/or village infrassystem at the micro and time of maintenance seasonal variations by changes of the seasons, the operation offactors the whole system (urban and/or village infrasseasonalatvariations caused by changes ofmaintenance the seasons,(e.g. the by variousof may affect the proper maintenance and system the microwater and macro time ofof operation themost whole system (urban and/or village infrastructure). The frequent origins of leaks are assembly assembly seasonal caused by changes the seasons, the expansionvariations of the the supply system, replacement of tructure). The most frequent origins of leaks are expansion of water supply system, replacement of operation of themost whole systemoforigins (urban and/or infras- seasonal variations caused byresult changes of the seasons, the tructure). The frequent of leaks village areoverloads, assembly errors, mechanical damages pipes caused by expansion of the etc.). water supply system, replacement of network elements, The is that these methods errors, mechanical damages of pipes caused by overloads, network elements, etc.). The result is that these methods tructure). most frequent of leaks areoverloads, assembly oftothe water supply system, of errors, damages oforigins pipes caused by fatigue,mechanical or The normal wear and tear, tear, material defects in parts parts expansion network elements, etc.). The result is thatreplacement these methods are difficult apply in on-line diagnostic systems that fatigue, or normal wear and material defects in are difficult to apply in on-line diagnostic systems that errors, mechanical damages of pipes caused by overloads, network elements, etc.). The result is that these methods fatigue, or normal wearand andmany tear, others. materialThe defects incritical parts are of pipelines, corrosion, most difficult to apply in on-line diagnostic systems that must operate automatically. of pipelines, corrosion, and many others. The mostincritical must operatetoautomatically. fatigue, or normal wear andmany material defects parts are apply in on-line diagnostic systems that of pipelines, corrosion, and others. The most consequence of such such fault istear, a direct direct hazard to critical human mustdifficult operate automatically. consequence of fault is a hazard to human On the other hand, aa number of pipelines, corrosion, and many others. The most must operate automatically. consequence of e.g. suchasfault is a of direct hazard to critical human health and life, a result local contamination of On the other hand, number of of approaches approaches dedicated dedicated health and life, e.g. asfault a result of localhazard contamination of On the other hand, a number of approaches dedicated for on-line measurements have been applied for for detectconsequence of such is a direct to human health and The life, next e.g. as a result of local contamination of for on-line measurements have been applied the water. very important aspect of the leakage detectthe water. The next very important aspect of the leakage On the other hand, a number of approaches dedicated for on-line measurements have been applied for detecting abnormality in WDN from pressure and flow sensor health and life, e.g. as a result of local contamination of the water. The next very important aspect of the leakage is the the economic economic loss. loss. There There are are research research studies studies showing showing ing abnormality in WDN from pressure and flow sensor is for on-line measurements have been applied for detecting abnormality in methods WDN from pressure and flow sensor time series. These very often make full use of the water. The next very important aspect of of thethe leakage is the economic loss. There are research studies showing that water losses may range from 3% to 7% total timeabnormality series. These methods very often make full use of that water lossesloss. mayThere range are from 3% to 7% of the total ing in methods WDN (ANNs). from andetflow sensor series. These verypressure often make full use of artificial neural networks Barradas al. (2009) is thewater economic research showing that losses may rangein from 3% to studies 7% of countries. the total time consumption of the network highly-developed artificial neural networks (ANNs). Barradas et al. (2009) consumption of themay network in highly-developed countries. series. These methods very often make use of artificial neural networks (ANNs). Barradas etfull al. (2009) introduced system based on artificial neural networks that water range 3% tothat 7% water of countries. the losses total time consumption of the network infrom highly-developed At the the samelosses time, these studies unveil introduced aa system based on artificial neural networks At same time, these studies unveil that water losses artificial neural networks (ANNs). Barradas et al. (2009) introduced a system based on artificial neural networks for detection and diagnosis multiple leaks in pipeline sysconsumption of the network in highly-developed countries. At the same time, these studies unveil that water losses may exceed exceed 50% 50% of of the the total total demand demand in in networks networks with with low low for detection and diagnosis multiple leaks in pipeline sysmay introduced a and system based on artificial neural networks for detection diagnosis multiple leaks in pipeline systems by recognizing the pattern of the flow by means of At the same time, these studies unveil that water losses may exceed 50% of the total demand in networks with low technical standards. An overview of this issue is described tems by recognizing the pattern of the flow by meanssysof technical standards. An overview of this issue is described detection and diagnosis multiple leaks in pipeline tems by recognizing the A pattern of the flow by means of only two measurements. nonlinear mathematical model may exceed 50% of the demand in networks with and low for technical standards. Antotal overview of this issue is described in detail by Puust et al. (2010) as well as Eliades only two measurements. A nonlinear mathematical model in detail standards. by Puust et al. (2010) asthis well as Eliades and tems bypipeline recognizing pattern of training, the flow by means of two measurements. A nonlinear mathematical model of the the was the exploited for testing and technical Anal. overview is described in detail by(2010). Puust et (2010) of as wellissue as Eliades and only Polycarpou of pipeline was exploited for training, testing and Polycarpou (2010). twopipeline measurements. A nonlinear mathematical model of the was exploited for training, testing and validating the ANN-based system. The authors showed in detail by(2010). Puust et al. (2010) as well as Eliades and only Polycarpou validating the ANN-based system. The authors showed of pipeline was exploited for in training, testing and And all all of of (2010). these things things confirm confirm that that there there is is aa need need validating the ANN-based system. The showed thethe effectiveness of the the approach theauthors detection and Polycarpou And these the effectiveness of approach in the detection and validating the ANN-based system. in The authors showed And all of these things confirm that thereinisterms a need for continuous monitoring of such systems of the effectiveness of the approach the detection and diagnosis of simultaneous multiple faults. Mounce et al. for continuous monitoring of systems in of diagnosis of simultaneous multiple in faults. Mounce etand al. And all of these things confirm that there a need for continuous monitoring ofof such such systems inisterms terms of the effectiveness ofanthe approach the detection the detection and location leaks and contamination diagnosis of simultaneous multiple faults. Mounce et al. (2010) developed on-line system pilot for a water the continuous detection and location ofof such leakssystems and contamination (2010) developed an on-line system pilot for aa water for monitoring insystems terms of diagnosis of simultaneous Mounce etlogic al. the detection and location of leaksdiagnostic and contamination of water. Leak detection in on-line is (2010) system pilotas for water companydeveloped with theanuse useon-line of multiple ANN asfaults. well fuzzy of water. Leak detection in on-line diagnostic systems is company with the of ANN as well as fuzzy logic the detection and location ofonleaks and contamination developed anuse on-line system pilot for a water of water. Leak detection in on-line diagnostic systems of is (2010) currently carried out based methods of analysis company with the of ANN as well as fuzzy logic system for detection of leaks/bursts at district metering currently carried out based on methods of analysis of system forwith detection of leaks/bursts at district metering of water. detection in supply on-line diagnostic systems is company thesame use of ANN as at well as fuzzy currently carried out inbased on methods of analysis of water flowLeak variability the of a network network at night. night. system for detection of method leaks/bursts metering area (DMA). (DMA). The (based ondistrict ANN) was logic then water flow variability in the supply of a at area The same method (based on ANN) was then currently carried out based on methods of analysis of system for detection of leaks/bursts at district metering water flow variability in the supply of a network at night. Despite the high level of efficiency, such an approach is area (DMA). The same method (based on ANN) was then implemented by Mounce et al. (2015) in the cloud based Despite the high levelinofthe efficiency, such an approach is implemented by Mounce et al. (2015) in the cloud based water flow supply ofsuch aleakage network at night. (DMA). The same method (based on(2012) ANN) wasbased then Despite thevariability high level ofdelay efficiency, an approach is area limited due to a time in the detection. implemented by Mounce et Arsene al. (2015) in the cloud machine learning software. et al. al. proposed limited due to a time delay in the leakage detection. machine learning software. Arsene et (2012) proposed Despite themethods high ofdelay efficiency, an approach is implemented by Mounce et Arsene al. (2015) in (2012) the network cloud based limited due to a level time in thesuch leakage detection. There are that can provide a solution to the machine learning software. et al. proposed a three layer general fuzzy min-max neural There are methods that can provide a solution to the a three layer general fuzzy min-max neural network and and limited due to adetection time in the location leakage detection. learning software. Arsene et neural al. proposed There are methods thatdelay can provide a solution to leak the machine problem of rapid and exact of the agraph threetheory layer general fuzzy min-max network and for leak leak detection using the(2012) pressure/nodal problem of rapid detection and exact location of the leak graph theory for detection using the pressure/nodal There are provide a solution to leak the agraph threemeasurements. layer general fuzzy min-max network and problem of methods rapid and exact location the at an an early early stagedetection of that theircan occurrence (e.g. in ofsituations situations theory for leakThis detection using the pressure/nodal heads method wasneural proposed as aa part part at stage of their occurrence (e.g. in heads measurements. This method was proposed as problem of rapid detection and exact location ofsituations the leak graph theory for leak detection using the pressure/nodal at an early stage of their occurrence (e.g. in where leaks do not manifest themselves on the surface heads measurements. This method was proposed as a part where leaks do notof manifest themselves oninthe surface at an early their occurrence (e.g.on situations where leaks stage do not manifest themselves the surface heads measurements. This method was proposed as a part where leaks do IFAC not (International manifest themselves the surface 2405-8963 © 2018, Federation ofonAutomatic Control) Hosting by Elsevier Ltd. All rights reserved.

Copyright © 2018 IFAC 914 Copyright 2018 IFAC 914 Control. Peer review© under responsibility of International Federation of Automatic Copyright © 2018 IFAC 914 10.1016/j.ifacol.2018.09.684 Copyright © 2018 IFAC 914

IFAC SAFEPROCESS 2018 Warsaw, Poland, August 29-31, 2018

Piotr Przystalka / IFAC PapersOnLine 51-24 (2018) 914–921

of an efficient and effective decision support system for operational monitoring and control of water distribution systems. The advanced methods deal with issues of leakage detection and location, also with the use of neural networks, were developed and described in several papers in which the author has their own contribution (see e.g. Moczulski et al. (2016), Karwot et al. (2016)). Bearing in mind the current state of the art in the subject limited to exemplary applications of artificial neural networks for model-based leak detection purposes the research gap can be seen as follows. First, the architectures of neural networks are limited to static structures, therefore there is a need to use advanced dynamic topologies (locally or globally recurrent ones). Second, the uncertainty of such models has to be considered in order to obtain the high performance of the leak detection system. And third, optimisation methods should be more often applied to reduce the usage of the expert’s knowledge in searching for optimal values of the behavioural parameters of the elementary blocks of neural model-based leak detection schemes. In this paper, the new leak detection method is proposed taking into account these three issues simultaneously. 2. PERFORMANCE OPTIMIZATION OF ROBUST LEAK DETECTION SCHEME The proposed approach can be comprehended as the generalization and extension of the model error modelling methodology proposed by Patan (2008). The diagram in Fig. 1 clarifies the introduced novelties in this field. The first major change depends on that fault detection is realized as a multipath process. In this scheme, it can be seen that faults are detected using robust diagnostic subtests in which inputs correspond to subsets of process variables (zi ) whereas outputs represent diagnostic signals (si ). The diagnostic subtests may be elaborated applying either model-based or model-free techniques. The second revision is that, process variables are not filtered in order to prevent information loss and, in consequence, to maximize the sensitivity of a subtest to abrupt, incipient or intermittent faults.

Figure 1. A data flow diagram of multipath fault detection with performance optimization On the other hand, filtration and aggregation operators are used to specify the significance of the i-th diagnostic signal (si ) in respect to the others and to avoid false 915

915

alarms, as well as to merge all diagnostic signals into a correct diagnosis. The most important modification is that each of these components is tuned by means of a soft computing optimization algorithm. Moreover, each fault detection path is optimized independently. In this way, the maximal performance of the whole fault detection scheme can be easily obtained by searching for the proper values of behavioural parameters of elementary blocks. In this paper, it is decided to apply the model-based approach with the use of model error modelling methodology in order to create robust fault detection blocks. That is justified, as the proposed scheme can be automatically created and adjusted during optimization without any domain expert intervention. The scheme presented in Fig. 2 illustrates the main idea of the model-based approach with adaptive threshold evaluation of the residuals. In this approach the model of the process is created using training and test data collected for fault-free operations of the system. The output of this model (yi,m ) is used to calculate a residual signal (ri ). The test dataset is also applied to prepare additional training and test data subsets which are needed to create a model of the residual (model error). The estimation of the residual signal (yi,e ) is then used to compute adaptive thresholds (pi ). In this way it is possible to obtain a robust decision block of the fault detection scheme.

Figure 2. Robust model-based fault detection scheme with performance optimization The performance of the fault detection scheme strongly depends on the accuracy of elementary models (model of the process, model of the residual signal, relation between the estimation of the residual signal and adaptive thresholds). Therefore, the soft computing algorithm can be used herein for finding the optimal values of behavioural parameters of these blocks. In this study, the model of the system is created by means of a neural network autoregressive model with an exogenous input (NNARX), whilst the model error is identified using a linear autoregressive model with an exogenous input (ARX). It was decided taking into account the previous results obtained by the author. In the next part of this section, the more detailed description of the proposed methodology is given in the context of neural model-based leak detection. 2.1 Robust leak detection scheme The scheme in Fig. 3 represents the concept of the robust leak detection method. It is realized using the modelbased approach and adaptive threshold evaluation of the residuals. Each of the neural model corresponds to the

IFAC SAFEPROCESS 2018 916 Warsaw, Poland, August 29-31, 2018

Piotr Przystalka / IFAC PapersOnLine 51-24 (2018) 914–921

faultless state and it is applied in order to generate the residual signal according to the formula: ∗ ri (k) = qsup (k) − qsup (k) i

(1)

where i = 1, 2, . . . , n − 1, qsup is the measured signal of ∗ the water flow at the supply pipe of the zone, qsup (k) is i the signal that is calculated using the i-th NNARX model. The input of the i-th neural network represents the water flow qrefi (k) that is observed at the supply pipe of the i-th reference zone.

where ai,1 , ai,2 , . . . , bi,0 , bi,1 , . . . , bi,nbi are coefficients of polynomials of the i-th ARX model. As it can be seen in Fig. 3, the n-th residual is computed using the water demand model. This is a static model ∗ and the of the relation between the water flow qsup i time index T . It is created for a historical data set of the water demand at the input of the zone. Hence, the water demand model represents a one week profile of the water flow that is assessed as an average weekly water flow appointing within a long period of time. There is also a difference in computing the adaptive threshold. The leaks manifest itself by increasing the indication of the flow rate. In consequence, it is sufficient to compute only the upper threshold p+ n with the use of the nth model error. This model corresponds to the relation between the estimated residual value rn∗ and the time index T . The cubic interpolation is used in order to obtain this relationship. In the next step, binary diagnostic signals si (k) ∈ {0, 1} are originated as a result of twovalue evaluation of residuals and, therefore they can be computed according to the following rule: si (k) =

Figure 3. Scheme of robust leak detection using the NNARX model-based approach and adaptive threshold evaluation of the residuals The i-th residuum is sensitive either to the leak in the zone where fault detection is desired or to the leak in the reference zone. Nevertheless, K-out-of-N information redundancy is applied in order to distinguish where exactly the leakage is occurred. The robustness of the fault detection algorithm to uncertainties of different nature without losing sensitivity to faults is performed by evaluating adaptive thresholds which are given in the following form: p± i

(k) = r¯i ±

t± αi σri

    B z −1    i  q ± (k)   Ai (z −1 ) refi 

(2)

where r¯i and σri represent the mean and standard deviation values of the i-th residual (these statistics are calculated for the faultless condition), t± αi denotes the critical value corresponding to a given significance level αi . The second part of the Eq. (2) concerns the estimation of the residual behaviour. It becomes   realized  with  the help of the ARX model, where Ai z −1 and Bi z −1 are polynomials of order nai and nbi with respect to the backward shift operator z −1 :   Ai z −1 = 1 + ai,1 z −1 + ai,2 z −2 + . . . + ai,nai z −nai (3)   Bi z −1 = bi,0 + bi,1 z −1 + bi,2 z −2 + . . . + bi,nbi z −nbi(4)

916



− 0 for p+ i (k)  ri (k)  pi (k) 1 otherwise

(5)

The last stage of the proposed method is to merge all diagnostic signals in order to detect leakages in the desired zone. Taking into account K-out-of-N information redundancy it should be noted here that the leakage can be detected in the desired zone if and only if each of the diagnostic signals to be significantly greater than zero. For this reason, it is proposed that diagnostic signals will be aggregated with the use of the Heaviside-like function H (•), where the argument represents the geometric mean value of the weighted diagnostic signals. Such aggregation operator can be expressed as    n  n s (k) = H β −  Di (z −1 ) si (k) 

(6)

i=1

where β = max (β1 , β2 , . . . , βn ) is the bias for controlling the sensitivity of the diagnosis. On the other hand, a finite impulse response filter in the form of the ndi order polynomial   Di z −1 = di + di z −1 + di z −2 + . . . + di z −ndi

(7)

is used to specify the significance of the i-th diagnostic signal in respect to the others and also to avoid false alarms. 2.2 Neural network autoregressive model with exogenous input A non-linear autoregressive neural model with an independent input signal is one of the types of globally recurrent neural networks, and hence it is usually applied for approximation of spatio-temporal data. Such a network is illustrated in Figure 4. In this research, the neural network with single-input and single-output is used for modelling the relationship between two water flows. The output of

IFAC SAFEPROCESS 2018 Warsaw, Poland, August 29-31, 2018

Piotr Przystalka / IFAC PapersOnLine 51-24 (2018) 914–921

the network corresponds to the flow qsup (k) that is measured at the supply pipe of the zone where leak detection is desired. On the other hand, the input of the network represents the flow qref (k) that is observed at the supply pipe of the reference zone. The internal structure of the network is composed of three layers. The first and second hidden layer contains s1 and s2 neurons, respectively. In these layers neural units have the hyperbolic tangent sigmoid transfer function (f1−2 ). The third layer includes only one output neuron with the linear transfer function (f3 ). There are also included feedback connections enclosing the output and the first hidden layer of the network.

917

where N is the number of samples in the training set, R denotes the total number of weights and biases (ωi ) in the network, λ1 and λ2 are used for specifying the importance of minimizing weights, biases and outputs relative to the errors. The main advantage of this type of the network is the possibility to create a series-parallel architecture, in which the true output is used instead of feeding back the estimated output. In this way, the Levenberg-Marquardt algorithm, in which the Jacobian matrix is computed through a static back-propagation technique, can be used for training. This algorithm uses the approximation of the Jacobian matrix J to the Hessian matrix H in the following Newton-like update: −1

ωn+1 = ωn −[H (ωn ) − ηn diag [H (ωn )]] Figure 4. Neural network autoregressive model with an exogenous input The defining equation for the NNARX model is as follows ∗ (k) = LW3 × f2 [LW2 × f1 [LW1 × p1 (k) + qsup LW4 × p4 (k) + b1 ] + b2 ] + b3

(8)

where LWi is the weight matrix of the i-th layer, bi is the bias vector of the i-th layer, f1 and f2 indicate non-linear transform operators of the hidden layers. The depended ∗ output signal qsup (k) is regressed on previous values of the independent reference signal ··· p1 (k) = [qref (k − τ1 ) qref (k − τ1 − ∆k1 ) (9) qref (k − τ1 − k1 ∆k1 ) ] and previous values of the output signal ∗ ∗ (k − τ2 ) qsup (k − τ2 − ∆k2 ) ··· p4 (k) = [ qsup ∗ qsup (k − τ2 − k2 ∆k2 ) ] (10)

where k1,2 , τ1,2 , ∆k1,2 are parameters describing the tapped delay lines (TDL) for the input and the output signal. The mean sum of squares of the network errors (MSE) is usually employed to learn such a model. In order to improve generalization, the MSE objective is modified by adding the penalty function which is consisted of MSE, the mean of the sum of squares of the network weights and biases, as well as the mean of the sum of squares of the network output. The last factor is used to prevent unstability of the output of the network. This can be expressed as N R 2 λ1  1  ∗ E= (k) + ω2 + qsup (k) − qsup N R i=1 i k=1

N 2 λ2   ∗ qsup (k) N

∇E (ωn ) (12)

where H (ωn ) = JT (ωn ) J (ωn ), ωn is the vector of weights and biases at the n-th training step, ∇E is the gradient of the objective function. The scalar ηn controls the behaviour of the algorithm in such a way that ηn is decreased after each successful step and it is increased only when a tentative step would increase the objective function. That means when ηn is small, this is just Newton’s method, whereas when ηn is large, the algorithm becomes the gradient descent method. 2.3 Evolutionary optimization of the leakage detection performance The effectiveness of the robust leak detection method discussed in the previous section strongly depends on the parameters such as the lower and upper critical values of + the decision block (t− αi and tαi ), the numbers of neurons in the first and second hidden layers (s1 and s2 ), etc. These parameters have the great influence on the leak detection procedure and due to this reason they must be correctly set. As to be expected, it can be achieved by means of the optimization algorithms. The aim of the optimization process is to adjust of these parameters in order to minimize a multiple objective function Ci (ζi ), in which all objectives (ci,k ) are not conflicted and the vector consists of decision variables corresponding to parameters of the i-th elementary part of the leak detection system. Moreover, the structure of the fault detection scheme enables to optimize its elementary parts independently. Taking these assumptions as a basis, the optimization task can be posed as follows: Minimize Ci (ζi ) = [ ci,1 (ζi ) ci,2 (ζi ) . . . ci,k (ζi ) ] (13) L U subject to ζi,j  ζi,j  ζi,j for j = 1, 2, . . . , dim (ζi ) and the vector of decision variables that is represented in the following way + ζ i = [ t− αi tαi si,1 si,2 τi,1 τi,2 ki,1 ki,2 ∆ki,1 ∆ki,2 nai nbi ndi βi ]

(11)

k=1

917

where ci,k (ζi ) is the k-th criterion that is being used to express the performance of the leak detection scheme. One of the most important problems that must be taken into

IFAC SAFEPROCESS 2018 918 Warsaw, Poland, August 29-31, 2018

Piotr Przystalka / IFAC PapersOnLine 51-24 (2018) 914–921

account when we deal with the multi-objective optimization is that decision criteria ought to be selected according to their relevance with respect to optimized parameters. Thus, it is justified to make use of a set of performance indices proposed by Bartyś et al. (2006) that has been defined for evaluating and ranking the fault detection methods. For leak detection purposes it is sufficient to apply only three fundamental measures as objectives, that is: • False detection rate (rf d ): ci,1 (ζi ) = rf d =



n n tf d

(14) tf rom − ton where tnfd is the n-th period of the high level of the binary signal indicating the existence of a leak in the system between ton and tf rom . • True detection rate (rtd ): ci,2 (ζi ) = 1 − rtd = 1 −



n n ttd

(15) thor − tf rom where tntd is the n-th period of the high level of the binary signal indicating the existence of a leak in the system between tf rom and thor . • Detection delay time (tdt ): tdt tdd − tf rom = (16) δdt δdt where tdd is the first leading edge of the diagnostic signal at the period of time when a leak exists, δdt is a scaling factor. ci,3 (ζi ) =

Generally, in the case of multi-objective optimization problems it is reasonable to investigate a set of points, each of which satisfies the objectives. Because of this, the predominant Pareto optimality concept is adopted. The Pareto-optimal solution is often considered the same as a non-dominated solution. It exists if there is not any solution that improves at least one objective function without worsening others. On the other hand, it is also considered to transform multiple objectives into a single objective function to avoid the complexities involved in true multi-objective optimization problems. In this study, there is used the global criterion method in which all three objectives are combined to form a single metacriterion. It is conducted by means of a method with a priori articulation of preferences, such as the weighted sum method: C (ζi ) =

wCT (ζi ) 1wT

(17)

where w is a row vector with weights indicating the relative significance of the objective functions. Standard optimization methods, for instance, iterative techniques like gradient/Hessian-based methods cannot be adopted in this context, mainly for two reasons that, the set of feasible solutions is discrete and the formulation of the optimization problem involves random objective functions. Taking these considerations into account, it is well-grounded in fact to employ heuristic search methods in order to find the optimal solution. In this paper the basic evolutionary algorithm described by Rutkowski (2008) is 918

particularly applied to solve the task defined as Eq. (17). Genetic operators well-practised in the literature for the case of evolutionary optimization are used to guarantee convergence to a solution. 3. A CASE STUDY The method has been developed to be used for leakage detection in a WDN located in one of the southern cities of Poland. Three district metering areas were taken into consideration with the use of the proposed approach, but in this study only one case is discussed in detail (DMA No. 5). The number of residents of this district is nearly five thousands citizens, whereas the number of water consumers is equal to almost 1300. A considered district metering area is characterized in that the vast majority of water consumers are single family households. In order to verify the proposed method training and test data were obtained from a SCADA database of the water management system. The training dataset includes flow measurements corresponding to the period from 28.03.2010 to 20.05.2010. The test dataset represents flow measurements collected in two periods, that is from 22.08.2010 to 05.09.2010 (without leaks) and from 24.11.2011 to 23.12.2011 (with leaks). The sample rate was equal to 10 minutes. In this study, it was decided that four flowmeters could be used to create the leak detection scheme related to Fig. 3. The meaning of the symbols is as follows: • qsup - the water flow corresponding to the KP05; • qref1 - the water flow corresponding to the KP06; • qref2 - the water flow corresponding to the KP08; • qref3 - the water flow corresponding to the KP13.

flowmeter flowmeter flowmeter flowmeter

The flowmeter KP05 is mounted on the supply pipe of the diagnosed district, whereas flowmeters KP06, KP08 and KP13 are installed on supply pipes of other (reference) districts. These process variables were used to create three NNARX models ∗ = f1 (qref1 ), • NNARX model 1: qsup 1 ∗ • NNARX model 2: qsup = f2 (qref2 ), 2 ∗ • NNARX model 3: qsup = f3 (qref3 ), 3

and three ARX models

• Model error 1: r1∗ = • Model error 2: r2∗ = • Model error 3: r3∗ =

B1 (z −1 ) A1 (z −1 ) qref1 , B2 (z −1 ) A2 (z −1 ) qref2 , B3 (z −1 ) A3 (z −1 ) qref3 .

The Levenberg-Marquardt algorithm was used to train neural models. The error function was declared as (11) for which λ1 = λ2 = 0.05, the initial value ηn was set to 0.001, the decrease factor was set to 0.1 and the increase factor was set to 10. The maximum number of epochs was equal to 50. The ARX models were identified using the least∗ squares method. The water demand model qsup = f4 (T ) 4 represents a one week profile of the water flow that is assessed as an average weekly water flow appointing within a long period of time. The upper threshold p+ 4 is computed

IFAC SAFEPROCESS 2018 Warsaw, Poland, August 29-31, 2018

Piotr Przystalka / IFAC PapersOnLine 51-24 (2018) 914–921

919

using the model error 4 corresponding to the relation between the estimated residual value r4∗ and the time index T . The cubic interpolation was used in order to obtain this relationship. In order to increase the performance of the leak detection scheme that is based on such models the evolutionary optimisation experiment was elaborated. The evolutionary algorithm implemented in Global Optimization Toolbox R of MATLAB software was applied in this paper. In order to apply such an optimization technique for finding a solution of the problem it is necessary to define the following properties of the algorithm: the representation of the individuals, the fitness function, selection and succession methods, crossover and mutation operators. It is assumed, that the number of individuals in the population is fixed at each epoch of the evolutionary process and that individuals are composed of genes representing real numeric or integer values of adjustable scheme parameters. The length of the chromosome is dependent on the number of these parameters and equals the length of the vector ζi . For each optimization experiment, the boundary values of parameters were chosen taking into account data presented in Table 1. The fitness value of an individual is computed using the objective function (17), where w = [0.4 0.4 0.2] and δdt = 144. The best fitness value for a population is the smallest fitness value for every individual in the population. The feasible population method was adapted to create a random well-dispersed initial population satisfying all constraints and bounds. Fitness scaling was done using the rank method, whereas the selection of the parents to the next generation was obtained by means of the stochastic uniform method. The elite count δs = 2 and crossover fraction pc = 0.4 were chosen. The heuristic crossover function was employed with the user-defined parameter λh = 1.2. The remaining individuals were mutated with the use of the adaptive feasible method. The population size was equal to 15, whilst the total number of generations was set to 15. The exemplary convergence plot of the evolutionary tuning process is presented in Fig. 5. This plot shows the performance optimization result for the part of a leak detection scheme that is based on NNARX model 2 (f2 ). Very similar results were obtained for other NNARX models.

Table 1. Boundary values of decision variables ζi t− αi t+ αi si,1 si,2 τi,1 τi,2 ki,1 ∆ki,1 ki,2 ∆ki,2 ∆ki,1 ∆ki,2 nai nbi ndi βi

L ζi,j 0.01 0.01 4 4 0 72 36 152 1 6 0 1 2 0.01

Figure 5. Exemplary results of performance optimization of NNARX-based leak detection Table 2. Optimal values of the decision variables for NNARX models ζi∗ t− αi t+ αi si,1 si,2 τi,1 τi,2 ki,1 ∆ki,1 ki,2 ∆ki,2 ∆ki,1 ∆ki,2 nai nbi ndi βi

Model f2 0.55 2.54 8 6 2 113 145 154 11 69 0 8 39 0.26

Model f3 1.01 2.20 5 7 2 127 103 168 12 53 1 11 70 0.43

The results of evolutionary computations for this stage of the study are included in Table 2 and Table 3. The first table presents the optimal values of the decision variables for each part of the leak detection scheme where the NNARX model was employed. Such values of decision variables guarantee the high performance of the NNARX models. It is easy to observe that the mean absolute percentage error (MAPE) is acceptable for each case. Moreover, final values of the normalized root mean square error (NRMSE) confirm the effectiveness of the optimization process. And, finally and most importantly, obtained values of true and false detection rate as well as detection delay time prove that such models can be used in practical applications. Table

H ζi,j 10 10 8 8 6 144 152 188 16 144 2 14 144 0.9

Model f1 0.93 1.85 5 5 1 93 60 176 10 40 0 10 53 0.47

3. The performance measures NNARX-based leak detection

Model ID Model f1 Model f2 Model f3

MAPE 4.39 6.36 4.14

NRMSE 2.35 2.36 2.35

rf d 0.01 0.05 0.04

rtd 0.83 0.92 0.97

of tdd 28 17 24

As it is shown above the performance optimization of all parts of the leak detection scheme can be carried out independently. But in fact the result of the optimization process has a strong influence on the cumulative diagnosis of the whole leak detection scheme. In Fig. 6 three graphs are presented to analyse the performance of the NNARX model f1 . The first plot illustrates the residual signal r1 + and adaptive thresholds p− 1 and p1 . The second plot shows 919

IFAC SAFEPROCESS 2018 Warsaw, Poland, August 29-31, 2018 920

Piotr Przystalka / IFAC PapersOnLine 51-24 (2018) 914–921

Figure 6. Exemplary computation results of NNARX model 1 obtained for faultless condition

Figure 7. Exemplary computation results of NNARX model 2 obtained for faultless condition the diagnostic signal s1 that is obtained by evaluation of the residuum r1 . It should be noted that such signal is useless for real applications because there is a lot of false alarms. On the other hand, the filtered version of the diagnostic signal D1 z −1 s1 (k) is more useful in this case and can be interpreted as a belief factor as well. However, such signal is still subject to false alarms. The similar analysis can be done for the second model (Fig. 7). There are also false alarms in this case. 920

Figure 8. Exemplary computation results of NNARX model 1 obtained for faulty condition

Figure 9. Exemplary computation results of NNARX model 2 obtained for faulty condition In the next step, the artificial leakage was introduced (the artificial leakage is simulated by adding the constant values to the real flow measurements). It was assumed that the leakage started at the sample No. 2300 with a rate 5 m3 /h. The outcomes of the analysis is shown in Fig. 8 and 9. It should be noted  that  filtered diagnostic signals D1 z −1 s1 (k) and D2 z −1 s2 (k) are very sensitive to leakages, but in both cases there are still some false alarms.

IFAC SAFEPROCESS 2018 Warsaw, Poland, August 29-31, 2018

Piotr Przystalka / IFAC PapersOnLine 51-24 (2018) 914–921

921

ACKNOWLEDGEMENTS This publication is financed from the statutory funds of the Faculty of Mechanical Engineering of the Silesian University of Technology in 2018. REFERENCES

Figure 10. Diagnostic signals generated by the whole leak detection scheme for faultless and faulty conditions This is not a problem because the final diagnostic signal s (k) is calculated by aggregating the partial diagnoses. The final diagnostic signal of the whole leak detection scheme is presented in Fig. 10. The top plot shows the diagnostic signal generated by the whole leak detection scheme for leak-less operating conditions, whereas the second one illustrates the scenario with a leakage occurring from 2300 sample. This methodology was also confirmed for real leakages that occurred in the real WDNs. These results can be found in the paper entitled SysDetLok a Leakage Detection and Localization System for Water Distribution Networks that has been prepared within the framework on SAFEPROCESS 2018. 4. CONCLUSION In this paper, the issue of robust leak detection in water distribution systems is investigated. The major objective of this study is to develop the new method for performance optimization of the model-based multipath leak detection scheme. The main part of the robust fault detection scheme is based on model error modelling methodology. In the proposed approach the model of the system is created by means of a neural network autoregressive model with an exogenous input, whilst the model error is identified using a linear autoregressive model with an exogenous input. The maximal performance of the scheme is reached using an evolutionary algorithm. Evolutionary computations are needed to find optimal values of the relevant parameters of the elementary blocks of the leak detection scheme. The merits and limitations of the method are discussed and highlighted taking into account experimental results obtained for leak detection in a real water distribution system. The experimental tests were conducted using real flow measurements and the leak detection results confirm that the proposed evolutionary optimization method can be extensively applied in the design of multipath leak detection schemes. One of the limitations of the method is that the proposed criteria do not take into account the complexity of the structures of component models and the computational complexity of training methods related to them. 921

Arsene, C.T., Gabrys, B., and Al-Dabass, D. (2012). Decision support system for water distribution systems based on neural networks and graphs theory for leakage detection. Expert Systems with Applications, 39(18), 13214 – 13224. Barradas, I., Garza, L.E., Morales-Menendez, R., and Vargas-Mart´inez, A. (2009). Leaks Detection in a Pipeline Using Artificial Neural Networks, 637–644. Springer Berlin Heidelberg, Berlin, Heidelberg. Bartyś, M., Patton, R., Syfert, M., de las Heras, S., and Quevedo, J. (2006). Introduction to the damadics actuator fdi benchmark study. Control Engineering Practice, 14(6), 577 – 596. A Benchmark Study of Fault Diagnosis for an Industrial Actuator. Eliades, D. and Polycarpou, M. (2010). A fault diagnosis and security framework for water system. IEEE Transactions on Control Systems Technology, 18(6), 1254– 1265. Geiger, G., Werner, T., and Matko, D. (2003). Leak detection and locating – a survey. In 35th Annual PSIG Meeting. Karwot, J., Kaźmierczak, J., Wyczółkowski, R., Paszkowski, W., and Przystałka, P. (2016). Smart water in smart city: A case study. In Conference: SGEM 16th International Scientific Conference on EARTH and GEOSCIENCES, At Albena, Bulgaria, volume 3, 1–9. doi:10.5593/sgem2016B31. Moczulski, W., Wyczółkowski, R., Ciupke, K., Przystałka, P., Tomasik, P., and Wachla, D. (2016). A methodology of leakage detection and location in water distribution networks - the case study. In 2016 3rd Conference on Control and Fault-Tolerant Systems (SysTol), 331–336. doi:10.1109/SYSTOL.2016.7739772. Mounce, S.R., Boxall, J.B., and Machell, J. (2010). Development and verification of an online artificial intelligence system for detection of bursts and other abnormal flows. Journal of Water Resources Planning and Management, 136(3), 309–318. Mounce, S., Pedraza, C., Jackson, T., Linford, P., and Boxall, J. (2015). Cloud based machine learning approaches for leakage assessment and management in smart water networks. Procedia Engineering, 119(Supplement C), 43 – 52. Computing and Control for the Water Industry (CCWI2015) Sharing the best practice in water management. Patan, K. (2008). Artificial Neural Networks for the Modelling and Fault Diagnosis of Technical Processes, volume 377 of Lecture Notes in Control and Information Sciences. Springer Berlin/Heidelberg. Puust, R., Kapelan, Z., Savic, D., and Koppel, T. (2010). A review of methods for leakage management in pipe networks. Urban Water Journal, 7(1), 25–45. Rutkowski, L. (2008). Computational Intelligence: Methods and Techniques. Springer Publishing Company, Incorporated, 1st edition.