Gas Distribution Network Optimization by Kuntjoro Final

download Gas Distribution Network Optimization by Kuntjoro Final

of 7

description

jkjjkjkjljljlkjlkjlkjlkjlkjljlkkjl

Transcript of Gas Distribution Network Optimization by Kuntjoro Final

Proceedings Template - WORD

Gas Distribution Network Optimization with Genetic Algorithm

Sidarto, K. A.Department of MathematicsInstitut Teknologi BandungJl. Ganesha 10, Bandung+62 22 [email protected]

Riza, L. S.Study program of Computer Science Universitas Pendidikan Indonesia, BandungJl. Setiabudhi 229, Bandung+62 [email protected]

Widita C. K. Research Consortium OPPINETInstitut Teknologi BandungJl. Ganesha 10, Bandung+62 22 [email protected]

Haryadi, F. Research Consortium OPPINETInstitut Teknologi BandungJl. Ganesha 10, Bandung+62 22 [email protected]

ABSTRACTNowadays, 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 DescriptorsI.2.8 [Artificial Intelligence]: Problem Solving, Control Methods, and Search. General TermsAlgorithms, Economics, Design.KeywordsGenetic Algorithm, gas distribution pipelines, optimization of gas pipe diameter.

INTRODUCTIONCurrently, 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.METHODOLOGYThe problems solved step by step follows the flowchart below.

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].

Model FormulationThe 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]:(1)

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:(2)

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]:(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.(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.(5)

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:(6)

Ccoat is coating cost per mile.Total of installation cost:(7)

Cinst is installation cost per inch per mile.Total of operational cost, assumed 4% of total of investment cost and total of coating cost.

(8)

So, to minimize the total of pipe investment cost in steady state condition, nonlinear optimization problem below has to be solved.Minimize(9)

subject to(10)

Computation MethodsGenetic 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.

ENDGeneratenew populationGenerate random initial populationFitness evaluationBest individualsOptimal?SelectionCrossoverMutation

START

Figure 2. Flowchart of Genetic Algorithm.

The basic steps in a Genetic Algorithm are [8]:1. Generate randomly an initial population of chromosomes.2. Calculate the fitness, defined according to some specified criteria, of all the members of the population and select individuals for the reproduction process. The fittest are given a greater probability of reproducing in proportion to the value of their fitness.3. Apply the genetic operators of crossover and mutation to the selected individuals to create new individuals and thus a new generation. Crossover exchanges some of the bits (genes) of the two chromosomes, whereas mutation 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 ending the algorithm is reached. In this research, the properties of genetic algorithm is as followa) Representation of the populationIt is known that the desired solution is the optimum diameter and pressure distribution. In population, the solutions are arranged like binary code in a matrix as follows.

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).

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.

c) Fitness function.Fitness function is formulated as follows.

(11)

with f is a nonlinear equation of continuity that has been defined previously (Eq. (3) and (4) for each node).

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.

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.

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].

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

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.Table 1. Data inputs for pressure and flow rate on the networkNo.NodePressure (psia)Flow Rate (MMscfd)

1S125545.882

2J01Unknown0

3D7247-1.235

4J6Unknown0

5D8240-0.832

6J7Unknown0

7D9221-2.369

8D10196-16.209

9J1Unknown0

10J4Unknown0

11D5250-1.644

12D6245-1.273

13J02Unknown0

14D1245-6.284

15J2Unknown0

16D2228-8.502

17D3225-3.542

18D4230-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 pipeFrom nodeTo nodeDistance (mile)

S1J011.0501

J01D70.1242

J01J61.6606

J6D80.15152

J6J72.3306

J7D90.3126

J7D104.7249

S1J10.57778

J1J41.3823

J4D50.28243

J4D64.5863

J1J020.65143

J02D10.1242

J02J22.3176

J2D20.1242

J2D41.1177

J2D30.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

While input for Genetic Algorithm is as follows. Population = 50 Persen_crossover = 90% Persen_mutation = 1% Max_generation = 3.000.From the simulation results obtained as follows.Table 3. Result of pressure distributionNo.NodePressure (psia)

1J01246.6

2J6234.2

3J7 219.3

4J1249.6

5J4248.5

6J02244.2

7J2234.3

Table 4. Result of the optimum pipe diameter at each segmentFrom NodeTo NodeInside Diameter (inch)Wall Thickness (inch)

S1J017.90.344

J01D76,0650.28

J01J67.90.344

J6D84.0620.219

J6J78.1250.25

J7D96.2490.188

J7D108.1250.25

S1J18.2490.188

J1J46.0650.28

J4D56.0010.312

J4D64.0620.219

J1J028.1250.25

J02D16.1870.219

J02J28.2490.188

J2D24.1240.188

J2D46.0650.28

J2D34.1240.188

From the optimum diameter above, the economies cost obtained as follows.

Table 5. Result of the economies costNo.Item of costCost (US$)

1Investment2,965,132.42

2Coating 396,032.68

3Installation5,733,666.24

4Operation1,344,466.04

Total cost10,439,297.38

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 NoNode NamePressureRate

(Psia)(MMscfd)

1J01246.5690

2J6234.1620

3J7219.3090

4J1249.5780

5J02244.2210

6J2234.3240

7J4248.5060

8S125545.884

9D10193.628-16.209

10D9219.147-2.369

11D8234.076-0.832

12D7246.549-1.235

13D6243.064-1.273

14D5248.426-1.644

15D1243.851-6.284

16D3229.99-3.542

17D4232.661-3.994

18D2229.439-8.502

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

Figure 2. The main interface of the optimization software

CONCLUSIONSimple 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).

ACKNOWLEDGMENTSOur thanks to RC-OPPINETITB Team for everything to make the research could be done.

REFERENCES[1]. Stoner, M.A. 1969. Steady-State Analysis of Gas Production, Transmission and Distribution System. paper SPE 2554 presented at the SPE 44th Annual Fall Meeting, Denver, Colo. (Sept. 28-Oct. 1, 1969).[2]. Goldberg D.E.. 1989. Genetic Algorithm. Addison-Wesley Publ. Co., Inc.[3]. 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).[4]. American Petroleum Institute. 1980. API Specification for Line Pipe. American Petroleum Institute. Washington, D.C.[5] 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). [6]. Flanigan O. 1972. Constrained Derivatives in Natural Gas Pipeline System Optimization. Journal of Petroleum Technology (May 1972), pp. 549 556.[7]. 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.