scieee AI-readable full text Open interactive document viewer

Optimal Operation of Pipeline Transportation Systems

Camacho, Eduardo F.; Ridao Carlini, Miguel Ángel; Ternero Muñiz, Juan Antonio; Rodríguez, J.M.

Abstract

This paper presents a simulator of an oil pipeline for scheduling purposes. The simulator includes an algorithm for optimizing the energy operating costs. The optimization algorithm works in two steps. The first one consists of the computation of a function that measures the estimated mininltun cost to the goal node. This computation involves the use of Bellman's optimality principle and of some heuristic rules in order to avoid the combinatorial explosion. During the second step the optinltmum trajectory is obtained with the help of the function mentioned above and using an accurate simulation of the transportation system. The simulation considers those aspects which are relevant t.o the optimization problem and takes into account the following factors: topology and topography of the network. non-linear characteristics of pumps and pipelines, variable demands of consumers, time changing prices of electrical energy and hydraulic equations throughout the system. The simulator is being used by CAMPSA (the major oil distribution company in Spain) Some results obtained with an oil pipeline system in Northern Spain are presented in the paper.

Full text

Copyright © IFAC 11th ' rriennial World Congress. Tallinn. Estonia. USSR. 1990 CONTROL OF TRANSPORT A TION SYSTEMS OPTIMAL OPERATION OF PIPELINE TRANSPORTATION SYSTEMS E. F. Camacho*, M. A. Ridao*, J. A. Ternero* and J. M. Rodriguez** *Dpto. Ingenieria, Eleclronica, de Sistemas y Automatica, Escuela Superior Ingenieros Industriales, UlIiversidad de Sevilla, Spain **Dpto. Oleoductos-Operaciolles, C.A.M.P.S .A., SPain abstract. This paper presents a simulator of an oil pipeline for scheduling purposes. The simulator includes all algorithm for optimizing the energy operating costs. The optimizatioll algorithm works in two steps. The first one consists of the computation of a function that measures the estimated minimtull cost to the goal node. This computation involves the use of Bellman 's optimality principle and of some heuristic rules in order to avoid the combinatorial explosion. During the second step the optinltllll trajectory is obtained with the help of the function mentioned above and using !Ill accurate simulation of the tr!lllsportation system. The simulation considers those aspects which are relevant to the optimization problem and takes into account the following factors: topology and topography of the network, non-linear characteristics of pumps and pipelines, V!\.l·iable demands of conSlUuers. time changing prices of electrical energy and hydraulic equations throughout the system. The simulator is being used by CAMPSA (the major oil distribution company in Spain) Some results obtained with !Ill oil pipeline system in Northern Spain are presented in the paper. Keywords. Computer Aplication; Simulation; Tran sportation control; Optimization; Dynamic programming . INTRODUCTION One of the main ways of tr!lllsporting oil products is by pipeline networks. The products are transported through the pipeline from the input nodes, normally refineries or ports, to the output nodes where they are stored in tanks. From there. they are transported to the final consumers by trucks. As the products are injected into the system in different batches. at any given time different product.s, separated by the corresponding interfaces. cau be transported. The batches are routed through the network by opening or closing the appropiate set of ,ralYes. The mechanical energy needed for tr!lllsportation is supplied by a set of electrically powered pumps. The transportation velocity. for a parti('ul!ll' network and a given pipPiine state. depends on the number and the flow-head characteristics of the pumps working at each of the pumping stat.ions. The operation of a multi-fluid transportation system consists of determining the order and the way in which the different fluids are going to be transported to satisfy the demand. This task can be di'\'ided into two different problems. The first. one iln-olYes the determination of the approximate transportation needs. The so lution of this problem will consist of 455 • It. ba.t.ch seqlt('nce that . will minimize the number of int.erfaces and will cover the consumption needs at each destination 1I0de. • an approxilllat.e pumping schedule. The batch sequence consists of a list of batches each of which is defiued by the product identificat.ion, approximate departure time. t.he "olume dest.ined to each output uode and approximate al'l'ival t.ime to each termina.lnode. The second problem iuvolves det.ermining how to set the differC'ut. pumps and '\'al'\'es at each time inter'\'al so that the bat .ch sequence given above is carried out in a given period of time. This can be accomplished in different ways, that is, using different pump combinations and \1Ilve positions ( aud therefore flows at all point.s in the network ) in the different time intervals. This will turn into different batch al'l'iv1l1 t.imes, and different power operating costs as the price of electricity changes throughout the day and also friction losses and pump performances depend on the flow. The power costs can be subst . antial in big pipelines !Illd are increasing with respect to the total operating costs as shown iu (Basaval'aj, 1984). The interest of reducing or even bett.er. optimizing. these costs is therefore evident. The problem has been dealt wit.h in the literature, especially for mono-fluid transportat .ion systems, as is the case of water distribution syst.ems (Coulbeck. 19i8), (Millaoka et al. HI84). However, even in this case, the optimizatiun problem leads to a dynamic and non-linear problem of high dimension as stated in (I\emplous et al. 1986). In t.his last reference an optimizat.ion algorithm that works at t.wo levels has been proposed. At the upper level the dynamic problem is solwd and sume data passed to the lower level where the static problem is solved giving the munber of pumps turned-on in the pumping station. This article presents a simulator to be used by a pipeline sehedul('r ill order to facilitate the operation of pipelines !11Id optimize the power bill. Th(' optimization algorithm has been d('wlop('d by the authors and has been t.ested with models in a pre\ 'ious paper (Camacho et ai, 1989). In this paper an applicatioll of t.he simulator to a real oil pipeline is presented. PIPELINE MODEL The main objet.ive of the modE"l presented in this paper is tu SE"rvE" as a tool for schedulers. Given a pumping seqUE"ncE" and an initial statE" for the pipeline, the user should be able to simulate with reasonable accuracy the arrival timE" of tilt' diffE"rent batches at the terminals. the state of thE" pipelinE" at. any given moment, and the E"volution of tlw IE"vel at. the terminals, in order to judge whether the pumping schedule fulfills the needs of the terminals. Only those aspects of the pipeline relevant to schedulers were considered. Bearing this in mind. a steady state model has been chosell. This model is valid for using with pipeline networks with just one ent.rance point for the product (tree topology). Many real pipE"lines take this form. On the other hand, the normal method of operating more complex pipelines can be thougt .h of as various tree topology pipelines working together. The t.opology of a pipeline network is defined by its component part.s. The different part.s included in the model are as follows: • Pumping station : including the different component pumps and the way in which they are connected. Each of these pumps is associated to their COlTE"sponding characteristic Clll'WS Head-Flow and Power-Flow. • Terminals: E"ach of thE" terminals contains a SE"t of storagE" tanks for the products and an out-let valve from the pipeline to thE" t.anks. The capacit .y of each of these tanks must be known. • Vah'es : maximum pressure valves. normally placed at the out-let of the pumping station. • Bifurcations • Pipeline sections One aspect to be considered when making a model is defining the topographical profile of the ground , which is of great importance for calculating t.he pressure drop. The calculation of the hydraulic gradient throughout a pipeline is principally obtained by two fact.ors: the discharge pressure at the pumping station and prE"ssure drop due t.o 450 friction on the pipelines. The discharge pressure at the pumping station is obtainE"d by interpolating on the characteristic CUlTes. \Vith respect to the pressure drop due to friction, there is no standard calculation method in the industry . each pipelinE" ('ompallY has its own methods. The Hazen-\Yilliams equation has been used here. The pressure drop is determined using the following equation (1 ) Where: C : Coefficient of Hazen-\Villiams e quation .J : Pressure drop in meter s per kilomet re D : Interior diameter of the pipeline in milimetres f: Product viscosity in centistokes Q : Flow along a section in cuhic n1Ptres per hour This equation gives good res ults in the Reynolds mUllber rauge found in oil pipelines. The ach'antage of this method against. others based on the D' Arcy-\Veisbach equation which normally requires iterative solution methods, is it s greater speed of calculation. The greatest difficulty when using the Hazell-\Villiams equa - tiOll is in determining the cons tant C which depends on such factors as t.he degr ee of cleansliness and wear and tear on the pipeline. By looking at the power flow characteristics of the pumps onE' eau see that the pumps power consumption grows slowly with the flow. Therefore from the point of view of energy saving, the best re sult s are obtained when the maximum flow is selected for a particular combination of pUlnps. The hydraulic gradient has to exce ed the maximulll ground ('Ie\'ation transversed by the pipeline. As the hydraulic gradient dE'creasE's with flo w. th er E' is a maximum flow which is compatible with th e hydraulic gradient exceeding thE' ground elevation at all points along the pipeline. III order to calculate th e maximum fluw ill the mod e l. the preassurE' drop cur\'(' for different fluws is determined iterati\'ely until the maximum admis sable flO\\' is obtained . As well as the model of the phy sical characteristics of the pipeline. models of set s of exte rnal e ff ects which influence the beha\'iour mode uf th e pipeline ar e necessary. The most importants on E'S being: • "ariable tank cons umption: the chosen model presumes constant tank cons umption on working days and zprn COllStllllptioll on thp othprs. • Description of the c ontract with the electricity compa.lly: At pr ese nt. th e model uses three electricity rates. • Prefixed time inter\'als ,,·hen the pipeline is not in use. SIMULATION MODES Tllf'rf' Rrf' two posiblf' WRyS of working the simulator: • Automatically. In this case all the actions such as the connection and disconne ct ion of the pUlnps, the positioning of the yalves. etc .. are taken by the program in onler to optimize t he electricity bill. • l\lmlUally. Th e user is in charge of taking all the neccssary actions. As has been mentioned before. only the steady states lire considered. To simplify the problem of calculating the evolution of the state of the pipeline with time, a discrete form of simulation has been considered. supposing stationary working as long as there is no qualitati,-e change in the situation. The calculation is considerbly reduced in this way. The main events are: • The arrival of the interfaces at the components. • Tauk levels reaching limits. • Changes in electrical tariffs. • Shut-down of the system. • Instalation starting up. • P er iodk events. The periodic eyents are introduced to guarantee that the time interval between t.wo consecuth'e ewnts is small. In this case . the pipeline sta te does not change substancially from 0I1f' p,-ent to the next. and the pipeline statf' can be consider ed constant between two consecutives events. The silllulator will function as follows: a) Read the data on thp files and obtain tllf' initial configuration of the system. b) Adjust the diff ere nt parameters of the system either mRnually or using the optimizer. The simulator allows information to bpcome available to the user. c) Calculate the preassure and flow values throughout the pipeline . d) Calculate th(' tim(' III which the next event will take plac('. e) "-i t h the oht ained time calcula te the ,-a lue s of the new st"t" of the pipeline. f) Retul'll to (h). Another possibility allowed by the simulator is to go to "n event previously calculated. In this way. the user can an"lyst' a solution jne"iously obtained. It is also possible to mak e lllodifications starting from previous en'nts. Becaus e of the great amount of data which it is necessary to storp of a complete state of the pipeline. only the 457 variables which take a longer computation time and the modifications from one state to "nother are stored. The rest of the variables are calculated. In this way. a compromise between necessary storage memory and calculating time used has been reached. Another important feature of the se types of tools is the interfAce with the user. The program uses coloured graphical repres e ntations of the state of the pipeline. The graphics are oht . ained in n completely automatic ,,-ar using the dat.a r(,Ad from the files. The included graphics ar": • Pipeline topology and repre se ntation of the position of the batches. • Pumping st.ations. • Hydraulic grAdient. • Tanks level at. terminals. • Evolution of the 1(" -1" 1 in the tanks. The program is also capable of prO\-iding print information ahout different. it.ems: • Stat . (' of [ltllnping stat.ions. • Stat.e of tenniuab. • Pumping station reports. • Tenniual operation reports. • Graphical representation of the hydraulic gradient. • Graphical represt'ntation of th e en)lution of the level of t.he terminals. OPTIMIZATION ALGORITHM The problem consists of finding out how to set the pumps and vah'es at each tim e intetTal in order to deliver the produ cts to the terminal at appropiate rates with mininl\lln electricity costs. In the following the system will be considered to be operated in the" stripping" mode. That is. each output node is workiug with an input flow proportional to the "lllount of product that the terminal has to recei'-e from the current batch. Thi s method of operating is widely considered as the best way of using the traw;portation capabiliti('s of the pipelines. Notice that if the stripping mod(' is USP(1. the amount of product stripped at ",,,ch terminal dep e nd s on the batch passing at t hat moment . Therefore. for a given pipeline state the flo"- at each terminal. and at each bifurcation node . cau be computed knowing the flow at the entry node . The pipeline statt' can be computed from the "olume injected into the ('ntrr node and th e batch sequence. When operating in the stripping mode the future evolution of the system can be computed if the following items are known . • amount of product. which has been pumped (v) • the time used (t) • the setting of the pumps • the flow at the entry nod e. The state of the system can, therefore , be resumed by the pair (v,t). The control variables are the pump setting and the flow at the entry point. By looking at typical characteristics of pump power consumption -flow, it is clear that the power consumption of the pumps grows slowly with the flow and depends mainly on the pump being connected or not . Therefore, from the power optimization point of view, the best results will be obtained when the maximum flow is chosen. Taking into account these considerations, the control variables will be a vector of dimension equal to the number of pumps in the system containing a logical value which will indicate if the corresponding pump is active. The number of combinations of the previously mentioned vector can be reduced for pumping station s with identical pumps. In this last case, knowing the number of pumps connected ( in series or parallel ) is enough . The working space will be the state plane v-t and the optimum control problem will consist at determining an optimum trajectory in the plane v-t from point (0,0) to point (target-volume , target-time). The feasi ble trajectorie s are constrained by two curves as indicated in figure 1. The upper one is the curve resulting :5 '5 OO G,- '-- -- -- -- I V I when pumping the batch sequence using the maximum capabilities of the system. Notice the horizontal pieces of the curve corresponding to intervals where the pumps have to st.op either to avoid tank overflow or due to maintenance shut-down of the system. The lower curve is computed taking into account the minimum pumped amount at each interval in order to satisfy the needs and taking into account the pumping capabilities of the system . The optimization algorithm uses the cost function: (2) where .1' v, t is the state vector and consists of a pair (volume,time), 9(.l'v.,} is a function representing the minimum cost from the origin to node J· v.t and h( xv,d is a function that - estimates the minimum cost from .r v.t to a goal node . That is, 1(.1' v, t) is an est.imate of the cost of the minimal ('ost path constrained to go through node xv." The optimization algorithm works in two steps . In the first one the function h( ,r v ,, ) is computed on a grid by using Bellman 's Optimalit.y Principle and in the second one t.he opt.imum path is found by using this function and an accurate simulation of the transportation system . In the first step of the algorithm, function h( x v, ,) is made equal to zero for all .t v ,' with volume equal or greater than the tal ' get volume . The next step for estimating the function h(. l' v. ') is to compute 811 states XV "" from where ; 1" ' .' can he reached . Notice that if the volume difference 61' = l' - Vt is small, the pipe state will be practically the same . Therefore , for a given pump combination the flow will be very similar and can be considered constant. In order to avoid the combinatorial explosion, a procedure .... . -- - - :=.::~ .. .- ,.- . . ' l i 1 22 000 ~ -_ .. - - .. - .- ". -- ~ --- ." .-::~ .":" . -.- ~-. - ~.- .- ---- -1 ; ,-' .• .. - l H OOO f- -- -- -- _=- ..,..,~ .- -- --- ---T----_ _ _ ...... , . ......,; .. . -.- CL""' ~- . ----- - . . --' U . -- 2 ~ - -- - - .- . --- -- ._- 95 T Fig, 1. Feasible Optimization Space Stat.e and Optimwn trajectory. 458 rl3'r ____ ~9~'~K"~ . ______ ~ aB Km ~ : . Km MlR BUR PAL VAl Fig. 2. BILVA Pipeline. for eliminating states is used. At first. the procedure eliminates the trivial states , and then a set of heuristic rules are used to deci(\e which states are "the best" for the next step of the algorithm . A state J' ,'.t is considered to be tri"ial if there is another state .1' , .• t, with t, ~ t and h(.r".I) ~ h(.rv.I,). Notice that state .1' ,' .1 could be reached from ,r v.t, by switching off all I. he pumps between ti and t (with cost zero) and the function h(.rv,,)will therefore be equal to h(.rv,t,). Once all trivial state have been eliminated , a second elimination procedure takes place in order to obtain a feasible amount of states for the next step. Once the function h( ,I' v. l) has been computed over the grid , the second step of the algorithm can be carried out . It consist.s of computing , at each interval and for all possible pumping combinations , the accumulated cost to the next event 9(.1' ",1 ) plus the estimated cost to the goal node h( .r ,. ,,). The function h(.I' ". ,) is calculated by a linear interpolation ill the grid computed in the first part of the algorithm. The accumulated cost. is computed by using an accurate simulation of the pipeline network. It involves the computation of pressure drops. flow. power consumption etc. alld it takes into account the non-line ar characteristies of pumps and pipelineR as we ll as different electricity tariffs throughout the day. F ';;':::=- = =--: -"- ._ .. _- ." -'-- .. . - - . t O ~ - -'~ : '- ~ = =[ ~: --~- APPLICATION TO OIL PIPELINES The simulator and the optimization algorithm has been included in a program developed for CAMPSA. The program can be applied to any pipeline transportation system with only one entry node. The algorithm has been tested with the model of an oil pipeline shown in figure 2, corresponding to the pipeline BILVA, running in Northern Spain . The pipeline has four terminals and two pump stations . The first one , shown in figure 3, has three booster pumps operating in parallel and four main pumps operating in series. The second one has three main pumps operating ill series. The three booster pumps have identical characteristics, and so do the main pumps at the first pumping station , The three main pumps at the second pumping st a tion ar e also identical. Five types of products , two types of gasoline, two types of diesel oil and kerosene. were considered. The algorithm has beell tested with different cases. Table I shows on e of the batch sequences used in the tests . Figure 1 corresponds to the solution in a case covering the batch schedule during ten days. Notice that the upper ('un 'e has a few horizontal pieces corresponding to points where t. he tanks would overflow if the pumping continued at maximum flow. The different slopes in the cun'es correspond to different flows due to different pumping conditi ons as fluids in the Fig . 3. Pumping Station. 459 .TABLE 1. Batch Sequence. B URGOS ( .1, ) PALES;; ( ;: ) VAL LAD (X) 7. 84 e.0e 76.48 7800 43.59 5.13 0.00 51. 28 SO / 026 / 97 25000 29.60 10.00 e,M 54, 4~ SO/029IRD 200 0. e0 ~, ~~ 0.00 0,00 l1S00 e. 30 1. ,0 ",40 91. 2e TABLE 2. Optimal Solutions. INITIAL DATE TARGET TInE (HOU R S) TAR ' jET ' JGL'JM, .: ~3 ., ':' j-:.T ( PTS. ) 0: 00 1/ 6/S'l 120 0: ee 1/6/ 39 144 0: 00 1I./S9 168 0: 0a 1/6/ 89 192 0: 0a 1/6/ 89 240 0: 00 1/ 6/39 288 0: 00 1/ 6/ 89 36 0 pipeline and flows III the output terminals c hang e with sta te. The lower curve corresponds. as me ntioned before, to the minimum volume t hat has to be pumped at each time interval in order to s ati sfy the cons umers ' needs. Notice that the pipeline is kept switch off and that the maximum flow is used in order t. o pump the target volume in th e prescri bed time. Tllf' t.hicker linp corres ponds to th e optimum trajectory. It can be seen that. t.he solut.i on invo lw s shutt.ing down all pump s during peak h ours. and using high flow co mbinat.ions during valley periods. Good p('onomical results h aw been achi ew d using the al- !1:orithm in thp manag(:'ment of the oil pipeline. Tabl e II shows t.he different so luti ons obtained w h(:'n us ing different. target . t.imes. As the target tim e incr eases the products can bp tnm s ported during o ff -p pa k hour s and the cost therefore decreases. Th e energy cost has been reduced in approximately 20 per ('(-'nt from an initial solutio n. CONCLUSIONS A s imulator of oil pipeline networks ha s been pre sented. Th e s imulator ha s been d ew lopecl to help scheclulers to operate the pipeline and includes an algorithm for the optimization of th e power costs. The algorithm uses a function th at meaS Ul 'es the estim ated minimum cost to the gmd nod e ami an ac(' ur a t e ~ imul a t ion of t he transport ation system. The algo rithm has been tested with success in an o il pip elinp in :\orth en Spai n. 460 S5eee 5se~e 550eB 55000 55000 55 '~00 1. 243.227 1. 095, 26~ 1.019. 276 981. 075 ~43. 386 834.113 832. 980 ACKNOWLEDGEMENT The authors would like to ackno wl edge the finant.ial support of CAl\.JPSA f or this work and also to thank S. Heras and R. LLorent e of t.he Depa rtam en to cle Oleo duct os y Operaciolles of CAMPSA for their ,'alliable comments, Furt.her thanks is due to F. J. "ida!. C. del "alle, J. Gom ez and R, l\lill<\n for their collaboration. REFERENCES B asa"a raj . B.H . (1984) Cut pipeline power cost by dema nd ('(llltro!. Oil fj Ca ,. Jo·tLrnal. Jan. pp. 88-90. Bm ' ham C.G. (1983) Rate Schedule Applic at ion -Off Peak Operation of Pump Station . Pr oc. of the Pipeline Engineenng Sym.po .• ill:rn. pp. 11-1G , Hous ton . Texas. Coulbeck B. and ~1. Sterling. (1978) Optimizated Contr ol of W ate r Dist ributi on System s. Pr oc . IEEE. '-01. 122. N. 2. I~l e lllp o u s R. , }. Kot\\'osk y. J. :\ik ode m and J. Cla siewicz. (198G). W ater Dis tributi on Systems. Component~. In~tr-tL  ment •• and T ec hnique,. for Low Co~t A (Llom atlOn fj Application, •. pp. 341-331. " alencia (Spain). ~liyaoka S .. ~1. Funaba shi. ( 19 84) Optimal Control of\Vat er Distribution Systems by :\etwork Flow Theory. IEEE Tran"nc ti on on Au.to m.a. tic Control. \' o !. AC-29. ;\, 4. pp. 303-311. C'alllachoE.F .. ~1.A. Ri daoa nd J.A. T ernero( 1989) Power Optimization of ~ lult ifllli d Tr anspu rta tion Systems. Proc. of INCOM·S9. ~Iadri(l ( Spain) ,