Keywords

1 Introduction

Dynamic mode decomposition (DMD) is a data-driven, matrix decomposition technique developed using linear Koopman operator concept [1]. The key feature of DMD algorithm is its ability to extract both spatial and temporal patterns of the data where existing methods are restricted to either of the patterns [2]. DMD algorithm found its application in a variety of domain-specific applications, such as fluid flow analysis, neural data analysis, load forecasting, parameter estimation, and image processing. In all these applications, DMD identifies the underlying dynamics of the associated system through measured data [3]. This peculiar ability of DMD makes it a suitable choice for different tasks.

This chapter gives an overview of DMD algorithm and its application in various fields as an emerging data-driven algorithm. In this chapter, the capability of DMD algorithm for complex data analysis is well explored with numerous examples. To show the effectiveness and potential of DMD, the examples are selected from various disciplines with distinct applications. The rest of the chapter is organized as follows. Section 2 gives the theoretical explanations and mathematical descriptions of the DMD algorithm in detail. Section 3 discusses the applications of DMD in different disciplines of science and engineering. The applications considered in this chapter are harmonics monitoring and parameter estimation in smart grid, complex flow analysis in fluid dynamics, short-term forecasting of electric loads, and image saliency detection.

2 Dynamic Mode Decomposition Algorithm

The spatiotemporal data analysis tool known as dynamic mode decomposition (DMD) is built based on the concepts of singular value decomposition (SVD) [4]. DMD has revolutionized the fluid dynamics community due to its peculiar behavior to approximate the underlying dynamical characteristics of the system.

The DMD algorithm is closely related with proper orthogonal decomposition (POD), widely used in structural engineering and fluid dynamics. The POD is basically SVD. The data measurements for POD and DMD are assumed to be spatial data arranged in the form of a matrix. Mathematically speaking, the data we are capturing are a function over a rectangular field. The function value is assumed to be varying over time. To study its dynamics, snapshots are taken at regular interval of time. Figure 1 indicates the visualization of the data as snapshots over time.

Fig. 1
figure 1

Illustration of the data as snapshots

The time-indexed vector data are arranged in the form of columns in a matrix X as shown in Fig. 2. The time index is varied from 1 to m.

Fig. 2
figure 2

Illustration of the data arranged as the columns of matrix X

The X matrix is defined as follows:

$$ X=\left(\underset{\mid }{\overset{\mid }{x_1}}\kern0.5em \underset{\mid }{\overset{\mid }{x_2}}\kern0.5em \dots \kern0.5em \underset{\mid }{\overset{\mid }{x_m}}\right)\vspace*{-3pt} $$
(1)

The SVD factorization of matrix X yields,

$$ X=U\Sigma {V}^T $$
(2)

Here, the data are assumed to be the sum of several independent spatial structures evolving over time. This interpretation is possible if we split the matrix as a sum of several rank one matrices. For this, we consider the following two matrices as shown in Fig. 3.

Fig. 3
figure 3

Illustration of two matrices U and ΣV T

It is possible to express X as outer product of vectors from these two matrices. It is defined as follows:

$$ X={u}_1{\sigma}_1{v}_1^T+{u}_2{\sigma}_2{v}_2^T+..\ldots +{u}_m{\sigma}_m{v}_m^T $$
(3)

The columns of U are called POD modes and are pairwise and mutually orthogonal. Corresponding to each column vector u k, there is a scaled row vector \( {\sigma}_k{v}_k^T \) which specify the evolution of u k over time indices from 1 to m and beyond. u k in turn may be reshaped into the original matrix form. So, the term \( {u}_k{\sigma}_k{v}_k^T \) may be visualized as a matrix of values (structural patterns in data) evolving over time. This is picturized in Fig. 4.

Fig. 4
figure 4

Picturization of POD modes and its evolution over time

Upon comparing with POD, DMD is a much more powerful concept, and it assumes that the evolution of the function over the rectangular field is affected by the mapping of a constant matrix A. This concept is illustrated through Fig. 5.

Fig. 5
figure 5

Visualization of data mapping using A matrix

DMD assumes that this A matrix captures the system’s inherent dynamics, and thus, DMD objective is to find the A or equivalently its dominant eigenvalues and eigenvectors [5]. The size of the matrix is decided by the size of the column vector in X data matrix. If the column size is 1000 × 1, then size of the matrix A is 1000 × 1000. One assumption used here is that this matrix A is of low rank, and hence, the sequence of vectors \( \underset{\mid }{\overset{\mid }{x_1}},\underset{\mid }{\overset{\mid }{x_2}},\underset{\mid }{\overset{\mid }{x_3}},\dots \underset{\mid }{\overset{\mid }{,{x}_k}},\dots, \underset{\mid }{\overset{\mid }{x_m}} \) finally becomes a linearly dependent set. That is, vector \( \underset{\mid }{\overset{\mid }{x_m}} \) becomes linearly dependent on previous vectors.

Now, let us try to express data matrix X in terms of eigenvectors associated with matrix A as follows:

$$ {\displaystyle \begin{array}{l}{A}^k{x}_1={\Phi \Lambda}^k{\Phi}^{\dagger }{x}_1={\Phi \Lambda}^kb\\ {}{A}^k{x}_1={\Phi \Lambda}^k{\Phi}^{\dagger }{x}_1={\Phi \Lambda}^kb={x}_{k+1}\end{array}} $$
(4)

where Φ is pseudo inverse of Φ. Here, we assume matrix A of rank m. Hence, Φ is having only m columns. That exactly is the reason for taking pseudoinverse rather than inverse. The columns of Φ are called the DMD modes. Eq. (4) can be written as follows:

$$ {x}_{k+1}=\Phi \left(\begin{array}{c}{\lambda}_1^k{b}_1\\ {}{\lambda}_2^k{b}_2\\ {}\vdots \\ {}{\lambda}_m^k{b}_m\end{array}\right)=\left(\begin{array}{cccc}\underset{\mid }{\overset{\mid }{\phi_1}}& \underset{\mid }{\overset{\mid }{\phi_2}}& \dots & \underset{\mid }{\overset{\mid }{\phi_m}}\end{array}\right)\left(\begin{array}{c}{\lambda}_1^k{b}_1\\ {}{\lambda}_2^k{b}_2\\ {}\vdots \\ {}{\lambda}_m^k{b}_m\end{array}\right) $$
(5)

For k = 0, Eq. (5) yields,

$$ {x}_1=\left(\begin{array}{cccc}\underset{\mid }{\overset{\mid }{\phi_1}}& \underset{\mid }{\overset{\mid }{\phi_2}}& \dots & \underset{\mid }{\overset{\mid }{\phi_m}}\end{array}\right)\left(\begin{array}{c}{b}_1\\ {}{b}_2\\ {}\vdots \\ {}{b}_m\end{array}\right) $$

For k = 1, Eq. (5) yields,

$$ {x}_2=\left(\begin{array}{cccc}\underset{\mid }{\overset{\mid }{\phi_1}}& \underset{\mid }{\overset{\mid }{\phi_2}}& \dots & \underset{\mid }{\overset{\mid }{\phi_m}}\end{array}\right)\left(\begin{array}{c}{\lambda}_1^1{b}_1\\ {}{\lambda}_2^1{b}_2\\ {}\vdots \\ {}{\lambda}_m^1{b}_m\end{array}\right) $$

And finally, for k = m − 1, Eq. (5) yields,

$$ {x}_m=\left(\begin{array}{cccc}\underset{\mid }{\overset{\mid }{\phi_1}}& \underset{\mid }{\overset{\mid }{\phi_2}}& \dots & \underset{\mid }{\overset{\mid }{\phi_m}}\end{array}\right)\left(\begin{array}{c}{\lambda}_1^m{b}_1\\ {}{\lambda}_2^m{b}_2\\ {}\vdots \\ {}{\lambda}_m^m{b}_m\end{array}\right) $$

Now following the above relation, we can express data matrix X as the sum of m rank-1 matrices. Each such matrix can be thought of as time evolution of DMD mode.

$$ X={b}_1\underset{\mid }{\overset{\mid }{\phi_1}}\left(\begin{array}{cccc}1& {\lambda}_1^1& \cdots & {\lambda}_1^m\end{array}\right)+{b}_2\underset{\mid }{\overset{\mid }{\phi_2}}\left(\begin{array}{cccc}1& {\lambda}_2^1& \cdots & {\lambda}_2^m\end{array}\right)+\cdots +{b}_m\underset{\mid }{\overset{\mid }{\phi_m}}\left(\begin{array}{cccc}1& {\lambda}_m^1& \cdots & {\lambda}_m^m\end{array}\right) $$
(6)

Now the remaining question is how to find the eigenvalues and eigenvectors of A in an efficient way. For answering this question, DMD forms two data matrices (X 1 and X 2) as defined below using the data measurements.

$$ {X}_1=\left(\begin{array}{cccc}\underset{\mid }{\overset{\mid }{x_1}}& \underset{\mid }{\overset{\mid }{x_2}}& \dots & \underset{\mid }{\overset{\mid }{x_{m-1}}}\end{array}\right) $$
(7)
$$ {X}_2=\left(\begin{array}{cccc}\underset{\mid }{\overset{\mid }{x_2}}& \underset{\mid }{\overset{\mid }{x_3}}& \dots & \underset{\mid }{\overset{\mid }{x_m}}\end{array}\right) $$
(8)

The relation between the data matrices, X 1 and X 2, is defined using the A matrix.

$$ {X}_2={AX}_1 $$
(9)

By taking the SVD of the data matrix, X 1

$$ {X}_1=U\Sigma {V}^H $$
(10)

By substituting Eq. (10) in Eq. (9) gives

$$ A={X}_2{X}_1^{\dagger }=\underset{B}{\underbrace{X_2V{\Sigma}^{\dagger }}}{U}^H\Rightarrow AU=B $$
(11)

However, for many practical applications, A will be a large dimension matrix and its eigendecomposition becomes a computational burden [6]. Hence, a rank reduced matrix, \( \tilde{A} \), which shares the same nonzero eigenvalues of A is introduced to resolve the issue. For deriving the expression for \( \tilde{A} \), consider expressing each data vector in terms of POD modes (the POD modes of data matrix X 1 are column vectors in U).

The data vector x 1 is expressed as the linear combinations of POD modes as follows:

$$ U{\tilde{x}}_1={x}_1 $$
(11)

Equation (11) can also be thought as a projection of data vector x 1 on POD modes and is equivalent to \( {x}_1^HU={\tilde{x}}_1^H \). Here, the tuple size of \( {\tilde{x}}_1 \) is far less than that of x 1, since the numbers of POD modes are few (less than m). Following the above interpretation, the k th and k + 1th data vectors are expressed as follows:

$$ {x}_k=U{\tilde{x}}_k\kern0.5em \mathrm{and}\kern0.5em {x}_{k+1}=U{\tilde{x}}_{k+1} $$
(12)

By taking the concept explained in Fig. 5, it is possible to express x k + 1 in terms of A as follows:

$$ {x}_{k+1}={Ax}_k $$
(13)

Now from Eq. (12) and Eq. (13),

$$ U{\tilde{x}}_{k+1}= AU{\tilde{x}}_k\Rightarrow {\tilde{x}}_{k+1}={U}^H AU{\tilde{x}}_k={\tilde{A}\tilde{x}}_k $$
(14)

That is,

$$ {\tilde{A}\tilde{x}}_k={\tilde{x}}_{k+1} $$
(15)

The matrix \( \tilde{A} \) defined in Eq. (15) represents the low-dimensional dynamical evolution. From this, we can easily infer original dynamics using the relation \( {x}_k=U{\tilde{x}}_k \).

Now, by combining Eq. (11) and Eq. (15),

$$ \tilde{A}={U}^H AU\Rightarrow \tilde{A}={U}^HB $$
(16)

The matrix \( \tilde{A} \) is a very low-dimensional matrix compared to A and shares the same set of nonzero eigenvalues with A. The spectral decomposition of \( \tilde{A} \) yields,

$$ \tilde{A}=W\Lambda {W}^{-1} $$
(17)

Here, W denotes the eigenvector matrix and Λ denotes the eigenvalue matrix of\( \tilde{A} \). The dynamic mode matrix, Φ, is obtained as follows:

$$ \Phi = BW={X}_2V{\Sigma}^{\dagger }W $$
(18)

The columns of dynamic mode matrix, Φ, represent the eigenvectors of A.

3 Applications of DMD

This section explains the applications of DMD in different disciplines of science and engineering. Due to the increased availability of huge data measurements, the usage and application of data-driven algorithms like DMD are exponentially growing. An illustration of the usage of DMD in different disciplines is depicted through Fig. 1. As evident from Fig. 6, the DMD algorithm can be used for various domains, such as fluid dynamics, financial markets, text analytics, control, multimedia, smart grid, images, and medical sciences. This section describes a few important applications of DMD.

Fig. 6
figure 6

Illustration of the data-driven analysis using DMD in different disciplines

Smart grid:

Due to the introduction of distributed generation systems, renewable energy sources, and flexible loads, electric grid is facing issues related to power quality, stability, reliability, control, and protection. In the recent past, DMD is widely being exploited for different smart grid applications, such as stability analysis and modal identification [7, 8]. Here, we are discussing the application of DMD for harmonics monitoring and parameter estimation in power grids [9]. The frequency information of power signals is possible to extract using the eigenvalues of dynamic mode matrix. In [9], the authors have developed a novel methodology for detecting the frequencies in power signals by employing shift-stacked data matrix concept and SVD hard thresholding. The stacking of multiple time-shifted copies of power signals to form the initial data matrices helps to overcome the limitation of DMD algorithm to extract the multiple frequency components. Further, the singular value-based hard thresholding eliminates the singular values that corresponds to noises and other uncertainties in power signals. The performance of DMD for detecting the multiple frequencies and associated amplitudes in power quality (PQ) signals are shown in Fig. 7. DMD has prominent results than various other data-adaptive algorithms, such as variational mode decomposition, empirical wavelet transforms, and synchro-squeezing transforms, for power signal analysis [10,11,12].

Fig. 7
figure 7

Performance of the DMD for detecting the disturbance components in PQ signal

Fluid dynamics:

Fluid flows are characterized by several temporal features and spatial coherent structures. Extraction of oscillatory modes and growth/decay rates of each mode is needed for the characterization of flow data. DMD algorithm is initially been proposed for turbulent fluid flow analysis [3]. DMD identifies the coherent structures of fluid flow and which can be used for extracting the oscillating modes and its growth/decay rates [13]. Understanding of these structures is important to characterize the dynamical behavior of fluid flow. The analysis by considering a dataset pertaining to fluid flow around a circular cylinder at Reynolds number Re = 100 using DMD is shown in Fig. 8. In this example, we are interested in computing the first r = 15 dominant DMD modes by considering the corresponding eigenvalues. The eigenvalues captured over the unit circle indicate the stable DMD modes, and these can be further used for finding the associated coherent structures in the data.

Fig. 8
figure 8

The DMD eigenvalues correspond to 15 dominant modes in the absence of noise with r = 15

Forecasting:

Another prominent application of DMD is forecasting/prediction of time-series data. DMD captures the features of the measured time-series data and is been utilized for prediction of future system state. DMD is mapped for financial forecasting in financial markets [14] and short-term load forecasting (STLF) in the power grid [15]. In [15], a novel data-driven strategy for STLF task is proposed using DMD. In this model, the ability of DMD to extract the meaningful, hidden tractable information from load series data is utilized for STLF. The main advantage of the model is the capability to handle the load series data that is affected by multiple factors, including time, day, seasons, climate, and socioeconomic activities. To forecast the load demand for a selected day, (1) data from two immediate previous days, (2) data from the same day in the previous week, and (3) data from the previous day in the previous week are used. Independent of heavy training stages, less amount of input data, and no parameter tuning are the key features of DMD-based STLF strategy. The DMD-based STLF model is adaptive to multiple seasonal and cyclic patterns in load data and thus offers an improved generalization ability for load prediction of different seasons. On comparing with single stage and ensemble models, DMD-based model is less complex and offers fast estimation. Thus, this model can be used as an efficient tool for STLF in interconnected smart grid.

Figure 9 demonstrates the forecasting ability of DMD model for one-day ahead task. As clear from Fig. 9, the model predicts the day-ahead load more precisely than conventional autoregressive approaches.

Fig. 9
figure 9

One-day ahead forecasting results using DMD approach on Australian grid data. Forecasting results for (a) 10-Feb-2017, (b) 15-Apr-2017, (c) 27-Jul-2017, (d) 15-Oct-2017

Image analysis:

The analytical property of DMD is been exploited for image processing applications. To effectively utilize DMD for static image processing applications, a dynamic representation of image data is needed. Here, we are discussing about saliency region detection and segmentation application of DMD [16]. In [16], the authors have proposed a novel idea to import dynamicity to static images by exploiting the color and luminance information. The full resolution salient maps are created in this way. Thus, this work utilized the analytical power of DMD for image saliency and segmentation application in color images. The developed saliency maps using DMD can be used for image classification, object detection, and image retrieval applications. The image saliency detection results of the DMD method is shown in Fig. 10. As evident from Fig. 10, the saliency maps created using DMD capture the saliency information in the images accurately.

Fig. 10
figure 10

The results of DMD-based image saliency detection

4 Conclusion

The data-driven algorithms are widely explored to deal with the heterogeneous data available in different discipline of science, engineering, and medicine as it can extract more valuable information regarding the underlying system. The dynamic mode decomposition (DMD) is a leading data-driven algorithm that decomposes the complex systems into spatiotemporal coherent structures or modes. The modes can be used for identifying the latent dynamic characteristics of the underlying system. Originated in fluid dynamics community, DMD has gained its attention in different domains for various tasks, such as system analysis, forecasting, image analysis, video processing, and control systems. This chapter provides the details of DMD algorithm with mathematical explanations. The characteristics of DMD algorithm is explained with respect to POD and SVD, both are dominant techniques for data analysis. This chapter also covers the application of DMD in frequency estimation in smart grid, fluid flow analysis, short-term load forecasting, and image saliency detection tasks. Through the evaluation, it is concluded that DMD can be used as an emerging data-driven tool for various applications in different domains.