Evaluating the accuracy of the dynamic mode decomposition

Dynamic mode decomposition (DMD) gives a practical means of extracting dynamic information from data, in the form of spatial modes and their associated frequencies and growth/decay rates. DMD can be considered as a numerical approximation to the Koopman operator, an infinite-dimensional linear operator defined for (nonlinear) dynamical systems. This work proposes a new criterion to estimate the accuracy of DMD on a mode-by-mode basis, by estimating how closely each individual DMD eigenfunction approximates the corresponding Koopman eigenfunction. This approach does not require any prior knowledge of the system dynamics or the true Koopman spectral decomposition. The method may be applied to extensions of DMD (i.e., extended/kernel DMD), which are applicable to a wider range of problems. The accuracy criterion is first validated against the true error with a synthetic system for which the true Koopman spectral decomposition is known. We next demonstrate how this proposed accuracy criterion can be used to assess the performance of various choices of kernel when using the kernel method for extended DMD. Finally, we show that our proposed method successfully identifies modes of high accuracy when applying DMD to data from experiments in fluids, in particular particle image velocimetry of a cylinder wake and a canonical separated boundary layer.


Introduction
The decomposition of spatiotemporal data into spatial modes and temporal functions describing their evolution gives a means to isolate coherent features and assemble low-order representations of complex dynamics.Over the past decade, the dynamic mode decomposition (DMD) [22] has become a routinely-used method for such purposes [6,21,25,30].See, for example, [17] and [20] for reviews of many ensuing uses and applications of DMD.While successfully used on a range of datasets, general questions still exist in terms of how to select a reduced set of modes, and how to ensure results are quantitatively accurate.On the first point, numerous methods have been proposed to select a reduced number of modes that best represent the dynamics of the system [3,15,16,29].On the second point, the sensitivity of the outputs of DMD to noisy data has also been investigated [1,7], and a number of modified algorithms proposed that give improved accuracy for noisy data [5,13].
The present work differs from these past studies by giving a means of estimating the accuracy of DMD on a mode-by-mode basis, without any a-priori knowledge of the system dynamics, noise characteristics, or truncation of low-energy modes.It has been shown previously [21,26] that DMD approximates the Koopman operator, an infinite-dimensional linear operator defined for (nonlinear) dynamical systems.In this work, we will exploit this connection by estimating the accuracy to which we approximate eigenfunctions of the Koopman operator.This approach allows our analysis to naturally extend to extensions of DMD [27] that are designed to improve the approximation to the Koopman operator for nonlinear systems.Extended DMD uses nonlinear observables to expand the space in which the Koopman operator is approximated.However, EDMD suffers from the curse of dimensionality: that is, the computational cost increases rapidly with the dimension of the state.To circumvent this issue, kernel DMD (KDMD) [28] was proposed as a computationally inexpensive alternative, which makes use of a kernel function to implicitly include a rich (and nonlinear) set of observables, while maintaining the same computational cost as DMD.The optimal choice of kernel function for KDMD is still an open question, and here we demonstrate that the accuracy criterion may be used to evaluate and compare the performance of various kernels.
The structure of this work is as follows.We first review DMD, the Koopman operator, and kernel DMD in section 2, before presenting and validating our proposed accuracy criterion in section 3. Section 4 uses the accuracy criterion to measure the performance of various kernels in KDMD for a simple nonlinear system, while section 5 demonstrates that this criterion is effective in selecting accurate DMD modes from experimental data.

Background
We first give a review of previous results, including the DMD algorithm and its connections to the Koopman operator (section 2.1), as well as extensions of DMD that can better approximate the Koopman operator for nonlinear systems (section 2.2).

Dynamic mode decomposition
Dynamic mode decomposition was introduced in [22], and our presentation here follows that in [20,26].Consider a discrete-time dynamical system whose state space is denoted by X ⊂ R n , and suppose the dynamics are given by x(k + 1) = F (x(k)), x(k) ∈ X. (2.1) Let ψ 1 , . . ., ψ q be real-valued functions on X, which we call observables, and let ψ : X → R q denote the vector-valued function whose components are (ψ 1 , . . ., ψ q ).We may not be able to measure the state x directly, but instead, we can measure the vector y = ψ(x).
As a special case, y could be the state itself, i.e., y = ψ(x) = x.For complex systems, it can be advantageous to define observables that are nonlinear functions of the state, which will be discussed in more detail in section 2.2.For the purposes of describing standard DMD, we assume y = x.We consider pairs of snapshots ( , and where x # k = F (x k ) is the image of x k upon application of the dynamics (2.1).For sequential data, x(1), . . ., x(m + 1) satisfying (2.1), one takes , though non-sequential data may also be used, such as from multiple runs of experiments or simulations [26].In DMD, we seek a matrix holds, at least approximately.We form two matrices and define the DMD matrix A by DMD modes and eigenvalues are the eigenvectors and eigenvalues of A. A typical algorithm to compute these modes and eigenvalues is as follows [26]: 2. (Optional) Truncate the SVD by only retaining the first r colunms of U , V , and the first r rows and columns of Σ, to obtain U r , Σ r , V r .
4. Find the eigenvalues µ i and eigenvectors ṽi of Ã, such that Ãṽ i = µ i ṽi .
5. The (projected) DMD modes are given by v i = U T r ṽi , with corresponding (discrete-time) DMD eigenvalues µ i .
The eigenvectors of the matrix A ∈ R q×q can be found from the eigenvectors of the smaller matrix Ã ∈ R r×r .We denote the eigenvalues and eigenvectors of A by {µ i , v i }.In the case of sequential data (for which y # k = y k+1 ), suppose that we can express the initial state as The time evolution of the system (starting at y 1 ) is then predicted by DMD to be Therefore, each DMD mode v i is associated with a single frequency and growth/decay rate (DMD eigenvalue µ i ).In reality, (2.3) may not hold exactly, depending on the quantity and quality of data used, whether the system dynamics are nonlinear, whether the SVD is truncated in step 2 of the DMD algorithm above.For cases where equation (2.3) does not give an exact description of the dynamics, DMD gives a least-squares fit to the data (as pairs of snapshots).
There are connections between DMD and an infinite-dimensional linear operator called the Koopman operator [21,26], with the high-level idea being that DMD gives a finite-dimensional numerical approximation of the Koopman operator.Our proposed criterion for evaluating the accuracy of DMD exploits this connection.For a given state-space X, the Koopman operator acts on scalar-valued functions of X, which we referred earlier as observables.Here, we consider observables in L2 (X), the space of square integrable functions on X.Given the dynamics in (2.1), one then defines the Koopman operator (2.4) That is, K maps a function φ to another function φ • F , and (Kφ)(x) gives the value of φ(x) at the next time step.Here we emphasize two points: first that the Koopman operator acts on functions of the state instead of the state itself; and second that the Koopman operator is linear, even though the dynamics might be nonlinear.On the second point, note that holds for any functions φ 1 , φ 2 and any scalars c 1 , c 2 .Since the Koopman operator is linear, it may have eigenvalues and eigenfunctions, which satisfy where ϕ is the eigenfunction with eigenvalue µ.Now, suppose we have a given set of observables {ψ 1 , ψ 2 , • • • , ψ q }, and suppose ϕ is a Koopman eigenfuntion (with eigenvalue µ) that lies in the span of {ψ j }: i.e., for some w * ∈ C n .Then one can show (see [26, §4.1]) that under certain conditions on the data, w * is a left eigenvector of the DMD matrix A with eigenvalue µ (i.e., w * A = µw * ).This connection implies that we can approximate Koopman eigenfunctions (and eigenvalues) for a given unknown dynamical system directly from data using DMD.In particular, given left eigenvectors of the DMD matrix (w * i A = µ i w * i ), we consider ϕ i (x) = w * i ψ(x) as a DMD-approximated Koopman eigenfunction, with eigenvalue µ i .

Extended DMD and kernel DMD
In order to apply the connection between DMD and Koopman mentioned above, the Koopman eigenfunctions must lie within the space spanned by the observables {ψ j }.If one takes ψ(x) = x, as with standard DMD, then the subspace spanned by {ψ j } consists only of linear functions of x, and this subspace is often not large enough to include eigenfunctions of K (a notable exception being the case in which F is linear).Extended DMD (EDMD) was proposed in [27] in order to enlarge the subspace of observables, and therefore better approximate Koopman eigenfunctions.In particular, Extended DMD approximates the Koopman operator by a weighted residual method, with trial functions given by {ψ j } and a particular choice of test functions specified by the data.Examples of observables ψ j (x) could include polynomials, Fourier modes, indicator functions, or spectral elements, as suggested in [27].For instance, if we take x ∈ R 2 and take observables to be monomials in components of x up to degree d = 2 (including the constant 1), then the vector of observables is We can potentially approximate many more accurate Koopman eigenfunctions with EDMD than we could with DMD.However, EDMD suffers from the curse of dimensionality [2].If the state dimension is n and we consider (multivariate) polynomials up to degree d, then the number of observables is q = n+d d , which is approximately n d for large n.For large problems (as arise in fluids), data might typically have n ≈ 10 6 , so even if one considers only quadratic polynomials, the number of observables is q ≈ 10 12 , too large for practical computation.It is thus very computationally expensive to consider large subspaces of observables.
Kernel DMD (KDMD) has been proposed to deal with this curse of dimensionality [28].In KDMD, EDMD is reformulated such that only inner products of observables need to be computed.
The inner product can be evaluated by making use of a kernel function, a common technique in the community of machine learning.A kernel function k : R n × R n → R is defined as k(x, x) = ψ(x), ψ( x) . (2.7) To appreciate how kernel functions work, consider for example a polynomial kernel k(x, x) = (1 + x T x) d as an example.This kernel corresponds to a set of observables ψ(x) consisting of all monomials in components of x up to degree d [2].Taking n = 2 and d = 2, this kernel function can be expanded as where 2 ).In the terminology of machine learning, ψ is called the feature map, and ψ(x) ∈ R q is called the feature space (which might be infinite dimensional).In the example above, the dimension of the (implicitly defined) feature space is q = 6, but in order to compute k(x, x), we require inner products only in state space, which has dimension n = 2. Kernel functions hence can be used to evaluate the inner product in a high dimensional (or even infinite dimensional) feature space in an efficient way.More examples of kernel functions are given in section 4.1.

Accuracy criterion for DMD
The connection between DMD and the Koopman operator as discussed in section 2.1 implies that we can use variants of DMD (e.g., DMD, EDMD, or KDMD) to approximate Koopman eigenfunctions and eigenvalues, given access to data.By applying DMD variants to a given dataset, we can potentially identify many Koopman eigenfunctions and eigenvalues (which we refer to as eigenpairs).However, the reliability of these eigenpairs remains unknown.Before using DMD results for any analysis or reduced order modeling, it is desirable and necessary to assess the quality (i.e., accuracy) of the results.In this section, we will develop a criterion for evaluating the accuracy of DMDapproximated Koopman eigenpairs.We describe this accuracy criterion in section 3.1, and then validate it in section 3.2 using a simple nonlinear system where the analytical Koopman eigenpairs are known.
The most common way to select which of the computed DMD modes are most relevant is to use the "mode amplitude": for sequential data, one projects the initial condition onto DMD modes and one views the magnitude of the projection coefficients as the mode amplitudes.It is common practice [12,21,26] to retain the modes of largest amplitude.This approach sounds plausible; however, it was observed in [15] (which used sparsity-promoting techniques to select modes) that mode amplitude is not always a useful criterion for mode selection.Indeed, mode amplitudes can be misleading, as we illustrate below with a simple example.
Suppose we have three DMD modes, where is small and thus v 2 and v 3 are almost parallel.If we consider an initial condition x 0 = (1, 0, ζ), and project it onto these DMD modes, we obtain For instance, if ζ = 10 −3 and = 10 −6 , then ζ/ = 10 3 , so the mode amplitude (defined as the magnitude of the projection coefficients) indicates that v 2 and v 3 are much more important than v 1 .The mode amplitudes indicate that we might be able to neglect v 1 without significant adverse effects.However, it is clear that v 1 is much more relevant for reconstructing x 0 : if we use only v 2 and v 3 , we obtain which does not accurately approximate x 0 = (1, 0, ζ).A better approximation to x 0 is simply v 1 = (1, 0, 0).This example illustrates that mode amplitude is not always a reliable criterion for selecting which modes are important, especially when modes are almost parallel.Note that this problem would also arise if using other methods to measure mode amplitude (e.g., [16]).
The accuracy criterion we describe below does not provide a way of selecting which modes are dominant, and in the example above, accuracy of the modes did not play a role.However, the accuracy criterion can provide a way of eliminating candidate modes that we know to be inaccurate, so in this way it can help with the problem of mode selection.

Proposed accuracy criterion
Given data from an experiment or simulation, we can split the dataset into training data and testing data.Training data is used to approximate DMD modes (and associated Koopman eigenpairs), while testing data is used to evaluate the quality of these identified modes.Data-driven algorithms may suffer from the problem of over-fitting [11], so any evaluation criteria should use testing data that differs from the training data.
The idea of our approach is to evaluate the accuracy of a DMD mode (and eigenvalue) by looking at the accuracy of its corresponding Koopman eigenfunction.Suppose we are given an approximate Koopman eigenpair (µ, ϕ), and we wish to evaluate its accuracy.If (µ, ϕ) were a true Koopman eigenpair, then by definition it would satisfy where F defines the dynamics in (2.1).Ideally, we would like to compute where • is the norm of a function.(We divide by ϕ so that the above quantity is independent of the scaling of the eigenfunction ϕ .)However, in order to compute (3.4), we require explicit knowledge of the dynamics F , which is unknown in most cases of interest.Instead, we can estimate the above quantity using finite number of data points (i.e., the testing data).The estimation should give some sense of the quantity in (3.4), using only the testing data, which consists of pairs of samples (x k , x # k ) with x k ∈ X and x # k = F (x k ).This observation motivates the following definition of an accuracy criterion: w * A = µw * , with A as defined in (2.2)), the accuracy criterion, or estimated mode error, can be written as The numerator measures to what extent the eigenfunction equation holds, and the denominator gives a measure of the magnitude of the eigenfunction.Here α can be interpreted as the error of a Koopman eigenpair.The error is defined on a mode-by-mode basis, which enables independent evaluation for each individual DMD mode.Therefore it makes sense to call α the mode error.Observe that α is always non-negative, and it is usually less than 1.When we feed in the true Koopman eigenfunction and eigenvalue into α in equation (3.5), then α = 0 (assuming that the testing data is noise-free).If α is close to 1, the Koopman eigenpair is extremely unreliable, because the discrepancy in the eigenfunction equation is of the same order as the magnitude of the eigenfunction.Therefore, usually we only care about the DMD eigenpairs for which 0 ≤ α 1.In our definition in (3.5), we have used the absolute value to indicate the discrepancy in the eigenfunction equation.However, it is also possible to use other norms, such as the 2 norm (or its square), which yield similar results in terms of indicating relative accuracy of modes.
A meaningful evaluation criterion should be (fairly) independent the scaling of the eigenfunctions, the scaling of the testing data, and the size of the testing set.The proposed accuracy criterion approximately satisfies all of these.To show this, we consider the simple case where the full system state is used in DMD, i.e., ψ(x) = x and the DMD-computed eigenfunction is linear, i.e., ϕ(x) = w * ψ(x) = w * x.The fact that we normalize by the magnitude of the observables means that α is relatively independent of eigenfunction scaling, data scaling, and data quantity, as is desired.In the case where the observable is not the full state (i.e., when using EDMD or KDMD), the scaling of the eigenfunctions and size of testing again do not influence α, for the same reason.However, due to the nonlinear transformation ψ(x), the scaling of testing data x may play some role in the size of α.Fortunately, it is reasonable to expect that the relative magnitude of α should still indicate the relative accuracy of different DMD-computed Koopman eigenpairs.
We point out that if the testing data is clean, mode error is determined only by the quality of DMD-approximated Koopman eigenpairs.If the testing data is noisy, mode error is also affected by the noise in testing data.For experimental data, we have access only to the noisy measurements.In these cases, the relative magnitude of α is still expected to indicate relative accuracy of Koopman eigenpairs.We reiterate again that this definition of error does not assume access to analytical Koopman spectral decomposition, which is unknown in most cases.

Validating the accuracy criterion
We have proposed an accuracy criterion that exploits the connection between DMD and the Koopman operator.Before applying this criterion to real data, we first seek to validate it as a reliable measure of accuracy.We will first consider a simple 2D nonlinear system for which the analytical Koopman spectral decomposition is known.Given analytical Koopman eigenpairs, we can define the true error to be the distance between the DMD eigenvalue and the true eigenvalue (eigenvalue error), or the difference between the DMD eigenfunction and the true eigenfunction (eigenfunction error).We will validate the accuracy criterion against the true error, and show that accuracy criterion reliably indicates accuracy.
Here we consider a 2D nonlinear map (also considered in [26]) with dynamics defined by , γ = 0.9, δ = 0.8. (3.7) It is straightforward to verify that γ, δ are Koopman eigenvalues with respective eigenfunctions Additional Koopman eigenvalues and eigenfunctions are given by where k, = 0, 1, 2, • • • are non-negative integers.Notice that the analytical eigenfunctions are multivariate polynomials in the state variables.
To collect training data, m = 100 random initial points are sampled from a uniform distribution on [−1, 1] × [−1, 1], and their images are found by applying the map defined in equation (3.7).Similarly we also generate m test = 100 snapshot pairs as the testing data.The generated training and testing dataset are used for subsequent analysis in both this and the next section.
Here we apply EDMD with monomials as observables.In particular, the observables are taken to be ψ k, (x) = x k 1 x 2 , k, = 0, 1, 2, 3, 4, 5, where the feature space dimension is q = 6 × 6 = 36.The results of applying EDMD are shown in Figure 2(a).We note that mode error indicates that leading eigenvalues are approximated very accurately (α ∼ 10 −15 ), and this is consistent with the comparison to analytical eigenvalues.As mentioned in section 2.1, if the Koopman eigenfunctions lie in the span of the observables, the eigenfunction can be found exactly by EDMD.In this case, monomials up to degree 5 span the leading Koopman eigenfunctions, and hence these eigenvalues can be identified.
To validate that the proposed accuracy criterion does indeed indicate accuracy, now we compare α with the true error.We can compute the discrepancy between DMD eigenvalues, indicated by μi , and true eigenvalues µ k, = γ k δ given in equation (3.8), by defining the eigenvalue error where the indices (k, ) are chosen such that µ k, is the closest eigenvalue to μi .We then interpret μi as a DMD approximation to the analytical eigenvalue µ k, .We can also compute the discrepancy between DMD eigenfunctions φi and true eigenfunctions ϕ k, given in equation (3.8).We normalize where • denotes the L 2 norm given by In order to validate the accuracy criterion, we compare α i with the eigenvalue error τ i and eigenfunction error θ i in Figure 2(b).We observe that α highly correlates with both τ and θ, even though the proposed accuracy criterion does not assume access to analytical Koopman eigenpairs.The proposed accuracy criterion hence indicates accuracy very well, by comparison with the true error defined using true Koopman eigenpairs.Starting from the 13th eigenvalue μ13 ≈ µ 6,0 = γ 6 δ 0 = (0.9) 6 (0.8) 0 = 0.531441, the error dramatically increases, which implies that the remaining eigenfunctions cannot be accurately identified using EDMD with this choice of observables.This is expected, as monomials up to degree 5 can not represent the eigenfunction ϕ 6,0 (x) = x 6  1 .This comparison gives us confidence in the reliability of the accuracy criterion.

Evaluating the performance of kernels with the accuracy criterion
This section focusses on using the accuracy criterion defined in section 3.1 to evaluate the performance of KDMD using various kernel functions.We first introduce a few commonly used kernel functions in section 4.1, then we compare the performance of various kernels in section 4.2, using the same test problem considered in section 3.2.Following this, section 4.3 studies the robustness of various kernels for the case where the data are noisy.

Kernel functions
In section 2.2 we briefly described KDMD, which makes use of a kernel function to circumvent the curse of dimensionality associated with EDMD.Application of KDMD requires a suitable choice of kernel function.In order to appreciate how a kernel function may implicitly define a observable function, note that Mercer's theorem [18] states that a (quite broad) class of "Mercer kernels" k(x, x) may be written as Hence there exists an infinite dimensional implicit observable function (also called feature map in the machine learning community) such that k(x, x) = ψ(x), ψ( x) .We now introduce a few commonly used kernel functions, and in section 4.2 we compare their performance on the example from the previous section.
The (implicit) observables associated with the polynomial kernel are all monomials in components of x ∈ R n up to degree d.The dimension of the observable vector is q = n+d d .The feature map for arbitrary n ≥ 1, d ≥ 0 is described in details in [4].The observables when n = 2, d = 2 are given by equation (2.8).
The (implicit) observables associated with the exponential kernel are all monomials in components of x, up to infinite degree.An explicit feature map can be also found from a Taylor expansion of the exponential kernel [4].Taking x ∈ R 2 for example, the kernel can be expanded as where the observable is where • 2 is the 2 norm, and σ scales the kernel width [8].The Gaussian kernel is a Mercer kernel for all dimensions n ≥ 1 [23].Take x ∈ R as an example, the (implicit) observables as in equation (4.1) are given by [9] a, b, d are functions of σ, and H k is the k-th order Hermite polynomial.The number of observables is infinite, q = ∞.For arbitrary n, an explicit feature map can in principle be also found from Taylor expansion of the Gaussian kernel [4].
Note the similarity between the Laplacian and Gaussian kernels, with the difference being that that the Laplacian kernel uses the 2 norm in the exponent without squaring [24].For arbitrary n, the Laplacian kernel is a valid Mercer kernel [23].

Performance of kernels
We now compare the above kernel functions using the example considered in section 3.2.Figure 4 shows the performance of polynomial, exponential, Gaussian, and Laplacian kernels in identifying the Koopman eigenvalues of the system, using the same training and testing data as in section 3.2.
We find that a polynomial kernel of degree d = 5 accurately identifies the leading eigenvalues (µ k, ∈ [0.6, 1]) with very high accuracy (α ≈ 10 −14 ), as was the case with EDMD.This is not surprising, as the polynomial kernel implicitly defines monomials of states as observables, which span the same space as the explicitly defined monomials used in EDMD.With increasing order of the polynomial kernel, more eigenvalues can be accurately identified.It is found that the exponential kernel can identify more eigenvalues (µ k, ∈ [0.5, 1]) than the polynomial kernel with satisfactory accuracy (α ≈ 10 −4 ), since the implicit observables associated with exponential kernel are monomials up to infinite degree.The Gaussian kernel is able to find the leading eigenvalues (µ k, ∈ [0.65, 1]) with mode error (accuracy criterion) α ≈ 10 −4 to 10 −3 , even the implicit observables of the Gaussian kernel are not monomials.This demonstrates the potential power of kernel functions: they are able to span a useful function space, primarily because the dimension of the space of (implicit) observables can be large, and even infinite.The Laplacian kernel can approximate only a few leading eigenvalues (µ = 1.0.9,0.8), and with a lower accuracy of α ≈ 10 −2 .
We emphasize that, while the exact Koopman eigenvalues are known in this case, it is possible to use the accuracy criterion to compare the performance of different kernels even when the true dynamics are unknown.Indeed, using only the results of the accuracy criterion, we would reason that the polynomial kernel is the best choice for identifying the leading Koopman eigenvalues accurately.

Sensitivity of kernels to noise
In practice, data is typically corrupted with noise.Here we present a study of the sensitivity of different kernels with respect to the presence of noise.We add zero-mean Gaussian noise with standard deviation σ noise = 10 −3 to the 100 random uniformly distributed data pairs taken from The training data is noisy, but the testing data is "clean".Therefore, the accuracy The results are shown in Figure 5.We observe that the polynomial kernel is slightly more robust than the other (α ≈ 10 −3 ) in the presence of noise, and is able to accurately identify the first few leading eigenvalues (µ = 1, 0.9).The reason for this is that the dimension of the implicit observables associated with the polynomial kernel is finite and small (q = 21) in comparison to the number of snapshots (m = 100), so we avoid problems of overfitting.In KDMD, the Koopman eigenpairs are found from the eigendecomposition of the matrix A KDMD = Y + Y # , where the columns of Y and Y # are y = ψ(x) ∈ R q and y # = ψ(x # ) ∈ R q respectively, and Y , Y # ∈ R q×m .The matrix A KDMD has the same non-zero eigenvalues as the DMD matrix A = Y # Y + .A is the optimal (least-square or minimum-norm) solution to min A AY − Y # F , where Y , Y # ∈ R q×m .For the polynomial kernel, A is the solution to an over-constrained problem (q < m), and is hence more robust to noise.In contrast, the exponential kernel, Gaussian kernel, and Laplacian kernel span an infinite dimensional space of observables (q = ∞).The finite dimensional approximation to the Koopman operator is found by solving an under-constrained problem (q m), which makes it more sensitive to noise, as these three kernels tend to over-fit the noise in the trainning dataset.Given noisy data, they are only able to accurately identify the eigenvalue µ = 1, whose eigenfunction is a constant.

Identifying accurate DMD modes using experimental data
Having demonstrated the use of the accuracy criterion with synthetic data, now we turn our attention to data from fluids experiments.In these cases, the analytical Koopman spectral decomposition is unknown.An important advantage of the proposed accuracy criterion is that it does not rely on known Koopman eigenpairs, and can be applied so long as there is data available.We will use the proposed accuracy criterion to identify accurate DMD modes for vorticity data from flow past a circular cylinder in section 5.1, and from a separation experiment in section 5.2.

Flow past a circular cylinder
In this example, we use the experimental particle image velocimetry (PIV) data for flow past a circular cylinder at a Reynolds number of 413.The PIV velocity data was sampled at frequency of 20 Hz with a resolution of 135 × 80 pixels.See [25] for more details about this experiment.This dataset has been used in other studies [14,28] for testing various proposed DMD algorithms.We will use vorticity data for DMD, which can be computed from velocity data by finite difference methods.The state dimension is n = 135 × 80 = 10800, and the number of snapshots in training data is taken to be m = 1000.We use an additional m test = 1000 snapshot pairs as testing data.
When we apply DMD to sequential data that has time step t, the continuous-time DMD eigenvalues λ DMD are related to the discrete-time DMD eigenvalues µ DMD by µ DMD = e λ DMD t . (5.1) The discrete-time DMD eigenvalues are computed with DMD and converted to continuous-time DMD eigenvalues by equation (5.1), and in this example the time spacing is t = (1/20)s.The DMD frequency f DMD is related to the continuous-time DMD eigenvalues λ DMD by where Im(λ DMD ) is the imaginary part of λ DMD .
We first apply the standard DMD method described in section 2.1.We use a truncation level r = 100, which corresponds to preserving 78.16% of the total energy of the snapshots.The continuoustime DMD eigenvalues are shown shaded by the corresponding accuracy criterion values α in Figure 6(a), and time-averaged mode amplitudes β in Figure 6(b) (defined as in [16]).
Inspecting Figure 6 (a), we observe that eigenvalues near the imaginary axis are more accurate, and this observation is consistent with physical intuition: this flow exhibits a von Kármán vortex street, whose dominant dynamics evolve on a limit cycle.For this experiment, the wake shedding frequency is f wake = 0.889 Hz [25], In previous work [25], the physically relevant dominant frequencies are reported as f 0 = 0 Hz, f 1 = 0.89 Hz, f 2 = 1.77Hz, f 3 = 2.73 Hz.The DMD mode associated with λ 0 is the mean of the flow, and λ 1 , λ 2 and λ 3 are the first, second, and third harmonic of the fundamental wake frequency λ wake .These four frequencies represent the dominant dynamics in this flow.This observation indicates that the proposed accuracy criterion can be used to identify physically relevant DMD modes/eigenvalues, and distinguish relevant modes from irrelevant ones.By comparing Figure 6(a) and (b), we verify that the accuracy criterion indicates the same dominant frequencies as the mode amplitude.The DMD modes that have higher accuracy as indicated by the accuracy criterion are shown in Figure 6(c)-(e).We verify that they look similar to those identified in previous work [25].KDMD Next, we investigate the performance of KDMD on this dataset.Figure 7 shows results for a polynomial kernel of degree d = 5, again using a truncation level of r = 100.The DMD eigenvalues are shown in Figure 7(a)-(b), colored by both accuracy criterion and mode amplitude.The relevant DMD modes picked out by accuracy criterion and mode amplitude are shown in Figure 7(c)-(e).We verify that accuracy criterion is able to isolate dominant modes when using KDMD.

Canonical separated flow
In this example, we use PIV data from a canonical flow separation experiment sketched in Figure 8. Separation is induced on the surface of a flat plate by a suction/blowing boundary condition imposed on the wall of the wind tunnel, near the trailing edge of the plate.The free-stream velocity is U ∞ = 3.9 m/s, the chord length is c = 402 mm, the span is s = 305 mm, and the height is h = 0.095c.The Reynolds number based on chord length is Re c = 10 5 , small enough that the boundary layer is likely laminar upstream of the separation point.The average separation bubble length is L sep = 0.2c.More information regarding the separation system and the flat plate model can be found in [6].This particular experimental dataset has been used and studied in previous work [12], in which the shear layer frequency was found to be f SL = 106 Hz.The shear layer frequency is a periodic roll-up of the shear layer due to the Kelvin-Helmholtz instability.The shear layer frequency f SL can be identified by applying total-least-squares DMD (TDMD), a variant of DMD which makes use of total-least-square regression to improve the accuracy of DMD for noisy data [5,13].As in [12], we use a truncation level of r = 25, which corresponds to preserving 74% of the energy of the data.In this example the time spacing is t = 1/f s = (1/1600)s.
For comparison, we also compute the time-averaged mode amplitude β, as in the example in section 5.1 (e.g., Figure 6(b)).The DMD frequencies are plotted against their accuracy criterion values and mode amplitudes in Figure 9   associated with shear layer frequency is plotted in Figure 9(c), and it agrees with the mode identified in previous work [12].
KDMD We apply KDMD to this dataset, using polynomial kernels of degree d = 5, again with a truncation level of r = 25.Eigenvalue frequencies, and corresponding accuracy criterion values and mode amplitudes are plotted in Figure 10(a)-(b).We observe that the shear layer frequency has small error and large mode amplitude, and once again verify that the DMD mode associated with shear layer frequency (Figure 10(c)) agrees closely with that found in previous work [12].

Conclusion and outlook
Exploiting the connection between DMD and the Koopman operator, we have presented an accuracy criterion to evaluate the quality (accuracy) of Koopman eigenpairs approximated with DMD variants.The criterion does not assume access to the analytical Koopman spectral decomposition, which is generally unknown in practice.Furthermore, the proposed accuracy criterion naturally applies to other variants of DMD, because it is based on the general notion of Koopman eigenfunctions.The proposed accuracy criterion is validated with an synthetic system where the analytical Koopman eigenpairs are known.Using this the accuracy criterion, we present a study of the performance of various kernels, and assess their sensitivity to noisy data.In our examples, the polynomial kernel (with finite-dimensional observables) performs well both in the sense of accuracy  and robustness to noise.Exponential, Gaussian, and Laplacian kernel are able to span an infinitedimensional function space, but the tradeoff is that they are significantly more sensitive to noise in the dataset.We demonstrate that the accuracy criterion can assist in identifying accurate and physically relevant DMD modes/eigenvalues from noisy experimental data.The accuracy criterion is conceptually simple and easy to use.As a data-driven algorithm, depending on the nature of the problem, sometimes DMD produces relevant results, and sometimes outputs numerical artifacts.For reduced order modeling based on DMD/Koopman modes, it is hence important to assess the quality of DMD results.
Note that our proposed accuracy criterion requires that some portion of data snapshots be kept out of the DMD analysis for purposes of assessing mode accuracy.However, it would be possible to incorporate this additional data into the DMD analysis after the DMD modes and eigenvalues of interest have been identified.
The demand for accurate reduced order models (ROM) has increased rapidly in recent years, but it is still unclear how to select a subset of Koopman eigenpairs such that the original (nonlinear) system is accurately approximated.In order to build any meaningful ROM we need to at least assess the accuracy and importance of DMD-approximated Koopman eigenpairs.The present work has shed some light on the accuracy side.However, how to select the most dynamically important Koopman eigenpairs remains an open question.Unlike techniques such as Proper Orthogonal Decomposition, in which the modes are orthogonal by construction, Koopman eigenfunctions are in general not orthogonal (though orthogonal DMD-like modes may be obtained [19]).Mode amplitudes obtained by a projection of data onto DMD modes are not necessarily always a meaningful criterion for evaluating importance, as demonstrated in the example in section 3. It would be desirable to develop an importance criterion that can guide the selection of modes for the purpose of representing the dynamics accurately.

Figure 1 :
Figure 1: A diagram summarizing the implementation of the accuracy criterion.Training data is used to approximate Koopman eigenpairs with variants of DMD, while testing data is used to evaluate the quality of Koopman eigenpairs.

Figure 2 :
Figure 2: (a) EDMD eigenvalues (circles) and analytical eigenvalues (crosses).EDMD eigenvalues are superimposed by the corresponding accuracy criterion (mode error) α as shown in the colorbar.(b) Comparison between the accuracy criterion α, eigenvalue error τ , and eigenfunction error θ.The eigenvalues are indexed by their absolute value, in descending order.

Figure 6 :
Figure 6: (a)-(b), Continuous-time DMD eigenvalues (circles) colored by (a) the accuracy criterion α and (b) mode amplitude β.Mode amplitudes are normalized by the maximum amplitude.Dominant frequencies (blue cross sign ×) are shown for comparison.The first 11 eigenvalues that have small α and large β are shown (red plus sign +).(c)-(e) Three dominant DMD modes (only show real part) picked out by accuracy criterion and mode amplitude.

Figure 7 :
Figure 7: (a)-(b), Continuous-time KDMD eigenvalues (circles) colored by (a) the accuracy criterion α and (b) mode amplitude β.Mode amplitudes are normalized by the maximum amplitude.Dominant frequencies (blue cross sign ×) are shown for comparison.The first 11 eigenvalues that have small α and large β are shown (red plus sign +).(c)-(e) Three dominant DMD modes (real part) picked out by accuracy criterion and mode amplitude.

Figure 8 :
Figure 8: Sketch of the canonical separated flow experiment setup (adapted from [10]) and the PIV measurement region.
(a)-(b).It is observed that f SL = 106 Hz is accurately identified by TDMD.In addition, it stands out by having a small mode error.The DMD mode TDMD, mode amplitude (c) TDMD mode, f = 106 Hz

Figure 9 :
Figure 9: TDMD frequency (f TDMD ) and corresponding mode error/amplitude.Mode amplitudes are normalized by the maximum mode amplitude.The truncation level is r = 25.The shear layer frequency f SL = 106 Hz is denoted with a red square, and corresponds to the most accurate (smallest α) and largest amplitude (largest β) mode.

Figure 10 :
Figure 10: KDMD frequency (f KDMD ) and corresponding mode error/amplitude.The truncation level is r = 25.The shear layer frequency f SL = 106 Hz is denoted with a red square.