Artificial Neural Networks Ensemble Used For Pipeline Leak Detection .

Transcription

Proceedings of the 7th International Pipeline ConferenceIPC 2008September 29 – October 3, 2008, Calgary, Alberta, CanadaIPC2008-64664ARTIFICIAL NEURAL NETWORKS ENSEMBLE USED FOR PIPELINE LEAKDETECTION SYSTEMSAna Cristina BicharraGarcia1,2Inhaúma Neves Ferraz1,2Flávia Cristina Bernardini2(1) Universidade Federal FluminenseDepartamento de Ciência da ComputaçãoRua Passo da Pátria 156, Bl E, Sl 326, 24210-240Niteroi, RJ, Brazil(2) ADDLabs – Laboratório de Documentação Ativa e Design InteligenteUniversidade Federal FluminenseRua Passo da Pátria 156, Bl E, Sl 326, 24210-240Niterói, RJ, BrazilABSTRACTPipeline physical and operational characteristics varywidely. So, there is not any external or internal methoduniversally applicable that possesses all the features andfunctionality required for perfect leak detection performance.The authors of this work know very well that traditionalmethods, in a low uncertainty environment overcome leakdetection systems artificial intelligence methods. Consideringthe real world as an uncertainty generator, neural networks andfuzzy systems are important emerging technologies fordevelopment of leak detection systems. In this work, wepropose a method for constructing ensembles of ANNs forpipeline leak detection. The results obtained in ourexperiments were satisfactory.INTRODUCTIONThe detection methods of product leaks along a pipelinecan be classified in direct and indirect (or inferential) methods.Direct methods are usually external detecting leak productoutside the pipeline. External methods encompass physicalinspections, acoustic emissions, fiber optic sensing, liquidsensing and vapor sensing. Indirect methods, calledcomputational pipeline monitoring (CPM), use parameters forinferring product leaks. These parameters, such as pressure,flow, temperature, etc., are obtained form instruments internalto the pipeline. Internal leak detection systems (LDS) includeVolume Balance, Pressure Analysis (Rarefaction WaveMonitoring) and Real Time Transient Modeling methods.The LDS selection for a pipeline is dependent of pipelineand product characteristics. However, pipeline physical andoperational characteristics vary widely. So, there is not anyexternal or internal method universally applicable thatpossesses all the features and functionality required for perfectleak detection performance. The authors of this work knowvery well that traditional methods, in a low uncertaintyenvironment overcome LDS Artificial Intelligence (AI)methods. Considering the real world as an uncertaintygenerator we are proposing an alternative method for LDSusing AI techniques. Artificial Neural Networks (ANNs) andfuzzy systems are important emerging technologies fordevelopment of leak detection systems (Belsito, 1998;Carvalho, 2006; Silva, 2005). The performance of thesetechniques of computational intelligence is surprising inrelation to the reduced time of detection of the leaks, to smalldimension of localized leaks, and to reduced rate of emittedfalse alarms. Since, traditional methods present uncertaintyoperational difficulties, the development of research on theapplication of computational intelligence techniques in theelaboration of leak detection systems gains great importance.In this work, we propose a method for constructingensembles of ANNs for pipeline leak detection, combiningdifferent specialists (ANN) of the domain, each one lookinginto the problem from a different point of view. Due to lack ofreal world data, some experiments were executed usingsimulated data. Some insights in real data about normal1Copyright 20xx by ASME

operation in pipeline are also described in experiments section.The results obtained were satisfactory.This paper is organized as follows: Section 2 describesexternal methods in use for pipeline leak detection; Section 3describes Artificial Neural Networks; Section 4 describesmethods for constructing ensembles of classifiers; Section 5describes our proposal for constructing ensembles of ANNs forpipeline leak detection; Section 6 briefly describes thecomputational system in development that implements ourproposal; Section 7 describes our experimental results; andfinally Section 8 concludes this work.EXTERNAL METHODS FOR PIPELINE LEAKDETECTIONWhile pipelines are an efficient and economic means oftransporting hazardous fluids over long distances, the risksassociated with accidental releases are high. Leaks in pipelinescarrying fluids such as oil, ammonia, gasoline, or chlorinatedsolvents can cause serious pollution, injuries and fatalities, ifthey are not promptly detected and repaired. For example, aleak in an NGL pipeline was responsible for the death of about700 persons in Russia in 1988. For the period 1970-1984 inthe U. S. alone there were 46 serious accidents associated withnatural gas pipelines leading to 86 casualities. Large leakscause significant changes in pressure gradients and differencesin mass flow rates at measurement points, and therefore areeasy to detect. On the other hand, small leaks are moredifficult to detect because changes in the usual processmeasurements are small. However, leaks as small as 1% of thenominal flow rate can cause the discharge of a large amount ofdangerous fluid before they are detected, usually by the impactthey have on the surrounding environment. The early detectionof such small leaks is then the main goal of a leak-detectionsystem. In what follows, some indirect methods for detectingleaks in pipelines are described (Belsito, 1998).Many methods for creating leak-detection systems inliquid and gas pipelines have been proposed, mainly based onprocess variables (pressure, flow rate, and temperature) usuallymeasured in pipelines. Perhaps the most common is the linevolume balance method (Ellul, 1989), based on massconservation of the fluid in the pipeline. Data for line volumebalance come from flowmeters. Usually a short-term and along-term balance are calculated: the short-term balanceprovides fast response for large leaks, while it is claimed thatthe long-term balance will detect a 0.5% leak (of the nominalflow rate) in 3-6 hours. The volume balance can only identify aleak as being located somewhere in the line in which the fluidflow is measured. Since flowmeters are usually installed atinput and exit points and seldom anywhere in between, thistechnique usually does not give any information on leaklocation along the length of a pipeline.Acoustic methods have been proposed as well. Inprinciple, they can detect very small leaks in a short time, butthey do not always work well for large networks, where theremay be background noise from compressors and valves (Ellul,1989). Furthermore, spacing between detection stations mustbe of the order of 100 m, otherwise the reliability is low.Finally, pressure waves generated by the leak provideanother potential method of leak detection by measuring thepressure disturbances that travel along the line (Silk andCarter, 1995). Signal conditioning is required in order tomonitor the temperature and pressure variation in the pipeline(correcting the velocity of the sound for any variation) and toaccount for process operations, eliminating the pressuredisturbances deriving from normal processes.ARTIFICIAL NEURAL NETWORKSA training dataset T is a set of N classified instances {(x 1,y1), ., (xN, yN)} for some unknown function y f(x). The xivalues are typically vectors of the form (xi1, xi2, ., xim) whosecomponents are discrete or real values, called features orattributes. Thus, xij denotes the value of the j-th feature Xj ofxi . In what follows, the i subscript will be left out whenimplied by the context. For classification purposes, the y valuesare drawn from a discrete set of k classes, i.e. y {C1,C2,.,Ck}. Given a set S T of training examples, a learningalgorithm induces a classifier h, which is a hypothesis aboutthe true unknown function f. Given new x values, h predictsthe corresponding y values.Many Artificial Neural Network architectures areavailable (Haykin, 1994). The architecture to be used isselected based on the kind of problem to be solved. Since inthis work we consider pipeline leak detection as a classificationproblem, Multi-Layer Perceptron (MLP) is indicated. MLP isformed by at least 3(three) layers: an input layer, an outputlayer, and one or more intermediate layers. Each element ofthe output layer on our neural network model produces theoutput m n yiO f wijO . f w Hjk .I k k 1 j 1Owhere yi represents the output of the i-th processingelement,wijO and wijH represent the connection weightsbetween processing elements i and j in output and hiddenlayers, I K represents the input of the kth processing elementand f represents the transfer function for processing elements.If we denote the overall action of the neural network by theny(t ) x t where x(t) is a sample of the data to classify.2Copyright 20xx by ASME

x1(t). . .NEURALNETWORKy(t)xp(t)Figure 1 - Artificial Neural Systems ArchitectureThe learning algorithm used for training the networks inthis work is backpropagation, which updates the weights usingthe error rate calculated on the network output with the desiredoutput (label).Artificial neural networks (ANNs) have attributes that canactually make them good for processing routine measurementsmade in pipelines, and can be used in quite innovative leakdetection systems. An ANN can be regarded as a nonlinearmathematical function that transforms a set of input variablesinto a set of output variables (Bishop, 1994), thetransformation function depending on weights that aredetermined on the basis of a set of training examples. Trainingcan be computationally very expensive and depends on thesizes of the networks and thc number of training examples.Once weights have been calculated, processing of new data isfast. In addition to offering very high processing speeds, ANNsare, in principle, capable of learning a general solution to aproblem from a limited number of examples. Be that as it may,the use of ANNs does not appear to have received muchattention for leak detection, as yet. However, there are manysuccessful applications in tasks of similar complexity. Ageneral review is presented in Bishop (1994). There are somespecific reasons why using ANNs for leak detection is quitepromising (Bishop, 1994), namely, ( 1 ) it is difficult to find anadequate first-principle or model-based solution; (2) new datamust be processed at high speed, and (3) the system must beimpervious to noise. Another important aspect for thedevelopment of ANNs, as outlined by Bishop (1994), is that alarge set of data must be available. In general, suchinformation is either available or can he developed forpipelines.METHODS FOR CONSTRUCTING ENSEMBLES OFCLASSIFIERSEnsemble methods are learning algorithms that constructa set of classifiers and then classify new data points by taking avote of their predictions. There are three fundamental reasonsfor constructing ensembles of classifiers (Dietterich, 2001).The first reason is statistical. A learning algorithm can beviewed as searching a space H of hypotheses to identify thebest hypothesis in the space. The statistical problem ariseswhen the amount of training data available is too smallcompared to to the size of the hypothesis space. Withoutsufficient data, the learning algorithm can find many differenthypotheses in H that all give the same accuracy in trainingdata. By constructing an ensemble out of all of these accurateclassifiers, the algorithm can average their votes and reducethe risk of choosing the wrong classifier. Figure 2 (top left)depicts this situation. The outer curve denotes the entire searchspace H; the inner curve denotes the hypothesis that gives goodaccuracy in training data. The f point depicted in the figuredenotes the unknown true hypothesis, and we can see thataveraging the accurate hypothesis, we can find a goodapproximation of f.The second reason is computation. Many learningalgorithms work by performing some form of local search thatmay get stuck in local optima. For example, neural networkalgorithms employ gradient descent to minimize an errorfunction over the training data. In cases where there is enoughtraining data (so the statistical problem is absent), it may stillbe very difficult computationally for the learning algorithm tofind the best hypothesis. Indeed, optimal training of neuralnetworks is NP-hard. An ensemble constructed by running thelocal search from many different starting points may provide abetter approximation to the true unknown function, as shownin Figure 2 (top right).The third reason is representational. In most applicationsof machine learning, the true function f cannot be representedby any of the hypothesis in H. By forming weighted sums ofhypothesis drawn from H, it may be possible to extend thespace of representable functions. Figure 2 (bottom) depicts thissituation.Next section describes the proposed method for combiningclassifiers for pipeline LDS.Figure 2 - Three fundamental reasons for constructingensembles of classifiers (Dietterich, 2001)A PROPOSAL FOR COMBINING CLASSIFIERS TOPIPELINE LEAK DETECTIONTo model a problem, the first step of the process isselecting what features are related to it. In literature [REFS], it3Copyright 20xx by ASME

is found that the features that affect the models of pipelines forleak detections are flow rate, density, temperature andpressure. Looking for relations between measured values in thepipeline’s input and output to detect abnormal patterns is thepurpose of the internal methods for leak detection known bythe authors.An induced Artificial Neural Network (ANN) is a modelthat correlates non-linearly the features that describes theproblem. In our application, we use a neural network tocorrelate the features, separating the instances into normal andabnormal operations of the pipeline (classification problem).Because of this, we need instances that represent the normaland the abnormal situations. Each instance is a set of values offlow rate, temperature, density and pressure read in someinstance t in pipeline’s input and output. So, an ANN detectsnormal and leak situations if it is presented to it instances ofnormal and leak situations in training phases. However, in realapplications, it is hard to find data with leak situations, whichleads us to combine other artificial specialists in our LDS.Normal events in the pipeline, like start and stop pumping,adjustment of valve sets and batch changes, are responsible forfalse alarms in Leak Detection Systems (LDS). Thus, an ANNinduced for classifying these events can help the LDS indetection of leaks.Our LDS is composed by 4 (four) specialists, whichdecisions are combined to give an answer to the operator. Onespecialist is responsible for classifying the read values(instances) into normal or leak classes; other specialist isresponsible for classifying the same input instance into startand stop pumping, adjustment of valve sets, batch changes orcontinuous flow; other specialist is responsible to detect thepercentage of the leak when a leak is detected; and the last oneis responsible for detecting the location of the leak in thepipeline. Each specialist is an ANN, which are trainedseparately. The decisions of the first two specialists – the firstone that detects the presence or absence of leaks and thesecond one that classifies the event that is occurring – arecombined to say what is happening into the pipeline. Theanswers of the specialists are the events occurring and, when aleak is detected, the answer can be, for example, “there is aleak or the pumping is starting”. The operator will decide whatis happening – if the operator knows that there is not a startpumping, than a leak is detected and the other two specialistssays the location and the leak’s flow percentage.Our proposal allows us to train the ANN for leak detectionof a pipeline initially using simulated data and, as the operatorinteract with the system, saying that an event is occurring, andnot a leak, new instances are collected. With these newinstances, the network can be re-trained with the old one andthis new data. This process allows that the model can adaptover the time.Another observation is related to the available data: ifthere is not any instance about leak, only the specialist (ANN)in events can be initially trained. When the ANN detects anevent that it is not happening in fact, if the operator verifiesthat a leak is happening, in time the system is fed by leakinstances, what allows in future that an ANN for leak detectionis induced.Since Neural Networks find non-linear correlation ininput variables, and probably these variables are pipelinedependent, one ensemble for each pipeline is necessary.However, deeper studies using real and simulated data arenecessary to verify this affirmative.ADDDUT SYSTEMIn order to evaluate and put in practice our proposal, asystem, called ADDDut, is under construction. This tool hastwo main functionalities. The first one is to help the user to1. Visualize the operations behavior, based on the signalsobtained in time of pressure, density, flow rate,temperature, and others that should be considered –Figure 4 shows a print screen of the system that depictthe signals over the time. The depicted data are fromsimulated operations in Pipeline Studio ; and2. Use an ensemble constructed for the pipeline underobservation and ferify if there is some leak in theloaded data – Figure 5 shows the resulting analysis ofthe ensemble.The second one is to help to train the specialists (neuralnetworks) into its own specific task. The interface of this partof the system is in development phase.Figure 3 - Visualization of the signals in time. From top tobottom: flow rate (input and output), temperature (input andoutput), pressure (input and output) and density (input output).4Copyright 20xx by ASME

Figure 5 - Pipeline schema of the simulated dataset.Figure 4 - Output of the ADDDut system: time elapsed, type ofalarm, localization in pipeline and percentage of the flow rate.EXPERIMENTSDue to the difficult to obtain data from real leak situationsin oil pipelines, we first experimented our approach usingsimulated dataset. In this phase. Our dataset were simulatedusing Pipeline Studio . Figure 5 shows a schema of thepipeline on which the dataset was simulated. The pipeline has50Km of extension. Figure 6 shows the instances plot in timefrom left to right. Each graph is related to a feature (F inrepresents the flow read at input point of the pipeline; Foutrepresents the flow read at output; and so on). The timebetween two instant readings is 15 seconds. There are twoweeks of simulated operations, totalizing 80641 instances.Initially, two class features were created. The features are leak,containing the values “normal” (66629 instances, or 82.62% ofthe entire dataset) and “leak” (14012, or 17.38%); and event,containing the values “normal” (77895 instances, or 96.60% ofthe entire dataset), “SP” – Stop Pumping (1010 instances, or1.25%); “SPVS” – Stop Pumping and Valve Setting (1168, or1.45%); “SPBCVS” – Stop Pumping, Batch Changing andValve Setting (489, or 0.60%); and “VS” – Valve Setting (79,or 0.10%). We induced two ANN, each of them having one ofthe class labels. The overall error rate obtained in eachnetwork are 1.81% using “leak” feature as the class feature(6.03% of error rate in “leak” class and 0.82% in “normal”class) and 0.99% of error rate using “event” feature (0.01% in“normal”, 11.58% in “SP”, 55.91% in “SPVS”; 1.02% in“SPBCVS”; and 17.72% in “VS”). Figures 6 and 7 shows,respectively, the results obtained with the ANNs induced,which shows, for each instance, the labeled and predictedclasses.Figure 6 - Visualization of the simulated dataset.Figure 7 - Visualization of the labeled instances in time andthe neural network prediction. Red are instances labeled and/orpredicted as normal and green are instances labeled and/orpredicted as leak.Figure 8 - Visualization of the labeled instances in timeand the neural network prediction. Red are instances labeledand/or predicted as normal and other colors are instanceslabeled and/or predicted as other events (pump start, valveadjustment and/or batch changes).5Copyright 20xx by ASME

Figure 7 shows that all leak situations were detected; inthree occasions there was a leak but it was not detected andthere were only two false alarms.Real data was obtained only for normal situations. Thedataset obtained allowed us to observe that, in real situations,many events occur in parallel and in four days of operations –in this dataset, we observed eight batch changing, many stopand start pumping and many valve adjustments. Due toconfidentiality reasons, we cannot show in the signals of theoperations. On the other hand, overall error rate obtained inevent network is 2.99% (0.14% in “normal”, 66.15% in “VS”,45.91% in “SP”; 44.75% in “BC”; 58.36% in “STP” – StartPumping; and 14.29% in “BCSTP” – Batch Changing andStart Pumping). These results, besides not so good, wereexpected, since real data has more uncertainties associated toit. Also, we could observe that many from the events wereclassified as undetermined by the ANN, which means thatsome events should be joint, for example Stop and StartPumping, since both patterns are similar.Silva, H.V.; Morookab, C.K.; Guilherme, I.R.; Fonseca,T.C. and Mendes, J.R.P. “Leak Detection in petroleumpipelines using a fuzzy system”, Journal of Petroleum Scienceand Engineering, volume 49, pages 223-238 (2005).CONCLUSIONS AND FUTURE WORKIn this work, we proposed a method for constructingensembles of ANNs for pipeline leak detection. This methodwe proposed allows to group different specialists, each onelooking into the problem from different point of views. Resultsin our experiments were promising. Next steps of our workinclude experiment our proposal in real world data. This taskis difficult because it is not simple to obtain this kind of data.We also intend to substitute the event ANN by one specialist todetect each event.REFERENCESBelsito, S.; Lombardi, P.; and Benerjee, S. “LeakDetection in Liquified Gas Pipelines by Artificial NeuralNetworks”. AIChE Journal, volume 44, number 12, pages2675-2688. (1998).Carvalho, A.A.; Rebello, J.M.A.; Sagrilo, L.V.S.;Camerini, C.S. and Miranda, I.V.J. “MFL Signals and artificialneural networks applied to detection and classification of pipeweld defects”, NDT&E International, volume 39, pages 661–66 (2006).Dietterich, T. G. “Ensemble methods in machinelearning”. In First International Workshop on MultipleClassifier Systems. Lecture Notes in Computer Science,volume 1857, pages 1–15, New York. Springer Verlag (2000).Ellul, I. “Pipeline Leak Detection”. Chem. Eng., number461 (1989).Haykin, S. Neural Networks. Macmillan CollegePublishing Company, Inc, New York (1994).Silk, M.G., and Carter, P. “A Review of Means of PipelineLeak Detection Independent of Flow Measurement”. ECProject DEPIRE DGXII Meeting, Harwelll, UK (1995).6Copyright 20xx by ASME

7Copyright 20xx by ASME

ARTIFICIAL NEURAL NETWORKS ENSEMBLE USED FOR PIPELINE LEAK DETECTION SYSTEMS Ana Cristina Bicharra Garcia1,2 Inhaúma Neves Ferraz1,2 Flávia Cristina Bernardini2 (1) Universidade Federal Fluminense . fiber optic sensing, liquid sensing and vapor sensing. Indirect methods, called computational pipeline monitoring (CPM), use parameters for .