# Nonlinear Steady-State Optimization of Large-Scale Gas Transmission Networks

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Literature Review

## 3. Steady-State Optimization

## 4. Optimization Problem—Formulation

^{3}/h);

_{i}—power consumption for the i-th compressor station (W);

_{d,i}—discharge pressure for the i-th compressor station (Pa);

_{s,i}—suction pressure in for the i-th compressor station (Pa);

#### 4.1. Constraints

**A**—the nodal–branch incidence matrix (dim

**A**= n × m);

**P**—the vector of squared nodal pressures (dim

**P**= n × 1);

**K**—the unit–nodal incidence matrix (dim

**K**= n × r);

**F**—the vector of flows through units, (dim

**F**= r × 1);

**L**—the vector of loads;

**Δ**

**P**—the vector of squared drop pressures (dim

**Δ**

**P**= m × 1);

**K**

_{f}—the vector of pipe constants (dim

**K**

_{f}= m × 1);

**Q**—the vector of flows through pipes (dim

**Q**= m × 1).

^{T}have a large number of zero elements, thus making their full representation very inefficient. This could be reduced by using

**sparse matrix**techniques. This method only uses the nonzero elements of a matrix. Let us use an example to illustrate the necessity of these methods. Taking the degree (the number of pipes incident to a node) as an average of 3 (the number of pipes incident to a node is by construction limited to 5), we calculate the percentage R of nonzero elements of an [

**n**×

**m**] matrix. The number of nonzero elements is then 3

**times**

**R**

_{10}= 30%, R

_{100}= 3%, and R

_{1000}= 0.3%, in [23]. It can be seen that if m increases by 10, the percentage decreases by the same amount. For large gas networks, matrix A can be 1000 × 900 in dimension; therefore, the sparse matrix technique is very convenient.

#### 4.2. Operational Constraints

#### 4.3. Compressors

- “Surge”: This is the point at which flow through the compressor becomes so low that a reversal of flow can occur, which can be damaging to the compressor by causing high stress in the bearings or in the impeller. If all the points of minimum flow and corresponding pressure ratio are plotted, we get the surge line. This is the line at the left of the envelope.
- “Choke”: At the opposite end of the diagram, a compressor can reach choke. When the pressure ratio is low, there comes a point at which no further increase in flow through the compressor is possible.
- “Maximum and minimum speed”: Obviously, a compressor can run up to some given maximum speed consistent with machine safety; equally, there is a minimum speed line.

^{3}/h), a

_{1}and b

_{1}are specified coefficients, and choke line is formulated by the inequality [32,33]:

**Q**

_{max}—maximum compressor flow;

**CR**

_{max}—maximum compressor ratio.

#### 4.4. Regulators

_{i}> p

_{o}

_{i}—inlet nodal pressure;

_{o}—outlet nodal pressure.

**Q**—maximum flow through regulator;

_{max}_{o}= constant

#### 4.5. Valves

**isolating**valves are of interest. These are used to interrupt the flow and to shut off sections of the network. In our problem, valves are represented by inequalities. The first one states that pressure difference is always greater upstream, that is:

**p**

_{i}>

**p**

_{o}

**p**

_{i}—inlet pressure;

**p**

_{o}—

**ou**tlet pressure.

**Q**—maximum flow through the valve;

_{max}**Q**—actual flow through the valve.

## 5. Problem Solution

**x**

^{T}= [p

_{d1},…, p

_{dk}]—vector of discharge pressure;

**x**) is continuous and differentiable.

**x**

^{k}, by a quadratic programming subproblem, and then, using the solution to this subproblem, a better approximation

**x**

^{k+1}is calculated. This process is iterated to calculate a sequence of approximations that will converge to a solution

**x***. The SQP method obtains search directions from a sequence of “quadratic programming (QP)” subproblems. Each QP subproblem minimizes a quadratic model of a certain Lagrangian function subject to linearized constraints. Some merit function is reduced along each search direction to ensure convergence from any starting point. The basic structure of the SQP method involves major and minor iterations. The major iterations generate a sequence of iterates (

**x**

^{k}) that converges to (

**x***). At each iterate, a QP subproblem is used to generate a search direction towards the next iterate (

**x**

^{k+1}). Solving such a subproblem is itself an iterative procedure, with the minor iterations of the SQP method being the iterations of the QP method. If the problem is unconstrained, then the method is reduced to Newton’s method for finding a point where the gradient of the objective vanishes. If the problem has only equality constraints, then the method is equivalent to applying Newton’s method to the first-order optimality conditions, or “Kuhn–Tucker (KT)” conditions, of the problem.

**min**

**f(x)**

**L**(x,

**μ**) =

**f**(x) +

**μ**

^{T}**h**(x)

**x**, μ), the KT first-order “necessary optimality conditions (NOCs)”:

#### SQP Method

**B**

^{k}, which is updated at/by each iteration. An obvious update strategy would be to define:

^{k}by using the “Broyden–Fletcher–Goldfarb–Shanno (BFGS)” formula [38]:

^{k}, is no longer assured since ${\nabla}_{\mathrm{x}}^{2}\mathrm{L}\left({\mathrm{x}}^{*},{\mathsf{\lambda}}^{*},{\mathsf{\mu}}^{*}\right)$ is usually positive definite only on the subset of R

^{n}. This difficulty may be overcome by modifying ${\gamma}^{\mathrm{k}}$ as proposed in [37]:

**B**

^{k}by the damped BFGS formula, obtained by substituting ${\zeta}^{\mathrm{k}}$ for ${\gamma}^{\mathrm{k}}$ in (30); then, if

**B**

^{k}is positive definite, the same holds for

**B**

^{k+1}. This ensures also that if the quadratic programming problem is feasible, it admits a solution. Of course, by employing the quasi-Newton approximation, the rate of convergence becomes superlinear.

**x**

^{k}} converges to some

**x***, where the linear independence constraints qualification holds, then {(${\lambda}^{k},{\mu}^{k}$)} also converges to some (${\lambda}^{*},{\mu}^{*}$) so that (${x}^{*}$, ${\lambda}^{*},{\mu}^{*}$) satisfies the KT NOCs for Problem (20). In order to enforce the convergence of the sequence {${x}^{\mathrm{k}}$}, in the same line of Newton’s method for unconstrained optimization, the line search approach has been devised.

**x**

^{k}} is given by the iteration:

**x**

^{k+l}=

**x**

^{k}+a

^{k}

**s**

^{k}

**s**

^{k}is obtained by solving the k-th QP subproblem, and the step size a

^{k}is evaluated so as to get a sufficient decrease of the objective function.

## 6. Case Study

^{k+1}) − f(x

^{k})ǀ ≤ 0.005f(x

^{0}), where f(x

^{0}) is the starting value of the objective function. Variables and constraints were scaled to be of order unity. Two networks were considered. All input data concerning the structure and geometry of the networks, loads and supply parameters, and the network operating parameters used as starting points for the optimization program were given by the gas network operator. Software developed by the Polish software company Fluid Systems Ltd. was used.

#### 6.1. Small Network

#### 6.2. Large Network

## 7. Results

## 8. Conclusions

## Author Contributions

## Funding

## Informed Consent Statement

## Conflicts of Interest

## References

- Barclay, A.; Gill, P.E.; Rosen, J.B. SQP methods and their application to numerical optimal control. In Variational Calculus, Optimal Control and Applications; Birkhäuser: Basel, Switzerland, 1998; pp. 207–222. [Google Scholar]
- Boggs, P.T.; Tolle, J.W. Sequential Quadratic Programming. Acta Numer.
**1996**, 4, 1–52. [Google Scholar] [CrossRef] [Green Version] - Carter, R.G. Pipeline Optimization: Dynamic Programming After 30 Years. In Proceedings of the PSIG Annual Meeting, Denver, CO, USA, 28–30 October 1998. [Google Scholar]
- De Wolf, D.; Smeers, Y. The gas transmission problem solved by an extension of the sim-plex algorithm. Manag. Sci.
**2000**, 46, 1454–1465. [Google Scholar] [CrossRef] [Green Version] - Domschke, P.; Geißler, B.; Kolb, O.; Lang, J.; Martin, A.; Morsi, A. Combination of non-linear and linear optimization of transient gas networks. INFORMS J. Comput.
**2011**, 23, 605–617. [Google Scholar] [CrossRef] [Green Version] - Enbin, L.; Liuxin, L.; Qian, M.; Jianchao, K.; Zhang, L. Steady—State Optimization Opera-tion of the West-East Gas Pipeline. Adv. Mech. Eng.
**2019**, 11, 1–14. [Google Scholar] - Ehrhardt, K.; Steinbach, M.C. Non-linear optimization in gas networks. In Modeling, Simulation and Optimization of Complex Processes; Bock, H.G., Ed.; Springer: Berlin/Heidelberg, Germany, 2005; pp. 139–148. [Google Scholar]
- Furey, B.P. A Sequential Quadratic Programming Based Algorithm for Optimization of Gas Networks. Automatica
**1993**, 29, 1439–1450. [Google Scholar] [CrossRef] - Herty, M. Modeling, simulation and optimization of gas networks with compressors. Netw. Heterog. Media
**2007**, 2, 81–97. [Google Scholar] [CrossRef] - Krishnaswami, P.; Chapman, K.S.; Abbaspour, M. Compressor station optimization for linepack maintenance. In Proceedings of the 36th PSIG Annual Meeting, Palm Springs, CA, USA, 20–22 October 2004; p. PSIG-0410. [Google Scholar]
- Larson, R.E.; Wismer, D.A. Hierarchical control of transient flow in natural gas pipe-line networks. In Proceedings of the IFAC Symposium on Distributed Parameter Systems, Banff, AB, Canada, 21–23 June 1971. [Google Scholar]
- Luongo, C.A.; Gilmour, B.J.; Schroeder, D.W. Optimization in Natural Gas Transmission Networks: A Tool to Improve Operational Efficiency. In Proceedings of the 3rd SIAM Con-ference on Optimization, SIAM, Boston, MA, USA, 3–5 April 1989; pp. 110–117. [Google Scholar]
- Mahlke, D.; Martin, A.; Moritz, S. A mixed integer approach for time-dependent gas network optimization. Optim. Methods Softw.
**2010**, 25, 625–644. [Google Scholar] [CrossRef] - Mallinson, J.; Fincham, A.; Bull, S.; Rollet, J.; Wong, M. Methods for optimizing gas transmission networks. Ann. Oper. Res.
**1993**, 43, 443–454. [Google Scholar] [CrossRef] - Moritz, S. A Mixed Integer Approach for the Transient Case of Gas Network Optimization. Ph.D. Thesis, Darmstadt University of Technology, Darmstadt, Germany, 2007. [Google Scholar]
- Nocedal, J.; Wright, S.J. Numerical Optimization; Springer: New York, NY, USA, 2006. [Google Scholar]
- O’Malley, C.; Kourounis, D.; Hug, G.; Schenk, O. Optimizing Gas Networks Using Adjoint Gradients; Project Nr 18801.1, PFIW-IW; Commision for Technology and Innovation: Geneva, Switzerland, 2014. [Google Scholar]
- Osiadacz, A.J. Non-linear programming applied to the optimum control of a gas compressor station. Int. J. Numer. Methods Eng.
**1980**, 15, 1287–1301. [Google Scholar] [CrossRef] - Osiadacz, A.J. Dynamic optimization of high pressure gas networks using hierarchical systems theory. In Proceedings of the 26th PSIG Annual Meeting, San Diego, CA, USA, 1 January 1994; p. PSIG-9408. [Google Scholar]
- Osiadacz, A.J. Hierarchical control of transient flow in natural gas pipeline systems. Int. Trans. Oper. Res.
**1998**, 5, 285–302. [Google Scholar] [CrossRef] - Osiadacz, A.J.; Bell, D.J. A simplified algorithm for optimization of large-scale gas networks. Optim. Control. Appl. Methods
**1986**, 7, 95–104. [Google Scholar] [CrossRef] - Osiadacz, A.J.; Swierczewski, S. Optimal control of gas transportation systems. In Proceedings of the IEEE International Conference on Control and Applications CCA-94, Glasgow, UK, 24–26 August 1994; Volume 2, pp. 795–796. [Google Scholar]
- Osiadacz, A.J. Simulation and Analysis of Gas Networks; F.N Spon Ltd.: London, UK, 1987. [Google Scholar]
- Osiadacz, A.J. Steady-State Optimization of Gas Networks. Arch. Min. Sci.
**2011**, 56, 335–352. [Google Scholar] - Osiadacz, A.J.; Chaczykowski, M. Compressor Fuel Minimization Under Transient Conditions. In Proceedings of the PSIG Annual Meeting, Atlanta, GA, USA, 9–12 May 2017. [Google Scholar]
- Percell, P.B.; Ryan, M.J. Steady-state optimization of gas pipeline network operation. In Proceedings of the 19th PSIG annual meeting, Tulsa, OK, USA, 22 October 1987. [Google Scholar]
- Powell, M.J.D. Algorithms for non-linear constraints that use Lagrangian functions. Math. Program.
**1978**, 14, 224–248. [Google Scholar] [CrossRef] - Ríos-Mercado, R.Z.; Borraz-Sánchez, C. Optimization problems in natural gas trans-portation systems: A state-of-the-art review. Appl. Energy
**2015**, 147, 536–555. [Google Scholar] [CrossRef] - Saunders, M. Large scale Numerical Optimization: SQP Methods; Stanford University: Stanford, CA, USA, 2019. [Google Scholar]
- Sedliak, A.; Žáčik, T. Optimization of the Gas Transport in Pipeline Systems. Tatra Mt. Math. Publ.
**2016**, 66, 103–120. [Google Scholar] [CrossRef] [Green Version] - Steinbach, M.C. On PDE solution in transient optimization of gas networks. J. Comput. Appl. Math.
**2007**, 203, 345–361. [Google Scholar] [CrossRef] [Green Version] - Tran, T.H.; French, S.; Ashman, R.; Kent, E. Linepack planning models for gas trans-mission network under uncertainty. Eur. J. Oper. Res.
**2018**, 268, 688–702. [Google Scholar] [CrossRef] [Green Version] - Crane Co. Flow of Fluids through Valves, Fittings and Pipe. Technical Paper 40 (TP-40). 1988. Available online: http://www.craneco.com (accessed on 7 May 2021).
- Gas Processors Suppliers Association (GPSA). Engineerin Data Book, 11th ed.; Gas Processors Suppliers Association (GPSA): Tulsa, OK, USA, 1998. [Google Scholar]
- Transco’s National Transmission System, Review of System Operator Incentives, Proposal Dokument. February 2004. Available online: www.ofgem.gov.uk (accessed on 7 May 2021).
- Luongo, C.A.; Gilmour, B.J.; Schroeder, D.W. Optimization in Natural Gas Transmission Net-Works. A Tool to Improve Operating Efficiency; Technical Report; Stoner Associates, Inc.: Houston, TX, USA, 1989. [Google Scholar]
- Menon, E.S. Gas Pipeline Hydraulics; CRC Press, Taylor & Francis Group: Oxford, NY, USA, 2005. [Google Scholar]
- Kralik, J.; Stiegler, P.; Vostry, Z.; Zavorka, J. Dynamic Modeling of Large Scale Networks with Application to Gas Distribution; Academia: Prague, Czech Republic, 1988. [Google Scholar]

Pipe No. | Length (m) | Pipe No. | Length (m) |
---|---|---|---|

1 | 50·10^{3} | 21 | 75·10^{3} |

2 | 35·10^{3} | 22 | 55·10^{3} |

3 | 20·10^{3} | 23 | 65·10^{3} |

4 | 80·10^{3} | 24 | 80·10^{3} |

5 | 85·10^{3} | 25 | 50·10^{3} |

7 | 60·10^{3} | 26 | 35·10^{3} |

8 | 150·10^{3} | 27 | 80·10^{3} |

9 | 35·10^{3} | 28 | 60·10^{3} |

10 | 45·10^{3} | 29 | 40·10^{3} |

11 | 65·10^{3} | 30 | 50·10^{3} |

12 | 70·10^{3} | 31 | 60·10^{3} |

13 | 85·10^{3} | 32 | 55·10^{3} |

14 | 60·10^{3} | 33 | 60·10^{3} |

15 | 95·10^{3} | 34 | 80·10^{3} |

16 | 40·10^{3} | 35 | 50·10^{3} |

17 | 20·10^{3} | 36 | 90·10^{3} |

18 | 65·10^{3} | 37 | 75·10^{3} |

19 | 55·10^{3} | 38 | 80·10^{3} |

20 | 45·10^{3} |

Node No. | Load (m^{3}/h) | Node No. | Load (m^{3}/h) |
---|---|---|---|

2 | 117,987 | 20 | 117,987 |

5 | “ | 23 | “ |

6 | “ | 24 | “ |

9 | “ | 25 | “ |

10 | “ | 26 | “ |

11 | “ | 29 | “ |

14 | “ | 32 | “ |

15 | “ | 34 | “ |

18 | “ | 35 | “ |

19 | “ | 36 | “ |

Compressor Station No. | Max. Discharge Pressure (bar) | Max. Compressor Ratio |
---|---|---|

Compressor station 1 | 60.0 | 1.5 |

Compressor station 2 | “ | 1.5 |

Source No. | Max. Pressure (bar) | Max. Flow (m^{3}/h) |
---|---|---|

Source 1 | 60.0 | 2,420,000.0 |

Source 2 | 60.0 | 2,420,000.0 |

Node No. | Pressure (Pa) | Node No. | Pressure (Pa) |
---|---|---|---|

2 | 4,934,279.4 | 20 | 5,509,743.8 |

3 | 4,722,864.3 | 21 | 5,390,402.6 |

5 | 5,810,845.2 | 23 | 5,400,502.3 |

6 | 5,524,732.6 | 24 | 5,365,839.6 |

9 | 5,519,327.1 | 25 | 5,403,114.7 |

10 | 4,925,286.3 | 26 | 5,445,346.7 |

11 | 4,824,920.5 | 28 | 5,421,142.6 |

12 | 4,848,617.1 | 29 | 5,465,560.0 |

14 | 5,454,098.4 | 31 | 5,524,985.8 |

15 | 5,325,629.4 | 32 | 5,570,129.7 |

16 | 5,195,366.6 | 34 | 5,551,397.3 |

18 | 5,428,836.1 | 35 | 5,434,898.4 |

19 | 5,239,052.6 | 36 | 5,370,022.2 |

Pipe No. | Flow (m^{3}/h) | Pipe No. | Flow (m^{3}/h) |
---|---|---|---|

1 | 271,082.3 | 21 | −26,618.4 |

2 | 719,185.8 | 22 | 113,384.2 |

3 | 721,285.8 | 23 | 40,221.6 |

4 | 604,898.8 | 24 | −46,144.3 |

5 | 120,987.0 | 25 | 76,245.4 |

7 | −2044.2 | 26 | 132,423.9 |

8 | 559,513.3 | 27 | 531,608.2 |

9 | 412,301.9 | 28 | 571,232.3 |

10 | 291,814.9 | 29 | 462,338.5 |

11 | 291,814.9 | 30 | 342,951.5 |

12 | −58,818.6 | 31 | 342,951.5 |

13 | 521,966.1 | 32 | 224,364.5 |

14 | 521,966.1 | 33 | 224,364.5 |

15 | 371,024.8 | 34 | 511,078.7 |

16 | 361,194.1 | 35 | 392,391.7 |

17 | 232,146.5 | 36 | −51,164.8 |

18 | 239,634.5 | 37 | 196,752.9 |

19 | 203,210.7 | 38 | 116,487.0 |

20 | −26,618.4 |

The Number of Iteration | Objective Function (kW) |
---|---|

1 | 13,212.2 |

3 | 12,892.4 |

5 | 12,622.4 |

7 | 12,382.8 |

9 | 12,172.4 |

11 | 12,032.6 |

13 | 11,922.5 |

15 | 11,862.7 |

Compressor Station No. | Suction Pressure (bar) | Discharge Pressure (bar) | Flow (m ^{3}/h) | HP (kW) |
---|---|---|---|---|

Compressor station 1 | 46.32 | 59.21 | 722,285.8 | 5423.14 |

Compressor station 2 | 47.13 | 54.26 | 292,114.9 | 1431.08 |

Source No. | Output Pressure (Bar) | Flow (m ^{3}/h) |
---|---|---|

Source 1 | 50.0 | 273,482.3 |

Source 2 | 56.8 | 2,064,157.7 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Osiadacz, A.J.; Kwestarz, M.
Nonlinear Steady-State Optimization of Large-Scale Gas Transmission Networks. *Energies* **2021**, *14*, 2832.
https://doi.org/10.3390/en14102832

**AMA Style**

Osiadacz AJ, Kwestarz M.
Nonlinear Steady-State Optimization of Large-Scale Gas Transmission Networks. *Energies*. 2021; 14(10):2832.
https://doi.org/10.3390/en14102832

**Chicago/Turabian Style**

Osiadacz, Andrzej J., and Małgorzata Kwestarz.
2021. "Nonlinear Steady-State Optimization of Large-Scale Gas Transmission Networks" *Energies* 14, no. 10: 2832.
https://doi.org/10.3390/en14102832