poSSible leakage detection level in tranSmiSSion pipelineS uSing improved Simplified methodS weryfikacja możliwego poziomu wykrywalności wycieków w zakreSie zaStoSowania zmodyfikowanych uproSzczonych

liquid transmission pipelines may suffer from damages, which might result in leakages. therefore, leak detection system (lds) is an indispensable equipment of a pipeline installation. the main purpose of such system is to detect, locate, as well as determine the magnitude of occurred leak. Most popular lds are developed with the use of diagnostic methods, which are based on measurements of internal flow parameters, i.e. flow rate, pressure and fluid temperature. in the literature such methods are called internal (analytical, indirect) methods [2, 11, 17]. the implementation of leak diagnosis process is a rather complex issue. the existing internal methods, whose review might be found in the papers [4, 10, 11, 17, 19], on their own are not able to fulfill all mentioned above diagnostic tasks. their utility is limited to certain, defined operational pipeline’s states and leaks’ characteristics. thus, elaboration of effective and reliable lds requires applying of at least several internal methods working concurrently [17]. taking into account that a lds should first detect a leak, internal methods, which are responsible for this diagnostic task, acquire particular significance. in practice, one or several methods must be used to increase the reliability of lds, which is defined as a degree of pipeline’s operators confidence, i.e. absence of false alarms and also system’s ability to detect any kind of occurred leak. the most advanced solutions, aimed at leakage detection, are based on process dynamics models. an example of this method is the inverse analysis method [9, 19] and also so called methods with automatic control approach [1, 2, 10, 11, 16, 18]. without doubt, the main advantage of both groups of methods is the ability to detect leaks in steady states as well as in transition states, resulting from a change in pipeline’s operational conditions such as: an operating point change, valve’s aperture and closure, pump’s start-up or stoppage. However, Paweł ostaPkowIcz andrzej bratek


Introduction
liquid transmission pipelines may suffer from damages, which might result in leakages.therefore, leak detection system (lds) is an indispensable equipment of a pipeline installation.the main purpose of such system is to detect, locate, as well as determine the magnitude of occurred leak.
Most popular lds are developed with the use of diagnostic methods, which are based on measurements of internal flow parameters, i.e. flow rate, pressure and fluid temperature.in the literature such methods are called internal (analytical, indirect) methods [2,11,17].
the implementation of leak diagnosis process is a rather complex issue.the existing internal methods, whose review might be found in the papers [4,10,11,17,19], on their own are not able to fulfill all mentioned above diagnostic tasks.their utility is limited to certain, defined operational pipeline's states and leaks' characteristics.thus, elaboration of effective and reliable lds requires applying of at least several internal methods working concurrently [17].
taking into account that a lds should first detect a leak, internal methods, which are responsible for this diagnostic task, acquire particular significance.in practice, one or several methods must be used to increase the reliability of lds, which is defined as a degree of pipeline's operators confidence, i.e. absence of false alarms and also system's ability to detect any kind of occurred leak.
the most advanced solutions, aimed at leakage detection, are based on process dynamics models.an example of this method is the inverse analysis method [9,19] and also so called methods with automatic control approach [1,2,10,11,16,18].without doubt, the main advantage of both groups of methods is the ability to detect leaks in steady states as well as in transition states, resulting from a change in pipeline's operational conditions such as: an operating point change, valve's aperture and closure, pump's start-up or stoppage.However, sciENcE aNd tEchNology these methods are quite complex and their practical application involves solving many problems, which relate to constructing pipeline's mathematical model and developing its solutions, precise applying of diagnostic process methodology and appropriate diagnostic means. in case of inverse analysis methods, their general idea consists in a comparison of model-generated data with measured data, i.e. minimizing the obtained deviations to enable leak detection and its localization, and depends on proper model fitting.Pipe's flow dynamic modelling mainly involves applying non-stationary equations of continuity and motion for fluids.in practice, it might be required to perform specific tests, which consist in enforcing transitional states in a shape of pressure impulses, generated by a valve's closure on the outer point of the pipeline [19].Such tests significantly simplify pipeline's dynamics description, include leak's modelling and facilitate solving systems of equations due to better understanding of boundary conditions.However, in order to perform these tests correctly, it is necessary to control appropriately the valve's closure process, which is raised in [9].closing a valve on an operating pipeline always may be risky.therefore, it might be required to introduce certain constraints to operating conditions in real-life i.e. decreasing the pressure values and volume of liquid.
in methods considered within context of automatic control, the mathematical model of liquid flow dynamics is mainly described in the state-space.a common solution is an implementation of state observers, which estimate process variables, for example, the flow rate at pipeline's inlet and outlet [1,2,10,11] or other parameters to describe the flow e.g. the friction coefficient [2,10,11].by applying a specific leak detection algorithm, it is possible to get the leak diagnosed and an alarm generated.
considering a performance, in both mentioned above groups of methods, it creates strong requirements that measurement systems must meet.this results in high costs of lds, related to the need of using the appropriate quantity of precise measurement instruments, well synchronized data transmission system and powerful computers.such lds should also be operated by high qualified staff.
consequently, instead of these methods, simpler solutions are being used, including: mass balance, pressure/flow monitoring, pressure wave detection and correlation analysis of measured signals. in general, each method considers a single hydraulic phenomenon related to the leak occurrence which is the base to elaborate appropriate algorithms to detect leakages.such simplified detection algorithms (slda), aimed at single leak detection in liquid transmission pipelines, consist the main area of focus of this paper.
the important advantages of slda are relatively low cost and ease of implementation.taking into account other features, such as: duration of tests, disruption to normal system operation, complexity of the instrumentation, which according to [3] all together consist the comparison criteria for different leak diagnostic methods, in case of slda they also give satisfying results.From practical point of view, it is also worth seeing the slda implementation as an element of lds. in a lds even a single slda could be used, for example, on the basis of the mass or volume balance principle.However, more often a few slda are used, which, thanks to a proper synchronization, should verify each other and/or complement each other.this should result in being able to detect leaks not only in the state of steady flow, but also in other operational conditions during low operational transients.slda may be a part of more complex leak detection procedures, which use the mathematical models of liquid flow dynamics.the last solutions can be found in papers [1,2,10,11].in the paper [1] the comparison of the two advanced algorithms can be found.an algorithm configured on the above schema as a slda combination, "due to its good performance and good reliability is more appropriated to be implemented in industrial controllers", than the second one, which is far more computationally sophisticated.besides mentioned above characteristics, independently from using complex or simplified leak detection techniques, their practical usefulness is decided mainly on their efficiency.this is defined as the ability to detect a given volume of leakage in determined timeframe and with minimal number of false alarms.according to [18], pipeline's operators are interested in lds solutions, which would enable leak detection of less than 1% nominal flow intensity.it would be better if such results were achieved both in steady state conditions and transient states.the operators are also interested in the evaluation of the smallest detectable leak, which might be achieved for a determined detection algorithm.
sdla effectiveness depends on many factors, e.g.algorithm's structure.by the algorithm's structure we consider the overall elaborated solution of a given diagnostic method.this includes configuration of measurement devices (their number, location), their metrological characteristics (precision), signal sampling, measurement conditions (noise and distortion level) and techniques implemented for data processing and analysing, as well as the selection of the alarm thresholds. in relation to a pipeline, the following factors are significant: topography (e.g.diameter and length), a type of liquid (density, velocity of a pressure wave), flow conditions (flow and pressure rate).Moreover, essential also are the leak parameters, i.e.: its location, size (intensity), the nature of occurrence (rapid leaks or slowly increasing leakages), but also the size of a pipe damage and its development.the analysis of these issues might be found in papers [3,7].
unfortunately the effectiveness of commonly used nowadays slda is often below the expectations.in this paper we are interested in applying slda to diagnose singular liquid transmission pipeline leak in steady states.an example of such slda, which uses the negative pressure wave detection method, can be reviewed in [7]. the algorithm processes data obtained from two pressure sensors located at the inlet and outlet of a pipeline.its performance assessment, which takes into account the smallest detectable leak, was based on carried out simulations, in which mathematical description for the amplitude change of negative pressure wave was used, being supplied by defined pipeline's parameters.the achieved smallest detectable leak, which amounted to about 1.4% of the nominal mass flow, overpasses however the reference value (i.e.1%).another Slda system, which uses the mass-balanced leak detection method with correlation analysis, is presented in [10].the algorithm runs on the basis of the mass flow rate measured only at the inlet and the outlet.it was experimentally verified on a gasoline pipeline.the presented results relate to only a single experiment, where the intensity of detected leak is 0.19% of the nominal mass flow rate.
it is worth highlighting that the slda are discussed or mentioned also in many other papers [5,12].nevertheless, not always these papers encompass and present all information about their particular solutions and their effectiveness relating to the smallest detectable leak, which might considerably impede their potential analysis, modifications and implementation.
considering the existent slda, we may notice that the effectiveness of similar solutions, in the sense of their overall methodology, might significantly vary.the authors consider applying an adequate solution structure of slda as a way to have slda effectiveness improved.
therefore, the main goal of this paper is to present an overall comparison of a few modified slda solutions, taking also into account, the evaluation of their effectiveness.the presented set of detection algorithms is characterized by the fact that they combine different process variables i.e. flow and pressure signals, commonly measured at transmission pipelines.besides the well-known solutions, the authors also propose a detection algorithm with a new variable structure and with two options of a resulting function.all presented slda solutions are focused on detection of a single leakage in a liquid transmission pipeline in steady state conditions.sciENcE aNd tEchNology it is worth mentioning that the authors focus especially on the leak detection issue.a great deal of attention is paid to the leak detection itself.this task is considered to be the most crucial activity from the lds standpoint as it is the first, mandatory step to be completed in order to perform the leak position and flow estimation.nevertheless, the leak localization was also considered in this paper, whereas estimation of a size of leakage was skipped in the presented results.
the proposed algorithms were tested in experiments carried out on a laboratory pipeline in a wide range of leak simulations.the basis of the evaluation was established by two primary performance indexes: the smallest leakage detection level and the detection response time.these parameters are directly related to the leak detection issue.while determining a leakage point, a location error was defined as a estimation's precision parameter.
the smallest detectable leak, which were achieved with elaborated algorithms, are lower than the defined reference value.according to the authors, solutions presented in this paper for modified sldaimproved leakage detection techniques (algorithms) -and their results may provide valuable information for pipeline's operators.
this paper is organized as follows: the second chapter presents a description of typical measurement equipment of the transmission pipelines.the third chapter describes hydraulic phenomena related to leak occurrence. in the next section, the basic problems encountered during leak detection are discussed.the detailed description of the proposed algorithms might be found in the fifth chapter.the sixth section presents the laboratory pipeline and experiments' program overview.the next two chapters present the achieved results in diagnostic of simulated leaks and discuss the aspects of implementation of proposed algorithms in practice.Finally, overview of conclusions and some suggestions for future research are presented.

Pipeline measuring equipment
the liquid transmission pipelines are usually equipped with flowmeters and pressure transducers, installed at the inlet and outlet.Moreover, additional pressure sensors are often installed at regular intervals along the pipeline.the purpose of these sensors is to reduce the detection response time and improve the accuracy of the leak location.
whereas measuring systems are the basis of scada (supervisory control and data acquisition) systems, which are used in pipelines to monitor and control pumping process, lds system is usually their additional module.the diagnostic data information, i.e. the measured pressure and flow rate signals, required by the leakage detection systems, should be continuously provided with defined sampling time P T , without significant time delays.Moreover, the measurement systems should be error and noise resistant.However, the above mentioned disturbance issues might appear in case of long range transmission pipelines.according to [20], it is quite common, when only some useful measurement data is available.

Description of the leak phenomenon
typical relationship between pressure (measured at the inlet and the outlet, and also at several points along the pipeline) and flow rate signals (measured at the inlet and the outlet) in the liquid transmission pipeline, before and after the occurrence of leak, is shown in Figure 1.
assuming that a tight pipeline operates under stationary conditions, the pressure and flow rate along the pipe have stabilized values with low levels of fluctuations.Event of leak leads to changes of pressure and flow in the pipeline.at the beginning, a pressure drop takes place in the leak point.afterwards, the pressure drop in the form of a negative wave propagates in both directions of the pipeline with the speed of sound.the profile of pressure wave propagation depends on the location of the leak, its size and the way it increases (which, in turn, depends on the development of damage to the pipeline).in case of sudden leaks (whose flow rate reaches the nominal value in short time after the moment of their occurrence), waves have clearly visible fronts (Fig. 1a).For slowly increasing leakages, where pressure changes have milder character, wave fronts have a smother shape (Fig. 1c).behind the wave front, the longer the distance is from the leak point, the smaller the pressure drop is in the pipeline.the observed pressure drops depend on the size of leakage, its position, and flow conditions.
Medium flow in the pipeline gets stabilized for a while after the occurrence of leakage with a new steady-state operating point.comparing to the state before leakage, the flow rate in the section between the inlet and the leak point has increased, and the flow rate in the section from the leak point to the outlet has decreased (Fig. 1).

Problems faced in leak detection
Profile and clarity of changes in measured pressure and flow rate signals (resulting from the course of leak phenomenon and metrological characteristics of measuring devices) essentially determine the leak detection level.
such an exemplary situation is shown in Figure 2. the plots present the pressure and flow rate histograms in an experimental pipeline (which description can be found in section 6) initially operating in steady state conditions.later the sudden leak of a 0.45% nominal flow rate was simulated at the point close to the middle of the pipe's length.we might observe that the pressure and flow rate variations are hardly noticeable, which is caused by a considerable level of noise in the signals.
we need to comment that pressure and flow rates in Figure 2 are not expressed in the si units, but in the units that clearly represent flow's characteristics in the pipeline (pipeline's operators commonly use the non si units -e.g.m 3 /h as well).these units are also used through the next sections of this paper.

Theoretical characteristics of compared solutions
the proposed modified slda solutions are based on using measurement signals mentioned about in the chapter 2. they involve the following methods: correlation analysis (labeled "method i"), pressure monitoring (labeled "method ii"), volume balance (labeled "method iii").the presented descriptions of proposed solutions might be a basis of their practical application.

Method I
the proposed technique is based on correlation analysis.in contrast to similar solutions discussed in papers [1,2,10,11], the authors propose to use the correlation analysis not only with regards to flow rate signals, but also to pressure signals [14,15].using pressure signals is aimed at reducing the time required to detect a leak.considering the pipeline's dynamics, pressure signals may sooner identify a leakage occurrence, than flow rate signals.this can be clearly noticed if we compare the signals measured at the pipe's inlet and outlet (see Fig. 1).taking into account additional pressure sensors mounted along a pipeline, there is a possibility to detect a leak even quicker.
the algorithm based on the use of pressure signals may work independently.However, we need to remember that the pressure changes in a pipeline not always are a consequence of the leak occurrence.similar symptoms of a leak, e.g.characteristic also for the wave propagation, might be observed for other flow conditions caused by valve regulation.it is difficult to differentiate them, what is mentioned by [12]. in order to avoid generating false alarms and increase credibility of a diagnosis, apart from using the algorithm, which is based on pressure signals, the second algorithm, based on flow rate signals, working concurrently may be applied.
taking into account the above assumptions, a few slda were elaborated.all of them use the following different configurations of the structure of each algorithm, besides their general likeness, is characterized by the application of significant different elements.their basis is the correlation analysis.such analysis in consecutive steps of calculations considers data vectors, which are constructed on the basis of the shifting time windows.the calculated variables (i.e.residua) are window's data instead of the raw measured diagnostic signals.the proposed solutions of algorithms consider two configurations of time windows: with different steps of their shifting defined by the determined volume of signal samples.while building both window configurations, not only the speed of leak detection was considered, but also the need of computing power.the detailed solutions of all algorithms are discussed in the following part of this subchapter.x , according to (1). the reference values are calculated by applying a low pass recursive filtering such as recursive averaging with fading memory (exponential smoothing), according to the formula (2).
where: k n x -the value of the measured signal in the moment k , k n x -the reference value in the moment k , where: x − -the reference value in the moment 1 k − resulting from the applied sampling time P T , k n x -the value of the measured signal in the moment k , α -filter correction factor 0 1 < < α .
the use of the variables n x ∆ instead of n x allows to avoid the necessary adjustment of relatively large changes of the alarm thresholds, resulting from the inherent fluid dynamics changes, which for example relate to changes of the pipeline operating point.it is quite easy to calculate them considering that the reference values are obtained using the described low pass filtering.according to the practice [10], such approach is efficient with regards to steady states (normal operation).Potentially it might be also applied to some inconsiderable transient states.the used filtering also, to some extent, enables eliminating noise effects and slow drift effects (drifting measurements), what is mentioned about in [10].For comparison, the algorithm presented in paper [1], which uses the residua defined on the basis of flow rate signals measured at the pipeline's inlet and outlet, requires far more complex calculations as reference values are estimated using a mathematical model of flow dynamics.adopting such approach for leak diagnosis in steady states is not required.it is also worth mentioning that the residua are also used in leakage diagnosis methods for pipeline's networks, especially for water distribution networks [8]. the way of their calculations is different, because these are the differences between the measured values and reference values but the other ones concern the approximated states without leakages. .number of samples N in the window includes period k k −τ , . the shift value τ is determined knowing the dynamics of leak phenomenon (the velocity of the pressure wave propagation in given section of the pipeline, which included analyzed measuring points, is taken into account) and distances between measuring points which are related to analyzed variables n x ∆ and . in case of flow rate signals, due to more slow character of their changes, the shift value τ should be greater then for pressure signals.
time windows with different moving mode may be used, what is presented in Figure 3. in case of both types of windows, current leak detection assessment, i.e. in moments k and 1 k + relates to the last sample in window: where: 1, 2,..., 2 next, for the obtained functions (4), if flow rate signals are analyzed then average value (5a) is calculated and if pressure signals are analyzed then maximum value (5b) is calculated: to eliminate disturbances the calculated value ˆk xs R is filtered, by applying a low pass recursive filtering, according to the formula (6): ) where: next, the condition (10) which defines the possibility of the occurrence of a leakage, is checked: below there is another algorithm presented, which considers slightly different way of processing the same flow rate variables.in general, it is aimed at improving the leak detection level by resolving some problems we might be faced with, which are discussed in chapter 8.
the novelty of the proposed solution consist in using new variables dq and dq , calculated according to (11) and ( 12), instead of a pair of variables q U (3) as residua (1): the next calculation's steps correspond to previous dependencies (4), (5a) and ( 6), which may be expressed as ( 13), ( 14) and ( 15): where: 1, 2,..., 2 the proposed algorithm assumes that two functions might be responsible for leak detection: a ˆ'q Rf function, obtained on the basis of the relation (15) or the result of its median filtration, i.e. a function ˆ"q Rf , which corresponds to the relation ( 16): where: 2 1 in no leakage situation values of the both functions ˆ'q Rf and ˆ"q Rf are close to zero. a leak alarm is generated, when the particular functions ˆ'q Rf and ˆ"q Rf exceed their alarm thresholds ' q Pal and " q Pal , according to the conditions ( 17) and ( 18): ˆ' ' ˆ" " initially we can state that the proposed algorithm might not require any change in alarm thresholds for slow changes in pipeline's flow conditions.an alternation of alarm thresholds might not be necessary as well in case of a change in pipeline's operating point.However, it is important to alert such a situation in order to avoid false alarms being generated by the algorithm in transition states.once the pipeline achieves the new operating point, i.e. new steady state conditions, residua function should be calculated again.if ˆ'q Rf and ˆ"q Rf functions are still close to zero, it will mean the lack of leakage.on the contrary, respectively higher values of both functions might indicate a leak occurrence.
the implementation of the ˆ'q Rf function may consider two time window options, which are presented in the Figure 3. in case of ˆ"q Rf function, which uses median filtering, the best solution is obtained for time windows showed in Figure 3a.

Method II and III
in practice, the algorithms presented in the previous subchapter, based on the correlative analysis, require determined sampling frequency.the applied sampling should ensure the visibility of signal dynamics (i.e.change trend) related to the leak occurrence, which improves the effectiveness of such analysis.it is also necessary to use wide time windows, with the right shifting (e.g.overlapping windows).thesimplified detection algorithms presented in this subchapter don't require such conditions, in particular in respect to sampling of measured signals.
in the first algorithm it is assumed that pressure n p is measured at several points along the pipeline, where 1,..., n j = ( j -the number of pressure sensors).this algorithm recalls the idea of Pressure Point analysis [6], which was modified by altering the method's structure and adopting a new approach towards all the pressure measurements.
instead analyzing a single measurement point, data gathered at all sensors is simultaneously taken into account.such a solution should ensure the ability to detect a leak, which is no longer significantly dependent on a leak location.
the second algorithm is based on the traditional volume balance approach [13], where it is assumed that flow rates 1( ) in q , 2( ) out q are measured on the inlet and outlet of a pipe.the proposed solutions of both algorithms are characterized by the use of indicator functions IF , which create the basis for alarm generation.
the approach adopted in the first index function P IF , which recalls in searching for a pressure drop produced by a leak, focuses on the comparison of the pressure over a fixed period of time.
at the start, diagnostic parameters n p are being transformed into variables n p by averaging within a time window of N sample long: where: i t -a time of the succeeding measurement sample.the next step is to calculate the deviations n x ∆ between n p boundary values of the reference window r T long (Fig. 4), which is being moved over the time to follow measurement samples:  the second index function Q IF utilizes the principle of mass conservation.this approach, in the simplified form of volume balance without compensation [13], is expressed with the following relationship: in non-leakage states functions IF are close to zero.as a result of leakage occurrence, the index function decreases and has negative values.its drop depends on the size of the leakage.taking into account the calculation method of both functions IF with data averaging, associated with specified time windows, their width should be enough large to obtain satisfactory calculation precision and limit the measurement errors and noise impact.once the P threshold limit is reached, the alarm is generated according to the below condition: (23)

Test stand overview and experimental test scenarios
the above presented solutions have been put through experimental tests.they were conducted on the test stand with a physical model of the pipeline (Fig. 5). the medium pumped through the pipeline was water.
the pipeline is 380 meters long and is made of polyethylene (PEHd) pipes which are 34 mm in internal and 40 mm in external diameter.it consists of three sections each of which is over one hundred meter long.the sections: 0÷140 m, 140÷280 m and 280÷380 m, are joined with the use of special connectors of the same diameter as the pipeline.
the pipeline is equipped with standard measuring devices: two electromagnetic flow meters (located at the inlet and outlet), six pressure transducers (at the inlet and outlet, and also in several points along the pipeline) and two thermometers.sensors are connected to a Pc provided with the 16 bit a/d converter Ni Pci 6259.More information about the location and metrological characteristics of the sensors and the measurement system is shown in table 1.
in order to simulate leakages, proportional solenoid valves automatically controlled were used.leakage simulations were performed under steady-state conditions of the pipeline.the results of the carried out experiments, which are presented in next chapters, were obtained for the following scenarios: the operating point settings of the pipeline: inlet pressure -

Aspects of using compared solutions during experimental tests 7.1. General assumption
comparison and assessment of three solutions, presented in the chapter 5, was performed based on the basis of practical diagnostic effectiveness for detection of simulated leakages.
For each solution the following performance indexes were determined: leakage detection level and detection response time.the principal behind the evaluation was the ability to detect the smallest possible leakage in the shortest possible time, even under unfavorable conditions, i.e. with the substantial level of disturbance affecting the measured signals.
in performed experiments the source of false alarms could be found in fluctuations and noises from the pumping (flow) of water through the pipe and measurement transducers.other additional disturbances were not simulated.
when determining leakage detection level for compared methods one should be aware that, among others, it depends on the obtained form of a diagnostic function (respectively: ˆq . the form of diagnostic functions should be characterized by suitably large change of their values in a state with leakage in comparison to a state without leakage.
Moreover, the question of appropriate choice of the alarm thresholds is one of crucial elements for proper operation of each solution.alarm threshold values had to be chosen in such a way that they ensure the absence of alarms for states without leakage.to meet the accepted criterion, on the one hand, the alarm thresholds values should have had sufficiently large margins to prevent generating accidental  alarms in states without leakage.on the other hand, too large margins would make small leaks impossible to detect. in order to compare the methods, each experiment was analyzed according to the scheme presented in Figure 6.diagnosing simulated leakages concerns period test T .Period 0 T was explored only to determine alarm thresholds.

Method I
the method's investigation considered different signal configurations, various settings of essential parameters and modes of data processing, i.e.: all configurations of diagnostic signals (labeled as " q ", " p ", " pall ") discussed in chapter 5. in the proposed algorithm, the ˆ'q Rf and ˆ"q Rf functions, based on flow rate signals, are determined on the same set of q N , α , β parameters.the same approach was followed as well during time steps calculation of dq and dq variables and procedures for cross-correlogram calculations (13) in Matlab program.whereas the median filtering ( 16) was achieved by using 3001 was based on the statistical analysis of individual functions ˆq Rf , ˆ'q Rf , ˆ"q Rf , ˆp Rf , ˆpall Rf in a state without leakage, i.e. in period 0 T shown in Figure 6.Furthermore, a constraint, which assumes selecting thresholds to ensure inexistence of false alarms in period test T , i.e. before occurrence of leakage, was imposed.the alarm thresholds were set as the average value of the standard deviations calculated for all experiments at different leakage points, according to the following relationship: " " " ˆq q q q q q q q q p p p where: q b , ' q b , " q b , p b , pall b -coefficients determined experimentally.

Method II and III
calculations were performed for both index functions, marked the threshold limits were proposed on the basis of the statistic analysis of index functions in pre-leak period 0 T (Fig. 6).this period defines populations it should be mentioned, that the same value of coefficient b was established for both functions and every leak experiment.

The results
the table 2 shows detection response times of the simulated leakages, obtained for the compared methods.the time is given in seconds and represent the average value of results gained in two experiments.
non-detection of leakage in both experiments is marked with "-" sign.if only one leakage detection succeeded, then it has been marked with "-/+".
Moreover, the table 2 presents localization's results of simulated leakages (in the shape of localization errors), which were gained by using a method based on pressure wave detection method (nPwM) and a gradient method (GM).
to have leak point estimated with a nPwM method, a procedure presented in [15] was applied.the first part of this procedure consists of the leak occurrence detection algorithm based on the functions ˆp Rf or ˆpall Rf already discussed, while the second part is aimed at detecting the transition of pressure waves through each pressure sensor points n z .after detection of a leak occurrence and having given the times ( )  in case of GM method, upon detection of a leak, a localization procedure is carried out with the formula (27).For this purpose the pressure measurement data, corresponding to the identified steady state of the pipeline both with and without a leak, are used.these data sets were acquired from four sensors installed on the pipeline, i.e.
where: l -the length of the pipeline; in dg , out dg -average increments of pressure gradients in the section between the beginning of the pipeline and the leak point and in the section between the leak point and the end of the pipeline; in dp , out dp -average pressure increments at the inlet and outlet of the pipeline.
analyzing the results, one can observe that: leakage detection level -varies in the compared solutions.depending on the method and the leak point, it was possible to detect leakages, which values were equal to 0.1-1.3% of the nominal flow rate Rf ). if we were to compare this algorithm with other solutions, it is worth pointing out that only this one took advantage of median filtering.such filter lengthens considerably the time needed to detect a leak.on the other hand, median filtering enabled elimination of flow disturbance impacts, which in case of other solutions enforced applying enough wide margins of an alarm threshold.although wide margins prevented false alarm generation, they resulted in a deterioration of the leak detection level.Quite good results were also obtained when two flow rate signals were used and analyzed with the proposed algorithm without median filtering (the method i -ˆ'q Rf ).then, slightly worse results were obtained for the solutions based on flow rate signals measured at the inlet and outlet of the pipeline (the methods i -ˆq Rf and iii -Q IF ). the least confident and satisfactory results were achieved using only two pressure signals measured at the inlet and outlet of the pipeline (the method i -ˆp Rf ). it has to be underlined here that leakage detection level depends on location of a leak. it is especially noticeable while pressure signals are used.considering this as a criterion, the best results were achieved for leakages in the middle section of the pipeline.Getting closer to the ends of the pipeline, detection level is getting worse (the size of detectable leaks becomes greater).the obtained results correspond to the leak detection distribution in relation to its location, which is presented in [7]. in case of using flow rate signals, such relation is not so evident.Moreover, in the method i with different window times, no significant differences were noticed for windows type a and b. besides, b type time windows located unfavorable with respect to the time period, which includes changes of signals caused by the leakage occurrence, may result in a deterioration of the leakage detection level; detection response time -of simulated leakages significantly differs in the compared solutions.observed discrepancies relate to the use of different type of diagnostic signals.the shorter time was obtained in case of pressure signals (the methods i and ii) and the longer one for flow rate signals (the methods i and iii).this is conditioned by the course of leak phenomenon, with different dynamics of pressure and flow rate change.if more than only two pressure signals, i.e. at the inlet and outlet of the pipeline, are measured, significant improvement of detection response time can be obtained.comparing the obtained results of the presented algorithm based on flow rate signals, the detection time in the proposed option without median filtering (the method i -ˆq Rf ) was slightly longer, than in case of other known solutions (the methods: i -ˆq Rf and iii -Q IF ). the longest detection time was observed however in case of the proposed solution with median filtering (the method i -ˆ"q Rf ). this is due to the application of a median filter.obtaining a filter estimator for a given time involves considering the additional time, which corresponds to the length of the half of a data vector A N .in case of the method i, with variable time windows, the detection response time did not exceed behind values resulting from accepted moving mode of implemented time windows; localization errors -of simulated leakages were greater for the smallest leakages and they reduced for larger leakages.in both methods, errors were significantly smaller when a gradient technique was used.the precision of leak localization could be improved further by considering other configurations of sensors, i.e. including sensors placed closer to a leak location.in case of the method based on pressure wave detection, leak position errors were greater and for a few leakages it was even not possible to determine the leak point.the reason behind that is related to issues with a detection and identification of pressure wave forehead.it might be worth noticing that experiments considered only simulations of sudden leaks.if there are slowly increasing leakages, results of localization could be even worse.

besides, Figures 7e-h show an example of a comparison of ˆq
Rf functions, derived from the known algorithm, with ˆ'q Rf and ˆ"q Rf functions calculated with the algorithm proposed in this paper.this comparison is performed for two different leak simulation experiments.in addition, Figures 7a-d captured flow rate signals in q and out q as well as reference variables in q and out q , on the basis of which the functions ˆq Rf , ˆ'q Rf , ˆ"q Rf were obtained.
in Figure 7e we might notice that the previous solutions didn't ensure a successful leak detection.this is a result of unfavorable shape of ˆq Rf function.However, a leak detection was possible with a use of the proposed solution (Fig. 7g), both in case of ˆ'q Rf and ˆ"q Rf functions, whose shapes are far more satisfactory.in Figure 7b a distortion of flow rate in q is visible.it provokes a noticeable change in ˆq Rf function, which however does not result in false alarm generation and also does not require any change in alarm threshold margins (Fig. 7f).we might notice as well that function's impulse ˆq Rf , alerting a leak occurrence, does not always take a favorable shape or amplitude's value.considering the proposed algorithm, the mentioned above disturbances could provoke a false alarm in case of ˆ'q Rf function (Fig. 7h). in order to avoid it, it was indispensable to enlarge considerably the alarm threshold margin.such an issue didn't occur in case of ˆ"q Rf function because the disturbance impact was eliminated by applying median filtering.
in general, we also could notice that ˆ'q Rf and ˆ"q Rf functions have a considerable change in their amplitude as a result of a leak occurrence. it significantly facilitates a leak detection.
summarizing, in comparison to the results of the leakage detection levels mentioned in [5], the obtained results can be assessed as highly satisfactory.However, it should be noticed, that they refer to the model installation.For real pipelines, one should expect slightly worse results using proposed solutions.due to the greater length of real pipelines, detection response time will be also longer.
it should also be noted that the discussed results relate to sudden leakages.in case of diagnosing slow leakages, leakage detection level would be worse and detection response time longer.
Moreover, the research was focused on detection of the smallest possible leak, assuming no alarms for non-leak states.an important issue was the course of the analyzed diagnostic functions and alarm thresholds selection.the proposed solution to this problem is quite simple and effective.However, it can be assumed that the use of even more sophisticated solution may create opportunities for further improvement of leakage detection level.

Conclusion
this paper presents the comparison of several improved (modified) slda (simplified leakage detection algorithms).the compared methods were parameterized and considered for different configurations of diagnostic signals.on the basis of the leakage diagnosis results, obtained during simulations of leaks on the laboratory pipeline, the assessment of these solutions has been performed.
the obtained results prove that, with the simple leak detection methods, it is possible to detect leakages with highly satisfactory diagnosing efficiency (considered as the ability to detect very small leakages in a short time).
the proposed detection algorithm, with two diagnostic functions, improves also a leak detection level.both diagnostic functions are reliable shape and amplitude indicators.
the discussed methods can be used for building leak detection systems (lds) in parallel to more sophisticated solutions based on transient models of pipeline installations.

Fig. 1 .
Fig. 1.Plots of sensor's signals at the laboratory pipeline with a single leak: 1 diagnostic signals: two flow rate signals measured at the inlet and outlet of the a) pipeline, two pressure signals measured at the inlet and outlet of the pipe-b) line, two pressure signals measured at the inlet and outlet, and ad-c) ditionally at several points along the pipeline.
at the beginning, measured diagnostic signals n x (suitably: n q -flow rate signals, n p -pressure signals; where: 1,..., n j = -point number, j -amount of measuring points) being selected for the analysis are transformed into variables n x ∆ .Variables n x ∆ represent deviations (residua) and are calculated as the differences between the signal current values k n x and their reference values k n

Fig. 2 .
Fig. 2. Plots of measurement data collected on the laboratory pipeline for asmall, sudden leakage: in p , out p -pressure at the inlet and outlet, and in q , out q -flow rate at the inlet and outlet respectively.Due to considerable level of noise in the data, it is difficult to notice small changes, provoked by the leakage, in the observed signal trends.The leakage of about 0.45% of the nominal flow rate was simulated close to the middle of the pipe's length at the time leak t t = .
leakage values of the individual functions ˆxs Rf are close to zero.if the analysis concerns only two flow rate signals , as result of the occurrence of the leakage a value of the function ˆq Rf decreases and becomes negative, because of = ), as result of the occurrence of the leakage a value of the function ˆp Rf is increasing and becomes positive, because of alarm is generated, when the function ˆp Rf exceeds its alarm threshold p Pal , according to the condithe analysis concerns larger number of pressure signals n p ( 1 s > ), the average value (9) is calculated on the basis of the set of individual calculated variables ˆps Rf :

Fig. 3 .
Fig. 3. Schemes of used time windows 20) the function P IF is defined as the minimum value of deviations n x ∆ , according to the formula:

Fig. 4 .
Fig. 4. Scheme of P IF time windows the selected points whose distance from the pipeline's inlet was about 75 , 155 and 235 m; two experiments were performed for each leakage value.the Pc-based data acquisition system was used to acquire pressure and flow sensors' signals with sampling frequency of 100 P f = Hz.

Fig. 5 .
Fig. 5. View of the pipeline pressure signals) in a period corresponding to the sample time P T ; two types of time windows shown in Figure3aand 3b.stand-ard time windows (labeled as "a") were moved with every single signal sample.no-standard time windows (labeled as "b")were moved every / 2 N signal samples, where N denotes the number of samples in a window; different window lengths for particular configurations of diag--

IF
function considers all available 6 pressure points of an experiment.to average any pressure n p , 100 measurement samples within 1 second window ( ) 100 N = were used, while r T , time between the comparative data, was set to 10 seconds.Q IF function takes only supply and delivery flows into consideration and also is based on 1 second time window ( ) 100 N = .
of observed values with 1 second interval.on the basis of these populations the threshold limits were made as follows:

Fig. 6 .l
Fig. 6.Time scenario of experiments, where: 0 T -period for the selection of alarm thresholds margins, test T -period for the detection of simulated leakages type of diagnostic signals perspective , the best results were achieved when complete set of pressure signals was used (the methods i -ˆpall Rf and ii -P IF ).Even better detection level was achieved with the proposed algorithm, based on two flow rate signals and data transformation performed with median filtering (the method i -ˆ"q

Table 1 .
Characteristics of the measurement system * uncertainty of measurement = sensor + 16-bit converter

Table 2 .
Detection response times and localization errors of simulated leakages obtained in compared solutions f pall  Industrial research Institute for automation and Measurements al. jerozolimskie 202, 02-486 warsaw, Poland e-mails: p.ostapkowicz@pb.edu.pl,abratek@piap.pl