Shaanxi-Beijing natural gas line shows power cost optimization

Aug. 7, 2006
Effective optimization of natural gas pipeline energy costs over time should assume neither steady-state operation nor indefinite operation at near-capacity flow rates.

Effective optimization of natural gas pipeline energy costs over time should assume neither steady-state operation nor indefinite operation at near-capacity flow rates.

The Shaanxi-Beijing natural gas pipeline is the first to use intermediate compressor stations in China. With one reciprocating compressor station and three centrifugal compressor stations, the pipeline has a capacity of about 3.6 bcm/year (363.2 MMcfd). Increased gas demand in Beijing and the commissioning of three underground gas storage facilities connected to the pipeline cause it to operate in a rough steady state near capacity for most of the year.

A dynamic programming model allowed for establishment of optimal steady operation of the pipeline and achievement of minimal energy costs. The model defined the outlet pressures of each compressor station as state variables and compression ratios as decision variables. The model’s optimal solutions showed energy costs could be reduced by finding the point of optimal operation for each flow rate of the pipeline. The model also showed that optimal operation could reduce energy costs by more than 20% compared with traditional operating modes.

Analysis of the optimal solutions also revealed guidelines for optimal operation of gas pipelines in general.


Originating at the Qinbian station and terminating at Yamenkou in Beijing (Fig.1), the main pipeline measures 847.7 km, with 660-mm OD, and 6.4 MPa design pressure. It entered Phase 1 service in October 1997 without intermediate compressors. Increasing demand for natural gas forced the addition of four intermediate compressor stations in three additional phases.

Click here to enlarge image

Phase 2 established a compressor station at Yulin with four gas-powered reciprocating compressors.

Phase 3 equipped the Fugu compressor station with three gas turbine-driven centrifugal compressors and set up three electric motor-driven centrifugal compressors at Yingxian. It also added a unit at Yulin to coordinate the capacities of each compressor station.

Phase 4, completed in November 2003, constructed the Lingqiu compressor station with two gas turbine-driven centrifugal compressors, bringing the pipeline to its current capacity. Industry standards in China dictate a temperature base of 20° C. and absolute pressure base of 101,325 Pa.

Each compressor station connects its units in parallel. Two gas sources supply natural gas to the pipeline, one at Jingbian and another at Yulin station. Two branch lines receive gas at the Liulihe delivery station, one directed to the Yanshan refinery and another to four underground storage facilities at the Dagang oil field, more than 200 km from the station.

Winter in Beijing can push daily gas demand to ten times the level seen in summer, making peak shaving a top priority. The underground storage facilities perform the bulk of this role, receiving gas from the mainline in summer and delivering gas to Beijing in winter.

Using all four underground storage facilities keeps the pipeline at steady state and nearly full load for most of the year.

Under fully loaded operating conditions, however, energy consumption of the four compressor stations comprises a significant portion of the operational cost of the pipeline. Internal coating of pipes, high operating pressure, and efficient compressor units can all be used to reduce energy consumption in a pipeline under construction. But an already operating pipeline must optimize its power use through modifying its modes of operation.

Steady state

The various upsets to which an operating pipeline is exposed cause fluctuations in operating parameters, making truly steady-state operation rare. Operational steady state is only an approximation of the theoretical steady state in which operating parameters have limited fluctuations during extended operation. In this article, “steady state” refers to the quasisteady operational state.

The flow rates of each section of the pipeline, the pressure and temperature of natural gas received at the initial station, the minimum allowable inlet pressure of the terminal, and the temperatures of natural gas received at each intermediate receipt station set the parameters of an optimal operating scenario that minimizes energy cost.

In this context, the combination of compressors in use at each compressor station, the rotating speed of each operating compressor, the outlet pressure and the outlet temperature of the initial station, the inlet pressure and the inlet temperature of the terminal, the compression ratios of each compressor station, the inlet pressures and the inlet temperatures of each intermediate station, as well as their outlet pressures and outlet temperatures, help determine steady-state operating scenarios.

Optimizing power use in these scenarios generally requires optimizing the energy used to drive online compressors. The Shaanxi-Beijing compressors in Yingxian are electrically powered, with compressors at the other stations powered by natural gas pulled from the line. The different energy sources define power optimization for the line as minimizing total energy cost for a unit of time.

Dynamic programming

The Shaanxi-Beijing gas pipeline mainline is a typical “gun-barrel” system, making its power optimization addressable by dynamic programming under steady-state operation.

Power optimization consists of two interrelated levels: the pipeline level and the compressor station level. The pipeline as a whole must optimize the outlet pressures of each compressor, and the compressor stations, given certain inlet and outlet pressures for each, must optimize their own efficiencies.

Solving the power optimization problem by dynamic programming, the pipeline level calls repeatedly to each of the compressor stations. Each compressor station of the Shaanxi-to-Beijing pipeline has no more than five compressor units of the same type and size. Theoretical analysis and operational experience shows, therefore, that placing each online unit of a given station in the same state will provide the optimal operational mode for that compressor station.

Because exhaustive enumeration can easily determine optimal operation at the compressor station level, the balance of this article focuses instead on the pipeline level.

Click here to enlarge image

At the pipeline level, the accompanying equation box describes the dynamic programming model for Shaanxi-Beijing pipeline power optimization.

Beginning with the initial state x1, the traditional recursive algorithm solves the model. The algorithm derives the minimum total energy cost between x1 and terminal state, x5. Backtracking then gives the optimal operating scenario corresponding to that minimum.

The recursive process addresses the outlet pressure of each compressor station discretely.

Fig. 1 shows that x1 decides the inlet pressure of Yulin because the flow rate through the pipe section from Jingbian to Yulin is a constant.

The model and its algorithm provided the basis for computer software (SJGPOPT) developed specifically for power optimization of Shaanxi-Beijing gas pipeline, helping dispatchers plot and execute accurate operational schedules.


Two examples show the effectiveness of the above model and its algorithm for the Shaanxi-Beijing gas pipeline; one is for full-load operation, the other for operation at less than full load. The price of natural gas as compressor fuel is set at 0.66 yuan/cu m. The electricity price is set at 0.45 yuan/kw-hr. (Editor’s note: As of July 21, 2006, 1 yuan = $0.125.)

Click here to enlarge image

In the first example, the flow rate from Yulin to Liulihe is 10.685 million cu m/day, the capacity of the pipeline. Table 1 shows the optimal operating scenario at this flow rate, yielding a minimum energy cost of 232,709 yuan/day.

The same conditions as the optimal scenario yield an actual operating cost (recorded in a daily operation report) of 237,700 yuan/day. Table 2 shows the actual scenario.

Click here to enlarge image

The energy cost of the optimal scenario lies just 2.15% lower than actual use. This difference is not significant. But the maximum-capacity flow rate allows little freedom for changing the operational scenario.

Click here to enlarge image

Fig. 2 indicates that the difference between these two scenarios occurs in the section between Yingxian and Lingqiu.

Click here to enlarge image

The second example uses a flow rate from Yulin to Liulihe of 8.183 million cu m/day, which was also experienced in daily operations. Table 3 shows the optimal operating scenario, with a minimum energy cost of 89,509 yuan/day. Actual operations, however, saw a recorded energy cost of 120,320 yuan/day (Table 4), a difference of 34.41%. The relative expense of electricity as compared to natural gas created this difference.

Click here to enlarge image

The difference in total horsepower between the two scenarios is only 0.623%; negligible in engineering terms. The optimal scenario, however, bypasses Yingxian compressor station, placing a high load at Fugu and an outlet pressure equal to the line’s maximum allowable operating pressure. The shutdown of Yingxian also substantially reduced the energy cost.

Click here to enlarge image

Fig. 3 indicates the significant difference between pressure profiles of these two scenarios. Although the Shaanxi-Beijing gas pipeline has operated at full load for most of time since 2003 and the flow rate considered in the second example is significantly less than its capacity, it has nonetheless occasionally appeared.

The second Shaanxi-to-Beijing gas pipeline began operations in late 2005, lowering flow rates and raising the significance of the second example.


Thanks to masters students, Nao Beinan, Yang Tingsheng, and Zhang Xudong, for their contributions to the mathematical model, the algorithms, and the computer software involved in this paper.

The authors

Click here to enlarge image

Changchun Wu is a professor at China University of Petroleum at Beijing, where he has taught since 1985. His research interests include process simulation and optimization of oil and gas pipelines and engineering economics of oil and gas pipelines. He holds BS (1982) and MS (1985) degrees in petroleum storage and transportation from China University of Petroluem.

Click here to enlarge image

Peng Zhang is the head of the pipeline operation division of Beijing Huayou Natural Gas Co. Ltd., overseeing dispatching and operation of the Shaanxi-Beijing gas pipeline since 1997. He received BSE and MSE degrees in petroleum storage and transportation engineering from China University of Petroleum at Beijing in 1990 and 1993, respectively. In 2002 he began a PhD program in petroleum storage and transportation engineering at China University of Petroleum.

Click here to enlarge image

Hongsheng Cui is a senior engineer at PetroChina Ltd. His current responsibilities include planning and management of research projects in petroleum pipeline and natural gas engineering. Prior to this appointment, he held positions in the editorial department of Petroleum Industry Press and the department of petroleum storage, transportation, and marketing at PetroChina Ltd. He received BSE and MSE degrees in petroleum engineering from Yangtze University in 1987 and 2002, respectively. In 2004 he began a PhD program in petroleum storage and transportation engineering at China University of Petroleum at Beijing.