Keywords

1 Introduction

We consider reduced-order modeling for large-scale nonlinear systems with time-dependent and uncertain inputs, as such models appear in many practical engineering applications. A reduced-order model (ROM) has to capture the rich dynamics resulting from time-dependent inputs [1]. Proper orthogonal decomposition (POD) [18] is the most common model reduction framework for nonlinear systems. As a trajectory-based method, POD relies on user-specified training data, leaving the method vulnerable to poor choices in training inputs.

Interpolatory model reduction approaches that focus on the transfer function mapping from inputs to outputs—and do not require training data—are mature for linear systems [1, 2]. Moreover, significant progress has been made for input-output model reduction for nonlinear systems with known governing equations [4, 6, 8]. In the situation where the governing equations are unknown and only frequency-domain input-output data is available, Antoulas and Gosea [13] proposed a data-driven reduced-order modeling framework for quadratic-bilinear (QB) systems.

Balanced truncation methods offer another promising avenue for model reduction. Initially proposed by Moore [24] for linear systems, many extensions are available, such as snapshot-based approximations (in the stable [29] and unstable case [11]), as well as weighted and time-limited balanced truncation methods, see e.g., the survey [16]. Extending balancing transformations to large-scale nonlinear systems is an open problem, since the balancing transformations become state-dependent (see [12, 27]) and are hence impractical when the model dimension is large. To overcome this computational bottleneck, approximate Gramians that are state-independent (as they are in the linear case) can be used. Balanced truncation for nonlinear systems based on algebraic Gramians [14] requires the solution of Lyapunov-type equations, and is hence appealing from a computational perspective. A computationally efficient framework via truncated Gramians for QB systems has been proposed in [5]. Empirical Gramians for nonlinear systems [21] can also be used, yet their computation requires as many simulations of the full systems as there are inputs and outputs: each simulation uses an impulse disturbance per input channel while setting the other inputs to zero. A method for approximating the nonlinear balanced truncation reduction map via reproducing kernel Hilbert spaces has been proposed in [7].

In this work, we propose a balanced truncation model reduction method for a class of nonlinear systems with time-varying inputs. As a first step, we use variable transformations and lifting, which allows us to bring the nonlinear system in QB form via the introduction of auxiliary variables. Lifting transformations that transform general nonlinear systems into polynomial models have been explored over several decades in different communities [4, 15, 19, 20, 22, 23, 26, 28]. We show that the lifted QB models often have a special structure, namely that the linear system matrix becomes has zero eigenvalues, making the balancing algorithm for QB systems [5] not directly applicable due to the typical requirement that the system matrix be stable. We thus propose a modified approach for balanced truncation of lifted QB systems, which uses the definition of the lifted variable to artificially introduce a stabilization to the system. As an example, we consider a nonlinear tubular reactor model for which we present a lifting transformation that brings the model into QB form, and subsequently perform balancing.

This paper is organized as follows. Section 2 reviews truncated Gramians for QB systems. Section 3 illustrates that lifted QB models often have a common structure and also introduces the tubular reactor model and its lifted QB model. Section 4 proposes our balancing approach for lifted QB systems with special structure. Section 5 presents numerical results for the tubular reactor model.

2 Quadratic-Bilinear Systems and Balancing

A QB system of ordinary differential equations can be written as

$$\begin{aligned} \dot{\mathbf {x}}&= \mathbf {A}\mathbf {x}+ \mathbf {H}(\mathbf {x}\otimes \mathbf {x}) + \sum _{k=1}^m (\mathbf {N}_k \mathbf {x}) \mathbf {u}_k + \mathbf {B}\mathbf {u}, \end{aligned}$$
(1)
$$\begin{aligned} \mathbf {y}&= \mathbf {C}\mathbf {x}, \end{aligned}$$
(2)

where \(\mathbf {x}(t) \in \mathbb {R}^{n}\) is the state, \(t\ge 0\) denotes time, the initial condition is \(\mathbf {x}(0)=\mathbf {x}_0\), \(\mathbf {u}(t) \in \mathbb {R}^m\) is a time-dependent input and \(\mathbf {u}_k\) its kth component, \(\mathbf {B}\in \mathbb {R}^{n\times m}\) is the input matrix, \(\mathbf {A}\in \mathbb {R}^{n\times n}\) is the system matrix, \(\mathbf {C}\in \mathbb {R}^{p\times n}\) is the output matrix and the \(\mathbf {N}_k \in \mathbb {R}^{n\times n}, k=1, \ldots , m\) represent the bilinear coupling between input and state. The matrix \(\mathbf {H}\) is viewed as a mode-1 matricization of a tensor \(\mathcal {H}\in \mathbb {R}^{n\times n \times n}\), so \(\mathcal {H}^{(1)} = \mathbf {H}\). Moreover, \(\mathcal {H}^{(2)}\) denotes the mode-2 matricization of the tensor \(\mathcal {H}\). We assume without loss of generality (see [4, Sect. 3.1]) that the matrix \(\mathbf {H}\) is symmetric in that \(\mathbf {H}(\mathbf {x}_1 \otimes \mathbf {x}_2) = \mathbf {H}(\mathbf {x}_2 \otimes \mathbf {x}_1)\).

For system (1)–(2) the controllability and observability energy functions are defined as

$$\begin{aligned} \mathcal {E}_c(\mathbf {x}_0)&:= \min _{\mathbf {u}\in L_2(-\infty ,0), \mathbf {x}(- \infty )={\textbf {0}}, \mathbf {x}(0)=\mathbf {x}_0} \ \frac{1}{2} \int _{- \infty }^{0} \Vert \mathbf {u}(t) \Vert ^2 \text {d}t, \\ \mathcal {E}_o(\mathbf {x}_0)&:=\frac{1}{2} \int _{0}^{\infty } \Vert \mathbf {y}(t) \Vert ^2 \text {d}t, \end{aligned}$$

where \(\mathcal {E}_c\) quantifies the minimum amount of energy required to steer the system from \(\mathbf {x}(-\infty )=0\) to \(\mathbf {x}(0)=\mathbf {x}_0\), and \(\mathcal {E}_o\) quantifies the output energy generated by the nonzero initial condition \(\mathbf {x}_0\) and \(\mathbf {u}(t)\equiv 0\).

Balanced truncation achieves reduction in the dimension of the state space by eliminating those states that are hard to control (large \(\mathcal {E}_c\)) and hard to observe (small \(\mathcal {E}_o\)). Thus, an important component of balanced truncation model reduction is to find the coordinate transformation that ranks the controllability and observability of the states. The Gramian matrices (formally introduced below) are central to finding this balanced coordinate transformation for system (1)–(2). In particular, if symmetric positive definite Gramians \(\mathbf {P}= \mathbf {L}_\mathbf {P}{\mathbf {L}_\mathbf {P}}^\top \) and \(\mathbf {Q}=\mathbf {L}_\mathbf {Q}{\mathbf {L}_\mathbf {Q}}^\top \) for the QB system (1)–(2) are available, we can obtain transformation matrices \(\mathbf {V}\) and \(\mathbf {W}\), with \(\mathbf {V}= \mathbf {W}^{-1}\) that diagonalize the Gramians, \(\mathbf {V}^\top \mathbf {P}\mathbf {V}= \mathbf {W}^\top \mathbf {Q}\mathbf {W}=\mathcal {S}=\text {diag}{(\sigma _1, \ldots , \sigma _n)}\), where \(\sigma _i\) are the singular valuesFootnote 1 of \({\mathbf {L}_\mathbf {Q}}^\top \mathbf {L}_\mathbf {P}\). The energy functions in the balanced state \(\tilde{\mathbf {x}} = \mathbf {W}\mathbf {x}\) can then be bounded as \( \mathcal {E}_c(\tilde{\mathbf {x}})\ge \frac{1}{2}\tilde{\mathbf {x}}^\top \mathcal {S}^{-1} \tilde{\mathbf {x}}\), and \( \mathcal {E}_o(\tilde{\mathbf {x}})\le \frac{1}{2} \tilde{\mathbf {x}}^\top \mathcal {S} \tilde{\mathbf {x}}\) in a neighborhood of the origin [5, Sect. 4]. From these inequalities, we see that states corresponding to small singular values of \({\mathbf {L}_\mathbf {Q}}^\top \mathbf {L}_\mathbf {P}\) are hard to control and hard to observe. The subspaces spanned by the singular vectors corresponding to small singular values can thus be discarded in a ROM.

We now turn to the computation of the Gramian matrices \(\mathbf {P}\) and \(\mathbf {Q}\). For the special case of QB systems, the next proposition states conditions under which approximate algebraic Gramians exist, and suggests a computational framework to find those.

Proposition 1

([5], Cor. 3.4) Consider the QB system (1)–(2). If \(\mathbf {A}\) is a stable matrix, then the truncated Gramians \(\mathbf {P}_{\mathcal {T}}, \mathbf {Q}_{\mathcal {T}}\) are defined as solutions to

$$\begin{aligned} \mathbf {A}\mathbf {P}_{\mathcal {T}} + \mathbf {P}_{\mathcal {T}}\mathbf {A}^\top + \mathbf {H}(\mathbf {P}_1\otimes \mathbf {P}_1) \mathbf {H}^\top + \sum _{k=1}^m \mathbf {N}_k \mathbf {P}_1 \mathbf {N}_k^\top + \mathbf {B}\mathbf {B}^\top&= {\textbf {0}}, \end{aligned}$$
(3)
$$\begin{aligned} \mathbf {A}^\top \mathbf {Q}_{\mathcal {T}} + \mathbf {Q}_{\mathcal {T}} \mathbf {A}+ \mathcal {H}^{(2)}(\mathbf {P}_1\otimes \mathbf {Q}_1)(\mathcal {H}^{(2)})^\top + \sum _{k=1}^m \mathbf {N}_k^\top \mathbf {Q}_1 \mathbf {N}_k + \mathbf {C}^\top \mathbf {C}&={\textbf {0}}, \end{aligned}$$
(4)

where \(\mathbf {P}_1\) and \(\mathbf {Q}_1\) are solutions to the standard linear Lyapunov equations

$$\begin{aligned} \mathbf {A}\mathbf {P}_1 + \mathbf {P}_1 \mathbf {A}^\top + \mathbf {B}\mathbf {B}^\top = {\textbf {0}}, \qquad \mathbf {A}^\top \mathbf {Q}_1 + \mathbf {Q}_1 \mathbf {A}+ \mathbf {C}^\top \mathbf {C}= {\textbf {0}}. \end{aligned}$$
(5)

The Gramians \(\mathbf {P}_{\mathcal {T}}, \ \mathbf {Q}_{\mathcal {T}}\) are used to obtain a QB reduced-order model (QB-ROM) as follows: Compute the singular value decomposition \(\mathbf {L}_{\mathbf {Q}_\mathcal {T}}^\top \mathbf {L}_{\mathbf {P}_\mathcal {T}}= \mathcal {U} \mathcal {S} \mathcal {V}^\top \) and let its rank r approximation be denoted as \(\mathcal {U}_r \mathcal {S}_r \mathcal {V}_r^\top \). The projection matrices are \(\mathbf {W}= \mathbf {L}_{\mathbf {Q}_\mathcal {T}} \mathcal {U}_r \mathcal {S}_r^{-1/2}\) and \(\mathbf {V}= \mathbf {L}_{\mathbf {P}_\mathcal {T}} \mathcal {V}_r \mathcal {S}_r^{-1/2}\). The balanced QB-ROM has the form

$$\begin{aligned} \dot{\widehat{\mathbf {x}}}&= \widehat{\mathbf {A}} \widehat{\mathbf {x}} + \widehat{\mathbf {H}} (\widehat{\mathbf {x}} \otimes \widehat{\mathbf {x}}) + \sum _{k=1}^m \widehat{\mathbf {N}}_k \widehat{\mathbf {x}} \mathbf {u}_k + \widehat{\mathbf {B}} \mathbf {u}, \end{aligned}$$
(6)
$$\begin{aligned} \widehat{\mathbf {y}}&= \widehat{\mathbf {C}}\widehat{\mathbf {x}}. \end{aligned}$$
(7)

with the matrices \( \widehat{\mathbf {A}} = \mathbf {W}^\top \mathbf {A}\mathbf {V}, \quad \widehat{\mathbf {B}} = \mathbf {W}^\top \mathbf {B}, \quad \widehat{\mathbf {C}} = \mathbf {C}\mathbf {V}, \quad \widehat{\mathbf {N}}_k = \mathbf {W}^\top \mathbf {N}_k \mathbf {V}, \quad \widehat{\mathbf {H}} = \mathbf {W}^\top \mathbf {H}(\mathbf {V}\otimes \mathbf {V})\). The Gramians of the QB-ROM are balanced, i.e., the matrices \(\widehat{\mathbf {P}}_\mathcal {T}=\widehat{\mathbf {Q}}_\mathcal {T}\) are equal and diagonal.

3 Lifting Systems to QB Form: Introducing Structure

In Sect. 3.1 we illustrate that lifting transformations for nonlinear systems often lead to a specific structure of the lifted system. Section 3.2 introduces a nonlinear tubular reactor model, and its subsequent lifted QB model with this special structure.

3.1 Structure in Lifted QB Systems

As an example of a higher-order dynamical system that can be lifted to QB form, consider the nonlinear ordinary differential equation

$$\begin{aligned} \dot{x} = \sum _{k=1}^d a_k x^k + bu, \end{aligned}$$
(8)

where x(t) is the one-dimensional state variable, \(a_1, \ldots , a_d\) are known coefficients, \(x^k\) is the kth power of x(t), u(t) is an input function, and \(b \in \mathbb {R}\) is a parameter. We consider here a one-dimensional ordinary differential equation (ODE) for illustration and note that the lifting framework directly applies to n-dimensional nonlinear systems. Our goal is to rewrite this system in QB form by introducing auxiliary variables. For this example, we define auxiliary variables \(w_\ell := x^{\ell +1}\), so that the governing equation can be written as a linear system

$$\begin{aligned} \dot{x} = a_1 x + \sum _{k=1}^{d-1} a_{k-1} w_k + bu. \end{aligned}$$
(9)

The auxiliary state dynamics are computed via the chain rule (or Lie derivative) as

$$ \dot{w}_\ell = \frac{d}{dt}x^{\ell +1} = (\ell +1) x^{\ell } \dot{x} = (\ell +1) w_{\ell -1} \left( a_1 x + \sum _{k=1}^{d-1} a_{k-1} w_k + bu \right) , $$

and here \(w_0:=x\). Note that the right-hand-side contains quadratic products \(w_{\ell -1}(t)w_k(t)\) as well as bilinear products \(b (\ell +1) u(t) w_{\ell -1}(t)\). Another choice to write the auxiliary dynamics would be to replace \(w_{\ell -1}x\) with \(w_\ell \). Next, we show two examples of polynomial and non-polynomial models where lifting leads to a similar structure.

Example 1 Consider the ODE

$$\begin{aligned} \dot{x} = ax^3 + bu. \end{aligned}$$
(10)

Our goal is to lift this system to QB form by introducing auxiliary variables. Let

$$ w_1=x^2,\quad w_2 = x^3, $$

be the auxiliary variables. Note that the original dynamics then become linear, i.e., \(\dot{x} = aw_2 + bu\). We compute the auxiliary state dynamics \(\dot{w}_1 = 2 x \dot{x} = 2a x w_2 + 2xbu\) and \(\dot{w}_2 = 3 x^2 \dot{x} = 3 w_1 (aw_2 + bu)\). Taken together, the nonlinear equation (10) with one state variable is equivalent to the QB-ODE with three state variables

$$\begin{aligned} \dot{x} = aw_2 + bu, \qquad \dot{w}_1 = 2a xw_2 + 2bxu, \qquad \dot{w}_2 = 3a w_1 w_2 + 3b w_1 u. \end{aligned}$$
(11)

The system (11) is equivalent to the original nonlinear equation (10), in the sense that both systems yield the same solution x(t). We can write (11) in the QB form of equation (1) with the lifted state \(\mathbf {x}=[x, w_1, w_2]^\top \) and matrices

$$\begin{aligned} \mathbf {A}= \left[ \begin{array}{ccc} 0 &{} 0 &{} a \\ 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0\\ \end{array} \right] , \ \mathbf {H}= \begin{bmatrix} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 2a &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 3a &{} 0 &{} 0 &{} 0\\ \end{bmatrix}, \ \mathbf {N}_1 = \left[ \begin{array}{ccccc} 0 &{} 0 &{} 0 \\ 2b &{} 0 &{} 0 \\ 0 &{} 3b &{} 0 \\ \end{array} \right] , \ \mathbf {B}= \left[ \begin{array}{c} 1 \\ 0 \\ 0 \\ \end{array} \right] . \end{aligned}$$
(12)

Example 2 Consider an ODE with non-polynomial term and linear term:

$$\begin{aligned} \dot{x} = ax +e^{-x} + bu, \end{aligned}$$

which we lift to QB form. We introduce \(w_1 = e^{-x}\) as the auxiliary variable, so that \(\dot{w}_1 = -w_1 ( ax + w_1 + bu ) = -aw_1x - w_1^2 -w_1bu\), which can be written in QB form as

$$\begin{aligned} \begin{bmatrix} \dot{x} \\ \dot{w}_1 \end{bmatrix} = \begin{bmatrix} a &{} 1 \\ 0 &{} 0 \end{bmatrix} \begin{bmatrix} x \\ w_1 \end{bmatrix} + \begin{bmatrix} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} -a &{} -1 \end{bmatrix} \left( \begin{bmatrix} x \\ w_1 \end{bmatrix} \otimes \begin{bmatrix} x \\ w_1 \end{bmatrix} \right) + \begin{bmatrix} 0 &{} 0 \\ 0 &{} -b \end{bmatrix} \begin{bmatrix} x \\ w_1 \end{bmatrix} u + \begin{bmatrix} b \\ 0 \end{bmatrix} u. \end{aligned}$$
(13)

We observe that the lifted matrices in the previous two examples (Eqs. (12) and (13)) have the following block-structure:

$$\begin{aligned} \mathbf {A}= \begin{bmatrix} \mathbf {A}_{11} &{} \mathbf {A}_{12} \\ {\textbf {0}}&{} {\textbf {0}}\end{bmatrix}, \quad \mathbf {H}= \begin{bmatrix} {\textbf {0}}\\ \mathbf {H}_{2} \end{bmatrix}, \quad \mathbf {N}= \begin{bmatrix} {\textbf {0}}&{} {\textbf {0}}\\ \mathbf {N}_{21} &{} \mathbf {N}_{22} \end{bmatrix}, \quad \mathbf {B}= \begin{bmatrix} \mathbf {B}_{1} \\ {\textbf {0}}\end{bmatrix}, \end{aligned}$$
(14)

where \({\textbf {0}}\) is a matrix of zeros of appropriate dimensions. Note, that the system matrix of the lifted system (14) has zero eigenvalues. Moreover, the original input \(\mathbf {B}u(t)\) only affects the original state, but appears as a bilinear term in the auxiliary states after application of the chain rule. Thus, the \(\mathbf {N}\) matrix is nonzero only in the rows corresponding to the auxiliary states. The matrix structure in Eq. (14) commonly occurs in QB systems that were obtained from lifting transformations, for instance the systems given in Example 1 and Example 2. Nevertheless, due to the non-uniqueness of lifting transformations, the block structure in (14) is both a result of the original dynamical system form and the chosen lifting transformation.

3.2 Tubular Reactor Model

We consider a non-adiabatic tubular reactor model with single reaction as in [17] and follow the discretization in [30]. The model describes the evolution of the species concentration \(\psi (s,t)\) and temperature \(\theta (s,t)\) with spatial variable \(s\in (0,1)\) and time \(t >0\). The PDE model is

$$\begin{aligned} \frac{\partial \psi }{\partial t}&= \frac{1}{Pe} \frac{\partial ^2 \psi }{\partial s^2} - \frac{\partial \psi }{\partial s} - \mathcal {D}f(\psi , \theta ; \gamma ), \end{aligned}$$
(15)
$$\begin{aligned} \frac{\partial \theta }{\partial t}&= \frac{1}{Pe} \frac{\partial ^2 \theta }{\partial s^2} - \frac{\partial \theta }{\partial s} - \beta (\theta - \theta _{\text {ref}}) + \mathcal {B}\mathcal {D}f(\psi ,\theta ; \gamma ) + b u, \end{aligned}$$
(16)

with input function \(u=u(t)\) and a function \(b=b(s)\) encoding the influence of the input to the computational domain. The parameters are the Damköhler number \(\mathcal {D}\), Pèclet number Pe as well as known constants \(\mathcal {B},\ \beta , \ \theta _{\text {ref}}, \gamma \). The polynomial nonlinear term that drives the reaction is

$$\begin{aligned} f(\psi , \theta ; \gamma ) = \psi (c_0 + c_1\theta + c_2\theta ^2 + c_3\theta ^3) \end{aligned}$$

with given constants \(c_0, \ldots c_3\).

Robin boundary conditions are imposed on the left boundary of the domain and Neumann boundary conditions on the right

$$\begin{aligned} \frac{\partial \psi }{\partial s}(0,t)&= Pe (\psi (0,t)-1),&\frac{\partial \theta }{\partial s}(0,t)&= Pe (\theta (0,t)-1), \\ \frac{\partial \psi }{\partial s}(1,t)&= 0,&\frac{\partial \theta }{\partial s}(1,t)&=0. \end{aligned}$$

The initial conditions are prescribed as \(\psi (s,0) = \psi _0(s)\), and \(\theta (s,0) = \theta _0(s)\). The output of interest is the temperature oscillation at the reactor exit, i.e., the quantity \(y(t) = \theta (s=1,t)\). The diffusive and convective terms are approximated with second-order centered differences in the interior of the domain. Second-order forward and backward difference schemes are used for the inflow and outflow boundary conditions, respectively. The finite difference approximation of dimension 2n of the tubular reactor PDE is then

$$\begin{aligned} \dot{\boldsymbol{\psi }}&= \mathbf {A}_\psi \boldsymbol{\psi } + \mathbf {b}_\psi - \mathcal {D} \ \boldsymbol{\psi } \odot (\boldsymbol{c}_0 + \boldsymbol{c}_1\odot \boldsymbol{\theta } + \boldsymbol{c}_2\odot \boldsymbol{\theta }^2 + \boldsymbol{c}_3\odot \boldsymbol{\theta }^3), \end{aligned}$$
(17)
$$\begin{aligned} \dot{\boldsymbol{\theta }}&= \mathbf {A}_\theta \boldsymbol{\theta } + \mathbf {b}_\theta + \mathbf {b}u+ \mathcal {B}\mathcal {D} \ \boldsymbol{\psi } \odot (\boldsymbol{c}_0 + \boldsymbol{c}_1\odot \boldsymbol{\theta } + \boldsymbol{c}_2\odot \boldsymbol{\theta }^2 + \boldsymbol{c}_3\odot \boldsymbol{\theta }^3) . \end{aligned}$$
(18)

Here, the (Hadamard) componentwise product of two vectors is denoted as \([\boldsymbol{\psi } \odot \boldsymbol{\theta }]_i = \boldsymbol{\psi }_i\boldsymbol{\theta }_i\), and the powers of vectors are also taken componentwise. The constant vector \( \mathbf {b}_\psi \) encodes the boundary condition, and \(\mathbf {b}_\theta \) is the sum of contributions from the boundary conditions and the \(\beta \cdot \theta _\text {ref}\) term in Eq. (16). The term \(\mathbf {A}_\psi \boldsymbol{\psi }\) is a discretized version of the advection-diffusion terms \(\frac{1}{Pe} \psi _{ss} - \psi _s \) and \(\mathbf {A}_\theta \boldsymbol{\theta }\) is a discretized representation of the \(\frac{1}{Pe} \theta _{ss} - \theta _s - \beta \theta \) terms.

We quadratic-bilinearize the finite dimensional system via a lifting transformation.Footnote 2 Footnote 3 To lift the system, we introduce the auxiliary variables

$$\begin{aligned} \mathbf {w}_1 = \boldsymbol{\psi }\odot \boldsymbol{\theta }, \quad \mathbf {w}_2 = \boldsymbol{\psi }\odot \boldsymbol{\theta }^2, \quad \mathbf {w}_3 = \boldsymbol{\psi } \odot \boldsymbol{\theta }^3,\quad \mathbf {w}_4 = \boldsymbol{\theta }^2, \quad \mathbf {w}_5 = \boldsymbol{\theta }^3, \end{aligned}$$

so that we have the equivalent QB system of dimension 7n:

$$\begin{aligned} \dot{\boldsymbol{\psi }}&= [\mathbf {A}_\psi - \mathcal {D}\text {diag}(\boldsymbol{c}_0)] \boldsymbol{\psi } + \mathbf {b}_\psi - \mathcal {D} (\boldsymbol{c}_1 \odot \mathbf {w}_1 + \boldsymbol{c}_2 \odot \mathbf {w}_2 + \boldsymbol{c}_3\odot \mathbf {w}_3), \ \end{aligned}$$
(19)
$$\begin{aligned} \dot{\boldsymbol{\theta }}&= \mathbf {A}_\theta \boldsymbol{\theta } + \mathcal {B}\mathcal {D}\boldsymbol{c}_0\odot \boldsymbol{\psi } + \mathbf {b}_\theta + \mathbf {b}u + \mathcal {B}\mathcal {D} \ (\boldsymbol{c}_1 \odot \mathbf {w}_1 + \boldsymbol{c}_2\odot \mathbf {w}_2 + \boldsymbol{c}_3\odot \mathbf {w}_3), \end{aligned}$$
(20)
$$\begin{aligned} \dot{\mathbf {w}}_1&= \dot{\boldsymbol{\psi }}\odot \boldsymbol{\theta } + \boldsymbol{\psi }\odot \dot{\boldsymbol{\theta }}, \end{aligned}$$
(21)
$$\begin{aligned} \dot{\mathbf {w}}_2&= \dot{\boldsymbol{\psi }}\odot \mathbf {w}_4 + 2\mathbf {w}_1\odot \dot{\boldsymbol{\theta }}, \end{aligned}$$
(22)
$$\begin{aligned} \dot{\mathbf {w}}_3&= \dot{\boldsymbol{\psi }}\odot \mathbf {w}_5 + 3\mathbf {w}_2\odot \dot{\boldsymbol{\theta }}, \end{aligned}$$
(23)
$$\begin{aligned} \dot{\mathbf {w}}_4&= 2\boldsymbol{\theta } \odot \dot{\boldsymbol{\theta }}, \end{aligned}$$
(24)
$$\begin{aligned} \dot{\mathbf {w}}_5&= 3\mathbf {w}_4 \odot \dot{\boldsymbol{\theta }}. \end{aligned}$$
(25)

Note, that the original state equations for species and temperature, (19)–(20), are linear in the new state variables, whereas the differential equations for the added state variables (21)–(25) are quadratic in the state variables (after inserting \(\dot{\boldsymbol{\psi }}, \dot{\boldsymbol{\theta }}\), which are linear). Hence, the system is of QB form (1)–(2), where \(\mathbf {x}(t) = [\boldsymbol{\psi }^\top \ \boldsymbol{\theta }^\top \ \mathbf {w}_1^\top \ \mathbf {w}_2^\top \ \mathbf {w}_3^\top \ \mathbf {w}_4^\top \ \mathbf {w}_5^\top ]^\top \in \mathbb {R}^{7n}\) is the new lifted state. The lifted state Eqs. (19)–(25) again induce a specific structure of the system matrices:

$$\begin{aligned} \mathbf {A}&= \begin{bmatrix} \mathbf {A}_{11} &{} \mathbf {A}_{12} \\ {\textbf {0}}_{5n\times 2n} &{} {\textbf {0}}_{5n}\end{bmatrix} \in \mathbb {R}^{7n\times 7n}, \quad \mathbf {A}_{11} = \begin{bmatrix} \mathbf {A}_\psi - \mathcal {D}\text {diag}(\boldsymbol{c}_0) &{} {\textbf {0}}\\ {\textbf {0}}&{} \mathbf {A}_\theta \end{bmatrix}, \end{aligned}$$
(26a)
$$\begin{aligned} \mathbf {H}&= \begin{bmatrix} {\textbf {0}}_{2n\times 4n^2} &{} {\textbf {0}}_{2n\times 45n^2} \\ \mathbf {H}_{21} &{} \mathbf {H}_{22} \end{bmatrix} \in \mathbb {R}^{7n\times (7n)^2}, \qquad \mathbf {N}= \begin{bmatrix} {\textbf {0}}_{2n\times 2n} &{} {\textbf {0}}_{2n \times 5n} \\ \mathbf {N}_{21} &{} \mathbf {N}_{22} \end{bmatrix} \in \mathbb {R}^{7n\times 7n}, \end{aligned}$$
(26b)
$$\begin{aligned} \mathbf {B}&= \begin{bmatrix} \mathbf {b}_\psi &{} {\textbf {0}}\\ \mathbf {b}_\theta &{} \mathbf {b}\\ {\textbf {0}}_{5n} &{} {\textbf {0}}_{5n} \end{bmatrix} \in \mathbb {R}^{7n\times 2}, \qquad \mathbf {C}= \begin{bmatrix} \mathbf {C}_1 \ \ {\textbf {0}}_{5n} \end{bmatrix} \in \mathbb {R}^{1 \times 7n}, \quad \mathbf {C}_1 = [{\textbf {0}}_{2n-1} \ 1]. \end{aligned}$$
(26c)

Note that the original dynamics are linear after the lifting is applied, and the auxiliary states have no linear parts, as the time derivative of the auxiliary variables consistently results in purely quadratic dynamics. Thus, the matrix \(\mathbf {A}\) has zero eigenvalues, and \(\mathbf {H}\) is such that there is no contribution in the rows corresponding to the original state. Moreover, the bilinear state-input interactions only occur in the auxiliary states. This structure is exactly the one presented in Eq. (14).

4 Balancing for Lifted Systems with Special Structure

Section 4.1 introduces an artificial numerical parameter that guarantees existence of truncated Gramians. Section 4.2 derives the Gramians for the linear part of the system, while Sect. 4.3 presents the truncated Gramians for the QB system.

4.1 Artificial Stabilization

The special structure of the system matrix \(\mathbf {A}\) that arises from lifting transformations leads to zero eigenvalues. Hence, there are no unique solutions to the Lyapunov equations (3)–(5) and the standard QB balanced truncation method from [5] cannot be applied. To circumvent this problem, we observe that if the original nonlinear system is polynomial (cf. (8) and its lifted version (9)) then \(-\alpha w_\ell + \alpha x^{\ell +1} =0\) for any \(\alpha \in \mathbb {R}\). We can use this equality to artificially stabilize the linear term. For example, in Eq. (21) of the tubular reactor ODE, we can introduce a term \(-\alpha \mathbf {w}_1 + \alpha (\boldsymbol{\psi }\odot \boldsymbol{\theta })\). Applying this to every auxiliary variable, the linear system matrix becomes

$$\begin{aligned} \mathbf {A}(\alpha ) = \begin{bmatrix} \mathbf {A}_{11} &{} \mathbf {A}_{12} \\ {\textbf {0}}&{} -\alpha \mathbf {I}\end{bmatrix}, \end{aligned}$$
(27)

and the quadratic tensor \(\mathbf {H}(\alpha ) = \mathbf {H}+ \widetilde{\mathbf {H}}(\alpha )\), where \(\widetilde{\mathbf {H}}(\alpha )\) contains the artificially added terms such that \(-\alpha [{\textbf {0}}^\top , \mathbf {w}^\top ]^\top + \widetilde{\mathbf {H}}(\alpha )(\mathbf {x}\otimes \mathbf {x}) = {\textbf {0}}\). With this system matrix \(\mathbf {A}(\alpha )\), the Lyapunov equations (3)–(5) have unique positive semi-definite solutions if \(\mathbf {A}_{11}\) is stable. Similar concepts have been used recently in [25]. For all results in this section to hold, we require that \(\mathbf {A}_{11}\) is stable.

4.2 Balancing with Gramians of Linearized System

The Lyapunov equations for the linear system part, Eq. (5) are needed to compute the truncated Gramians for the QB system. The next two propositions detail the computation of those linear Lyapunov equations.

Proposition 2

The solutions to the standard linear Lyapunov equations (5) with \(\mathbf {A}(\alpha )\) from equation (27) are given by

$$\begin{aligned} \mathbf {P}_1 = \begin{bmatrix} \mathbf {P}_{11} &{} {\textbf {0}}\\ {\textbf {0}}&{} {\textbf {0}}\end{bmatrix}, \qquad \mathbf {Q}_1 = \begin{bmatrix} \mathbf {Q}_{11} &{} \mathbf {Q}_{12}(\alpha ) \\ \mathbf {Q}_{12}^\top (\alpha ) &{} \frac{1}{2\alpha } \widetilde{\mathbf {Q}}_{22}(\alpha ) \end{bmatrix} , \end{aligned}$$
(28)

where

$$\begin{aligned} {\textbf {0}}&= \mathbf {A}_{11} \mathbf {P}_{11} + \mathbf {P}_{11} \mathbf {A}_{11}^\top + \mathbf {B}_1 \mathbf {B}_1^\top , \\ {\textbf {0}}&= \mathbf {A}_{11}^\top \mathbf {Q}_{11} + \mathbf {Q}_{11} \mathbf {A}_{11} + \mathbf {C}_1^\top \mathbf {C}_1, \\ \mathbf {Q}_{12}(\alpha )&= - (\mathbf {A}_{11}^\top - \alpha \mathbf {I})^{-1} \mathbf {Q}_{11} \mathbf {A}_{12}, \\ \widetilde{\mathbf {Q}}_{22}(\alpha )&= \mathbf {A}_{12}^\top \mathbf {Q}_{12}(\alpha ) + \mathbf {Q}_{12}(\alpha )^\top \mathbf {A}_{12}. \end{aligned}$$

Proof

For the controllability Gramian computation we have that

$$\begin{aligned} {\textbf {0}}= \begin{bmatrix} \mathbf {A}_{11} &{} \mathbf {A}_{12} \\ {\textbf {0}}&{} -\alpha \mathbf {I}\end{bmatrix} \begin{bmatrix} \mathbf {P}_{11} &{} \mathbf {P}_{12} \\ \mathbf {P}_{12}^\top &{} \mathbf {P}_{22} \end{bmatrix} + \begin{bmatrix} \mathbf {P}_{11} &{} \mathbf {P}_{12} \\ \mathbf {P}_{12}^\top &{} \mathbf {P}_{22} \end{bmatrix} \begin{bmatrix} \mathbf {A}_{11}^\top &{} {\textbf {0}}\\ \mathbf {A}_{12}^\top &{} -\alpha \mathbf {I}\end{bmatrix} + \begin{bmatrix} \mathbf {B}_{1}\mathbf {B}_1^\top &{} {\textbf {0}}\\ {\textbf {0}}&{} {\textbf {0}}\end{bmatrix}, \end{aligned}$$

which results in the four equations

$$\begin{aligned} \mathbf {A}_{11} \mathbf {P}_{11} + \mathbf {A}_{12} \mathbf {P}_{12}^\top + \mathbf {P}_{11} \mathbf {A}_{11}^\top +\mathbf {P}_{12} \mathbf {A}_{12}^\top +\mathbf {B}_{1}\mathbf {B}_1^\top&={\textbf {0}}, \\ (\mathbf {A}_{11} - \alpha \mathbf {I}) \mathbf {P}_{12} +\mathbf {A}_{12} \mathbf {P}_{22}&= {\textbf {0}}, \\ \mathbf {P}_{12}^\top (\mathbf {A}_{11}^\top - \alpha \mathbf {I}) + \mathbf {P}_{22} \mathbf {A}_{12}^\top&= {\textbf {0}}, \\ -2 \alpha \mathbf {P}_{22}&= {\textbf {0}}. \end{aligned}$$

Since \((\mathbf {A}_{11}^\top - \alpha \mathbf {I})\) is invertible, the last three equations yield that \(\mathbf {P}_{22}={\textbf {0}}\) and \(\mathbf {P}_{12}={\textbf {0}}\). Next, we consider the observability Lyapunov equation

$$\begin{aligned} {\textbf {0}}= \begin{bmatrix} \mathbf {A}_{11}^\top &{} {\textbf {0}}\\ \mathbf {A}_{12}^\top &{} -\alpha \mathbf {I}\end{bmatrix} \begin{bmatrix} \mathbf {Q}_{11} &{} \mathbf {Q}_{12} \\ \mathbf {Q}_{12}^\top &{} \mathbf {Q}_{22} \end{bmatrix} + \begin{bmatrix} \mathbf {Q}_{11} &{} \mathbf {Q}_{12} \\ \mathbf {Q}_{12}^\top &{} \mathbf {Q}_{22} \end{bmatrix} \begin{bmatrix} \mathbf {A}_{11} &{} \mathbf {A}_{12} \\ {\textbf {0}}&{} -\alpha \mathbf {I}\end{bmatrix} + \begin{bmatrix} \mathbf {C}_1^\top \mathbf {C}_1 &{} {\textbf {0}}\\ {\textbf {0}}&{} {\textbf {0}}\end{bmatrix} . \end{aligned}$$

Blockwise multiplication results in the three distinct equations

$$\begin{aligned} \mathbf {A}_{11}^\top \mathbf {Q}_{11} + \mathbf {Q}_{11} \mathbf {A}_{11} + \mathbf {C}_1^\top \mathbf {C}_1&= {\textbf {0}},\\ (\mathbf {A}_{11}^\top - \alpha \mathbf {I}) \mathbf {Q}_{12} + \mathbf {Q}_{11} \mathbf {A}_{12}&={\textbf {0}}, \\ \mathbf {A}_{12}^\top \mathbf {Q}_{12} + \mathbf {Q}_{12}^\top \mathbf {A}_{12} - 2\alpha \mathbf {Q}_{22}&= {\textbf {0}}, \end{aligned}$$

which we can solve successively to get \(\mathbf {Q}_{11}, \mathbf {Q}_{12}, \mathbf {Q}_{22}\). We define \(\widetilde{\mathbf {Q}}_{22}{(\alpha )} = \mathbf {A}_{12}^\top \mathbf {Q}_{12}{ (\alpha )} + \mathbf {Q}_{12}^\top {(\alpha )} \mathbf {A}_{12}\) so that the explicit dependence on \(1/\alpha \) appears as \(\mathbf {Q}_{22}(\alpha ) = \frac{1}{2\alpha } \widetilde{\mathbf {Q}}_{22}(\alpha )\)\(\square \)

Proposition 3

Consider the Gramians from Proposition 2, and let \(\mathbf {P}_{11} = \mathbf {L}_{\mathbf {P}_{11}} \mathbf {L}_{\mathbf {P}_{11}}^\top \) and \(\mathbf {Q}_{11} = \mathbf {L}_{\mathbf {Q}_{11}} \mathbf {L}_{\mathbf {Q}_{11}}^\top \) be Cholesky factorizations. Let the singular value decomposition approximate the product \(\mathbf {L}_{\mathbf {Q}_{11}}^\top \mathbf {L}_{\mathbf {P}_{11}} \approx \mathcal {U}_{r} \mathcal {S}_r \mathcal {V}_r^\top \). Then the projection matrices for the balancing transformation are given as

$$\begin{aligned} \mathbf {V}= \begin{bmatrix} \mathbf {L}_{\mathbf {P}_{11}} \mathcal {V}_r \mathcal {S}_r^{-1/2} \\ {\textbf {0}}\end{bmatrix}, \qquad \mathbf {W}= \begin{bmatrix} \mathbf {L}_{\mathbf {Q}_{11}} \mathcal {U}_{r} \mathcal {S}_r^{-1/2} \\ \mathbf {Q}_{12}(\alpha )^\top \mathbf {L}_{\mathbf {Q}_{11}}^{-\top } \mathcal {U}_r \mathcal {S}_r^{-1/2} \end{bmatrix}. \end{aligned}$$
(29)

Proof

To obtain the balancing transformation, we need to compute the product \(\mathbf {L}_{\mathbf {Q}_1}^\top \mathbf {L}_{\mathbf {P}_1}\). We have that

$$\begin{aligned} \mathbf {P}_1 = \mathbf {L}_{\mathbf {P}_1} \mathbf {L}_{\mathbf {P}_1}^\top = \begin{bmatrix} \mathbf {L}_{\mathbf {P}_{11}} &{} {\textbf {0}}\\ {\textbf {0}}&{} {\textbf {0}}\end{bmatrix} \begin{bmatrix} \mathbf {L}_{\mathbf {P}_{11}}^\top &{} {\textbf {0}}\\ {\textbf {0}}&{} {\textbf {0}}\end{bmatrix}. \end{aligned}$$

For the Cholesky factorization of \(\mathbf {Q}_1\) we introduce the Schur complement \( \mathbf {S}(\alpha ) = \frac{1}{2\alpha }\widetilde{\mathbf {Q}}_{22}(\alpha ) - \mathbf {Q}_{12}(\alpha )^\top \mathbf {Q}_{11}^{-1} \mathbf {Q}_{12}(\alpha ) = \mathbf {L}_{\mathbf {S}(\alpha )} \mathbf {L}_{\mathbf {S}(\alpha )}^\top \), so that we have

$$\begin{aligned} \mathbf {Q}_1 = \mathbf {L}_{\mathbf {Q}_1} \mathbf {L}_{\mathbf {Q}_1}^\top = \begin{bmatrix} \mathbf {L}_{\mathbf {Q}_{11}} &{} \ \ {\textbf {0}}\\ \mathbf {Q}_{12}(\alpha )^\top \mathbf {L}_{\mathbf {Q}_{11}}^{-\top } &{} \ \ \mathbf {L}_{\mathbf {S}(\alpha )} \end{bmatrix} \begin{bmatrix} \mathbf {L}_{\mathbf {Q}_{11}}^\top &{} \ \ \mathbf {L}_{\mathbf {Q}_{11}}^{-1} \mathbf {Q}_{12}(\alpha ) \\ {\textbf {0}}&{} \ \ \mathbf {L}_{\mathbf {S}(\alpha )}^\top \end{bmatrix}, \end{aligned}$$

as follows from the results for the block-diagonal form of the Cholesky factorization (which can be verified by direct computation). To obtain the balancing transformation, we consider the approximation via singular value decomposition

$$\begin{aligned} \mathbf {L}_{\mathbf {Q}_1}^\top \mathbf {L}_{\mathbf {P}_1} = \begin{bmatrix} \mathbf {L}_{\mathbf {Q}_{11}}^\top &{} \ \mathbf {L}_{\mathbf {Q}_{11}}^{-1} \mathbf {Q}_{12}(\alpha ) \\ {\textbf {0}}&{} \ \mathbf {L}_{\mathbf {S}(\alpha )}^\top \end{bmatrix} \begin{bmatrix} \mathbf {L}_{\mathbf {P}_{11}} &{} \ {\textbf {0}}\\ {\textbf {0}}&{} \ {\textbf {0}}\end{bmatrix} = \begin{bmatrix} \mathbf {L}_{\mathbf {Q}_{11}}^\top \mathbf {L}_{\mathbf {P}_{11}} &{} {\textbf {0}}\\ {\textbf {0}}&{} {\textbf {0}}\end{bmatrix} \approx \begin{bmatrix} \mathcal {U}_r \\ {\textbf {0}}\end{bmatrix} \mathcal {S}_r [ \mathcal {V}_r^\top \ {\textbf {0}}]. \end{aligned}$$

We then compute

$$\begin{aligned} \mathbf {V}&= \begin{bmatrix} \mathbf {L}_{\mathbf {P}_{11}} &{} {\textbf {0}}\\ {\textbf {0}}&{} {\textbf {0}}\end{bmatrix} \begin{bmatrix} \mathcal {V}_r \\ {\textbf {0}}\end{bmatrix} \mathcal {S}_r^{-1/2} = \begin{bmatrix} \mathbf {L}_{\mathbf {P}_{11}} \mathcal {V}_r \mathcal {S}_r^{-1/2} \\ {\textbf {0}}\end{bmatrix}, \\ \mathbf {W}&= \begin{bmatrix} \mathbf {L}_{\mathbf {Q}_{11}} &{} \ \ {\textbf {0}}\\ \mathbf {Q}_{12}(\alpha )^\top \mathbf {L}_{\mathbf {Q}_{11}}^{-\top } &{}\ \ \mathbf {L}_{\mathbf {S}(\alpha )} \end{bmatrix} \begin{bmatrix} \mathcal {U}_r \\ {\textbf {0}}\end{bmatrix} \mathcal {S}_r^{-1/2} = \begin{bmatrix} \mathbf {L}_{\mathbf {Q}_{11}} \mathcal {U}_r \mathcal {S}_r^{-1/2} \\ \mathbf {Q}_{12}(\alpha )^\top \mathbf {L}_{\mathbf {Q}_{11}}^{-\top } \mathcal {U}_r \mathcal {S}_r^{-1/2} \end{bmatrix}, \end{aligned}$$

which completes the proof.\(\square \)

The two propositions show that only Lyapunov equations in the original model dimensions are necessary (and not in the lifted dimensions), which is computationally appealing. For example, for the tubular reactor model in Sect. 3.2, the original model dimensions are 2n and the lifted dimensions are 7n and we only solve 2n-dimensional Lyapunov equations.

4.3 Balancing with Truncated (Quadratic) Gramians

The next two propositions consider the solution of the Lyapunov equations (3)–(4) for the truncated Gramians, which take into consideration the QB nature of the problem by incorporating \(\mathbf {H}\) and \(\mathbf {N}\).

Proposition 4

Let \(\mathbf {P}_{1}\) be the solution from Proposition 2. The truncated Gramian from equation (3) for the QB system is given as

$$\begin{aligned} {\mathbf {P}}_\mathcal {T} = \mathbf {P}_1 + \frac{1}{2\alpha } \begin{bmatrix} \widetilde{\mathbf {P}}_{11}(\alpha ) &{} \widetilde{\mathbf {P}}_{12}(\alpha ) \\ \widetilde{\mathbf {P}}_{12}(\alpha )^\top &{} \widetilde{\mathbf {P}}_{22}(\alpha ) \end{bmatrix} \end{aligned}$$
(30)

via the following equations:

$$\begin{aligned} \widetilde{\mathbf {P}}_{22}(\alpha )&= \mathbf {H}_{21}(\alpha ) (\mathbf {P}_{11} \otimes \mathbf {P}_{11}) \mathbf {H}_{21}^\top (\alpha ) + \mathbf {N}_{21}\mathbf {P}_{11} \mathbf {N}_{21}^\top , \\ \widetilde{\mathbf {P}}_{12}(\alpha )&= - (\mathbf {A}_{11} - \alpha \mathbf {I})^{-1} \mathbf {A}_{12}\widetilde{\mathbf {P}}_{22}(\alpha ), \\ {\textbf {0}}&= \mathbf {A}_{11} \widetilde{\mathbf {P}}_{11}(\alpha ) + \widetilde{\mathbf {P}}_{11}(\alpha ) \mathbf {A}_{11}^\top + [\mathbf {A}_{12}\widetilde{\mathbf {P}}_{12}(\alpha )^\top + \widetilde{\mathbf {P}}_{12}(\alpha ) \mathbf {A}_{12}^\top ] . \end{aligned}$$

Proof

The generalized controllability Lyapunov equation (3) is a linear equation, therefore we can decompose the truncated Gramian \(\mathbf {P}_\mathcal {T} = \mathbf {P}_1 + \mathbf {P}_2(\alpha )\), where \(\mathbf {P}_1\) is the solution from Proposition 2. Therefore, \(\mathbf {P}_2(\alpha )\) is the solution to

$$\begin{aligned} \mathbf {A}(\alpha )\mathbf {P}_2 + \mathbf {P}_2\mathbf {A}(\alpha )^\top + \mathbf {H}(\alpha )(\mathbf {P}_1\otimes \mathbf {P}_1) \mathbf {H}(\alpha )^\top + \mathbf {N}\mathbf {P}_1 \mathbf {N}^\top = {\textbf {0}}. \end{aligned}$$

With the matrices from above, we compute

$$\begin{aligned} \mathbf {N}\mathbf {P}_1\mathbf {N}^\top&= \begin{bmatrix} {\textbf {0}}&{} {\textbf {0}}\\ \mathbf {N}_{21} &{} \mathbf {N}_{22} \end{bmatrix} \begin{bmatrix} \mathbf {P}_{11} &{} {\textbf {0}}\\ {\textbf {0}}&{} {\textbf {0}}\end{bmatrix} \begin{bmatrix} {\textbf {0}}&{} \mathbf {N}_{21}^\top \\ {\textbf {0}}&{} \mathbf {N}_{22}^\top \end{bmatrix} = \begin{bmatrix} {\textbf {0}}&{} {\textbf {0}}\\ {\textbf {0}}&{} \mathbf {N}_{21}\mathbf {P}_{11}\mathbf {N}_{21}^\top \end{bmatrix}, \\ \mathbf {H}(\alpha )(\mathbf {P}_1\otimes \mathbf {P}_1) \mathbf {H}(\alpha )^\top&= \begin{bmatrix} {\textbf {0}}&{} \ {\textbf {0}}\\ {\textbf {0}}&{} \ \mathbf {H}_{21}(\alpha )(\mathbf {P}_{11}\otimes \mathbf {P}_{11}) \mathbf {H}_{21}(\alpha )^\top \end{bmatrix}. \end{aligned}$$

The symmetric positive semi-definite solution \(\mathbf {P}_2(\alpha )\) needs to satisfy

$$\begin{aligned} {\textbf {0}}&= \begin{bmatrix} \mathbf {A}_{11} &{} \mathbf {A}_{12} \\ {\textbf {0}}&{} -\alpha \mathbf {I}\end{bmatrix} \begin{bmatrix} \widehat{\mathbf {P}}_{11} &{} \widehat{\mathbf {P}}_{12} \\ \widehat{\mathbf {P}}_{12}^\top &{} \widehat{\mathbf {P}}_{22} \end{bmatrix} + \begin{bmatrix} \widehat{\mathbf {P}}_{11} &{} \widehat{\mathbf {P}}_{12} \\ \widehat{\mathbf {P}}_{12}^\top &{} \widehat{\mathbf {P}}_{22} \end{bmatrix} \begin{bmatrix} \mathbf {A}_{11}^\top &{} {\textbf {0}}\\ \mathbf {A}_{12}^\top &{} -\alpha \mathbf {I}\end{bmatrix} \\&+ \begin{bmatrix} {\textbf {0}}&{} {\textbf {0}}\\ {\textbf {0}}&{} \mathbf {H}_{21}(\alpha )(\mathbf {P}_{11}\otimes \mathbf {P}_{11}) \mathbf {H}_{21}(\alpha )^\top \end{bmatrix} + \begin{bmatrix} {\textbf {0}}&{} {\textbf {0}}\\ {\textbf {0}}&{} \mathbf {N}_{21}\mathbf {P}_{11}\mathbf {N}_{21}^\top \end{bmatrix}, \end{aligned}$$

which yields the equations

$$\begin{aligned} \mathbf {A}_{11} \widehat{\mathbf {P}}_{11} + \widehat{\mathbf {P}}_{11} \mathbf {A}_{11}^\top + \mathbf {A}_{12} \widehat{\mathbf {P}}_{12}^\top + \widehat{\mathbf {P}}_{12} \mathbf {A}_{12}^\top&={\textbf {0}}, \end{aligned}$$
(31)
$$\begin{aligned} (\mathbf {A}_{11} - \alpha \mathbf {I}) \widehat{\mathbf {P}}_{12} + \mathbf {A}_{12} \widehat{\mathbf {P}}_{22}&={\textbf {0}}, \end{aligned}$$
(32)
$$\begin{aligned} \widehat{\mathbf {P}}_{12}^\top (\mathbf {A}_{11}^\top - \alpha \mathbf {I})+ \widehat{\mathbf {P}}_{22}\mathbf {A}_{12}^\top&={\textbf {0}}, \end{aligned}$$
(33)
$$\begin{aligned} -2 \alpha \widehat{\mathbf {P}}_{22} + \mathbf {H}_{21}(\alpha )(\mathbf {P}_{11} \otimes \mathbf {P}_{11})\mathbf {H}_{21}(\alpha )^\top + \mathbf {N}_{21} \mathbf {P}_{11} \mathbf {N}_{21}^\top&={\textbf {0}}. \end{aligned}$$
(34)

We define \(\widetilde{\mathbf {P}}_{22}(\alpha ) = [\mathbf {H}_{21}(\alpha )(\mathbf {P}_{11} \otimes \mathbf {P}_{11})\mathbf {H}_{21}(\alpha )^\top + \mathbf {N}_{21} \mathbf {P}_{11} \mathbf {N}_{21}^\top ]\), so that \(\widehat{\mathbf {P}}_{22}(\alpha ) = \frac{1}{2\alpha } \widetilde{\mathbf {P}}_{22}(\alpha )\). Due to the symmetry of \(\widehat{\mathbf {P}}_{22}(\alpha )\), equations (32) and (33) are the same, and after substitution, we obtain \( \widehat{\mathbf {P}}_{12}(\alpha ) = - \frac{1}{2\alpha }(\mathbf {A}_{11} - \alpha \mathbf {I})^{-1} \mathbf {A}_{12} \widetilde{\mathbf {P}}_{22}(\alpha ) := \frac{1}{2\alpha }\widetilde{\mathbf {P}}_{12}(\alpha ), \) with \(\widetilde{\mathbf {P}}_{12}(\alpha ) : = - (\mathbf {A}_{11} - \alpha \mathbf {I})^{-1} \mathbf {A}_{12} \widetilde{\mathbf {P}}_{22}(\alpha )\). Substitution of \(\widehat{\mathbf {P}}_{12}(\alpha )\) into equation (31) yields the result.\(\square \)

Proposition 5

Let the matrix \(\mathbf {Q}_1\) be as in Proposition 2. The truncated Gramian \(\mathbf {Q}_{\mathcal {T}}\) that solves equation (4) is given by

$$\begin{aligned} \mathbf {Q}_\mathcal {T} = \mathbf {Q}_1 + \begin{bmatrix} \widehat{\mathbf {Q}}_{11} (\alpha )&{} \widehat{\mathbf {Q}}_{12}(\alpha ) \\ \widehat{\mathbf {Q}}_{12}(\alpha )^\top &{} \widehat{\mathbf {Q}}_{22}(\alpha ) \end{bmatrix}, \end{aligned}$$
(35)

where

$$\begin{aligned} {\textbf {0}}&= \mathbf {A}_{11}^\top \widehat{\mathbf {Q}}_{11}(\alpha ) + \widehat{\mathbf {Q}}_{11}(\alpha ) \mathbf {A}_{11} + \widetilde{\mathbf {H}}_{11}(\alpha ) + \frac{1}{2\alpha } \mathbf {N}_{21}^\top \widetilde{\mathbf {Q}}_{22}(\alpha ) \mathbf {N}_{21} , \\ \widehat{\mathbf {Q}}_{12}(\alpha )&= - (\mathbf {A}_{11}^\top - \alpha \mathbf {I})^{-1} \left( \widetilde{\mathbf {H}}_{12}(\alpha ) + \frac{1}{2\alpha } \mathbf {N}_{21}^\top \widetilde{\mathbf {Q}}_{22}(\alpha ) \mathbf {N}_{22} + \widehat{\mathbf {Q}}_{11}(\alpha ) \mathbf {A}_{12} \right) , \\ \widehat{\mathbf {Q}}_{22}(\alpha )&= \frac{1}{2\alpha } \left[ \mathbf {A}_{12}^\top \widehat{\mathbf {Q}}_{12}(\alpha ) + \widehat{\mathbf {Q}}_{12}^\top (\alpha ) \mathbf {A}_{12} + \widetilde{\mathbf {H}}_{22}(\alpha ) + \frac{1}{2\alpha } \mathbf {N}_{22}^\top \widetilde{\mathbf {Q}}_{22}(\alpha ) \mathbf {N}_{22} \right] . \end{aligned}$$

Proof

We begin by computing

$$\begin{aligned} \mathbf {N}^\top \mathbf {Q}_1 \mathbf {N}= \begin{bmatrix} {\textbf {0}}&{} \mathbf {N}_{21}^\top \\ {\textbf {0}}&{} \mathbf {N}_{22}^\top \end{bmatrix} \begin{bmatrix} \mathbf {Q}_{11} &{} \mathbf {Q}_{12}(\alpha ) \\ \mathbf {Q}_{12}^\top (\alpha ) &{} \frac{1}{2\alpha } \widetilde{\mathbf {Q}}_{22}(\alpha ) \end{bmatrix} \begin{bmatrix} {\textbf {0}}&{} {\textbf {0}}\\ \mathbf {N}_{21} &{} \mathbf {N}_{22} \end{bmatrix} = \frac{1}{2\alpha } \begin{bmatrix} \mathbf {N}_{21}^\top \widetilde{\mathbf {Q}}_{22} \mathbf {N}_{21} &{} \mathbf {N}_{21}^\top \widetilde{\mathbf {Q}}_{22} \mathbf {N}_{22} \\ \mathbf {N}_{22}^\top \widetilde{\mathbf {Q}}_{22} \mathbf {N}_{21} &{} \mathbf {N}_{22}^\top \widetilde{\mathbf {Q}}_{22} \mathbf {N}_{22} \\ \end{bmatrix}, \end{aligned}$$

and for notational convenience partition the full matrix

$$\begin{aligned} \mathcal {H}^{(2)}(\alpha )(\mathbf {P}_1\otimes \mathbf {Q}_1)(\mathcal {H}^{(2)}(\alpha ))^\top =: \begin{bmatrix} \widetilde{\mathbf {H}}_{11}(\alpha ) &{} \widetilde{\mathbf {H}}_{12}(\alpha ) \\ \widetilde{\mathbf {H}}_{12}(\alpha )^\top &{} \widetilde{\mathbf {H}}_{22}(\alpha ) \\ \end{bmatrix}, \end{aligned}$$

which is a symmetric matrix since \(\mathbf {P}_1\) and \(\mathbf {Q}_1\) are symmetric Gramians. We then solve for the truncated Gramian via

$$\begin{aligned} {\textbf {0}}&= \begin{bmatrix}\mathbf {A}_{11}^\top &{} {\textbf {0}}\\ \mathbf {A}_{12}^\top &{} -\alpha \mathbf {I}\end{bmatrix} \begin{bmatrix} \widehat{\mathbf {Q}}_{11} &{} \widehat{\mathbf {Q}}_{12} \\ \widehat{\mathbf {Q}}_{12}^\top &{} \widehat{\mathbf {Q}}_{22} \end{bmatrix} + \begin{bmatrix} \widehat{\mathbf {Q}}_{11} &{} \widehat{\mathbf {Q}}_{12} \\ \widehat{\mathbf {Q}}_{12}^\top &{} \widehat{\mathbf {Q}}_{22} \end{bmatrix} \begin{bmatrix} \mathbf {A}_{11} &{} \mathbf {A}_{12} \\ {\textbf {0}}&{} -\alpha \mathbf {I}\end{bmatrix} \nonumber \\&+ \begin{bmatrix} \widetilde{\mathbf {H}}_{11}(\alpha ) &{} \widetilde{\mathbf {H}}_{12}(\alpha ) \\ \widetilde{\mathbf {H}}_{12}(\alpha )^\top &{} \widetilde{\mathbf {H}}_{22}(\alpha ) \\ \end{bmatrix} + \frac{1}{2\alpha } \begin{bmatrix} \mathbf {N}_{21}^\top \widetilde{\mathbf {Q}}_{22} \mathbf {N}_{21} &{} \mathbf {N}_{21}^\top \widetilde{\mathbf {Q}}_{22} \mathbf {N}_{22} \\ \mathbf {N}_{22}^\top \widetilde{\mathbf {Q}}_{22} \mathbf {N}_{21} &{} \mathbf {N}_{22}^\top \widetilde{\mathbf {Q}}_{22} \mathbf {N}_{22} \\ \end{bmatrix}. \end{aligned}$$

Thus, the Gramian solution has to satisfy the equations

$$\begin{aligned} {\textbf {0}}&= \mathbf {A}_{11}^\top \widehat{\mathbf {Q}}_{11} + \widehat{\mathbf {Q}}_{11} \mathbf {A}_{11} + \widetilde{\mathbf {H}}_{11}(\alpha ) + \frac{1}{2\alpha } \mathbf {N}_{21}^\top \widetilde{\mathbf {Q}}_{22} \mathbf {N}_{21} , \\ {\textbf {0}}&= (\mathbf {A}_{11}^\top -\alpha \mathbf {I}) \widehat{\mathbf {Q}}_{12} + \widehat{\mathbf {Q}}_{11} \mathbf {A}_{12} + \widetilde{\mathbf {H}}_{12}(\alpha ) + \frac{1}{2\alpha } \mathbf {N}_{21}^\top \widetilde{\mathbf {Q}}_{22} \mathbf {N}_{22}, \\ {\textbf {0}}&= \mathbf {A}_{12}^\top \widehat{\mathbf {Q}}_{12} - 2 \alpha \widehat{\mathbf {Q}}_{22} + \widehat{\mathbf {Q}}_{12}^\top \mathbf {A}_{12} + \widetilde{\mathbf {H}}_{22}(\alpha ) + \frac{1}{2\alpha } \mathbf {N}_{22}^\top \widetilde{\mathbf {Q}}_{22} \mathbf {N}_{22}, \end{aligned}$$

from which we get the stated result.\(\square \)

By decomposing the Lyapunov solution into block form, we can again compute the truncated Gramians by only working in the original dimensions (not the lifted dimensions). Due to the dependence on \(1/\alpha \) the Gramians \(\mathbf {Q}_{\mathcal {T}}, \mathbf {P}_{\mathcal {T}}\) are not defined for \(\alpha \rightarrow 0\) and taking the limit \(\alpha \rightarrow 0\) can therefore result in numerical difficulties. We summarize our proposed approach below.

Proposition 6

An approximate balancing transformation for the QB structure arising in lifting of nonlinear systems can be computed as follows:

  1. 1.

    Choose \(\alpha \in (0,\infty )\) and compute \(\mathbf {P}_\mathcal {T}, \mathbf {Q}_\mathcal {T}\) from Propositions 4 and 5 with \(\mathbf {A}(\alpha )\).

  2. 2.

    Compute Cholesky factors \(\ \mathbf {P}_\mathcal {T} = \mathbf {L}_{\mathbf {P}_\mathcal {T}}\mathbf {L}_{\mathbf {P}_\mathcal {T}}^\top \) and \(\ \mathbf {Q}_\mathcal {T} = \mathbf {L}_{\mathbf {Q}_\mathcal {T}} \mathbf {L}_{\mathbf {Q}_\mathcal {T}}^\top \).

  3. 3.

    Compute SVD \(\ \mathbf {L}_{\mathbf {Q}_\mathcal {T}}^\top \mathbf {L}_{\mathbf {P}_\mathcal {T}} = \mathcal {U} \mathcal {S} \mathcal {V}^\top \); denote rank r approximation as \(\ \mathcal {U}_r \mathcal {S}_r \mathcal {V}_r^\top \).

  4. 4.

    Projection matrices \(\ \mathbf {W}= \mathbf {L}_{\mathbf {Q}_\mathcal {T}} \mathcal {U}_r \mathcal {S}_r^{-1/2}\) and \(\ \mathbf {V}= \mathbf {L}_{\mathbf {P}_\mathcal {T}} \mathcal {V}_r \mathcal {S}_r^{-1/2}\).

  5. 5.

    Matrices for QB-ROM (6)–(7) are

    $$\begin{aligned} \widehat{\mathbf {A}} = \mathbf {W}^\top \mathbf {A}\mathbf {V}, \quad \widehat{\mathbf {B}} = \mathbf {W}^\top \mathbf {B}, \quad \widehat{\mathbf {C}} = \mathbf {C}\mathbf {V}, \quad \widehat{\mathbf {N}}_k = \mathbf {W}^\top \mathbf {N}_k \mathbf {V}, \quad \widehat{\mathbf {H}} = \mathbf {W}^\top \mathbf {H}(\mathbf {V}\otimes \mathbf {V}). \end{aligned}$$

5 Numerical Results

For the tubular reactor model in Sect. 3.2, the parameters are \(\mathcal {D}=0.17\), \(Pe=25\), \(\mathcal {B}=0.5\), \(\beta =2.5\), \(\theta _{\text {ref}}\equiv 1\), \(\gamma =5\), and \(n=199\). We compare the approximate balanced truncation ROM, denoted QB-BT, from Proposition 6 with a ROM computed from POD with discrete empirical interpolation [9], denoted as POD-DEIM. For the predictive comparison, the full-order model and ROMs are simulated until \(t_f = 30\)s with different inputs u(t) and initial conditions \(\mathbf {x}(0)=\mathbf {x}_0\) as given below.

The POD-DEIM models are obtained as follows: We simulate the full-order model until \(t_\text {train}=15\)s with training input \(u_\text {train}(t)\) and training initial condition \(\mathbf {x}_{0,\text {train}}\). We record a snapshot every 0.01s and store the snapshots in a matrix \(\mathbf {X}\), compute the POD basis \(\mathbf {V}\in \mathbb {R}^{n\times r}\) of dimension r, and project the system matrices in (17)–(18) onto \(\mathbf {V}\). For every r-dimensional POD-DEIM ROM we use r DEIM interpolation points using the QDEIM algorithm from [10].

For the QB-BT models, we discussed in Sect. 4.1 that the parameter \(\alpha \in (0,\infty )\). Here, we found that \(\alpha =20\) resulted in the most accurate balanced ROMs and that for \(\alpha \ll 1\) the Gramians’ subspaces would lead to unstable ROMs. This could be related to the influence of the field of values of \(\mathbf {A}(\alpha )\) on the decay of the singular values of the solution to the Lyapunov equation [3]. Here, for \(\alpha >\alpha _c=2.6\), the field of values of \(\mathbf {A}(\alpha )\) is in the open left-half plane, which we can choose as a selection criterion for \(\alpha \).

Reduced-order models constructed via POD-DEIM depend on the snapshot data that is obtained from training simulations. In contrast, balancing transformations only depend on the matrices defining the full-order QB system \(\mathbf {A},\mathbf {H}, \mathbf {N}, \mathbf {B}, \mathbf {C}\); the basis generation does not require a choice of training data. To illustrate this point, we consider four test cases with different testing conditions and for which the POD-DEIM training choices vary. For each test case we compare the output error \(\sum _{i=1}^s \vert y(t_i) - y_r(t_i)\vert \) with \(s=3,000\) for the POD-DEIM and QB-BT ROMs. We detail each case below.

Case 1: \(u(t) = \cos (t), \ u_\text {train}(t) = u(t), \mathbf {x}_{0,\text {train}} = \mathbf {x}_0\). For this test case, training and testing conditions are the same, so we expect POD-DEIM ROMs to accurately reproduce the full-order model (FOM) simulations. The output quantity of interest of the FOM compared to two ROMs with \(r=20\) basis functions for this test case is shown in Fig. 1, left. Table 1 shows the output error for various ROM model sizes. We see that the POD-DEIM ROM outperforms the QB-BT ROM in this case.

Fig. 1
figure 1

Model outputs for test Case 1 (left) and Case 2 (right): Comparison of FOM with two ROMs for \(r=20\) basis functions, respectively

Table 1 Case 1: Output error \(\sum _{i=1}^s \vert y(t_i) - y_r(t_i)\vert \) in ROMs

Case 2: \(u(t) = \cos (t), \ u_\text {train}(t) = u(t), \ \mathbf {x}_{0,\text {train}} = \mathbf {x}_0\); noise = \(10\%\) Here we use the same training input and training initial conditions as in Case 1. However, we add noise to the training data, reflecting a situation that practitioners often face where measurements are noise-corrupted. In particular, we use \(\tilde{X} = X + 0.1 X(-1 + 2\Xi )\) where \(\Xi = \mathcal {N}(0,1)\) is a normally distributed random variable. Figure 1, right, shows the model output for the FOM and both ROMs for \(r=20\) where we see that the POD-DEIM model does not capture the output amplitude well. Table 2 shows the output errors for increasing ROM sizes. We observe that the QB-BT ROM outperforms the POD-DEIM model in this case, as the POD-DEIM model suffers from a two orders of magnitude loss in accuracy (compared to Table 1) due to noisy snapshots.

Table 2 Case 2: Output error \(\sum _{i=1}^s \vert y(t_i) - y_r(t_i)\vert \) in ROMs

Case 3: \(u(t) = 0.5(1+ t^2\exp (-t/4)\sin (6t)), \ u_\text {train}(t) = 0.5, \ \mathbf {x}_{0,\text {train}} = \mathbf {x}_0\) This case illustrates a scenario where a practitioner trained a model assuming that input conditions are operating at a constant equilibrium. However during operation of the plant the inputs indeed vary but the oscillations are damped and revert to the equilibrium position of 0.5. Figure 2, left, shows the model output for the FOM and both ROMs for \(r=20\); both ROMs are reproducing the output well. Table 3 shows the output errors for increasing ROM sizes. The QB-BT ROM is again more accurate, yet at one model order, \(r=20\), the POD-DEIM model is more accurate.

Fig. 2
figure 2

Model outputs for Case 3 (left) and Case 4 (right): Comparison of FOM with two ROMs for \(r=20\) basis functions, respectively

Table 3 Case 3: Output error \(\sum _{i=1}^s \vert y(t_i) - y_r(t_i)\vert \) in ROMs

Case 4: \(u(t) = \cos (t), \ u_\text {train}(t) = 0.5, \ \mathbf {x}_{0,\text {train}}(1:n) =0, \ \mathbf {x}_{0,\text {train}}(n+1:2n)=1\). Here, the training initial condition is different from the initial condition used for prediction, i.e., \(\mathbf {x}_{0,\text {train}} \ne \mathbf {x}_{0}\). Figure 2, right, shows the model output for the FOM and both ROMs for \(r=20\); the QB-BT model slightly outperforms the POD-DEIM model, but both fall short of predicting the full amplitude. Table 4 shows the output errors for increasing ROM sizes, where the QB-BT model again seems to outperform the POD-DEIM model for all basis sizes.

Table 4 Case 4: Output error \(\sum _{i=1}^s \vert y(t_i) - y_r(t_i)\vert \) in ROMs

6 Conclusions

We presented a balanced truncation model reduction approach that is applicable to a large class of nonlinear systems with time-varying and uncertain inputs. As a first step, our approach lifts the nonlinear system to quadratic-bilinear form via the introduction of auxiliary variables. As lifted systems often have system matrices with zero eigenvalues, we first introduced an artificial stabilization parameter and then derived a balancing algorithm for those lifted quadratic-bilinear systems that only requires expensive matrix computations in the original—and not in the lifted—dimension. The method was illustrated by the model reduction problem for a tubular reactor model, for which we derived the multi-stage lifting transformations and performed balanced model reduction. The numerical results showed that through our proposed method, we can obtain ROMs for nonlinear systems that are superior to POD-DEIM models in situations where a good choice of training data is not feasible.