Martín Di Blasi, REPSOL-YPF, C.F., Argentina;
and Carlos Muravchik, Control e Instrumentación (LEICI), UNLP, Argentina
The use of statistical tools to improve the decision-making aspect of leak detection is becoming a common practice in the area of computer pipeline monitoring. Among these tools, the sequential probability ratio test is one of the most named techniques used by commercial leak detection systems. This decision mechanism is based on the comparison of the estimated probabilities of leak or no leak observed from the pipeline data.
The goal here was to develop a leak detection system that uses a simplified statistical model for the pipeline operation, allowing a simple implementation in the pipeline control system. By applying linear regression to volume balance and average pipeline pressure signals, a statistically corrected volume balance signal with reduced variance can be introduced. Its average is zero during normal operation, whereas it equals the leak flow under a leak condition.
Based on the corrected volume balance, differently configured sequential probability ratio tests (SPRT) to extend the dynamic range of detectable leak flow were performed. Simplified mathematical expressions were obtained for several system performance indices, such as spilled volume until detection, time to leak detection, minimum leak flow detected, etc. Theoretical results were compared with leak simulations on a real oil pipeline, a 500-km, 32-in. system in Argentina, to prove the veracity of the leak detection system.
Leak detection and localization
A leak is an unplanned loss of fluid through the pipeline walls into the environment caused by corrosion, overpressure or when the pipe is ruptured by external causes. These are some of the events pipeline operating companies are exposed to, with significant importance due to the consequences on population, properties and the environment. There exist several commercially available leak detection and localization systems with many different approaches and degrees of success, spread over an ample range of cost and complexity.
Modern SCADA systems and related automation equipment (i.e., PLCs) make it possible to implement complex, real-time data processing algorithms that use diverse information such as pressure, flow rate, product density, etc., in order to detect an abnormal operating condition. Leaks, line ruptures, line blockages or pump station trips are among these abnormal conditions that can be detected and alarmed. The present work only focuses on leak detection, although similar concepts and algorithms have also been developed and used for the other conditions.
Developing a simplified leak detection system, as described here, could be the basis that allows future evaluation of other off-the-shelf leak detection and localization systems. Moreover, it could allow operators to develop the knowledge about achievable bounds of sensitivity and response speed in leak detection techniques operating on specific SCADA supervision systems.
Along the mentioned lines, an in-company detection methodology was developed and implemented, based on principles such as using only simplified fluid transportation physical models, re-using the same monitoring and control equipment utilized for routine operation, and optimization with regards to observation errors and instrument noise. Simplification of the physical modeling reduces the need for measurements of temperature, density and viscosity which are otherwise necessary for detailed modeling. The statistical tools used in the detection process account for the unavoidable observation errors and inevitable instrument noise.
The system implementation was completely integrated into the existing SCADA: from algorithms and logic sequences running on the control stations PLCs up to graphical interfaces on the same HMI screens used to monitor and control routine operation. Replicas of this system are currently being used over 3,000 km of pipelines in Argentina.
Notation
In this process, the following notation was used:
L pipeline length
? fluid density
A pipeline cross-section
x position
t time
q1(t) sum of inlet flow to the pipeline
q2(t) sum of outlet flow from the pipeline
?ref reference mass density
qf unknown leak flow
? specific weight of the fluid
qc statistically corrected volume balance flow
Line balance methods
Line balance methods are based on the mass conservation principle applied to a pipeline:
(1)
where MI (t) and Mo (t) represent the input and output mass flow and is the total fluid mass accumulated in the pipeline (or linepacking). Linepacking time change of a length L pipeline is given by:
(2)
requiring the density ?(x,t) and the pipe cross-section A(x,t) as functions of distance and time. A solution involving these functions implies obtaining the solution to the partial differential equations of momentum, continuity and energy conservation at the expense of a heavy computational load.
In order to keep a reasonable complexity level of the fluid transport model, avoiding the need of having many density and temperature measurements, several simplifying hypotheses were made leading to the volume balance equation. Despite the fact that it is only an approximation, the results are satisfactory for our purposes.
Volume balance methods assume that transported fluids have a similar density that does not change significantly with temperature. In addition, the effects of pressure are attributed to a single equivalent compressibility factor that condensates the compression of the whole fluid in the pipeline, as well as the expansion of the pipe cross-section.
The equivalent packing volume or linepacking can be defined as:
(3)
Under normal operation without leaks, the volume flow satisfies the continuity equation or its version, the so-called modified line-balance equation:
(4)
Defining a corrected flow or volume balance as:
(5)
A leak causes an imbalance not included in the equation (4), thus:
(6)
Generating the required signals
The proposed leak detection scheme consists of a set of algorithms based on (5) and processing signals and information from the pumping stations. Figure 1 shows the notation used to designate the signals of interest, incoming and out coming flows to a segmented pipeline and suction and discharge pressures in each pipe segment. Only flow measurements in both ends (q1 and q2) of a pipeline are used, as well as pressure measured at the suction (Pi2) and discharge (Pi1) of every pumping station.
Variations of linepacking are the consequence of variations in pipe diameter and transported fluid compression, as caused by changes in pressure and temperature. The situation is analyzed in what follows in terms of the signals just defined. Figure 2 displays a 24-hour record in continuous normal (no leak condition) operation of the balance and the change of mean pressure in the previously mentioned 500-km, 32-in. oil pipeline in Argentina. Evidently, both signals are highly correlated and fluctuations in volume balance are caused by changes of mean pressure. Figure 3 is a scatter plot of balance versus mean pressure change, confirming the positive correlation between them as seen in a Figure 2.
As a consequence, pipeline pressure changes allow a partial explanation of the inventory changes. Thus, inventory variations can be predicted from pressure changes with the linear relationship. The effect of fluid temperature is not taken into account because this is generally a slowly varying signal (in the range of hours) and is not significant in the short intervals used to calculate balances.
The line-packing constant can be estimated online, based on the high correlation existing between pipeline pressure changes and line balances during normal operations. This is easily and efficiently done online by means of a suitable recursive least squares algorithm, with a forgetting factor that accounts for slow variations in the statistical properties of the signals.
The data shown in Figure 3 corresponds to normal operation of the pipeline. The points in the scatter plot will depart from the line pattern when there is a leakage event or during strong transients. To avoid biasing the estimates of the linepacking constant and spoiling the correction, it is important to discard abnormal operation points.
Sequential test performance
The SPRT method was originally proposed as a technique suitable for statistical quality control. One of the main aspects of this kin5d of test is that the number of samples of corrected balance needed to reach a decision is not constant but it is a random variable to be determined during the same decision process. This methodology is also utilized in some commercial leak detection systems.
The spilled volume before detection calculation is a significant performance indicator. However, some caution must be exercised when considering this in isolation from other factors. Very often, the effect of the pipeline’s elevation and the consequent draindown of the pipe during a leak is overlooked. The total volume spilled as a consequence of a leak may not be primarily determined by the time to detect the leak, but by the appropiateness of the leak response plan followed after the detection. This suggests that the development of leak response plans (i.e., how to stop the pipeline, and which line blocking valves need to be closed or remain open) should also be considered as part of a leak detection system.
Real leakage testing
The detection system underwent several tests consisting in simulation of leaks by intentionally modifying the observations of relevant measured variables hence, inducing the mimic of a real leakage condition. Moreover, real leakage tests were implemented by re-directing the fluid in intermediate stations. These tests are described below, along with an analysis of the test results.
As noted, a 500-km, 32-in. oil pipeline with six intermediate pumping stations was used to test the leak detection system, by deriving crude oil from one of the intermediate stations. The leak flow of the derivation experiments were 500, 200 and 100 m3/hr. The nominal oil pipeline flow during the tests was 1900 m3/hr thus, the simulated leak flows were of 26%, 10% and 5% respectively, of the nominal flow. Since the standard deviation of the corrected flow was estimated to be ?qc = m3/hr, the normalized flows Qf were 5, 2 and 1 respectively. For the time these leak tests were conducted, qmin was configured as 0.5, 1 and 2.
Conclusion
Concepts of statistical signal processing and approximate modelization have been applied to sections of a long-distance pipeline system to build and implement a real-time detection system that runs on the same SCADA used for monitoring and control. Some theoretical equations for the system performance were derived based on approximate models. The suitability of the simplified modelization and of the assumptions has been validated by means of several tests performed with real and simulated leaks.
Acquired data, such as records of line balances and pressure changes, allow the accumulation of historic information that provides the possibility to analyze in detail some aspects of the transport process and improve the implemented system.
Additionally, we believe that the system described here is a good example of exploiting the flexibility and capabilities of modern SCADA systems; where advanced functionalities can be easily incorporated to assist the operators in the important job of supervision, fault detection and process control.
The overall experience – development of the method and its subsequent testing – can provide the basis for evaluating and comparing leak detection alternatives. Indeed, it provides means of knowing the performance in terms of sensitivity and speed of response to a leak. Both of these criteria are computable by using the existing supervision of operations with SCADA systems.
Editor’s Note: This study was performed while Martín Di Blasi was employed with Repsol-YPF in Argentina. He is now Supervisor of Hydraulic Design in the Business Development Engineering Department of Enbridge Pipeline Inc., Edmonton, Alberta.
Acknowledgment
Based on a paper presented at the 6th International Pipeline Conference, Calgary, Alberta, Canada.
Recommended Reading
Dividends Declared in the Week of Aug. 26
2024-08-30 - Here is a selection of dividends declared from select upstream and service and supply companies.
HNR Acquisition to Rebrand as EON Resources Inc.
2024-08-29 - HNR’s name change to EON Resources Inc. and a new ticker symbol, “EONR,” will take effect when trading commences on Sept. 18.
Hunting Wins Contracts for OOR Services to North Sea Operators
2024-08-29 - Hunting is securing contracts worth up to $60 million to deliver organic oil recovery technology to increase recoverable reserves for North Sea operators.
GreenFire Appoints Rob Klenner as President to Deliver Geothermal Solutions
2024-08-27 - As president of GreenFire Energy, Rob Klenner will be responsible for overseeing GreenFire’s geothermal energy projects.