Abstract
Due to the current and foreseeable shifts towards carbon dioxide neutral energy production, which will likely result in balancing fluctuating renewable energy generation by transforming power-to-gas-to-power as well as building a large-scale hydrogen transport infrastructure, the trading and transport operations of gas will become more dynamic, volatile, and hence also less predictable. Therefore, computer-aided support in terms of rapid simulation and control optimization will further broaden its importance for gas network dispatching. In this paper, we aim to contribute and openly publish two new mathematical models for regulators, also referred to as control valves, which together with compressors make up the most complex and involved types of active elements in gas network infrastructures. They provide direct control over gas networks but are in turn controlled via target values, also known as set-point values, themselves. Our models incorporate up to six dynamical target values to define desired transient states for the elements’ local vicinity within the network. That is, each pair of every two target values defines a bounding box for the inlet pressure, outlet pressure as well as the passing mass flow of gas. In the proposed models, those target values are prioritized differently and are constantly in competition with each other, which can only be resolved dynamically at run-time of either a simulation or optimization process. Besides careful derivation, we compare simulation and optimization results with predictions of the widely adopted commercial simulation tool SIMONE, serving as our substitute for actual real-world transport operations.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The physical and technical properties of gas transport in networks have been studied for many decades already. They have gotten increasing attention in the last years since countries worldwide attempt a turnaround in their national energy policies towards carbon dioxide neutral means of energy production. Reasons for this are the potential usage of gas networks as flexible energy storage for balancing the highly volatile generation of renewable energy sources (Federal Ministry for Economic Affairs and Energy 2021) or the prospect of shifting to hydrogen transport in the future (European Commission 2020). In both cases, controlling the network is expected to become more dynamic and complex, either due to the increasing variability of supply and demand or the gas properties of hydrogen compared to natural gas (Hoppmann-Baum et al. 2020). To make the task of operating gas networks manageable, the decision-making is split into multiples levels. It ranges from the complete view on the network featuring only abstract representations of the technical elements to detailed but local control decisions, for example, the degree of openness of a single pressure regulator or the rotational speed of a gas compressor (Stelter 1988). The decisions on the different levels are usually connected via the concept of set-point values or target values. These represent a control requirement determined in the full network view, which then serves as an objective for the local operation of the actual machinery.
Controlling an element with set-points is a well-known concept in the community of automated control systems. The difference between the measured (actual) and the desired (target) value of an observed process variable is the basis for error-controlled regulation with negative feedback (closed-loop) in automatic control (Porter and Khaki-Sedigh 1988). Proportional-Integral-Derivative (PID) control is the most common feedback control algorithm in engineering systems. In process industries, most of the control loops ( \(\approx 95\%\)) are of PID type (Åström and Murray 2008). The advanced control methods including model based control techniques (model predictive control (Camacho and Alba 2007; Darby and Nikolaou 2012; Haber et al. 2014) or multivariable control (Skogestad and Postlethwaite 2005)), intelligent control techniques (fuzzy control (Nguyen et al. 2019) or neural network based control (Meireles et al. 2003)), and adaptive control (Åström and Kumar 2014), are often used as a high level control procedures for designing high performance controllers that can be applied to high-order and multivariable processes, typically nonlinear and subject to constraints.
When looking at work regarding the simulation or optimization of mid-to-high pressure gas transport networks, the usage of set-points to control active elements has a long history as well. In (Mallinson et al. 1993), the authors present the optimization problem of finding a stationary control for the British gas network. The control of the compressors is defined as the corresponding set-point for the gas pressure after compression, also called the outlet or outgoing pressure of the element. The same holds for (Rachford and Carter 2000), who examine a transient optimization problem on a gunbarrel network, given a desired final state of the network. In a second paper, the same authors extended the model to prepare for not one but multiple possible future scenarios in a robust way (Carter and Rachford 2003). In recent years, more set-point or target value models have been used. In their description of a stationary gas network control optimization problem, (Pfetsch et al. 2015; Schmidt et al. 2015; Koch et al. 2015) introduced a model for a regulator without remote access having a fixed set-point for the outgoing pressure. However, depending on whether the actual state value exceeds the set-point, matches it, or falls below it, the regulator is closed, active, or fully open. In the last case, it acts as a bypass. Finally, there are also models including a multitude of different set-point or target values. In (Pambour et al. 2016), a model used for gas network simulation was introduced, in which regulators and compressors are given a set-point either for the inlet pressure, the outlet pressure, the flow, or the ratio of both the in- and outlet pressure. Alternatively, they can be chosen to be closed or in bypass mode. The simulation model of (Benner et al. 2019) features two different modes for each compressor and regulator. These either try to keep the inlet or the outlet pressure at a given target value.
In this article, we introduce a more elaborate description of the desired control of active elements. It features up to six different target value restrictions that are simultaneously active and compete with each other, which surpasses the current state-of-the-art in the literature, where only one set-point value is considered at a time. An element in our model can react to changing conditions in the surrounding network without the need to change the target value objective manually. In the example of a regulator, it is able to autonomously switch between holding the inlet pressure, holding the flow, or even closing the element. This model captures the behavior of complex elements used in real-world networks and industry-standard simulators to precisely express the desired control given dynamically changing conditions in the corresponding part of the network.
The description can, in general, be applied to regulators and compressors. However, we focus on regulators here, i.e., the elements reducing the pressure in flow direction by reducing the element’s throughput. In literature, there exist several models for regulators. For example, (Huck 2018) models an idealized regulator by demanding that the pressure difference between its outlet and inlet pressure must be positive and inside a given interval. In (Benner et al. 2019), the regulator is described as a resistor with variable diameter. Hence, it is given a degree of openness ranging between 0 and 1. This allows them to include the edge case of a fully closed regulator, in which the two pressures are decoupled and the flow is zero. The model presented in (Pfetsch et al. 2015; Schmidt et al. 2015; Koch et al. 2015) distinguishes two types of regulators: Those with and without remote access. The ones without remote access are controlled as already described above using the outlet pressure target value. When having remote access, the regulators can either be closed or again keep their pressure difference inside a given interval. Another and precursor to one of our models presented here is presented in (Hennings et al. 2021). Within there, the authors consider three different modes for a regulator: The regulator is either closed, active, or open. A closed regulator is defined as for the other models, an open one does assume the inlet and outlet pressures to be equal, while an active regulator allows for arbitrary pressure reduction. In addition, the regulator features a check valve or flap trap, which prevents flow against the regulator’s orientation.
We present two models for regulators using the target value control: one model suitable for dynamic simulation and one for discrete optimization problems. While for the simulation model a set of target values over time is given, the optimization model determines target values that induce the desired element behavior while changing as little as possible. Both models go beyond a one-at-a-time-target-point-value paradigm by introducing up to 6 competing target values at any given point in time. Subsequently, we provide a regulator instance that pushes the envelope for any target value incorporating regulator model, on which we base 2 different numerical experiments. Within these experiments, we first compare each of the proposed models with simulations from the industrial simulator SIMONE (LIWACOM Informationstechnik GmbH 2022), and we then second demonstrate a framework pipeline, in which we connect both models to predict-then-verify a set of intervention-minimizing set-point values on top of the first experiment. The premise of our work is that SIMONE is an established and certified simulator from and for the industry. We therefore assume it to be sufficiently accurate to real-world gas transport operations. Even more, complete data sets of pressures and flows of entire gas networks, such as national grids, can only exist as a result of so-called reconstructions from sporadic measurements within the network (Graham et al. 1996). Such a reconstruction mode is provided, e.g., by SIMONE. Hence, we compare our results versus SIMONE not in the role of another simulator but as a representative of reality. As a consequence, the simulations done by SIMONE are not our competition but instead our reference benchmarks.
Even though this paper deals with the control of active elements in gas networks, the presented models can easily be applied to other engineering applications featuring automated control systems in which errors of multiple process variables affect the same actuator. For these cases, it provides templates for modeling the corresponding behavior in a simulation or an optimization context.
The rest of the paper is structured as follows: In Sect. 2, we introduce the fundamental gas flow dynamic in pipes and our representation of a gas network as a directed graph. Based on this, we describe our new regulator model based on the 6 different target values in Sect. 3. In the following two sections, we first introduce a corresponding model suitable for the transient simulation of regulators given the target value settings for a future time horizon. Afterwards, we describe a discrete optimization model that can determine the control of a regulator in terms of the target values in a transient context. In Sect. 6, we present two experiments on a minimal gas network and compare the performance of the two models against each other as well as a commercial simulation software. We conclude with the outlook in Sect. 7.
2 Models for gas flow in pipe networks
Mathematical models of various so-called active elements, such as regulators, compressors, or valves, manipulate the passing gas flow by blocking, resisting, or enhancing it. However, the response to their actions is determined in the surrounding pipes that provide the volume for the gas to be. Hence, we need to model the behavior of the gas in pipes in terms of pressures p, mass-flows q, and their interaction. We use a version of the isothermal Euler equations, which we introduce and describe in the following subsection.
2.1 Isothermal Euler equations
A simplified or friction dominated version of the one-dimensional set of isothermal Euler equations for the description of the behavior of fluids within perfectly cylindrical pipes of length \(L \in \mathbb {R}_{>0}\) in \(\hbox {m}\) and diameter \(D \in \mathbb {R}_{>0}\) in \(\hbox {m}\) is given by
with \(\chi \in \{0, 1\}\) being a time constant model switch. These particular versions are referred to as ISO2 if \(\chi = 1\), or as ISO3 if \(\chi = 0\) according to (Domschke et al. 2021) and can be derived by a time scaling approach presented by (Brouwer et al. 2011). According to empirical observations in (Hennings 2021), we use the ISO3 case exclusively here, where \(\chi = 0\).
The intrinsic quantities of the equations are \(p \equiv p(x, t)\) for the pressure, \(q \equiv q(x, t)\) for the mass flow, \(\rho (x, t)\) for the density, and v(x, t) for the velocity and are parameterized along the longitudinal axis by \(x \in \varOmega = [0, L]\) as well as being averaged across the cross-sectional area \(A = \frac{1}{4} \pi D^2\) as enclosed by the pipe. Furthermore and throughout, let \( \dot{p}(x, t) \equiv \partial _t p(x, t) \) and likewise for \(\dot{q}(x, t)\) be the time derivatives. Also, let \(R_s\) be the specific gas constant, T be the time-constant temperature, \(\kappa = R_sT/A\) as shorthand, \(g \approx 9.81\hbox {m}/\hbox {s}^{2}\) the gravity constant, and \(\delta \! h = (h_r - h_\ell )/L\) as secant slope defined by the heights \(h_\ell \) on the left and \(h_r\) right end of the pipe. Furthermore, let \(z(p) = z_0 + z_1 p + \dots + z_np^n\) be a polynomial model or truncated Virial expansion for the gas factor for real gases (Onnes 1902), and \(\lambda \) be the friction coefficient of the Darcy-Weisbach equation (Brown 2003). The latter is an empirical model of pressure loss due to friction with the pipe wall.
For the determination of coefficients of the polynomial real gas factor model z(p), we make use of the linear AGA formula (SIMONE Research Group and LIWACOM Informationstechnik GmbH 2021; Domschke et al. 2021) of the American Gas Association, being accurate up to pressures \(p \le 70\,\hbox {bar}\), the quadratic formula of Pápay (Pápay 1968; Saleh 2002) for pressures \(p \le 150\,\hbox {bar}\), or the constant model \(z_0 = c^2/(R_s T)\) as suggested by (Domschke et al. 2021), where c is the speed of sound within the given gas mixture.
To approximate the friction factor \(\lambda \), we use the Nikuradse formula (Nikuradse 1950), which is given by
It is an explicit simplification of the otherwise implicit Colebrook-White (Colebrook and White 1937; Brown 2003) formula. Here r is the roughness of the pipe wall surface and is usually provided in millimeters \(\hbox {mm}\).
Two important identities that have already been utilized for the ultimate derivation of (1) are
where the first one is referred to as the state equation for real gases (Menon 2005). We call (1) the pipe equations. More in-depth details on Euler equations in the context of fluid transport can be found, e.g., in (Osiadacz 1996; Domschke et al. 2021; Benner et al. 2019).
Alternatively, in (Hennings 2018), a linearization of the pipe Eq. (1) has been proposed, which has the benefit of avoiding divisions by small pressure values. There it was observed that the Eq. (3) yield the identity \(|v| = z(p)\cdot \kappa \cdot |q|/p\), which can be fixed on predetermined or forecast velocities \(|{{\bar{v}}}|\), such that
Provided we use a constant model for the real gas factor, then Eqs. (1a) and (1b”) together yield a linearized model of the pipe equations.
2.2 Gas networks as graph structures from a macroscopic perspective
We have just established the system of pipe Eq. (1), but we are interested in gas networks as a whole and in solving online tasks. In this context, online means to utilize simulation or optimization to formulate control and operation recommendations as a guiding as well as continuous process live at operation time. Thus, the overall problem results in potentially large systems that must be solved repeatedly in a very limited time frame. For this reason, we have to take a macroscopic viewpoint regarding modeling the network and its building blocks. Hence, we consider gas networks as directed graphs \({\mathcal {G}} = ({\mathcal {N}}, {\mathcal {A}})\) over some time horizon \([t_0, T] \subseteq \mathbb {R}\) of interest. The set of nodes \({\mathcal {N}}\) is finite \(|{\mathcal {N}}| < \infty \), and the set of arcs \({\mathcal {A}} \subseteq {\mathcal {N}}\times {\mathcal {N}}\) is a collection of ordered tuples of nodes.
Nodes represent the intersection points of all the arcs. Each node \(n \in {\mathcal {N}}\) serves as a boundary to all of its adjacent arcs and hence intertwines and connects them by the so-called flow balance equation, which is a Kirchhoff typed law
Here \({\mathcal {A}}_\ell [n]\) is the set of all arcs (i.e., ordered tuples) \(a \in {\mathcal {A}}\) whose first node is n and \({\mathcal {A}}_r[n]\) likewise is the set of all arcs \(a \in \mathcal A\) whose second node is n, i.e.
Furthermore, \(q^{(n)}\) is the gas inflow or outflow to the network, and therefore \(q^{(n)} = 0\) for most nodes. However, if n is an entry or exit, a time-dependent piecewise constant or piecewise linear flow-profile \(q^{(n)}:\, [t_0, T]\subseteq \mathbb {R}\rightarrow \mathbb {R}\) is assumed to be provided. A second kind of Kirchhoff law hosted at nodes mediates boundary pressures from adjacent arcs in the following sense
where \(p^{(n)}(t)\) is the so-called node pressure. Hence, this Kirchhoff law forces adjacent boundary pressures to coalesce at all times and associates the mutual value to be the pressure of the node.
Arcs represent mostly pipes but may also stand for other network elements such as active elements, like valves, regulators, and compressors. For each arc \(a = (n_\ell , n_r) \in {\mathcal {A}}\), the flow \(q(x, t) \equiv q_a(x, t)\) and pressure \(p(x, t) \equiv p_a(x, t)\) on both its ends are of particular interest and, therefore, are abbreviated by \(q_\ell (t) \equiv q(0, t)\), \(q_r(t) \equiv q(L, t)\), \(p_\ell (t) \equiv p(0, t)\), and \(p_r(t) \equiv p(L, t)\). Correspondingly, the same holds true for the time derivatives, such that \(\dot{p}_\ell (t) = \dot{p}(0, t)\), \(\dot{p}_r(t) = \dot{p}(L, t)\), \(\dot{q}_\ell (t) = \dot{q}(0, t)\), and \(\dot{q}_r(t) = \dot{q}(L, t)\). On top and for the sake of readability we often omit the argument t from our notions \(p_\ell = p_\ell (t)\), \(p_r = p_r(t)\), \(q_\ell = q_\ell (t)\), \(q_r = q_r(t)\), \(\dot{p}_\ell = \dot{p}_\ell (t)\), \(\dot{p}_r = \dot{p}_r(t)\), \(\dot{q}_\ell = \dot{q}_\ell (t)\), \(\dot{q}_r = \dot{q}_r(t)\) within larger formulas.
2.3 On spatial discretizations of the pipe equations
The literature offers quite a variety of potential spatial discretizations for the pipe Eq. (1). We pick two schemes for our presentation and numerical experiments following in Sect. 6 below. The first discretization in our listing originates as discretization for pipes in water networks (Huck et al. 2014) and also has been studied in-depth in (Huck 2018) for gas networks in advance. We refer to it as left-right-discretization
The second scheme, or implicit-box-scheme, has been analyzed within (Kolb et al. 2010). It is a combined spatial and time discretization scheme. In (Streubel 2022) it was observed that it can be derived in two stages by discretizing in space first and applying the time discretization subsequently. Executing the first stage only leads to the following system of differential equations
relying on the trapezoidal quadrature method along the spatial dimension. Hence, we refer to (7) as the trapezoidal-discretized pipe equation.
3 Towards the regulator: a target value model
Regulators can down-regulate or halt the passing gas flow, and thereby indirectly exercise control of their surrounding neighborhood, and ultimately down the network. They can also mediate and exchange gas between areas operated at different pressure levels. Their operation is controlled by target values. In this section, we provide a detailed explanation of the underlying target value logic and establish notions as well as terminology. The logic is based on the interactions between pipes and regulators, which we can express in the following diagram of expected principal reactions of the left pressure \(p_\ell \) and right pressure \(p_r\) when facing changes of the regulator’s flow q:
In other words a sudden rise in flow either causes a drop of the left pressure or a rise of the right pressure or both. Likewise a drop of flow either causes a rise of the left pressure or a drop of the right pressure or both. This relationship is deduced from the pipe equations in Sect. A.1 of the “Appendix”.
3.1 Regulators controlling the gas flow
The task of regulators in gas networks is to reduce the pressure along their orientation along their orientation, which they achieve by using the connection to the neighboring pipes established by (8) and decreasing the passing gas flow. This flow decrease is accomplished by reducing the regulator’s opening degree \(o\in [0,1]\), which can be interpreted as changing the diameter of the regulator, assuming its cross-sectional area is cylindrical, see (Fügenschuh et al. 2015). If a regulator is fully opened at \(o=1\), it does not reduce the flow and \(p_\ell =p_r\) holds. At \(o=0\), a regulator is fully closed, which disconnects the network. Hence, \(q=0\) and the pressures are decoupled. Values in between induce artificial resistance to reduce the flow and therefore create a pressure decreases in flow direction as derived in Section A.1, i.e., \(p_\ell \ge p_r\). A schematic visualization of the principle operation of a regulator is depicted in Fig. 1. It originates from (Kuphaldt 2019), where more insights on various technical details and further information on other gas network elements are provided, too.
3.2 Target value control
For gas network operators, i.e., dispatchers, adjusting the opening degree of single elements by hand is far too involved and would require continuous observation. Instead, regulators have automated systems fed by desired ranges for the 3 local intrinsic quantities \(p_\ell , p_r, q_m\). The 6 defining bounds for these ranges , , , , , are called target values (and sometimes also referred to as set-point values). An overview of the 6 types of target values and their consequential influence is listed in Table 1.
If a target value imposed bound is violated by the state values (we then also refer to the target value as being violated), the element adjusts according to Table 1 to prevent or reduce the violation as much as possible, using the relation of the opening degree to the three quantities. To resolve conflicts of multiple violated target values demanding opposing changes, the target value types are prioritized by \(\varphi (\tau )\) for the target values \(\tau \) from top to bottom. In general, pressure target values and those reducing the opening degree and thereby the flow have higher priorities. Some target values may share their priority value, but only if they influence the element’s control in the same way.
Note that it is possible to force the regulator to be fully opened or fully closed by using certain target value combinations, for example, by setting
The Regulator’s Check Valve A regulator contains a built-in element that prevents flow against its orientation, i.e., \(q\ge 0\). This element is called a check valve or flap trap and automatically closes the regulator in case the right pressure rises above the left one, i.e. \(p_\ell < p_r\). This action has a higher priority than all the target values and therefore happens independently of these. If the regulator is not closed by the check valve, \(p_\ell \ge p_r\) holds.
Infinite Minimal Flow Target Value For most elements, the lowest priority target value is fixed to \(\infty \), which effectively is the same as choosing , in which case we may also denote . Regulators were actually are called “flow band regulators” or simply “band regulators”. They keep their current degree of openness and do not react to changes in the flow as long q stays within and provided that all other target values are satisfied. This behavior would increase the overall complexity of the models used for the simulation and optimization of target values tremendously and is out of this paper’s scope.
Target Value Existence Not all target values are always in use. This has to be taken into account by the models described below, for example by prohibiting their violation by setting maximal target values to \(\infty \) and minimal target values to 0.
However, we assume that the fixed target value always exists and, in addition, at least one of the closing target values. Furthermore, we expect the existence of in case either or exists. As a consequence, for each existing not-fixed target value, there also exists a target value of opposing direction as well as lower priority.
3.3 Target values for compressors
In addition to regulators, also active compressors are controlled by target values. While compressors increase the pressure in flow direction, they influence their flow throughput to achieve these local pressure changes similar to regulators. For the two most common types of compressors, the flow changes are realized by controlling the compressor’s rotational speed, see (Fügenschuh et al. 2015; Schmidt et al. 2017) for a more detailed explanation. Due to the similarities, the target value description for compressors is very close to the one of regulators. However, it is out of this paper’s scope.
4 Modeling regulators for dynamic simulations
We follow (Streubel 2022) for the derivation of regulator models for the dynamical simulation. Consider the following ordinary differential equation
Assuming that \(c(t) = 0\) is the constant zero function, the corresponding solution would be \(x(t) = \exp (t_0 - t)^\alpha \cdot x_0\) and be convergent to \(c(t) = 0\) for \(t \rightarrow \infty \). On the other hand if c(t) is some continuous but not necessarily smooth function, we still can find an explicit expression by adding a correction term to the solution formula
This more general solution is a leaky or lazy smoothing of c(t), because in the limit \(\dot{x}/\alpha \xrightarrow {\alpha \rightarrow \infty } 0\), we find \(x(t) = c(t)\). Hence, the behaviour of x(t) is best described as chasing or constantly steering towards c(t). This means we can utilize (9) as a starting point for modeling regulators in the following way: Assume \(x(t) = q(t)\) within (9) to be the flow through a regulator, then the function c(t) can be interpreted as a controller. That means by raising or lowering the values of c(t) over time we can guide the flow and hence regulate it up or down.
Let us again substitute \(x(t) = q(t)\) but also with the target value for the flow and so (9) turns into
Here and for the remainder of this section we will assume .
Most regulators do not allow reversed flow and are of course non-compressing. Check valves can be modeled via \(\dot{q} = \alpha \max (0, -q)\), where \(\dot{q} = 0\) whenever \(q \searrow 0\). The non-compressing behavior can be expressed via \(\dot{q} = \alpha \min (p_\ell - p_r, 0)\) such that \(\dot{q} = 0\) once \(p_\ell \searrow p_r\) to avoid further contribution into the right pressure according to the behavioral tendencies introduced in (8). Both features combined with (10) provide
which is a nesting of max-min-comparisons that represent logical and/or conjunctions. This nesting is necessary and represents the prioritization of the already integrated features. In a similar manner to the non-reversed flow and the non-compressing behaviour, we find independent modelings for each of the remaining target values
Finally, we combine all single-aspect models within the nesting of (11) and end up with the full regulator model
Two possible modifications of (12) are
or the limit system \(\dot{q}/\alpha \xrightarrow {\alpha \rightarrow \infty } 0\)
5 Modeling regulators for discrete optimization
To be able to optimize over the regulator’s target values in the context of time-discretized transient gas network operation, we aim for a model suitable for discrete optimization solvers. Our objective is to minimize the number of changes in the target values such that the control decisions induced by them are feasible to fulfill the demands of the network, which are usually given at the entries and exits. A low number of target values leads to a more stable control of the network, which is preferable for the network operators and reduces strain on the technical elements (Hennings et al. 2021).
For improved readability, we use indicator constraints of the form
stating that the constraint \(a^T x \le a_0\) for a set of variables \(x = \{x_1, \dots , x_i\}\) is active if the binary variable y attains the value b. If x is bounded, these can be reformulated using linear constraints, see for example (Bonami et al. 2015).
5.1 A basic regulator model
We use the following model describing the general behavior of a regulator \(a=(\ell ,r)\) from the literature, see for example (Koch et al. 2015; Hennings et al. 2021):
The model features the mode variables \(m _{a}^\textrm{op}\) for an open regulator, \(m _{a}^\textrm{cl}\) for a closed regulator, and \(m _{a}^\textrm{ac}\) for an active regulator with opening degree in (0, 1), which has also been used in (Hennings et al. 2021). We add the mode \(m _{a}^\textrm{cvcl} \) for a regulator closed by the internal check valve in case of \(p _{\ell } \le p _{r} \). In this case, the target values do not influence the regulator according to Sect. 3.2. Note that the open mode is often replaced by a “bypass” mode in the literature, representing a bypassing network path that also allows flow in the backwards direction, which is not included in our regulator model.
5.2 Stable-pushing target value combinations
In preparation for the model construction, we determine for each target value the cases in which its implied bound has to be obeyed. While in reality, the adjustments of active elements caused by violated target values happen with a certain delay, we make the following assumption for our target value model:
Assumption 1
The control of each active element, i.e., the opening degree adjustment for regulators, reacts to changing target values or operation point conditions immediately and with perfect precision according to the given list of target value priorities \(\varphi \). Hence, we can assume the control is always fully adjusted to the given network situation and target values.
This assumption is fundamental for the following classification and is mainly motivated by the fact that the larger size of time steps used in discrete optimization problems in comparison to simulation approaches prohibits an appropriate modeling of delayed element reactions. Note that this is equivalent to the simulation model (12.ii) assuming \(\alpha \rightarrow \infty \). Moreover, we observe the following:
Observation 1
Since always exists and is violated, there always is at least one violated target value. From these target values, we call the one with the highest priority \(\varphi \) the pushing target value.
Note that there might be multiple violated target values of highest priority. However, these always have the same direction, i.e., either opening or closing altogether, see Table 1.
Having these two building blocks, the following theorem can be deduced, which is the fundamental building block for enumerating all the possible compositions of target value states of a regulator.
Theorem 1
[Stable and pushing target values] If \(p _{\ell } \ge p _{r} \) for a regulator a, i.e., it is not closed due to its check valve, one of the following statements holds:
-
(1)
There is at least one target value \(\tau \), called the stable target value, with higher priority than the pushing target value as well as opposing direction in terms of change in case of violation, such that \(\tau \) is equal to its corresponding operation point quantity.
-
(2)
The regulator a is fully open, i.e., in open mode, and the pushing target value is an opening target value.
-
(3)
The regulator a is fully closed, i.e., in closed mode, and the pushing target value is a closing target value.
Proof
Observation 1 states the existence of the pushing target value as a violated target value of highest priority at any given point in time. According to the description given in Sect. 3.2, the regulator tries to adjust the opening degree to reduce the corresponding violation. However, according to Assumption 1, the opening degree is already perfectly adjusted and therefore does not change. The two possible reasons are:
-
(a)
The regulator cannot adjust the opening degree in the desired direction since it is already fully opened or closed.
-
(b)
There is some higher priority target value that would be violated if the opening degree would be changed by any amount in the desired direction due to the induced operation point changes.
For case (a), either statement (2) or (3) holds, depending on the direction of the pushing target value’s opening degree change. For case (b), the higher priority target value has to have the opposite opening degree change direction compared to the pushing target value. Furthermore, the current target value must be equal to the corresponding operation point quantity since any change in the opening degree, no matter how small, would cause a violation. Hence, statement (1) is true. \(\square \)
Note that while the situations of (2) and (3) are coupled to a specific regulator mode, this is not the case for (1), where the two opposing target values may fix the opening degree at a position that just happens to be fully open or fully closed.
Using Theorem 1, we are able to compile a complete list of possible configurations in terms of combinations of stable and pushing target values, which cover all possible states of a fully adjusted regulator according to Assumption 1. This list of stable-pushing target value combinations is displayed in Table 2. Each row represents either a possible stable-pushing target value combination with opposite directions or a single pushing target value without a stable target value counterpart. Since the pushing target value is, by definition, the highest priority target value that is violated, all bounds implied by target values having a higher priority have to be satisfied. On the other side, all constraints of target values with priority lower than or equal to the pushing target value are irrelevant for that stable-pushing combination. Note that in the case of non-existing target value types, the corresponding rows with non-existing stable or pushing target values, as well as the columns of the missing target value types, would be removed.
To prepare for the formulation of our mixed-integer programming model, we make one adjustment to the contents of Table 2: We only allow the usage of the active mode for all target value combinations featuring a stable target value. This is possible since the feasible region of both the open and the closed mode is contained in the one of the active mode according to the above-presented regulator model (13). As a result, we can assume that the regulator is in active mode if and only if it has a stable target value. All the open and closed mode cases with stable target value are covered by a corresponding operation point from the active mode showing the exact same behavior.
5.3 A mixed-integer linear formulation
Based on the characterization derived in the previous section, we now present our mixed-integer linear programming (MILP) target value model for single regulator \(a=(\ell ,r)\) at time t. As the model extends the basic regulator model (13), we only state the additional variables and constraints. First, we introduce some sets:
Now, we can specify the new variables as
The \(\tau \) variables represent the target values chosen by the model. They can be set inside the variable bounds \(\underline{\tau }_{x,a}\) and \(\bar{\tau } _{x,a}\) for each target value x. These are given for each individual regulator a and can considerably restrict the feasible operating range of the regulator. If, for example, the minimal left pressure target value has a lower bound value of \(40\,\hbox {bar}\), then the regulator has to operate at a left pressure value of at least \(40\,\hbox {bar}\) in active mode and open mode, since according to Table 2, the target value can only be violated for the closed mode or if the regulator is closed due to the check valve. The variables \(\theta \) represents the stable-pushing target value combination chosen for each regulator a. Finally, the \(\delta \) variables indicate a change in the target value variables \(\tau \) between the values of the previous and the current time point.
For the following set of constraints, we introduce the function o mapping from a given type of target value to the corresponding point of operation:
In addition, we use \(\varphi \) as a function from target value types to the priorities given in Table 1 above. Also, we introduce the parameter \(\varepsilon \), which represents a relative tolerance used in the equality constraint of the stable target value. As explained at the beginning of Sect. 5.2, the adjustment of the regulator’s control to changing target values or operating point conditions happens with a certain delay in reality. Hence, there usually is an offset between the used target values and the current operation point. To better reflect this behavior and prevent too many target value changes caused by minor adjustments of the stable target value, we introduced the relative \(\varepsilon \) value.
The constraints for our target value model are then given as
Equation (14a) ensures the choice of exactly one stable-pushing target value combination fitting to the current mode. Note that for the check-valve-closed mode, no combination is chosen. Constraints (14b), (14c), and (14d) establish the consequences of the choice of a stable-pushing target value combination and are based on the illustration of Table 2. Structure-wise these constraints collect for a given target value type \(\tau \) all stable-pushing target value combinations in which this type of target value is the stable one for (14b), is violated for (14c), or is satisfied for (14d). If one of these combinations is chosen, the corresponding relations between the target value and the corresponding operation point are enforced. Finally, constraint (14e) defines the target value change variables, forcing the actual target value variable \(\tau _{x,a,t} \) to keep their value if the change variable does not indicate a change, i.e., is zero.
As objective function, we minimize the number of target value changes:
Note that (Pfetsch et al. 2015; Schmidt et al. 2015; Koch et al. 2015) introduced a model for regulators without remote access that have a set-point control for the maximum right pressure with value \(p ^\textrm{set}\). Depending on whether the right pressure is larger than, equal to, or less than \(p ^\textrm{set}\), the mode is closed, active, or open, respectively. In addition, these regulators also feature a check valve behavior, which in their case allows flow against the regulator’s orientation (bypass instead of open mode). Except for the reverse flow possibility, the described behavior can as well be achieved with our formulation, for example, by setting , , and . The target value is always satisfied and is always violated. Hence, the regulator is either in active mode and has a stable , with \(p _{r} \) equal to the set-point value, or is violated, leading to a closed regulator, or \(p _{r} \) is below and satisfied, leading to the open mode. This shows that our optimization model covers regulators with and without remote access, as introduced in the mentioned literature.
6 Numerical evaluation
To show and verify the accuracy of our models, we present in this section two experiments using the target value control on a single regulator. It is embedded in a simple path network between two pipes, each with \(L={10}\,\hbox {km}, D={0.9}\,\hbox {m}, r={0.012}\,\hbox {mm}\), see Fig. 2.
For both scenarios, we determine the solution using the dynamic simulation model presented in Sect. 4 as well as the optimization model presented in Sect. 5. Both solutions need to be validated in comparison with a reference solution embodying or substituting the real-world network. Such a reference solution is determined using the SIMONE simulator, which has established itself as a de facto standard due to its wide use in industry. We therefore refer to solutions computed with SIMONE as industry simulations. In other words we attempt to get close to SIMONE results.
The initial steady state of the scenarios features a flow of \(10\,\hbox {kg/s}\) on all arcs as well as inflow at the entry and outflow at the exit. The pressure ranges from \({50}\,\hbox {bar}\) at \(n_\textrm{in}\) to \({49.992}\,\hbox {bar}\) at \(n_{\textrm{out}}\), the regulator is fully open, the constant gas temperature is set to \({283.15}\,\hbox {K}\), and the gas is, for the sake of simplicity, assumed to be pure methane.
The simulation has been programmed in python using the numpy (Harris et al. 2020) and scipy (Virtanen et al. 2020) libraries, i.e., all models, their derivatives but also the necessary solver for differential algebraic equations, for which we have implemented the well-known implicit Euler method. As pipe model, we use the left-right-discretization (6) of the ISO 3 model, equipped with the linear AGA formula for the real gas factor. Note that we chose \(\alpha =1000\) for the simulation model.
For the optimization, we take the linearized pipe model (1b”) discretized with the implicit box scheme. Furthermore, we use a constant real gas factor z, which is determined for each node by using the formula of Pápay and computed from the initial state. The linearized model is not reliable in the case of volatile flow conditions but works fine for the following scenarios featuring similar flows for most of the time. As a benefit, the resulting overall model is linear, which enables us to use a MILP solver for the optimization, in our case Gurobi in version 9.1.1 (Gurobi Optimization 2020), which was accessed via Pyomo (Hart et al. 2011, 2017). Furthermore, we picked \(\varepsilon =0\) for the optimization model.
All computations have been executed on a desktop computer using an Intel Core i5-10310U processor and 16 GB of RAM.
6.1 First scenario
The first scenario’s goal is to verify that both our models are able to accurately produce a realistic target value behavior. As test instance, we use a set of target values obtained from our project partner, the gas network operator Open Grid Europe GmbH (OGE). These target values should lead to different opening degree and throughput changes of the regulator while assuming a steady inflow and outflow at the boundaries of \({10}\,\hbox {kg/s}\) over the whole time horizon of \({12}\,\hbox {h}\). This scenario is a stress test, which represents an example of the gas flow within large transport pipelines in the mid-to-high pressure range of \({30}\,\hbox {bar}\) to \({100}\,\hbox {bar}\). It has been designed to provoke relevant interferences from the regulator involving almost each available target value. An overview of the different switching actions of the target values is provided in Table 3.
For the optimization, the simulation, as well as the reference industry simulation, we use a rather typical time discretization of \({3}\,\hbox {min}\). By typical we mean that we have come across this particular time resolution frequently in data and various discussions with representatives from the transporting industry. So we go along with it and treat it as a mandatory time resolution within our experiments. Note that while for the optimization its time discretization is fully determined by this initial choice, the simulators do take it as a baseline and may dynamically vary the time steps’ length internally to add time points in between the mandatory ones. Also note that the target values are fixed for the optimization here, which effectively transforms the problem into a plain feasibility problem, where any feasible solution of the problem has the same nodal pressure and arc flow values. Both simulation runs as well as the optimization run finished in less than 10 s.
The differences between the three solutions are shown in Fig. 3, where we compare the simulated solution (SIM) with the one computed by the industry simulator (IND) in Fig. 3a, the optimized solution (OPT) with the one computed by the industry simulator (IND) in Fig. 3b, and the optimized solution (OPT) with the simulated solution (SIM) in Fig. 3c. The displayed relative accumulated errors are defined as the integrated difference over time divided by the time-integrated reference solution, i.e., let \({\textrm{SOL}}, {\textrm{REF}} \in \{{\textrm{SIM}}, {\textrm{OPT}}, {\textrm{IND}}\} \), \(\textrm{SOL} \ne {\textrm{REF}}\) and \(y \in \{p_\ell , p_r, q\}\), then
The development of the left and right pressure values and target values of the regulator, as well as the development of the flow values and target values, are given in the appendix in Figs. 6, 7, and 8. There, we also give a detailed description of the interaction of the different target values with the three quantities and explain the resulting changes of the regulator’s opening degree.
All three solutions are very similar to each other in terms of the development of the regulator’s operation point over time. Hence both derived models, the simulation model and the optimization model, catch the regulator’s behavior compared to the industrial simulation. From Figs. 3, we are able to obtain the following maximal relative error values and relative error values at the end of the time horizon for the pressure, where we always choose the bigger of the two errors given for the left and right pressure, as well as the flow.
We observe that the differences in the pressures are, in general, smaller than those in the flows. This is due to the fact that each of the three methods has a different internal implementation of the reaction of the regulator’s opening degree to changing target values conditions. Hence, even though the time discretization is the same for all approaches, the flow values are different in the unstable periods shortly after a target value change leading to a new violation. However, these differences only occur for brief periods of time. We also note that the differences between the two simulation procedures are, in general, smaller than those between the optimization and one of the simulation runs. This is no surprise, as we assume an idealized target value behavior for the optimization model, see Assumption 1. However, we are glad to see how close the solution of the idealized model is to both simulations.
6.2 Second scenario
In the second scenario, we tested both models in a different setup. Here, we determine the regulator’s target values using the optimization model and verify them using the simulation model. Since this task is quite demanding in a volatile environment, even for only a single regulator, we discretized the time horizon for the optimization model into steps of 15 min, leading to 48 time steps in total, whereas both the simulations continue to solve with the baseline resolution of \(3\,\hbox {min}\) as established in the first scenario.
To ensure and provoke the necessity of target value adjustments, we prescribed not only the inflow at the entry and outflow at the exit but also the pressure values over time at both nodes. These pressure values were obtained by solving the optimization model of the first scenario using a time step resolution of \({15}\,\hbox {min}\). This enables us to compare the number of target value changes between the OPT solutions of scenarios 1 and 2 and provide an estimate of the optimization potential.
There is a fundamental difference in the interpretation of value updates of target values between the optimization and the simulation model. A simulation starts with the control adjustment at some point in time, let it be t, and proceeds to adjust thereafter. In contrast to this and due to Assumption 1, the optimization model assumes the adjustment to be finished at t. Hence, it basically assumes that the target values have been changed at some point within the 15 min time step preceding time t. To better synchronize the behaviour in both models, we offset each time point t where the optimization model has determined a change of target values to \(t - \varDelta _t/2\) before passing to the simulation processes. Here \(\varDelta _t\) corresponds to the time resolution of the optimization model, i.e., \(\varDelta _t={15}\,\hbox {min}\). This reduces the maximum possible error between the used and the actual change time. Note that we further round \({7.5}\,\hbox {min}\) up to the next integer value of \({8}\,\hbox {min}\), because our data interface can only process full minutes. While all the simulation runs finishes after couples of seconds, the optimization process requires up to 11 h to finish, i.e., to confirm optimality. The corresponding optimal solution is found in under 6 s.
The target values determined by the optimization are listed in Table 4. The differences between the three solutions are shown in Fig. 4, where we again compare two out of the three solutions using the above-defined relative accumulated error measure in each of the visualizations.
When comparing the listed target value changes in Tables 3 and 4, we observe that only 8 target value changes were needed to achieve the regulator control instead of the previous 11 changes. In the optimized solution, the redundant changes of at 04:30 and of at 06:30 are removed, as they do not affect the regulator’s control but increase the objective function value. In addition, the control change at 07:30, which was a consequence of changing at 05:30 and at 07:30, could be realized by a single change of at 07:30. Similar to this last case, some of the other control changes are now triggered by different target value changes. One example would be the change at 05:00, which was previously caused by setting to \({55}\,\hbox {bar}\) and is now triggered by setting to \({45}\,\hbox {bar}\). We again refer to the appendix for a visualization of the development of the left and right pressure values and target values, as well as the development of the flow values and target values in Figs. 9, 10, and 11.
When looking at the solutions over time, the development is again quite similar, which can also be observed from the table below. It shows the maximal relative error and the relative error at the end of the time horizon for the pressure values, where we always choose the bigger of the two errors given for the left and right pressure, as well as the flow values.
The error values of the comparison between our simulation and the one of the industry software are consistent with those of the first scenario. This is not surprising, as only the simulated instance changes while the general setup for both stays the same. When comparing one of the two and the optimized solution, we clearly see the difference to the values of the first scenario. Especially the maximum flow error, but also the maximal and overall errors in the pressure have increased significantly. This is an expected change, as the optimization now uses a more coarse discretization. Nevertheless, the pressure differences are still very small in general and not too far away from the values of either simulation. Regarding the errors in the flow, the main difference occurs in the very first minutes of the scenario. Since the initial target values are violated, the control adjusts immediately, which happens during the first time step for all of the three approaches. Due to the different time discretizations, the adjustment is 5 times faster for the simulations than for the optimization. However, the final error regarding the flow values is surprisingly small and consistent to the values of the first scenario. We summarize that both simulations yield very similar results, while the solution of the target value optimization may produce different values during the times of adjusting the control to new target values, but gives very similar results regarding the stabilized control situations.
7 Outlook
In this article, we introduced models for regulators in gas networks and embedded target values for their control. The target values form a system of 6 simultaneously active and hence competing set-points, which enables the regulating element to react to changing conditions in the surrounding network without the need of continuous human observation or manual interactions. Our description lives up to expectations and needs compared to features found in industry-standard simulators.
To capture the behavior of target value controlled regulators, we introduced two different models. The first one is a model suitable for dynamic or transient simulation. Here, the target values are assumed to be piecewise linear functions, and their competing logic is encoded in terms of nested \(\max -\min \)-comparisons. A second model was designed to be used in discrete optimization problems and determines an optimized set of target values changing as little as possible while enabling the demanded network control. It is based on a characterization of the target value behavior as a set of specific element states, the stable-pushing target value combinations. These assume a regulator reacting to changes in its environment or of its target values immediately and perfectly precise. Depending on the chosen combination, different constraints are active that relate the target values to the values of the element’s point of operation.
Both models have been evaluated in comparison to a commercial simulator, actively used in industry. We showed that the behavior of our simulation model matches the expectations in that the simulated solutions stick close in terms of the resulting pressure and flow values. The relatively higher differences in the flow values are short-lived and their integral equaling the total amount of transported gas is negligible. These differences in the flow values represent slightly different timings and adjustment speeds of regulator actions. Possible strategies to address this could be the introduction of delay or slope limiter. However, this is more a question of technical specification rather than mathematical consideration. For the optimization model, we could show that it works very well when using the same time discretization as for the simulation together with already fixed target values. Here, the differences to both simulated results are just slightly larger than both simulations among each other, even though we used a model based on more simplifying assumptions. In a more realistic scenario, in which the target values are subject to optimization, we need to use fewer and larger time steps. As a result, the relative differences to the simulated results have increased. However, they still stay very close and bounded, especially the components representing the pressures. This indicates that the optimization model is able to reproduce the target value behavior reasonably well.
There are multiple paths to pursue for future research. Firstly, we could replace or add other kinds of target values, e.g., bounding values for the ratio or difference of in- and outlet pressures. Secondly, the regulator model for simulation could be converted into a model for band regulator if by replacing (10) with
just before adding the remaining target value mechanisms. Thirdly, we may apply our techniques to embed target-value-based controls into compressor unit, group, and station modeling. In that regard, we have already discussed it briefly in Sect. 3.3, but it would need to be elaborated and established further in full detail. Furthermore, the optimization model can probably be improved to enhance the performance when combined with state-of-the-art optimization frameworks. While the model captures the target value behavior very well already, it is quite challenging to solve for one single element. The overall goal is to make it usable in a transient gas network operation model using multiple regulators and hundreds of other network elements. Finally, the concept of a target-value-based element control can be applied to active elements in other flow networks. As an example, we mention pumps in water networks, which from a macroscopic viewpoint similarly control their network as compressors do for gas networks.
References
Åström K, Kumar P (2014) Control: a perspective. Automatica 50:3–43. https://doi.org/10.1016/j.automatica.2013.10.012
Åström K, Murray RM (2008) Feedback systems: an introduction for scientists and engineers. Princeton University Press, Princeton
Benner P, Grundel S, Himpe C, Huck C, Streubel T, Tischendorf C (2019) Gas network benchmark models. Springer, Cham, pp 171–197. https://doi.org/10.1007/11221_2018_5
Bonami P, Lodi A, Tramontani A, Wiese S (2015) On mathematical programming with indicator constraints. Math Program 151(1):191–223. https://doi.org/10.1007/s10107-015-0891-4
Brouwer J, Gasser I, Herty M (2011) Gas pipeline models revisited: Model hierarchies, nonisothermal models, and simulations of networks. Multiscale Model Simul 9(2):601–623. https://doi.org/10.1137/100813580
Brown GO (2003) The history of the Darcy-Weisbach equation for pipe flow resistance. Environmental and water resources history,pp 34–43, https://doi.org/10.1061/40650(2003)4
Camacho EF, Alba CB (2007) Model predictive control. Springer, London
Carter RG, Rachford HH Jr (2003) Optimizing Line-Pack Management to Hedge Against Future Load Uncertainty. In: PSIG annual meeting, pipeline simulation interest group, Bern, Switzerland
Colebrook CF, White CM (1937) Experiments with fluid friction in roughened pipes. Proc R Soc Lond Ser A - Math Phys Sci 161(906):367–381. https://doi.org/10.1098/rspa.1937.0150
Darby ML, Nikolaou M (2012) Mpc: Current practice and challenges. Control Eng Pract 20(4):328–342. https://doi.org/10.1016/j.conengprac.2011.12.004
Domschke P, Hiller B, Lang J, Mehrmann V, Morandin R, Tischendorf C (2021) Gas network modeling: an overview. Technical Report, Technische Universität Darmstadt
European Commission (2020) Communication from the commission to the European parliament, the council, the European economic and social committee and the committee of the regions—hydrogen strategy for a climate-neutral Europe. https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:52020DC0301. Accessed 22 Nov 2021
Federal Ministry for Economic Affairs and Energy (2021) Still indispensable for a reliable energy supply. https://www.bmwi.de/Redaktion/EN/Dossier/conventional-energy-sources.html. Accessed 22 Nov 2021
Fügenschuh A, Geißler B, Gollmer R, Morsi A, Pfetsch ME, Rövekamp J, Schmidt M, Spreckelsen K, Steinbach MC (2015) Physical and technical fundamentals of gas networks. In: Koch et al. (2015)
Graham JT, Wukovits VJ, Yurchevich JD (1996) On-line modeling a diamond in the rough. In: PSIG annual meeting, pipeline simulation interest group, PSIG-9601
Gurobi Optimization L (2020) Gurobi optimizer reference manual, version 9.1. https://www.gurobi.com
Haber R, Schmitz U, Zabet K (2014) Implementation of pfc (predictive functional control) in a petrochemical plant. IFAC Proc 47(3):5333–5338. https://doi.org/10.3182/20140824-6-ZA-1003.02440
Harris CR, Millman KJ, van der Walt SJ, Gommers R, Virtanen P, Cournapeau D, Wieser E, Taylor J, Berg S, Smith NJ, Kern R, Picus M, Hoyer S, van Kerkwijk MH, Brett M, Haldane A, del Río JF, Wiebe M, Peterson P, Gérard-Marchant P, Sheppard K, Reddy T, Weckesser W, Abbasi H, Gohlke C, Oliphant TE (2020) Array programming with NumPy. Nature 585(7825):357–362. https://doi.org/10.1038/s41586-020-2649-2
Hart WE, Laird CD, Watson JP, Woodruff DL, Hackebeil GA, Nicholson BL, Siirola JD (2017) Pyomo—optimization modeling in python, vol 67, 2nd edn. Springer, Berlin. https://doi.org/10.1007/978-3-319-58821-6
Hart WE, Watson JP, Woodruff DL (2011) Pyomo: modeling and solving mathematical programs in Python. Math Program Comput 3(3):219. https://doi.org/10.1007/s12532-011-0026-8
Hennings F (2018) Benefits and limitations of simplified transient gas flow formulations. In: Operations research proceedings 2017. Springer, pp 231–237
Hennings F (2021) Large-scale empirical study on the momentum equation’s inertia term. J Nat Gas Sci Eng. https://doi.org/10.1016/j.jngse.2021.104153
Hennings F, Anderson L, Hoppmann-Baum K, Turner M, Koch T (2021) Controlling transient gas flow in real-world pipeline intersection areas. Optim Eng 22(2):687–734. https://doi.org/10.1007/s11081-020-09559-y
Hoppmann-Baum K, Hennings F, Zittel J, Gotzes U, Spreckelsen EM, Spreckelsen K, Koch T (2020) From natural gas towards hydrogen—a feasibility study on current transport network infrastructure and its technical control. Tech. Rep. 20-27, ZIB, Takustr. 7, 14195, Berlin
Huck C (2018) Perturbation analysis and numerical discretisation of hyperbolic partial differential algebraic equations describing flow networks. PhD thesis, Humboldt-Universität zu Berlin, Mathematisch-Naturwissenschaftliche Fakultät. https://doi.org/10.18452/19596
Huck C, Jansen L, Tischendorf C (2014) A topology based discretization of PDAEs describing water transportation networks. PAMM 14(1):923–924. https://doi.org/10.1002/pamm.201410442
Koch T, Hiller B, Pfetsch ME, Schewe L (eds) (2015) Evaluating Gas Network Capacities, MOS-SIAM Series on Optimization, vol 21. SIAM
Kolb O, Lang J, Bales P (2010) An implicit box scheme for subsonic compressible flow with dissipative source term. Numer Algorithms 53(2–3):293–307
Kuphaldt TR (2019) Source code of lessons in industrial instrumentation textbook. Self published files at https://www.ibiblio.org/kuphaldt/socratic/sinst/book/liii.tar.gz. Last accessed 22 Nov 2021
LIWACOM Informationstechnik GmbH (2022) SIMONE software. https://www.liwacom.de/. Accessed 16 June 2022
Mallinson J, Fincham A, Bull S, Rollett JS, Wong ML (1993) Methods for optimizing gas transmission networks. Ann Oper Res 43(8):443–454
Meireles M, Almeida P, Simoes M (2003) A comprehensive review for industrial applicability of artificial neural networks. IEEE Trans Ind Electron 50(3):585–601. https://doi.org/10.1109/TIE.2003.812470
Menon ES (2005) Gas pipeline hydraulics, 1st edn. CRC Press, Boca Raton
Nguyen AT, Taniguchi T, Eciolaza L, Campos V, Palhares R, Sugeno M (2019) Fuzzy control systems: past, present and future. IEEE Comput Intell Mag 14(1):56–68. https://doi.org/10.1109/MCI.2018.2881644
Nikuradse J (1950) Laws of flow in rough pipes. National Advisory Committee for Aeronautics Washington
Onnes HK (1902) Expression of the equation of state of gases and liquids by means of series. Koninklijke Nederlandse Akademie van Wetenschappen Proc Ser B Phys Sci 4:125–147
Osiadacz AJ (1996) Different transient flow models—limitations, advantages, and disadvantages. In: PSIG-9606, Pipeline Simulation Interest Group
Pambour KA, Bolado-Lavin R, Dijkema GP (2016) An integrated transient model for simulating the operation of natural gas transport systems. J Nat Gas Sci Eng 28:672–690. https://doi.org/10.1016/j.jngse.2015.11.036
Pápay J (1968) A termeléstechnológiai paraméterek változása a gáztelepek müvelése során. OGIL Müsz Tud Közl pp 267–273
Pfetsch ME, Fügenschuh A, Geißler B, Geißler N, Gollmer R, Hiller B, Humpola J, Koch T, Lehmann T, Martin A, Morsi A, Rövekamp J, Schewe L, Schmidt M, Schultz R, Schwarz R, Schweiger J, Stangl C, Steinbach MC, Vigerske S, Willert BM (2015) Validation of Nominations in Gas Network Optimization: Models, Methods, and Solutions. Optim Methods Softw 30(1):15–53. https://doi.org/10.1080/10556788.2014.888426
Plotly Technologies Inc (2015) Collaborative data science. https://plot.ly
Porter B, Khaki-Sedigh A (1988) Design of robust adaptive digital setpoint tracking Pl controllers incorporating recursive step-response matrix identifiers for gas turbines. Trans Inst Meas Control 10(1):9–14. https://doi.org/10.1177/014233128801000103
Rachford HH Jr, Carter RG (2000) Optimizing pipeline control in transient gas flow. In: PSIG annual meeting, pipeline simulation interest group, Savannah, Georgia
Saleh JM (2002) Fluid Flow Handbook. McGraw-Hill Professional
Schmidt M, Steinbach MC, Willert BM (2015) High detail stationary optimization models for gas networks. Optim Eng 16(1):131–164. https://doi.org/10.1007/s11081-014-9246-x
Schmidt M, Aßmann D, Burlacu R, Humpola J, Joormann I, Kanelakis N, Koch T, Oucherif D, Pfetsch ME, Schewe L, Schwarz R, Sirvent M (2017) GasLib–a library of gas network instances. Data 2(4):1. https://doi.org/10.3390/data2040040
SIMONE Research Group, LIWACOM Informationstechnik GmbH (2021) SIMONE software—equations and methods
Skogestad S, Postlethwaite I (2005) Multivariable feedback control: analysis and design. Wiley, Hoboken
Stelter R (1988) Control of gas transport systems—a multilevel approach. IFAC Proc Vol 21(19):309–314. https://doi.org/10.1016/S1474-6670(17)54511-5
Streubel T (2022) Simulation of piecewise smooth differential algebraic equations with application to gas networks. Doctoral Thesis, Humboldt-Universität zu Berlin. https://doi.org/10.18452/24688
Virtanen P, Gommers R, Oliphant TE, Haberland M, Reddy T, Cournapeau D, Burovski E, Peterson P, Weckesser W, Bright J, van der Walt SJ, Brett M, Wilson J, Millman KJ, Mayorov N, Nelson ARJ, Jones E, Kern R, Larson E, Carey CJ, Polat I, Feng Y, Moore EW, VanderPlas J, Laxalde D, Perktold J, Cimrman R, Henriksen I, Quintero EA, Harris CR, Archibald AM, Ribeiro AH, Pedregosa F, van Mulbregt P, SciPy 10 Contributors (2020) SciPy 1.0: Fundamental algorithms for scientific computing in python. Nat Methods 17:261–272. https://doi.org/10.1038/s41592-019-0686-2
Funding
Open Access funding enabled and organized by Projekt DEAL.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Competing Interests
The authors declare that they have no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
The work for this article has been conducted in the Research Campus MODAL funded by the German Federal Ministry of Education and Research (BMBF) (fund numbers 05M14ZAM and 05M20ZBM). Furthermore the authors thank the Deutsche Forschungsgemeinschaft for their support within Project B10 and Project C02 in the Sonderforschungsbereich / Transregio 154 Mathematical Modelling, Simulation and Optimization using the Example of Gas Networks.
Appendix
Appendix
1.1 A.1: On the relations of flows and pressures
Both regulators and compressors do manipulate the passing gas flow. Due to the gas dynamic modeled within neighboring pipes, the pressures will react and change as a consequence. Thus, from their direct influence on gas flow, active elements also have an indirect but immediate influence on pressures. Elaborating on this thought, either discretization as introduced in Sect. 2.3 does approximate pressures and flows linearly along a pipe, i.e.,
Thus, we find a common precursor as space continuous system of differential equations with algebraic constraints derived from the friction dominated variant of the isothermal Euler equations (1) as
where we refer to \(B_z(p(x, t)) \equiv \left[ z^2(p(x, t))/[z(p(x, t)) - p(x, t)\cdot \partial _p z(p(x, t))]\right] \) as bracket term. Now provided that \(B_{z}(p) > 0\), we can conclude for (15a) that net-positive inflows imply positive time derivatives of pressures, i.e.,
and likewise the other way around
for net-positive outflows. Furthermore, \(B_z(p) > 0\) is indeed true if and only if \(z(p) > p\partial _p z(p)\), which is generally true for any constant and linear model of the real gas factor and also true for the quadratic formula of Pápay on its recommended operational range. Hence, we could take control over local pressures in a predictable manner by manipulating the exchanged flow between two serial pipes. This is the fundamental mechanism on which we base our regulator modelings.
Thus in the sense of this paper, we consider a regulator (sometimes also referred to as control valve) \(\mathcal{R}\mathcal{G}\) to be a sub-network in itself, involving 1 entry pipe \({\mathcal {P}}_\ell ^\mathcal{R}\mathcal{G}\) followed by a so-called atomic regulator \(\mathcal{R}\mathcal{G}_{\textrm{atomic}}\) followed by 1 more exit pipe \({\mathcal {P}}_r^\mathcal{R}\mathcal{G}\). Figure 5 depicts the described sub-network configuration.
Now the atomic regulator centering between both hidden pipes is allowed to change the flow q by increasing or decreasing its resistance. In other words, it exploits our observations in (16) which roughly translate into the following diagram of expected principal reactions
i.e., a sudden rise in flow either causes a drop of the left pressure or a rise of the right pressure or both. Likewise a drop of flow either causes a rise of the left pressure or a drop of the right pressure or both.
1.2 A.2: Development of operation point values in the numeric evaluation
In the following, we give a description of the solutions of the first scenario presented in Sect. 6.1. The development of the values is given for the left pressure values in Fig. 6, for the right pressure values in Fig. 7, and for the flow values in Fig. 8. As the target values and quantity developments are very similar for the simulated solution (SIM), the optimized solution (OPT), and the solution of the industry simulator (IND), we only give a single description which applies to all three of them.
At the initial start, all the pressure target values are fulfilled, but is violated. Hence, the regulator closes until , which causes an over-time-increasing pressure imbalance between the left and right pressure. At 01:00, is set to \({15}\,\hbox {kg/s}\). Hence, the regulator fully opens again, the pressures equalize, and we go back to the initial steady state. Next, is set to \({6}\,\hbox {kg/s}\) for 30 min and then goes to \({10}\,\hbox {kg/s}\). The regulator enforces corresponding values of q, which first creates a pressure imbalance by reducing the flow and then stabilizes this imbalance. At 3:30, we start using the pressure target values by setting to \({47.0}\,\hbox {bar}\), which is violated. Since has the highest priority, the regulator closes until \(p_r={47.0}\,\hbox {bar}\) and then keeps this value, i.e., \(q={10}\,\hbox {kg/s}\) is established again. After setting back , the situation does not change since still enforces \(q={10}\,\hbox {kg/s}\). Now, is set, which again is violated and of high priority. Therefore, we further increase the pressure imbalance until reaching \(p_\ell ={55.0}\,\hbox {bar}\) and keep this situation stable, even though is reduced to \({53}\,\hbox {bar}\) again shortly after. The next new setting is to \({46.0}\,\hbox {bar}\) at 06:30, which is a violation of the target value. Since and are currently fulfilled, this forces the regulator to open until \(p_r={46.0}\,\hbox {bar}\) is reached. Here, we stabilize the flow at \(q={10}\,\hbox {kg/s}\) again. The reduction of to \({6}\,\hbox {kg/s}\) does not change this since is of higher priority than . As final changes, we first set to \({46.5}\,\hbox {bar}\) and then to \({47.5}\,\hbox {bar}\). The first change shifts the stable situation to \(p_r={46.5}\,\hbox {bar}\). However, we do not reach \(p_r={47.5}\,\hbox {bar}\) afterwards since this would violate . Hence, we stabilize at \(p_\ell ={53.0}\,\hbox {bar}\) and keep this situation until the end of the time horizon.
The development of the values for the second scenario presented in Sect. 6.2 is given for the left pressure values in Fig. 9, for the right pressure values in Fig. 10, and for the flow values in Fig. 11.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, 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 licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence 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. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Hennings, F., Petkovic, M. & Streubel, T. On the numerical treatment of interlaced target values: modeling, optimization and simulation of regulating valves in gas networks. Optim Eng 25, 491–527 (2024). https://doi.org/10.1007/s11081-023-09812-0
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11081-023-09812-0