Sei sulla pagina 1di 7

Gas Distribution Network Optimization

with Genetic Algorithm


Sidarto, K. A.

Riza, L. S.

Widita C. K.

Department of Mathematics Study program of Computer


Research Consortium
Institut Teknologi Bandung
Science
OPPINET
Jl. Ganesha 10, Bandung
Universitas Pendidikan
Institut Teknologi Bandung
+62 22 2508126
Indonesia, Bandung
Jl. Ganesha 10, Bandung
Jl. Setiabudhi 229, Bandung
+62 22 2508126
sidarto@math.itb.ac.id
+62 8157025880

lala_s_riza@yahoo.com

ABSTRACT
Nowadays, natural gas plays an important role as a source of clean
energy. The addition of gas consumption generally will require the
new design and construction of gas pipelines. In this regard, the
pipe diameter optimization process by considering the technical
specifications is a must. Using the obtained optimum gas
pipelines diameter, the investment cost and gas operations can be
minimized. Gas distribution pipeline network consists of nodes
that represent points of consumers and suppliers connected by a
pipe. Assuming the gas flow in a steady state, pipe networks are
modeled into a nonlinear equation system from gas flow equations
in the pipe. This model system solved by Genetic Algorithm to
obtain the optimum gas pipelines diameter with an investment
cost of the pipe system as an objective function and specification
of pressure on a node as a constraint. The optimization process is
optimization of pipe specifications which available on the market
(ANSI / ASME) with 64 kinds of diameter with range from 3 to
16 inch. At the end of the paper, a case study the optimization of
gas pipe diameter in the region X is presented. From these case
studies can be concluded that the Genetic Algorithm can
determine the optimum pipe diameter which gives the lowest
investment costs while still consistent to the technical
specifications that have been determined.

Categories and Subject Descriptors


I.2.8 [Artificial Intelligence]: Problem Solving, Control Methods,
and Search.

General Terms
Algorithms, Economics, Design.

Keywords

chasanah.k.widita
@gmail.com

Haryadi, F.
Research Consortium
OPPINET
Institut Teknologi Bandung
Jl. Ganesha 10, Bandung
+62 22 2508126

fb_haryadi@yahoo.com

Genetic Algorithm, gas distribution pipelines, optimization of gas


pipe diameter.

1. INTRODUCTION
Currently, natural gas plays an important role in providing clean
energy for the community. With the increasing gas demand,
network development required a new gas pipeline to meet the
needs of consumers and to connect the dots of new customers. To
perform the design and construction or expansion of gas
distribution pipelines, pipe diameter optimization process must be
done to minimize the investment cost. On the other hand, the gas
company also has a responsibility to meet the needs of consumers
with gas to the pressure and flow rates that have been agreed in
the contract. Therefore, the optimization is an optimization
performed with specific limitations for pressure and flow rate that
has been agreed in the contract.
This study focused on determining optimum pipe diameter and
pressure distribution which gives the pipes minimum investment
cost, and also perform economics calculations model (consisting
of investment costs, coating costs, installation costs and
operational costs of pipes). Optimization pipe diameter must also
consider the balance of the pressure distribution on the pipeline.
Gas distribution pipeline network is modeled as the pipes that
connect some point the gas supplier to the consumer points
assuming the gas flow in a steady state.
The system model which used to represent the gas distribution
system is a method of balancing the gas flow in the pipe. Stoner
[1] was the first time using this model for large networks. Stoner
proposed steady state model written from the substituted gas
correlation into the flow balance model, thus the nonlinear
equation system is obtained. Then the nonlinear equation system
will be solved by Genetic Algorithm [2], [3]. Diameter
optimization with Genetic Algorithm based on the specifications
of pipe which is available on the market and the allowed pressure
distribution (ANSI / ASME [4]). After getting the optimum pipe
diameter, the economic model i.e. investment costs, coating costs,
installation costs, and operational pipe costs will be calculated.

2. METHODOLOGY
The problems solved step by step follows the flowchart below.

2.1 Model Formulation


The system model used to represent the gas distribution system is
the flow balance method, i.e. the volume of gas flowing into the
system must be equal to the volume of gas that came out of the
system. Gas flow correlation used in this study is the Panhandle A
correlation.
A pipe connecting node i and node j has a length Lij (mile) and
inside diameter Dij (inch). Pipeline system is assumed in constant
conditions or steady-state with the gas temperature T, specific
gravity G, and pipe efficiency E. The flow from i to j is expressed
as a positive flow. Gas flow rate has units of MMSCFD and gas
pressure has units of psia. For horizontal flow, the Panhandle A
correlation is given by [6], [7]:

Qij =S ij

C E Dij 2.6128 (|P2i P2j|)

0.5394

(1)

S G g0.4606 T 0.5394 Lij0.5394

with Qij is the flow rate of gas in the pipe which connecting nodes
i and j. Pi and Pj are the pressure at node i and node j, respectively.
C is a constant correlation. To simplify the problem, it is assumed
that all segments of the pipe work in conditions of T = 60, G = 0.6
and E = 0.92. Thus Panhandle A correlation can be simplified to:

Qij =

K D ij

2.6182

0.5394

( P2i P2j )

Lij

(2)

0.5394

with K = 8.2634*10-4.
Flow balancing model is built by applying the analogy of
Kirchhoff's law in electricity, so for a point m, the continuity
equation obtained as follows[4]:

f m=Q jm Qmk + Q N m =0

(3)

the index of Q shows connectedness while the + / - indicates


direction of flow. While fm is a nonlinear equation at nodes m and
represents the flow imbalance at some point, so it is zero if the
system is in a state of balance. If the gas pipeline has a 10 point
must be connected by pipeline segment then 10 nonlinear
equations will be obtained.
As mentioned earlier, the optimization process carried out to
obtain the minimum investment with prescribed constrain of
pressure. Investment formula is as follows.
Figure 1. Step-by-step for solving the problem
.
As shown in the picture above, there are three main parts i.e. the
Genetic Algorithm application to obtain the optimum pipe
diameter, the calculation of economic models, and the application
of Newton's method for calculating the pressure distribution. This
paper is focused on explaining the application of Genetic
Algorithm and cost calculation, while Newton's method for
calculating the pressure distribution has been discussed in the
previous paper [5].

CIPij =

10.68 ( OD ijt ij ) t ij Lij C pipe 5280


2000

(4)

With the cost of investment CIPij pipe, outside diameter ODij, tij is
the wall thickness of the pipe between nodes i and j, and Cpipe is
pipe cost per ton. Total cost of investment in the whole system of
pipes is as follows.

10.68
CIPtotal=

i , j;i j

( OD ij t ij ) t ij Lij C pipe 5280

(5)

2000

Lij is the length of the pipe between nodes i and j which already
known.
In addition, another economies models calculated by the
following formula.

Total of coating cost:

C coat

i , j ;i j

Lij

(6)
Figure 2. Flowchart of Genetic Algorithm

Ccoat is coating cost per mile.

.
The basic steps in a Genetic Algorithm are [8]:

Total of installation cost:

Generate randomly an initial population of


chromosomes.
2. Calculate the fitness, defined according to some
Cinst is installation cost per inch per mile.
specified criteria, of all the members of the population
and select individuals for the reproduction process. The
Total of operational cost, assumed 4% of total of investment cost
fittest are given a greater probability of reproducing in
and total of coating cost.
proportion to the value of their fitness.
3. Apply the genetic operators of crossover and mutation
10.68
( OD ijtij ) tij Lij C pipe 5280
to the selected individuals to create new individuals and
i , j ;i j
(8) coat
0.04
+C
Lij thus a new generation. Crossover exchanges some of the
2000
bits (genes) of the two chromosomes, whereas mutation
i , j ;i j
inverts any bit(s) of the chromosome depending on a
probability of mutation. Thus a 0 may be changed to a 1
or vice versa.
Then again step 2 is followed until the condition for
So, to minimize the total of pipe investment cost in steady state
ending the algorithm is reached.
condition, nonlinear optimization problem below has to be solved.
In this research, the properties of genetic algorithm is as follow
Minimize
a) Representation
of
the
population
It
is
known
that
the
desired
solution
is
the
optimum
diameter
10.68
( OD ij t ij ) t ij Lij C pipe 5280
and pressure distribution. In population, the solutions are
i , j;i j
(9)
arranged like binary code in a matrix as follows.
CIPtotal=

Cinst

i , j ;i j

Lij Dij

1.

(7)

2000

subject to

F ( x )=f ( x )=0,
(10)

where ,f ( x )= f 21 ( x ) + f 22 ( x ) ++ f 2n ( x )

2.2 Computation Methods


Genetic Algorithm (AG) is a random search algorithm based on
natural selection and genetics mechanisms. AG developed by John
Holland at the University of Michigan in 1975.
AG working in a set of candidate solutions called population.
Each candidate solution is called an individual in the population.
Usually, the individual is represented by a binary string. Any
individual or string is mapped in a fitness value that represents the
individual's level of performance. Each individual in the
population will be subject to an operation to improve his fitness
value. The operation is the selection or reproduction, crossover or
cross-breeding, and mutation. Genetic Algorithm can be described
as flowchart below.
Generate random initial population
Optimal?

Fitness evaluation

Figure 3. Binary representation for the pressure and


diameter in Population
bit_varp and bit_vard are the number of bits which represent
the pressure and diameter index, respectively. Press is the
number of nodes that will be determined pressure, and Dia is
the number of pipe segments which will be optimized in
diameter. The binary representation of diameter represents
diameter specifications which available on the market (ANSI /
ASME) with a diameter range from 3 to 16 inch (64 kinds of
diameter).

Best individuals

START

Selection

Generate
new
population

Crossover

Mutation

END

b)

Operator selection, crossover, and mutation.


Operator selection, crossover, and mutation performed for
each part of the pressure and diameter. This operator is based
on any probability value.

Table 1. Data inputs for pressure and flow rate on the network
c)

Fitness function.
Fitness function is formulated as follows.

No.
1

Node
S1

Pressure
(psia)
255

Flow Rate
(MMscfd)
45.882

J01

Unknown

D7

247

-1.235

J6

Unknown

with f is a nonlinear equation of continuity that has been defined


previously (Eq. (3) and (4) for each node).

D8

240

-0.832

J7

Unknown

AG is used to estimate the solution of the equation system from


which f (x) = 0, so the best fitness value is when F = 0.

D9

221

-2.369

D10

-16.209

After the best individual which has the lowest fitness in step c
has been gotten, the total cost will be calculated. Then, the result
is sorted in ascending order. The lowest of total cost will be saved
as the best individual on population for the next iteration. This
process will be conducted until the maximum generation.

J1

196
Unknown

10

J4

Unknown

min F ( x )=f ( x )=0,


where ,f ( x )= f ( x ) + f ( x ) ++ f ( x )
2
1

2
2

2
n

(11)

The last process of computation is the Newtons method. This


method is used to the last checking whether the result had been
gotten from genetic algorithm convergent and balanced perfectly.
The detail of the process could be found in the previous paper [5].

3. CASE STUDY
In this paper, a developed model tested in the case of the X region
with a network schematically as shown below.

11

D5

250

-1.644

12

D6

245

-1.273

13

J02

Unknown

14

D1

245

-6.284

15

J2

Unknown

16

D2

228

-8.502

17

D3

225

-3.542

18

D4

230

-3.994

While the data of pipe length at each segment is as follows.


Table 2. Length of each segment of data on the network pipe
From node

Figure 1. Schematic of gas distribution pipeline

Node S1 is the point of suppliers, while nodes D1, D2, D3, D4,
D5, D6, D7, D8, D9, D10 are the point of demand, and nodes J01,
J02, J1, J2, J4, J6, J7 are the points of junction. Pressure data and
flow rate can be seen in the table below.
The optimum size of the pipe diameter at each segment in the
network will be determined, also the pressures at junction J01, J6,
J7, J1, J4, J02, J2 and 10 will be determined. The pressures on the
other nodes have been determined (according to the contract).
Pressure data and flow rate at each node can be seen in the
following table.

To node

Distance (mile)

S1

J01

1.0501

J01

D7

0.1242

J01

J6

1.6606

J6

D8

0.15152

J6

J7

2.3306

J7

D9

0.3126

J7

D10

4.7249

S1

J1

0.57778

J1

J4

1.3823

J4

D5

0.28243

J4

D6

4.5863

J1

J02

0.65143

J02

D1

0.1242

J02

J2

2.3176

J2

D2

0.1242

J2

D4

1.1177

J2

D3

0.5589

Data inputs for economics factor are as follows.


- Pipe cost

= US$ 2500/ton

- Coating cost

= US$ 10/meter

- Installation cost

= US$ 20/inch/meter

From the optimum diameter above, the economies cost obtained


as follows.
Table 5. Result of the economies cost
No.

Item of cost

Cost (US$)

1
2
3
4

Investment
Coating
Installation
Operation

2,965,132.42
396,032.68
5,733,666.24
1,344,466.04
10,439,297.38

While input for Genetic Algorithm is as follows.

Population = 50

Persen_crossover = 90%

Persen_mutation = 1%

Max_generation = 3.000.

Total cost

From the simulation results obtained as follows.


Table 3. Result of pressure distribution
No.

Node

Pressure (psia)

1
2
3
4
5
6
7

J01
J6
J7
J1
J4
J02
J2

246.6
234.2
219.3
249.6
248.5
244.2
234.3

After getting the result of diamater optimization using genetic


algorithm, to get more satisfying, we should check using
balancing3 system software to calculate pressure distribution on
each node. Balancing system software what we have is using
combination between genetic algorithm and newtons method [5].
After that, we should compare between the pressure given by user
as input data on each demands and the result of balancing system
software. We should run again if the result of comparation isnt
good enough.
The result of pressure diameter of this case study is as follow.
Table 6. Result of the pressure distribution

Table 4. Result of the optimum pipe diameter at each segment

Rate

(Psia)

(MMscfd)

J01

246.569

J6

234.162

J7

219.309

J1

249.578

J02

244.221

J2

234.324

J4

248.506

S1

255

45.884

D10

193.628

-16.209

10

D9

219.147

-2.369

11

D8

234.076

-0.832

12

D7

246.549

-1.235

13

D6

243.064

-1.273

14

D5

248.426

-1.644

15

D1

243.851

-6.284

Node Name

S1

J01

Inside
Diameter
(inch)
7.9

J01

D7

6,065

0.28

J01

J6

7.9

0.344

J6

D8

4.062

0.219

J6

J7

8.125

0.25

J7

D9

6.249

0.188

J7

D10

8.125

0.25

S1

J1

8.249

0.188

J1

J4

6.065

0.28

J4

D5

6.001

0.312

J4

D6

4.062

0.219

J1

J02

8.125

0.25

J02

D1

6.187

0.219

J02

J2

8.249

0.188

16

D3

229.99

-3.542

J2

D2

4.124

0.188

17

D4

232.661

-3.994

J2

D4

6.065

0.28

18

D2

229.439

-8.502

J2

D3

4.124

0.188

From Node

To Node

Wall
Thickness
(inch)
0.344

Pressure

No

The main interface of the software which has been resulted based
on the model is as follow.

6. REFERENCES
[1]. Stoner, M.A. 1969. Steady-State Analysis of Gas

[2].
[3].

[4].
Figure 2. The main interface of the optimization software

[5]

4. CONCLUSION
Simple Genetic Algorithm can be helpful in finding an optimal
inside diameter. The optimal inside diameter gives a minimum
cost by considering the technical specifications (the pressure given
by user). To give more satisfying result, the optimal inside
diameter should be checked by software for calculating pressure
distribution (balancing system software).

[6].
[7].

5. ACKNOWLEDGMENTS
Our thanks to RC-OPPINETITB Team for everything to make
the research could be done.

Production, Transmission and Distribution System. paper


SPE 2554 presented at the SPE 44th Annual Fall Meeting,
Denver, Colo. (Sept. 28-Oct. 1, 1969).
Goldberg D.E.. 1989. Genetic Algorithm. Addison-Wesley
Publ. Co., Inc.
Sidarto K.A., Saiman dan N. Rohani. 2004. Menentukan
Akar Sistem Persamaan Tak Linier dengan Memanfaatkan
Algoritma Genetika yang Dilengkapi Clearing Procedure
dari Petrowski. In Proceedings of Konferensi Nasional
Matematika XII (Denpasar, Bali, 23-27 Juli, 2004).
American Petroleum Institute. 1980. API Specification for
Line Pipe. American Petroleum Institute. Washington, D.C.
Sidarto, K. A., Mucharam, L., Riza, L.S., Mubassiran,
Rohani, N., Soplan, S. 2005. Implementation of Genetic
Algorithm to Improve Convergente of Newtons Method in
Predicting Pressure Distribution in Complex Gas Pipeline
Network Sistem Case Study: Off-take Station ST-WLHR
Indonesia. In Proceedings of
Seminar nasional soft
computing,
intelligent
sistems
and
information
technology/SIIT (28-29 July 2005).
Flanigan O. 1972. Constrained Derivatives in Natural Gas
Pipeline System Optimization. Journal of Petroleum
Technology (May 1972), pp. 549 556.
Ikoku C.U. 1984. Natural Gas Production Engineering.
John Wiley & Sons, New York.

[8]. Agarwal V. Solving Transcendental Equations Using Genetic


Algorithm.
http://www.geocities.com/mumukshu/gatrans.html.

Potrebbero piacerti anche