This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

11affiliationtext: Department of Mechanical Engineering, University of Michigan, Ann Arbor, MI, USA 22affiliationtext: Department of Mechanical and Aerospace Engineering, University of California, San Diego, CA, USA

Linear model reduction using SPOD modes

Peter Frame Email address for correspondence: [email protected] Cong Lin Oliver Schmidt Aaron Towne
Abstract

The majority of model reduction approaches use an efficient representation of the state and then derive equations to temporally evolve the coefficients that encode the state in the representation. In this paper, we instead employ an efficient representation of the entire trajectory of the state over some time interval and solve for the coefficients that define the trajectory on the interval. We use spectral proper orthogonal decomposition (SPOD) modes, in particular, which possess properties that make them suitable for model reduction and are known to provide an accurate representation of trajectories. In fact, with the same number of total coefficients, the SPOD representation is substantially more accurate than any representation formed by specifying the coefficients in a spatial (e.g., POD) basis for the many time steps that make up the interval. We develop a method to solve for the SPOD coefficients that encode the trajectories in forced linear dynamical systems given the forcing and initial condition, thereby obtaining the accurate representation of the trajectory. We apply the method to two examples, a linearized Ginzburg-Landau problem and an advection-diffusion problem. In both, the error of the proposed method is orders of magnitude lower than both POD-Galerkin and balanced truncation applied to the same problem, as well as the most accurate solution within the span of the POD modes. The method is also fast, with CPU time comparable to or lower than both benchmarks in the examples we present.

1 Introduction

The expense of many modern computational models can prohibit their use in applications where speed is required. In a design optimization problem, for example, many simulations at different boundary conditions or parameters must be performed. In control applications, simulations may need to be conducted in real time to inform actuation. Model reduction techniques strive to deliver the orders-of-magnitude speedup necessary to enable adequately fast simulation for these and other problems with only a mild accuracy sacrifice.

The great majority of model reduction methods employ the following two-step strategy: they (i) find an accurate compression of the state of the system at a particular time and (ii) find equations that evolve the coefficients that represent the state in this representation. The POD-Galerkin method (Aubry88; Noack03; Rowley04), perhaps the most widely used starting point for model reduction, is representative of this approach. The proper orthogonal decomposition (POD) modes are an efficient means of representing the state in that with relatively few POD coefficients, the state can often be represented to high accuracy. In a POD-Galerkin reduced-order model (ROM), these coefficients are then evolved by projecting the governing equations into the space of POD modes, yielding a much smaller dynamical system to evolve. Many alternative choices have been explored for both steps. Examples of the compression step include using balanced truncation modes (Moore81) and autoencoders (Lee20; gonzalez18), and examples of deriving the equations in the reduced space include using Petrov-Galerkin projections (Carlberg10; Carlberg13; Otto22) and learning the equations from data Peherstorfer16; Padovan24. All of these approaches to model reduction, however, fall within the two-step strategy outlined above.

We have investigated a different approach in this work: instead of representing the state (at a particular time) in a reduced manner, we instead employ a reduced representation for the entire trajectory, i.e., the state’s evolution for some time interval. Whereas POD modes are the most efficient (linear) representation of the state, they are far from the most efficient representation of trajectories. This is true intuitively – to represent a trajectory with POD modes, one has to specify the POD coefficients for each time step along the trajectory, but from one time step to the next, the POD coefficients are highly correlated. The analog of POD for entire trajectories is space-time POD (Lumley67; Schmidt_Schmid19; Frame23). Space-time POD modes are themselves time- and space-dependent, so to represent a trajectory, they are weighted by static coefficients. These modes are the most efficient linear representation of trajectories in the sense that to represent a trajectory to some desired accuracy, fewer degrees of freedom are needed if the trajectory is represented with space-time POD modes than any other linear encoding scheme. Unfortunately, space-time POD modes have a number of characteristics that make them undesirable for model reduction; computing them requires much training data, storing them is memory intensive, and computing space-time inner products, which would be necessary in a space-time ROM method, is expensive.

Fortunately, an efficient space-time basis that does not share the undesirable properties of space-time POD modes exists. Spectral POD (SPOD) modes are most naturally formulated as a POD in the frequency domain. More precisely, at every temporal frequency, there exists a set of spatial modes that optimally represent the spatial structure at that frequency. These modes are the SPOD modes, and they may be thought of as space-time modes where each spatial mode 𝝍k,jfragmentsψfragmentsk,j\bm{\psi}_{k,j} at frequency ωkfragmentsω𝑘\omega_{k} has the time dependence eiωktfragmentsefragmentsiω𝑘te^{i\omega_{k}t}. Each mode is associated with an energy, and these energies may be compared across frequencies; for example, the second mode at one frequency may have more energy than the first mode at another frequency. The fact that motivates this work is that the most energetic SPOD modes are also an excellent basis for representing trajectories. In fact, SPOD modes converge to space-time POD modes as the time interval becomes long, so for long intervals, the representation of a trajectory with SPOD modes is nearly as accurate (on average) as the space-time POD representation, which is optimal among all linear representations (Frame23).

With this motivation, the goal of this work is to develop an algorithm to solve quickly for the SPOD coefficients that represent a trajectory in forced linear dynamical systems given the initial condition and forcing. If these coefficients can be obtained accurately, then the resulting error will be substantially lower than that of POD-Galerkin with the same number of modes. The method works as follows. The SPOD coefficients at a given frequency are related to the (temporal) Fourier transform of the state at the same frequency, which in turn is related to the forcing and initial condition. We derive these relations analytically and obtain an equation for the SPOD coefficients as a linear operation on the forcing and initial condition. We precompute the linear operators involved, leaving only small matrix-vector multiplications to be done online.

We demonstrate the method on two problems: a linearized Ginzburg-Landau problem with a spatial dimension of Nx=220fragmentsN𝑥220N_{x}=220, and an advection-diffusion problem with Nx=9604fragmentsN𝑥9604N_{x}=9604. We show that, indeed, we can solve for the SPOD coefficients accurately, resulting in two-orders-of-magnitude lower error than even the projection of the solution onto the same number of POD modes, which is itself a lower bound for the error in any time-domain Petrov-Galerkin method, such as balanced truncation (BT) (Moore81). We show that this accuracy improvement does not come with an increase in CPU time; the method is competitive with POD-Galerkin and balanced truncation in CPU time, as is predicted by scalings we derive, with a slight advantage in the two examples we present.

Though the space-time approach is uncommon, we are not the first to attempt it (Lin19; Choi19; Parish21; Choi21; Choi21b; Yano14; Towne21). Previous methods have formed both spatial and temporal bases with simulation data. These methods have been used to solve large linear problems as well as small non-linear ones. For example, Ref. (Choi21) solves a large linear Boltzmann transport problem, and Ref. (Choi21b) solves an advection-diffusion problem. In the nonlinear case, much of the effort has focused on solving simple nonlinear PDEs over relatively short time intervals (Choi19; Parish21). We believe that the representational advantage of SPOD modes relative to previous choices of space-time basis, as well as their analytic time dependence make them a more compelling choice for model reduction.

Our approach may also be related to harmonic balance (Hall02; Hall13). In this technique, the governing equations for a temporally periodic system are Fourier-transformed in time, resulting in a set of nonlinear equations to be solved for the transformed fields. This has been applied to the periodic flows arising in turbomachinery (Ekici07), resulting in significant computational speedup due to the relatively small number of relevant harmonics. Harmonic balance does not employ a spatial reduction, and our method may be viewed as a spatially reduced harmonic balance method for linear problems. Another important difference is that our method is applicable to non-periodic systems as well as periodic ones.

The remainder of this paper is organized as follows. In Section 2, we discuss the properties of POD, space-time POD, and SPOD that are relevant to the method. We present the main approach of the method in Section 3. However, there is a subtle issue with transforming to the frequency domain to be accounted for. We describe this issue in Section 4 and then account for it in the method in Section 5. We then demonstrate the method on a linearized Ginzburg-Landau problem and a scalar transport problem in Section LABEL:sec:results, and conclude the paper in Section LABEL:sec:Conclusion.

2 Space-only, space-time, and spectral POD

We review the space-only, space-time, and spectral forms of POD here. The most significant point for the purposes of this paper is the fact that spectral POD modes approach space-time POD modes as the time interval becomes long, and thus are very efficient in representing trajectories.

2.1 Space-only POD

Space-only POD aims to reconstruct snapshots of the state by adding together prominent modes weighted by expansion coefficients. The first mode is defined to maximize λ[ϕ(𝐱)]fragmentsλ[ϕ(x)]\lambda[\bm{\phi}({\bf{x}})], the expected value of the energy captured by it,

λ[ϕ(𝐱)]=𝔼[|𝒒(𝐱),ϕ(𝐱)𝐱|2]ϕ(𝐱)2,fragmentsλ[ϕ(x)]fragmentsE[|q(x),ϕ(x)𝐱|2]fragmentsϕ(x)2,\lambda[\bm{\phi}({\bf{x}})]=\frac{\mathbb{E}\big{[}|\langle\bm{q}({{\bf x}}),\bm{\phi}({{\bf x}})\rangle_{{\bf x}}|^{2}\big{]}}{\|\bm{\phi}({{\bf x}})\|^{2}}\text{,} (2.1a)
ϕ1(𝐱)=argmaxλ[ϕ(𝐱)].fragmentsϕ1(x)fragmentsargmaxλ[ϕ(x)].\bm{\phi}_{1}({{\bf x}})=\operatorname*{arg\,max}\lambda[\bm{\phi}({\bf{x}})]\text{.} (2.1b)

The subsequent modes are defined to maximize the energy captured under the constraint that they are orthogonal to all previous ones,

ϕj(𝐱)=argmaxϕ(𝐱),ϕk<j(𝐱)𝐱=0λ[ϕ(𝐱)].fragmentsϕ𝑗(x)fragmentsargmaxfragmentsϕ(x),ϕfragmentskj(x)𝐱0λ[ϕ(x)].\bm{\phi}_{j}({\bf x})=\operatorname*{arg\,max}_{\langle\bm{\phi}({{\bf x}}),\bm{\phi}_{k<j}({{\bf x}})\rangle_{{\bf x}}=0}\lambda[\bm{\phi}({\bf{x}})]\text{.} (2.2)

The space-only inner product ,𝐱fragments,𝐱\langle\cdot,\cdot\rangle_{{\bf x}}, which defines the energy captured, is defined as an integral over the spatial domain ΩΩ\Omega,

𝒒(𝐱),ϕ(𝐱)𝐱=Ωϕ(𝐱)𝘞(𝐱)𝙦(𝐱)𝘥𝐱,fragmentsq(x),ϕ(x)𝐱Ωϕ(x)W(x)q(x)dx,\langle\bm{q}({{\bf x}}),\bm{\phi}({{\bf x}})\rangle_{{\bf x}}=\int_{\Omega}\bm{\phi}^{*}({{\bf x}})\mathsfbi{W}({\bf x})\bm{q}({\bf x})d{\bf x}\text{,} (2.3)

where 𝘞(𝐱)fragmentsW(x)\mathsfbi{W}({\bf x}) is a weight matrix used to account for inter-variable importance or possibly to preference certain regions of the domain. One can show (Towne2018spectral; Lumley67) that the solution to the optimization problem (2.1b,2.2) is modes which are eigenfunctions of the space-only correlation tensor,

Ω𝘊(𝐱1,𝐱2)𝘞(𝐱2)ϕ𝘫(𝐱2)𝘥𝐱2=λ𝘫ϕ𝘫(𝐱1),fragmentsΩC(x1,x2)W(x2)ϕ𝘫(x2)dx2λ𝘫ϕ𝘫(x1),\int_{\Omega}\mathsfbi{C}({\bf x}_{1},{\bf x}_{2})\mathsfbi{W}({\bf x}_{2})\bm{\phi}_{j}({\bf x}_{2})d{\bf x}_{2}=\lambda_{j}\bm{\phi}_{j}({\bf x}_{1})\text{,} (2.4)

where the eigenvalue is equal to the energy of the mode, i.e., λj=λ[ϕj]fragmentsλ𝑗λ[ϕ𝑗]\lambda_{j}=\lambda[\bm{\phi}_{j}], and the correlation tensor is

𝘊(𝐱1,𝐱2)=𝔼[𝙦(𝐱1)𝙦(𝐱2)].fragmentsC(x1,x2)E[q(x1)q(x2)].\mathsfbi{C}({\bf x}_{1},{\bf x}_{2})=\mathbb{E}[\bm{q}({\bf x}_{1})\bm{q}^{*}({\bf x}_{2})]\text{.} (2.5)

2.2 Space-time POD

Whereas space-only POD modes optimally represent snapshots, space-time POD modes optimally represent trajectories over the time window [0,T]fragments[0,T][0,T]. The formulation is much the same as in space-only POD; the modes optimize the expected energy (2.1b,2.2), but in space-time POD, the inner product is over time as well as space,

𝒒(𝐱,t),ϕ(𝐱,t)𝐱,t=0TΩϕ(𝐱,t)𝘞(𝐱)𝙦(𝐱,𝘵)𝘥𝐱𝘥𝘵.fragmentsq(x,t),ϕ(x,t)fragmentsx,t0𝑇Ωϕ(x,t)W(x)q(x,t)dxdt.\langle\bm{q}({{\bf x}},t),\bm{\phi}({{\bf x}},t)\rangle_{{\bf x},t}=\int_{0}^{T}\int_{\Omega}\bm{\phi}^{*}({{\bf x}},t)\mathsfbi{W}({\bf x})\bm{q}({\bf x},t)d{\bf x}\ dt\text{.} (2.6)

The space-time POD modes that solve this optimization are eigenfunctions of the space-time correlation 𝘊(𝐱1,𝘵1,𝐱2,𝘵2)=𝔼[𝙦(𝐱1,𝘵1)𝙦(𝐱2,𝘵2)]fragmentsC(x1,t1,x2,t2)E[q(x1,t1)q(x2,t2)]\mathsfbi{C}({\bf x}_{1},t_{1},{\bf x}_{2},t_{2})=\mathbb{E}[\bm{q}({\bf x}_{1},t_{1})\bm{q}^{*}({\bf x}_{2},t_{2})], and the eigenvalues represent the energy (importance) of each mode. The most important property of space-time POD modes for the purpose of this paper is that the space-time POD reconstruction of a trajectory achieves lower error, on average, than the reconstruction with the same number of modes in any other space-time basis. More concretely, using the first r𝑟r space-time POD modes to reconstruct the trajectory,

𝒒r(𝐱,t)=j=1rϕj(𝐱,t)𝒒(𝐱,t),ϕj(𝐱,t)𝐱,t,fragmentsq𝑟(x,t)fragmentsj1𝑟ϕ𝑗(x,t)q(x,t),ϕ𝑗(x,t)fragmentsx,t,\bm{q}^{r}({\bf x},t)=\sum_{j=1}^{r}\bm{\phi}_{j}({{\bf x}},t)\langle\bm{q}({\bf x},t),\bm{\phi}_{j}({{\bf x}},t)\rangle_{{\bf x},t}\text{,} (2.7)

yields lower expected error

𝔼[𝒒r(𝐱,t)𝒒(𝐱,t)𝐱,t2]fragmentsE[q𝑟(x,t)q(x,t)fragmentsx,t2]\mathbb{E}[\|\bm{q}^{r}({\bf x},t)-\bm{q}({\bf x},t)\|_{{\bf x},t}^{2}] (2.8)

than would any other space-time basis. Above, expected error is measured over space and time using the norm 𝐱,tfragmentsfragmentsx,t\|\cdot\|_{{\bf x},t} induced by the inner product.

2.3 Spectral POD

Spectral POD is most easily understood as the frequency domain variant of space-only POD for statistically stationary systems. In other words, SPOD modes at a particular frequency optimally reconstruct (in the same sense as above) the state at that frequency, on average. The property that makes them attractive for model reduction, however, is that SPOD modes are also the long-time limit of space-time POD modes for statistically stationary systems. These ideas are made precise below, but for a more complete discussion, see (Towne2018spectral).

Spectral POD modes at frequency k𝑘k maximize

λk[𝝍(𝐱)]=𝔼[|𝒒^k(𝐱),𝝍(𝐱)𝐱|2]𝝍(𝐱)2,fragmentsλ𝑘[ψ(x)]fragmentsE[|^𝒒𝑘(x),ψ(x)𝐱|2]fragmentsψ(x)2,\lambda_{k}[\bm{\psi}({\bf{x}})]=\frac{\mathbb{E}\big{[}|\langle\hat{\bm{q}}_{k}({{\bf x}}),\bm{\psi}({{\bf x}})\rangle_{{\bf x}}|^{2}\big{]}}{\|\bm{\psi}({{\bf x}})\|^{2}}\text{,} (2.9)

again, subject to the constraint that each mode 𝝍k,j(𝐱)fragmentsψfragmentsk,j(x)\bm{\psi}_{k,j}({\bf x}) is orthogonal to the previous ones at that frequency 𝝍k,i<j(𝐱)fragmentsψfragmentsk,ij(x)\bm{\psi}_{k,i<j}({\bf x}). The Fourier-transformed state is defined as

𝒒^k=eiωkt𝒒(𝐱,t)dt.fragments^𝒒𝑘fragmentsefragmentsiω𝑘tq(x,t)dt.\hat{\bm{q}}_{k}=\int_{-\infty}^{\infty}e^{-i\omega_{k}t}\bm{q}({\bf x},t)dt\text{.} (2.10)

The solution to the optimization (2.9) is that the modes are eigenvectors of the cross-spectral density 𝘚𝘬(𝐱1,𝐱2)=𝔼[𝙦^𝘬(𝐱1)𝙦^𝘬(𝐱2)]fragmentsS𝘬(x1,x2)E[^𝙦𝘬(x1)^𝙦𝘬(x2)]\mathsfbi{S}_{k}({\bf x}_{1},{\bf x}_{2})=\mathbb{E}[\hat{\bm{q}}_{k}({\bf x}_{1})\hat{\bm{q}}_{k}^{*}({\bf x}_{2})]

Ω𝘚𝘬(𝐱1,𝙭2)𝘞(𝐱2)𝝍𝘬,𝘫(𝐱2)𝘥𝐱2=λ𝘬,𝘫𝝍𝘬,𝘫(𝐱1).fragmentsΩS𝘬(x1,x2)W(x2)ψfragmentsk,j(x2)dx2λfragmentsk,jψfragmentsk,j(x1).\int\limits_{\Omega}\mathsfbi{S}_{k}({{\bf x}}_{1},{\bm{x}}_{2})\mathsfbi{W}({{\bf x}}_{2})\bm{\psi}_{k,j}({{\bf x}}_{2})d{{\bf x}}_{2}=\lambda_{k,j}\bm{\psi}_{k,j}({{\bf x}}_{1})\text{.} (2.11)

The eigenvalue is again equal to the energy of the mode, i.e., λk,j=λk[𝝍k,j]fragmentsλfragmentsk,jλ𝑘[ψfragmentsk,j]\lambda_{k,j}=\lambda_{k}[\bm{\psi}_{k,j}]. Modes at frequency k𝑘k have an implicit time dependence of eiωktfragmentsefragmentsiω𝑘te^{i\omega_{k}t}.

SPOD modes and their energies become identical to space-time POD modes as the time interval on which the latter are defined becomes long (Lumley67; Towne2018spectral; Frame23). Thus, the SPOD modes with the largest energies among all frequencies are the dominant space-time POD modes (for long times) and are most efficient for reconstructing long-time trajectories. We denote by λ~jfragments~𝜆𝑗\tilde{\lambda}_{j} the j𝑗j-th largest SPOD eigenvalue among all frequencies, which may be compared to the space-time POD eigenvalues. The convergence in the energy of the trajectory they capture is relatively fast, so for time intervals beyond a few correlation times, the SPOD modes capture nearly as much energy as the space-time modes (Frame23).

If the simulation time of a reduced-order model is long enough for this convergence to be met, the ability of the SPOD modes to capture structures is not diminished relative to that of space-time POD modes. SPOD modes also have two properties that make them more suitable for model reduction than space-time modes: they have analytic time dependence, and they are separable in space and time. The former makes some analytic progress possible in writing the equations that govern the modes and enables Fourier theory to be applied. The latter means that storing the modes requires NtfragmentsN𝑡N_{t} times less memory, where NtfragmentsN𝑡N_{t} is the number of times steps in the simulation.

Figure 1 shows the convergence in the representational ability of space-time POD and SPOD as the time interval becomes long. Specifically, to represent trajectories with some level of accuracy, 98%fragments98percent98\%, say, one needs the same number of SPOD coefficients as space-time POD coefficients if the interval is long compared to the correlation time in the system. This convergence in representation ability occurs because the SPOD modes themselves converge to space-time POD modes in the limit of a long time interval. With space-only POD, one must specify the coefficients for every time step, which leads to a far less efficient encoding of the data because the coefficients are highly correlated from one time step to the next. That SPOD modes are near-optimal in representing trajectories, and that they are substantially more efficient than space-only POD modes motivate this work. If one can efficiently solve for some number of the SPOD coefficients of a trajectory, then these coefficients will lead to substantially lower error than solving for the same number of space-only POD coefficients.

\psfrag{011}[tc][tc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}Time interval $T$}\psfrag{012}[bc][bc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}\# DOFs for $98\%$ accuracy}\psfrag{000}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$0$}\psfrag{001}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$50$}\psfrag{002}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$100$}\psfrag{003}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$150$}\psfrag{004}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$200$}\psfrag{005}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$250$}\psfrag{006}[rc][rc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$10^{0}$}\psfrag{007}[rc][rc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$10^{1}$}\psfrag{008}[rc][rc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$10^{2}$}\psfrag{009}[rc][rc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$10^{3}$}\psfrag{010}[rc][rc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$10^{4}$}\includegraphics{Figures/DOF_vs_T.eps}
Figure 1: Number of degrees of freedom (DOFs) required to achieve 98%fragments98percent98\% representation accuracy of trajectories as a function of the length of the time interval of the trajectory [0,T]fragments[0,T][0,T]. For POD, one must specify all the mode coefficients at every time step, whereas spectral and space-time POD modes are themselves time-dependent. Thus, by leveraging spatiotemporal correlations, fewer DOFs are needed to represent a trajectory to a given accuracy by specifying the SPOD or space-time POD coefficients. As the time interval becomes long, the SPOD and space-time POD modes become equally efficient at representing trajectories.

2.4 Discretization of modes

Upon discretization, the continuous tensors become discrete, and the modes become NxfragmentsN𝑥N_{x}-component vectors in NxfragmentsCfragmentsN𝑥\mathbb{C}^{N_{x}}. Integration over space becomes matrix-vector multiplication. For example, the discrete SPOD modes at frequency ωkfragmentsω𝑘\omega_{k} are defined as the eigenvectors of the (weighted) cross-spectral density matrix,

𝐒k𝐖𝚿k=𝚿k𝚲k.fragmentsS𝑘WΨ𝑘Ψ𝑘Λ𝑘.{\bf S}_{k}{\bf W}{\bf\Psi}_{k}={\bf\Psi}_{k}{\bf\Lambda}_{k}\text{.} (2.12)

𝐒kfragmentsS𝑘{\bf S}_{k} is the cross-spectral density, 𝚿kfragmentsΨ𝑘{\bf\Psi}_{k} is the matrix with the discrete SPOD modes as its columns, and 𝚲kfragmentsΛ𝑘{\bf\Lambda}_{k} is the diagonal matrix of eigenvalues which are the SPOD mode energies. It is important to note that in practice, the matrix 𝐒kfragmentsS𝑘{\bf S}_{k} is not formed; the SPOD modes are calculated by the method of snapshots (Sirovich87; Towne2018spectral). In particular, given rdfragmentsr𝑑r_{d} trajectories from which to obtain SPOD modes, each NωfragmentsN𝜔N_{\omega} time steps in length, the discrete Fourier transform (DFT) of each trajectory is taken. This yields rdfragmentsr𝑑r_{d} realizations of the k𝑘k-th frequency, for every frequency k𝑘k. These can be formed into a data matrix

𝐐k=[𝒒^k1,𝒒^k2,,𝒒^krd],fragmentsQ𝑘[^𝒒𝑘1,^𝒒𝑘2,,^𝒒𝑘fragmentsr𝑑],{\bf Q}_{k}=[\hat{\bm{q}}_{k}^{1},\hat{\bm{q}}_{k}^{2},\dots,\hat{\bm{q}}_{k}^{r_{d}}]\text{,} (2.13)

where 𝒒^kiNxfragments^𝒒𝑘𝑖CfragmentsN𝑥\hat{\bm{q}}_{k}^{i}\in\mathbb{C}^{N_{x}} is the k𝑘k-th frequency of the DFT of the i𝑖i-th trajectory. The SPOD modes at frequency ωkfragmentsω𝑘\omega_{k} and the associated energies may then be obtained by first taking the singular value decomposition 𝐔𝚺𝐕=1/rd𝐖1/2𝐐kfragmentsUΣV1fragmentsr𝑑Wfragments12Q𝑘{\bf U}{\bf\Sigma}{\bf V}^{*}=1/\sqrt{r_{d}}{\bf W}^{1/2}{\bf Q}_{k}. The SPOD modes are then given by 𝐖1/2𝐔fragmentsWfragments12U{\bf W}^{-1/2}{\bf U} and the energies by 𝚺2fragmentsΣ2{\bf\Sigma}^{2} (Towne2018spectral).

A finite number of evenly spaced frequencies are retained. The lowest one, ω1fragmentsω1\omega_{1}, induces a time T=2π/ω1fragmentsT2πω1T=2\pi/\omega_{1}, which determines the interval [0,T]fragments[0,T][0,T] on which the modes are periodic. The trajectories themselves are, of course, not periodic on this interval, so T𝑇T is the longest we may use SPOD modes for prediction, though, if a longer prediction is needed, the method may be repeated. Using the SPOD modes, the trajectory may be written

𝒒(t)=1Nωj=0Nω1𝚿j𝒂jeiωjt,fragmentsq(t)1fragmentsN𝜔fragmentsj0fragmentsN𝜔1Ψ𝑗a𝑗efragmentsiω𝑗t,\bm{q}(t)=\frac{1}{N_{\omega}}\sum_{j=0}^{N_{\omega}-1}{\bf\Psi}_{j}\bm{a}_{j}e^{i\omega_{j}t}\text{,} (2.14)

where 𝒂k=𝚿k𝐖𝒒^kNxfragmentsa𝑘Ψ𝑘W^𝒒𝑘CfragmentsN𝑥\bm{a}_{k}={\bf\Psi}_{k}^{*}{\bf W}\hat{\bm{q}}_{k}\in\mathbb{C}^{N_{x}} is the vector of expansion coefficients at the k𝑘k-th frequency. The factor of 1Nω1fragmentsN𝜔\frac{1}{N_{\omega}} makes (2.14) an (interpolated) inverse discrete Fourier transform with 𝚿k𝒂kfragmentsΨ𝑘a𝑘{\bf\Psi}_{k}\bm{a}_{k} as the k𝑘k-th coefficient in the DFT of 𝒒(t)fragmentsq(t)\bm{q}(t). The fully reduced representation of the trajectory is

𝒒r(t)=1Nωj=0Nω1𝚿rj𝒂jreiωjt.fragmentsq𝑟(t)1fragmentsN𝜔fragmentsj0fragmentsN𝜔1Ψ𝑟𝑗a𝑗𝑟efragmentsiω𝑗t.\bm{q}^{r}(t)=\frac{1}{N_{\omega}}\sum_{j=0}^{N_{\omega}-1}{\bf\Psi}^{r}_{j}\bm{a}_{j}^{r}e^{i\omega_{j}t}\text{.} (2.15)

In this paper, an r𝑟r superscript indicates a reduced quantity. The mean number of modes retained at each frequency is r𝑟r, and NωrfragmentsN𝜔rN_{\omega}r modes are retained in total. The same number is not retained at all frequencies because the most energetic space-time POD modes are the most energetic SPOD modes over all frequencies; the number of modes retained at the k𝑘k-th frequency rkfragmentsr𝑘r_{k} is the number of modes at this frequency that are among the NωrfragmentsN𝜔rN_{\omega}r most energetic overall,

rk=|{l:λk,lλ~Nωr}|.fragmentsr𝑘|{l:λfragmentsk,l~𝜆fragmentsN𝜔r}|.r_{k}=|\{l:\lambda_{k,l}\geq\tilde{\lambda}_{N_{\omega}r}\}|\text{.} (2.16)

With these notations established, 𝒂krrkfragmentsa𝑘𝑟Cfragmentsr𝑘\bm{a}_{k}^{r}\in\mathbb{C}^{r_{k}} and 𝚿krNx×rkfragmentsΨ𝑘𝑟CfragmentsN𝑥r𝑘{\bf\Psi}_{k}^{r}\in\mathbb{C}^{N_{x}\times r_{k}}. Finally, the Fourier transformed trajectory is defined using the DFT as

𝒒^k=j=0Nω1𝒒(jΔt)eiωkjΔt.fragments^𝒒𝑘fragmentsj0fragmentsN𝜔1q(jΔt)efragmentsiω𝑘jΔt.\hat{\bm{q}}_{k}=\sum_{j=0}^{N_{\omega}-1}\bm{q}(j\Delta t)e^{-i\omega_{k}j\Delta t}\text{.} (2.17)

3 SPOD Petrov-Galerkin method

Our goal is to derive a SPOD-based method to solve the linear ordinary differential equation

𝒒˙(t)=𝐀𝒒(t)+𝐁𝒇(t)fragments˙𝒒(t)Aq(t)Bf(t)\dot{\bm{q}}(t)={\bf A}\bm{q}(t)+{\bf B}\bm{f}(t)\text{} (3.1a)
𝒚(t)=𝐂𝒒(t)fragmentsy(t)Cq(t)\bm{y}(t)={\bf C}\bm{q}(t) (3.1b)

on the interval t[0,T]fragmentst[0,T]t\in[0,T], where 𝒒(t)Nxfragmentsq(t)CfragmentsN𝑥\bm{q}(t)\in\mathbb{C}^{N_{x}}, 𝒇(t)Nffragmentsf(t)CfragmentsN𝑓\bm{f}(t)\in\mathbb{C}^{N_{f}} is some known forcing, 𝐁Nx×NffragmentsBCfragmentsN𝑥N𝑓{\bf B}\in\mathbb{C}^{N_{x}\times N_{f}} maps the forcing to the state evolution, 𝒚(t)Nyfragmentsy(t)CfragmentsN𝑦\bm{y}(t)\in\mathbb{C}^{N_{y}} is some linear observable of the state given by 𝐂Ny×NxfragmentsCCfragmentsN𝑦N𝑥{\bf C}\in\mathbb{C}^{N_{y}\times N_{x}}. Given the forcing and initial condition 𝐪0fragmentsq0{\bf q}_{0}, our goal is to find the retained SPOD coefficients for the trajectory 𝒒(t)fragmentsq(t)\bm{q}(t), thereby obtaining the near-optimal rank-NωrfragmentsN𝜔rN_{\omega}r space-time representation of the trajectory. With these coefficients, 𝒚(t)fragmentsy(t)\bm{y}(t) can easily be obtained taking the inverse DFT of 𝒚^k=𝐂𝚿kr𝒂krfragments^𝒚𝑘CΨ𝑘𝑟a𝑘𝑟\hat{\bm{y}}_{k}={\bf C}{\bf\Psi}_{k}^{r}\bm{a}_{k}^{r}.

3.1 Method

The starting point is the following equation for 𝒂rkfragmentsa𝑟𝑘\bm{a}^{r}_{k} in terms of 𝒒^kfragments^𝒒𝑘\hat{\bm{q}}_{k}:

𝒂rk=𝚿rk𝐖𝒒^k.fragmentsa𝑟𝑘Ψfragmentsr𝑘W^𝒒𝑘.\bm{a}^{r}_{k}={\bf\Psi}^{r*}_{k}{\bf W}\hat{\bm{q}}_{k}\text{.} (3.2)

This equation is exact and follows from the fact that 𝒒^k=𝚿k𝒂kfragments^𝒒𝑘Ψ𝑘a𝑘\hat{\bm{q}}_{k}={\bf\Psi}_{k}\bm{a}_{k}. The Fourier transformed state 𝒒^kfragments^𝒒𝑘\hat{\bm{q}}_{k} must be obtained from the known forcing and initial condition, and there is some subtlety here. For the sake of clarity in describing the model reduction approach, we ignore the subtlety in this section. The correct relation between the Fourier-transformed forcing and initial condition and the Fourier-transformed state is derived in Section 4 and is given in (4.14), and the model reduction method is adjusted for this correction in Section 5.

To write the equations in the frequency domain, we take the Fourier transform, replacing 𝒒(t)fragmentsq(t)\bm{q}(t) and 𝒇(t)fragmentsf(t)\bm{f}(t) with 𝒒^kfragments^𝒒𝑘\hat{\bm{q}}_{k} and 𝒇^kfragments^𝒇𝑘\hat{\bm{f}}_{k} and (naively, it turns out) replacing 𝒒˙(t)fragments˙𝒒(t)\dot{\bm{q}}(t) with iωk𝒒^kfragmentsiω𝑘^𝒒𝑘i\omega_{k}\hat{\bm{q}}_{k}, yielding

iωk𝒒^k=𝐀𝒒^k+𝐁𝒇^k.fragmentsiω𝑘^𝒒𝑘A^𝒒𝑘B^𝒇𝑘.i\omega_{k}\hat{\bm{q}}_{k}={\bf A}\hat{\bm{q}}_{k}+{\bf B}\hat{\bm{f}}_{k}\text{.} (3.3)

Then, assuming the stability of 𝐀𝐀{\bf A}, the state is related to the forcing by

𝒒^k=𝐑k𝐁𝒇^k,fragments^𝒒𝑘R𝑘B^𝒇𝑘,\hat{\bm{q}}_{k}={\bf R}_{k}{\bf B}\hat{\bm{f}}_{k}\text{,} (3.4)

where the resolvent operator is defined as

𝐑k=(iωk𝐈𝐀)1.fragmentsR𝑘(iω𝑘IA)fragments1.{\bf R}_{k}=(i\omega_{k}{\bf I}-{\bf A})^{-1}\text{.} (3.5)

Plugging (3.4) into (3.2), we have

𝒂rk=𝚿rk𝐖𝐑k𝐁𝒇^k.fragmentsa𝑟𝑘Ψfragmentsr𝑘WR𝑘B^𝒇𝑘.\bm{a}^{r}_{k}={\bf\Psi}^{r*}_{k}{\bf W}{\bf R}_{k}{\bf B}\hat{\bm{f}}_{k}\text{.} (3.6)

This method may be derived as a Petrov-Galerkin method in the following way. Starting from the equations in the frequency domain, 𝐋k𝒒^k=𝐁𝒇^kfragmentsL𝑘^𝒒𝑘B^𝒇𝑘{\bf L}_{k}\hat{\bm{q}}_{k}={\bf B}\hat{\bm{f}}_{k}, where 𝐋k=iωk𝐈𝐀fragmentsL𝑘iω𝑘IA{\bf L}_{k}=i\omega_{k}{\bf I}-{\bf A}, and plugging in the representation for 𝒒^kfragments^𝒒𝑘\hat{\bm{q}}_{k}, we have

𝐋k𝚿kr𝒂kr=𝐁𝒇^k.fragmentsL𝑘Ψ𝑘𝑟a𝑘𝑟B^𝒇𝑘.{\bf L}_{k}{\bf\Psi}_{k}^{r}\bm{a}_{k}^{r}={\bf B}\hat{\bm{f}}_{k}\text{.} (3.7)

By left-multiplying the equations by 𝚿kr𝐖fragmentsΨ𝑘fragmentsrW{\bf\Psi}_{k}^{r*}{\bf W} and inverting the matrices, the method would be Galerkin (Lin19; Towne21). Instead, (3.6) may be recovered by multiplying the equations on the left by the test basis 𝚿kr𝐑k𝐖fragmentsΨ𝑘fragmentsrR𝑘W{\bf\Psi}_{k}^{r*}{\bf R}_{k}{\bf W}, yielding

𝚿kr𝐖𝐑k𝐋k𝚿kr𝒂kr=𝚿kr𝐖𝐑k𝐁𝒇^k.fragmentsΨ𝑘fragmentsrWR𝑘L𝑘Ψ𝑘𝑟a𝑘𝑟Ψ𝑘fragmentsrWR𝑘B^𝒇𝑘.{\bf\Psi}_{k}^{r*}{\bf W}{\bf R}_{k}{\bf L}_{k}{\bf\Psi}_{k}^{r}\bm{a}_{k}^{r}={\bf\Psi}_{k}^{r*}{\bf W}{\bf R}_{k}{\bf B}\hat{\bm{f}}_{k}\text{.} (3.8)

The operator 𝚿kr𝐖𝐑k𝐋k𝚿krfragmentsΨ𝑘fragmentsrWR𝑘L𝑘Ψ𝑘𝑟{\bf\Psi}_{k}^{r*}{\bf W}{\bf R}_{k}{\bf L}_{k}{\bf\Psi}_{k}^{r} is the identity, so (3.6) is recovered and the method is Petrov-Galerkin.

We denote the matrix that maps the forcing at frequency k𝑘k to the SPOD mode coefficients at that frequency as 𝐌k=𝚿rk𝐖𝐑k𝐁rk×NffragmentsM𝑘Ψfragmentsr𝑘WR𝑘BCfragmentsr𝑘N𝑓{\bf M}_{k}={\bf\Psi}^{r*}_{k}{\bf W}{\bf R}_{k}{\bf B}\in\mathbb{C}^{r_{k}\times N_{f}}. For small problems (i.e., where 𝒪(Nx3)fragmentsO(N𝑥3)\mathcal{O}(N_{x}^{3}) is not prohibitive) the resolvent, and thus 𝐌kfragmentsM𝑘{\bf M}_{k}, may be computed directly. More care is needed in larger problems, and, indeed, significant research has been devoted to approximating the resolvent operator in fluid mechanics (Farghadan23; Martini21), where it is often used in the context of stability theory (Trefethen93; Mckeon10; McKeon17; Schmidt18). These techniques may be used here to approximate 𝐌kfragmentsM𝑘{\bf M}_{k} using some number of the dominant resolvent modes. Implementing these methods, however, may require substantial effort, and an alternative is possible due to the availability of data (the same data used to calculate the SPOD modes).

3.2 Approximating 𝐌kfragmentsM𝑘{\bf M}_{k}

An accurate and simple-to-implement approximation of 𝐌kfragmentsM𝑘{\bf M}_{k} can be obtained by leveraging the availability of data as follows. Defining

𝒈ki=𝐋k𝒒^ki,fragmentsg𝑘𝑖L𝑘^𝒒𝑘𝑖,\bm{g}_{k}^{i}={\bf L}_{k}\hat{\bm{q}}_{k}^{i}\text{,} (3.9)

where, again, 𝒒^kifragments^𝒒𝑘𝑖\hat{\bm{q}}_{k}^{i} is the i𝑖i-th realization of 𝒒^kfragments^𝒒𝑘\hat{\bm{q}}_{k} in the training data, we have

𝒒^ki=𝐑k𝒈ki.fragments^𝒒𝑘𝑖R𝑘g𝑘𝑖.\hat{\bm{q}}_{k}^{i}={\bf R}_{k}\bm{g}_{k}^{i}\text{.} (3.10)

Using the many realizations of the training data (the same ones used to generate the SPOD modes), we have

𝐐k=𝐑k𝐆k,fragmentsQ𝑘R𝑘G𝑘,{\bf Q}_{k}={\bf R}_{k}{\bf G}_{k}\text{,} (3.11)

where 𝐐k=[𝒒^k1,𝒒^k2,]fragmentsQ𝑘[^𝒒𝑘1,^𝒒𝑘2,]{\bf Q}_{k}=[\hat{\bm{q}}_{k}^{1},\hat{\bm{q}}_{k}^{2},\dots] and 𝐆k=[𝒈k1,𝒈k2,]fragmentsG𝑘[g𝑘1,g𝑘2,]{\bf G}_{k}=[\bm{g}_{k}^{1},\bm{g}_{k}^{2},\dots]. Multiplying this equation by its Hermitian transpose gives

𝐐k𝐐k=𝐑k𝐆k𝐆k𝐑k.fragmentsQ𝑘Q𝑘R𝑘G𝑘G𝑘R𝑘.{\bf Q}_{k}{\bf Q}_{k}^{*}={\bf R}_{k}{\bf G}_{k}{\bf G}_{k}^{*}{\bf R}_{k}^{*}\text{.} (3.12)

Both 𝐐k𝐐kfragmentsQ𝑘Q𝑘{\bf Q}_{k}{\bf Q}_{k}^{*} and 𝐆k𝐆kfragmentsG𝑘G𝑘{\bf G}_{k}{\bf G}_{k}^{*} may be represented by their eigendecompositions, i.e., their POD decompositions, giving

𝚿kr𝚲kr𝚿kr=𝐑k𝚿kgr𝚲kgr𝚿kgr𝐑k,fragmentsΨ𝑘𝑟Λ𝑘𝑟Ψ𝑘fragmentsrR𝑘Ψ𝑘fragmentsgrΛ𝑘fragmentsgrΨ𝑘fragmentsgrR𝑘,{\bf\Psi}_{k}^{r}{\bf\Lambda}_{k}^{r}{\bf\Psi}_{k}^{r*}={\bf R}_{k}{\bf\Psi}_{k}^{gr}{\bf\Lambda}_{k}^{gr}{\bf\Psi}_{k}^{gr*}{\bf R}_{k}^{*}\text{,} (3.13)

where 𝚿kgrfragmentsΨ𝑘fragmentsgr{\bf\Psi}_{k}^{gr} and 𝚲kgrfragmentsΛ𝑘fragmentsgr{\bf\Lambda}_{k}^{gr} come from the POD of 𝐆kfragmentsG𝑘{\bf G}_{k} (the r𝑟r superscript is a reminder that 𝚿kgrfragmentsΨ𝑘fragmentsgr{\bf\Psi}_{k}^{gr} is not full-rank). By left-multiplying by 𝚿rk𝐖fragmentsΨfragmentsr𝑘W{\bf\Psi}^{r*}_{k}{\bf W} and right-multiplying by 𝐋k𝚿kgr𝚲kgr1𝚿kgr𝐁fragmentsL𝑘Ψ𝑘fragmentsgrΛ𝑘fragmentsgr1Ψ𝑘fragmentsgrB{\bf L}^{*}_{k}{\bf\Psi}_{k}^{gr}{\bf\Lambda}_{k}^{gr-1}{\bf\Psi}_{k}^{gr*}{\bf B}, we have

𝚲kr(𝐋k𝚿kr)𝚿grk𝚲kgr1𝚿grk𝐁=𝚿kr𝐖𝐑k𝐏kgr𝐁,fragmentsΛ𝑘𝑟(L𝑘Ψ𝑘𝑟)Ψfragmentsgr𝑘Λ𝑘fragmentsgr1Ψfragmentsgr𝑘BΨ𝑘fragmentsrWR𝑘P𝑘fragmentsgrB,{\bf\Lambda}_{k}^{r}({\bf L}_{k}{\bf\Psi}_{k}^{r})^{*}{\bf\Psi}^{gr}_{k}{\bf\Lambda}_{k}^{gr-1}{\bf\Psi}^{gr*}_{k}{\bf B}={\bf\Psi}_{k}^{r*}{\bf W}{\bf R}_{k}{\bf P}_{k}^{gr}{\bf B}\text{,} (3.14)

where 𝐏kg=𝚿kgr𝚿kgrfragmentsP𝑘𝑔Ψ𝑘fragmentsgrΨ𝑘fragmentsgr{\bf P}_{k}^{g}={\bf\Psi}_{k}^{gr}{\bf\Psi}_{k}^{gr*} is the projection onto the modes of 𝒈kfragmentsg𝑘\bm{g}_{k}. The right-hand-side of (3.14) is an approximation of 𝐌kfragmentsM𝑘{\bf M}_{k}, which we label 𝐄kfragmentsE𝑘{\bf E}_{k}

𝐄k=𝚿kr𝐖𝐑k𝐏kg𝐁𝐌k.fragmentsE𝑘Ψ𝑘fragmentsrWR𝑘P𝑘𝑔BM𝑘.{\bf E}_{k}={\bf\Psi}_{k}^{r*}{\bf W}{\bf R}_{k}{\bf P}_{k}^{g}{\bf B}\approx{\bf M}_{k}\text{.} (3.15)

If 𝐏kgfragmentsP𝑘𝑔{\bf P}_{k}^{g} were the identity, the approximation would be exact. The operator 𝐌kfragmentsM𝑘{\bf M}_{k} is used to operate on forcing vectors, so the approximation is accurate to the extent that the forcing is within the span of the realizations of 𝒈kfragmentsg𝑘\bm{g}_{k}. The forcing is likely to be near this span because it is closely related to 𝒈𝒈\bm{g}, which will become clear in Section 4.2.

4 Full-order frequency domain equations

4.1 Problem with the naive equations

The k𝑘k-th Fourier coefficient of the time derivative 𝒒˙^kfragments^˙𝒒𝑘\hat{\dot{\bm{q}}}_{k} is not iωk𝒒^kfragmentsiω𝑘^𝒒𝑘i\omega_{k}\hat{\bm{q}}_{k}. It is shown in appendix LABEL:App:Derivative_coefficient that in fact,

𝒒˙^k=iωk𝒒^k+Δ𝒒T,fragments^˙𝒒𝑘iω𝑘^𝒒𝑘fragmentsΔq𝑇,\hat{\dot{\bm{q}}}_{k}=i\omega_{k}\hat{\bm{q}}_{k}+\frac{\Delta\bm{q}}{T}\text{,} (4.1)

where Δ𝒒=𝒒(T)𝒒(0)fragmentsΔqq(T)q(0)\Delta\bm{q}=\bm{q}(T)-\bm{q}(0) is the change of the state on the time interval (Martini19; Nogueira20). If the state were periodic, this term would be zero, and the usual equation would hold, but the solution to the linear ODE has no reason to be periodic. How, then, does one solve in the frequency domain? Modifying (3.4) with Δ𝒒TfragmentsΔq𝑇\frac{\Delta\bm{q}}{T} to give

𝒒^k=𝐑k(𝒇^kΔ𝒒T)fragments^𝒒𝑘R𝑘(^𝒇𝑘fragmentsΔq𝑇)\hat{\bm{q}}_{k}={\bf R}_{k}\left(\hat{\bm{f}}_{k}-\frac{\Delta\bm{q}}{T}\right) (4.2)

is not useful as Δ𝒒fragmentsΔq\Delta\bm{q} is now known a priori (and, in some sense, is what we are solving for)!

4.2 Solution: derivation of correction formula

To circumvent the problem described above, we use the analytic solution in time of (3.1). We then take the discrete Fourier transform (DFT) of this solution analytically to obtain 𝒒^^𝒒\hat{\bm{q}} in terms of 𝒇^^𝒇\hat{\bm{f}}. We use the DFT rather than the Fourier series because, from the exact DFT, one can easily obtain the exact solution at a set of points in the time domain by taking the inverse DFT. On the other hand, with the first NωfragmentsN𝜔N_{\omega} Fourier series coefficients, point values cannot be recovered exactly.

The analytic solution of (3.1) is (Grigoriu21)

𝒒(t)=e𝐀t𝐪(0)+0te𝐀(tt)𝐁𝒇(t)dt.fragmentsq(t)efragmentsAtq(0)0𝑡efragmentsA(tt)Bf(t)dt.\bm{q}(t)=e^{{\bf A}t}{\bf q}(0)+\int_{0}^{t}e^{{\bf A}(t-t^{\prime})}{\bf B}\bm{f}(t^{\prime})\ dt^{\prime}\text{.} (4.3)

We want the (analytic) DFT of (4.3) where the k𝑘k-th component of the DFT 𝒒^kfragments^𝒒𝑘\hat{\bm{q}}_{k} of 𝒒(t)fragmentsq(t)\bm{q}(t) is defined

𝒒^k=j=0Nω1𝒒je2πiNωjk,fragments^𝒒𝑘fragmentsj0fragmentsN𝜔1q𝑗efragmentsfragments2πifragmentsN𝜔jk,\hat{\bm{q}}_{k}=\sum_{j=0}^{N_{\omega}-1}\bm{q}_{j}e^{-\frac{2\pi i}{N_{\omega}}jk}\text{,} (4.4)

where 𝒒j=𝒒(jΔt)fragmentsq𝑗q(jΔt)\bm{q}_{j}=\bm{q}(j\Delta t). Plugging (4.3) into (4.4), we have

𝒒^k=j=0Nω1(e𝐀jΔt𝒒0+0jΔte𝐀(jΔtt)𝐁𝒇(t)dt)e2πiNωjk.fragments^𝒒𝑘fragmentsj0fragmentsN𝜔1(efragmentsAjΔtq00fragmentsjΔtefragmentsA(jΔtt)Bf(t)dt)efragmentsfragments2πifragmentsN𝜔jk.\hat{\bm{q}}_{k}=\sum_{j=0}^{N_{\omega}-1}\left(e^{{\bf A}j\Delta t}\bm{q}_{0}+\int_{0}^{j\Delta t}e^{{\bf A}(j\Delta t-t^{\prime})}{\bf B}\bm{f}(t^{\prime})\ dt^{\prime}\right)e^{-\frac{2\pi i}{N_{\omega}}jk}\text{.} (4.5)

For later convenience, we refer to the initial condition and forcing terms in (4.5) as 𝒒^k,icfragments^𝒒fragmentsk,ic\hat{\bm{q}}_{k,ic} and 𝒒^k,forcefragments^𝒒fragmentsk,force\hat{\bm{q}}_{k,force}, respectively.

First, we evaluate 𝒒^k,icfragments^𝒒fragmentsk,ic\hat{\bm{q}}_{k,ic}. It may be rewritten as

𝒒^k,ic=j=0Nω1e(𝐀iωk)jΔt𝒒0,fragments^𝒒fragmentsk,icfragmentsj0fragmentsN𝜔1efragments(Aiω𝑘)jΔtq0,\hat{\bm{q}}_{k,ic}=\sum_{j=0}^{N_{\omega}-1}e^{({\bf A}-i\omega_{k})j\Delta t}\bm{q}_{0}\text{,} (4.6)

where we have defined Δt=TNωfragmentsΔt𝑇fragmentsN𝜔\Delta t=\frac{T}{N_{\omega}} and substituted ωk=2πkTfragmentsω𝑘fragments2πk𝑇\omega_{k}=\frac{2\pi k}{T}. The key to evaluating (4.6) is to notice that it is a matrix geometric sum, i.e., each term is the previous one multiplied by e(𝐀iωk)Δtfragmentsefragments(Aiω𝑘)Δte^{({\bf A}-i\omega_{k})\Delta t}. The solution, entirely analogous to the scalar geometric sum, is

𝒒^k,ic=(𝐈e(𝐀iωk)Δt)1(𝐈e(𝐀iωk)NωΔt)𝒒0.fragments^𝒒fragmentsk,ic(Iefragments(Aiω𝑘)Δt)fragments1(Iefragments(Aiω𝑘)N𝜔Δt)q0.\hat{\bm{q}}_{k,ic}=({\bf I}-e^{({\bf A}-i\omega_{k})\Delta t})^{-1}({\bf I}-e^{({\bf A}-i\omega_{k})N_{\omega}\Delta t})\bm{q}_{0}\text{.} (4.7)

Because eiωkNωΔt=1fragmentsefragmentsiω𝑘N𝜔Δt1e^{i\omega_{k}N_{\omega}\Delta t}=1, this simplifies to

𝒒^k,ic=(𝐈e(𝐀iωk)Δt)1(𝐈e𝐀T)𝒒0.fragments^𝒒fragmentsk,ic(Iefragments(Aiω𝑘)Δt)fragments1(IefragmentsAT)q0.\hat{\bm{q}}_{k,ic}=({\bf I}-e^{({\bf A}-i\omega_{k})\Delta t})^{-1}({\bf I}-e^{{\bf A}T})\bm{q}_{0}\text{.} (4.8)

We view the first factor (𝐈e(𝐀iωk)Δt)1fragments(Iefragments(Aiω𝑘)Δt)fragments1({\bf I}-e^{({\bf A}-i\omega_{k})\Delta t})^{-1} as a time-discrete resolvent operator; expanding the matrix exponential to first order in ΔtfragmentsΔt\Delta t, one recovers a multiple of the resolvent. Note, however, that truncating the expansion to first order is always invalid for the higher frequencies because, for these frequencies, ωkΔtfragmentsω𝑘Δt\omega_{k}\Delta t is order unity.

To evaluate 𝒒^k,forcefragments^𝒒fragmentsk,force\hat{\bm{q}}_{k,force}, we assume that 𝒇(t)fragmentsf(t)\bm{f}(t) can be written as

𝒇(t)=1Nωl=0Nω1𝒇^leiωlt.fragmentsf(t)1fragmentsN𝜔fragmentsl0fragmentsN𝜔1^𝒇𝑙efragmentsiω𝑙t.\bm{f}(t)=\frac{1}{N_{\omega}}\sum_{l=0}^{N_{\omega}-1}\hat{\bm{f}}_{l}e^{i\omega_{l}t}\text{.} (4.9)

Though this is likely not exactly true in practice, it introduces minimal error (as we show in our numerical examples), and is necessary for evaluating the integral in (4.5). After pulling out the constant matrix exponential term and including the Fourier interpolation of 𝒇(t)fragmentsf(t)\bm{f}(t), the integral in (4.5) is

𝒒^k,force=1Nωj=0Nω1eiωkjΔte𝐀jΔt0jΔtl=0Nω1e(iωl𝐀)t𝐁𝒇^ldt.fragments^𝒒fragmentsk,force1fragmentsN𝜔fragmentsj0fragmentsN𝜔1efragmentsiω𝑘jΔtefragmentsAjΔt0fragmentsjΔtfragmentsl0fragmentsN𝜔1efragments(iω𝑙A)tB^𝒇𝑙dt.\hat{\bm{q}}_{k,force}=\frac{1}{N_{\omega}}\sum_{j=0}^{N_{\omega}-1}e^{-i\omega_{k}j\Delta t}e^{{\bf A}j\Delta t}\int_{0}^{j\Delta t}\sum_{l=0}^{N_{\omega}-1}e^{(i\omega_{l}-{\bf A})t^{\prime}}{\bf B}\hat{\bm{f}}_{l}\ dt^{\prime}\text{.} (4.10)

Integrating (and hence inverting the matrix exponential within the integral) brings out a resolvent, and the integral evaluates to

𝒒^k,force=1Nωj=0Nω1eiωkjΔtl=0Nω1𝐑l(eiωljΔte𝐀jΔt)𝐁𝒇^l,fragments^𝒒fragmentsk,force1fragmentsN𝜔fragmentsj0fragmentsN𝜔1efragmentsiω𝑘jΔtfragmentsl0fragmentsN𝜔1R𝑙(efragmentsiω𝑙jΔtefragmentsAjΔt)B^𝒇𝑙,\hat{\bm{q}}_{k,force}=\frac{1}{N_{\omega}}\sum_{j=0}^{N_{\omega}-1}e^{-i\omega_{k}j\Delta t}\sum_{l=0}^{N_{\omega}-1}{\bf R}_{l}\left(e^{i\omega_{l}j\Delta t}-e^{{\bf A}j\Delta t}\right){\bf B}\hat{\bm{f}}_{l}\text{,} (4.11)

where, again, 𝐑l=(iωl𝐈𝐀)1fragmentsR𝑙(iω𝑙IA)fragments1{\bf R}_{l}=(i\omega_{l}{\bf I}-{\bf A})^{-1} is the resolvent operator at the l𝑙l-th frequency. Now, using this result, the forcing term in (4.5) is

𝒒^k,force=1Nωj=0Nω1l=0Nω1𝐑l(ei(ωlωk)jΔte(𝐀iωk𝐈)jΔt)𝐁𝒇^lfragments^𝒒fragmentsk,force1fragmentsN𝜔fragmentsj0fragmentsN𝜔1fragmentsl0fragmentsN𝜔1R𝑙(efragmentsi(ω𝑙ω𝑘)jΔtefragments(Aiω𝑘I)jΔt)B^𝒇𝑙\hat{\bm{q}}_{k,force}=\frac{1}{N_{\omega}}\sum_{j=0}^{N_{\omega}-1}\sum_{l=0}^{N_{\omega}-1}{\bf R}_{l}\left(e^{i(\omega_{l}-\omega_{k})j\Delta t}-e^{({\bf A}-i\omega_{k}{\bf I})j\Delta t}\right){\bf B}\hat{\bm{f}}_{l} (4.12)

The frequency difference term evaluates to zero for ωlωkfragmentsω𝑙ω𝑘\omega_{l}\neq\omega_{k}, and the other term may be evaluated by the same geometric sum argument as before. The entire forcing term in (4.5) becomes

𝒒^k,force=𝐑k𝐁𝒇^k1Nω(𝐈e(𝐀iωk)Δt)1(𝐈e𝐀T)l=0Nω1𝐑l𝐁𝒇^l.fragments^𝒒fragmentsk,forceR𝑘B^𝒇𝑘1fragmentsN𝜔(Iefragments(Aiω𝑘)Δt)fragments1(IefragmentsAT)fragmentsl0fragmentsN𝜔1R𝑙B^𝒇𝑙.\hat{\bm{q}}_{k,force}={\bf R}_{k}{\bf B}\hat{\bm{f}}_{k}-\frac{1}{N_{\omega}}({\bf I}-e^{({\bf A}-i\omega_{k})\Delta t})^{-1}({\bf I}-e^{{\bf A}T})\sum_{l=0}^{N_{\omega}-1}{\bf R}_{l}{\bf B}\hat{\bm{f}}_{l}\text{.} (4.13)

Adding 𝒒^k,icfragments^𝒒fragmentsk,ic\hat{\bm{q}}_{k,ic} and 𝒒^k,forcefragments^𝒒fragmentsk,force\hat{\bm{q}}_{k,force}, we obtain the following equation for the k𝑘k-th component of the DFT of the state

𝒒^k=𝐑k𝐁𝒇^k+(𝐈e(𝐀iωk)Δt)1(𝐈e𝐀T)(𝒒01Nωl=0Nω1𝐑l𝐁𝒇^l).fragments^𝒒𝑘R𝑘B^𝒇𝑘(Iefragments(Aiω𝑘)Δt)fragments1(IefragmentsAT)(q01fragmentsN𝜔fragmentsl0fragmentsN𝜔1R𝑙B^𝒇𝑙).\hat{\bm{q}}_{k}={\bf R}_{k}{\bf B}\hat{\bm{f}}_{k}+\left({\bf I}-e^{({\bf A}-i\omega_{k})\Delta t}\right)^{-1}\left({\bf I}-e^{{\bf A}T}\right)\left(\bm{q}_{0}-\frac{1}{N_{\omega}}\sum_{l=0}^{N_{\omega}-1}{\bf R}_{l}{\bf B}\hat{\bm{f}}_{l}\right)\text{.} (4.14)

The first term is the naive one. For a stable system, it may be shown that the correction term is inversely proportional to the length of the time interval. Therefore, while the error from ignoring it does decrease as the time interval increases in this case, it is not negligible unless the interval is extremely long. Intuitively, the correction term accounts for the transient in the solution, which decays exponentially at the rate prescribed by the slowest decaying eigenvector of 𝐀𝐀{\bf A}. The decay time is (of course) independent of the time interval T𝑇T on which we take the transform, so the fraction of the time interval occupied by this decay is inversely proportional to T𝑇T. The term 1Nωl=0Nω1𝐑l𝒇^lfragments1fragmentsN𝜔fragmentsl0fragmentsN𝜔1R𝑙^𝒇𝑙\frac{1}{N_{\omega}}\sum_{l=0}^{N_{\omega}-1}{\bf R}_{l}\hat{\bm{f}}_{l} is the initial condition that is ‘in sync’ with the forcing. If 𝒒0fragmentsq0\bm{q}_{0} were equal to this, then there would be no transient, 𝒒(t)fragmentsq(t)\bm{q}(t) would be exactly periodic on the interval, and the naive equation (3.4) would be correct. For long time intervals relative to the slowest decaying eigenvector of 𝐀𝐀{\bf A}, the term (𝐈e𝐀T)fragments(IefragmentsAT)({\bf I}-e^{{\bf A}T}) may be ignored. We also note that summing the operator multiplying the initial condition and forcing sum over all frequencies can be shown to give Nω𝐈fragmentsN𝜔IN_{\omega}{\bf I}

k=0Nω1(𝐈e(𝐀iωk)Δt)1(𝐈e𝐀T)=Nω𝐈.fragmentsfragmentsk0fragmentsN𝜔1(Iefragments(Aiω𝑘)Δt)fragments1(IefragmentsAT)N𝜔I.\sum_{k=0}^{N_{\omega}-1}\left({\bf I}-e^{({\bf A}-i\omega_{k})\Delta t}\right)^{-1}\left({\bf I}-e^{{\bf A}T}\right)=N_{\omega}{\bf I}\text{.} (4.15)

\psfrag{016}[cl][cl]{\color[rgb]{0.000,0.000,0.000}\definecolor[named]{pgfstrokecolor}{rgb}{0.000,0.000,0.000}(b)}\psfrag{019}[cl][cl]{\color[rgb]{0.000,0.000,0.000}\definecolor[named]{pgfstrokecolor}{rgb}{0.000,0.000,0.000}(a)}\psfrag{018}[tc][tc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$t$}\psfrag{021}[tc][tc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$t$}\psfrag{022}[bc][bc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}Error}\psfrag{017}[bc][bc]{\color[rgb]{0.000,0.000,0.000}\definecolor[named]{pgfstrokecolor}{rgb}{0.000,0.000,0.000}Unstable}\psfrag{020}[bc][bc]{\color[rgb]{0.000,0.000,0.000}\definecolor[named]{pgfstrokecolor}{rgb}{0.000,0.000,0.000}Stable}\psfrag{000}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$0$}\psfrag{001}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$50$}\psfrag{002}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$100$}\psfrag{003}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$150$}\psfrag{004}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$200$}\psfrag{008}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$0$}\psfrag{009}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$50$}\psfrag{010}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$100$}\psfrag{011}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$150$}\psfrag{012}[ct][ct]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$200$}\psfrag{005}[rc][rc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$10^{-10}$}\psfrag{006}[rc][rc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$10^{-5}$}\psfrag{007}[rc][rc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$10^{0}$}\psfrag{013}[rc][rc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$10^{-10}$}\psfrag{014}[rc][rc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$10^{-5}$}\psfrag{015}[rc][rc]{\color[rgb]{0.150,0.150,0.150}\definecolor[named]{pgfstrokecolor}{rgb}{0.150,0.150,0.150}$10^{0}$}\includegraphics{Figures/Uncorrected_v_corrected.eps}
Figure 2: Error from uncorrected and corrected full-order frequency domain solutions for a stable system (a) and unstable system (b). In the stable case, the error is due to the transient, and the decay is determined by the largest eigenvalue of the system. In both cases, the corrected equations are substantially better. If the forcing is exactly periodic, there is only machine precision error for the solution to the corrected equations.

Figure 2 shows the inadequacy of the uncorrected method for capturing trajectories in initial value problems. The results shown are for the Ginzburg-Landau system described in Section LABEL:sec:results, with a stable (a) and unstable (b) value of μ0fragmentsμ0\mu_{0}. While the corrected frequency domain equations (4.14) are correct regardless of the stability of the system, we only recommend the method in the stable case; eigensystem methods are likely superior in the unstable case. The remaining error in the corrected method is due to the fact that the forcing is not periodic, and is not composed solely of retained frequencies, meaning that its Fourier series representation used above is approximate. However, this error is indeed small in both the stable and unstable cases.

5 Corrected method

The Petrov-Galerkin method is the full-order frequency domain equations (4.14) left-multiplied by 𝚿rk𝐖fragmentsΨfragmentsr𝑘W{\bf\Psi}^{r*}_{k}{\bf W},

𝒂k=𝚿rk𝐖𝐑k𝐁𝒇^k+𝚿rk𝐖(𝐈e(𝐀iωk𝐈)Δt)1(𝐈e𝐀T)(𝒒01Nωl𝐑l𝐁𝒇^l).fragmentsa𝑘Ψfragmentsr𝑘WR𝑘B^𝒇𝑘Ψfragmentsr𝑘W(Iefragments(Aiω𝑘I)Δt)fragments1(IefragmentsAT)(q01fragmentsN𝜔𝑙R𝑙B^𝒇𝑙).\bm{a}_{k}={\bf\Psi}^{r*}_{k}{\bf W}{\bf R}_{k}{\bf B}\hat{\bm{f}}_{k}+{\bf\Psi}^{r*}_{k}{\bf W}\left({\bf I}-e^{({\bf A}-i\omega_{k}{\bf I})\Delta t}\right)^{-1}\left({\bf I}-e^{{\bf A}T}\right)\left(\bm{q}_{0}-\frac{1}{N_{\omega}}\sum_{l}{\bf R}_{l}{\bf B}\hat{\bm{f}}_{l}\right)\text{.} (5.1)

As in the uncorrected case, for small systems, the inverses and matrix exponentials above may be computed directly, but this is not possible for larger systems where 𝒪(Nx3)fragmentsO(N𝑥3)\mathcal{O}(N_{x}^{3}) operations are infeasible. The first term is the same as in the uncorrected case, so it may be approximated with 𝐄kfragmentsE𝑘{\bf E}_{k}, as before. We approximate the latter terms at each frequency by using the basis of SPOD modes at that frequency, as described below.

5.1 Operator approximations

We define the number of SPOD modes that are to be used in approximating the operators as rdfragmentsr𝑑r_{d}, and we assume this is the same for each frequency, though this is not necessary. At a maximum, this number is the number of SPOD modes available in the data, but it can be fewer if desired. To approximate the operators accurately, it will likely be larger than the number of modes retained to represent the state, rd>rkfragmentsr𝑑r𝑘r_{d}>r_{k} for all k𝑘k. To accomplish the approximations, we use the available rdfragmentsr𝑑r_{d} SPOD modes as follows. To approximate the inverse (𝐈e(𝐀iωk𝐈)Δt)1fragments(Iefragments(Aiω𝑘I)Δt)fragments1\left({\bf I}-e^{({\bf A}-i\omega_{k}{\bf I})\Delta t}\right)^{-1} and matrix exponential (𝐈e𝐀T)fragments(IefragmentsAT)\left({\bf I}-e^{{\bf A}T}\right) terms, we first multiply by the identity in various places,

𝚿k(𝐈e(𝐀iωk𝐈)Δt)1(𝐈e𝐀T)=𝚿k(𝐈e(𝐀iωk)Δt)1𝚿k𝚿k𝐖(𝐈e𝐀T)𝚿k𝚿k𝐖.fragmentsΨ𝑘(Iefragments(Aiω𝑘I)Δt)fragments1(IefragmentsAT)Ψ𝑘(Iefragments(Aiω𝑘)Δt)fragments1Ψ𝑘Ψ𝑘W(IefragmentsAT)Ψ𝑘Ψ𝑘W.{\bf\Psi}^{*}_{k}\left({\bf I}-e^{({\bf A}-i\omega_{k}{\bf I})\Delta t}\right)^{-1}\left({\bf I}-e^{{\bf A}T}\right)={\bf\Psi}^{*}_{k}\left({\bf I}-e^{({\bf A}-i\omega_{k})\Delta t}\right)^{-1}{\bf\Psi}_{k}{\bf\Psi}^{*}_{k}{\bf W}\left({\bf I}-e^{{\bf A}T}\right){\bf\Psi}_{k}{\bf\Psi}^{*}_{k}{\bf W}\text{.} (5.2)

Note that, at this point, 𝚿kfragmentsΨ𝑘{\bf\Psi}_{k} is full rank, so 𝚿k𝚿k𝐖fragmentsΨ𝑘Ψ𝑘W{\bf\Psi}_{k}{\bf\Psi}^{*}_{k}{\bf W} is the identity. It is straightforward to show that (5.2) may be rewritten with the SPOD bases inside the inverse and matrix exponentials as

𝚿k(𝐈e(𝐀iωk𝐈)Δt)1(𝐈e𝐀T)=(𝐈e(𝚿k𝐖𝐀𝚿kiωk𝐈)Δt)1(𝐈e𝚿k𝐖𝐀𝚿kT)𝚿k𝐖.fragmentsΨ𝑘(Iefragments(Aiω𝑘I)Δt)fragments1(IefragmentsAT)(Iefragments(Ψ𝑘WAΨ𝑘iω𝑘I)Δt)fragments1(IefragmentsΨ𝑘WAΨ𝑘T)Ψ𝑘W.{\bf\Psi}^{*}_{k}\left({\bf I}-e^{({\bf A}-i\omega_{k}{\bf I})\Delta t}\right)^{-1}\left({\bf I}-e^{{\bf A}T}\right)=\left({\bf I}-e^{({\bf\Psi}^{*}_{k}{\bf W}{\bf A}{\bf\Psi}_{k}-i\omega_{k}{\bf I})\Delta t}\right)^{-1}\left({\bf I}-e^{{\bf\Psi}^{*}_{k}{\bf W}{\bf A}{\bf\Psi}_{k}T}\right){\bf\Psi}^{*}_{k}{\bf W}\text{.} (5.3)

Finally, truncating the operators in (5.3), i.e., 𝚿k𝚿krdfragmentsΨ𝑘Ψ𝑘fragmentsr𝑑{\bf\Psi}_{k}\to{\bf\Psi}_{k}^{r_{d}}, and denoting 𝐀~=𝚿rdk𝐖𝐀𝚿rdkfragments~𝐀Ψfragmentsr𝑑𝑘WAΨfragmentsr𝑑𝑘\tilde{{\bf A}}={\bf\Psi}^{r_{d}*}_{k}{\bf W}{\bf A}{\bf\Psi}^{r_{d}}_{k}, the approximated term is

𝚿rk𝐖(𝐈e(𝐀iωk𝐈)Δt)1(𝐈e𝐀T)𝐏k(𝐈e(𝐀~kiωk𝐈)Δt)1(𝐈e𝐀~kT)𝚿rdk𝐖.fragmentsΨfragmentsr𝑘W(Iefragments(Aiω𝑘I)Δt)fragments1(IefragmentsAT)P𝑘(Iefragments(~𝐀𝑘iω𝑘I)Δt)fragments1(Iefragments~𝐀𝑘T)Ψfragmentsr𝑑𝑘W.{\bf\Psi}^{r*}_{k}{\bf W}\left({\bf I}-e^{({\bf A}-i\omega_{k}{\bf I})\Delta t}\right)^{-1}\left({\bf I}-e^{{\bf A}T}\right)\approx{\bf P}_{k}\left({\bf I}-e^{(\tilde{{\bf A}}_{k}-i\omega_{k}{\bf I})\Delta t}\right)^{-1}\left({\bf I}-e^{\tilde{{\bf A}}_{k}T}\right){\bf\Psi}^{r_{d}*}_{k}{\bf W}\text{.} (5.4)

Here, 𝐏k=[𝐈rk𝟎]rk×rdfragmentsP𝑘matrixfragmentsIfragmentsr𝑘missing-subexpression0Rfragmentsr𝑘r𝑑{\bf P}_{k}=\begin{bmatrix}{\bf I}_{r_{k}}&&{\bf 0}\end{bmatrix}\in\mathbb{R}^{r_{k}\times r_{d}} selects the first rkfragmentsr𝑘r_{k} rows of the matrix it multiplies and 𝚿krdfragmentsΨ𝑘fragmentsr𝑑{\bf\Psi}_{k}^{r_{d}} is the first rdfragmentsr𝑑r_{d} columns of 𝚿kfragmentsΨ𝑘{\bf\Psi}_{k}. As desired, all matrix exponentials and inverses are of size rd×rdfragmentsr𝑑r𝑑r_{d}\times r_{d}, which makes them tractable.

The forcing sum in (5.1), which is difficult to compute directly because it involves resolvents, must also be approximated. In the unreduced equations, this term is the same at each frequency, so the sum over frequencies only needs to be computed once. Any approximation of this term should be the same for each frequency to avoid quadratic scaling in NωfragmentsN𝜔N_{\omega}. The natural choice for approximating the forcing sum is to approximate each term by

𝐑l𝐁𝒇^l𝚿lr𝚿lr𝐖𝐑l𝐁𝒇^l.fragmentsR𝑙B^𝒇𝑙Ψ𝑙𝑟Ψ𝑙fragmentsrWR𝑙B^𝒇𝑙.{\bf R}_{l}{\bf B}\hat{\bm{f}}_{l}\approx{\bf\Psi}_{l}^{r}{\bf\Psi}_{l}^{r*}{\bf W}{\bf R}_{l}{\bf B}\hat{\bm{f}}_{l}\text{.} (5.5)

This approximation is accurate because the SPOD modes at the l𝑙l-th frequency are the best basis for 𝒒^lfragments^𝒒𝑙\hat{\bm{q}}_{l} and are thus a very good basis for 𝐑l𝒇^lfragmentsR𝑙^𝒇𝑙{\bf R}_{l}\hat{\bm{f}}_{l}, which is 𝒒^lfragments^𝒒𝑙\hat{\bm{q}}_{l} without the correction. The operator 𝚿lr𝐖𝐑l𝐁fragmentsΨ𝑙fragmentsrWR𝑙B{\bf\Psi}_{l}^{r*}{\bf W}{\bf R}_{l}{\bf B} may again be approximated with 𝐄lfragmentsE𝑙{\bf E}_{l}.

The equations can, at this point, be written as

𝒂k=𝐄k𝒇^k+𝐅k(𝒒01Nωl𝚿lr𝐄l𝒇^l),fragmentsa𝑘E𝑘^𝒇𝑘F𝑘(q01fragmentsN𝜔𝑙Ψ𝑙𝑟E𝑙^𝒇𝑙),\bm{a}_{k}={\bf E}_{k}\hat{\bm{f}}_{k}+{\bf F}_{k}\left(\bm{q}_{0}-\frac{1}{N_{\omega}}\sum_{l}{\bf\Psi}_{l}^{r}{\bf E}_{l}\hat{\bm{f}}_{l}\right)\text{,} (5.6)

where 𝐅k=(𝐈e(𝐀~kiωk𝐈)Δt)1(𝐈e𝐀~kT)𝚿rk𝐖rk×NxfragmentsF𝑘(Iefragments(~𝐀𝑘iω𝑘I)Δt)fragments1(Iefragments~𝐀𝑘T)Ψfragmentsr𝑘WCfragmentsr𝑘N𝑥{\bf F}_{k}=\left({\bf I}-e^{(\tilde{{\bf A}}_{k}-i\omega_{k}{\bf I})\Delta t}\right)^{-1}\left({\bf I}-e^{\tilde{{\bf A}}_{k}T}\right){\bf\Psi}^{r*}_{k}{\bf W}\in\mathbb{C}^{r_{k}\times N_{x}}. The operators have been approximated, so far, to avoid 𝒪(Nx3)fragmentsO(N𝑥3)\mathcal{O}(N_{x}^{3}) scaling in the offline phase of the algorithm. To avoid 𝒪(Nx)fragmentsO(N𝑥)\mathcal{O}(N_{x}) scaling in the online phase, one final approximation must be made. The term in parentheses in (5.6) is multiplied on the left by 𝐅kfragmentsF𝑘{\bf F}_{k} for every frequency ωkfragmentsω𝑘\omega_{k}, leading to NxNωrfragmentsN𝑥N𝜔rN_{x}N_{\omega}r scaling. This can be avoided by storing the term in parentheses in (5.6) in a rank-p𝑝p reduced basis 𝚽Nx×pfragmentsΦCfragmentsN𝑥p{\bf\Phi}\in\mathbb{C}^{N_{x}\times p} and precomputing the product of this basis with each 𝐅kfragmentsF𝑘{\bf F}_{k}. This basis should represent the initial condition and forcing sum terms accurately, and in practice, we choose POD modes of the state. With this approximation, the corrected SPOD Petrov-Galerkin method becomes

𝒂k=𝐄k𝒇^k+𝐇k(𝚽𝐖𝒒01Nωl𝐓l𝐄l𝒇^l),fragmentsa𝑘E𝑘^𝒇𝑘H𝑘(ΦWq01fragmentsN𝜔𝑙T𝑙E𝑙^𝒇𝑙),\bm{a}_{k}={\bf E}_{k}\hat{\bm{f}}_{k}+{\bf H}_{k}\left({\bf\Phi}^{*}{\bf W}\bm{q}_{0}-\frac{1}{N_{\omega}}\sum_{l}{\bf T}_{l}{\bf E}_{l}\hat{\bm{f}}_{l}\right)\text{,} (5.7)

where 𝐇k=𝐅k𝚽rk×pfragmentsH𝑘F𝑘ΦCfragmentsr𝑘p{\bf H}_{k}={\bf F}_{k}{\bf\Phi}\in\mathbb{C}^{r_{k}\times p} and 𝐓l=𝚽𝐖𝚿lrp×rlfragmentsT𝑙ΦWΨ𝑙𝑟Cfragmentspr𝑙{\bf T}_{l}={\bf\Phi}^{*}{\bf W}{\bf\Psi}_{l}^{r}\in\mathbb{C}^{p\times r_{l}}.

5.2 Formal statement of the algorithm and scaling

The offline and online phases of the SPOD Petrov-Galerkin method are shown in Algorithms 1 and 2, respectively.

Algorithm 1 SPOD Petrov-Galerkin method (offline)
1:Inputs: {𝚿rdi}fragments{Ψfragmentsr𝑑𝑖}\{{\bf\Psi}^{r_{d}}_{i}\}, {𝚲rdi}fragments{Λfragmentsr𝑑𝑖}\{{\bf\Lambda}^{r_{d}}_{i}\}, {𝚿gri}fragments{Ψfragmentsgr𝑖}\{{\bf\Psi}^{gr}_{i}\}, {𝚲gri}fragments{Λfragmentsgr𝑖}\{{\bf\Lambda}^{gr}_{i}\}, 𝚽𝚽{\bf\Phi}, {ri}fragments{r𝑖}\{r_{i}\}, 𝐀𝐀{\bf A}, 𝐁𝐁{\bf B}, 𝐂𝐂{\bf C}, 𝐖𝐖{\bf W}
2:for  k{1,2,,Nω}fragmentsk{1,2,,N𝜔}k\in\{1,2,\dots,N_{\omega}\} do
3:     𝚿kr[𝝍k,1,,𝝍k,rk]fragmentsΨ𝑘𝑟[ψfragmentsk,1,,ψfragmentsk,r𝑘]{\bf\Psi}_{k}^{r}\leftarrow[\bm{\psi}_{k,1},\dots,\bm{\psi}_{k,r_{k}}] \triangleright Retained SPOD modes
4:     𝐋kiωk𝐈𝐀fragmentsL𝑘iω𝑘IA{\bf L}_{k}\leftarrow i\omega_{k}{\bf I}-{\bf A} \triangleright Inverse of resolvent
5:     𝐄k(𝚲kr(𝐋k𝚿kr)𝚿kgr)(𝚲kgr1𝚿kgr)𝐁fragmentsE𝑘(Λ𝑘𝑟(L𝑘Ψ𝑘𝑟)Ψ𝑘fragmentsgr)(Λ𝑘fragmentsgr1Ψ𝑘fragmentsgr)B{\bf E}_{k}\leftarrow({\bf\Lambda}_{k}^{r}({\bf L}_{k}{\bf\Psi}_{k}^{r})^{*}{\bf\Psi}_{k}^{gr})({\bf\Lambda}_{k}^{gr-1}{\bf\Psi}_{k}^{gr*}){\bf B} \triangleright Precomputation of first operator
6:     𝐀~k𝚿rdk𝐖𝐀𝚿krdfragments~𝐀𝑘Ψfragmentsr𝑑𝑘WAΨ𝑘fragmentsr𝑑\tilde{{\bf A}}_{k}\leftarrow{\bf\Psi}^{r_{d}*}_{k}{\bf W}{\bf A}{\bf\Psi}_{k}^{r_{d}} \triangleright Reduced 𝐀𝐀{\bf A} to compute matrix exponentials
7:     𝐏k[𝐈rk𝟎]fragmentsP𝑘matrixfragmentsIfragmentsr𝑘missing-subexpression0{\bf P}_{k}\leftarrow\begin{bmatrix}{\bf I}_{r_{k}}&&{\bf 0}\end{bmatrix} \triangleright Row selector matrix
8:     𝐇k𝐏k(𝐈e(𝐀~kiωk𝐈)Δt)1(𝐈e𝐀~kT)(𝚿krd𝐖𝚽fragmentsH𝑘P𝑘(Iefragments(~𝐀𝑘iω𝑘I)Δt)fragments1(Iefragments~𝐀𝑘T)(Ψ𝑘fragmentsr𝑑WΦ{\bf H}_{k}\leftarrow{\bf P}_{k}({\bf I}-e^{(\tilde{{\bf A}}_{k}-i\omega_{k}{\bf I})\Delta t})^{-1}({\bf I}-e^{\tilde{{\bf A}}_{k}T})({\bf\Psi}_{k}^{r_{d}*}{\bf W}{\bf\Phi}) \triangleright Precomputation of second operator
9:     𝐓k𝚽𝐖𝚿rkfragmentsT𝑘ΦWΨ𝑟𝑘{\bf T}_{k}\leftarrow{\bf\Phi}^{*}{\bf W}{\bf\Psi}^{r}_{k} \triangleright Precomputation of third operator
10:     𝐂𝚿k𝐂𝚿rkfragmentsC𝚿𝑘CΨ𝑟𝑘{\bf C}^{{\bf\Psi}}_{k}\leftarrow{\bf C}{\bf\Psi}^{r}_{k} \triangleright 𝐂𝐂{\bf C} in SPOD basis
11:end for

Inputs: {𝚿rdi}fragments{Ψfragmentsr𝑑𝑖}\{{\bf\Psi}^{r_{d}}_{i}\}, the rdfragmentsr𝑑r_{d} SPOD modes at each frequency; {𝚲rdi}fragments{Λfragmentsr𝑑𝑖}\{{\bf\Lambda}^{r_{d}}_{i}\}, the rdfragmentsr𝑑r_{d} SPOD energies at each frequency; {𝚿gri}fragments{Ψfragmentsgr𝑖}\{{\bf\Psi}^{gr}_{i}\}, the POD modes of 𝒈ifragmentsg𝑖\bm{g}_{i} for each frequency (see (3.13)); {𝚲gri}fragments{Λfragmentsgr𝑖}\{{\bf\Lambda}^{gr}_{i}\}, the energies for the POD modes of 𝒈ifragmentsg𝑖\bm{g}_{i} for each frequency; 𝚽𝚽{\bf\Phi}, the basis for reducing the initial condition and forcing terms, {ri}fragments{r𝑖}\{r_{i}\}, the number of modes to be kept at each frequency; 𝐀𝐀{\bf A}, 𝐁𝐁{\bf B}, 𝐂𝐂{\bf C}, the system matrices; 𝐖𝐖{\bf W}, the weight matrix.
Outputs: {𝐄i}fragments{E𝑖}\{{\bf E}_{i}\}, {𝐇i}fragments{H𝑖}\{{\bf H}_{i}\}, {𝐓i}fragments{T𝑖}\{{\bf T}_{i}\}, the operators in (5.7) for each frequency; {𝐂𝚿i}fragments{C𝚿𝑖}\{{\bf C}^{{\bf\Psi}}_{i}\}, the operators that map the SPOD mode coefficients to 𝒚𝒚\bm{y} for each frequency.

Algorithm 2 SPOD Petrov-Galerkin method (online)
1:Input parameters: {𝚿ri}fragments{Ψ𝑟𝑖}\{{\bf\Psi}^{r}_{i}\}, 𝚽𝚽{\bf\Phi}, 𝐖𝐖{\bf W}, 𝒇𝒇{\bm{f}}, 𝒒0fragmentsq0\bm{q}_{0}, {𝐄i}fragments{E𝑖}\{{\bf E}_{i}\}, {𝐇i}fragments{H𝑖}\{{\bf H}_{i}\}, {𝐓i}fragments{T𝑖}\{{\bf T}_{i}\}, {𝐂𝚿i}fragments{C𝚿𝑖}\{{\bf C}^{{\bf\Psi}}_{i}\}
2:𝒇^𝙵𝙵𝚃(𝒇)fragments^𝒇FFT(f)\hat{\bm{f}}\leftarrow\mathtt{FFT}({\bm{f}}) \triangleright FFT of forcing
3:𝒂𝚽0=𝚽𝐖𝒒0fragmentsa𝚽0ΦWq0\bm{a}^{\bf\Phi}_{0}={\bf\Phi}^{*}{\bf W}\bm{q}_{0} \triangleright Reduced initial condition
4:𝒂~𝚽0𝟎p×1fragments~𝒂𝚽00fragmentsp1\tilde{\bm{a}}^{{\bf\Phi}}_{0}\leftarrow{\bf 0}_{p\times 1} \triangleright Initializing forcing sum term
5:for k{1,2,,Nω}fragmentsk{1,2,,N𝜔}k\in\{1,2,\dots,N_{\omega}\} do
6:     𝒃k𝐄k𝒇^kfragmentsb𝑘E𝑘^𝒇𝑘\bm{b}_{k}\leftarrow{\bf E}_{k}\hat{\bm{f}}_{k}
7:     𝒂~𝚽0𝒂~𝚽0+1Nω𝐓k𝒃kfragments~𝒂𝚽0~𝒂𝚽01fragmentsN𝜔T𝑘b𝑘\tilde{\bm{a}}^{{\bf\Phi}}_{0}\leftarrow\tilde{\bm{a}}^{{\bf\Phi}}_{0}+\frac{1}{N_{\omega}}{\bf T}_{k}\bm{b}_{k} \triangleright Forcing sum
8:end for
9:for k{1,2,,Nω}fragmentsk{1,2,,N𝜔}k\in\{1,2,\dots,N_{\omega}\} do
10:     𝒂rk𝒃k+𝐇k(𝒂𝚽0𝒂~𝚽0)fragmentsa𝑟𝑘b𝑘H𝑘(a𝚽0~𝒂𝚽0)\bm{a}^{r}_{k}\leftarrow\bm{b}_{k}+{\bf H}_{k}(\bm{a}^{\bf\Phi}_{0}-\tilde{\bm{a}}^{{\bf\Phi}}_{0}) \triangleright Assigning SPOD coefficients
11:     𝒚^rk𝐂𝚿k𝒂rkfragments^𝒚𝑟𝑘C𝚿𝑘a𝑟𝑘\hat{\bm{y}}^{r}_{k}\leftarrow{\bf C}^{{\bf\Psi}}_{k}\bm{a}^{r}_{k} \triangleright Constructing observable in frequency domain
12:end for
13:𝒚r𝙸𝙵𝙵𝚃(𝒚^r)fragmentsy𝑟IFFT(^𝒚𝑟)\bm{y}^{r}\leftarrow\mathtt{IFFT}(\hat{\bm{y}}^{r}) \triangleright Observable in time domain

Inputs: {𝚿ri}fragments{Ψ𝑟𝑖}\{{\bf\Psi}^{r}_{i}\}, the retained SPOD modes for each frequency; 𝚽𝚽{\bf\Phi}, the basis for reducing the initial condition and forcing terms; 𝐖𝐖{\bf W}, the weight matrix; 𝒇𝒇{\bm{f}}, the forcing as a function of time, 𝒒0fragmentsq0\bm{q}_{0}, the initial condition; {𝐄i}fragments{E𝑖}\{{\bf E}_{i}\}, {𝐇i}fragments{H𝑖}\{{\bf H}_{i}\}, {𝐓i}fragments{T𝑖}\{{\bf T}_{i}\}, the operators in (5.7) for each frequency; {𝐂𝚿i}fragments{C𝚿𝑖}\{{\bf C}^{{\bf\Psi}}_{i}\}, the operators that map the SPOD mode coefficients to 𝒚𝒚\bm{y} for each frequency.
Output: 𝒚rfragmentsy𝑟\bm{y}^{r}, the observable in the time domain.