# Leak detection

Pipeline leak detection is used to determine if (and in some cases where) a leak has occurred in systems which contain liquids and gases. Methods of detection include hydrostatic testing, tracer-gas leak testing, infrared, laser technology, and acoustic or sonar technologies. Some technologies are used only during initial pipeline installation and commissioning, while other technologies can be used for continuous monitoring during service.
Pipeline networks are a mode of transportation for oil, gases, and other fluid products. As a means of long-distance transport, pipelines have to fulfill high demands of safety, reliability and efficiency. If properly maintained, pipelines can last indefinitely without leaks. Some significant leaks that do occur are caused by damage from nearby excavation, but most leaks are caused by corrosion and equipment failure and incorrect operation. If a pipeline is not properly maintained, it can corrode, particularly at construction joints, low points where moisture collects, or locations with imperfections in the pipe. Other reasons for leaks include exterior force damage (such as damage by car collisions or drilling rigs) and natural forces (such as earth movement, heavy rain and flooding, lightning, and temperature).

## Overview

The most common leak detection method for pipeline operators is called the Supervisory Control And Data Acquisition (SCADA) system. This system uses a series of sensors to track data such as pressure, flow rates, temperature, and whether valves are open or closed. The sensors relay the information to a control room where operators determine the legitimacy of the leak alarms. Some systems have added the Computational Pipeline Monitoring System (CPM), whose main task is to detect leaks. These systems have been reported by pipeline operators to the US Department of Transportation's Pipeline and Hazardous Materials Safety Administration to be inefficient in leak detection. Even with these in place, the SCADA system is reported to have detected only 19% of leaks, and the CPM system only detecting 10% of leaks.
The primary purpose of leak detection systems (LDS) is to help pipeline controllers to detect and localize leaks. LDS provide alarms and display other related data to the pipeline controllers to assist decision-making. Pipeline leak detection systems can also enhance productivity and system reliability thanks to reduced downtime and inspection time.
According to the API document "RP 1130", LDS are divided into internally based LDS and externally based LDS. Internally based systems use field instrumentation (for example flow, pressure or fluid temperature sensors) to monitor internal pipeline parameters. Externally based systems use a different, independent set of field instrumentation (for example infrared radiometers or thermal cameras, vapor sensors, acoustic microphones or fiber-optic cables) to monitor external pipeline parameters.

## Rules and regulations

Some countries formally regulate pipeline operation.

### API RP 1130 "Computational Pipeline Monitoring for Liquids" (US)

This recommended practice (RP) focuses on the design, implementation, testing and operation of LDS that use an algorithmic approach. The purpose of this recommended practice is to assist the Pipeline Operator in identifying issues relevant to the selection, implementation, testing, and operation of an LDS.

### TRFL (Germany)

TRFL is the abbreviation for "Technische Regel für Fernleitungsanlagen" (Technical Rule for Pipeline Systems). The TRFL summarizes requirements for pipelines being subject of official regulations. It covers pipelines transporting flammable liquids, pipelines transporting liquids that are dangerous for water, and most of the pipelines transporting gas. Five different kinds of LDS or LDS functions are required:
* Two independent LDS for continuous leak detection during steady-state operation. One of these systems or an additional one must also be able to detect leaks during transient operation, e.g. during start-up of the pipeline
* One LDS for leak detection during shut-in operation
* One LDS for creeping leaks
* One LDS for fast leak location

## Requirements

API 1155(replaced by API RP 1130) defines the following important requirements for an LDS:
* Sensitivity: An LDS must ensure that the loss of fluid as a result of a leak is as small as possible. This places two requirements on the system: it must detect small leaks, and it must detect them quickly.
* Reliability: The user must be able to trust the LDS. This means that it must correctly report any real alarms, but it is equally important that it does not generate false alarms.
* Accuracy: Some LDS are able to calculate leak flow and leak location. This must be done accurately.
* Robustness: The LDS should continue to operate in non-ideal circumstances. For example, in case of a transducer failure, the system should detect the failure and continue to operate (possibly with necessary compromises such as reduced sensitivity).

### Steady-state and transient conditions

During steady-state conditions, the flow, pressures, etc. in the pipeline are (more or less) constant over time. During transient conditions, these variables may change rapidly. The changes propagate like waves through the pipeline with the speed of sound of the fluid. Transient conditions occur in a pipeline for example at start-up, if the pressure at inlet or outlet changes (even if the change is small), and when a batch changes, or when multiple products are in the pipeline. Gas pipelines are almost always in transient conditions, because gases are very compressible. Even in liquid pipelines, transient effects cannot be disregarded most of the time. LDS should allow for detection of leaks for both conditions to provide leak detection during the entire operating time of the pipeline.

## Internally based LDS

Internally based systems use field instrumentation (e.g. for flow, pressure and fluid temperature) to monitor internal pipeline parameters which are used to detect possible leaks. System cost and complexity of internally based LDS are moderate because they use existing field instrumentation. This kind of LDS is used for standard safety requirements.

### Pressure/flow monitoring

A leak changes the hydraulics of the pipeline, and therefore changes the pressure or flow readings after some time. Local monitoring of pressure or flow at only one point can therefore provide simple leak detection. As it is done locally it requires in principle no telemetry. It is only useful in steady-state conditions, however, and its ability to deal with gas pipelines is limited.

### Acoustic pressure waves

The acoustic pressure wave method analyses the rarefaction waves produced when a leak occurs. When a pipeline wall breakdown occurs, fluid or gas escapes in the form of a high velocity jet. This produces negative pressure waves which propagate in both directions within the pipeline and can be detected and analyzed. The operating principles of the method are based on the very important characteristic of pressure waves to travel over long distances at the speed of sound guided by the pipeline walls. The amplitude of a pressure wave increases with the leak size. A complex mathematical algorithm analyzes data from pressure sensors and is able in a matter of seconds to point to the location of the leakage with accuracy less than 50 m (164 ft). Experimental data has shown the method's ability to detect leaks less than 3mm (0.1 inch) in diameter and operate with the lowest false alarm rate in the industry – less than 1 false alarm per year.
However, the method is unable to detect an ongoing leak after the initial event: after the pipeline wall breakdown (or rupture), the initial pressure waves subside and no subsequent pressure waves are generated. Therefore, if the system fails to detect the leak (for instance, because the pressure waves were masked by transient pressure waves caused by an operational event such as a change in pumping pressure or valve switching), the system will not detect the ongoing leak.

### Balancing methods

These methods base on the principle of conservation of mass. In the steady state, the mass flow ${\dot {M}}_{I}$ entering a leak-free pipeline will balance the mass flow ${\dot {M}}_{O}$ leaving it; any drop in mass leaving the pipeline (mass imbalance ${\dot {M}}_{I}-{\dot {M}}_{O}$) indicates a leak. Balancing methods measure ${\dot {M}}_{I}$ and ${\dot {M}}_{O}$ using flowmeters and finally compute the imbalance which is an estimate of the unknown, true leak flow. Comparing this imbalance (typically monitored over a number of periods) against a leak alarm threshold $\gamma$ generates an alarm if this monitored imbalance. Enhanced balancing methods additionally take into account the change rate of the mass inventory of the pipeline. Names that are used for enhanced line balancing techniques are volume balance, modified volume balance, and compensated mass balance.

### State-observer-based methods

These methods are based on state observers which are designed from fluid mathematical models expressed in state-space representation. These methods can be classified into two types: infinite-dimensional observers and finite-dimensional observers. The first type is based on a couple of quasi-linear hyperbolic partial differential equations: a momentum and a continuity equations that represent the fluid dynamics in a pipeline. The finite-dimensional observers are constructed from a lumped version of the momentum and a continuity equations. Several types of observers have been used for leak detection, for instance Kalman filters, high gain observers, sliding mode observers and Luenberger-type observers.

### Statistical methods

Statistical LDS use statistical methods (e.g. from the field of decision theory) to analyse pressure/flow at only one point or the imbalance in order to detect a leak. This leads to the opportunity to optimise the leak decision if some statistical assumptions hold. A common approach is the use of the hypothesis test procedure
    ${\text{Hypothesis }}H_{0}:{\text{ No leak}}$
    ${\text{Hypothesis }}H_{1}:{\text{ Leak}}$
This is a classical detection problem, and there are various solutions known from statistics.

### RTTM methods

RTTM means "Real-Time Transient Model". RTTM LDS use mathematical models of the flow within a pipeline using basic physical laws such as conservation of mass, conservation of momentum, and conservation of energy. RTTM methods can be seen as an enhancement of balancing methods as they additionally use the conservation principle of momentum and energy. An RTTM makes it possible to calculate mass flow, pressure, density and temperature at every point along the pipeline in real-time with the help of mathematical algorithms. RTTM LDS can easily model steady-state and transient flow in a pipeline. Using RTTM technology, leaks can be detected during steady-state and transient conditions. With proper functioning instrumentation, leak rates may be functionally estimated using available formulas.

### E-RTTM methods

E-RTTM stands for "Extended Real-Time Transient Model", using RTTM technology with statistical methods. So, leak detection is possible during steady-state and transient condition with high sensitivity, and false alarms will be avoided using statistical methods.
For the residual method, an RTTM module calculates estimates ${\hat {\dot {M}}}_{I}$, ${\hat {\dot {M}}}_{O}$ for MASS FLOW at inlet and outlet, respectively. This can be done using measurements for pressure and temperature at inlet ($p_{I}$, $T_{I}$) and outlet ($p_{O}$, $T_{O}$). These estimated mass flows are compared with the measured mass flows ${\dot {M}}_{I}$, ${\dot {M}}_{O}$, yielding the residuals $x={\dot {M}}_{I}-{\hat {\dot {M}}}_{I}$ and $y={\dot {M}}_{O}-{\hat {\dot {M}}}_{O}$. These residuals are close to zero if there is no leak; otherwise the residuals show a characteristic signature. In a next step, the residuals are subject of a leak signature analysis. This module analyses their temporal behaviour by extracting and comparing the leak signature with leak signatures in a database ("fingerprint"). Leak alarm is declared if the extracted leak signature matches the fingerprint.

## Externally based LDS

Externally based systems use local, dedicated sensors. Such LDS are highly sensitive and accurate, but system cost and complexity of installation are usually very high; applications are therefore limited to special high-risk areas, e.g. near rivers or nature-protection areas.

### Analytic thermal leak detector for above ground pipelines

Video analytics driven thermal imaging using uncooled microbolometer infrared sensors is emerging as a new and effective method of visualizing, detecting and generating alerts of unplanned surface emissions of liquids and hydrocarbon gas liquids. Detection to alarm generation takes less than 30 seconds. This technology is suitable for above-ground piping facilities, such as pump stations, refineries, storage sites, mines, chemical plants, water crossings, and water treatment plants. The need for new solutions in this area is driven by the fact that more than half of pipeline leaks occur at facilities.
High quality thermographic technology accurately measures and visualizes emissivity or infrared radiation (thermal heat) of objects into gray scale imagery without the need for ambient lighting. The monitored petroleum product (e.g. oil) is distinguished from background objects by this heat difference. The addition of an analytic software component, typically optimizable to better address a specific application or environment, enables automated onsite leak analysis, validation and reporting, thereby reducing reliance on man power. A leak appearing within an analytic region (a rule added to the camera) is immediately analyzed for its attributes, including thermal temperature, size, and behaviour (e.g. spraying, pooling, spilling). When a leak is determined to be valid based on set parameters, an alarm notification with leak video is generated and sent to a monitoring station.
Optimal detection distance varies and is influenced by camera lens size, resolution, field of view, thermal detection range and sensitivity, leak size, and other factors. The system's layers of filters and immunity to environmental elements, such as snow, ice, rain, fog and glare, contribute to false alarms reduction. The video monitoring architecture can be integrated onto existing leak detection and repair (LDAR) systems, including SCADA networks, as well as other surveillance systems.

### Digital oil leak detection cable

Digital sense cables consist of a braid of semi-permeable internal conductors protected by a permeable insulating moulded braid. An electrical signal is passed through the internal conductors and is monitored by an inbuilt microprocessor inside the cable connector. Escaping fluids pass through the external permeable braid and make contact with the internal semi-permeable conductors. This causes a change in the electrical properties of the cable that is detected by the microprocessor. The microprocessor can locate the fluid to within a 1-metre resolution along its length and provide an appropriate signal to monitoring systems or operators. The sense cables can be wrapped around pipelines, buried sub-surface with pipelines or installed as a pipe-in-pipe configuration.

### Infrared radiometric pipeline testing

Infrared thermographic pipeline testing has shown itself to be both accurate and efficient in detecting and locating subsurface pipeline leaks, voids caused by erosion, deteriorated pipeline insulation, and poor backfill. When a pipeline leak has allowed a fluid, such as water, to form a plume near a pipeline, the fluid has a thermal conductance different from the dry soil or backfill. This will be reflected in different surface temperature patterns above the leak location. A high-resolution infrared radiometer allows entire areas to be scanned and the resulting data to be displayed as pictures with areas of differing temperatures designated by differing grey tones on a black & white image or by various colours on a colour image. This system measures surface energy patterns only, but the patterns that are measured on the surface of the ground above a buried pipeline can help show where pipeline leaks and resulting erosion voids are forming; it detects problems as deep as 30 meters below the ground surface.

### Acoustic emission detectors

Escaping liquids create an acoustic signal as they pass through a hole in the pipe. Acoustic sensors affixed to the outside of the pipeline can create a baseline acoustic "fingerprint" of the line from the internal noise of the pipeline in its undamaged state. When a leak occurs, a resulting low-frequency acoustic signal is detected and analysed. Deviations from the baseline "fingerprint" signal an alarm. New sensors have improved frequency band selection, time delay range selection, etc. This makes the graphs more distinct and easy to analyse.
There are other ways to detect leakage, while reducing costs for exploratory excavation. Ground geo-phones with signal filtering are very useful to pinpoint leakage locations. An escaping pressurized water jet underground can create a faint noise which will be muffled on its way to the surface. Maximum signal can be picked up above the leakage position. Some types of gases escaping from a pipeline will create a range of sounds.
Apart from passive detection, active sonar-based methods for leak detection have been proposed, based on characteristic responses from multiphase bubbles and antibubbles.

### Vapour-sensing tubes

The vapour-sensing tube leak detection method involves the installation of a tube along the entire length of the pipeline. This tube – in cable form – is highly permeable to the substances to be detected in the particular application. If a leak occurs, the substances to be measured come into contact with the tube in the form of vapour, gas or dissolved in water. In the event of a leak, some of the leaking substance diffuses into the tube. After a certain period of time, the inside of the tube produces an accurate image of the substances surrounding the tube. In order to analyse the concentration distribution present in the sensor tube, a pump pushes the column of air in the tube past a detection unit at a constant speed. The detector unit at the end of the sensor tube is equipped with gas sensors. Every increase in gas concentration results in a pronounced "leak peak".

### Fibre-optic leak detection

At least two fibre-optic leak detection methods are being commercialized: Distributed Temperature Sensing (DTS) and Distributed Acoustic Sensing (DAS). The DTS method involves the installation of a fibre-optic cable along the length of pipeline being monitored. The substances to be measured come into contact with the cable when a leak occurs, changing the temperature of the cable and changing the reflection of the laser beam pulse, signalling a leak. The location is known by measuring the time delay between when the laser pulse was emitted and when the reflection is detected. This only works if the substance is at a temperature different from the ambient environment. In addition, the distributed fibre-optical temperature-sensing technique offers the possibility to measure temperature along the pipeline. Scanning the entire length of the fibre, the temperature profile along the fibre is determined, leading to leak detection.
The DAS method involves a similar installation of fiber-optic cable along the length of pipeline being monitored. Vibrations caused by a substance leaving the pipeline via a leak changes the reflection of the laser beam pulse, signaling a leak. The location is known by measuring the time delay between when the laser pulse was emitted and when the reflection is detected. This technique can also be combined with the Distributed Temperature Sensing method to provide a temperature profile of the pipeline.

### Pipeline flyovers

Flyovers of the pipeline are frequently carried out to either confirm the location or to detect and locate small releases that cannot be identified by other methods. Typically the flyover of the right of way is recorded by video, which may have some image filtering, such as thermal imaging. Larger spills will typically be identified by a "sheen" in wetland or an area of dead vegetation around the release location.
Flyovers are typically scheduled and not recommended as a primary leak-detection method. They may be used to rapidly confirm the presence and location of a leak.

### Biological leak detection

Biological methods of leak detection includes the use of dogs, which are more likely to be used once a release has been identified but not located due to its small size; or by landscapers who keep the pipeline right of way clear.
There are several companies who can provide dogs trained to identify the scent of release. Typically a technician injects a fluid into the pipeline that the scent dogs are trained to track. The dogs will then direct handlers towards a pipeline leak. They are trained to indicated at the strongest concentration therefore their pinpointing abilities can be typically within a meter. It typically takes 24 to 48 hours to mobilise a team, and may take several days to actually locate a release depending on the remoteness of the area.
Pipeline rights of way are kept clear by landscapers who are also trained to look for signs of pipeline releases. This is typically a scheduled process and should not be considered a primary form of leak detection.