Copyright 2015, Pipeline Simulation Interest Group This paper was prepared for presentation at the PSIG Annual Meeting held in New Orleans, Louisiana, 12 May – 15 May 2015. This paper was selected for presentation by the PSIG Board of Directors following review of information contained in an abstract submitted by the author(s). The material, as presented, does not necessarily reflect any position of the Pipeline Simulation Interest Group, its officers, or members. Papers presented at PSIG meetings are subject to publication review by Editorial Committees of the Pipeline Simulation Interest Group. Electronic reproduction, distribution, or storage of any part of this paper for commercial purposes without the written consent of PSIG is prohibited. Permission to reproduce in print is restricted to an abstract of not more than 300 words; illustrations may not be copied. The abstract must contain conspicuous acknowledgment of where and by whom the paper was presented. Write Librarian, Pipeline Simulation Interest Group, P.O. Box 22625, Houston, TX 77227, U.S.A., fax 01-713-586-5955.
Abstract
This paper examines the feasibility of Real Time Transient
Model (RTTM) based methods for gas pipeline leak detection,
elucidates the factors that must be managed for effective gas
pipeline leak detection, and examines factors that impact leak
detection and location sensitivity.
Introduction
A growing regulatory focus on minimizing the impacts of
ruptures in natural gas commodity pipelines is increasing the
pressure on the operators of such systems to provide means of
rapidly detecting and locating such leaks. Leak detection
systems have become standardized components of liquid
commodity pipelines over the last few decades, but have not
been emphasized for natural gas systems.
Although many methods have been used to detect leaks in
liquid systems, the most commonly used approach uses real
time transient models and a mass-balance approach to detect
commodity losses. The approach is extensible to gas systems in
a fairly straightforward manner, and this paper will discuss such
implementation. However, it is worth nothing that gas systems
have certain differences that make them distinct from liquid
pipeline systems. One difference is that gas pipelines,
especially if they are part of or support gas distribution, have
the potential to be far more highly networked, branched and
looped than liquid transportation systems. Gas is a far more
1 http://www.politico.com/story/2015/04/the-little-pipeline-
highly compressible commodity than most liquids are, and this
has ramification for desired levels of instrumentation and speed
of response. Finally, gas pipelines are more highly typified by
maintenance requirements that can interfere with or degrade the
performance of RTTM systems.
Another significant different between liquid and gas pipeline
leak detection requirements is that generally, in a liquid line, a
very large leak may be quickly identified by rate of change
alarms. In contrast, a large leak in a gas pipeline, because of
the compressibility of the gas, will cause much slower changes
in the pipeline pressure. A gas pipeline therefore, may need to
rely on an RTTM based leak detection system even for the
reliable and timely detection of very large leaks.
This paper attempts to illuminate these issues and equip the
reader to understand and deal with them.
Regulatory and Public Pressures
While pipelines are considered relatively safe methods of
transporting natural gas, there have been periodic catastrophic
leaks with loss of life and many smaller leaks. That fact,
combined with the aging gas pipeline infrastructure in many
parts of the country is increasing pressure on gas pipeline
operators to install leak detection systems on their pipelines.
After years of hearings and considerations, and in the wake of
the PG&E San Bruno leak in 2010, in 2013, the NTSB issued
the following recommendation to PHMSA:
Require that all operators of natural gas transmission and
distribution pipelines equip their supervisory control and
data acquisition systems with tools to assist in recognizing
and pinpointing the location of leaks, including line breaks;
such tools could include a real-time leak detection system
and appropriately spaced flow and pressure transmitters
along covered transmission lines.
On April 21, 2015, Politico published an article with the
caption, “Pipelines blow up and people die” 1. The lead
picture was taken from AP archives of the 2010 San Bruno
agency-that-couldnt-117147.html
PSIG 1504
RTTM Based Gas Pipeline Leak Detection: A Tutorial Ed Nicholas, Nicholas Simulation Services LLC, Philip Carpenter, Serrano Services, Morgan Henrie, MH Consulting Inc
2 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
leak with the caption, “A massive fire roars through a mostly
residential neighborhood following a natural gas pipeline
rupture that killed eight people and injured more than 60 on
Sept. 9, 2010, in San Bruno, California”. The story’s tag line
refers to PHMSA as “The little agency that couldn’t”.
Figure 1 – AP Photo of San Bruno Pipeline Leak1
Interestingly, President Obama, on the same day, proposed 3.5
billion dollars in federal funding as incentives to replace the
aging pipeline system.2
The Politico article included the graphic shown in Figure 4
illustrating the size and location of all gas and liquid pipeline
leaks from 2010 to 2015. The lead in caption was: Explosions,
leaks and spills. There’s more than one leak, failure or rupture
involving an oil or gas pipeline every day in the United States...
Figure 3, Figure 2, and Figure 5 are also taken from the Politco
article and show the deaths, injuries, causes, and costs
associated with pipeline leaks.
While the reporting in some cases may seem alarmist, it isn’t
the authors’ intent to comment on the tone of the reports. The
Politico report does seem to be well researched and makes some
compelling arguments that will resonate in a number of
quarters.
The headlines on April 15, 2015 of a number of papers reported
that PG&E had been fined 1.6 billion dollars as a result of
investigations arising from the 2010 San Bruno leak.
The public, regulatory, and state and federal government
attention and perceptions of hazards associated with natural gas
pipelines is growing. As a consequence, the authors anticipate
that the next 10 years will see increasing expectations for
pipeline companies address risk issues. A consequence of this
2 http://www.politico.com/story/2015/04/aging-gas-pipeline-
is likely to be an increasing pressure to install RTTM based leak
detection systems on natural gas pipelines.
Figure 2 –Causes of Pipeline Leaks1
Figure 3 –Deaths and Injuries1
overhaul-barack-obama-117191.html
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 3
Figure 4 –Incidents of Pipeline Leaks – 2010 – 20151
Figure 5 –Costs of Incidents: Damage and Penalties (Note reference to Penalties Collected – not Penalties Levied) 1
4 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
RTTM Based Leak Detection
Real Time Transient Model (RTTM) based leak detection is a
term used in API 1130 to describe leak detection using a
dynamic model of the pipeline system. In an RTTM approach
a real time model is used to represent the dynamic pipeline
hydraulics using some (or all) of the real time pipeline
measurements as inputs. The RTTM simulation of the pipeline
operation is then used to detect leaks by detecting anomalies
between the pipeline simulation and the measured data. RTTM
methods have historically been applied to liquid pipeline leak
detection and less so to gas pipelines. But, they are increasingly
being used to support leak and rupture detection in gas-phase
pipelines.
Figure 6 provides an overview of the real time processing cycle
of an RTTM based leak detection system. The cycle
components include:
1. Obtain a snapshot of real time data from SCADA
2. Pre-process the real time data with some validation testing
3. Update the RTTM state to the current data time.
4. Analyze the results of the RTTM simulation along with the
real time pipeline measurements to detect and pinpoint
leaks.
This cycle is repeated on a periodic basis (a few seconds to a
minute or two) as new data becomes available, updating the real
time model state and the leak detection analysis with each cycle.
Real Time Data from SCADA
Pressures
Temperatures
Fluid characteristics (perhaps)
Flow rates / volumes
Valve statuses
Engineering Data
Pipeline details
Thermal properties of pipeline surroundings
Fluid properties
RTTM Pipeline Simulation
Compute flows, pressures, temperatures
Track fluid properties through pipeline
Calculate heat loss/gain to/from pipeline surroundings
Slow, automatic adjustment of modeling parameters to
reduce inconsistencies within model or between
model and real time data
Real Time Data Inspection and Validation
Smoothing
Bad data rejection / compensation
Data substitution?
Data Correction?
Leak Detection Analysis
• Analyze raw and validated data and compare to RTTM
calculations
Hypothesis 1: Normal Operations
Hypothesis 2: Probable Leak
• Issue alarm if conditions for accepting leak hypothesis are met
Figure 6 – Overview of RTTM Based Leak Detection
API 1130 doesn’t specifically state how an RTTM system must
operate. However any effective real time transient model must
provide real time solution of the equations describing the
motion and state of the fluid in the pipeline including:
• Continuity (Conservation of Mass)
• Momentum (Newton’s second law)
• Equation of state
• Energy (including heat transfer to pipeline surroundings)
The RTTM’s representation of a pipeline’s real time state
expects that, in the absence of leak, mass is conserved in the
pipeline. Therefore, whether or not a specific vendor’s leak
detection algorithm explicitly is formulated in directly in terms
of conservation of mass, it is a fair generalization to state that
all RTTM based systems are based on the following premise:
In the absence of a leak, mass is conserved in the pipeline. An
RTTM allows one to realistically calculate mass in a pipeline
in real time. A leak can be detected by comparing the
observed rate of change of mass (computed by the RTTM) in a
section of pipeline with the observed mass flow rate into and
out of that section of pipeline.
Fundamental Assertion 1 – Detecting Leak Using
Conservation of Mass
It is much more common to work in volumetric units rather than
mass units on natural gas pipelines. In the US, the standard
volume unit is standard cubic feet (SCF) with flow rate as
standard cubic feet per hour (SCFH) or standard cubic feet per
day (SCFD). Standard conditions are typically considered to be
14.696 psia and 60 degrees F. Common abbreviations also
include MSCFH (thousands of standard cubic feet per hour) and
MMSCFH (millions of standard cubic feet per hour). The
typical SI volumetric unit is Normal m3 where Normal
conditions are a pressure of 101.325 kPa (1.013 bars) and
temperature either 0oC or 15oC.
One generally makes the implicit assumption that the principal
of conservation of mass can be replaced with an equivalent
statement of conservation of standard volume. Making this
assumption, one asserts the following:
In the absence of a leak, standard volume is conserved in the
pipeline. An RTTM allows one to realistically calculate
standard volume (line pack) of a pipeline in real time. A leak
can be detected by comparing the observed rate of change of
standard volume (computed by the RTTM) in a section of
pipeline with the observed standard volumetric flow rate into
and out of that section of pipeline.
Fundamental Assertion 2 – Detecting Leak by
Conservation of Standard Volume
We briefly discuss the validity of converting from the concept
of conservation of mass to conservation of standard volume in
an endnotei.
For the purposes of this paper, we define three fundamental
quantities:
Flow Balance (FB): The sum of all flows into a pipeline or
pipeline section minus all flows out of that pipeline or pipeline
section. This is expressed in standard volumetric flow rate units
(e.g. SCFH).
Packing Rate (PKR): The packing rate is the rate of change of
gas volume in the pipeline. This is expressed in standard
volumetric flow rate units (e.g. SCFH).6
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 5
Volume Balance (VB): The Volume Balance is the Flow
Balance minus the Packing Rate. This is expressed in standard
volumetric flow rate units (e.g. SCFH).
VB = FB - PKR
Equation 1: Definition of Volume Balance
In the absence of a leak, one expects the following:
VB = 0 � No Leak
Equation 2: Ideal No Leak Condition
And, in the event of a leak:
VB > 0 = Leak Size (after a little time)
Equation 3: Ideal Leak Condition
These equations are exactly correct under the following
conditions:
• All flows (other than the leak) into and out of the pipeline
section are accurately measured
• Packing rate of the pipeline section can be precisely
calculated by the RTTM.
Of course, neither of these conditions are fully met. There are
always errors in the measurements, limitations to the pipeline
modeling representation, and uncertainties in the physical
parameters and measurements driving the pipeline model. One
typically accounts for the errors in these basic quantities by
some form of thresholding. In the simplest formulation, we
state:
VB > Threshold � Leak
Equation 4: Leak Condition
VB < – Threshold � No Leak
Equation 5: No Leak Condition
-Threshold < VB < Threshold � Impossible to say
Equation 6: Non-Deterministic Condition
Some leak detection software vendors formulate their leak
detection logic precisely in these or equivalent terms. Others
have implemented methods that, while still based on these
principles, don’t specifically define a Flow Balance and
Packing Rate. However, they generally have some concept
equivalent to Volume Balance and some formulation similar to
the three equations above.
Note, however, that the NTSB recommendations propose that a
real time leak detection system be implemented that can assist
in recognizing and pinpointing leaks. Compared to detecting
leaks, pinpointing leaks is significantly more challenging. This
paper will address this particular challenge in more detail.
RTTM Dependency on Accurate Data and Modeling
The performance of an RTTM based leak detection system is
dependent upon the availability of accurate and timely real time
instrumentation and an accurate transient model of the pipeline
system.
All of the following influence the performance of the leak
detection system:
• The placement and accuracy of flow meters
• The placement and accuracy of pressure transmitters
• The placement and accuracy of temperature transmitters
• Real time valve positions
• Accuracy of real time measured or assumed inlet gas
properties
• Accuracy with which one can represent the thermal
properties of the pipeline surroundings including heat
capacity, density, thermal conductivity, and ground
temperature.
• Accuracy of physical pipeline description including pipe
diameters, wall thicknesses, lengths, valve locations, and
elevation profile and nominal roughness.
• The accuracy with which the pipeline model solves the
partial differential equations that describe the dynamic
state of the pipeline.
• The frequency of real time updates (i.e. SCADA scan rate)
and time skew between individual data points
• Resolution of real time data
Finally, the performance of the leak detection system depends
upon the effectiveness of the algorithms provided within a
specific implementation to deal with the uncertainties inherent
in the items listed above.
One may ask, “Aren’t all RTTM based systems basically the
same?” The answer is no. Each supplier must make decisions
about how to deal with the availability and accuracy of data.
Furthermore, there are different ways in which the available
data can be used as inputs to a real time model. This paper
attempts to clarify some of these issues.
Instrumenting a Pipeline for Real Time Leak Detection
A Pipeline Poorly Instrumented for Real Time Leak Detection
Figure 7 illustrates a pipeline poorly instrumented for real time
leak detection. Features that limit leak recognition and
pinpointing include the following:
1. Some supply or delivery flows are not metered in real time.
2. There are no inline flow meters allowing the pipeline to be
easily subdivided for leak detection monitoring.
3. There are long lengths of pipeline without any intermediate
pressure measurements.
4. There are no pressure measurements at some pipeline
6 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
branch points.
5. Few temperature measurements are available.
6. Valve positions are not available in real-time.
7. Supply gas compositions are poorly known.
From the perspective of RTTM based leak detection best
practices, it is an unfortunate reality that available
instrumentation on existing gas pipelines often resembles
Figure 7 more than the ideal (Figure 8) which we will discuss
next.
It is important to note that this doesn’t preclude obtaining
benefit from a RTTM based leak detection system. Some
monitoring is much better than no monitoring. However, the
quality, placement, and availability of real time instrumentation
will impact all of the following:
1. The sensitivity of the leak detection system
2. The time required to detect a leak or rupture
3. The ability of the system to reliably detect leaks without
issuing false alarms
4. The accuracy with which the leak or rupture can be pin-
pointed
A Pipeline Well Instrumented for Real Time Leak Detection
In contrast, Figure 8 shows an example of a pipeline well-
instrumented for real time leak detection. Key characteristics
are:
1. Every flow into and out of the system is metered and in
SCADA
2. Inline pipeline flow meters subdivide the larger pipeline
into smaller segments that can be independently monitored
for leaks
3. Pressure is available in real time at frequently spaced
intervals.
4. Pressure is available in real time at all pipeline branch
points.
5. Pressure is available in real time on each side of every
active device in the pipeline including valves, compressors,
and regulators (not shown)
6. The open fraction of every valve that can affect flow paths
in the pipeline is available in real time. Open fraction is
much more useful than simply open, closed, and in-transit
status.
7. Temperature is available in real time at frequently spaced
intervals and for all pipeline supplies and deliveries
8. Though not shown, the gas composition is available in real
time for all supplies unless essentially constant.
9. All real time data is updated by SCADA every few seconds
with high resolution and no deadbands.
Though rarely available, frequent measurement of ground
temperature at pipeline depth a few feet from the pipeline is
useful.
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 7
M1
FF1 P
T
PP1
T1
P3
Compressor
M4
F F4PPP5 P7
n1 n2 n3 n5 n7n0 n8
M3
n6
M5
FF4 P
TP10
T10
n10n9
PP13
n11
M6
n18
n19
Leg 1 Leg 2 Leg 3 Leg 4
Leg 5 Leg 6
Leg 10
Leg 11
M8
F F8PP16
n16 n17Leg 9
Valve 1
n13
Delivery not
metered in SCADA
Valve status not in
SCADA
Branching without pressure
transmitter nearby
Branching without pressure
transmitter nearby
Long pipeline length without
intermediate pressure
Minimal temperature
instrumentation
Delivery not
metered in SCADA
Figure 7 – Example of Pipeline Poorly Instrumented for Leak Detection
M1
FF1 P
T
P P
T
M2
FP1
T1
P2 P3
T3T T2
F2
Compressor
M4
F F4P
T
P
TP5
T5
P7
T7
n1
n2
n3 n4 n5 n7n0 n8
M3
F
F3
n6
M5
FF4 P
T
P
T
M7
FP10
T10
P14
T14
F7
n10
n14 n15
n9
PP13
TT13
n12
P P11
T T11
n11
V
M6
n20
n18
n19
PP18
TT18
PP19
TT19
Leg 1 Leg 2 Leg 3 Leg 4
Leg 5 Leg 6 Leg 8
Leg 10
Leg 11
M8
F F8P
TP16
T16
n16 n17Leg 9
FF6
Valve 1 V1
P P12
T T12
Leg 7
n13
• All supplies and deliveries metered and in real time
• Frequent pressure and temperature transmitters
• P & T at all branch points
• All valve positions that impact flow paths in SCADA
• Inline flow meters allow pipeline to be sub-divided for leak detection
Figure 8 – Example of Pipeline Well Instrumented for Leak Detection
8 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
RTTM Approaches (Modeling)
This section discusses approaches to using the available real
time pipeline instrumentation data as inputs to a transient model
which facilitates its use as a tool for detection leaks.
Figure 9 on the next page shows a sample pipeline and
instrumentation. Using this sample pipeline, we will discuss
some different ways with which the available data can be used
to model the pipeline in real time.
Note that we use some common pipeline modeling terms in this
figure. A Leg typically refers to a straight, non-branching
length of pipeline that is often modeled as a single entity. A
Node typically represents a connection point between pipeline
elements and in this drawing are numbered n1, n2 …
Unified Pipeline Model Approach
One approach, illustrated in Figure 10, we term the Unified
Pipeline Model approach. In this approach, none of the dimmed
measurements are used as boundary conditions by the real time
transient model. Instead, the pipeline is modeled as a unified
system using only the measurements that one could actually use
to control the real pipeline as inputs. Since one can’t control
intermediate pipeline pressures such as those at nodes n2, and
n6, these cannot be used as inputs in this modeling paradigm.
And, at the compressor, one has the option of only one of the
following:
1. Direct compressor (e.g. RPM) control
2. Suction pressure control
3. Discharge pressure control
4. Flow control
At supplies and deliveries, either flow or pressure can be
controlled, but not both.
The benefit of this approach is that it assures that flows will
balance throughout the pipeline model. Since the pipeline is
modeled as a unified whole, conservation of mass is imposed
throughout the modeled pipeline. This approach can be useful
for fluid property and scraper tracking.
Unfortunately, this approach to real time modeling is not very
well suited to a Volume Balance approach to leak detection.
However, there have been those who have created RTTM based
leak detection systems using this modeling approach by
examining differences between model computed pressures and
measured pressures and similarly between modeled flows and
measured flows at the points where these are not imposed as
boundary conditions.
Segmented Pipeline Model Approach
Another approach, illustrated in Figure 11, models the pipeline
as small networks bounded by the nearest pressure
measurements. We term this the Segmented Pipeline Model
approach. In this modeling paradigm, Leg 1 would be modeled
using P1 and P2 as upstream and downstream boundary
conditions. Assuming that flow is from left to right, T1 would
be imposed as an upstream temperature boundary condition.
Leg 2 would be modeled using P2, T2, and P3 as boundary
conditions and Legs 3 and 4 similarly.
Note that for the poorly instrumented pipeline example shown
in Figure 7, Legs 1, 2, 10, 11, 5 and 6 would have to be modeled
as a single sub-network as the nearest bounding pressure
measurements are at nodes n1, n3, n10, and n13.
The proponents of this modeling paradigm argue that from a
leak detection perspective, one will obtain the best estimate of
pipeline packing rate from a model that uses all available
pressures and temperatures as boundary conditions. They
would argue that this is the fundamental purpose of the model.
Then, since flow measurements can be used to compute the
flow balance, one then has the best possible representation of
Volume Balance to use as a leak detection signal.
Of course, in this approach, the flows will not balance across
nodes since each pressure bounded subnetwork is modeled as
an independent unit.
For the purposes of this paper, we will refer to the imbalances
across a node as the Node Flow Discrepancy. These values are
of use in leak location calculations. In addition, one can
demonstrate that for any section of the pipeline:
Volume Balance = Sum of Node Flow Discrepancies
Equation 7: Computing Volume Balance from Node Flow
Descrepancies
Note that we use the term Node a little loosely here. In fact,
being more precise, we really mean a one or more nodes that
are bounded by measured or modeled flows into and out of the
collection of nodes. For example, the Flow Discrepancy of the
collection of nodes n4 and n5 is computed from the flow of M2
(into n4) minus the flow at the n5 end of Leg 3 computed by the
RTTM. But for the sake of simplicity, we will continue to use
the term Node Flow Discrepancy in this looser sense where we
sometimes mean a collection of nodes rather than a single node.
It is worth noting that this method also allows for leak detection
to be performed for internal subsets or portions of the pipeline
system. This is possible because the sum of all of the
discrepancies for any subset of the pipeline system reflect the
volume balance of the portion of the pipeline as long as all of
node flow discrepancies for the target portion of the system are
included.
RTTM systems that use this approach typically use a secondary
approach to move fluid properties through the pipeline in a way
that conserves mass in the fluid tracking. There are at least two
different methodologies in use:
1. Run two models in parallel, one implemented using the
Unified Model approach that is responsible for fluid
movement. The second, implemented as a Segmented
Model is responsible for computing packing rate for the
leak detection calculations. Comparisons between the two
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 9
models can be used to adjust modeling parameters such as
pipe roughness.
2. A post-processing state estimation step. In this approach,
with each modeling pass through the pipeline, the state
estimator calculates a correction to every modeled and
measured flow that minimizes, for example, the sum of the
squares of the flow corrections after normalizing each
correction by the expected error inherent in that particular
flow. These corrections are constrained such that the
corrected flows balance across every node in the pipeline
system. These state estimated flows are then used to move
fluid properties through the pipeline system. The flow
corrections can also be used to adjust modeling parameters
such as pipe roughness.
Unified Pipeline Model with Extra Degrees of Freedom Approach
Figure 12 illustrates a third approach, which, for want of a better
term, we refer to as a Unified Model with Extra Degrees of
Freedom. Similar to the Unified Model, the pipeline is treated
as a whole. However, the constraint of mass balance across
every node is released and instead replaced by an artificial
delivery or supply at every node. And, instead of imposing any
of the pipeline pressures or flows directly as boundary
conditions to the model, the prior to imposing them as boundary
conditions, the software computes an adjustment to every flow
and pressure measurement. So, in the example of Figure 12, a
set of adjusted values F1’, F2’, F3’, P1’, P2’, P3’, P5’, P7’ are
computed and applied to the pipeline model along with five
artificial flows that can be into or out of the pipeline at nodes
n1, n2, n3, n5, and n7. In this approach, one computes the set
of measurement corrections using an optimization technique
that is designed to minimize a weighted sum of all of the
corrections (or corrections squared) while at the same time
attempting to reduce the magnitudes of the extra flows (e.g. by
minimizing a weighted sum of the squares of the extra flows).
The Extra Flows, are essential the Node Flow Discrepancies
described in the Segmented Model approach except that they
are computed after applying the corrections to the measured
pressures and flows.
The sum of the Extra Flows is in fact the volume balance that
remains after applying the computed corrections to the
pressures and flow meters. This sum is typically used as the
leak detection signal.
Note that this modeling approach does not ensure that fluid
properties move through the pipeline without some loss or gain
as fluid can be extracted or injected into the pipeline artificially
by the Extra Flows. Consequently some secondary state
estimation approach or secondary model may be required to
provide accurate fluid property tracking through the pipeline.
10 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
M1
FF1 P
T
P P
T
M2
FP1
T1
P2 P3
T3T T2
F2
Compressor
M3
F F3P
T
P
TP5
T5
P7
T7
n1 n2 n3 n4 n5 n7n0 n8
M4
F
F4
n6
Figure 9 – Sample Pipeline
M1
FF1 P
T
P P
T
M2
FP1
T1
P2 P3
T3T T2
F2
M3
F F3P
T
P
TP5
T5
P7
T7
n1 n2 n3 n4 n5 n7n0 n8
M4
F
F4
n6Leg 1 Leg 2 Leg 3 Leg 4
RPM
Compressor
Figure 10 – Unified Pipeline Model Approach
M1
FF1 P
T
P P
T
M2
FP1
T1
P2 P3
T3T T2
F2
Compressor
M3
F F3P
T
P
TP5
T5
P7
T7
n1 n2 n3 n4 n5 n7n0 n8
M4
F
F4
n6Leg 1 Leg 2 Leg 3 Leg 4
Figure 11 – Segmented Pipeline Model Approach
M1
FF1' P
T
P P
T
M2
FP1'
T1
P2' P3'
T3T T2
F2'
Compressor
M3
F F3'P
T
P
TP5'
T5
P7'
T7
n1 n2 n3 n4 n5 n7n0 n8
M4
F
F4'
n6Leg 1 Leg 2 Leg 3 Leg 4
Extra Flow 1 Extra Flow 2 Extra Flow 3 Extra Flow 5 Extra Flow 7
Figure 12 – Unified Pipeline Model with Extra Degrees of Freedom Approach
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 11
Gas Pipeline Response to a Leak
In this section, we illustrate how a pipeline will respond to a
leak under different flow rates. For gas pipelines, the flow rate
fundamentally affects the propagation of the leak event. We
will illustrate by example that the impact of the flow rate on the
propagation of pressure effects resulting from a leak is very
pronounced. However, before turning to the examples, it is
useful to discuss the differences between Liquid and Gas
Pipeline RTTM Systems.
Differences between Liquid and Gas Pipeline Systems
The RTTM approach described above is equally applicable to
liquid and gas phase commodity pipelines. Technically, the
only differences in application are the equations of state used
for the application and any related property differences. The
implementation of the conservation of mass, momentum and
energy equations should in principle be the same.
In practice, the actual implementations of the conservation
equations may be different between gas and liquid commodity
systems because the compressibility or other properties of the
gas may make it more useful to express the conservation
equations in a different form than that used for more
incompressible liquid commodity systems. In addition, certain
nonlinearities characteristic of liquid systems (in particular,
slack line flow, where both liquid and vapor components of the
fluid exist in equilibrium) do not have to be addressed in pure
gas-phase pipeline systems.
In terms of evaluating the response of the system to a leak or
rupture, we note the following:
1. Liquid commodities for pipelines operating in a tight (non-
slack) state are minimally compressible. Disturbances
created by the leak will propagate rapidly to nearby
instrumented locations and packing effects will be smaller.
Consequently, a liquid pipeline in a tight condition is more
tolerant of packing calculation errors and will respond
rapidly to the leak. These systems are also more tolerant of
somewhat lower instrumentation (especially pressure
measurement) densities
2. However, liquid pipelines in a slack condition are highly
compressible. Disturbances created by the leak will
propagate slowly to nearby instrumented locations and
packing effects will be very important. Therefore, a liquid
pipeline in a slack condition requires good modeling and
minimization of packing errors. The leak detection system
will respond slowly to the leak unless a high density of
instruments is provided.
3. Gas commodities are highly compressible. Disturbances
created by a rupture or leak will propagate more slowly to
nearby instrumented locations and packing effects will be
very important. The wave propagation speeds in gas
commodities are typically on the order of 30 to 40% of the
speeds in liquid commodities. Therefore, a natural gas
RTTM requires good real time modeling and minimization
of packing errors. It will respond slowly to the leak. Higher
instrumentation densities are preferred.
The consequences of these issues is explored for gas
commodity pipelines in the following sections.
Gas Pipeline Response to Leak - Examples
For these examples, we use the following simple pipeline case:
Diameter and length: 34 inch, 120 miles
Upstream control: Flow
Downstream control: Pressure
Leak location: Mile 60 (pipeline midpoint)
Leak sizes: 5 and 25 mmscfh
Pressure at Leak: 700 psi
Temperature at Leak: About 60 deg F
Pipeline Flow Rate: 0, 10, 25, and mmscfh
Elevation: Flat
Note that the 25 mmscfh leak is of the order of 100% of pipeline
flow rate. Examining a large leak allows us to clearly visualize
the pipeline behavior. For clarity and simplicity, the pipeline is
in steady state at leak onset and the only transients are those
generated by the leak. We examine leaks on initial flow rates
of 0, 10, 25, and 35 mmscfh.
In all cases, we have assumed that the upstream boundary flow
is controlled at the steady pipeline flow rate and that the
downstream pressure is controlled at the steady pipeline
pressure. For each different initial flow rate case, the
downstream pressure and upstream temperature were adjusted
so that the pressure at the leak site was 700 psi and 60 deg F to
maintain similarity between cases.
In the sections below we examine the pressure profiles that
would exist in the pipeline following a leak event:
25 mmscfh Leak on Zero Initial Flow
Figure 13 shows the pressure profile every 2 minutes for the
first 10 minutes following the onset of a 25 mmscfh leak. The
leak rapidly impacts the entire pipeline, with pressure effects
moving away from the leak site at the speed of sound and with
a noticeable wave front, at least in the first four minutes after
the leak onset at which time the effects have almost propagated
to the upstream and downstream pipeline end points.
Figure 14 is a companion plot to Figure 13. It shows the rate of
change of pressure (psia / min) profiles every two minutes for
the first 10 minutes after leak onset representing the rarefaction
wave propagating from the leak site. In this case, the rarefaction
wave is pronounced and persists even 8 minutes after leak
onset. Of hydraulic interest, illustrated in the 6 and 8 minute
profiles is the fact that reflection from a pressure boundary
(downstream) causes the wave to reverse polarity.
While this paper is not about rarefaction wave leak detection, it
is interesting to observe that such technology could possibly be
well suited for rupture detection on a gas pipeline with zero
12 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
flow rate. At higher flow rates the picture is less clear as we
will see.
25 mmscfh Leak on 10 mmscfh Initial Flow
Figure 15 shows the pressure profile every 2 minutes for the
first 10 minutes following the onset of a 25 mmscfh leak. Note
that the leak rapidly impacts the entire pipeline, with pressure
effects moving away from the leak site at the speed of sound
and with a slightly noticeable wave front 2 minutes after the
leak onset. However, the effects are significantly more
localized than in the 0 initial flow case with a greater pressure
drop near the leak site and significantly smaller pressure drops
at the upstream end. After 10 minutes, the pressure at the
upstream end has only dropped 3 psia compared to 11 psia for
the 0 initial flow case.
Figure 16 is a companion plot to Figure 15. It shows the rate of
change of pressure (psia / min) profiles every two minutes for
the first 10 minutes after leak onset. Note that the rarefaction
wave propagating from the leak site is much less pronounced
than in the 0 flow case. Note also, that the rarefaction wave has
much greater attenuation when moving upstream than when
moving downstream.
25 mmscfh Leak on 25 mmscfh Initial Flow
Figure 17 shows the pressure profile every 2 minutes for the
first 10 minutes following the onset of a 25 mmscfh leak.
Compared to the lower flow cases, the leak effects are far more
localized. After 10 minutes, the impact at the pipeline
endpoints, 60 miles away, is virtually zero. Even 40 miles way,
the effects are quite small.
Figure 18 is a companion plot to Figure 17. It shows the rate of
change of pressure (psia / min) profiles every two minutes for
the first 10 minutes after leak onset. Note that the rarefaction
wave is nearly invisible 30 miles from the leak site.
An Aside on Artificial vs Real Thermal Effects
It is interesting to observe the thermal effects in the pipeline
following a large leak as they influence both the real and the
RTTM behavior following a leak. Figure 19 shows what the
authors’ believe are a result of reasonable modeling of the
temperature profiles in the pipeline following a leak. In the
authors’ model, the ground surrounding the pipeline is modeled
as a series of 12 concentric shells of earth with transient
simulation of heat flow through these shells. In contrast, a
simplified RTTM may model the ground by a heat transfer
coefficient with no modeling of heating and cooling of the
pipeline surroundings. The latter approach, from the
perspective of fast transients and the near term effects after leak
onset, is nearly adiabatic in that little heat would be lost or
gained in the first 10 minutes following the leak. Figure 20
shows the temperature profiles following the leak assuming
adiabatic conditions.
There are significant differences between the two different
models. In the former, the temperature drop resulting from the
expansion of the gas is about 2 degrees and in the latter over 16
degrees. The RTTM pipeline simulation is very greatly
affected by the thermal modeling assumptions and, of course,
the knowledge of the thermal properties of the pipeline
surroundings.
Consequently, RTTM best practices require a transient thermal
model of the pipeline surroundings and that significant attention
is given to configuring and tuning this model to provide close
correspondence between observed and modeled temperature
profiles, especially during large pressure transients.
Figure 13 - Pressure Profiles Following 25 mmscfh Leak on 0 mmscfh Pipeline Flow
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 13
Figure 14 – dPdt (psi / min): 25 mmscfh Leak on 0 mmscfh Pipeline Flow
14 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
Figure 15 - Pressure Profiles: 25 mmscfh Leak on 10 mmscfh Pipeline Flow
Figure 16 – dPdt (psi / min): 25 mmscfh Leak on 10 mmscfh Pipeline Flow
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 15
Figure 17 - Pressure Profiles: 25 mmscfh Leak on 25 mmscfh Pipeline Flow
Figure 18 – dPdt (psi / min): 25 mmscfh Leak on 25 mmscfh Pipeline Flow
16 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
Figure 19 – Temperature Profiles following 25 mmscfh Leak on 25 mmscfh Pipeline Flow (transient thermal modeling of
ground)
Figure 20 – Temperature Profiles following 25 mmscfh Leak on 25 mmscfh Pipeline Flow (adiabatic assumption – similar to
simple heat loss coefficient model)
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 17
The Leak Signal and Impact of Pressure Transmitter Spacing
Having examined some aspects of leak propagation through a
simple pipeline in the preceding section, we now consider how
this same leaks on the same pipeline could be detected at the
nearest pressure measurements bounding the leak site under
ideal conditions. By ideal conditions, we mean all of the
following:
1. Very accurate measurement of pipeline pressures,
temperatures, and flows.
2. Very accurate knowledge of fluid properties.
3. Availability of all measurement data in real time (as
quickly as we want it).
4. Very accurate knowledge of thermal properties of
pipeline surroundings (thermal conductivity, density,
specific heat, and ambient temperature).
5. Perfect RTTM solution of equations describing
transient pipeline state.
The one departure from ideality that we assume in this section
is the discrete spacing of pipeline pressure measurements. In
particular, we examine how the spacing of pressure
measurements, which are typically much more closely spaced
than flow measurements, impact the RTTM detection of
pipeline leaks.
We will illustrate that the leak signals observed by an RTTM
are greatly influenced by the distance between the leak site and
the pressure transmitters bounding the leak and also on the
underlying pipeline flow rate.
In this section, we consider a leak midway between the nearest
bounding pressure transmitters and vary the transmitter spacing
to explore the ability of an RTTM to detect a leak.
Prior to examine the results of simulations, we pose
Fundamental Assertion 3.
Generally, an RTTM, having no prior knowledge of the leak
event, does not model the leak behavior between bounding
pressure measurements. Instead, it reacts to the changes
observed at the pressure measurements bounding a leak.
Fundamental Assertion 3
The RTTM cannot actual observe the onset of a leak unless
there is a pressure measurement precisely located at the leak
site. Instead, the RTTM observes the impact of the leak at the
pressures measurements most closely bounding the leak. In
fact, the leak causes a wave to travel upstream and downstream.
However, the RTTM, having only pressures at discrete
locations sees the leak as a perturbation at the measurement
location. And, since most RTTMs impose observed pressures
as boundary conditions on the sections of the pipeline bounded
by the pressure measurement, the model reacts by sending a
wave both outward (away from the leak site) and inward
(towards the leak site). Given the ideal conditions we are
assuming here, the outwardly moving wave perfectly represents
the true transient in the pipeline. However, the inwardly moving
wave is a false transient that is introduced by the fact that the
RTTM is initially is unaware of the fact that it was caused by a
leak.
Over time, the discrepancy between the model assumptions (no
leak) and the real pipeline condition (leak present) will result in
a signal that may be identified by the RTTM as a leak. The
artificial wave-fronts associated with the leak onset decay over
time. But in the short term, the artificially induced inwardly
moving wave-front is observable when pressure measurements
are closely spaced or the flow rate is very low compared to leak
size.
The Leak Signal
Most RTTM methodologies result in a signal that represents the
volume imbalance caused by a leak.
Given accurate measurements, accurate knowledge of the
pipeline and it surroundings, and an accurate RTTM, the
observed volume imbalance resulting from a leak can be
computed as the sum of the node flow discrepancies at the
pressures measurements bounding the leak. Over time, the
observed volume balance approaches the actual leak size.
Fundamental Assertion 4
We will not attempt to prove the assertion above but it is a
consequence of the fact that, in the ideal world, the pipeline
would be model perfectly except in the subnetwork bounded by
the nearest pressure measurements spanning the leak site.
Note, however, that for the Unified Modeling Approach with
Extra Degrees of Freedom, Fundamental Assertion 4 will be
violated as the a priori correction of measured flows and
pressures will force some distribution of the leak signal
upstream and downstream of the nodes bounding the leak.
If the leak is in a straight section of pipeline, the observed
volume imbalance is the sum of the node flow discrepancy at
the upstream end of the leg spanning the leak and the node flow
discrepancy at the downstream end of that leg.
For example, for the sample pipeline of Figure 11, if the leak
were in Leg 2, the volume balance would be equal to the sum
of the node flow discrepancies at nodes 2 and 3. The node flow
discrepancy at Node 2 would be computed as the flow in Leg 1
into node 2 minus the flow in Leg 2 leaving node 2. Similarly,
the node flow discrepancy at node 3 would be the flow in Leg
2 into node 3 minus the flow F2 (meter 2) leaving node 3.
For the less well instrumented pipeline of Figure 7, the volume
imbalance caused by a leak in Legs 1, 2, 5, 6, 10, or 11 is
observed as the sum of the node flow imbalances at nodes 1, 3
10 and 13.
18 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
One can consider each of the node flow discrepancies at the
pressure measurements bounding the leak as part of the leak
signal. However, the total volume imbalance is the sum of these
and therefore in this section we will consider the observed
volume imbalance (sum of the upstream and downstream node
flow discrepancies) as the leak signal. The volume imbalance
signal does not immediately appear as a volume imbalance of
the size of the leak. But over a period of time, dependent upon
the distance between the leak site and the bounding pressures,
the volume imbalance will approach the leak size.
Observations from Different Measurement Spacing
Figure 21 shows the volume imbalance signals observed from
a 5 mmscfh leak imposed on an initial steady flow of 25
mmscfh. As one would expect the leak is not observed at the
bounding pressure measurements until enough time has elapsed
for a sound wave to travel from the leak to the nearest pressure
measurement.
From Figure 14 we can calculate the observed speed of sound
to be 1196 ft/s as the rarefaction wave associated with leak
onset propagates 82 miles in 6 minutes (60 miles to the end and
back another 22 miles).
In this case, since the leak is midway between measurements,
we expect the following delays before the leak will be observed
at the following distances from leak to measurement (half of the
measurement spacing):
Distance from
Measurement
Speed of Sound
Time Delay
2 Miles 4.5 seconds
4 Miles 18 seconds
8 Miles 35 seconds
12 Miles 52 seconds
16 Miles 70 seconds
20 Miles 98 seconds
Table 1 - Speed of Sound Delays on Leak Signal Onset
Figure 21 exhibits this delay. However, one notes that only the
initial onset of the leak is observed in this time. Considering
the rise time to be the time to rise to 1 – 1 / e (63.2%) of the leak
size (similar to a capacitor charging through a resistor), we
compute the following rise times at different distances from
leak to measurement as:
Distance from
Measurement
Leak Signal Rise
Time
2 Miles 4 seconds
4 Miles 4 seconds
8 Miles 19 seconds
12 Miles 74 seconds
16 Miles 154 seconds
20 Miles 256 seconds
Table 2 – Leak Signal Rise Times – 5 mmscfh Leak on 25
mmscfh Flow
Adding the speed of sound delay and the rise times together,
one observes that it takes nearly six minutes for 63.2% of this
leak t to be observed in the volume imbalances obtained from
the two bounding pressure measurements 20 miles upstream
and downstream. One may also note the following:
• For measurement spacing’s of 4 and 8 miles, there is a
noticeable artificial “wave” in the leak signal that dies out
in less than two minutes. This artificial wave is due to the
model assuming that the pressure transient originates at the
measurement site whereas it originates at the leak site.
• The signal rise time increases with increasing instrument
spacing at a rate that is more closely proportional to the
square of the instrument spacing than to linear.
Figure 22 shows the volume imbalance signals observed from
a 25 mmscfh leak imposed on an initial steady flow of 25
mmscfh. Comparing this very large leak to the more moderate
5 mmscfh leak, we observe that the leak signals observed from
the 25 mmscfh leak are very similar to those observed from the
5 mmscfh leak when one adjusts for the leak magnitude
differences except for the following:
• The artificial wave observed in the 4 and 8 mile spacing’s
is a little less pronounced
• The leak signal rise times are a little longer
Figure 23 shows a 25 mmscfh signal but this time imposed on
a 35 mmscfh initial flow rate. The signal is very similar to
Figure 22 but again, with the artificial wave a little less
pronounced and the leak signal rise times even longer. In this
case, it takes about 8 minutes for the 63.2% of the leak to be
observed in the volume imbalances obtained from two pressure
measurements 20 miles upstream and downstream.
Large, Persistent Artificial Waves at Low Flow
Rates
We know turn to Figure 24 and see a very different behavior.
This figure shows the leak signal from a 25 mmscfh leak when
the initial pipeline flow is 0. In this case we observe the
following:
• The rise time of the leak signal is nearly instantaneous once
the signal, moving at the speed of sound, reaches the
bounding pressure measurements.
• The artificial waves induced by the assumption that the
signal originates at the pressure measurements rather than
at the midpoint between the pressure measurements is
pronounced, even at 32 mile pressure measurement spacing
and endures for more than 10 minutes.
The primary attenuation mechanism is friction. Since frictional
losses are proportional to the square of the velocity, we would
anticipate that they would be substantially less in the event of a
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 19
much smaller leak. Therefore, for small leaks on a static
pipeline, one might observe artificial waves persisting for a
much longer time, even with more widely spaced pressure
transmitters. In short, the artificial transient is not a result of
the large leak size.
Can One Suppress the Artificial Waves?
While having not tested this hypothesis, we believe that the
artificial waves can be substantially suppressed by imposing a
filter on the measured pressures. Rapidly changing pressures
result in the high magnitude waves that reflect back and forth
between the ends of the subnetwork spanning the leak site.
Therefore, if one imposes a digital filter on the input data, prior
to feeding it to the model, whose cut-off frequency’s
wavelength is somewhat greater than the length of the longest
length between the bounding pressure measurements, one
would expect that it the artificial waves would be eliminated
since the frequencies remaining in the input data would be too
low to generate an artificial wave in the subnetwork. On the
other hand, this would substantially impact the speed of
response of the pipeline to real transients. Still, this is likely the
best approach though further evaluation and testing would be
appropriate.
Under this proposal, for measurements spaced 20 miles apart, a
filter with a cutoff frequency of 0.01 HZ or lower would be
appropriate.
20 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
Figure 21 – Observed Volume Imbalance Dependence on Pressure Spacing – 5 mmscfh Leak on 25 mmscfh initial flow
Figure 22 – Observed Volume Imbalance Dependence on Pressure Spacing – 25 mmscfh Leak on 25 mmscfh initial flow
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 21
Figure 23 – Observed Volume Imbalance Dependence on Pressure Spacing – 25 mmscfh Leak on 35 mmscfh initial flow
Figure 24 – Observed Volume Imbalance Dependence on Pressure Spacing – 25 mmscfh Leak on 0 mmscfh initial flow
22 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
Estimating Leak Location
An RTTM can assist in pinpointing the location of a leak on the
pipeline. In this section we discuss, from moving from the most
gross to the most precise approach, the three levels of location
capability that can be provided
Bracketing Leaks using Bounding Flow Meters
An RTTM based leak detection system can usually reliably
locate a leak between the nearest bounding flow meters. This
is because the system relies on identifying imbalances in the
system that violate the law of mass conservation. In-line flow
meters provide firm boundaries between which these
calculations can be performed. Therefore, in-line flow meters
can be useful for segmenting the pipeline into “leak detection
sections” that allow one to localize a leak to one of the sections.
Note however, this is reliable only when the leak size is large
compared to the total uncertainty inherent in all flows entering
or leaving the subnetwork.
Bracketing Leak using Local Flow Discrepancies
As we discussed previously, in the ideal (perfect model and
perfect and timely data), the only flow discrepancies would be
at nodes bounding the pipeline leg or subnetwork spanning the
leak site. In the extreme, for a leak immediately upstream or
downstream of a node, the only flow discrepancy that will be
observed is at that node adjoining the leak.
Therefore, an RTTM can further localize a leak by examining
every pipeline subnetwork bounded by pressure measurements.
If there is a leak in the pipeline, it can be localized to the
pipeline subnetwork for which the sum of the bounding node
flow discrepancies is largest. Note however, that a variety of
errors can influence the node flow discrepancies. Therefore,
this is only reliable when the leak size is large compared to the
errors inherent in the flow discrepancies.
Also, note that a leak near a pressure measurement will cause a
flow discrepancy primarily at that node. Therefore, for a leak
near a pressure measurement, it is often difficult to determine
whether the leak is upstream or downstream of that
measurement.
Pinpointing Leak by Detecting the Time at which the Leak Signal Arrives at the Bounding Pressure Measurements
By detecting the precise times at which the node flow
discrepancies bounding a leak detect the leak onset, one might
be able to localize the leak based on the different arrival times
of the leak signal at the bounding nodes. This could be very
accurate if instrumentation is closely spaced, the data
acquisition rates are very fast, and the leak is large enough to
generate a rarefaction front that is detectable using pipeline
pressure transmitters. It is rare that all of these conditions are
met. Therefore, while this is an interesting area for further
investigation, we will not consider it further in this discussion.
Pinpointing Leaks using Flow Discrepancies
If the RTTM has been successful in localizing a leak to a
pipeline subnetwork bounded by pressure measurement, the
RTTM may be able to pinpoint a leak within the subnetwork
more precisely by examining the magnitudes of the node flow
discrepancies bounding the leak.
The node flow discrepancies are good detectors of the “kinks”
in the pressure gradient that are caused by a leak.
First, we examine the pressure profiles observed by an RTTM
and compare those to the true pressure profile in a pipeline for
the case of a 25 mmscfh leak imposed on an initial steady
pipeline flow of 10 mmscfh for the sample 120 mile pipeline
we have used in previous sections.
Figure 25 shows the “true” pressure profiles (those generated
by a simulation of the pipeline following a leak) immediately
prior to leak onset and at 2, 6, and 10 minutes after leak onset.
As one would expect, there is a “kink” in the pressure profile at
the leak site.
Figure 26 shows the pressure profiles computed by the RTTM
with pressure measurements spaced every 4 miles and the leak
midway between the measurements. Unlike the true profile, the
kinks are observed at the nearest pressure measurement sites:
mile 58 and mile 62.
Figure 27 the pressure profiles computed by the RTTM with
pressure measurements spaced every 24 miles and the leak
midway between the measurements. The kinks in the pressure
profiles are observed at the nearest pressure measurement sites:
mile 48 and mile 72.
The task of the RTTM is to detect these kinks, and to use them
to estimate the true leak location located somewhere between
the bounding nodes.
The node flow discrepancies embody all of the knowledge
about the inconsistencies in the pressure profiles at the
bounding nodes, they become the natural candidate for
pinpointing the pipeline leak.
The classical approach to pinpointing leaks in liquid pipelines
assumes that there is an upstream and downstream pressure
measurement bounding the leak and that the pipe does not
branch between the measurements. In this case, one can
demonstrate that for leak flow rates that are small compared to
the pipeline flow rate, the following is true for incompressible
fluids:
dn
up dn
FDFractionalLocation
FD FD=
+
Equation 8 – Classical Fractional Leak Location Equation
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 23
where FractionalLocation is the leak location expressed as a
fraction of the length between the upstream and downstream
bounding nodes, upFD is the flow discrepancy at the upstream
node and dnFD is the flow discrepancy at the downstream
node. When the leak is at the upstream node, all of the flow
discrepancy would be at the upstream node so 0dnFD = and
FractionalLocation is zero as one would expect. On the other
hand, if the leak is at the downstream node, all of the flow
discrepancy is there and the fractional location computed by
this equation is 1.
So, this equation meets the reasonability test and one would
expect this equation to represent the limit cases equally well on
a gas pipeline.
But, the derivation of Equation 8 (which we will not address in
this paper) makes a number of assumptions that are not
necessarily valid for gas pipelines. We demonstrate the
limitation of this equation for gas pipelines through RTTM
simulation examples.
Since it will turn out that Equation 8 does not very well for gas
pipelines, from this point forward, we will refer to this simply
as the Leak Proximity Signal.
dn
up dn
FDProximitySignal
FD FD=
+
Equation 9 – Definition of Leak Proximity Signal
Turning again to the example 120 mile pipeline of our previous
examples, we compute the proximity signal for various cases.
Figure 28 Figure 29 and Figure 30 show the leak proximity
signal observed for a leak of 25 mmscfh imposed on initial
steady flow rates of 0, 10, and 25 mmscfh respectively for a
pressure measurement spacing of 36 miles. In each case, we
compute the signals observed for a leak at mile 60 located at
different fractional locations between the upstream and
downstream pressure measurements. To do this, we varied the
upstream and downstream pressure measurement locations,
keeping the spacing at 36 miles but changing the proximity of
the measurements to the leak site. For these 4 different
fractional locations, the measurement locations are shown in
Table 3 below.
True Leak Location
Fraction
Upstream
Node MP
Downstream
Node MP
0.25 51 87
0.50 44 78
0.75 33 69
1 24 60
Table 3 – Measurement Locations for Different Location
Fractions – 36 mile Pressure Spacing
We note the following:
• The leak proximity signal does not reliably pinpoint the
leak. For example, for the 0.25 true fractional location, 15
minutes after leak onset, it has the values of 0.36, 0.52, and
0.30 for the three different cases.
• In the 0 initial flow case, in the early period following the
leak, we see a pronounced influence of the artificial wave
noted in previous sections
• In the 0 initial flow case, in the early period following the
leak, we see a pronounced influence of the artificial wave
noted in previous sections
• It takes several minutes for the proximity signal to
approach its end value in the second and third cases.
• In the 0 flow case, the proximity signal for the 0.5
fractional leak location is drifting downwards even after 15
minutes. We presume this is because the flow rate in the
pipeline is adjusting to the new conditions and the value of
the proximity signal is affected by the pipeline flow.
Figure 31 shows the leak proximity signal for the 0 initial flow
case with an 8 mile measurement spacing. Comparing this to
Figure 28, we observe the following:
• With the 8 mile spacing, the leak proximity signal shows
more influence of the artificial wave within the Leg
spanning the leak discussed earlier.
• The downward trend of the proximity signal associated
with the 0.5 leak location fraction is more pronounced with
the 8 mile spacing than with the 36 mile spacing.
• Otherwise, the two figures are similar.
Figure 32 and Figure 33 show the underlying node flow
discrepancies from which the proximity signal was calculated
for the 8 mile measurement spacing for two of the cases, the
0.25 and the 0.5 fractional leak locations.
Most interesting is the 0.5 case. From it we note the following:
• While the leak proximity signal of Figure 31 seemed fixed
at 0.5 for the first several minutes following the leak onset,
this is only because the impact of the artificial waves were
observed at both the upstream and downstream end at
precisely the same time. In fact, both node flow
discrepancies were oscillating for several minutes.
• At about 9 minutes into the leak, the upstream and
downstream node flow discrepancies begin to diverge from
each other. This time corresponds to the time for the leak
to event to propagate to the pipeline endpoints and back to
the pressure measurements. At this time, the pipeline
begins to stabilize to a different flow and the proximity
signal changes value.
The Difficulty of Pinpointing a Leak in Pipelines with Cross-overs or Branches
All of the discussion and investigation above about the leak
proximity signals has focused on the case in which the leak is
24 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
in an unbranching pipe bounded by an upstream and
downstream pressure measurement. If there are branch points
or cross-overs that are not bounded by pressure measurements,
pinpointing a leak to the proper leg or branch of the subnetwork
spanning the leak can be very difficult. This is not a problem
for which there is an easy resolution. Therefore, if pinpointing
leak location is desired, it is necessary to provide pressure
measurements at all pipeline branch points.
Is there a Better Leak Proximity Signal?
We have demonstrated the dependence of the proximity signal
on pipeline flow rates. And, since pipelines are rarely in steady
state, one can expect that the proximity signal will shift
throughout a leak event simple due to normal transients
propagating through the pipeline. The leak proximity signal
therefore provides only a rough estimate of leak location.
Therefore, even in the ideal case of excellent and accurate data
and modeling, the proximity signal will have inherent errors.
One way to reduce these errors is to provide more closely
spaced pressure measurements. While the error inherent in the
proximity signal will not be reduced, the error in the estimated
leak location will be reduced proportional to the reduction in
measurement spacing.
Another approach that would likely work well would be to
perform a number of RTTM simulations once a leak is detected,
imposing the leak at various locations and times and iterating to
a leak location and time that best explains the observed flow
discrepancy trends. However, to the authors’ knowledge, this
type of capability is not available in any current leak detection
system. We assert the following:
Pinpointing even a very large leak to a precise milepost in a
gas system is difficult. Without a somewhat more
sophisticated approach than that offered by Equation 8 we
expect that one may be only be able to reliably locate a leak to
perhaps 30% of the distance between bounding pressures.
Until RTTM systems offer a more advanced leak location
estimation approach, precise location estimation may require
more closely spaced pressure transmitters.
Fundamental Assertion 5
The Influence of Real Pipeline Conditions on Leak Location Estimation
One should be aware of the fact that pinpointing a leak is far
more difficult than detecting a leak. While detection relies on
detecting the loss of gas in the pipeline, locating a leak requires
detecting the discrepancy in the pressure gradient caused by a
leak. The node flow discrepancies are affected by every factor
that can influence the pressure gradient. Therefore,
uncertainties in any of the following can result in errors in the
RTTM computed node flow discrepancies:
1. Pressure measurements
2. Temperature measurements and thermal properties of
pipeline surroundings
3. Pipeline roughness
4. Unmetered supplies or deliveries
5. Time skew in the data
6. Fluid properties (gas composition)
7. Elevation profile
8. And more…
We therefore assert the following:
Pinpointing a leak to the nearest pressure measurement or the
pipeline subnetwork bounded by pressure measurements is
only possible if the leak size is somewhat larger than the
uncertainties in the flow discrepancies, not just in the vicinity
of the leak, but anywhere in the leak detection section bounded
by flow meters.
Fundamental Assertion 6
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 25
Figure 25 – “True Pressure Profiles”: 25 mmscfh Leak on 10 mmscfh Pipeline Flow
Figure 26 - RTTM Computed Pressure Profiles: Leak at Midpoint between Pressure Transmitters with 4 Mile Spacing
Figure 27 - RTTM Computed Pressure Profiles: Leak at Midpoint between Pressure Transmitters with 24 Mile Spacing
26 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
Figure 28 – Leak Proximity Signals for Leaks at 0.25, 0.5, 0.75, and 1 Fractional Locations: 25 mmscfh Leak on 0 mmscfh
Initial Flow, 36 Mile Pressure Spacing
Figure 29 – Leak Proximity Signals for Leaks at 0.25, 0.5, 0.75, and 1 Fractional Locations: 25 mmscfh Leak on 10 mmscfh
Initial Flow, 36 Mile Pressure Spacing
Figure 30 – Leak Proximity Signals for Leaks at 0.25, 0.5, 0.75, and 1 Fractional Locations: 25 mmscfh Leak on 25 mmscfh
Initial Flow, 36 Mile Pressure Spacing
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 27
Figure 31 – Leak Proximity Signals for Leaks at 0.25, 0.5, 0.75, and 1 Fractional Locations: 25 mmscfh Leak on 0 mmscfh
Initial Flow, 8 Mile Pressure Spacing
Figure 32 – Left and Right Node Flow Discrepancies for 25 mmscfh Leak at 0.25 Fractional Location between PTs spaced 8
Miles Apart: 0 mmscfh Pre-Leak Flow Rate
Figure 33 – Left and Right Node Flow Discrepancies for 25 mmscfh Leak at 0.25 Fractional Location between PTs spaced 8
Miles Apart: 0 mmscfh Pre-Leak Flow Rate
28 Ed Nicholas, Philip Carpenter, Morgan Henrie PSIG 1504
Complications of Real Pipeline Conditions
Unmetered Supply or Delivery Flows
Older gas pipelines often have a significant number and volume
of flows into or out of the pipeline that are not metered in real
time. This poses a particularly difficult problem for pipeline
leak detection as a leak is essentially just an unmetered flow
from the pipeline. The uncertainty in the total unmetered flow
into or out of the pipeline directly affects the obtainable
sensitivity of a leak detection system. Certainly, to the extent
that the unmetered flows are constant or slowly changing, one
may be able to compensate somewhat for them by detecting the
change in Volume Balance from some previous value
considered “normal”. But, this is a poor substitute for accurate
flow measurements. Leak detection best practice would ensure
that all flows into and out of the pipeline are metered.
Dealing with Pipeline Conditions Inconsistent with RTTM Pipeline Representation
When one configures an RTTM, it is difficult to anticipate all
possible contingencies that might occur during pipeline
operations. For example, taking a portion of the pipeline that is
modeled by the RTTM temporarily out-of-service for
maintenance poses difficulties for the RTTM. In order
accommodate these types of operations, RTTM solutions will
need to provide more flexibility to allow pipeline engineers to
take portions of the RTTM leak detection out of service while
the RTTM is running without impacting the leak detection on
other portions of the pipeline.
The authors anticipate that RTTM providers will have to
enhance their products to deal with these types of issues.
The “Art” of Leak Detection
This paper has focused on the “science” of leak detection.
However, an effective RTTM must deal with the following real
world conditions:
1. Data points offline
2. Errors in measurements
3. Uncertain valve statuses
4. Time skew in data
5. Uncertainties fluid properties
6. Uncertainties in ground thermal properties and ground
temperatures
7. “Noisy” pipeline pressures and flows
8. And on and on…
The effectiveness of an RTTM is dependent on the skill at
which the RTTM developer deals with these issues. But, that is
a topic for another paper…
Conclusions
Feasibility of Applying RTTM Technology to Gas Pipelines
RTTM based gas pipeline leak detection can be a very effective
method for detecting and locating large and small leaks on a gas
pipeline system. However, there are challenges that are not
experienced on liquid pipelines. Dealing with some of these
optimally may require R&D on the part of RTTM suppliers.
Importance of Pipeline Instrumentation
Unfortunately, many gas pipelines are not well instrumented for
leak detection. This limits both the leak detection sensitivity
and leak pinpointing capabilities of an RTTM. The RTTM still
provides benefit in this case but not to the extent that is possible.
The paper has demonstrated that RTTM leak detection and
location performance is dependent upon the accuracy, spacing,
and completeness of pipeline instrumentation. Due to the
compressibility of the gas, and the slow rate at which a leak
signal may propagate to distant measurements, the spacing of
pipeline pressures is more critical in gas pipelines than in liquid
pipelines. This is especially true due to the fact that reliable and
rapid rupture detection in a gas pipeline may rely on the RTTM
in ways that a liquid pipeline does not.
We restate here the characteristics of a gas pipeline well
instrumented for leak detection:
1. Every flow into and out of the system is metered and in
SCADA
2. Inline pipeline flow meters subdivide the larger pipeline
into smaller segments that can be independently monitored
for leaks
3. Pressure is available in real time at frequently spaced
intervals.
4. Pressure is available in real time at all pipeline branch
points.
5. Pressure is available in real time on each side of every
active device in the pipeline including valves, compressors,
and regulators
6. The open fraction of every valve that can affect flow paths
in the pipeline is available in real time. Open fraction is
much more useful than simply open, closed, and in-transit
status.
7. Temperature is available in real time at frequently spaced
intervals and for all pipeline supplies and deliveries
8. The gas composition is available in real time for all
supplies unless essentially constant.
9. All real time data is updated by SCADA every few seconds
with high resolution and no deadbands.
10. Good knowledge of ground temperature – preferably
measured.
11. All measurement inputs are accurate, reliable, and have
high resolution
PSIG 1504 RTTM Based Gas Pipeline Leak Detection: A Tutorial 29
Importance of Attention to Detail in RTTM Modeling
The compressibility inherent in gas pipelines results in large
and persistent transients in gas pipelines. These imposed much
higher demands on modeling fidelity than do liquid pipelines.
The only representation of the pipeline packing rate comes from
the RTTM, and the packing rate can be very large, requiring
that the RTTM be very accurate. Accuracy of the RTTM
requires attention to detail in many areas including:
1. Thermal modeling of the fluid as well as the pipeline
surroundings
2. An accurate equation of state (e.g. AGA8)
3. Appropriate filtering of input data prior to using it as inputs
to the pipeline model
4. Accurate solution of the differential equations describing
the dynamic state of the pipeline. Approximations and
simplifications that may have worked well for liquid
pipelines may not be appropriate in gas pipelines.
References
1. “Computational Pipeline Monitoring for Liquids,” API
1130, American Petroleum Institute
2. The impact of the pipe and ground on pipeline temperature
transients, Nicholas, Ed; Pipeline Simulation Interest
Group, May 2011
3. Accurately Representing Leak Detection Capability and
Determining Risk, Carpenter, Philip S.; Nicholas, Ed;
Henrie, Morgan, Pipeline Simulation Interest Group,
November 2005
4. “Pipeline Variable Uncertainties and their Effects on Leak
Detection,” API Publication 1149, November 1993
5. Bayesian Belief Networks for Pipeline Leak Detection,
Carpenter, P., Nicholas, E. and Henrie, M., Pipeline
Simulation Interest Group, 2006
6. Simulation of Slack Line Flow: A Tutorial, Nicholas, Ed;
Pipeline Simulation Interest Group, 1995
About the Authors
Collectively, the authors have 80 years of experience with
RTTM based leak detection systems.
Ed Nicholas has been designing, implementing, and supporting
real time pipeline modeling applications for 35 years. He
managed simulation development at CRC Bethany, Real Time
Systems, and Scientific Software - Intercomp before branching
END NOTES
i For completeness sake, we note that the statement of
conservation of standard volume is only an approximation to
the statement of conservation of mass. In fact, restating the
concept of conservation of mass as conservation of standard
volume is precisely correct only for a gas that is ideal at
out as Nicholas Simulation Services in 1995. He led the
development of and currently provides primary support for the
leak detection system of the Trans-Alaska Pipeline. His
primary clients have been Koch Industries, PRCI, Sacramento
Municipal Utility District, and Alyeska Pipeline Services
Company. Ed received a BS in physics and mathematics from
Houston Baptist University and a MS in applied physics from
the California Institute of Technology.
Ed Nicholas brings a great deal of experience to the subject of
compressible product leak detection in general and gas pipeline
leak detection specifically. His experience includes:
1. In the early 80’s working alongside the control rooms of
Alberta Gas Ethylene (Red Deer, Alberta) and the Cochin
Pipeline (batched Ethane, Ethylene, Propane, and Butane)
implementing and troubleshooting RTTM based leak
detection systems.
2. Managing the development and performing the installation
of an RTTM model (without leak detection) for the East-
West NGL pipeline in Saudi Arabia.
3. Developed and installed an RTTM based leak detection
system integrated with a rarefaction wave system for Air
Products carbon monoxide pipelines along the Houston
ship channel.
4. He led the development and installation of an RTTM based
leak detection system for Australia’s largest gas pipeline,
the Dampier to Bunbury Pipeline.
5. Developed and supports a leak detection system for the
Fuel Gas Pipeline operated by Alyeska pipeline.
Philip Carpenter is an engineering consultant with over 35 years
of experience in the areas of pipeline hydraulics, pipeline
operation and control, real time systems, statistical analysis, and
numerical simulation of physical processes. His company,
Great Sky River Enterprises, LLC, provides services in these
areas to the oil and gas industry. He has a B.S. in Aerospace
Engineering and an M.S. in Engineering Science, both from the
State University of New York at Buffalo, and is a registered
Professional Engineer in the Commonwealth of Pennsylvania.
Morgan Henrie is the owner of MH Consulting, a firm
providing national and international support to the petroleum
industry. He has been involved in designing, evaluating, and
implementing Supervisory Control and Data Acquisition
systems, telecommunications infrastructures and leak detection
systems for more than 20 years, and has a PhD in Engineering
Management and Systems Science from Old Dominion
University.
standard conditions or whose composition is constant. But,
since all pipeline gases are very close to ideal at standard
conditions (natural gas has a compressibility factor of the order
of 0.998 at standard conditions), restating conservation of mass
as conservation of standard volume is sufficiently accurate for
the purposes of natural gas pipeline leak detection.