You are on page 1of 6

Flow Measurement and Instrumentation 16 (2005) 157162

Inversion of electrical capacitance tomography data by simulated

annealing: Application to real two-phase gasoil flow imaging
C. Ortiz-Alemn, R. Martin
Instituto Mexicano del Petrleo, Eje Central L Crdenas 152, Mxico, DF, 07730, Mexico
Received 15 October 2004; received in revised form 28 January 2005; accepted 14 February 2005

In this work we apply a highly optimized simulated annealing (SA) inversion method to the reconstruction of permittivity images from real
two-phase gasoil flow electrical capacitance tomography (ECT) data. We test the SA inversion method using several flow regimes generated
by varying gas and oil flow rates in a test loop facility. The SA-based permittivity inversions have some advantages over other reconstruction
approaches based on linear least-squares inversion: they can find good solutions starting with poor initial models, can easily implement
complex a priori information, and do not introduce smoothing effects in the final permittivity distribution model. A major disadvantage
comes from the fact that SA is computationally very intensive and leads to relatively slow reconstructions when calculation of the forward
problem is not very fast. In this work we employ a linearized and numerically improved forward model based on the use of a sensitivity
matrix. We find this novel approach to be faster and more accurate than traditional linear methods.
2005 Elsevier Ltd. All rights reserved.
Keywords: Capacitance tomography; Simulated annealing; Image reconstruction; Finite volume method; Sensitivity matrix; Gasoil flows

1. Introduction
Tomography methods are mainly employed for obtaining
estimated images of a cross section of an object. A
number of new tomography methods aimed at industrial
processes have emerged, collectively known as process
tomography [1]. The main goal of process tomography
methods, which started to develop in the mid-1980s, is to
produce an image of the phase or component distribution
in an industrial process using only external sensors and
without causing any perturbation to it. Examples of suitable
processes are those occurring in mixing or stirring vessels,
fluidized bed reactors, separator tanks, or a pipeline carrying
multiphase flow.
There is a whole range of principles and techniques
that can be exploited in process tomography, including
electrical methods based on impedance measurement,
ultrasound, magnetic resonance, optical methods and
Corresponding author.

E-mail address: (C. Ortiz-Alemn).

0955-5986/$ - see front matter 2005 Elsevier Ltd. All rights reserved.

those based on ionizing radiation (X- and gamma-rays).

Generally speaking, ionizing radiation methods produce
images with the highest definition, but are relatively
slow to achieve. On the other hand, electrical methods
yield low-resolution images but are much faster, robust
and relatively inexpensive. In particular with regard to
electrical impedance tomography, or electrical tomography
for short, there has been a very noticeable progress in the
last few years. This type of tomography has two main
modalities: capacitance and resistance tomography. In a
capacitance tomography system [25], normally used with
mixtures where the continuous phase is non-conducting, the
sensor employed is made of a circular array of electrodes
distributed around the cross-section to be examined, and
the capacitance between all the different electrode-pair
combinations is measured. With the help of a computer and a
suitable image reconstruction algorithm, this information is
used to create a map showing the variation of the dielectric
constant (or relative permittivity) inside the sensor area,
thus providing an indication of the physical distribution of
the various components of the mixture. In this particular


C. Ortiz-Alemn, R. Martin / Flow Measurement and Instrumentation 16 (2005) 157162

Fig. 1. Sensor cross section.

case, the electrodes can be located on the outside of a nonconducting pipe, in order to simplify sensor construction
and avoid direct contact with the process fluids (Fig. 1). A
second external grounded metallic pipe serves as an electric
screen and to provide mechanical resistance.
In principle, ECT has important applications in multiphase flow measurement, particularly gasoil two-phase
flow, which often occurs in many oil wells. Additionally,
ECT has potential applications to imaging, monitoring and
controlling numerous industrial multiphase processes.
The value of the mutual capacitances is a complex nonlinear function of the conductor system geometry, and of
the spatial distribution of the dielectric constant or relative
permittivity of the dielectric medium. In the case of the ECT
sensor, the geometry of the electrodes, that of the pipe, and
the value of the dielectric constant of the latter, are all fixed.
Therefore, it can be said that the mutual capacitances are
a function only of the spatial distribution of the dielectric
constant inside the sensor, (x, y). The use of the cylindrical
end guards (Fig. 1) and the assumption that the phase (and
thus the permittivity) distribution does not change too much
in the axial direction, allows the sensor to be represented by
a two-dimensional (2-D) model [6].
The problem of calculating the mutual capacitances
corresponding to a specific permittivity distribution inside
the sensor is referred to as the forward problem. The problem
of estimating what is the spatial permittivity distribution
inside the sensor that corresponds to a specific set of mutual
capacitance values is referred to as the inverse problem,
and is the problem that image reconstruction methods must
address and solve.
However, so far the main limiting factor to the practical
application of ECT has been the lack of fidelity or
accuracy of the images obtained using the available image
reconstruction methods [7]. Simple direct methods like
linear back-projection (LBP) yield relatively poor images
that only provide a qualitative indication of the component
distribution inside the sensor. On the other hand, more
sophisticated methods, based on iterative local optimization
techniques, generally require one or more regularization
parameters whose optimal value depends precisely on the
(unknown) image to be reconstructed, apart from the fact
that the regularization employed has the effect of smoothing

the image contours, making it more diffuse. Moreover,

these methods generally produce distorted images, because
the regularization has a smoothing effect on the obtained
permittivity. If the regularization is too strong the smoothing
effect will occur, and if it is too weak the method can become
unstable and/or not converge to the desired solution. Most of
these problems are related to the fact that local optimization
algorithms, during their search, explore only a relatively
small sector of the solution domain, restricted to the vicinity
of the initial guess. The most used methods in this category
are least-squares linear inversion and techniques that utilize
the gradient of the objective function, like the steepestdescent and the conjugate-gradient methods. In general,
local search methods exploit the scarce information derived
from the comparison of a small number of models, thus
avoiding an extensive search in the whole model space [8].
Thus, better and more accurate image reconstruction
methods are still being developed in the context of this
On the other hand, global optimization methods, like
SA, explore the whole solution domain during the inversion
process. They carry out an extensive scan within the model
space. In this way, despite the existence of partial solutions
to the problem, there is a greater possibility that the final
solution corresponds to the best fit between the observed and
the synthetic data. This type of method, contrary to local
techniques, does not require the information provided by
the derivatives of the objective function. Global optimization
algorithms use stochastic criteria in order to simultaneously
explore all the solution space in search of the optimal model.
The best known of global methods is Monte Carlo, which
performs a purely random and unbiased search. In other
words, when generating each new model, it does not take
advantage of the information obtained from the previously
evaluated models [9]. The unguided randomness is the most
characteristic feature of this method, which distinguishes
it from the rest of the global methods. Among the global
optimization techniques, there are also the methods using
SA and genetic algorithms (GA). Both were conceived as
analogies of optimization systems occurring in nature. GA
emulates the mechanisms of biological evolution while SA
is based on thermodynamics. Both methods are inherently
non-linear and, therefore, lend themselves naturally to
their application in capacitance tomography, a non-linear
2. Inversion by simulated annealing (SA)
The SA method is an analogy to the thermodynamic
process of crystallization. A mineral fluid that cools slowly
until it reaches a low energy state, gives rise to the formation
of well defined crystals. If, on the contrary, the substance
leaves its thermal equilibrium state with a sudden or partial
cooling, the resulting crystal will have many defects, or
the substance may even form a glass, characterized by
its meta-stable molecular disorder. This concept is used in

C. Ortiz-Alemn, R. Martin / Flow Measurement and Instrumentation 16 (2005) 157162


the context of optimization methods to recognize potentially

useful models or configurations.
The atoms of each molecular configuration are equivalent
to the model parameters in the inverse problem (i.e., the
permittivity of the various image pixels). The system energy
for such configuration is related to the energy function
associated with the set of parameters involved in the model.
A least squares solution can be achieved by minimising this
energy function which is defined as the difference between
the observed and synthetic data:



((ckobs ) (ckcalc ))2


(ckobs )2


where m = n(n 1)/2 is the number of measured

capacitances, ckobs are the measured capacitances and ckcalc
are the ones calculated by solving the forward problem for a
given permittivity distribution .
The method of SA has three basic components [10]: an
energy (or cost, or misfit) function, an order function (the
Metropolis criterion), and a set of parameters that control
the temperature for each model parameter. The process
consists of three nested cycles (Fig. 2). The external cycle
(3) regulates the system temperature. Every time a cycle
is completed, the temperature for each parameter decreases
as its initial temperature To is multiplied by a constant
factor RT . Usually, RT is slightly lower than 1 to allow a
slow and gradual cooling process. The intermediate cycle
(2) generates a set of constants K i associated with each
parameter. The said constants determine the change that
each parameter may experience. In the inner cycle (1),
the parameter values are perturbed by multiplying each
parameter by the product of its corresponding K i times a
randomly chosen number (Rand) between 1 and 1. The
synthetic response of the current model is calculated and
the change E in the energy function associated with the
new parameter configuration is evaluated. This shift causes
a change E in the systems total energy. If E is less than
or equal to zero, the change in the parameter is accepted
and the resulting configuration is considered as the new
current configuration. When there is an increase in the
system energy (E is greater than zero), the probability
P of acceptance or rejection for the parameter change is
determined, according to the Metropolis criterion [11], as
P(E) = eE/T


where T is the temperature of the system for a given step of

the stochastic process.
In order to decide whether or not a change that produces
an increase in the system energy is accepted, a random
number between zero and one is generated, which is then
compared with the value of the probability corresponding to
E. If the said random number is greater, the parameter shift
is not accepted and the configuration that existed before the
shift is maintained. Repeating this procedure continuously,

Fig. 2. Implementation of the SA method (after Ortiz-Alemn et al. [12]).

The external cycle (3) regulates the system temperature T (after every
cycle is completed) by decreasing T for each parameter by a factor RT .
The intermediate cycle (2) provides a set of constants K i associated with
each parameter. This set of constants determines the change applied to
each parameter. The inner cycle (1) perturbs the current parameters by
multiplying them by their related K i constants and random constants lying
between 1 and 1. Then, as being discussed in the text, the Metropolis
criterion accepts or rejects the new parameters according to a probability
function P.

the thermal movement of the atoms of a system in thermal

equilibrium (at a fixed temperature T ) is simulated. In order
to reach the systems base state, that is to say, the state
of lowest energy and highest order, the temperature for
each parameter must be reduced very slowly, simulating a
quasi-static process. This means that, during the cooling,
the system must experience a series of states infinitesimally
separated from the state of thermal equilibrium.
The three cycles are repeated, while the temperature
of the process decreases progressively. As the temperature
diminishes, the parameter variations are smaller and smaller.
In this way, the search in the solutions domain tends to
confine itself towards the models associated with the global
minimum of the energy function.
3. Linearized forward problem solution
In order to get a fast linearized version of the
forward problem, we made use of a recently introduced
approach [13]. A sensitivity matrix is computed as
Cik Ci(emp)
Ci(full) Ci(emp)
k = 1, . . . , p

Sik =

for i = 1, . . . , m and

where m = n(n 1)/2 is the number of measured

capacitances (n being the number of electrodes around
the sensor), k is the pixel number (from 1 to p), Cik
is the capacitance measured with electrode pair i when
the area of pixel k is full of a high-permittivity material
while the rest of the sensor is full of a low-permittivity
material, whereas Ci(full) and Ci(emp) are the capacitances


C. Ortiz-Alemn, R. Martin / Flow Measurement and Instrumentation 16 (2005) 157162

for electrode pair i when the sensor is full of high- and lowpermittivity material, respectively. These sensitivity maps
were calculated by solving numerically the associated partial
differential equation with the finite volume method (FVM).
Having determined the sensitivity maps, they can be used
for obtaining ECT synthetic data, from any permittivity
distribution inside the sensor. For this purpose, the measured
capacitance data must be normalized according to:
ci =

Ci Ci(emp)
Ci(full) Ci(emp)

for i = 1, . . . , m


where ci is the normalized capacitance for electrode pair i

and Ci is the actual capacitance measured with that electrode
In this way, the linear forward problem in ECT can be
written in matrix form as:
S = c,


where c is a vector of normalized capacitance data,

is a vector of normalized model permittivity, and S is
the normalized sensitivity matrix. Normalization of model
permittivity and the sensitivity matrix was performed by
using the next expressions:
i i(emp)
for i = 1, . . . , p
i =
i(full) i(emp)
sik = p
for i = 1, . . . , m and k = 1, . . . , p. (7)


Fig. 3. Experimental test set-up.

vector. That is,

new old

.. ..
. = . + i . .




In this way, the inversion process is accelerated and CPU

time consumption is comparable to linear inversion methods
like projected Landweber.

4. Experimental set-up


During the process of reconstruction of a permittivity

image using SA, it is necessary to solve the forward
problem repeatedly for quite similar successive permittivity
distributions, while the method converges towards the
global solution. Since the solution corresponding to the
said successive permittivity distributions changes relatively
little, it is possible to accelerate the whole process by
taking into account the solution corresponding to the
previous permittivity configuration. Because this previous
guess will be quite close to the next solution, the
number of floating-point operations can be dramatically
reduced by removing the entire redundant matrix by vector
multiplications involved in the computation of the forward
problem described by Eq. (5). To illustrate this numerical
improvement of the method, let us consider the case when
parameter i is being perturbed:

s11 s1i s1 p

s21 s2i s2 p

i + i = .


. . . ..

sm1 smi smp
where i is the change that parameter i may experience
in the inner cycle of the SA method. Therefore, computation
of a new set of ECT synthetic data can be made by adding
a correction factor to the previously computed ECT data

The sets of electrical capacitance tomography measurements used in this study were collected in a 3 in. gasoil twophase test loop. We used a 12-electrode pressure-resistant
capacitance tomography sensor. By varying the oil and gas
flow rates, different flow regimes were observed. For a detailed description of these experiments and the pressureresistant sensor, the reader is referred to Gamio et al. [13]. In
Fig. 3 a sketch of the experiment is presented and hereafter
we summarize the experimental set-up.
The test loop uses nitrogen gas, Exxol D80 oil and tap
water. In this work we only used air at atmospheric pressure
and oil as flow components. Oil and water pumps with
reference flow meters for gas, oil and water are connected
to a three-phase separator. A Coriolis-type meter measures
simultaneously oil and water flow rates whereas differentialpressure meters determine the gas flow rate. Two million
cubic feet/day of gas can be supplied with 3500 barrels/day
(bpd) of oil and 2500 bpd of water.
In the case of study modeled here, air and oil were
injected through the sensor at different pressures up to
7 barg and at a temperature around 20 C. The velocities
of each phase were varied through a pressurized nitrogen
gas/valve system. Maximum operating pressure ratings up
to 12 bar and safety design pressures up to 16 bar are
considered. Operating and design temperatures up to 40 C
and 0100 C are used. The sensor is connected the separator
and can be deviated to a 15 m-slug generator.

C. Ortiz-Alemn, R. Martin / Flow Measurement and Instrumentation 16 (2005) 157162


5. Results
In a previous work [12], we followed the advice of
Yang and Peng [6] to test nonlinear methods for both
forward modelling (FVM) and reconstruction of electrical
permittivity images by means of global inversion methods
(VFSA). In that previous work we focused our attention on
the inversion of measured ECT data as well as synthetic
cases with varying degrees of complexity for the SA method.
For comparisons between image reconstruction of synthetic
and measured ECT data by the SA method and by other
linear approaches, the reader is referred to Martin and OrtizAlemn [14].
In this work, we tested a number of flow regimes
generated by modifying oil and gas flow rates. We used
as a reference a fast qualitative image reconstruction
by the LBP method and a view through a transparent
window section installed in the test loop. Stratified flows
can be directly seen through the transparent window but
other patterns involving significant gas flows cannot be
observed properly in the inner core of the sensor because
the oil phase is reflected by the sensor walls and the
window. That is, in some way, another justification to the
employment of a more reliable approach like the simulated
annealing reconstruction method presented here. Image
reconstructions by the LBP method are properly discussed
by Gamio et al. [13].
In this paper we apply the SA method and we make use
of a linear approximation to the forward problem by means
of a numerically improved sensitivity matrix approach. We
use a sensitivity matrix computed for a set of 1693 elements
or pixels. The ECT system we used allows a data acquisition
rate of one hundred frames per second. We used a Pentium 4
PC, and we got a visualization rate of around 20 images per
second by using the one-step LBP method. The SA method
leads to relatively slow image reconstructions as it requires
thousands of forward problem computations. In this study
we employed around one million iterations for all image
reconstructions (see Figs. 46). The speed of computation
for these SA inversions was around 20 s per image, quite
similar to iterative linear methods like projected Landweber.
Ten different flow patterns were generated and sets of
measurements, during around 30 s, were collected for each
pattern. We inverted the whole data set as a single process,
in order to reduce the numerical burden by considering the
solution for one image reconstruction as an initial guess for
the next one.
In Fig. 4 we summarize the whole set of test cases
and their corresponding reconstructed images. We have
chosen a representative image for each one of the ten flow
patterns simulated during the experiment. The first snapshot
(a) corresponds to an initial stratified flow slightly rotated
to the right by 15 , because of a wrong orientation of
the sensor at the beginning of the experiment. The second
snapshot (b) shows an intermittent flow thickening towards
the centre of the pipe when the liquid flow rate has been

Fig. 4. Image reconstruction for ten two-phase gasoil test flows from
ECT data. The estimated images were achieved after around 1 million
iterations of the SA method. Dark grey and white represent low (air) and
high permittivity (oil) components, respectively. (a) Stratified flow, (b)
intermittent flow, (c)(e) stratified/wavy flows, (f)(h) annular flows, (i)(j)
fully thin annular flows.

Fig. 5. Image reconstruction of an intermittent flow. Dark grey and white

represent low and high permittivity materials, respectively. Sequence goes
from top to bottom and from left to right, and delay time between frames is
50 ms.

increased (liquid velocities from 0.07 to 1.4 m/s) and the

gas flow rate was maintained low (close to zero). Then the
speed of the gas flow is increased from 2.6 to 17 m/s while
the liquid flow rate is maintained low (speeds between 0.06
and 1.4 m/s). Wavy stratified (c)(e), annular (f)(h) and
fully thin annular flows (i)(j) are then obtained. Essentially
five flow patterns were reconstructed: stratified, intermittent,
wavy stratified, annular and extremely thin annular (almost
empty) flows. These patterns correspond to the typical flow
regimes reported in the literature [15] for the liquid and gas
velocities reported previously in this paragraph.
One of the most complex patterns we found was a
stratified-intermittent flow (the compressor had been turned
on). As can be seen in Figs. 5 and 6, large oscillations of
the flow are observed in the first snapshots, forming semiannular patterns close to the sensor wall. The liquid flow


C. Ortiz-Alemn, R. Martin / Flow Measurement and Instrumentation 16 (2005) 157162

in the range of a few seconds of CPU time (at the cost of

some loss of image accuracy).
We thank J.C. Gamio and W.Q. Yang for their fruitful
discussions on linear inversion algorithms applied to
capacitance tomography. The advice of M. Sen has also
been very helpful for the implementation of the simulated
annealing algorithm. This contribution was supported by
project IMP/D.002613(IPOA).

Fig. 6. Image reconstruction of a second intermittent flow. Dark grey and

white represent low and high permittivity materials, respectively. Sequence
goes from top to bottom and from left to right, and delay time between
frames is 50 ms.

rate has been increased maintaining the gas flow rate low. An
intermittent flow pattern is then observed, with an alternant
occurrence of slugs and stratified flows.
It is interesting to notice that the gasoil interfaces
are much better defined and sharper than the highly
smooth interfaces obtained using local linear approaches
and the LBP method. Visualizations using LBP are limited
because half of the image contours are not specifically
interfaces; however they give a regular indication of the flow
composition [16].
6. Conclusions
This hybrid method (linear forward problem and
nonlinear inverse modelling) does not require a good starting
model and has been found to be successful in inversion of
permittivity images from real dynamic ECT data. In this
paper, the method has been validated by using real ECT
data for two-phase gasoil flows. The SA method produced
satisfactory image reconstructions for all the studied cases.
We found the SA method to be a powerful tool for
routine interpretation of ECT data in two-phase gasoil flow
The SA inversion of gasoil two-phase flows ECT data
with linear forward modelling provided us very promising
results, as we preserved the level of accuracy previously
reported for static physical models [12] and we were able to
overcome one of the drawbacks of the method: its relatively
high computation time. We found this method to be as fast
as iterative-linear methods such as projected Landweber. In
this work we spent around 20 s of CPU time for each image
reconstruction (after one million iterations). So, SA is not a
real-time operation method, but it can operate properly even

[1] R.A. Williams, M.S. Beck, Process Tomography Principles,

Techniques and Applications, Butterworth Heinemann, 1995.
[2] M.S. Beck, M. Byars, T. Dyakowski, R. Waterfall, R. He,
S.M. Wang, W.Q. Yang, Principles and industrial applications of
electrical capacitance tomography, Meas. Control 30 (1997) 197200.
[3] J.C. Gamio, A high-sensitivity flexible-excitation electrical capacitance tomography system, Ph.D. Thesis, University of Manchester Institute of Science and Technology, UK, 1997.
[4] E.A. Hammer, G.A. Johansen, Process tomography in the oil industry:
state of the art and future possibilities, Meas. Control 30 (1997)
[5] A. Plaskowski, M.S. Beck, R. Thorn, T. Dyakowski, Imaging
Industrial Flows: Applications of Electrical Process Tomography,
Institute of Physics Publishing, UK, 1995.
[6] C.G. Xie, A. Plaskowski, M.S. Beck, 8-electrode capacitance system
for two-component flow identification. Part 1: Tomographic flow
imaging, IEE Proc. A 136 (4) (1989) 173183.
[7] W.Q. Yang, L. Peng, Image reconstruction algorithms for electrical
capacitance tomography, Meas. Sci. Technol. 14 (1) (2003) R1R13.
[8] M. Sambridge, G. Drijkoningen, Genetic algorithms in seismic
waveform inversion, Geophys. J. Int. 109 (1992) 323342.
[9] K. Gallagher, M. Sambridge, G. Drijkoningen, Genetic algorithms:
an evolution from Monte Carlo methods for strongly non-linear
geophysical optimization problems, Geophys. Res. Lett. 18 (1991)
[10] L. Ingber, Very fast simulated re-annealing, Math. Comput. Modelling
12 (8) (1989) 967973.
[11] N. Metropolis, A. Rosenblueth, M. Rosenblueth, A. Teller, E. Teller,
Equation of state calculations by fast computing machines, J. Chem.
Phys. 21 (1953) 10871092.
[12] C. Ortiz-Alemn, R. Martin, J.C. Gamio, Reconstruction of
permittivity images from capacitance tomography data by using very
fast simulated annealing, Meas. Sci. Technol. 15 (2004) 13821390.
[13] J.C. Gamio, J. Castro, L. Rivera, J. Alamilla, F. Garcia-Nocetti,
L. Aguilar, Visualization of gasoil two-phase flows in pressurized
pipes using electrical capacitance tomography, Flow Meas. Instrum.
(2004) (submitted for publication).
[14] R. Martin, C. Ortiz-Alemn, Inversion of electrical capacitance
tomography data by simulated annealing: non-linear versus linearized
forward modeling, Int. J. Appl. Math. Mech. (2004) (submitted for
[15] Y. Taitel, A.E. Duckler, A model for predicting flow regime transitions
in horizontal and near horizontal gasliquid flow, AIChE J. 22 (1)
(1976) 4755.
[16] A. Hunt, J. Pendleton, Y. Ladam, Visualization of two-phase
gasliquid pipe flows using electrical capacitance tomography, in:
Proceedings ESDA04, 7th Biennial Conference on Engineering
Systems Design and Analysis, 1922 July, Manchester, UK.