Statistically detecting leakage of fluid from a conduit

Abstract: A method is provided to detect leakage from a conduit through which a stream of fluid flows, the method comprising measuring at least one variable of the group consisting of fluid pressure and fluid flow rate over a period of time and at at least one location of the stream, to provide a data set representing the variable at said location and over said period of time. A statistical probability of obtaining said data set from the measurement under the hypothesis that no leakage occurs is determined, and a statistical probability of obtaining said data set from the measurement under the hypothesis that leakage occurs is determined. One of said hypothesis is selected as being true if the probability of obtaining said data set from the measurement under said hypothesis is larger than the probability of obtaining said data set from the measurement under the other hypothesis.

Description: The invention relates to detection of leakage of fluid from a conduit through which a stream of fluid flows. The conduit can, for example, form part of a network for distributing gas or liquid, or form part of a plant for processing hydrocarbons. Generally, the occurrence of a leak should be detected at an early stage in order to limit the risks involved with the leak, especially when inflammable fluids are transported through the conduit. Furthermore, damage to environment or equipment due to leaking fluid can be limited or prevented if the leak is detected at an early stage. In a known method to detect leakage of fluid from a pipeline a mass balance technique is used which involves measuring the inlet and outlet flow rates, and comparing the flow rates in order to check the fluid mass balance in the pipeline. In another known method a statistical distribution of variations of fluid pressure or fluid flow rate during development of a leak is assumed. This method aims to detect leaks from measurements of pressure at selected intervals along the pipeline, which measurements are compared with the assumed statistical distribution. A disadvantage of the known methods is that alarms are often generated in case of no leakage, or no alarms are generated in case of leakage, especially during varying operating conditions. It is an object of the invention to provide a reliable method to detect leakage of fluid from a conduit, which method overcomes the disadvantages of the known methods. It is a further object of the invention to provide a reliable device for detecting leakage of fluid from a conduit. In accordance with the invention there is provided the method of claim 1 and the device of claim 11 using US-A-4 796 466 for delimitation. By using statistical probabilities for the selection of said one hypothesis it is achieved that variations, for example due to operational changes or fluid hold up in the conduit, can be distinguished from the occurrence of a leak. In a preferred embodiment of the invention said location forms a first location, said data set forms a first data set, and the method comprises the further steps of: measuring said variable between said first and second times and at a second location of the stream to provide a second data set representing the variable at the second location and between said first and second times; determining a statistical probability of obtaining the second data set under the hypothesis that no leakage occurs and a statistical probability of obtaining the second data set under the hypothesis that leakage occurs; and selecting said one hypothesis as being true if the probability of obtaining each data set under said hypothesis is larger than the probability of obtaining the data set under the other hypothesis. It is thereby achieved that the effects of operational changes on the detection of a leak are further eliminated, and that, for example, a time lag between an increase of the mass flow rate at an inlet of the conduit and at an outlet thereof is taken into account. To provide a reliable statistical calculation procedure, the step of determining said probabilities of obtaining each data set comprises selecting a statistical distribution of the variable at the location pertaining to the data set under the hypothesis that no leakage occurs and selecting a statistical distribution of the variable at said location under the hypothesis that leakage occurs, the statistical distributions being similar to each other but having different mean values. Accurate statistical representation of the variable is achieved when said statistical distributions are gaussian distributions having substantially equal variances. Preferably the steps of determining said probabilities and selecting said one hypothesis are carried out using Wald's sequential probability ratio test (SPRT) as described in Wald A., "Sequential analysis", Dover Pub. Inc., 1947; and in Wald A., Wolfowitz J., "Optimum character of the sequential probability ratio test", Ann. Mathematical Statistics, 19, 1948. The sequential probability ratio test (SPRT) will now be discussed briefly and by way of example only. In order to determine whether a leak has occurred in a pipeline system which can operate under normal condition or under leakage condition, the following hypotheses are constructed: hypothesis H₀ implying that the system is under normal operation; hypothesis H₁ implying that the system is under leakage operation. Successive observations of said at least one variable of the group consisting of fluid pressure and fluid flow rate are denoted as y₁, y₂,...y t , where t indicates the sampling number. Assume that the probability of observing y₁ ,..., y t is given by P₀(t) when H₀ is true and by P₁(t) when H₁ is true. At the t th sampling step, the logarithm of the probability ratio λ(t) = ln P 1 t P 0 t is computed and a decision is made as follows: If λ(t) ≥ A, then terminate the observation and accept H₁. If λ(t) ≤ B, then terminate the observation and accept H₀. Otherwise continue the observation. The constants A (A > 0) and B (B < 0) are determined by the prescribed test strength (α, β), where α is the false alarm (alarm in case of no-leak) probability. β is the missed alarm (no alarm in case of a leak) probability. The relationship between A, B and α, β is: A ≤ ln 1 - β α B ≥ ln β 1 - α The upper limits of α and β for fixed values of A and B are given by α ≤ e -A β ≤ e B Therefore the false alarm and missed alarm probabilities can be controlled by adjusting the thresholds A and B. To choose the values of A and B in practice, it is sufficient to assume equality in (2) and (3). When a leak develops in a pipeline, the fluid flowrate and pressure will generally change, starting from the location of the leak and propagating toward the inlet and outlet of the pipeline. In case of steady state flow conditions prior to leakage, the flow variables change until a new steady state condition occurs. It is to be understood that fluid flowrates and pressures subjected to random fluctuations also represent steady state flow conditions, at least as long as such variables can be characterized by a statistical distribution, for example a gaussian distribution. For such steady state flow conditions the hypothesis testing problem can be constructed as follows: 1) H₀:M₁ is gaussian with mean m₁ and variance σ 1 2 . H₁:M₁ is gaussian with mean m₁+Δm₁ and variance σ 1 2 . 2) H 0 * :M₂ is gaussian with mean m₂ and variance σ 2 2 . H 1 * :M₂ is gaussian with mean m₂-Δm₂ and variance σ 2 2 . Where M₁ and M₂ are the mass flow rates of the inlet and at the outlet, Δm₁ and Δm₂ are the expected minimum changes of m₁ and m₂ caused by a leak. A leak detection scheme can be obtained by applying Wald's SPRT to hypothesis testings H₀, H₁ and H 0 * , H 1 * respectively. A leak alarm is generated only if both H₁ and H 1 * are accepted simultaneously. For the testing of the above hypothesis H₁ against H₀, equation (1) can be transformed into a simple recursive form: λ 1 (t) = λ 1 (t-1) + Δm 1 σ 1 2 M 1 (t) - m 1 - Δm 1 2 Similarly for testing of hypothesis H 1 * against H 0 * , we have: λ 2 (t) = λ 2 (t-1) - Δm 2 σ 2 2 M 2 (t) - m 2 + Δm 2 2 Therefore at every sample step t, a decision is made by comparing λ₁(t) and λ₂(t) with the threshold values A and B. It is possible to set different thresholds for λ₁(t) and λ₂(t). The above leak detection scheme can be modified for other boundary conditions by testing different combinations of variables. Once a leak has been detected, the leak size can be estimated using the corrected mass balance technique which involves determination of a difference between the inlet and outlet flow rates while the variation of the fluid hold up in the pipeline is taken into account. The fluid hold up can be determined for example from temperature and pressure measurements along the pipeline. The leak can be localised by applying the least squares algorithm to the steady state equation relating the measured fluid flow rates and pressures to the leak location. The leak location X₁ can be estimated using the following equation: where and are the on-line calculated sample means of the pressure measurements at the inlet and the outlet of the pipeline respectively; and are the on-line calculated sample means of the mass flow measurements at the inlet and the outlet of the pipeline respectively; L is the length of the pipeline; K is a constant determined by the friction factor, fluid density and pipeline diameter. K is estimated using the flow and pressure measurements before a leak is detected. In case the flow conditions do not represent a steady state condition, for example due to strongly varying operating conditions, generally a time delay occurs between changes of the flow conditions at the inlet and at the outlet of the pipeline. The following equation can be used to calculate the probability ratio λ(t) for such non-steady state conditions: λ(t) = λ(t-1) + Δm σ 2 . Z(t) - m - Δm 2 where Z(t) represents the difference between the inlet flowrate and the outlet flowrate taking into account said time delay and the inventory variation, i.e. Z(t) = M₁(t) - M₂(t') - ΔM(t), t indicating a first sampling number, t' indicating a second sampling number at said time delay after the first sampling number, and ΔM(t) indicating the inventory variation rate over the time period between t and t'. The hypothesis testing scheme for leak detection is then: H₀ : Z is gaussian with mean m and variance σ² H₁ : Z is gaussian with mean m + Δm and variance σ² where m is the mean difference between the inlet and outlet flow rate before occurrence of a leak, Δm is the minimum leakrate to be detected and σ² is the variance of the distribution of Z. At each sample step, λ(t) is compared with the threshold value A and an alarm is generated as soon as λ(t) becomes greater than or equal to A. A similar scheme can be used in case the measured variable is the fluid pressure. Then Z(t) represents the fluid pressure at the inlet or at the outlet. The invention will now be further illustrated in the following two examples. Example 1 The scheme of equations 5 and 6 was applied to detect two occurrences of leakage in a 100 km long pipeline of internal diameter 50 cm, and operating at randomly varying pressure and flowrate conditions. The operating conditions were as follows: fluid flowing through the line : air; temperature of fluid : 290 K; Moody friction factor : 0.02; inventory variation : 50% of average mass flowrate; sampling intervals : 35 seconds; simulation period : 3 hrs; SPRT test strength : α = 0.05; β = 0.05; thresholds : A = 2.9444; B = 2.9444; measured variables : mass flowrate and pressure at inlet and outlet. The average inlet pressure was 55 bar, and the average outlet pressure was 48 bar. The average mass flowrate was 29 kg/s. A first leak of 12% mass flow loss was simulated at location x = 20 km from the inlet and at time t = 0.4 hrs. The leak was detected using Wald's sequential probability ratio test at time t = 1.8 hrs, the time delay in detection being 1.4 hrs. After detection of the leak, the corrected mass balance technique, based on the flow and pressure measurements at the inlet and outlet was applied to estimate the size of the leak. The estimated leak rate in the last sampling period was 3.13 kg/s. Since the actual leak size was 12%, i.e. 3.48 kg/s, the estimation accuracy was 90%. The estimated position of the leak was x = 22 km from the inlet as determined with the least squares algorithm, the accuracy thereof being 98%. A second leak of 1.1% mass flow loss was simulated at location x = 50 km from the inlet and at time t = 0.4 hrs. This leak was detected using Wald's sequential probability ratio test at time 2.1 hrs, the time delay in detection being 1.7 hrs. The mass balance technique failed to estimate the leak size because the leak was very small relative to the inventory variations. The least squares algorithm was used to localise the leak, which algorithm converged to leak location x = 55 km from the inlet, the accuracy of the estimation being 95%. Example 2 The scheme of equation (8) was applied for both flowrate measurements and pressure measurements to detect four leaks simulated in a 37 km long pipeline of diameter 10 cm, and operated to transport liquefied propylene at varying operating conditions. During normal operation the mass flowrate varies between 200-320 tons/day, the inlet pressure varies between 15-22 bar, and the outlet pressure varies between 10-11 bar. The results of the leak detection scheme were as follows: leak No. 1 2 3 4 leak size (% of nominal flowrate) 10% 5% 2% 1% measured leak size (% of nominal flowrate) 9.26% 4.8% 1.83% 1.01% detection time (minutes) 1.7 1.9 3.7 12.5 localisation error 0.6% 13.6% 14.0% 20.8% leakrate estimation error 6.9% 10.0% 20.8% 8.5%

Claims: A method to detect leakage from a conduit through which a stream of fluid flows, comprising: measuring at least one variable of the group consisting of fluid pressure and fluid flow rate between a first and a second time and at a location of the stream, to provide a data set representing the variable at said location and between said first and second times; and determining a statistical probability of obtaining said data set from the measurement; characterized in that said statistical probability is determined both under the hypothesis that no leakage occurs and under the hypothesis that leakage occurs; and that one of said hypothesis is selected as being true if the probability of obtaining said data set from the measurement under said hypothesis is larger than the probability of obtaining said data set from the measurement under the other hypothesis. The method of claim 1, wherein said location forms a first location and said data set forms a first data set, the method further comprising: measuring said variable between said first and second times and at a second location of the stream to provide a second data set representing the variable at the second location and between said first and second times; determining a statistical probability of obtaining the second data set under the hypothesis that no leakage occurs and a statistical probability of obtaining the second data set under the hypothesis that leakage occurs; selecting said one hypothesis as being true if the probability of obtaining each data set under said hypothesis is larger than the probability of obtaining the data set under the other hypothesis. The method of claim 1 or 2, wherein the step of determining said probabilities of obtaining each data set comprises selecting a statistical distribution of the variable at the location pertaining to the data set under the hypothesis that no leakage occurs and selecting a statistical distribution of the variable at said location under the hypothesis that leakage occurs, the statistical distributions being similar to each other but having different mean values. The method of claim 3, wherein said statistical distributions are gaussian distributions having substantially equal variances. The method of any one of claims 1-4, wherein said one hypothesis is selected as being true if the difference between the probability of obtaining each data set under said hypothesis and the probability of obtaining the data set under the other hypothesis exceeds a minimum difference which is in functional relationship with a selected false alarm probability. The method of any one of claims 1-5, wherein said one hypothesis is selected as being true if the difference between the probability of obtaining each data set under said hypothesis and the probability of obtaining the data set under the other hypothesis exceeds a minimum difference which is in functional relationship with a selected missed alarm probability. The method of any one of claims 1-6, wherein the steps of determining said probabilities and selecting said one hypothesis are carried out using Wald's sequential probability ratio test as defined hereinbefore. The method of any one of claims 1-7, further comprising creating a signal indicative of the truth of said one hypothesis. The method of any one of claims 2-8, wherein said first location is at an inlet of the conduit, and said second location is at an outlet of the conduit. The method of any one of claims 1-9, wherein the location of leakage is determined by solving the steady state equation relating said measured variable to said location of leakage, using the least squares algorithm. A device to detect leakage from a conduit through which a stream of fluid flows, comprising: means for measuring at least one variable of the group consisting of fluid pressure and fluid flow rate between a first and a second time and at a location of the stream, to provide a data set representing the variable at said location and between said first and second times; and means for determining a statistical probability of obtaining said data set from the measurement; characterized in that said means for determining said statistical probability comprise means for determining said statistical probability both under the hypothesis that no leakage occurs and under the hypothesis that leakage occurs; and that the device further comprises means for selecting one of said hypothesis as being true if the probability of obtaining said data set from the measurement under said hypothesis is larger than the probability of obtaining said data set from the measurement under the other hypothesis.

Inventors: ZHANG XUE JUN, ZHANG, XUE JUN
Applicants: SHELL INT RESEARCH, SHELL INTERNATIONALE RESEARCH MAATSCHAPPIJ B.V.
Application year: 1992
Main classification: G01M3
IPC codes: G01M3