Optimal Control of Compressor Stations in a Coupled GastoPower Network
Abstract
We introduce a tool for simulation and optimization of gas pipeline networks coupled to power grids by gastopower plants. The model under consideration consists of the isentropic Euler equations to describe the gas flow coupled to the AC powerflow equations. A compressor station is installed to control the gas pressure such that certain bounds are satisfied. A numerical case study is presented that showcases effects of fast changes in power demand on gas pipelines and necessary operator actions.
Keywords
Coupling of gas and power networks Compressor stations Optimal controlMathematics Subject Classification (2010)
76N15 65M08 49J201 Introduction
Renewable power sources have an ever increasing share of all power sources. Though renewable energy has been developed in recent years with great success, its intermittent and unpredictable nature raises the difficulty to balance the energy production and consumption [6, 18]. A frequent proposal is to use gas turbine plants to compensate for sudden drops in power of renewable sources because these plants are relatively flexible in comparison to coal or nuclear plants. A welcome advantage of this approach is the possibility to run gas plants with fuel produced from renewable electricity via powertogas plants, thereby reducing or even negating carbon emissions of the gas plants. For a review of powertogas capability see [6].
It is desirable to have a joint optimal control framework for power and gas sector of the energy system to model this compensation. So far only steadystate flow in the gas network has been considered [3, 18, 20], which may be too coarse for several applications. Therefore, we focus on an optimal control strategy for the instationary gas network model [1] coupled to a power grid [2] via compressor stations, see for example [8, 15, 17]. The mathematical foundation for the gastopower coupling has been recently introduced in [5], where conditions for the wellposedness have been derived and proved. This work is the first attempt to model this interaction and yields an understanding of the underlying equations. The next step will be realworld scenarios.
2 Optimal Control Problem
The gas dynamics within each pipeline of the considered gas networks are modeled by the isentropic Euler equations, supplemented with suitable coupling and boundary conditions. For the power grid, we apply the wellknown powerflow equations. The coupling between gas and power networks at gasdriven power plants is modeled by (algebraic) demanddependent gas consumption terms. To react on the demanddependent influences on the gas network, controllable devices as compressor stations are considered within the gas network. The aim is to fulfill given state restrictions like pressure bounds whereas at the same time the entire fuel gas or power consumption of the compressor stations is to be minimized.
Mathematically, this is an instationary nonlinear optimization problem constrained by partial differential equations, see [9] for an overview. To solve the problem, we make use of a firstdiscretizethenoptimize approach and apply the interior point solver IPOPT [16]. The necessary gradient information for IPOPT, i.e., gradients with respect to all controllable devices, is efficiently computed via adjoint equations. Here, the underlying systems can be solved timestepwise (backwards in time), where additionally the sparsity structure is exploited.
We remark that the cost function is given in Sect. 2.3, while the bounds on the pressure are introduced as box constraints within the numerical optimization procedure in Sect. 3. Within the Sects. 2.1, 2.2, 2.3, 2.4, and 2.5, we now describe the constraints of the optimal control problem in detail and focus on the technical details.
2.1 The Isentropic Euler Equations
2.2 Coupling at Gas Nodes
Parameters of the gas network
Pipe  From  To  Length l_{e} [km] 

P10  S4  S20  20.322 
P20  S5  S0  20.635 
P21  S17  S4  10.586 
P22  S17  S8  10.452 
P24  S8  S20  19.303 
P25  S20  S25  66.037 
2.3 Compressor Stations
2.4 Power Model
Parameters of the power grid (p.u.)
 

2.5 Coupling
3 Numerical Results
3.1 Problem Setup
As already noted, we consider a small part of the GasLib40 network from [2] consisting of 7 pipelines with a total length of 152 km. This network is extended by a compressor station and additionally connected to a power grid with 9 nodes by a gastopower generator. For this coupled gaspower network, we simulate a sudden increase in power demand within the power grid and study its effect on the gas network. The considered compressor station is supposed to compensate part of the pressure losses in the gas network such that a given pressure bound is satisfied all the time, while power consumption of the compressor is minimized.
P(t) and Q(t) at load nodes,
P(t) and V (t) at generator nodes,
V (t) and ϕ(t) at the slack bus,
p(t) at S5,
q(t) at S25,
p(x, 0), q(x, 0) for all pipelines.
Initial conditions of the power grid (p.u.)
Node  P  Q  V   ϕ 

N1  –  –  1  0 
N2  163  –  1  – 
N3  85  –  1  – 
N4  0  0  –  – 
N5  −90  −30  –  – 
N6  0  0  –  – 
N7  −100  −35  –  – 
N8  0  0  –  – 
N9  −125  −50  –  – 
For the gas network the incoming pressure at S5 is fixed at 60bar, the outflow at S25 is fixed at \(q=100 \frac {\text{m}^3}{\text{s}}\cdot \frac {\rho _0}{A_e}\), where \(\rho _0 = 0.785 \frac {\text{kg}}{\text{m}^3}\) and \(A_e = \pi \frac {d_e^2}{4}\). The fuel consumption parameters we use in equation (5) are given by a_{0} = 2, a_{1} = 5, a_{2} = 10. Since the data for the considered gas and power networks are taken from different sources, the parameters of the gastopower generator are chosen in such a way that a significant influence is caused.
P(t), Q(t), V (t), ϕ(t) for all nodes in the power grid,
p(x, t), q(x, t) for all pipelines in the gas network,
3.2 Discretization and Optimization Schemes
Together with the algebraic equations modelling the compressor station and the coupling and boundary conditions, the discretization process results in a system of nonlinear equations for all state variables of the coupled gaspower network. For simulation purposes, the entire discretized system is solved with Newton’s method. Note that the system can be solved timestep per timestep and that we exploit the sparsity structure of the underlying Jacobian matrices.
3.3 Results
We first discuss the simulation with inactive compressor. In the course of the simulation, due to the increase in power demand at node N5, the power demand at the slack bus rises as well and leads to increased fuel demand at node S4. This increases the inflow into the gas network, as can be seen in Fig. 3. Also the pressure in the final node S25 decreases and violates the pressure bound after approximately 4 h, see Fig. 4.
After the optimization procedure, the compressor station compensates part of the pressure losses in the gas network such that the pressure bound is satisfied all the time. Since the power consumption of the compressor station is minimized within the optimization, the pressure constraint is active after roughly 4 h (see again Fig. 4), i.e., the compressor station applies as little as possible energy.
4 Conclusion
The proposed optimization model allows to predict pressure transgressions within a coupled gastopower framework. Simulation and optimization tasks are efficiently solved by exploiting the underlying nonlinear problem structure while keeping the full transient regime. This makes it possible to track bounds much more accurately than with a steady state model, thereby achieving lower costs.
References
 1.M. Banda, M. Herty, A. Klar, Gas flow in pipeline networks. Netw. Heterogeneous Media 1(1), 41–56 (2006). https://doi.org/10.3934/nhm.2006.1.41 MathSciNetCrossRefGoogle Scholar
 2.D. Bienstock, Electrical Transmission System Cascades and Vulnerability (Society for Industrial and Applied Mathematics, Philadelphia, 2015). https://doi.org/10.1137/1.9781611974164 CrossRefGoogle Scholar
 3.M. Chertkov, S. Backhaus, V. Lebedev, Cascading of fluctuations in interdependent energy infrastructures: gasgrid coupling. Appl. Energy 160, 541–551 (2015). https://doi.org/10.1016/j.apenergy.2015.09.085 CrossRefGoogle Scholar
 4.R. Colombo, M. Garavello, On the cauchy problem for the psystem at a junction. SIAM J. Math. Anal. 39(5), 1456–1471 (2008). https://doi.org/10.1137/060665841 MathSciNetCrossRefGoogle Scholar
 5.E. Fokken, S. Goöttlich, O. Kolb, Modeling and simulation of gas networks coupled to power grids. arXiv eprints (2018). arXiv: 1812.11438 [math.NA]Google Scholar
 6.G. Gahleitner, Hydrogen from renewable electricity: an international review of powertogas pilot plants for stationary applications. Int. J. Hydrog. Energy 38(5), 2039–2061 (2013). https://doi.org/10.1016/j.ijhydene.2012.12.010 CrossRefGoogle Scholar
 7.J.J. Grainger, W.D. Stevenson, G.W. Chang, Power System Analysis. McGrawHill Series in Electrical and Computer Engineering: Power and Energy (McGrawHill Education, 2016). ISBN: 9781259 008351Google Scholar
 8.M. Herty, Modeling, simulation and optimization of gas networks with compressors. Netw. Heterogeneous Media 2(1), 81–97 (2007). https://doi.org/10.3934/nhm.2007.2.81 MathSciNetCrossRefGoogle Scholar
 9.M. Hinze et al., Optimization with PDE Constraints. Mathematical Modelling: Theory and Applications, vol. 23 (Springer, New York, 2009), pp. xii+270. ISBN: 9781402088384Google Scholar
 10.J. Humpola et al., GasLib – A Library of Gas Network Instances. Tech. rep. Sept. 2017. http://www.optimizationonline.org/DB_HTML/2015/11/5216.html
 11.O. Kolb, Simulation and Optimization of Gas and Water Supply Networks. Ph.D., thesis. TU Darmstadt, 2011Google Scholar
 12.O. Kolb, S. Göttlich, A continuous buffer allocation model using stochastic processes. Eur. J. Oper. Res. 242(3), 865–874 (2015). https://doi.org/10.1016/j.ejor.2014.10.065 MathSciNetCrossRefGoogle Scholar
 13.O. Kolb, J. Lang, Simulation and continuous optimization, in Mathematical optimization of water networks. International Series of Numerical Mathematics, vol. 162 (Birkhäuser/Springer Basel AG, 2012), pp. 17–33Google Scholar
 14.O. Kolb, J. Lang, P. Bales, An implicit box scheme for subsonic compressible flow with dissipative source term. Numer. Algorithms 53(2), 293–307 (2010). https://doi.org/10.1007/s110750099287y MathSciNetCrossRefGoogle Scholar
 15.T. Mak et al., Dynamic compressor optimization in natural gas pipeline systems. INFORMS J. Comput. (2019, in press)Google Scholar
 16.A. Wächter, L.T. Biegler, On the implementation of an interiorpoint filter linesearch algorithm for largescale nonlinear programming. Math. Program. 106(1), 25–57 (2006). https://doi.org/10.1007/s101070040559y MathSciNetCrossRefGoogle Scholar
 17.T. Walther, B. Hiller, Modelling compressor stations in gas networks. ZIB Report 17–67. Zuse Institute Berlin, 2017. https://opus4.kobv.de/opus4trr154/frontdoor/index/index/docId/203
 18.Q. Zeng et al., Steadystate analysis of the integrated natural gas and electric power system with bidirectional energy conversion. Appl. Energy 184.C, 1483–1492 (2016)CrossRefGoogle Scholar
 19.R. Zimmerman, C. MurilloSanchez, R. Thomas, MATPOWER: steadystate operations, planning, and analysis tools for power systems research and education. IEEE Trans. Power Syst. 26(1), 12–19 (2011). https://doi.org/10.1109/TPWRS.2010.2051168 CrossRefGoogle Scholar
 20.A. Zlotnik et al., Control policies for operational coordination of electric power and natural gas transmission systems, in 2016 American Control Conference (ACC), July 2016, pp. 7478–7483. https://doi.org/10.1109/ACC.2016.7526854
Copyright information
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.