## An Incremental Approach to Online Dynamic Mode Decomposition for Time-Varying Systems with Applications to EEG Data Modeling ∗

Mustaffa Alfatlawi

Vaibhav Srivastava †

## Abstract

Dynamic Mode Decomposition (DMD) is a data-driven technique to identify a low dimensional linear time invariant dynamics underlying high-dimensional data. For systems in which such underlying low-dimensional dynamics is time-varying, a time-invariant approximation of such dynamics computed through standard DMD techniques may not be appropriate. We focus on DMD techniques for such time-varying systems and develop incremental algorithms for systems without and with exogenous control inputs. We build upon the work in [35] to scenarios in which high dimensional data are governed by low dimensional time-varying dynamics. We consider two classes of algorithms that rely on (i) a discount factor on previous observations, and (ii) a sliding window of observations. Our algorithms leverage existing techniques for incremental singular value decomposition and allow us to determine an appropriately reduced model at each time and are applicable even if data matrix is singular. We apply the developed algorithms for autonomous systems to Electroencephalographic (EEG) data and demonstrate their effectiveness in terms of reconstruction and prediction. Our algorithms for non-autonomous systems are illustrated using randomly generated linear time-varying systems.

Keywords: data-driven dynamics, dynamic mode decomposition, time-varying systems, incremental algorithms

## 1 Introduction

Emergence of low cost sensors and their widespread deployment has led to an unprecedented amount of data. Extraction of actionable information from such plethora of data remains a challenge. It is often the case that a low dimensional dynamical system governs the high-dimensional spatiotemporal sensory data. Dynamic Mode Decomposition (DMD) has emerged as a popular data-driven technique to efficiently compute such low dimensional dynamics [19, 30, 33]. One of the attractive features of the DMD approach is that it requires minimal assumptions on the data. Furthermore, its strong connections with the Koopman operator [17, 23-25, 29] makes it further appealing and theoretically grounded. The efficacy and simplicity of the DMD has inspired its application in a wide range of areas from fluid dynamics [19, 30] to video processing [10, 32] to epidemiology [28] to neuroscience [3].

For high-dimensional data that is generated by an underlying low dimensional time-varying dynamics, the standard DMD approach may be applicable only locally in time and appropriate

∗ This work has been supported by NSF Award IIS-1734272.

† Electrical and Computer Engineering Department, College of Engineering, Michigan State University, East Lansing, MI (alfatlaw@msu.edu, vaibhav@egr.msu.edu ).

time-varying DMD operators can be computed by discounting old data or considering a sliding window of observations [35]. Even in scenarios when underlying dynamics is time-invariant and nonlinear, such time-varying linear approximations have been shown to be very effective [7]. In this paper, we develop incremental methods for the computation of the DMD for time-varying systems and demonstrate the utility of the developed algorithm using Electroencephalographic (EEG) data.

Incremental approaches to DMD refer to methods that allow for efficiently computing the DMD when data is provided sequentially instead of being provided as a batch. The sequential arrival might be due to the inherent nature of the application or it may be used for computational efficiency even if all the data is accessible. One such technique is streaming DMD [12, 13] that first computes the projection of new data on the current orthogonal basis for the range of the data matrix and compares the norm of the difference between the projection and the new data with a threshold. If the difference is larger than the threshold, then it appends the basis with an additional element. Incremental total DMD introduced in [21] applies incremental Singular Value Decomposition (SVD) [1, 2, 26] for incremental computation of dynamic modes and subsequent identification of dominant modes. Unlike the streaming DMD and the total DMD, our focus in this paper is on systems with time-varying dynamics.

Within the context of time-varying systems, an incremental approach is the Online DMD [35], which adapts the sequential least squares method [15, 16] to incrementally update the DMD computation. The online DMD incrementally computes the DMD operator using the Sherman-Morrison identity [31]. Authors of [35] consider two strategies in their DMD computation to account for time-varying systems: (i) discounting the old data, and (ii) using a sliding window of observations. They also consider DMD for systems with control input [18, 27]. In particular, they extend the DMD with control approach proposed in [27] to develop an online DMD with control algorithm for time-varying system.

In this paper, we build upon the work in [35], and develop incremental SVD based techniques for the computation of the online DMD for time-varying systems. The proposed approach provides access to singular values of the data matrix at each time and hence allows it to determine a reduced order model. For the scenarios in which the high-dimensional data is governed by a low-dimensional dynamics, such reduced order models provide better future prediction accuracy. Furthermore, for scenarios where the Sherman-Morrison identity cannot be applied, e.g., if the data matrix remains singular even after sufficiently long time, the access to singular values allows for efficient computation of appropriate pseudo-inverse. The major contributions of this work are fourfold

- (i). We leverage incremental SVD techniques to develop two algorithms for the computation of the online DMD for time-varying systems that rely on discounting old data and a sliding window of data, respectively;

(ii). We extend both these algorithms to develop incremental SVD based algorithms for the computation of the online DMD with control input for time-varying systems;

(iii). We apply our algorithms for the case without control input on an EEG dataset and show their efficacy in reconstructing and predicting error related potential, a slow cortical potential seen in the EEG signal that is elicited by an unexpected outcome;

(iv). We apply our algorithms for the case with control input on randomly generated linear timevarying dynamical systems, and demonstrate their efficacy.

The remainder of the paper is organized as follows. In Section 2, we present some background on the DMD for time-invariant and time-varying systems. In Section 3, we present some background for the incremental SVD algorithms. In Section 4, we leverage the incremental SVD algorithms to develop novel incremental DMD algorithms. We apply these algorithms to EEG data in Section 5. We present incremental SVD-based algorithms for online DMD with control and illustrate its utility using numerical examples in Section 6. Finally, we conclude in Section 7.

Notation: We denote the set of real and complex matrices of size n × m by R n × m and C n × m , respectively. The set of real and complex n -dimensional vectors are denoted by R n and C n , respectively. We denote matrices with bold upper case letters, vectors with bold lower case letters, and scalar with normal lower case letters. We denote the matrix transpose and the matrix conjugate transpose by ( ) · T and ( ) · ∗ , respectively. The kernel and range of a matrix X are denoted by Ker X , and Ran X , respectively.

## 2 Dynamic Mode Decomposition for Time-Varying Systems

In this section, we recall the DMD setup and describe the time-varying DMD problem that we study in this paper.

## 2.1 Dynamic Mode Decomposition

Consider the following discrete-time system:

$$x _ { k + 1 } \ = \ f ( x _ { k } ),$$

where x k ∈ R n is a high-dimensional state vector ( n glyph[greatermuch] 1) sampled at t k = k ∆ , t k ∈ { 1 , . . . , ( m + 1) } , and f is an unknown map which describes the evolution of the state vector between two subsequent sampling times. Suppose that the evolution of the high-dimensional state x is governed by some underlying low-dimensional dynamics. Then, the DMD computes a data-driven linear approximation to the system (1) as follows [19, 33].

Consider a collection of ( m +1) sequential measurements arranged in the following two datasets:

$$\mathbf X = \left [ \mathbf x _ { 1 } \ \mathbf x _ { 2 } \ \cdots \ \mathbf x _ { m } \right ], \mathbf Y = \left [ \mathbf x _ { 2 } \ \mathbf x _ { 3 } \ \cdots \ \mathbf x _ { m + 1 } \right ].$$

Let the projection of X onto its leading r singular vectors be ¯ X = ¯ U Σ V x ¯ x ¯ ∗ x , where r is the targeted dimension of the underlying low-dimensional dynamical system, ¯ U x ∈ C n × r , ¯ V x ∈ C r × m , and ¯ Σ x = diag { σ , . . . , σ 1 r } ∈ C r × r . Then, the DMD framework approximates the dynamics (1) by

$$\mathbf x _ { k + 1 } = \bar { \mathbf A } \mathbf x _ { k },$$

where ¯ A ∈ R n × n is called the DMD operator and is given by

$$\bar { A } = Y \bar { V } _ { x } \bar { \Sigma } _ { x } ^ { - 1 } \bar { U } _ { x } ^ { * }.$$

Let the projection of the state x and the DMD operator ¯ A onto the space spanned by leading r singular vectors of X be ˜ x k = ¯ U x ∗ k and

$$\tilde { A } = \bar { U } _ { x } ^ { * } \bar { A } \bar { U } _ { x } = \bar { U } _ { x } ^ { * } \Upsilon \bar { V } _ { x } \bar { \Sigma } _ { x } ^ { - 1 },$$

respectively. Then, the approximation to the underlying r -dimensional dynamics is

$$\tilde { x } _ { k + 1 } = \tilde { A } \tilde { x } _ { k }.$$

Let Λ be the diagonal matrix of the eigenvalues of ˜ A and W be the matrix of the associated eigenvectors such that

$$\tilde { A } W = W \Lambda.$$

Then, two types of DMD modes can be identified using the eigen-decomposition in (4): the projected DMD modes ˆ = ¯ Φ U W x and the exact DMD modes Φ = YV Σ ¯ x ¯ -1 x W [33]. Either of these DMD modes and the associated eigenvalues describe the evolution of the high-dimensional system using low-dimensional dynamics (3).

## 2.2 Dynamic Mode Decomposition with Control

Consider the following non-autonomous discrete-time system:

$$\mathbf x _ { k + 1 } \ = \ \mathbf f ^ { c } ( \mathbf x _ { k }, \gamma _ { k } ),$$

where x k ∈ R n is a high-dimensional state vector ( n glyph[greatermuch] 1) sampled at t k = k ∆ , t k ∈ { 1 , . . . , ( m +1) , } and f c is an unknown time-varying map which describes the evolution of the state vector between two subsequent sampling times, and γ k ∈ R l is the exogenous input. Then, the Dynamic Mode Decomposition with Control (DMDc) computes a data-driven linear approximation to the system (5) as follows [27].

Consider a collection of m sequential measurements x i ∈ R n and the associated exogeneous inputs γ i ∈ R l , i ∈ { 1 , . . . , m } . DMDc approximates the non-autonomous dynamics underlying these measurements by

$$x _ { k + 1 } = \text{A} x _ { k } + \text{B} \gamma _ { k } = \text{G} \begin{bmatrix} x _ { k } \\ \gamma _ { k } \end{bmatrix},$$

where A ∈ R n × n is called the DMD operator, B ∈ R n × l is called the input matrix, and G = [ A B ] ∈ R n × ( n + ) l . In particular, the DMDc algorithm constructs matrices X = [ x 1 · · · x m -1 ] , Y = [ x 2 · · · x m ] , and Γ = [ γ 1 · · · γ m -1 ] . Let X c = [ X Γ ] ∈ R ( n + ) l × ( m -1) , and X c = U Σ V c c c ∗ be its singular value decomposition, where U c ∈ C ( n + ) l × ( n + ) l , Σ c ∈ C ( n + ) l × ( n + ) l , and V c ∈ C ( m -1) × ( n + ) l .

The DMDc algorithm estimates G by

$$G = Y V ^ { c } ( \Sigma ^ { c } ) ^ { - 1 } U ^ { c * }.$$

Finally, U c ∗ can be written in a partitioned form of U c ∗ = [ U c a ∗ U c b ∗ ] , where U c a ∈ C n × ( n + ) l and U c b ∈ C l × ( n + ) l . Then, the DMDc algorithm computes the matrices A c and B c given by

$$A ^ { c } = Y V ^ { c } ( \Sigma ^ { c } ) ^ { - 1 } U ^ { c _ { a } * } \quad \text{and} \quad B ^ { c } = Y V ^ { c } ( \Sigma ^ { c } ) ^ { - 1 } U ^ { c _ { b } * }.$$

Similar to the case of the DMD, the DMDc algorithm also enables identification of the lowdimensional non-autonomous system underlying the high-dimensional measurements. Assume that the matrix X c can be approximated by its projection onto the leading p singular vectors by ¯ X c = ¯ U Σ V c ¯ c ¯ c ∗ , where ¯ U c ∈ C ( n + ) l × p , ¯ Σ c ∈ C p × p , and ¯ V c ∈ C ( m -1) × p , and the matrix X can be

approximated by its projection onto the leading r ≤ p singular vectors by ¯ X = ¯ ¯ ¯ UΣV ∗ , where ¯ U ∈ C n × r , ¯ Σ ∈ C r × r , and ¯ V ∈ C ( m -1) × r . Then, a reduced order model can be represented as follows:

$$\tilde { x } _ { k + 1 } = \tilde { A } ^ { c } \tilde { x } _ { k } + \tilde { B } ^ { c } \gamma _ { k },$$

where the lower-dimensional matrices ˜ A c ∈ R r × r and ˜ B c ∈ R r × l can be calculated by:

$$\tilde { A } ^ { c } = \bar { U } ^ { * } Y \bar { V } ^ { c } ( \bar { \Sigma } ^ { c } ) ^ { - 1 } \bar { U } ^ { c _ { a } * } \bar { U } \text{ \ and \ } \tilde { B } ^ { c } = \bar { U } ^ { * } Y V ^ { c } ( \Sigma ^ { c } ) ^ { - 1 } U ^ { c _ { b } * }.$$

## 2.3 Problem Formulation

In this paper, we study incremental algorithms for the time-varying DMD and DMDc problems defined below.

## 2.3.1 Time-varying DMD

Consider the time-varying discrete time system of the form

$$\mathbf x _ { k + 1 } \ = \ f ( t _ { k }, \mathbf x _ { k } ),$$

where x k ∈ R n is a high-dimensional state vector ( n glyph[greatermuch] 1) sampled at t k = k ∆ , t k ∈ { 1 , . . . , ( m +1) , } and f is an unknown time-varying map which describes the evolution of the state vector between two subsequent sampling times. Similar to the standard DMD setup, we assume that the highdimensional dynamics (6) is generated by a low-dimensional time-varying dynamics.

Suppose that, at sampling time t k +1 , we have access to a collection of ( w +1) sequential measurements [ x k -w +1 x k -w +2 x k -w +3 · · · x k +1 ] . Our objective is to design efficient computational techniques to identify the time-varying DMD operator A k that approximates the system (6) by the following linear time-varying system

$$x _ { k + 1 } & = A _ { k } x _ { k },$$

such that the cost function

$$\mathbf J ( \mathbf A _ { k } ) = \sum _ { j = k - w + 1 } ^ { k } \left \| \rho ^ { ( k - j ) } ( \mathbf y _ { j } - \mathbf A _ { k } \mathbf x _ { j } ) \right \| ^ { 2 },$$

is minimized, where ρ ∈ (0 , 1] is a discounting factor.

## 2.3.2 Time-varying DMDc

Consider the following variant of the system in (6)

$$\mathbf x _ { k + 1 } \ = \ \mathbf f ^ { c } ( t _ { k }, \mathbf x _ { k }, \gamma _ { k } ),$$

where f c is an unknown time-varying map which describes the evolution of the state vector between two subsequent sampling times, and γ k ∈ R l is the exogenous input.

Assume that, at sampling time t k +1 , two collections of sequential measurements are available, one for the system states [ x k -w +1 x k -w +2 x k -w +3 · · · x k +1 ] , and the other one for the

exogenous inputs [ γ k -w +1 γ k -w +2 γ k -w +3 · · · γ k +1 ] . Our objective is to design efficient computational techniques to identify the time-varying DMDc operator A c k and input matrix B c k that approximates the system (9) by the following linear time-varying system

$$x _ { k + 1 } & = A _ { k } ^ { c } x _ { k } + B _ { k } ^ { c } \gamma _ { k }, & ( 1 0 )$$

such that the cost function

$$\mathbf J ^ { c } ( \mathbf A _ { k } ^ { c }, \mathbf B _ { k } ^ { c } ) = \sum _ { j = k - w + 1 } ^ { k } \left \| \rho ^ { ( k - j ) } \left ( y _ { j } - \mathbf A _ { k } ^ { c } \mathbf x _ { j } - \mathbf B _ { k } ^ { c } \gamma _ { j } \right ) \right \| ^ { 2 },$$

is minimized, where ρ ∈ (0 , 1] is a discounting factor.

Let G ∗ k = [ A c ∗ k B c ∗ k ] , and x c ∗ j = [ x ∗ j γ ∗ j ] . Then, the linear model (10) can be written as

$$x _ { k + 1 } ^ { c } = G _ { k } x _ { k } ^ { c },$$

and the cost function (11) can be equivalently written as

$$J ^ { c } ( G _ { k } ) = \sum _ { j = k - w + 1 } ^ { k } \left \| \rho ^ { ( k - j ) } \left ( y _ { j } - G _ { k } x _ { j } ^ { c } \right ) \right \| ^ { 2 }.$$

Online DMD approach [35] also minimizes the cost functions (8) and (11), and computes the time-varying DMD and DMDc operators. In addition to the computation of these operators, the computational techniques developed in this paper also enable efficient computation of (i) the associated DMD eigenvalues and modes, and (ii) the linear time-varying systems that approximate the low-dimensional dynamics underlying (6) and (9), respectively.

## 2.4 Block Computation of Time-varying DMD and DMDc

We refer to a computation that requires all the data until the sampling time t k to compute the desired solution at time t k as a block computation. In contrast, an incremental computation uses only the data at time t k and the solution at time t k -1 to compute the desired solution.

In this section, we describe block computation for time-varying DMD and DMDc in Lemma 1 and 2, respectively. These lemmas are immediate consequence of least square solutions of a linear system of equations [22, Section 5.13] and we omit their proofs. We will use these block computations to derive the incremental computations later in the paper.

Lemma 1. Consider a sequence of ( w + 1) measurements { x k -w +1 , . . . , x k +1 } at sampling time t k +1 that is arranged in the following two matrices

$$\mathbf X _ { k } \ & = \left [ \rho ^ { k } \mathbf x _ { k - w + 1 } \ \rho ^ { k - 1 } \mathbf x _ { k - w + 2 } \ \cdots \ \mathbf x _ { k } \right ], \\ \mathbf Y _ { k } \ & = \left [ \rho ^ { k } \mathbf y _ { k - w + 1 } \ \rho ^ { k - 1 } \mathbf y _ { k - w + 2 } \ \cdots \ \mathbf y _ { k } \right ],$$

where x j ∈ R n , for each j ∈ { k -w +1 , · · · , k +1 } , and y j = x j +1 . Then, the following statements hold for the cost function (8)

- (i). if Ker X ∗ k is trivial, then the unique minimizer of (8) is

$$A _ { k } = Y _ { k } X _ { k } ^ { * } ( X _ { k } X _ { k } ^ { * } ) ^ { - 1 } = Y _ { k } V _ { x _ { k } } \Sigma _ { x _ { k } } ^ { - 1 } U _ { x _ { k } } ^ { * },$$

where U x k ∈ C n × n is a unitary matrix, Σ x k = diag { σ , . . . , σ 1 n } ∈ C n × n , V x k ∈ C k × n has orthonormal columns, and are defined by the reduced SVD of X k = U x k Σ x k V ∗ x k .

- (ii). if Ker X ∗ k is non-trivial, then there exists infinitely many minimizers of (8) , and the unique minimizer with the smallest induced two-norm is

$$\bar { \mathbf A } _ { k } & = \mathbf Y _ { k } \bar { \mathbf V } _ { x _ { k } } \bar { \Sigma } _ { x _ { k } } ^ { - 1 } \bar { \mathbf U } _ { x _ { k } } ^ { * },$$

where ¯ U x k ∈ C n × r , ¯ Σ x k = diag { σ , . . . , σ 1 r } ∈ C r × r , ¯ V x k ∈ C k × r , and r = n -dim ( Ker X ∗ k ) , are defined by the reduced SVD of X k ≈ ¯ U x k ¯ Σ x k ¯ V ∗ x k .

Lemma 2. Consider two sequences of ( w +1) measurements { x k -w +1 , . . . , x k +1 } , and { γ k -w +1 , · · · , γ k +1 } at sampling time t k +1 that are arranged in the following two matrices

$$\mathbf X _ { k } ^ { c } \ = & \left [ \rho ^ { k } \mathbf x _ { k - w + 1 } ^ { c } \ \rho ^ { k - 1 } \mathbf x _ { k - w + 2 } ^ { c } \ \cdots \ \mathbf x _ { k } ^ { c } \right ] \in \mathbb { R } ^ { ( n + l ) \times w }, \\ \mathbf Y _ { k } \quad & = \left [ \rho ^ { k } \mathbf y _ { k - w + 1 } \ \rho ^ { k - 1 } \mathbf y _ { k - w + 2 } \ \cdots \ \mathbf y _ { k } \right ] \in \mathbb { R } ^ { n \times w },$$

where y j = x j +1 , x c ∗ j = [ x ∗ j γ ∗ j ] ∈ R ( n + ) l . Then the following statements hold for the cost function in (13)

- (i). if Ker X c ∗ k is trivial, then the unique minimizer of (11) is

$$G _ { k } = Y _ { k } X _ { k } ^ { c * } ( X _ { k } ^ { c } X _ { k } ^ { c * } ) ^ { - 1 } = Y _ { k } V _ { x _ { k } } ^ { c } ( \Sigma _ { x _ { k } } ^ { c } ) ^ { - 1 } U _ { x _ { k } } ^ { c * },$$

where U c x k ∈ C ( n + ) l × ( n + ) l is a unitary matrix, Σ c x k = diag { σ , . . . , σ 1 n + l } ∈ C ( n + ) l × ( n + ) l , V c x k ∈ C k × ( n + ) l has orthonormal columns, and are defined by the reduced SVD of X c k = U c x k Σ c x k V c ∗ x k .

- (ii). if Ker X ∗ k is non-trivial, then there exists infinitely many minimizers of (11) , and the unique minimizer with the smallest induced two-norm is

$$\bar { G } _ { k } = \mathbf Y _ { k } ^ { c } \bar { \mathbf V } _ { x _ { k } } ^ { c } ( \bar { \mathbf \Sigma } _ { x _ { k } } ^ { c } ) ^ { - 1 } \bar { \mathbf U } _ { x _ { k } } ^ { c * }$$

where ¯ U c x k ∈ C ( n + ) l × r , ¯ Σ c x k = diag { σ , . . . , σ 1 r } ∈ C r × r , ¯ V c x k ∈ C k × r , and r = ( n + ) l -dim ( Ker X c ∗ k ) , are defined by the reduced SVD of X c k ≈ ¯ U c x k ¯ Σ c x k ¯ V c ∗ x k .

Note that using the partitioned form of U c ∗ k = [ U c a ∗ k U c b ∗ k ] , where U c a k ∈ C n × r and U c b k ∈ C l × r , the matrices ¯ A c k and ¯ B c k associated with (19) can be obtained as follows

$$\bar { A } _ { k } ^ { c } = Y _ { k } \bar { V } _ { x _ { k } } ^ { c } ( \bar { \Sigma } _ { x _ { k } } ^ { c } ) ^ { - 1 } \bar { U } _ { x _ { k } } ^ { c _ { k } * }, \bar { B } _ { k } ^ { c } = Y _ { k } \bar { V } _ { x _ { k } } ^ { c } ( \bar { \Sigma } _ { x _ { k } } ^ { c } ) ^ { - 1 } \bar { U } _ { x _ { k } } ^ { c _ { k } * }.$$

Similar to the online DMD [35], we focus on two special cases of the cost functions (8) and (13), namely, the weighted cost functions and the windowed cost functions. The weighted cost functions consider a gradual elimination for the old measurements by assigning the discounting factor to be ρ ∈ (0 1) and consider all the available data, i.e., they select , w = k . The windowed cost functions consider a sharp cut-off window and use a non-discounted window of recent measurements, i.e., they select ρ = 1 and w &lt; k . In the remainder of the paper, we will refer to the DMD and the DMDc operators/matrices obtained using the weighted (resp., windowed) cost functions by the weighted (resp., windowed) DMD and DMDc operator/matrices and denote them by A ρ k (resp., A w k ) and ( A ρ c k , B ρ c k ) (resp., ( A w c k , B w c k )), respectively.

## 3 Background on Incremental SVD Algorithms

At the heart of the DMD framework is the utilization of the SVD to identify an invariant subspace for the low-dimensional dynamics underlying the high-dimensional data. The techniques proposed in this paper for the computation of the time-varying DMD operator require access to the SVD of certain time-varying data matrix at each time. For efficient computation of these SVDs, we resort to incremental SVD techniques proposed in [1, 2, 26]. In this section, we present these incremental SVD techniques. The presentation below is adapted from [1] in order to facilitate better exposition in Section 4.

## 3.1 Weighted Incremental SVD Algorithm

Consider a weighted dataset

$$\mathbf X _ { k } = \left [ \rho ^ { k - 1 } \mathbf x _ { 1 } \ \rho ^ { k - 2 } \mathbf x _ { 2 } \ \cdots \ \mathbf x _ { k } \right ],$$

where 0 ≤ ρ ≤ 1 is a scalar discounting factor and k ≥ n . Given an additional datum x k +1 , let

$$\mathbf X _ { k + 1 } = \left [ \rho ^ { k } \mathbf x _ { 1 } \ \rho ^ { k - 1 } \mathbf x _ { 2 } \ \cdots \ \rho \mathbf x _ { k } \ \mathbf x _ { k + 1 } \right ] = \left [ \rho \mathbf X _ { k } \ \mathbf x _ { k + 1 } \right ],$$

be the incremented dataset. Provided that the SVD of X k is known, the SVD of X k +1 can be incrementally computed using the following proposition, which is proved in Appendix A.

Proposition 1. Let at sampling time t k the SVD of the dataset in (21) be defined by X k = U x k Σ x k V ∗ x k , where U x k ∈ C n × n is a unitary matrix, V x k ∈ C k × n has orthonormal columns, and Σ x k = diag { σ , . . . , σ 1 n } ∈ C n × n is a diagonal matrix. Assume that at sampling time t k +1 , a new datum x k +1 is accessed. Then, the SVD for the dataset in (22) , defined by X k +1 = U x k +1 Σ x k +1 V ∗ x k +1 , is given by :

$$\mathbf U _ { x _ { k + 1 } } = \mathbf U _ { x _ { k } } \mathbf U _ { s _ { k } }, \ \Sigma _ { k + 1 } = \rho \Sigma _ { s _ { k } }, \ a n d \, \mathbf V _ { x _ { k + 1 } } = \begin{bmatrix} \mathbf V _ { x _ { k } } \mathbf V _ { s _ { k, 1 } } \\ \mathbf V _ { s _ { k, 2 } } \end{bmatrix},$$

where U s k , Σ s k , and V s k = [ V s k, 1 v s k, 2 ] , with v s k, 2 ∈ C 1 × n , are defined by the following SVD

$$\mathbf S _ { k } \stackrel { \triangle } { = } \left [ \mathbf \Sigma _ { x _ { k } } \ \rho ^ { - 1 } \mathbf U _ { x _ { k } } ^ { * } \mathbf x _ { k + 1 } \right ] = \mathbf U _ { s _ { k } } \mathbf \Sigma _ { s _ { k } } \mathbf V _ { s _ { k } } ^ { * }.$$

The above incremental SVD computation requires the computation of the SVD of matrix S k ∈ C n × ( n +1) . The size of this matrix is smaller than the size of dataset X k +1 and it has the so-called broken arrow structure which enables efficient computation of its SVD [6, 11, 14].

## 3.2 Windowed Incremental SVD Algorithm

Consider a windowed dataset

$$\chi _ { k } = \left [ \mathbf x _ { k - w + 1 } \ \mathbf x _ { k - w + 2 } \ \cdots \ \mathbf x _ { k } \right ] \in \mathbb { R } ^ { n \times w },$$

where n is the dimension of measurements and w is the length of the time-window of the desired measurements. Define q as follows

$$q \stackrel { \vartriangle } { = } \begin{cases} n, & \text{if $n<w$,} \\ w, & \text{otherwise.} \end{cases}$$

Consider another dataset

$$\chi _ { k + 1 } = \left [ x _ { k - w + 2 } \ \ x _ { k - w + 3 } \ \cdots \ \ x _ { k + 1 } \right ].$$

Then, the incremental SVD computes the SVD of χ k +1 = U χ k +1 Σ χ k +1 V ∗ χ k +1 as follows. First, it eliminates x k -w +1 from the dataset to obtain decremented dataset and the associated SVD

$$\acute { \chi } _ { k } = \left [ \mathbf x _ { k$$

Then, it increments ´ χ k with x k +1 to obtain ´ χ k +1 and the associated SVD. The SVD of the dataset ´ χ k can be incrementally computed using the following proposition, which is proved in Appendix B.

Proposition 2. Let at sampling time t k , the SVD of the dataset in (24) be defined by χ k = U χ k Σ χ k V ∗ χ k , where U χ k ∈ C n × q , Σ χ k = [ diag { σ , . . . , σ 1 q } 0 q × ( w -q ) ] ∈ C q × w , and V χ k ∈ C w × w is a unitary matrix. Then, the SVD of the dataset in (27) defined as ´ χ k = U ´ χ k Σ ´ χ k V ∗ ´ χ k , is given by :

$$\mathbf U _ { \acute { x } _ { k } } = \mathbf U$$

where U ´ s k , V ´ s k , and Σ ´ s k are defined by the following SVD

$$\acute { S } _ { k } \stackrel { \triangle } { = } \$$

and V χ k, 2 is the submatrix of V χ k obtained after removing its first row.

In the incremental step, the new datum x k +1 is appended to ´ χ k and the SVD of the resulting matrix χ k +1 can be obtained using the procedure presented in Section 3.1. In particular, let ˆ S k glyph[defines] [ Σ ´ χ k U ∗ ´ χ k x k +1 ] = U Σ V ˆ s k ˆ s k ∗ ˆ s k , and using equation (23), the SVD of χ k +1 = U χ k +1 Σ χ k +1 V ∗ χ k +1 is

$$\begin{array} {$$

The windowed incremental SVD computation requires the computation of the SVD of ´ S k ∈ R q × w . In general, ´ S k may not possess any special structure. However, if n glyph[greatermuch] w , in which case q = w , the above incremental update maybe a lot cheaper than the computation of the SVD of an n × w matrix. Also, in this context, the above procedure helps in term of storage as it does not require the large matrix χ k +1 to be stored and uses only the first and last column of this matrix along with the SVD at the previous iteration.

## 4 Incremental DMD Algorithms

In this section, we present two algorithms, namely weighted incremental DMD and windowed incremental DMD, respectively, for incremental computation of a time-varying lower-dimensional DMD operator. Similar to the existing approaches in the literature, the proposed algorithms perform incremental computations either by assigning decaying weights to the received data [16, 35], or by using a sliding window of the received data [10, 20, 35]. The recursive updates derived in this section are similar to those in sequential least square method [16, Appendix 8C], recursive least square method [15, Section 9.4], as well as online DMD [35].

## 4.1 Weighted Incremental DMD Algorithm

In this algorithm, the time-varying DMD operator is estimated by assigning a decaying weight to past measurements in order to gradually discount their representation as newer measurements become available. Assume that at sampling time t k +1 , we have access to the following weighted datasets:

$$\mathbf X _ { k } = \left [ \rho ^ { k - 1 } \$$

where y k = x k +1 , for each k ∈ N . Assume that at sampling time t k +2 , the datasets in (30) are updated with a pair of measurements ( x k +1 , y k +1 ) such that

$$\begin{array} {$$

Suppose that at sampling time t k +1 , the DMD operator A ρ k and the SVD of X k are known, then at sampling time t k +2 , the DMD operator can be updated with the new pair of measurements ( x k +1 , y k +1 ) using the following theorem, which is proved in Appendix C.

Theorem 1. Let at sampling time t k +1 the SVD of X k = U x k Σ x k V ∗ x k be known, and let the DMD operator A ρ k ∈ R n × n minimize the cost function in (8) with Y k and X k given in (30) . Assume that at sampling time t k +2 , a new pair of measurements ( x k +1 , y k +1 ) is used to incrementally compute the SVD of X k +1 using Proposition 1. Then, the DMD operator A ρ k +1 ∈ R n × n which minimizes the cost function in (8) is

$$A ^ { \rho } _ { k + 1 } = A ^ { \rho } _$$

If X k +1 is well-approximated by its projection onto its leading r singular vectors given by ¯ X k +1 = ¯ U x k +1 ¯ Σ x k +1 ¯ V ∗ x k +1 , then the DMD operator update in (32) takes the form

$$\bar { A } ^ { \rho } _ { k + 1 } = \bar { A$$

Moreover, the DMD operator ¯ A ρ k +1 ∈ R n × n can be projected onto a subspace spanned by the leading r left singular vectors of X k +1 to obtain a lower-dimensional DMD operator ˜ A ρ k +1 ∈ R r × r given by

$$\tilde { A } _ { k + 1 } ^ { \rho } = \bar {$$

The update in equation (32) requires only the current DMD operator, measurement pair ( x k +1 , y k +1 ), and the incremental SVD update. Specifically, these updates do not require the data matrix to be stored.

## 4.2 Windowed Incremental DMD Algorithm

We now focus on windowed incremental DMD algorithm in which a sliding-window of w most recent measurements is used to estimate the time-varying DMD operator. Assume that we have access to the following windowed datasets at sampling time t k +1 :

$$\chi _ { k } = \left [ x _ { k - w + 1 } \ \cd$$

Accordingly, at sampling time t k +2 , we have access to

$$\chi _ { k + 1 } = \left [ x _ { k - w + 2 } \ \cdots \ x _ { k + 1 } \right ], \ \text{ and } \ \Upsilon _ { k + 1 } = \left [ y _ { k - w + 2 } \ \cdots \ y _ { k + 1 } \right ].$$

Suppose that at sampling time t k +1 , the DMD operator A w k and the SVD of χ k are known, then at sampling time t k +2 , the DMD operator can be updated with the new pair of measurements ( x k +1 , y k +1 ) using the following theorem, which is proved in Appendix D.

Theorem 2. Let at sampling time t k +1 the SVD of χ k = U χ k Σ χ k V ∗ χ k be known, and let the DMD operator A w k ∈ R n × n minimize the cost function in (8) with Υ k and χ k given in (35) . Assume that at sampling time t k +2 , a new pair of measurements ( x k +1 , y k +1 ) is used to incrementally compute the SVD of χ k +1 using Proposition 2 and equation (29) . Then, the DMD operator A w k +1 ∈ R n × n which minimizes the cost function in (8) is

$$A _ { k + 1 } ^ { w } = A _ { k } ^ { w } + ( y _ { k + 1 } - A _ { k } ^ { w } x _ { k + 1 } ) \, \mathbf v _ { \hat { s } _ { k, 2 } } \Sigma _ { \chi _ { k + 1 } } ^ { - 1 } \mathbf U _ { \chi _ { k + 1 } } ^ { * }.$$

If χ k +1 is well-approximated by its projection onto its leading r singular vectors given by ¯ χ k +1 = ¯ U χ k +1 ¯ Σ χ k +1 ¯ V ∗ χ k +1 , then the DMD operator takes the form

$$\bar { A } _ { k + 1 } ^ { w } = \bar { A } _ { k } ^ { w } + \left ( y _ { k + 1 } - \bar { A } _ { k } ^ { w } x _ { k + 1 } \right ) \bar { v } _ { \hat { s } _ { k, 2 } } \bar { \Sigma } _ { \chi _ { k + 1 } } ^ { - 1 } \bar { U } _ { \chi _ { k + 1 } } ^ { * }.$$

Moreover, the DMD operator ¯ A w k +1 ∈ R n × n can be projected onto a subspace spanned by the leading r left singular vectors of χ k +1 to obtain a lower-dimensional DMD operator ˜ A w k +1 ∈ R r × r given by

$$\tilde { A } _ { k + 1 } ^ { w } & = \bar { U } _ { \chi _ { k + 1 } } ^ { * } \bar { A } _ { k + 1 } ^ { w } \bar { U } _ { \chi _ { k + 1 } } \\ & = \bar { U } _ { \chi _ { k + 1 } } ^ { * } \bar { A } _ { k } ^ { w } \bar { U } _ { \chi _ { k + 1 } } + \bar { U } _ { \chi _ { k + 1 } } ^ { * } \left ( y _ { k + 1 } - \bar { A } _ { k } ^ { w } x _ { k + 1 } \right ) \bar { v } _ { \hat { s } _ { k, 2 } } \bar { \Sigma } _ { \chi _ { k + 1 } } ^ { - 1 }.$$

Similar to the weighted incremental DMD, the update in equation (37) requires only the current DMD operator, measurement pair ( x k +1 , y k +1 ), and the windowed incremental SVD update.

For a fixed dimension r of the reduced order system, the computational complexity of rank one incremental SVD update is O ( nr + r 3 ) [2, Section 4.3]. In comparison, computational complexities of each iteration in the streaming DMD and the online DMD are O ( nr 2 ) and O ( n 2 ), respectively. When data matrices are non-singular, both online and incremental DMD approaches can be used to compute time-varying DMD operators. In such cases, if a reduced order DMD operator of dimension r is of interest, then the proposed incremental DMD approach has a better computational complexity, when r &lt; n 2 3 / .

## 5 Dynamic Mode Decomposition for Error-Related Potentials in EEG data

Error Related Potentials (ErrPs) are slow cortical potentials seen in the EEG signal of human subjects that are elicited by an unexpected (erroneous) outcome. For example, within the context of human-machine interaction, such signals are observed when the machine takes an unexpected action [4, 5, 9]. In this section, we illustrate the efficacy of the proposed DMD algorithms on EEG recordings taken from Monitoring Error-Related Potentials database [4, 5]. These EEG recordings

were collected from six subjects while they were observing the movement of a cursor between two labeled targets on a screen. The subjects had no control on the motion of the cursor. However, they had a priori knowledge about the intended directions of movement. The cursor movements were set to elicit ErrPs by generating two types of events, namely, correct events and erroneous events. The correct events correspond to the cursor movement in the intended direction, while the erroneous events correspond to the cursor movement in any unintended direction. EEG signals were recorded at sampling rate of 512 Hz, using Biosemi ActiveTwo system with 64 electrodes distributed according to the standard 10 / 20 international system as it is shown in Figure 1.

Fig. 1: Topographical view for EEG channels with the channel FCz, where the ErrPs can be characterized, marked in red bold font

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-e5c7086a-2dd3-454c-8ba4-9a4443ff0cb1.jpg)

A two step standard EEG preprocessing for ErrPs which consists of Common Average Reference (CAR) filtering, and then (1 -10) Hz Band Pass (BP) filtering is performed on the data. Segments of EEG signals, from all the participants, corresponding to the correct and erroneous events were extracted into two separate groups. Then, the segments within each group were averaged to obtain a signal each for the correct and erroneous events. Finally, the ErrPs are calculated by subtracting the signal for correct event from the signal for the erroneous event. Figure 2 shows the ERP signals and topographical views corresponding to the correct and erroneous events, and the calculated ErrPs. EEGLAB was used for the processing of EEG signals and generating the topographical views for the related brain activities [8]. Note that for consistency with the literature, we investigate the averaged ERP signal. However, the confidence regions around the averaged signal shown in Figure 2 reveal that despite the variability in these signals, the key features are also seen in the signal associated with a single event. Thus, the following analysis can be performed on a single subject real time data as well.

As reported in [4, 5], the ErrPs are characterized by a sequence of three peaks/troughs after the onset of the event in the EEG signal measured at channel FCz (see Figure 1). A sample ErrP is shown in Figure 2c where the first small positive peak is observed at 200 ms, followed by a negative trough at 260 ms, and finally a larger positive peak at 330 ms.

Two observations can be made by comparing the temporal behavior and the topographical views during the correct and erroneous events in Figures 2a and 2b, respectively. First, the ERP signal

during the correct event tends to have broader peaks in comparison with the ERP signal during erroneous events, which indicates that it has slower dynamics, i.e., has smaller growth or decay rates. Second, by comparing the topographical views during the three characterizing peaks at FCz channel, it can be noticed that the ERP peaks during erroneous events have higher amplitudes than the peaks during correct events in both negative and positive directions. Note that the colormap bar values are different for the topographical views for the correct ERP, the erroneous ERP, and the ErrP in Figure 2.

Fig. 2: The average response to an event at t = 0: the mean ERP (confidence level = 95%) at the FCz channel (left panel) and the topographical view for brain activity across all channels (right panel). The top and middle panels show the patterns during the correct event and the erroneous event, respectively. The bottom panel shows that ErrP obtained by subtracting the signal associated with the correct event from that of the erroneous event. The topographical views are shown at the three characterizing peaks that occur at 200 msec, 260 msec, and 360 msec, respectively.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-ca8fbbc4-2c5d-4913-af7e-8bd89a86e2d6.jpg)

As shown in Figure 2, the EEG patterns show coherent activities within the brain suggesting the possibility of a low-dimensional dynamics underlying this high dimensional data. Furthermore, these patterns change significantly with time and can possibly be better explained using a time-varying underlying model. To investigate these hypotheses, we apply the incremental DMD algorithms to the EEG recordings corresponding to correct and erroneous events. The weighted incremental DMD algorithm is applied with discounting factors ρ = { 0 1 . , 0 2 . , 0 4 . , 0 8 . } , and the windowed incremental DMD algorithm with a time-window of width w = 512 samples. All singular values greater than σ thr = { 0 01 . , 0 001 . } are used for computing the reduced order DMD operator. An initial window of 512 samples before the event occurrence is used to initialized the DMD models

for both algorithms.

We compare the proposed algorithms with the online DMD approach proposed in [35]. To this end, we use the same parameters (discounting factor and width of time-window) in the online DMD algorithms as the incremental DMD algorithms. Recall that the online DMD algorithms rely on the Sherman-Morrison identity to compute the DMD operator and do not have access to the (time-varying) singular values of the data matrix and hence, the reduction of the DMD operator to leading singular vectors does not apply to online DMD algorithms.

In order to compute the time-varying DMD operator, we first compute a standard DMD operator using EEG data from a one-second window (512 samples) just before the correct or erroneous event. Subsequently, the EEG measurements are streamed with a rate of 1 sample / iteration to update the initial DMD operator. At each iteration, both weighted and windowed versions of the incremental DMDandonline DMD algorithms are used to predict 64 future samples of the EEG signal at channel FCz. We compare the performance of these algorithms using normalized Root Mean Square (RMS) prediction error, denoted as e nrms ( k ) at each t k ∈ { 0 , · · · , 0 6 . } using the following formula:

$$e _ { n r m s } ( k ) = \frac { \sqrt { \frac { 1 } { 6 4 } \sum _ { i = k + 1 } ^ { k + 6 4 } ( \hat { y } _ { i } - y _ { i } ) ^ { 2 } } } { \bar { y } _ { k } - \underline { y } _ { k } },$$

where ˆ y i and y i are the estimated and recorded values, respectively, y k = max k +1 ≤ ≤ i k +64 y i , and y k = min y i .

## k +1 ≤ ≤ i k +64

Figure 3 shows the mean of the normalized RMS prediction error computed over all iterations as well as the associated 95% confidence sets for weighted and windowed incremental DMD algorithms and different choices of parameters. The performance of the incremental DMD does not appear to vary much with the weighting factor and the two choices of the threshold on singular values. The performance of the windowed incremental DMD algorithm is similar to the weighted incremental DMD. However, incremental DMD algorithms seem to outperform online DMD algorithms. This suggests that having a small threshold σ thr is more beneficial than having no threshold as in the case of online DMD algorithms. Figure 13 in Appendix E presents the evolution of the normalized RMS prediction error for each event.

In order to gain further insight into the influence of different thresholds σ thr and weighting factors ρ , we investigate how accurately the incremental DMD predicts the signature ERPs at channel FCz. To this end, we updated the initial DMD operator using incremental DMD algorithms until the first peak at 200 msec. We then used the updated lower-dimensional DMD operator to predict the future ERP until the third peak at 330 msec. The predicted signal and the associated normalized RMS are shown in Figures 4 and 5, respectively. For the erroneous event, the predicted signal from incremental DMD algorithms capture the trend of the original signal, while for the correct event, most incremental DMD algorithms fail to capture the final dip in the original signal. The only exception is the windowed incremental DMD with σ thr = 0 001. . For σ thr = 0 01, the . number of DMD modes used by the incremental DMD algorithms range from 26 to 31 for correct events and 28 to 32 for erroneous events. Similarly, for σ thr = 0 001, the number of DMD modes used . by the incremental DMD algorithms range from 26 to 31 for correct events and 28 to 33 for erroneous events. In comparison, the predicted signal from the online DMD algorithms performs poorly. The key reason for this poor performance, is that the data matrix obtained after prepossessing is not full rank even if all the measurements are included. Thus, the Sherman-Morrison update cannot be applied in the standard form. Recall that the online DMD algorithm starts by initializing the

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-12eb67f3-b395-40b2-ba1d-5ddb695b571b.jpg)

(a) Correct Event

Fig. 3: The mean of the normalized RMS prediction error computed over all iterations as well as the associated 95% confidence sets for (a) correct events and (b) erroneous events.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-0914924b-bf15-4dbe-b98a-46b942214196.jpg)

DMD operator A k and the inverse of covariance matrix P k = ( X X k T k ) -1 . For initialization of online DMD algorithms, we adopted the suggestion in [35]: in the event that X X k T k is not full rank, A k can be initialized by an n × n zero matrix, and P k can be initialized by P init = α I where α is a large positive scalar.

During the correct events, there appears to be an interplay between the threshold σ thr and weighting factor ρ . As shown in Figure 5 for correct events, the normalized RMS decreases with decreasing the weighting factor until ρ = 0 2 and increases with further decrease in . ρ . For ρ = 0 2, . the higher dimension of the reduced system ( σ thr = 0 001) leads to higher prediction error compared . with the lower dimension reduced system ( σ thr = 0 01). . This suggests that for a weighting factor that leads to the smallest prediction error, including too many modes is not beneficial for prediction performance, since it leads to over-fitting. A similar interplay is not seen for the erroneous event in Figure 5. However, if we choose a smaller initial window to initialize the DMD model, we observe similar effects as shown in Figure 14 in Appendix F. Similar effects are observed for the windowed DMD as shown in Figure 15 in Appendix F.

To further compare the online DMD with the incremental DMD, we took the raw EEG data, i.e., data without any preprocessing (CAR and BP filtering). In this case, the data matrix is wellconditioned and the Sherman-Morrison identity is well defined. The performance of online DMD and the incremental DMD in terms of predicting future signal is shown in Figure 6. In this case, both incremental and online DMD algorithms have similar poor performance. This suggests that the difference in the performance of these algorithms is primarily due to ill-conditioned dataset. This also highlights the utility of applying appropriate band-pass filtering to the raw EEG data. Without such filtering, the key activities seem to be lost in the background noise resulting in a poor prediction performance.

Topographical views for the real part of the four dominant DMD modes at 200 msec obtained from the incremental DMD algorithms for the correct and erroneous events are shown in Figure 7 and Figure 8, respectively. A comparison between the DMD modes during the erroneous and

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-53a070e6-2bfa-497e-97aa-b4fda4273c61.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-97b8c70e-a397-490d-a6e0-3a292abe4825.jpg)

(a) Correct event

Fig. 4: Predicted ERP signal at channel FCz using incremental DMD with σ thr = 0 01 (left panel), incremental DMD . with σ thr = 0 001 (middle panel), and online DMD (right panel) for (a) correct event, and (b) erroneous event. .

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-ca250a0d-0c30-47a8-ad42-5ef9a24e5cbe.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-6613a273-b95f-461b-b789-2948106ca722.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-7b64acb8-a94b-49eb-a7a5-8ce1d5b3ffd6.jpg)

correct events shows that there is a stronger activity in the frontal lobe during the erroneous events especially around the FCz channel. This is consistent with the topographical views from EEG recordings shown in Figures 2a and 2b that show stronger activity in the frontal lobe during an erroneous event. This illustrates that a few principal DMD modes are able to capture the dominant activity in the brain during these experiments.

Figure 9 shows the logarithm of eigenvalues of the DMD operator at 200 msec associated with different thresholds σ thr , weight factor ρ and time-window width. For smaller value of σ thr , the range of eigenvalues in the left half plane is bigger. This is consistent with the fact that smaller σ thr implies a larger reduced order model in which some states converge to zero much faster than other states. For the erroneous event, some eigenvalues are spread in the right half plane, which suggest a locally unstable dynamics underlie the evolution of ERP signal during erroneous trials. This is also consistent with the faster dynamics (sharper peaks) in the EEG signal during the erroneous event (see Figure 2).

We now investigate the effectiveness of the incremental DMD algorithms in terms of reconstructing the ERP signals during the correct and erroneous events at FCz channel. To this end, we reconstruct the signal starting from the onset of the events until the end of the third peak at 330 msec. The reconstructed signals and the normalized RMS error for the reconstruction are shown in Figures 10 and 11, respectively. These results indicate that the incremental DMD models incur smaller reconstruction error than the online DMD models. This result is counter-intuitive, since online DMD uses more modes and should lead to smaller reconstruction error. This discrepancy happens due to the fact that the data matrix never achieves full rank and the online DMD is not

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-1b9b9823-f757-443e-88f0-67b43128d7fa.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-b373c2fd-8482-43f1-9256-e7e36b568af2.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-c63abbeb-f815-460c-a23a-f1cceeaf5beb.jpg)

(a) Incremental DMD

Correct Event

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-bb2e5040-780b-494c-858d-b1a8360d2c88.jpg)

(b) Online DMD

Fig. 5: Normalized RMS error for the predicted ERP signal at channel FCz for correct events (left panel) and erroneous events (right panel), using (a) incremental DMD, and (b) online DMD.

able to overcome the heuristic initialization discussed above. There is no significant difference in the reconstruction error for incremental DMD models with different ρ and σ thr values as shown in Figure 10a.

Finally, we summarize the above investigation into the utility of incremental and online DMD in modeling EEG data. It appears that the pre-processing of the EEG data that requires domainspecific knowledge such as the band of frequency in which the event of interest is observed is vital to obtain sensible DMD-based data-driven models. However, after such pre-processing, the data matrix may become ill-conditioned and under such scenarios incremental DMD techniques proposed in this paper appear more promising that the online DMD techniques. There exists a trade-off between the threshold on the singular values used for model reduction and the windowwidth or the discount factor used in the incremental DMD algorithms. We also observed that the principal DMD modes are consistent with the activity in the brain during the studied experiments. This suggests that the incremental DMD algorithms can compute an efficient basis for describing the evolution of the EEG activity. Finally, we observed that under erroneous events, some DMD

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-e1c29e75-cb76-4165-a66c-e6a62db56a0e.jpg)

(b) erroneous events

Fig. 6: The predicted ERP signal at channel FCz based on well conditioned EEG datasets using incremental DMD model (left panel) and online DMD model (right panel) during (a) correct events and (b) erroneous events.

eigenvalues moved towards the right-half complex plane suggesting that certain events trigger (small time) unstable dynamics.

## 6 Incremental Dynamic Mode Decomposition for Systems with Control Input

In this section, we extended the incremental DMD algorithms to the case of non-autonomous dynamical systems. We first recall the Dynamic Mode Decomposition with Control (DMDc) algorithm proposed in [27] that estimates time-invariant non-autonomous system dynamics underlying high-dimensional data.

For the scenarios in which the non-autonomous system underlying the measurements is timevarying, the DMDc algorithm has been extended to the online DMDc algorithm [35]. The online DMDc algorithm operates similarly to the online DMD algorithm and yields time-varying matrices A c k ∈ R n × n and B c k ∈ R n × l , k ∈ { 1 2 , , · · · } . Similar to the online DMD algorithm, the DMDc algo-

Fig. 7: Topographical views for the real part part of the 4 dominant DMD modes during correct events using threshold values of (a) σ thr = 0 01, and (b) . σ thr = 0 001. .

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-eaf2c4c6-4519-4860-9a82-201267596576.jpg)

rithm also does not allow for incremental computation of the lower dimensional non-autonomous system underlying high dimensional measurements. In the following, we extend the DMDc algorithm to the weighted and windowed incremental DMDc algorithms that enable us to obtain a lower-dimensional time-varying approximation for the underlying dynamics.

Fig. 8: Topographical views for the real part of the 4 dominant DMD modes during erroneous events using threshold values of (a) σ thr = 0 01, and (b) . σ thr = 0 001. .

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-e5aad94a-f86d-47a2-973d-c7aa17b7c4e0.jpg)

## 6.1 Weighted Incremental DMDc Algorithm

Assume that at sampling time t k +1 , the measurements and the associated exogeneous inputs are arranged in the following datasets

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-178e8ffd-99f7-4213-b175-626f654bfeb6.jpg)

(b) Erroneous events

Fig. 9: The left panel show the continuous time DMD eigenvalues for σ thr = 0 01 and the right panel shows the . continuous time DMD eigenvalues for σ thr = 0 001 during (a) correct events (b) erroneous events .

$$\mathbf X _ { k } & = \left [ \rho ^ { k - 1 } \mathbf x _ { 1 } \quad \rho ^ { k - 2 } \mathbf x _ { 2 } \ \cdots \ \mathbf x _ { k } \right ], \, \mathbf Y _ { k } = \left [ \rho ^ { k - 1 } \mathbf y _ { 1 } \quad \rho ^ { k - 2 } \mathbf y _ { 2 } \ \cdots \ \mathbf y _ { k } \right ] \\ \Gamma _ { k } & = \left [ \rho ^ { k - 1 } \gamma _ { 1 } \quad \rho ^ { k - 2 } \gamma _ { 2 } \ \cdots \ \gamma _ { k } \right ], \, \mathbf X _ { k } ^ { c } = \left [ \mathbf X _ { k } ^ { * } \ \Gamma _ { k } ^ { * } \right ] ^ { * }$$

respectively, where X k , Y k ∈ R n × k , Γ k ∈ R l × k , and X c k ∈ R ( n + ) l × k . At sampling time t k +1 , the datasets are updated with a new set of measurements ( x k +1 , y k +1 , γ k +1 ) which results in the following

$$X _ { k + 1 } & = \left [ \rho X _ { k } \ \ x _ { k + 1 } \right ], \, \mathbf Y _ { k + 1 } = \left [ \rho \mathbf Y _ { k } \ \ y _ { k + 1 } \right ], \\ \Gamma _ { k + 1 } & = \left [ \rho \Gamma _ { k } \ \ \gamma _ { k + 1 } \right ], \, \mathbf X _ { k + 1 } ^ { c } = \left [ \mathbf X _ { k + 1 } ^ { * } \ \ \Gamma _ { k + 1 } ^ { * } \right ] ^ { * }.$$

Suppose that the weighted DMDc operator and input matrix at t k +1 , and the SVD of both X k and X c k are known, then according to the new incoming measurements at t k +2 , the updates for the weighted DMDc operator and input matrix can be obtained using the following theorem, which is proved in Appendix G.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-6cda4fb0-71a9-400b-bb9c-67fe6de8930e.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-b7d3a979-df2e-48d4-852b-26a814d06c83.jpg)

(a) Correct event

Fig. 10: Reconstructed ERP signal at channel FCz using incremental DMD with σ thr = 0 01 (left panel), incremental . DMDwith σ thr = 0 001 (middle panel), and online DMD (right panel) for (a) correct events and (b) erroneous events. .

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-9056d990-8d3d-498e-9aca-c93b4809eba9.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-15916b3b-cbae-43ed-ac02-1f7bdd884606.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-c8beb9bf-7ff1-4646-b0bb-274dc9dc7ba5.jpg)

Theorem 3. Let at sampling time t k +1 the SVD of X c k = U c x k Σ c x k V c ∗ x k and X k = U x k Σ x k V ∗ x k be known. Assume that the pair ( A ρ c k , B ρ c k ) minimizes the cost function in (11) with X k and Γ k defined in (41) . Consider that at sampling time t k +2 , a new triplet of measurements ( x k +1 , y k +1 , γ k +1 ) is used to incrementally compute the SVD of both X c k +1 and X k +1 using Proposition 1. Then, the pair ( A ρ c k +1 , B ρ c k +1 ) which minimizes the cost function in (11) is

$$A ^ { \rho _ { c } } _ { k + 1 } & = A ^ { \rho _ { c } } _ { k } + \left ( y _ { k + 1 } - A ^ { \rho _ { c } } _ { k } x _ { k + 1 } - B ^ { \rho _ { c } } _ { k } \gamma _ { k + 1 } \right ) v ^ { c } _ { s _ { k, 2 } } ( \Sigma ^ { c } _ { x _ { k + 1 } } ) ^ { - 1 } \mathbf U ^ { c _ { a } * } _ { x _ { k + 1 } }, \\ \mathbf B ^ { \rho _ { c } } _ { k + 1 } & = \mathbf B ^ { \rho _ { c } } _ { k } + \left ( y _ { k + 1 } - A ^ { \rho _ { c } } _ { k } x _ { k + 1 } - \mathbf B ^ { \rho _ { c } } _ { k } \gamma _ { k + 1 } \right ) v ^ { c } _ { s _ { k, 2 } } ( \Sigma ^ { c } _ { x _ { k + 1 } } ) ^ { - 1 } \mathbf U ^ { c _ { b } * } _ { x _ { k + 1 } }.$$

Assume that X c k +1 can be well-approximated by its projection onto its leading p singular vectors such that X c k +1 ≈ ¯ X c k +1 = ¯ U c x k +1 ¯ Σ c x k +1 ¯ V c ∗ x k +1 , where ¯ U c x k +1 ∈ C ( n + ) l × p , ¯ Σ c x k +1 ∈ C p × p ,and ¯ V c x k +1 ∈ C ( k +1) × p . Let ¯ U c ∗ x k +1 be partitioned such that ¯ U c ∗ x k +1 = [ ¯ U c a ∗ x k +1 ¯ U c b ∗ x k +1 ], where ¯ U c a x k +1 ∈ C n × p and ¯ U c b x k +1 ∈ C l × p . Then, the update in (43) yields the following updates for ¯ A ρ c k +1 ∈ R n × n and ¯ B ρ c k +1 ∈ R n × l :

$$\bar { \mathbf A } _ { k + 1 } ^ { \rho _ { c } } & = \bar { \mathbf A } _ { k } ^ { \rho _ { c } } + \left ( y _ { k + 1 } - \bar { \mathbf A } _ { k } ^ { \rho _ { c } } \mathbf x _ { k + 1 } - \bar { \mathbf B } _ { k } ^ { \rho _ { c } } \gamma _ { k + 1 } \right ) \bar { \mathbf v } _ { s _ { k, 2 } } ^ { c } ( \bar { \Sigma } _ { x _ { k + 1 } } ^ { c } ) ^ { - 1 } \bar { \mathbf U } _ { x _ { k + 1 } } ^ { c _ { a } * } \\ \bar { \mathbf B } _ { k + 1 } ^ { \rho _ { c } } & = \bar { \mathbf B } _ { k } ^ { \rho _ { c } } + \left ( y _ { k + 1 } - \bar { \mathbf A } _ { k } ^ { \rho _ { c } } \mathbf x _ { k + 1 } - \bar { \mathbf B } _ { k } ^ { \rho _ { c } } \gamma _ { k + 1 } \right ) \bar { \mathbf v } _ { s _ { k, 2 } } ^ { c } ( \bar { \Sigma } _ { x _ { k + 1 } } ^ { c } ) ^ { - 1 } \bar { \mathbf U } _ { x _ { k + 1 } } ^ { c _ { a } * }.$$

Assume that X k +1 is well-approximated by its projection onto its leading r singular vectors such that X k +1 ≈ ¯ X k +1 = ¯ U x k +1 ¯ Σ x k +1 ¯ V ∗ x k +1 with r ≤ p . Then a reduced order model can be represented

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-75b76cfa-7ac1-48c2-b3b1-7c324a7f9adc.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-eac50782-5b36-4cba-a906-eddbb691348d.jpg)

(a) Incremental DMD

Correct Event

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-3ea41adc-bc30-45a7-9d12-2ed5a4b90ae6.jpg)

(b) Online DMD

Fig. 11: Normalized RMS error for the reconstructed ERP signal at channel FCz for correct events (left panel) and erroneous events (right panel), using (a) incremental DMD, and (b) online DMD.

as:

$$\tilde { x } _ { k + 1 } = \tilde { \mathbf A } _ { k } ^ { \rho _ { c } } \tilde { x } _ { k } + \tilde { \mathbf B } _ { k } ^ { \rho _ { c } } \gamma _ { k },$$

where the lower-dimensional approximation ˜ A ρ c k +1 ∈ R r × r and ˜ B ρ c k +1 ∈ R r × l can obtained by projecting ¯ A ρ c k +1 and ¯ B ρ c k +1 onto a subspace spanned by the columns of ¯ U x k +1 as follows:

$$\tilde { A } ^ { \rho _ { c } } _ { k + 1 } & = \bar { U } ^ { * } _ { x _ { k + 1 } } \bar { A } ^ { \rho _ { c } } _ { k } \bar { U } _ { x _ { k + 1 } } + \bar { U } ^ { * } _ { x _ { k + 1 } } \left ( y _ { k + 1 } - \bar { A } ^ { \rho _ { c } } _ { k } x _ { k + 1 } - \bar { B } ^ { \rho _ { c } } _ { k } \gamma _ { k + 1 } \right ) \bar { v } ^ { c } _ { s _ { k, 2 } } ( \bar { \Sigma } ^ { c } _ { x _ { k + 1 } } ) ^ { - 1 } \bar { U } ^ { c _ { c } * } _ { x _ { k + 1 } } \bar { U } _ { x _ { k + 1 } } \\ \tilde { B } ^ { \rho _ { c } } _ { k + 1 } & = \bar { U } ^ { * } _ { x _ { k + 1 } } \tilde { B } ^ { \rho _ { c } } _ { k } + \bar { U } ^ { * } _ { x _ { k + 1 } } \left ( y _ { k + 1 } - \bar { A } ^ { \rho _ { c } } _ { k } x _ { k + 1 } - \bar { B } ^ { \rho _ { c } } _ { k } \gamma _ { k + 1 } \right ) \bar { v } ^ { c } _ { s _ { k, 2 } } ( \bar { \Sigma } ^ { c } _ { x _ { k + 1 } } ) ^ { - 1 } \bar { U } ^ { c _ { c } * } _ { x _ { k + 1 } }.$$

The update in equation (43) requires only the current DMD operator ( A ρ c k , B ρ c k ), measurements set of ( y k +1 , x k +1 , γ k +1 ), and the incremental SVD update. Specifically, these updates do not require the large data matrix to be stored.

## 6.2 Windowed Incremental DMDc Algorithm

Assume that at sampling time t k +1 , the past w states and control input measurements are arranged in the following datasets

$$\chi _ { k } & = \left [ x _ { k - w + 1 } \ \cdots \ x _ { k } \right ], \Upsilon _ { k } = \left [ y _ { k - w + 1 } \ \cdots \ y _ { k } \right ], \\ \Gamma _ { k } & = \left [ \gamma _ { k - w + 1 } \ \cdots \ \gamma _ { k } \right ], \chi _ { k } ^ { c } = \left [ x _ { k } ^ { * } \ \Gamma _ { k } ^ { * } \right ] ^ { * },$$

where χ k , Υ k ∈ R n × w , Γ l ∈ R l × w , and χ c k ∈ R ( n + ) l × w , respectively. At sampling time t k +1 , the datasets are updated by adding a new set of measurements ( x k +1 , y k +1 , γ k +1 ) , and removing the oldest set of measurements ( x k -w +1 , y k -w +1 , γ k -w +1 ) , such that:

$$\chi _ { k + 1 } & = \left [ x _ { k - w + 2 } \ \cdots \ x _ { k + 1 } \right ], \Upsilon _ { k + 1 } = \left [ y _ { k - w + 2 } \ \cdots \ y _ { k + 1 } \right ], \\ \Gamma _ { k + 1 } & = \left [ \gamma _ { k - w + 2 } \ \cdots \ \gamma _ { k + 1 } \right ], \chi _ { k + 1 } ^ { c } = \left [ x _ { k + 1 } ^ { * } \ \Gamma _ { k + 1 } ^ { * } \right ] ^ { * }.$$

Suppose that the windowed DMDc operator and input matrix at t k +1 , and the SVD of both χ k and χ c k are known. Then, according to the new incoming measurements at t k +2 , the updates for the windowed DMDc operator and input matrix can be obtained using the following theorem, which is proved in Appendix H.

Theorem 4. Let at sampling time t k +1 the SVD of χ k = U χ k Σ χ k V ∗ χ k and χ c k = U c χ k Σ c χ k V c ∗ χ k be known, and let the pair ( A w c k , B w c k ) minimize the cost function in (11) with Υ k and χ k given in (44) . Assume that at sampling time t k +2 , a new triplet of measurements ( x k +1 , y k +1 , γ k +1 ) is used to incrementally compute the SVD of χ c k +1 and χ k +1 using Proposition 2 and equation (29) . Then, the pair ( A w c k +1 , B w c k +1 ) which minimizes the cost function in (11) is

$$A _ { k + 1 } ^ { w _ { c } } & = A _ { k } ^ { w _ { c } } + \left ( y _ { k + 1 } - A _ { k } ^ { w _ { c } } \mathbf x _ { k + 1 } - B _ { k } ^ { w _ { c } } \gamma _ { k + 1 } \right ) \mathbf v _ { \hat { s } _ { k, 2 } } ^ { c } ( \Sigma _ { \chi _ { k + 1 } } ^ { c } ) ^ { - 1 } \mathbf U _ { \chi _ { k + 1 } } ^ { c _ { c _ { 0 } } * }, \\ B _ { k + 1 } ^ { w _ { c } } & = B _ { k } ^ { w _ { c } } + \left ( y _ { k + 1 } - A _ { k } ^ { w _ { c } } \mathbf x _ { k + 1 } - B _ { k } ^ { w _ { c } } \gamma _ { k + 1 } \right ) \mathbf v _ { \hat { s } _ { k, 2 } } ^ { c } ( \Sigma _ { \chi _ { k + 1 } } ^ { c } ) ^ { - 1 } \mathbf U _ { \chi _ { k + 1 } } ^ { c _ { c _ { 0 } } * }.$$

If χ c k +1 can be well-approximated by its projection onto its leading p singular vectors such that ¯ χ c k +1 = ¯ U c χ k +1 ¯ Σ c χ k +1 ¯ V c ∗ χ k +1 , where ¯ U c χ k +1 ∈ C ( n + ) l × p , ¯ Σ c χ k +1 ∈ C p × p , and ¯ V c χ k +1 ∈ C w × p , then equation (46) yields the following updates for ¯ A w c k +1 ∈ R n × n and ¯ B w c k +1 ∈ R n × n :

$$\bar { \mathbf A } _ { k + 1 } ^ { w _ { c } } & = \bar { \mathbf A } _ { k } ^ { w _ { c } } + ( y _ { k + 1 } - \bar { \mathbf A } _ { k } ^ { w _ { c } } x _ { k + 1 } - \bar { \mathbf B } _ { k } ^ { w _ { c } } \gamma _ { k + 1 } ) \, \bar { v } _ { \hat { s } _ { k, 2 } } ^ { c } ( \bar { \Sigma } _ { \chi _ { k + 1 } } ^ { c } ) ^ { - 1 } \bar { \mathbf U } _ { \chi _ { k + 1 } } ^ { c _ { a } * }, \\ \bar { \mathbf B } _ { k + 1 } ^ { w _ { c } } & = \bar { \mathbf B } _ { k } ^ { w _ { c } } + ( y _ { k + 1 } - \bar { \mathbf A } _ { k } ^ { w _ { c } } x _ { k + 1 } - \bar { \mathbf B } _ { k } ^ { w _ { c } } \gamma _ { k + 1 } ) \, \bar { v } _ { \hat { s } _ { k, 2 } } ^ { c } ( \bar { \Sigma } _ { \chi _ { k + 1 } } ^ { c } ) ^ { - 1 } \bar { \mathbf U } _ { \chi _ { k + 1 } } ^ { c _ { b } * },$$

where ¯ U c a χ k +1 ∈ C n × p and ¯ U c b χ k +1 ∈ C l × p are defined such that ¯ U c ∗ χ k +1 = [ ¯ U c a ∗ χ k +1 ¯ U c b ∗ χ k +1 ]. Assume that χ k +1 can be projected onto its leading r singular vectors such that ¯ χ k +1 = ¯ U χ k +1 ¯ Σ χ k +1 ¯ V ∗ χ k +1 with r ≤ p . Then a reduced order model can be represented as:

$$\tilde { \mathbf x } _ { k + 1 } = \tilde { \mathbf A } _ { k } ^ { w _ { c } } \tilde { \mathbf x } _ { k } + \tilde { \mathbf B } _ { k } ^ { w _ { c } } \gamma _ { k },$$

where the lower-dimensional approximation of ˜ A w c k +1 ∈ R r × r and ˜ B w c k +1 ∈ R r × l can obtained by projecting ¯ A w c k +1 and ¯ B w c k +1 onto a subspace spanned by the columns of ¯ U χ k +1 as follows:

$$\tilde { A } _ { k + 1 } ^ { w _ { c } } & = \tilde { U } _ { \chi _ { k + 1 } } ^ { * } \tilde { A } _ { k } ^ { w _ { c } } \tilde { U } _ { \chi _ { k + 1 } } + \tilde { U } _ { \chi _ { k + 1 } } ^ { * } \left ( y _ { k + 1 } - \tilde { A } _ { k } ^ { w _ { c } } x _ { k + 1 } - \tilde { B } _ { k } ^ { w _ { c } } \gamma _ { k + 1 } \right ) \bar { v } _ { s _ { k, 2 } } ^ { c } ( \bar { \Sigma } _ { \chi _ { k + 1 } } ^ { c } ) ^ { - 1 } \tilde { U } _ { \chi _ { k + 1 } } ^ { c _ { a } * } \tilde { U } _ { \chi _ { k + 1 } }, \\ \tilde { B } _ { k + 1 } ^ { w _ { c } } & = \tilde { U } _ { \chi _ { k + 1 } } ^ { * } \tilde { B } _ { k } ^ { w _ { c } } + \tilde { U } _ { \chi _ { k + 1 } } ^ { * } \left ( y _ { k + 1 } - \tilde { A } _ { k } ^ { w _ { c } } x _ { k + 1 } - \tilde { B } _ { k } ^ { w _ { c } } \gamma _ { k + 1 } \right ) \bar { v } _ { s _ { k, 2 } } ^ { c } ( \bar { \Sigma } _ { \chi _ { k + 1 } } ^ { c } ) ^ { - 1 } \tilde { U } _ { \chi _ { k + 1 } } ^ { c _ { b } * }.$$

For simplicity of exposition, in Section 6.1 and 6.2, we assumed that the SVD of the data matrix X k ( χ k ) and the augmented data matrix X c k ( χ c k ) is known. However, if the dimension of the input γ k is small, or if the large dimension of the data matrix leads to storage concerns for two SVDs, it may be beneficial to store only the SVD of X k ( χ k ) and subsequently, use incremental SVD updates to first compute SVD of X k +1 ( χ k +1 ) and then compute the SVD of X c k +1 ( χ c k +1 ). The former can be accomplished using the incremental SVD updates described in Section 3, while the latter update is described in Appendix I.

## 6.3 Numerical Illustration for the Incremental DMDc Algorithm

In this section, we illustrate the efficiency of incremental DMDc algorithms. To this end, we generate a time-varying linear dynamical system as follows. We generate random linear discrete time invariant system matrices A ∈ R n × n and B ∈ R n × l using MATLAB function drss . These system matrices were used to generate the following time-varying linear system:

$$x _ { k + 1 } & = \mathbf A _ { k } x _ { k } + \mathbf B _ { k } \gamma _ { k }$$

where A k = (1 + glyph[epsilon1] sin ωk ) A , and B k = (1 + glyph[epsilon1] sin ωk ) B and γ k ∈ R l is selected as an i.i.d. sequence of standard Gaussian random vector. The system in (47) is used to run a simulation for m glyph[greatermuch] n time steps, to obtain two datasets X Y , ∈ R n × ( m -1) , with ω = 1, glyph[epsilon1] = 0 001, . m = 200, n = 20, and l = 2. Initial models are estimated using DMD and DMDc algorithms using initial windows of X = [ x 1 , · · · , x 40 ] , Y = [ y 1 , · · · , y 40 ] , and Γ = [ γ 1 , · · · , γ 40 ] . The weighted ( ρ = 0 9) and . windowed ( w = 40 samples) incremental DMD and DMDc algorithms are applied at each iteration on the generated data x k , y k , γ k , for k ∈ { 41 , · · · , 200 , } to update the initial DMD model and DMDc model. The two models are also used to predict 10 future state vectors at each iteration. The Frobenius norm of the prediction error for incremental DMDc (blue line) and the incremental DMD (red line) are shown in Figure 12. The incremental DMDc models have higher prediction accuracy because of its ability to characterize the relationship between the states and the control input which is vital for any predictive model. The windowed incremental DMDc algorithm appears to have smaller prediction error than the weighted incremental DMDc algorithm.

## 7 Conclusion and Future Direction

In this paper, we developed algorithms for incremental computation of time-varying dynamic mode decomposition for autonomous and non-autonomous systems. In contrast to existing algorithms, these algorithms rely on incremental singular value decomposition to update singular values of the data matrix and allow for computation of a reduced order model at each time step. These algorithms are particularly useful for the cases in which the data matrix is singular and incremental matrix inversion based algorithms cannot be applied. We applied the proposed algorithms to an EEG dataset associated with error-related potentials and showed the efficacy of the algorithms in terms of predicting the future EEG signal. We also illustrated that the principal DMD modes obtained were consistent with the EEG activity seen in the brain.

There are several interesting future research directions for this work. First, the proposed approach can be adapted to apply the incremental updates on a nonlinear mapping of the measurements. This could be done in the spirit of extended dynamic mode decomposition proposed in [34]. Such extension may further improve the predictive power of the computed models. Second, it

(a) Weighted Incremental DMDc

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-2c8b61ad-4b60-4172-a712-1d3d75c5649c.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-69700e8f-c459-4969-aae6-c213ce26ebb9.jpg)

- (b) Windowed Incremental DMDc

Fig. 12: The Frobenius norm of prediction error for a future-window of 10 samples using (a) weighted incremental DMD (red line) and weighted incremental DMDc(blue line), and (b) windowed incremental DMD (red line) and windowed incremental DMDc (blue line).

would be interesting to conduct human-in-the-loop experiments in which the EEG data is used in real-time to computed a DMD-based model of human performance and the control is designed to improve the performance.

## Code

The MATLAB code used to generate the numerical results presented in this paper is available at https://github.com/MSU-dcypherlab/Incremental-DMD-for-EEG-Data.git .

## A Proof of Proposition 1

The incremented dataset X k +1 can be represented in term of X k using the following additive updating formula

$$\text{ormula} \\ X _ { k + 1 } & = \rho \left [ X _ { k } \quad 0 \right ] + x _ { k + 1 } z _ { k + 1 } ^ { T }, \\ & = \rho \text{U} _ { x _ { k } } \Sigma _ { x _ { k } } \left [ V _ { x _ { k } } ^ { * } \quad 0 \right ] + x _ { k + 1 } z _ { k + 1 } ^ { T } \\ & = \left [ \rho \text{U} _ { x _ { k } } \quad x _ { k + 1 } \right ] \begin{bmatrix} \Sigma _ { k } & 0 \\ 0 & 1 \end{bmatrix} \left [ \left [ V _ { k } \right ] & z _ { k + 1 } \right ] ^ { * } \\ & = \rho \text{U} _ { x _ { k } } \left [ \text{I} \quad \rho ^ { - 1 } \text{U} _ { x _ { k } } x _ { k + 1 } \right ] \begin{bmatrix} \Sigma _ { k } & 0 \\ 0 & 1 \end{bmatrix} \left [ V _ { k } & 0 \\ 0 & 1 \end{bmatrix} ^ { * } \\ - \int _ { 0 } \partial _ { 0 } \quad \frac { 1 } { 1 } ^ { T } \sim \mathbb { m } k + 1$$

where z k +1 = 0 [ 0 · · · 1 ] T ∈ R k +1 .

Let the SVD of S k glyph[defines] [ Σ x k ρ -1 U ∗ x k x k +1 ] = U Σ V s k s k ∗ s k with U s k ∈ C n × n , Σ s k ∈ C n × n , and V s k ∈ C ( n +1) × n . Then, V s k can be partitioned as V s k = [ V s k, 1 v s k, 2 ] such that v s k, 2 ∈ C 1 × n is orthogonal to V s k, 1 ∈ C n × n , and X k +1 in (22) can be written as:

$$\mathbf X _ { k + 1 } = \rho \mathbf U _ { x _ { k } } \mathbf U _ { s _ { k } } \Sigma _ { s _ { k } } \begin{bmatrix} \mathbf V _ { x _ { k } } \mathbf V _ { s _ { k, 1 } } \\ \mathbf V _ { s _ { k, 2 } } \end{bmatrix} ^ { * }.$$

Thus, the SVD of X k +1 = U x k +1 Σ x k +1 V ∗ x k +1 is given by

$$\mathbf U _ { x _ { k + 1 } } = \mathbf U _ { x _ { k } } \mathbf U _ { s _ { k } }, \ \mathbf \Sigma _ { k + 1 } = \rho \mathbf \Sigma _ { s _ { k } }, \text{ and } \mathbf V _ { x _ { k + 1 } } = \begin{bmatrix} \mathbf V _ { x _ { k } } \mathbf V _ { s _ { k, 1 } } \\ \mathbf v _ { s _ { k, 2 } } \end{bmatrix}.$$

## B Proof of Proposition 2

Consider the updated dataset

$$\acute { \tilde { \chi } } _ { k } & = \chi _ { k } - x _ { k - w + 1 } z _ { 1 } ^ { T } \\ & = U _ { \chi _ { k } } U _ { \chi _ { k } } ^ { * } ( \chi _ { k } - x _ { k - w + 1 } z _ { 1 } ^ { T } ) V _ { \chi _ { k } } V _ { \chi _ { k } } ^ { * } \\ & = U _ { \chi _ { k } } ( \Sigma _ { \chi _ { k } } - U _ { \chi _ { k } } ^ { * } x _ { k - w + 1 } z _ { 1 } ^ { T } V _ { \chi _ { k } } ) V _ { \chi _ { k } } ^ { * },$$

where ´ ˜ χ k glyph[defines] [ 0 x k -w +2 · · · x k ] is the ´ χ k dataset padded with n -dimensional zero column, and z 1 = 1 [ 0 · · · 0 ] T ∈ R w .

Let the SVD of ´ S k glyph[defines] Σ χ k -U ∗ χ k x k -w +1 z T 1 V χ k be

$$\acute { S } _ { k } = \mathsf U _ { \acute { s } _ { k } } \left [ \Sigma _ { \acute { s } _ { k } } \ \ 0 _ { q \times ( w - q ) } \right ] \left [ \mathsf V _ { \acute { s } _ { k } } \ \tilde { \mathsf V } _ { \acute { s } _ { k } } \right ] ^ { * },$$

where U ´ s k ∈ C q × q , Σ ´ s k ∈ C q × q , V ´ s k ∈ C w × q and ˜ V ´ s k ∈ C w × ( w -q ) . Let V χ k be partitioned into V χ k = [ v χ k, 1 V χ k, 2 ] , where v χ k, 1 ∈ C 1 × w and V χ k, 2 ∈ C ( w -1) × w .

Substituting the SVD from equation (50) into equation(49), the dataset ´ ˜ X k can be expressed as:

$$\acute { \acute { \chi } } _ { k } & = ( \mathbf U _ { \chi _ { k } } \mathbf U _ { \acute { \xi } _ { k } } ) \left [ \Sigma _ { \acute { \xi } _ { k } } \quad 0 _ { q \times ( w - q ) } \right ] \left ( \mathbf V _ { \chi _ { k } } \left [ \mathbf V _ { \acute { \xi } _ { k } } \right ] \right ) ^ { * } \\ & = ( \mathbf U _ { \chi _ { k } } \mathbf U _ { \acute { \xi } _ { k } } ) \left [ \Sigma _ { \acute { \xi } _ { k } } \quad 0 _ { q \times ( w - q ) } \right ] \left ( \left [ \mathbf V _ { \chi _ { k, 1 } } \right ] \left [ \mathbf V _ { \acute { \xi } _ { k } } \right ] \right ) ^ { * } \\ & = ( \mathbf U _ { \chi _ { k } } \mathbf U _ { \acute { \xi } _ { k } } ) \left [ \Sigma _ { \acute { \xi } _ { k } } \quad 0 _ { q \times ( w - q ) } \right ] \left [ \mathbf V _ { \chi _ { k, 1 } } \mathbf V _ { \acute { \xi } _ { k } } \quad \mathbf V _ { \chi _ { k, 1 } } \tilde { \mathbf V } _ { \acute { \xi } _ { k } } \right ] ^ { * } \\ & = \left [ \mathbf U _ { \chi _ { k } } \mathbf U _ { \acute { \xi } _ { k } } \Sigma _ { \acute { \xi } _ { k } } \mathbf V _ { \acute { \xi } _ { k } } ^ { * } \quad \mathbf U _ { \chi _ { k } } \mathbf U _ { \acute { \xi } _ { k } } \Sigma _ { \acute { \xi } _ { k } } \mathbf V _ { \acute { \xi } _ { k } } ^ { * } \mathbf V _ { \acute { \xi } _ { k } } ^ { * } \right ]. \\ \Gamma \equiv \quad \cdot \quad \cdot 1 \quad \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \ \mathbf V _ { \quad \nu } ^ { * } \quad \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cd.$$

Since, ´ ˜ χ k = [ 0 ´ χ k ] , it follows that U χ k U Σ V v ´ s k ´ s k ∗ ´ s k ∗ χ k, 1 = 0 and ´ χ k = U χ k U Σ V V ´ s k ´ s k ∗ ´ s k ∗ χ k, 2 . Thus, the SVD of ´ χ k = U ´ χ k Σ ´ χ k V ∗ ´ χ k is

$$\mathbf U _ { \acute { x } _ { k } } = \mathbf U _ { \chi _ { k } } \mathbf U _ { \acute { s } _ { k } }, \, \Sigma _ { \acute { x } _ { k } } = \Sigma _ { \acute { s } _ { k } }, \text{ and } \mathbf V _ { \acute { x } _ { k } } = \mathbf V _ { \chi _ { k, 2 } } \mathbf V _ { \acute { s } _ { k } }.$$

A noteworthy property of the above decomposition that we will use in the later developments is that v χ k, 1 V ´ s k = 0 . To establish this property, we note that since U χ k ´ v S k ∗ χ k, 1 = 0 , v ∗ χ k, 1 ∈ Ker( U χ k ´ S k ). Furthermore, since U χ k is full rank, then v ∗ χ k, 1 ∈ Ker( ´ S k ) = span( ˜ V ´ s k ), and consequently

$$\mathbf v _ { \chi _ { k, 1 } } \mathbf V _ { \hat { s } _ { k } } = 0.$$

## C Proof of Theorem 1

Let the SVD of X k +1 = U x k +1 Σ x k +1 V ∗ x k +1 be calculated by the incremental SVD update (23). Then, the time-varying DMD operator (15) at sampling time t k +1 is:

$$\mathbf A ^ { \rho } _ { k + 1 } \ & = \ \mathbf Y _ { k + 1 } V _ { x _ { k + 1 } } \Sigma ^ { - 1 } _ { x _ { k + 1 } } U ^ { * } _ { x _ { k + 1 } } \\ & = \ \left [ \rho \mathbf Y _ { k } \ \mathbf y _ { k + 1 } \right ] \mathbf V _ { x _ { k + 1 } } \Sigma ^ { - 1 } _ { x _ { k + 1 } } U ^ { * } _ { x _ { k + 1 } }.$$

Substituting the incrementally computed V k +1 from (23) into the DMD operator (53) yields:

$$\text{Substituting the incrementally computed } V _ { k + 1 } & = \left [ \rho Y _ { k } \ \ y _ { k + 1 } \right ] \begin{bmatrix} V _ { x _ { k } } V _ { s _ { k, 1 } } \right ] \Sigma _ { x _ { k + 1 } } ^ { - 1 } U _ { x _ { k + 1 } } ^ { * } \\ = & ( \rho Y _ { k } V _ { x _ { k } } V _ { s _ { k, 1 } } + y _ { k + 1 } \nu _ { s _ { k, 2 } } ) \Sigma _ { x _ { k + 1 } } ^ { - 1 } U _ { x _ { k + 1 } } ^ { * } \\ = & ( \rho Y _ { k } V _ { x _ { k } } ( \Sigma _ { x _ { k } } ^ { - 1 } p ^ { - 1 } U _ { x _ { k } } ^ { * } \rho U _ { x _ { k } } \Sigma _ { x _ { k } } ) V _ { s _ { k, 1 } } + y _ { k + 1 } \nu _ { s _ { k, 2 } } ) \Sigma _ { x _ { k + 1 } } ^ { - 1 } U _ { x _ { k + 1 } } ^ { * } \\ = & ( A _ { k } ^ { * } \rho U _ { x _ { k } } \Sigma _ { x _ { k } } V _ { s _ { k, 1 } } + y _ { k + 1 } \nu _ { s _ { k, 2 } } ) \Sigma _ { x _ { k + 1 } } ^ { - 1 } U _ { x _ { k + 1 } } ^ { * } \\ = & A _ { k } ^ { * } - A _ { k } ^ { * } + ( A _ { k } ^ { * } \rho U _ { x _ { k } } \Sigma _ { x _ { k } } V _ { s _ { k, 1 } } + y _ { k + 1 } V _ { s _ { k, 1 } } ) \Sigma _ { x _ { k + 1 } } ^ { - 1 } U _ { x _ { k + 1 } } ^ { * } \\ = & A _ { k } ^ { * } - A _ { k } ^ { * } ( \overbrace { U _ { x _ { k + 1 } } \Sigma _ { x _ { k + 1 } } \Sigma _ { x _ { k + 1 } } ^ { - 1 } U _ { x _ { k + 1 } } ^ { * } } ) + A _ { k } ^ { * } \rho U _ { x _ { k } } \Sigma _ { x _ { k } } V _ { s _ { k, 1 } } \Sigma _ { x _ { k + 1 } } ^ { - 1 } U _ { x _ { k + 1 } } ^ { * } + y _ { k + 1 } \nu _ { s _ { k, 2 } } \Sigma _ { x _ { k + 1 } } ^ { - 1 } U _ { x _ { k + 1 } } ^ { * } \\ = & A _ { k } ^ { * } + y _ { k + 1 } \nu _ { s _ { k, 2 } } \Sigma _ { x _ { k + 1 } } ^ { - 1 } U _ { x _ { k + 1 } } ^ { * } - A _ { k } ^ { * } \left ( U _ { x _ { k + 1 } } \Sigma _ { x _ { k + 1 } } - \rho U _ { x _ { k } } \Sigma _ { x _ { k } } V _ { s _ { k, 1 } } \right ) \Sigma _ { x _ { k + 1 } } ^ { - 1 } U _ { x _ { k + 1 } } ^ { * }, \\ & \text{where } I _ { n } \text{ is the identity matrix of order } n, \text{ and } A _ { k } ^ { * } \text{ has been added and subtracted in (54).  The } \text{term} \quad \text{$\Psi$} \quad - \text{$\Pi$} \quad \mathcal { N}$} \quad \mathcal { N}$ can be rewritten as$$

where I n is the identity matrix of order n , and A ρ k has been added and subtracted in (54). The term ( U x k +1 Σ x k +1 -ρ U x k Σ x k V s k, 1 ) can be rewritten as

$$\text{term} \left ( U _ { x _ { k + 1 } } \Sigma _ { x _ { k + 1 } } - \rho U _ { x _ { k } } \Sigma _ { x _ { k } } V _ { s _ { k, 1 } } \right ) \text{ can be rewritten as} \\ U _ { x _ { k + 1 } } \Sigma _ { x _ { k + 1 } } - \rho U _ { x _ { k } } \Sigma _ { x _ { k } } V _ { s _ { k, 1 } } & = \left ( U _ { x _ { k + 1 } } \Sigma _ { x _ { k + 1 } } - \rho U _ { x _ { k } } \Sigma _ { x _ { k } } V _ { s _ { k, 1 } } \right ) V _ { x _ { k + 1 } } ^ { * } V _ { x _ { k + 1 } } ^ { * } V _ { x _ { k + 1 } } ^ { * } \right ) V _ { x _ { k + 1 } } \\ & = \left ( U _ { x _ { k + 1 } } \Sigma _ { x _ { k + 1 } } V _ { x _ { k + 1 } } ^ { * } - \rho U _ { x _ { k } } \Sigma _ { x _ { k } } V _ { s _ { k, 1 } } V _ { x _ { k + 1 } } ^ { * } \right ) V _ { x _ { k + 1 } } \\ & = \left ( X _ { k + 1 } - \rho U _ { x _ { k } } \Sigma _ { x _ { k } } V _ { s _ { k, 1 } } [ V _ { s _ { k, 1 } } ^ { * } V _ { s _ { k } } ^ { * } \ V _ { s _ { k, 2 } } ^ { * } ] \right ) V _ { x _ { k + 1 } } \quad \left ( 5 6 \right ) \\ & = \left ( X _ { k + 1 } - \left [ \rho U _ { x _ { k } } \Sigma _ { x _ { k } } V _ { x _ { k } } ^ { * } \quad 0 \right ] \right ) V _ { x _ { k + 1 } } \quad \left ( 5 7 \right ) \\ & = \left ( X _ { k + 1 } - \left [ \rho X _ { k } \quad 0 \right ] \right ) V _ { x _ { k + 1 } } \\ & = \left [ 0 \quad \dots \quad 0 \quad x _ { k + 1 } \right ] \left [ \begin{matrix} V _ { x _ { k } } V _ { s _ { k, 1 } } \\ V _ { s _ { k, 2 } } \end{matrix} \right ] = x _ { k + 1 } V _ { s _ { k, 2 } }.$$

where (56) is obtained by substituting incremental update for V x k +1 from (23), and (57) is obtained by using the fact that the rows in V s k = [ V s k, 1 v s k, 2 ] are orthogonal to each other. Substituting equation

(58) into the equation (55):

$$\mathbf A ^ { \rho } _ { k + 1 } \ & = \ \mathbf A ^ { \rho } _ { k } + y _ { k + 1 } \mathbf v _ { s _ { k, 2 } } \Sigma ^ { - 1 } _ { x _ { k + 1 } } \mathbf U ^ { * } _ { x _ { k + 1 } } - \mathbf A ^ { \rho } _ { k } \mathbf x _ { k + 1 } \mathbf v _ { s _ { k, 2 } } \Sigma ^ { - 1 } _ { x _ { k + 1 } } \mathbf U ^ { * } _ { x _ { k + 1 } } \\ & = \ \mathbf A ^ { \rho } _ { k } + \left ( y _ { k + 1 } - \mathbf A ^ { \rho } _ { k } \mathbf x _ { k + 1 } \right ) \mathbf v _ { s _ { k, 2 } } \Sigma ^ { - 1 } _ { x _ { k + 1 } } \mathbf U ^ { * } _ { x _ { k + 1 } }.$$

## D Proof of Theorem 2

Let the SVD of χ k +1 = U χ k +1 Σ χ k +1 V ∗ χ k +1 be calculated by the windowed SVD update (29). Then, the time-varying DMD operator (15) at sampling time t k +1 is

$$\mathbf A _ { k + 1 } ^ { w } \ = \ \Upsilon _ { k + 1 } V _ { \chi _ { k + 1 } } \Sigma _ { \chi _ { k + 1 } } ^ { - 1 } U _ { \chi _ { k + 1 } } ^ { * }.$$

Substituting the incrementally computed V k +1 from (29) into the DMD operator (59) yields:

$$\text{Substituting the incrementally computed } V _ { k + 1 } & \text{from (29) into the DMD operator (59) yields:} \\ \text{A} _ { k + 1 } ^ { w } & \, = \, \left [ y _ { k - w + 2 } \, \cdots \, y _ { k + 1 } \right ] \begin{bmatrix} V _ { \chi _ { k, 2 } } V _ { \tilde { \xi } _ { k } } V _ { \tilde { \xi } _ { k, 1 } } \right ] \Sigma _ { \chi _ { k + 1 } } ^ { - 1 } U _ { \chi _ { k + 1 } } ^ { * } \\ & \, = \, \left [ y _ { k - w + 1 } \, y _ { k - w + 2 } \, \cdots \, y _ { k + 1 } \right ] \begin{bmatrix} v _ { \chi _ { k, 1 } } V _ { \tilde { \xi } _ { k } } V _ { \tilde { \xi } _ { k, 1 } } \\ V _ { \tilde { \xi } _ { k, 2 } } V _ { \tilde { \xi } _ { k } } V _ { \tilde { \xi } _ { k, 1 } } \right ] \Sigma _ { \chi _ { k + 1 } } ^ { - 1 } U _ { \chi _ { k + 1 } } ^ { * } \\ & \, = \, \left [ \Upsilon _ { k } \, y _ { k + 1 } \right ] \begin{bmatrix} V _ { \chi _ { k } } V _ { \tilde { \xi } _ { k } } V _ { \tilde { \xi } _ { k, 1 } } \\ v _ { \tilde { \xi } _ { k, 2 } } \end{bmatrix} \Sigma _ { \chi _ { k + 1 } } ^ { - 1 } U _ { \chi _ { k + 1 } } ^ { * } \\ & \, = \, \left ( \Upsilon _ { k } V _ { \chi _ { k } } V _ { \tilde { \xi } _ { k } } V _ { \tilde { \xi } _ { k, 1 } } + y _ { k + 1 } V _ { \tilde { \xi } _ { k, 2 } } \right ) \Sigma _ { \chi _ { k + 1 } } ^ { - 1 } U _ { \chi _ { k + 1 } } ^ { * }, \\ \text{where equation (60)} & \text{holds because } v _ { \chi _ { k, 1 } } V _ { \tilde { \xi } _ { k } } = 0 \text{ from equation (52).}$$

where equation (60) holds because v χ k, 1 V ´ s k = 0 from equation (52).

After following the same steps presented in the proof of Theorem 1, equation (61) becomes:

$$A _ { k + 1 } ^ { \psi } = A _ { k } ^ { \psi } + y _ { k + 1 } v _ { \hat { s } _ { k, 2 } } \Sigma _ { \chi _ { k + 1 } } ^ { - 1 } U _ { \chi _ { k + 1 } } ^ { * } - A _ { k } \left ( U _ { \chi _ { k + 1 } } \Sigma _ { \chi _ { k + 1 } } - U _ { \chi _ { k } } \Sigma _ { \chi _ { k } } V _ { \hat { s } _ { k } } V _ { \hat { s } _ { k, 1 } } \right ) \Sigma _ { \chi _ { k + 1 } } ^ { - 1 } U _ { \chi _ { k + 1 } } ^ { * }.$$

The term ( U χ k +1 Σ χ k +1 -U χ k Σ χ k V V ´ s k ˆ s k, 1 )

$$& \cdot \mathbf A _ { k } \left ( \mathbf U _ { \chi _ { k + 1 } } \Sigma _ { \chi _ { k + 1 } } - \mathbf U _ { \chi _ { k } } \Sigma _ { \chi _ { k } } V _ { \hat { s } _ { k } } V _ { \hat { s } _ { k, 1 } } \right ) \Sigma _ { \chi _ { k + 1 } } ^ { - 1 } \mathbf U _ { \chi _ { k + 1 } } ^ { * }. \quad ( 6 2 ) \\ & \quad \hat { s } _ { k } \mathbf V _ { \hat { s } _ { k, 1 } } \right ) \, \text{can be rewritten as}$$

$$\mathsf U _ { \chi _ { k + 1 } } \Sigma _ { \chi _ { k + 1 } } - \mathsf U _ { \chi _ { k } } \Sigma _ { \chi _ { k } } \mathsf V _ { \hat { \sigma } _ { k, 1 } } & = \left ( \mathsf U _ { \chi _ { k + 1 } } \Sigma _ { \chi _ { k + 1 } } - \mathsf U _ { \chi _ { k } } \Sigma _ { \chi _ { k } } \mathsf V _ { \hat { \sigma } _ { k } } \mathsf V _ { \hat { \sigma } _ { k, 1 } } \right ) \mathsf V _ { \chi _ { k + 1 } } ^ { * } \mathsf V _ { \chi _ { k + 1 } } \\ & = \left ( \mathsf U _ { \chi _ { k + 1 } } \Sigma _ { \chi _ { k + 1 } } \mathsf V _ { \chi _ { k + 1 } } ^ { * } - \mathsf U _ { \chi _ { k } } \Sigma _ { \chi _ { k } } \mathsf V _ { \hat { \sigma } _ { k } } \mathsf V _ { \hat { \sigma } _ { k, 1 } } \mathsf V _ { \chi _ { k + 1 } } ^ { * } \right ) \mathsf V _ { \chi _ { k + 1 } } \\ & = \left ( \chi _ { k + 1 } - \mathsf U _ { \chi _ { k } } \Sigma _ { \chi _ { k } } \mathsf V _ { \hat { \sigma } _ { k } } \mathsf V _ { \hat { \sigma } _ { k, 1 } } [ \mathsf V _ { \hat { \sigma } _ { k, 1 } } ^ { * } \mathsf V _ { \hat { \sigma } _ { k } } ^ { * } \mathsf V _ { \chi _ { k, 2 } } ^ { * } \mathsf V _ { \hat { \sigma } _ { k, 2 } } ^ { * } ] \right ) \mathsf V _ { \chi _ { k + 1 } } \quad ( 6 3 ) \\ & \quad - \mathsf l \centerdot \, \int \mathsf m \centerdot \, \mathsf V ^ { * } \quad \mathsf n \cup \mathsf v \, \mathsf r$$

$$& \left \langle \begin{array} { c } \kappa _ { x k + 1 } - \lambda _ { x k + 1 } \end{array} \right \rangle \begin{array} { c } \kappa _ { x k } - \lambda _ { x k } \end{array} \right \rangle \begin{array} { c } \kappa _ { x k + 1 } \\ \end{array} \right \rangle \\ & = \left ( \chi _ { k + 1 } - U _ { \chi _ { k } } \Sigma _ { \chi _ { k } } V _ { \hat { s } _ { k } } V _ { \hat { s } _ { k, 1 } } [ V _ { \hat { s } _ { k, 1 } } ^ { * } V _ { \hat { s } _ { k } } ^ { * } V _ { \hat { s } _ { k, 2 } } ^ { * } \end{array} \begin{array} { c } \nu _ { \hat { s } _ { k, 2 } } ^ { * } ] \right ) V _ { \chi _ { k + 1 } } \quad ( 6 3 ) \\ & = \left ( \chi _ { k + 1 } - \left [ U _ { \chi _ { k } } \Sigma _ { \chi _ { k } } V _ { \hat { s } _ { k, 2 } } ^ { * } \end{array} \right ] \right ) V _ { \chi _ { k + 1 } } \quad ( 6 4 ) \\ & = \left ( \chi _ { k + 1 } - \left [ \begin{array} { c c c } \kappa _ { k - w + 2 } & \cdots & \kappa _ { k } & 0 \end{array} \right ] \right ) V _ { \chi _ { k + 1 } } \\ & = \left [ 0 & \dots & 0 & \kappa _ { k + 1 } \right ] \begin{array} { c } \kappa _ { k, 2 } V _ { \hat { s } _ { k } } V _ { \hat { s } _ { k, 1 } } \\ \end{array} \right ] = \kappa _ { k + 1 } \end{array} \kappa _ { \hat { s } _ { k, 2 } }, \quad ( 6 5 ) \\ \vdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots$$

where equation (63) is obtained after substituting the windowed incremental update formula from (29), and (64) is obtained after substituting V V ´ s k ∗ ´ s k = V ˆ s k, 1 V ∗ ˆ s k, 1 = I and V ˆ s k, 1 v ∗ ˆ s k, 2 = 0 . The substitution of (65) in (62) yields:

$$\mathbf A _ { k + 1 } ^ { w } = \mathbf A _ { k } ^ { w } + ( y _ { k + 1 } - \mathbf A _ { k } ^ { w } \mathbf x _ { k + 1 } ) \, \mathbf v _ { \hat { s } _ { k, 2 } } \Sigma _ { \chi _ { k + 1 } } ^ { - 1 } \mathbf U _ { \chi _ { k + 1 } } ^ { * }.$$

## E EEG Prediction Error for Incremental DMD and Online DMD Algorithms

The figures below show the normalized RMS for the predicted EEG signal at channel FCz during correct and erroneous events using incremental DMD with σ thr = { 0 01 0 001 . , . } , ρ = 0 1 0 2 0 4 0 8 { . , . , . , . } and w = 512, and online DMD with ρ = { 0 1 . , 0 2 . , 0 4 . , 0 8 . } and w = 512.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-2dbb4a64-e130-4559-86b7-628f784b9a32.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-2797f1f6-ff25-401f-ad10-8f9c193e42b7.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-d2020872-0d4c-408a-a90b-82ce074fd0e7.jpg)

(a) Correct event

Fig. 13: Normalized RMS error for a future-window of 64 samples of EEG states at channel FCz using incremental DMD with σ thr = 0 01 (left panel), . incremental DMD with σ thr = 0 001 (middle panel), and online DMD (right . panel) for (a) correct event, and (b) erroneous event.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-295d1a83-bad2-43ed-8758-c91a94033ce7.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-02309df6-e3c0-4b7d-b28a-5a86e0c57577.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-4ad289e8-d715-4c76-b590-b6984c61d27a.jpg)

## F ERP Prediction Error for Incremental DMD Algorithm with Different Initial Window Sizes

Figure 14 show the normalized RMS for the prediction error of the ERP signal during the correct and erroneous events using weighted incremental DMD with initial window size of w 0 = 128 samples, and Figure 15 shows the normalized RMS for the same error using windowed incremental DMD with w = { 64 128 256 , , } .

## G Proof of Theorem 3

Consider the SVD of X c k = U c x k Σ c x k V c ∗ x k , where U c x k ∈ C ( n + ) l × ( n + ) l , Σ c x k ∈ C ( n + ) l × ( n + ) l , and V c x k ∈ C k × ( n + ) l , and the SVD of S c k glyph[defines] [ Σ c x k ρ -1 U c ∗ x k x c k +1 ] = U Σ c s k c s k [ V c ∗ s k, 1 v c ∗ s k, 2 ] . Then, the weighted incremental SVD presented in Proposition 1 can be applied to obtain the SVD of

Fig. 14: Normalized RMS error of ERP prediction using weighted incremental DMD with initial window of 128 samples during (a) correct event, and (b) Erroneous event.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-cfc3c041-9d22-4e20-8983-fbf869e56084.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-e3c23535-2ac8-4c10-bef3-267062edcd25.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-cd2d43d5-8195-4311-8126-3573caccd738.jpg)

Fig. 15: Normalized RMS error of ERP prediction using windowed incremental DMD with different window sizes during (a) correct event, and (b) Erroneous event.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01047v3-figure-600fbfda-532e-4f12-8720-0efba71d2c35.jpg)

X c k +1 = U c x k +1 Σ c x k +1 V c ∗ x k +1 as follows

$$U ^ { c } _ { x _ { k + 1 } } = \rho U ^ { c } _ { x _ { k } } U ^ { c } _ { s _ { k } }, \ \Sigma ^ { c } _ { x _ { k + 1 } } = \Sigma ^ { c } _ { s _ { k } }, \ \text{and} \ V ^ { c } _ { x _ { k + 1 } } = \begin{bmatrix} V ^ { c } _ { x _ { k } } V ^ { c } _ { s _ { k, 1 } } \\ v ^ { c } _ { s _ { k, 2 } } \end{bmatrix}.$$

Given the SVD of X k = U x k Σ x k V ∗ x k , the updated SVD for X x k +1 is given by (23). Following the same steps presented in the proof of Theorem 1 with the SVD updates in (66), we can obtain the following weighted incremental DMDc update

$$G _ { k + 1 } ^ { \rho _ { c } } \ = \ G _ { k } ^ { \rho _ { c } } + \left ( y _ { k + 1 } - G _ { k } ^ { \rho _ { c } } x _ { k + 1 } ^ { c } \right ) v _ { s _ { k, 2 } } ^ { c } ( \Sigma _ { x _ { k + 1 } } ^ { c } ) ^ { - 1 } \mathbf U _ { x _ { k + 1 } } ^ { c * },$$

where G ρ c k = [ A ρ c k B ρ c k ] . Let U c ∗ x k +1 be partitioned such that U c ∗ x k +1 = [ U c a ∗ x k +1 U c b ∗ x k +1 ], where U c a x k +1 ∈ C n × n and U c b x k +1 ∈ C l × n . Then, the update in (67) yields the following updates for

A ρ c k +1 ∈ R n × n and B ρ c k +1 ∈ R n × l

$$\mathbf A ^ { \rho _ { c } } _ { k + 1 } & = \mathbf A ^ { \rho _ { c } } _ { k } + \left ( y _ { k + 1 } - \mathbf A ^ { \rho _ { c } } _ { k } \mathbf x _ { k + 1 } - \mathbf B ^ { \rho _ { c } } _ { k } \gamma _ { k + 1 } \right ) \mathbf v ^ { c } _ { s _ { k, 2 } } ( \Sigma ^ { c } _ { x _ { k + 1 } } ) ^ { - 1 } \mathbf U ^ { c _ { a } * } _ { x _ { k + 1 } }, \\ \mathbf B ^ { \rho _ { c } } _ { k + 1 } & = \mathbf B ^ { \rho _ { c } } _ { k } + \left ( y _ { k + 1 } - \mathbf A ^ { \rho _ { c } } _ { k } \mathbf x _ { k + 1 } - \mathbf B ^ { \rho _ { c } } _ { k } \gamma _ { k + 1 } \right ) \mathbf v ^ { c } _ { s _ { k, 2 } } ( \Sigma ^ { c } _ { x _ { k + 1 } } ) ^ { - 1 } \mathbf U ^ { c _ { b } * } _ { x _ { k + 1 } }.$$

## H Proof of Theorem 4

Let q c be defined by

$$q _ { c } \stackrel { \triangle } { = } \begin{cases} n + l, & \text{if $n+l<w$,} \\ w, & \text{otherwise.} \end{cases}.$$

Consider the SVD of χ c k = U c χ k Σ c χ k V c ∗ χ k , where U c χ k ∈ C ( n + ) l × q c , Σ c χ k ∈ C q c × w , and V c χ k ∈ C w × w . Define the matrices ´ S c and ˆ S c with their associated SVDs by k k

$$\tilde { S } _ { k } ^ { c } \, \underline { e } \, \Sigma _ { \chi _ { k } } ^ { c } - \, \mathbf U _ { \chi _ { k } } ^ { c * } \, \mathbf x _ { k - w + 1 } ^ { c } \mathbf z _ { 1 } ^ { T } \mathbf V _ { \chi _ { k } } ^ { c } = \mathbf U _ { \xi _ { k } } ^ { c } \left [ \Sigma _ { \xi _ { k } } ^ { c } \ \ 0 _ { q _ { c } \times ( w - q _ { c } ) } \right ] \left [ \mathbf V _ { \tilde { s } _ { k } } ^ { c } \ \ \tilde { V } _ { \tilde { s } _ { k } } ^ { c } \right ] ^ { * },$$

$$\hat { S } _ { k } ^ { c } \stackrel { \vartriangle } { = } \left [ \Sigma _ { \hat { \chi } _ { k } } ^ { c } \quad U _ { \hat { \chi } _ { k } } ^ { c * } \mathbf x _ { k + 1 } ^ { c } \right ] = U _ { \hat { s } _ { k } } ^ { c } \Sigma _ { \hat { s } _ { k } } ^ { c } \left [ V _ { \hat { s } _ { k, 1 } } ^ { c * } \quad \mathbf v _ { \hat { s } _ { k, 2 } } ^ { c * } \right ].$$

Then, the windowed incremental SVD presented in Proposition 2 and equation (29) can be applied to obtain the SVD of χ c k +1 = U c χ k +1 Σ c χ k +1 V c ∗ χ k +1 as follows

$$U ^ { c } _ { \chi _ { k + 1 } } = U ^ { c } _ { \chi _ { k } } U ^ { c } _ { \hat { s } _ { k } } \, U ^ { c } _ { \hat { s } _ { k } }, \, \Sigma ^ { c } _ { k + 1 } = \Sigma ^ { c } _ { \hat { s } _ { k } }, \text{ and } V ^ { c } _ { k + 1 } = \begin{bmatrix} V ^ { c } _ { \chi _ { k, 2 } } V ^ { c } _ { \hat { s } _ { k } } V ^ { c } _ { \hat { s } _ { k, 1 } } \\ V ^ { c } _ { \hat { s } _ { k, 2 } } \end{bmatrix}.$$

Similarly, given the SVD of χ k = U χ k Σ χ k V ∗ χ k , the SVD of χ k +1 = U χ k +1 Σ χ k +1 V ∗ χ k +1 can be obtained using the updates in (29).

The same steps presented in the proof of Theorem 2 can be followed with the SVD update in (70) to obtain the following update

$$G _ { k + 1 } ^ { w _ { c } } = G _ { k } ^ { w _ { c } } + \left ( y _ { k + 1 } - G _ { k } ^ { w _ { c } } x _ { k + 1 } ^ { c } \right ) v _ { \delta _ { k, 2 } } ^ { c } ( \Sigma _ { \chi _ { k + 1 } } ^ { c } ) ^ { - 1 } \mathbf U _ { \chi _ { k + 1 } } ^ { c * }.$$

Let U c ∗ χ k +1 be partitioned such that U c ∗ χ k +1 = [ U c a ∗ χ k +1 U c b ∗ χ k +1 ], where U c a χ k +1 ∈ C n × n and U c b χ k +1 ∈ C l × n . Then, the updates in (71) yields the following updates for A w c k +1 ∈ R n × n and B w c k +1 ∈ R n × l

$$\mathbf A ^ { w _ { c } } _ { k + 1 } & = \mathbf A ^ { w _ { c } } _ { k } + \left ( y _ { k + 1 } - \mathbf A ^ { w _ { c } } _ { k } \mathbf x _ { k + 1 } - \mathbf B ^ { w _ { c } } _ { k } \gamma _ { k + 1 } \right ) \mathbf v ^ { c } _ { \hat { s } _ { k, 2 } } ( \Sigma ^ { c } _ { \chi _ { k + 1 } } ) ^ { - 1 } \mathbf U ^ { c _ { a } * } _ { \chi _ { k + 1 } }, \\ \mathbf B ^ { w _ { c } } _ { k + 1 } & = \mathbf B ^ { w _ { c } } _ { k } + \left ( y _ { k + 1 } - \mathbf A ^ { w _ { c } } _ { k } \mathbf x _ { k + 1 } - \mathbf B ^ { w _ { c } } _ { k } \gamma _ { k + 1 } \right ) \mathbf v ^ { c } _ { \hat { s } _ { k, 2 } } ( \Sigma ^ { c } _ { \chi _ { k + 1 } } ) ^ { - 1 } \mathbf U ^ { c _ { b } * } _ { \chi _ { k + 1 } }.$$

## I Incremental Singular Value Decomposition for Data Matrix Augmented with Exogenous Input

In this section, we present an incremental update to compute the SVD of the data matrix augmented with the exogeneous input. This update can be beneficial in case of low-dimensional control input or limited storage capacity. Assume that at t k , the state measurements are arranged in a matrix denoted by X k ∈ R n × q m , and the exogeneous input measurements are arranged in a matrix denoted

by Γ k ∈ R l × q m , where ( q m = k ) for weighted incremental SVD and ( q m = w ) for windowed incremental SVD. Both X k and Γ k are arranged in an augmented matrix denoted by X c k ∈ R ( n + ) l × q m as follows:

$$\mathbf X _ { k } ^ { c } = \begin{bmatrix} \mathbf X _ { k } \\ \Gamma _ { k } \end{bmatrix},$$

where for weighted incremental SVD we have Γ k = [ ρ k -1 γ 1 · · · γ k ] and X k = [ ρ k -1 x 1 · · · x k ] , and for windowed incremental SVD we have Γ k = [ γ k -w +1 · · · γ k ] and X k = [ x k -w +1 · · · x k ] . Let q n glyph[defines] n for weighted incremental SVD and q n glyph[defines] q for windowed incremental SVD, where q is given in (25). Then, the SVD of X c k can be calculated by updating the SVD of X k using the following proposition.

Proposition 3. Let at sampling time t k , the SVD of X k = U Σ V k k ∗ k be known, where U k ∈ C n × q n , Σ k ∈ C q n × q m , and V k ∈ C q m × q m . Then, the SVD of the dataset in (72) , defined by X c k = U Σ V c k c k c ∗ k , is

$$U _ { k } ^ { c } = \begin{bmatrix} U _ { k } U _ { R _ { 1 } } ^ { c } \\ U _ { R _ { 2 } } ^ { c } \end{bmatrix}, \ \Sigma _ { k } ^ { c } = \Sigma _ { R } ^ { c }, \ a n d \, \mathbf V _ { k } ^ { c } = \mathbf V _ { k } \mathbf V _ { R } ^ { c },$$

where U c R = [ U c R 1 U c R 2 ] , Σ c R , and V c R are given by the following SVD:

$$\left [ \begin{matrix} \Sigma _ { k } \\ ( \mathbf v _ { k } ^ { * } \Gamma _ { k } ) ^ { * } \end{matrix} \right ] = \mathbf U _ { R } ^ { c } \Sigma _ { R } ^ { c } \mathbf V _ { R } ^ { c _ { l } * }.$$

Proof. The new dataset matrix X c k can be represented in term of X k using the following additive update formula:

$$X _ { k } ^ { c } = \begin{bmatrix} X _ { k } \\ 0 \end{bmatrix} + Z _ { n + 1 } \Gamma _ { k } ^ { T },$$

where Z n +1 = [ 0 0 . . . I l ] T ∈ R ( n + ) l × l , where I l is the identity matrix of order l . Then, the new dataset in (74) can be written as:

$$\mathbf X _ { k } ^ { c } \ & = \ \begin{bmatrix} \mathbf U _ { k } \end{bmatrix} \Sigma _ { k } \mathbf V _ { k } + \mathbf Z _ { n + 1 } \Gamma _ { k } ^ { \mathbf T } = \left [ \begin{bmatrix} \mathbf U _ { k } \end{bmatrix} \ \mathbf Z _ { n + 1 } \right ] \begin{bmatrix} \Sigma _ { k } & 0 \\ 0 & \mathbf I _ { l } \end{bmatrix} \left [ \mathbf V _ { k } & \Gamma _ { k } \right ] ^ { * } \\ & = \ \begin{bmatrix} \mathbf U _ { k } & 0 \\ 0 & \mathbf I _ { l } \end{bmatrix} \left [ \mathbf V _ { k } \left [ \mathbf I _ { q } & \mathbf V _ { k } ^ { * } \Gamma _ { k } \right ] \right ) ^ { * } = \left [ \begin{bmatrix} \mathbf U _ { k } & 0 \\ 0 & \mathbf I _ { l } \end{bmatrix} \right ] \left [ \mathbf V _ { k } ^ { * } \Gamma _ { k } \right ] \mathbf V _ { k } ^ { * }.$$

Define R c glyph[defines] [ Σ k ( V Γ ∗ k k ) ∗ ] , which has the SVD of R c = U Σ V c R c R c l ∗ R , where U c R = [ U c R 1 U c R 2 ] ∈ C ( n + ) l × q n , U c R 1 ∈ C n × q n , U c R 2 ∈ C l × q n , Σ c R ∈ C q n × q m , and V c R ∈ C q m × q m . Then, after substituting the SVD of matrix R c in (75), the updated dataset becomes:

$$\mathbf X _ { k } ^ { c } = \begin{bmatrix} \mathbf U _ { k } & 0 \\ 0 & \mathbf I _ { l } \end{bmatrix} \begin{bmatrix} \mathbf U _ { R _ { 1 } } ^ { c } \\ \mathbf U _ { R _ { 2 } } ^ { c } \end{bmatrix} \Sigma _ { R } ^ { c } \left ( \mathbf V _ { k } \mathbf V _ { R } ^ { c } \right ) ^ { * } = \begin{bmatrix} \mathbf U _ { k } \mathbf U _ { R _ { 1 } } ^ { c } \\ \mathbf U _ { R _ { 2 } } ^ { c } \end{bmatrix} \Sigma _ { R } ^ { c } \left ( \mathbf V _ { k } \mathbf V _ { R } ^ { c } \right ) ^ { * },$$

Finally the SVD factors for X c k is defined by:

$$\mathbf U _ { k } ^ { c } = \begin{bmatrix} \mathbf U _ { k } \mathbf U _ { R _ { 1 } } ^ { c } \\ \mathbf U _ { R _ { 2 } } ^ { c } \end{bmatrix}, \ \mathbf \Sigma _ { k } ^ { c } = \mathbf \Sigma _ { R } ^ { c }, \text{ and } \mathbf V _ { k } ^ { c } = \mathbf V _ { k } \mathbf V _ { R } ^ { c }.$$

For l = 1, the matrix R has a broken-arrow structure and its SVD can be computed efficiently [2]. For l &gt; 1, the matrix is still sparse but does not carry the broken-arrow structure. In this case, either the above procedure can be applied recursively with one input added at a time or problem specific sparse SVD solvers can be employed.

## References

| [1]   | M. Brand, Incremental singular value decomposition of uncertain data with missing values, in European Conference on Computer Vision , Springer, 2002, 707-720.                                                                                            |
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [2]   | M. Brand, Fast low-rank modifications of the thin singular value decomposition, Linear Algebra and its Applications , 415 (2006), 20-30.                                                                                                                  |
| [3]   | B. W. Brunton, L. A. Johnson, J. G. Ojemann and J. N. Kutz, Extracting spatial-temporal coherent patterns in large-scale neural recordings using dynamic mode decomposition, Journal of Neuroscience Methods , 258 (2016), 1-15.                          |
| [4]   | R. Chavarriaga and J. D. R. Mill´n, a Learning from EEG error-related potentials in noninvasive brain-computer interfaces, IEEE Transactions on Neural Systems and Rehabilitation Engineering , 18 (2010), 381-388.                                       |
| [5]   | R. Chavarriaga, A. Sobolewski and J. D. R. Mill´n, a Errare machinale est: The use of error-related potentials in brain-machine interfaces, Frontiers in Neuroscience , 8 (2014), 208.                                                                    |
| [6]   | X. Chen and K. S. Candan, LWI-SVD: Low-rank, windowed, incremental singular value decompositions on time- evolving data sets, in Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining , ACM, 2014, 987-996. |
| [7]   | A. C. Costa, T. Ahamed and G. J. Stephens, Adaptive, locally linear models of complex dynamics, Proceedings of the National Academy of Sciences , 116 (2019), 1501-1510.                                                                                  |
| [8]   | A. Delorme and S. Makeig, EEGLAB: an open source toolbox for analysis of single-trial eeg dynamics including independent component analysis, Journal of Neuroscience Methods , 134 (2004), 9-21.                                                          |
| [9]   | P. W. Ferrez and J. d. R. Mill´n, a Error-related EEG potentials generated during simulated brain-computer interaction, IEEE Transactions on Biomedical Engineering , 55 (2008), 923-929.                                                                 |
| [10]  | J. Grosek and J. N. Kutz, Dynamic mode decomposition for real-time background/foreground separation in video, arXiv preprint arXiv:1404.7592 .                                                                                                            |
| [11]  | M. Gu and S. C. Eisenstat, A stable and fast algorithm for updating the singular value decomposition , Technical Report YALEU/DCS/RR-966, Department of Computer Science, Yale University, New Haven, CT, 1993.                                           |
| [12]  | M. Hemati, E. Deem, M. Williams, C. W. Rowley and L. N. Cattafesta, Improving separation control with noise-robust variants of dynamic mode decomposition, in 54th AIAA Aerospace Sciences Meeting , 2016, 1103.                                          |
| [13]  | M. S. Hemati, M. O. Williams and C. W. Rowley, Dynamic mode decomposition for large and streaming datasets, Physics of Fluids , 26 (2014), 111701.                                                                                                        |
| [14]  | T. K. Huckle, Efficient computation of sparse approximate inverses, Numerical Linear Algebra with Applications , 5 (1998), 57-71.                                                                                                                         |
| [15]  | R. Isermann and M. M¨nchhof, u Identification of Dynamic Systems: An Introduction with Applications , Springer Science & Business Media, 2010.                                                                                                            |
| [16]  | S. M. Kay, Fundamentals of Statistical Signal Processing , Prentice Hall PTR, 1993.                                                                                                                                                                       |
| [17]  | B. O. Koopman, Hamiltonian systems and transformation in Hilbert space, Proceedings of the National Academy of Sciences , 17 (1931), 315-318.                                                                                                             |

| [18]   | M. Korda and I. Mezi´, c Linear predictors for nonlinear dynamical systems: Koopman operator meets model predictive control, Automatica , 93 (2018), 149-160.                                                                     |
|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [19]   | J. N. Kutz, S. L. Brunton, B. W. Brunton and J. L. Proctor, Dynamic Mode Decomposition: Data-Driven Modeling of Complex Systems , vol. 149, SIAM, 2016.                                                                           |
| [20]   | S. Macesic, N. Crnjaric-Zic and I. Mezic, Koopman operator family spectrum for nonautonomous systems-part 1, arXiv preprint arXiv:1703.07324 .                                                                                    |
| [21]   | D. Matsumoto and T. Indinger, On-the-fly algorithm for dynamic mode decomposition using incremental singular value decomposition and total least squares, arXiv preprint arXiv:1703.11004 .                                       |
| [22]   | C. D. Meyer, Matrix Analysis and Applied Linear Algebra , SIAM, 2001.                                                                                                                                                             |
| [23]   | I. Mezi´, c Spectral properties of dynamical systems, model reduction and decompositions, Nonlinear Dynamics , 41 (2005), 309-325.                                                                                                |
| [24]   | I. Mezi´, c Analysis of fluid fows via spectral properties of the Koopman operator, Annual Review of Fluid Mechanics , 45 (2013), 357-378.                                                                                        |
| [25]   | I. Mezi´ c and A. Banaszuk, Comparison of systems with complex behavior, Physica D: Nonlinear Phenomena , 197 (2004), 101-133.                                                                                                    |
| [26]   | G. M. Oxberry, T. Kostova-Vassilevska, W. Arrighi and K. Chand, Limited-memory adaptive snapshot selection for proper orthogonal decomposition, International Journal for Numerical Methods in Engineering , 109 (2017), 198-217. |
| [27]   | J. L. Proctor, S. L. Brunton and J. N. Kutz, Dynamic mode decomposition with control, SIAM Journal on Applied Dynamical Systems , 15 (2016), 142-161.                                                                             |
| [28]   | J. L. Proctor and P. A. Eckhoff, Discovering dynamic patterns from infectious disease data using dynamic mode decomposition, International Health , 7 (2015), 139-145.                                                            |
| [29]   | C. W. Rowley, I. Mezi´, c S. Bagheri, P. Schlatter and D. S. Henningson, Spectral analysis of nonlinear flows, Journal of Fluid Mechanics , 641 (2009), 115-127.                                                                  |
| [30]   | P. J. Schmid, Dynamic mode decomposition of numerical and experimental data, Journal of Fluid Mechanics , 656 (2010), 5-28.                                                                                                       |
| [31]   | J. Sherman and W. J. Morrison, Adjustment of an inverse matrix corresponding to a change in one element of a given matrix, The Annals of Mathematical Statistics , 21 (1950), 124-127.                                            |
| [32]   | A. Surana, Koopman operator based nonlinear dynamic textures, in 2015 American Control Conference (ACC) , IEEE, 2015, 1333-1338.                                                                                                  |
| [33]   | J. H. Tu, C. W. Rowley, D. M. Luchtenburg, S. L. Brunton and J. N. Kutz, On dynamic mode decomposition: Theory and applications, Journal of Computational Dynamics , 1 (2014), 391-421.                                           |
| [34]   | M. O. Williams, I. G. Kevrekidis and C. W. Rowley, A data-driven approximation of the Koopman operator: Extending dynamic mode decomposition, Journal of Nonlinear Science , 25 (2015), 1307-1346.                                |
| [35]   | H. Zhang, C. W. Rowley, E. A. Deem and L. N. Cattafesta, Online dynamic mode decomposition for time-varying systems, SIAM Journal on Applied Dynamical Systems , 18 (2019), 1586-1609.                                            |
Mustaffa Alfatlawi Vaibhav Srivastava
An Incremental Approach to Online Dynamic Mode Decomposition for Time-Varying Systems with Applications to EEG Data Modeling
Dynamic Mode Decomposition (DMD) is a data-driven technique to identify a low
dimensional linear time invariant dynamics underlying high-dimensional data.
For systems in which such underlying low-dimensional dynamics is time-varying,
a time-invariant approximation of such dynamics computed through standard DMD
techniques may not be appropriate. We focus on DMD techniques for such
time-varying systems and develop incremental algorithms for systems without and
with exogenous control inputs. We build upon the work in [35] to scenarios in
which high dimensional data are governed by low dimensional time-varying
dynamics. We consider two classes of algorithms that rely on (i) a discount
factor on previous observations, and (ii) a sliding window of observations. Our
algorithms leverage existing techniques for incremental singular value
decomposition and allow us to determine an appropriately reduced model at each
time and are applicable even if data matrix is singular. We apply the developed
algorithms for autonomous systems to Electroencephalographic (EEG) data and
demonstrate their effectiveness in terms of reconstruction and prediction. Our
algorithms for non-autonomous systems are illustrated using randomly generated
linear time-varying systems.