Stability-Preserving Interpolation Strategy for Parametric

Stability-Preserving Interpolation Strategy for
Parametric MOR of Gas Pipeline-Networks
Yi Lu, Nicole Marheineke, and Jan Mohring
Abstract Optimization and control of large transient gas networks require the fast
simulation of the underlying parametric partial differential algebraic systems. Surrogate modeling techniques based on linearization around specific stationary states,
spatial semi-discretization and model order reduction allow for the set-up of parametric reduced order models that can act as basis sample to cover a wide parameter
range by means of matrix interpolations. However, the interpolated models are often
not stable. In this paper, we develop a stability-preserving interpolation method.
1 Introduction
For the efficient simulation and optimization of large transient gas networks parametric reduced order models (pROMs) play a crucial role. They might be obtained from the network model by linearization around specific stationary states
wrt. the parameters of interest (e.g., boundary pressure, temperature), spatial semidiscretization and balanced truncation [4, 5]. Treating the pROMs as basis, a wide
parameter range can be easily evaluated using matrix interpolation techniques [1, 2].
Since the interpolated models often suffer from instabilities [5], we propose a
stability-preserving interpolation strategy in this paper. The basis idea is reformulating the parametric full order models (pFOMS) of differential algebraic systems
originally given in descriptor form in the standard state-space form by help of singular value decomposition. Thereby, the system index is reduced while the finite
eigenvalues are preserved. To the resulting systems of ordinary differential equaY. Lu, N. Marheineke
FAU Erlangen-Nürnberg, Lehrstuhl Angewandte Mathematik I, Cauerstr. 11, D-91058 Erlangen,
e-mail: {yi.lu, marheineke}@math.fau.de
J. Mohring
Fraunhofer Institut für Techno- und Wirtschaftsmathematik (ITWM), Fraunhofer Platz 1, D-67663
Kaiserslautern, e-mail: [email protected]
1
2
Y. Lu et al.
tions classical techniques from model order reduction and matrix interpolation can
be applied, [1, 6].
2 State-Space Form via Singular Value Decomposition
Proceeding from a general linear time invariant system (LTIS) of differential algebraic equations, we transform it into a system of ordinary differential equations
(standard state-space form) by help of singular value decomposition (SVD). This
transformation goes with an index reduction. Consider
E
Σ:
d
x(t) = Ax(t) + Bu(t),
dt
y(t) = Cx(t) + Du(t),
(1)
where x ∈ Rn , u ∈ Rm and y ∈ R p account for the states, inputs and outputs, respectively. The matrix E ∈ Rn,n is singular, the other matrices A, B, C and D have
corresponding dimensions.
Σ E , 0) V1 V2 into (1) yields
Inserting the SVD E = W1 W2 diag(Σ
ΣE
d
x1 (t) = A11 x1 (t) + A12 x2 (t) + B1 u(t),
dt
0 = A21 x1 (t) + A22 x2 (t) + B2 u(t),
(2b)
y(t) = C1 x1 (t) + C2 x2 (t) + Du(t),
(2c)
(2a)
where xi = VTi x, Ai j = WTi AV j , Bi = WTi B, and Ci = CVi with i, j = 1, 2.
In case that the system (1) is of index-1, A22 is regular. Consequently, we obtain an explicit form for x2 from (2b), i.e., x2 (t) = −A−1
22 (A21 x1 (t) + B2 u(t)), and
can eliminate the variable from the equations, which implies the smaller system of
ordinary differential equations
ΣE
d
x1 (t) = As x1 (t) + Bs u(t),
dt
y(t) = Cs x1 (t) + Ds u(t),
(3)
−1
−1
s
s
where As = A11 − A12 A−1
22 A21 , B = B1 − A12 A22 A21 , C = C1 − C2 A22 A21 and
Ds = D − C2 A−1
22 B2 . The state-space representation (3) can be viewed as the result
from applying the projections Ws = W1 and Vs = V1 on the LTIS
E
d
x(t) = Ãx(t) + B̃u(t),
dt
y(t) = C̃x(t) + D̃u(t),
(4)
Π )A, B̃ = (I − AΠ
Π )B, C̃ = C(I − Π A) and D̃ = D − CΠ
Π B, where
with à = (I − AΠ
Π = V2 (WT2 AV2 )−1 WT2 . Note that (1), (2) and (4) are equivalent.
Lemma 1. Assume that (1) is a LTIS of index-1. Then the eigenvalues of the standard state-space formula (3) coincide with the finite eigenvalues of (1).
Stability-Preserving Interpolation for Parametric MOR
3
In case that (1) is of index-2 or higher, A22 is singular. Then reformulating the
system in a state-space form requires further singular value decompositions (among
others of A22 ) and substitutions. For the technical details we refer to [4].
3 Stability-Preserving Matrix Interpolation
The standard state-space formulation is the basis for our stability-preserving matrix
interpolation strategy. Consider a sample of pFOMs Σk of the form (1) wrt. different
parameter settings pk ∈ P, k = 1, ..., N. We compute the pROMS Σr,k of order r n
by applying the described state-space transformation (Wsk , Vsk ) and classical balance
truncation [6] for model order reduction (Wr,k , Vr,k ) – i.e., by using the (combined)
projections Wk = Wsk Wr,k and Vk = Vsk Vr,k ,
Σr,k :
d
xr,k (t) = Ar,k xr,k (t) + Br,k u(t),
dt
yr,k (t) = Cr,k xr,k (t) + Dr,k u(t). (5)
The matrix interpolation of the pROMs requires a number of further preparatory
steps that are briefly presented in the following: the reduced parametric states are
transformed into a common subspace in the spirit of [1, 2]. The resulting model
systems are rewritten in modal form [3] where the eigenmodes have to be rearranged
wrt. a given sequence.
Transformation of local pROMs into common subspaces. The states of the
pFOMs are recombined during the index reduction due to SVD. During the model
oder reduction the states are again recombined as they are rearranged according to
the Hankel singular values (HSVs) in decreasing order. The states related to the
small pHSVs are truncated until the local reduced systems Σr,k have the same order
r. Thus, the projections Wk , Vk for (5) usually span different rank-r subspaces in
Rn . Consequently, the states xr,k have in general no common physical interpretation.
Therefore, it is necessary to represent the local systems in a common rank-r subspace. We follow the procedure by [1, 2] where the common projection matrix (basis vectors of the common subspace) is assembled from the local ones. Choosing an
appropriate state transformation Tk that allows for permutation, rotation and length
distortion of the basis vectors (for details see [5]), we obtain the local pROM Σ̄r,k
in the common subspace with the matrices Ār,k = (Tk )−1 Ar,k Tk , B̄r,k = (Tk )−1 Ar,k
and C̄r,k = Cr,k Tk .
Presentation of local pROMs in modal form. Consider a parameter setting p ∈
/
{p1 , ...pN }. A matrix interpolation at p with positive weights ωk
Σr (p) :
d
xr (t) = Ar (p)xr (t) + Br (p)u(t), yr (t) = Cr (p)xr (t) + Dr (p)u(t) (6a)
dt
N
Mr (p) =
∑ ωk (p) Mr,k ,
k=1
ωk (p) > 0
(6b)
4
Y. Lu et al.
that is based on the local systems Σ̄r,k , i.e., M ∈ Ā, B̄, C̄, D , may carry in instabilities since the interpolated matrix Ar may contain eigenvalues with non-negative
real parts, although all Σ̄r,k are stable. This drawback can be overcome, if all Ār,k
are transformed into the modal form by applying respective transformations Sk with
the eigenvectors as column vectors. The modal form Ǎr,k = (Sk )−1 Ār,k Sk is the real
block-diagonal Schur form with 1 × 1 and 2 × 2-blocks on the diagonal where the
1×1 and 2×2-blocks contain real and complex-conjugate eigenvalues, respectively.
Interpolating Ǎr,k is the same as interpolating eigenvalues. The resulting eigenvalues
at p have negative real parts due to the condition ωk (p) > 0 in (6). The local pROM
Σ̌r,k in modal form consists additionally of B̌r,k = (Sk )−1 B̄r,k and Čr,k = C̄r,k Sk .
Reordering of local eigenmodes. Consider the pROMs Σ̌r,k in modal form. Since
the (Schur) blocks of the system matrix Ǎr,k are given in any order, it is necessary
to reorder them wrt. a prescribed referential sequence of eigenvalues at pk0 , k0 ∈
{1, . . . , N} before performing the interpolation (6).
Definition 1 (Correlation, MAC-value). Let I = {1, . . . , m} be a index set. Consider V̄, V ∈ Rm×m , where v̄i0 and vi denotes the i0 -th and i-th column vectors in V̄
and V, respectively. Then, vi is said to be correlated to v̄i0 , if and only if
i = arg max corr(v j , v̄i0 ) ,
i0 = arg max corr(vi , v̄ j ) ,
j∈I
j∈I
with the MAC-value given by corr(w, v) = wT v/(kwk2 kvk2 ) for w, v ∈ Rm .
The mapping between the eigenvalues of the system matrix at pk , k ∈ {1, . . . , N} \
{k0 } and the ones at pk0 can be determined by the MAC-values of the corresponding eigenvectors (cf. Def. 1). Note that if an eigenvector at pk is not correlated to
any eigenvector at pk0 , there exists always a second uncorrelated eigenvector. This
occurs when the dynamics of the pROM Σr (p) changes very rapidly in a surrounding of pk or pk0 and is known as mode veering phenomena [7]. In such a case,
a new interpolant (pROM) associated to a parameter setting between pk and pk0
is desired. Presupposing that all eigenvectors are correlated we perform a reordering. Assume that the eigenmode (λi , si )k is correlated to (λi0 , si0 )k0 , i, i0 = 1, . . . , r,
then the i-th eigenvector at pk is exchanged with the i0 -th one and its orientation is
adjusted according to si,k = sign(corr(si,k , si0 ,k0 )). The prescribed reordering procedure can be expressed in terms of a permutation matrix Uk,k0 , yielding the pROMs
Σ̂r,k in reordered form with matrices Âr,k = (Uk,k0 )T Ǎr,k Uk,k0 , B̂r,k = (Uk,k0 )T B̌r,k
and Ĉr,k = Čr,k Uk,k0 . Certainly, Âr,k is still in modal form. Moreover, this property
is inherited to the interpolated matrix Ar in (6) which is crucial for our stabilitypreserving interpolation strategy. An improvement for reordering complex eigenmodes can be found in [4].
Remark 1. The interpolation can also be performed in an appropriate tangent matrixmanifold [1, 5], i.e.,
!
N
−1
Ar (p) = exp ∑ ωk (p) ln Âr,k Âr,k0
Âr,k0 , ωk (p) > 0.
(7)
k=1
Stability-Preserving Interpolation for Parametric MOR
5
Since Âr,k is diagonal with negative entries, (7) ensures that Ar inherits this property.
This implies the stability of the respectively interpolated system at p.
4 Application to Gas Pipeline-Networks
Network modeling. A network of pipelines is described as a directed graph G =
(V , E ) where the edges are represented by the pipes e ∈ E . The set of vertices V
consists of sources Vin , sinks Vout and branching (neutral) nodes Vneu . We model the
gas dynamics in a pipe e by the one-dimensional isothermal transient Euler equations in terms of flow rate and pressure qe , pe : [0, Le ]×[t0 ,tend ] → R with pipe length
Le , diameter De , roughness parameter κe , temperature T and specific gas constant
Rs . The gas compressibility z(pe , T ) and friction λ (qe ) are empirically given by the
AGA and Chen formulas, respectively (see [5] for details). At the branching nodes,
mass conservation –known as first Kirchhoff law– and pressure equality (via auxiliary variables p) are imposed as coupling conditions. As boundary conditions we
prescribe the flow rate q(v,t) = fv (t) at v ∈ Vout and the pressure p(v,t) = fv (t)
at v ∈ Vin . The system is supplemented with consistent initial conditions obtained
from solving the stationary problem with the boundary conditions evaluated at time
t0 = 0.
We formulate the network model of partial differential algebraic equations as
LTIS in descriptor form (1) by help of linearization and spatial discretization. Expanding the nonlinear network model around a stationary state that is specified by a
certain parameter setting p ∈ P, we obtain a stationary subsystem and a linear transient (correction) subsystem (with initial zero conditions) in first order. Certainly,
the coefficients in the linear subsystem depend not only on the stationary state
but also on the model parameters. As spatial discretization we use a conservative
first-order finite-volume method on a staggered grid to obtain small discretization
stencils. The resulting parameter-dependent LTIS Σ (p) is of index-2 and treated as
pFOM (cf. Sec. 3). The boundary values are the inputs u, whereas the outputs y are
taken here exemplarily as the flow rates at the sources and the pressures at the sinks.
Numerical results. As benchmark for our stability-preserving interpolation strategy we consider the scenario investigated in [5]. In that work the temperature as
well as the boundary pressure specified the parameter settings and thus the underlying samples for the interpolation. While the interpolation results were very robust
in case of temperature variations, changes in the pressure caused instabilities in the
interpolated pROMs. Therefore, we focus here exclusively on the parametric dependence with respect to the boundary pressure.
The test network has the topology Fork with one source, one neutral node and
three sinks over the time horizon [0,tend ], tend = 20 [h]. The four pipes e1 , ..., e4 have
different lengths Le1,...,4 = (16, 45, 7, 38) [km], but the same diameter De = 1 [m] and
roughness parameter κe = 5 × 10−5 [m]. The last one enters with the dynamical gas
viscosity µ = 10−5 [kg/(ms)] in the Chen formula for the friction λ . The temperature
6
Y. Lu et al.
Fig. 1 Left: relative L 2 (0,tend )-error for the outputs; right: relative H∞ -error for the transfer functions. BT-MOR (error between FOM and ROM), interpolation (error between computed and interpolated ROM), SPMI-MOR (error between FOM and interpolated ROM).
is fixed T = 273 [K], and the specific gas constant is Rs = 448 [J/(kg K)]. The
boundary conditions are given by q(v,t) = 200 [kg/s] at v ∈ Vout and p(v,t) = p0 +
0.5(1.05p0 − p0 )(1 − cos πt/tend ) [bar] at v ∈ Vin with boundary pressure p0 . For
the spatial discretization of the pipes the grid sizes he1,...,4 = (6.4, 15, 2.33, 12.67)
[km] are used. Hence, the resulting FOMs are of order n = 35, we choose ROMs of
order r = 5 that we compute with balance truncation. We solve the LTIS by means
of the MATLAB routine ode15s (using the default values) and perform a linear
interpolation. For the numerical handling an appropriate scaling of the underlying
quantities might be advantageous. Note that the stability-preserving property of our
proposed interpolation strategy is independent of model reduction technique and
interpolation order. The choice of balance truncation and linear interpolation is here
only because of simplicity. In fact it is accountable for the quantitatively high errors
in the numerical approximation (Fig. 1). The errors might be improved by more
sophisticated methods but this goes beyond the topic of this paper.
The set P of the parameter settings is determined by the boundary pressure p0
P = {p = p0 | p0 ∈ [45, 65]}.
In [5] standard interpolation techniques gave only stable results in the interval
p0 ∈ [55, 65] and failed outside. Our proposed interpolation strategy overcomes
this limitation and can handle the extended regime. As parameter sample we consider pk , k = 1, 2, 3 given by p0 = 45, 54.9, 65 [bar]. The approximation quality of
our stability-preserving interpolation strategy is assessed in terms of the relative
L 2 (0,tend )-error of the outputs and the relative H∞ -error of the transfer functions
over p0 ∈ [45, 65]. Fig. 1 shows particularly the individual errors due to the model
order reduction (error between FOM and ROM) and due to the interpolation (error
between computed ROM and interpolated ROM) as well as the cumulative error
(error between FOM and interpolated ROM). As expected the errors in the outputs
are dominated by MOR. To improve the results concerning the transfer function,
higher order interpolations are in the focus of recent investigations. Concerning the
Stability-Preserving Interpolation for Parametric MOR
7
computational performance, the combination of MOR and our interpolation strategy is superior to MOR — similarly as for standard interpolation techniques. On
first glance, the SVD to obtain the standard state-space form might seem to be computationally expensive, but the decomposition of a differential algebraic system into
proper and improper parts for MOR is of similar costs.
5 Conclusion
In this paper we proposed a stability-preserving interpolation method and showed
its applicability for parametric MOR of gas pipeline networks. The method overcomes the restriction being faced by standard interpolation techniques in literature.
Future work deals with the extension and analysis of our method in cases of highdimensional parameter spaces.
Acknowledgements The German CRC TRR 154 Mathematical Modelling, Simulation and Optimization using the Example of Gas Networks is acknowledged.
References
1. Amsallem D., Farhat. C.: An online method for interpolating linear parametric reduced-order
models. SIAM J. Sci. Comput. 33(5):2169–2198 (2011)
2. Geuss, M., Panzer, K., Lohmann, B.: On parametric model order reduction by matrix interpolation. European Control Conference (2013)
3. Kailath, T.: Linear Systems. Prentice Hall, Englewood Cliffs (1980)
4. Lu, Y.: Gramian Projection-based Interpolation Strategy for Parametric MOR of Gas PipelineNetworks. PhD thesis, FAU Erlangen-Nürnberg (2017) (to appear)
5. Lu, Y., Marheineke, N., Mohring, J.: Interpolation strategy for BT-based parametric MOR
for gas pipeline-networks. In: MS&A – Modeling, Simulation and Application, Springer,
Heidelberg (2016) (to appear)
6. Moore, B.C.: Principal component analysis in linear systems: Controllability, observability,
and model reduction. IEEE Trans. Automat. Contr. 26(2):17–32 (1981)
7. Morand H.J.-P., Ohayon R.: Fluid-Structure Interaction. Wiley, New York (1995)