You are on page 1of 4

Pet.Sci.

(2012)9:89-92

89

'2I 10.100s12182-012-018-8

Power optimization of gas pipelines via an improved


particle swarm optimization algorithm
Zheng Zhiwei and Wu Changchun
%eiMing Key Laboratory of 8rban 2il and Gas 'istribution 7echnology, &hina 8niYersity of Petroleum, %eiMing 102249,
China
China 8niYersity of Petroleum (%eiMing) and SSringer-9erlag %erlin Heidelberg 2012

Abstract: In Sast decades dynamic Srogramming, genetic algorithms, ant colony oStimization algorithms
and some gradient algorithms haYe been aSSlied to Sower oStimization of gas SiSelines. In this SaSer a
Sower oStimization model for gas SiSelines is deYeloSed and an imSroYed Sarticle swarm oStimization
algorithm is aSSlied. %ased on the testing of the Sarameters inYolYed in the algorithm which need to be
dened articially, the Yalues of these Sarameters haYe been recommended which can maNe the algorithm
reach efciently the aSSro[imate oStimum solution with required accuracy. Some e[amSles haYe shown
that the relatiYe error of the Sarticle swarm oStimization oYer ant colony oStimization and dynamic
Srogramming is less than 1% and the comSutation time is much less than that of ant colony oStimization
and dynamic Srogramming.

Key words: Gas SiSeline, oSeration, oStimization, Sarticle swarm oStimization algorithm

1 Introduction
ComSressors SroYide the Sressure necessary to transSort
natural gas Yia a SiSeline. 7he Srime moYer consumes much
Sower when driYing the comSressor. So Sower oStimization is
Yery imSortant for imSroYing the oSerational economy of gas
SiSelines.
7he obMectiYe function of Sower oStimization is nonlinear and non-conYe[. Many constraints are non-linear.
It is difficult to solYe this Nind of oStimization Sroblems.
'ynamic Srogramming ('P) (:ong and Larson, 1968a
1968b Peretti and 7oth, 1982 Carter, 1998 5tos-Mercado
et al, 2006), articial intelligence (Sun et al, 2000) and some
gradient algorithms (Percell and 5yan, 198 :u et al, 2000)
haYe been aSSlied to Sower oStimization of gas SiSelines.
7hese methods are effectiYe. HoweYer, the aSSlication range
of traditional algorithms is limited and the comSutation
time is long. Particle swarm oStimization (PS2) algorithm
is a colony intelligence calculation technique deYeloSed by
Kennedy and (berhart in 1995. It is insSired by the social
behaYior of organisms such as bird ocNing (<u et al, 2009).
7he PS2 belongs to eYolution algorithms. LiNe genetic
algorithm it also begins with some random solutions and
searches for the oStimum solution by iteratiYe comSutation.
7he PS2 also eYaluates solutions by the tness function, but
it does not haYe the Srocess of crossoYer and mutation. 7he
PS2 searches for the oStimum solution by tracNing the best
Sositions of indiYidual and colony after eYolution for one
CorresSonding author. email: wuchangchun#YiS.sina.com
5eceiYed ASril 15, 2011

generation. %ecause the conYergence of PS2 is fast and the


accuracy is high, the researchers Say much attention to the
PS2. It is one of the most SoSular oStimization algorithms
Sresently (9an den %ergh and (ngelbrecht, 2006 Liu et al,
200 Perez and %ehdinan, 200 Chen et al, 2010).
In this SaSer an imSroYed PS2 is introduced. %ecause
the colony information is Yery imSortant, after eYolution for
one generation, the best Sosition of the Sarticle swarm will
be sought again n times around itself. If a better Sosition
can be found, it will be the new best Sosition of the Sarticle
swarm. If no better Sosition can be found, the best Sosition
of the Sarticle swarm will not be changed. It is good for
the algorithm to aYoid local solutions effectiYely and the
accuracy can be imSroYed. 7he imSroYed PS2 is aSSlied to
the Sower oStimization of gas SiSelines. Some Sarameters
of the algorithm are tested in order to get the most fitting
Yalues for the Sower oStimization. Some cases show that the
comSutation time can be signicantly saYed comSared to ant
colony oStimization (AC2) and 'P.

2 Power optimization model of gas pipelines


In Sower oStimization of a gas SiSeline (as shown in
)ig. 1), the obMectiYe function is minimizing the total energy
consumed by all the comSressor units and the decision
Yariables are the discharge Sressures of comSressor stations.
7he constraints include hydraulic constraints and thermal
constraints of gas ow in the SiSe, the characteristic equations
of comSressors, the ma[imum allowable discharge Sressure
and the minimum allowable suction Sressure of comSressor
stations, the minimum allowable deliYery Sressure at the
deliYery terminal, the flow rate and sSeed limits of eYery

Pet.Sci.(2012)9:89-92

90

online comSressor, etc. 7he Sroblem can be formulated as


follows:
QXP _ VWD

min )cos W

LN

L 1

UL

N -

S P 1
P
5= L7L (( d ) P  1)  KLN  Kr )  (min
P 1
Ss

V.W.
Sd 2  Se 2

I4 2

Sd d Sma[
Smin1 d Ss
Smin 2 d SdeliYery
+ LN

KLN

D0 (

QLN 2
Q
)  D 1 4LN LN  D24LN 2
Q0LN
Q0LN

E0  E14LN

(1)

Q0LN
Q
 E2 4LN 2 ( 0LN )2
QLN
QLN

4min, LN d 4LN d 4ma[, LN


Qmin, LN d QLN d Qma[, LN
where num_sta reSresents the number of comSressor stations
along the SiSeline system J reSresents the number of online

comSressor units in each comSressor station Q is the Yolume


ow rate in the SiSeline, ms m is the gas adiabatic inde[
R is the gas constant, N-(Nmol.K) i is the density of the
natural gas at the suction condition of station i, Ngm Z is
the gas comSressibility factor T is the gas temSerature at the
suction condition of the stations, K Hik is the adiabatic head,
N-Ng ik reSresents the adiabatic efficiency of comSressor
k in station i r reSresents the efciency of the gas turbine
Emin is the low caloric Yalue of gas, N-m pd and ps are the
discharge Sressure and the suction Sressure of a comSressor
station, Pa pe is the end Sressure of a SiSe segment between
comSressor stations, Pa p deliYery is the suSSly Sressure at
the deliYery terminal, Pa pma[ is the ma[imum allowable
discharge Sressure of a comSressor station, Pa pmin1 is the
minimum allowable suction Sressure of a comSressor station,
Pa pmin2 is the minimum allowable deliYery Sressure at the
deliYery terminal, Pa f reSresents the resistance of SiSe
segments between comSressor stations a0, a1, a2, b0, b1, b2
are coefficients of characteristic equations for a centrifugal
comSressor n0ik and nik reSresent the rated sSeed and the
actual sSeed of comSressor k in station i, resSectiYely, rSm
nmin,ik and nma[,ik are the minimum sSeed and the ma[imum
sSeed of comSressor k in station i, rSm Qmin,ik and Qma[,ik are
the surge ow rate and the stonewall ow rate of comSressor
k in station i, ms.

Compressor station

Gas
source

Delivery

terminal

Fig. 1 A gas SiSeline system

3 PSO algorithm

3.2 An improved PSO algorithm

3.1 Traditional PSO algorithm


A Sarticle swarm containing M Sarticles flies in D
dimensional sSace. xi ( xi1 , xi 2 , xi  , , xiD ) reSresents the
Sosition of Sarticle i in the sSace. vi (vi1 , vi 2 , vi  , , viD )
reSresents the Yelocity of Sarticle i. pi ( pi1 , pi 2 , pi  ,, piD )
and pg ( pg1 , pg 2 , pg  ,, pgD ) are the best Sositions of
Sarticle i and the Sarticle swarm Sresently. 7he Yelocity
and Sosition of Sarticle i in the sSace are adMusted by the
following equations (Du and Li, 2008).

YLG , W

ZYLG , W 1  F1U1 ( SLG , W 1  [LG , W 1 )  F2 U2 ( SJG , W 1  [LG , W 1 )


(2)

[LG , W

[LG , W 1  YLG , W

()

w h e r e i 1, 2, , M  d 1, 2,, D  t r e S r e s e n t s t h e
eYolution generation uS to now w reSresents the weight
factor c1 and c2 are the acceleration constants r1 and r2 are
the random numbers between [0, 1].

%ecause the traditional PS2 may conYerge to a local


oStimum solution and the accuracy is Soor (-iang et al, 200),
an imSroYed PS2 is introduced here.
)rom (q. (2) it can be seen that the Sarticles are uSdated
by tracNing the best Sositions of indiYiduals and the colony.
So the two best Sositions are Yery imSortant for the algorithm.
7he acceleration constants c1 and c2 reSresent the biggest
steS ying to the best Sositions of indiYiduals and the colony,
resSectiYely. 7he inuence of indiYiduals and the colony on
the Sarticles is decided by them. If c1 0, the Sarticles only
haYe colony e[Serience, the conYergence will be Yery fast
and may obtain a local solution. If c2 0, the Sarticles do
not haYe colony e[Seriences, the Sarticles fly in the sSace
indeSendently, the oStimum solution can not be obtained.
7he colony information is Yery imSortant for the algorithm
to obtain the global solution. So in the imSroYed PS2 after
eYery iteratiYe comSutation the best Sosition of the Sarticle
swarm will be sought again around itself. If a better Sosition
can be found, it will be the new best Sosition of the Sarticle
swarm. If no better Sosition can be found after searching for
n times, the best Sosition of the Sarticle swarm will not be
changed. 7he searching Srocess around pg is as follows:

Pet.Sci.(2012)9:89-92

S JG

91

S JG (1  (2 UDQG  1) P )

(4)

P Pint D  Pmin

(5)

W
e[S(  0 u ( ) V )
(6)
7
where rand is a random number between [0, 1] t reSresents
the eYolution generation uS to now T reSresents the set total
eYolution generations S belongs to [1, 20] mmin can be set at
0.01 mint will be dened articially.
In the early stage, a is big, the searching steS is large, so
the conYergence is fast and is good for the algorithm to aYoid
the local solution. In the late stage, a is small, the searching
steS is small, the searching around the best Sosition of the
colony is accurate, so it is good for the algorithm to increase
the oStimization accuracy.
D

With c 1=1, c 2=1, n=0, when m int=0.5, 1, 2, , 4 the


oStimal obMectiYe Yalue obtained by the algorithm is smallest,
it equals 4.45 MW.
So the best combination of these Sarameters can be chosen
as c1=1, c2=1, n=0, mint=1.

5 Case analysis
)ig.  is the toSological structure of the gas SiSeline. 7he
SiSeline is comSosed of fiYe SiSe segments connected in
series by Ye comSressor stations and one deliYery terminal.
7he basic data of the SiSeline is shown in 7able 1.
Station 1 Station 2 Station 3 Station 4

Station 5 Delivery terminal

Fig. 3 ComSressor stations oYer the gas SiSeline

4 Testing about parameters of the algorithm


7he imSroYed PS2 is coded by )2575AN90. Some
Sarameters of the algorithm need to be set artificially and
the Yalues of the Sarameters should be t for the Sroblems to
be solYed. A case of gas SiSeline Sower oStimization with a
simSle toSological structure is taNen to test the Sarameters.
)ig. 2 is the toSological structure of the gas SiSeline.
7he gas SiSeline is comSosed of three comSressor stations
and one deliYery terminal. 7he gas source Sressure is 6.1
MPa at the suction of station 1. )or eYery comSressor station
the ma[imum allowable discharge Sressure is 10 MPa, and
the minimum allowable suction Sressure is 4. MPa. 7he
minimum allowable deliYery Sressure is 4 MPa at the end
of the SiSeline. 7he design flow rate is 2.106 md. 7he
SiSeline is 1,016 mm in outside diameter, 14.6 mm in wall
thicNness and 0.01 mm in SiSe roughness. 7he obMectiYe
function is minimizing the total Sower of all the comSressor
units and the decision Yariables are the discharge Sressures of
all the comSressor stations.
Station 2

Station 1

Table 1 %asic data for the SiSeline


PiSe segment resistances f

(1.4824, 1.154, 1.461,


2.1601, 2.296)108

Gas constant R, N-(NmolK)

8.14

Gas source Sressure, MPa

Ma[imum allowable discharge


Sressure pma[, MPa

.2

Minimum allowable suction Sressure pmin1, MPa

4.

Minimum allowable deliYery Sressure pmin2, MPa

4.2

According to the PS2, the oStimal oSeration scheme for


the ow rate of 1.15106 Ngh can be obtained.
7able 2 indicates that the discharge Sressures of all
stations e[ceSt Station 5 are .2 MPa, the ma[imum discharge
Sressure, and the discharge Sressure of Station 5 only needs
to assure that the Sressure at the deliYery terminal equals the
minimum allowable deliYery Sressure.
Table 2 2Stimal oSeration scheme

Station 3 Delivery terminal

Discharge Sressure, MPa

200 km

250 km

180 km

Fig. 2 7oSological structure of the gas SiSeline

7he Sarameters required to test include c1, c2, n, and mint.


According to the SroSerties of the algorithm, the best Sossible
Yalue of these Sarameters can be dened. With c1, c2 {0.2,
0.4, 0.6, 0.8, 1, 2, `, n {5, 10, 20, 0, 40, 50`, mint {0.5,
1, 2, , 4, 10`, the oStimal obMectiYe function Yalues will be
obserYed to select the best combination of these Sarameters.
)irstly we can choose n=40, mint=1, when c1=c2=0.6, 0.8,
1, 2 the oStimal obMectiYe Yalue obtained by the algorithm is
smallest, it equals 4.45 MW. c1=1, c2=1 can be dened.
With c1=1, c2=1, mint=1, when n=0, 40, 50 the oStimal
obMectiYe Yalue obtained by the algorithm is smallest, it equals
4.45 MW. 7o Sursue the shortest comSutation time n=0 is
dened.

7otal gas consumStion


md
Station 1 Station 2 Station  Station 4 Station 5
.2

.2

.2

.2

6.4

.28105

7o test the Serformance of the PS2 the oStimization


results of Ye ow rates obtained by PS2 are comSared with
AC2 and DP.
7able  shows for 5 stations the relatiYe error of PS2 oYer
AC2 and DP is less than 0.5%, but the comSutation time is 8
to 9 times less than that of AC2 and more than 60 times less
than that of DP.
When the stations are increased to 11, the oStimization
results of three algorithms are shown in 7able 4.
7able 4 shows for 11 stations the relatiYe error of PS2
oYer AC2 and DP is less than 1%, but the comSutation time
is 4 to  times less than that of AC2 and about 100 times less
than that of DP.

Pet.Sci.(2012)9:89-92

92
Table 3 7he oStimization results of three algorithms for 5 stations
)low rate
Ngh

ComSutation time, s

Gas consumStion, 105 md

PS2

AC2

DP

PS2

AC2

DP

24

209

12

1.5

1.50

1.50

1.00106

2

20

110

1.849

1.85

1.852

2

199

1446

2.226

2.22

2.20

1.1010

2

195

1544

2.69

2.690

2.689

1.15106

2

185

166

.28

.28

.282

9.510

1.0510

Table 4 7he oStimization results of three algorithms for 11 stations


)low rate
Ngh

ComSutation time, s

Gas consumStion, 105 md

PS2

AC2

DP

PS2

AC2

DP

9.510

10

21

102

.882

.864

.856

1.00106

106

509

115

4.81

4.89

4.81

1.05106

106

4

119

5.801

5.64

5.51

1.1010

106

445

115

6.86

6.8

6.826

1.1510

106

418

11150

8.181

8.145

8.14

When the stations are increased to 1, the oStimization


results of three algorithms are shown in 7able 5.
Table 5 7he oStimization results of three algorithms for 1 stations
)low rate
Ngh

ComSutation time, s

Gas consumStion, 105 md

PS2

AC2

DP

PS2

AC2

DP

166

1251

28262

6.85

6.1

6.6

1.00106

16

1114

0405

.88

.842

.810

1.05106

162

1069

29886

9.261

9.289

9.24

16

9

28560

10.958

11.010

10.968

162

649

2522

12.940

1.024

12.958

9.510

1.1010
1.1510

7able 5 shows for 1 stations the relatiYe error of PS2


oYer AC2 and DP is less than 1%, but the comSutation time
is 4 to 8 times less than that of AC2 and 10 times less than
that of DP.

6 Conclusions
In this SaSer an imSroYed PS2 algorithm is aSSlied to
gas SiSeline Sower oStimization. 7he oStimization results
obtained by the algorithm differ from those from AC2 and
DP by less than 1%, but the comSutation time can be saYed
greatly comSared with AC2 and DP. 7his will enable us to

design a fast and effectiYe decision aid tool to assist oSerators


to maNe aSSroSriate decisions within a shorter time. )or
different Ninds of oStimization Sroblems the Sarameters
inYolYed in the algorithm need to be tested, the Yalues
adoSted are those that can get better results. 7his research
encourages us to aSSly PS2 to gas networN oStimization and
other difcult oStimization Sroblems.

References
Carter 5 G. PiSeline oStimization: Dynamic Srogramming after 0 years.
In: 0th Annual Meeting PiSeline Simulation Interest GrouS (PSIG),
28-0 2ctober, DenYer, Colorado, 1998
Chen M 5, Li ;, =hang ;, et al. A noYel Sarticle swarm oStimizer
hybridized with e[tremal oStimization. ASSlied Soft ComSuting.
2010. 10(2): 6-
Du W L and Li %. Multi-strategy ensemble Sarticle swarm oStimization
for dynamic oStimization. Information Sciences. 2008. 18: 096109
-iang <, Hu 7 S, Huang C C, et al. An imSroYed Sarticle swarm
oStimization algorithm. ASSlied Mathematics and ComSutation.
200. 19: 21-29
Liu ; <, Liu H and Duan H C. Particle swarm oStimization based on
dynamic niche technology with aSSlications to conceStual design.
AdYances in (ngineering Software. 200. 8(10): 668-66
Percell P % and 5yan M -. Steady state oStimization of gas SiSeline
networN oSeration. In: Proceedings of the 19th PSIG annual meeting,
7ulsa, 2ctober, 198
Peretti A and 7oth P. 2Stimization of a SiSeline for the natural gas
transSort. (uroSean -ournal of 2Serational 5esearch. 1982. 11: 2454
Perez 5 ( and %ehdinan K. Particle swarm aSSroach for structural
design oStimization. ComSuters and Structures. 200. 85: 159-1588
5tos-Mercado 5 =, Kim S and %oyd ( A. (fcient oSeration of natural
gas transmission systems: A networN-based heuristic for cyclic
structures. ComSuters 2Serations 5esearch. 2006. : 22-251
Sun C K, 8raiNul 9, Chan C W, et al. An integrated e[Sert system
oSerations research aSSroach for the oStimization of natural
gas SiSeline oSerations. (ngineering ASSlications of Artificial
Intelligence. 2000. 1: 465-45
9an den %ergh ) and (ngelbrecht A P. A study of Sarticle swarm
oStimization Sarticle traMectories. Information Sciences. 2006. 16:
9-91
Wong P - and Larson 5 (. 2Stimization of natural gas SiSeline system
Yia dynamic Srogramming. I((( 7ransactions on Automatic
Control. 1968a. 5(AC-1): 45-81
Wong P - and Larson 5 (. 2Stimization of tree structured natural gas
transmission networNs. -ournal of Mathematical Analysis and
ASSlications. 1968b. 24(): 61-26
Wu S, 5tos-Mercado 5 =, %oyd ( A, et al. Model rela[ation for
the fuel cost minimization of steady state gas SiSeline networNs.
Mathematical and ComSuter Modelling. 2000. 1: 19-220
<u ; =, Wei = and Hai 7 =. A modied Sarticle swarm oStimization Yia
Sarticle Yisual modeling analysis. ComSuters and Mathematics with
ASSlications. 2009. 5: 2022-2029
(Edited by Sun Yanhua)

You might also like