Abstract
Recent advancements in sensing and communication facilitate obtaining highfrequency realtime data from various physical systems like power networks, climate systems, biological networks, etc. However, since the data are recorded by physical sensors, it is natural that the obtained data is corrupted by measurement noise. In this paper, we present a novel algorithm for online realtime learning of dynamical systems from noisy timeseries data, which employs the Robust Koopman operator framework to mitigate the effect of measurement noise. The proposed algorithm has three main advantages: (a) it allows for online realtime monitoring of a dynamical system; (b) it obtains a linear representation of the underlying dynamical system, thus enabling the user to use linear systems theory for analysis and control of the system; (c) it is computationally fast and less intensive than the popular extended dynamic mode decomposition (EDMD) algorithm. We illustrate the efficiency of the proposed algorithm by applying it to identify the Van der Pol oscillator, the chaotic attractor of the Henon map, the IEEE 68 bus system, and a ring network of Van der Pol oscillators.
Similar content being viewed by others
Introduction
The field of dynamical systems was born with the works of Sir Issac Newton^{1}. Since its humble beginnings, it has developed into a matured branch of pure mathematics with applications to most branches of science and engineering. For almost three hundred years, the approach to studying dynamical systems was modelbased, in which the system under study is modeled from first principles. However, this approach has severe limitations when studying systems like power networks, biological networks, stock markets, etc., which are inherently highly nonlinear and typically largescale. As such it is almost impossible to model these dynamical systems from first principles. The way to circumvent this problem is to use datadriven techniques, in which the governing equations of motion are learned directly from timeseries data of the states of the system.
Of the various datadriven learning methods, in recent years, the Koopman operator approach^{2,3,4,5,6,7,8,9} has been used extensively for the datadriven learning of dynamical systems. Compared to machine learning (ML) methods, the Koopman operator framework has multiple advantages, with the major factor being the fact that the amount of training data required by Koopman operator approaches is far less compared to ML methods. Furthermore, the Koopman operator is a linear operator that generates an equivalent linear representation of the nonlinear system, which allows us to use concepts from linear systems theory for the analysis and control design for nonlinear systems^{10,11}.
Given a dynamical system, instead of looking at the evolution of trajectories, the Koopman operator governs the evolution of functions on the state space under the dynamical map. The main advantage of this framework, as mentioned earlier, is the fact that the Koopman operator is a linear operator, but the tradeoff is that it is an infinitedimensional operator. Hence, given any general nonlinear system, the corresponding Koopman operator generates an infinitedimensional linear system, which is an exact representation of the nonlinear system and, unlike linearization, is valid globally on the state space. Furthermore, the Koopman framework facilitates datadriven learning of dynamical systems^{8,12} and has been extensively used for datadriven learning in synthetic biology^{13,14}, building systems^{15,16}, climate systems^{17}, robotics^{18,19}, neuroscience^{20}, and power systems^{21,22,23}, where a finitedimensional approximation of the Koopman operator is computed from timeseries data of the dynamical states.
However, when it comes to using datadriven learning of real physical systems, it is often a requirement that the learning framework learns the dynamics in an online fashion and in realtime. This is especially relevant for power networks, stock markets, building systems etc., which demand constant monitoring to ensure efficient and reliable operation. For example, a power network is exposed to multiple adversarial events like sudden load changes, faults and attacks^{24} and as such, it is imperative to monitor the power network constantly to identify any adversarial event as soon as possible and to take appropriate measures to ensure safe operation. Therefore, there is a need for a framework that can learn the underlying dynamics online and in real time^{25}. Moreover, since the data is obtained from physical sensors, it is often the case that the data obtained is corrupted by noise.
Koopman operator based learning of dynamical systems is one of the many ways to learn a dynamical system and recently, machine learning (ML) and deep learning (DL) based methods have gained attention. One of the popular methods is reservoir computing (RC)^{26} and in^{27} the authors have connected reservoir computing with Koopman operators, but the connection is only to dynamic mode decomposition (DMD). DMD is a very special case of computing the Koopman operator, where the dictionary functions are just the states of the system. Though DMD does well in some cases, it does not identify the attractor sets, which extended dynamic mode decomposition (EDMD) can do^{4} EDMD uses nonlinear dictionary functions and thus is more general than DMD and is known to capture the nonlinear characteristics of a systems much better than DMD^{4}. Furthermore, in^{28}, the authors propose Next Generation RC (NGRC) which has been shown to use less data for training. However, in^{29} the authors show that NGRC “frameworks struggle to learn the dynamics unless key information about the underlying system is already known”. Hence, on one hand the traditional RC require lot of data for training, whereas NGRC needs some a priori information about the underlying dynamics for learning the system efficiently. Also, there is the issue of interpretability, which is not present in the Koopman framework.
In this paper, we aim to address the problem of datadriven learning from noisy data in an online fashion and in realtime. In particular, we use the Robust Koopman operator framework^{6,30} to mitigate the effect of measurement noise. and extend this work to provide a framework for computing the Koopman operator from similar streaming noisy data and show how the Koopman operator can be computed in an iterative manner. We further give evidence that the current framework is computationally more efficient compared to existing Koopman computation method, namely the extended dynamic mode decomposition (EDMD) algorithm. Furthermore, we propose a recursive algorithm to learn the Koopman representation of the underlying system, so that the Koopman operator gets updated as each new data point streams in. Thus the main contributions of the paper are the following:

We propose a framework for computing the Koopman operator when there is both process and measurement noise.

We propose an algorithm which can compute the Koopman operator in an online way and thus it facilitates realtime learning of the underlying dynamical system.

We provide numerical evidence that the proposed algorithm is significantly faster than the existing extended dyanmic mode decomposition (EDMD) algorithm.
This manuscript is organized as follows: in “Transfer operators”, we discuss the basics of transfer operators for dynamical systems, followed by the formulation of the Robust Koopman operator computation algorithm in “Robust Koopman operator”. The main results of the paper are presented in “Online learning of robust Koopman operator”, where we derive and describe the online learning algorithm. In “Simulation results”, we illustrate the efficiency of the proposed algorithm by applying it to three different dynamical systems, namely, a Van der Pol oscillator, the IEEE 68 bus system and a ring network of Van der Pol oscillators. Finally, we conclude the paper in “Conclusions”.
Transfer operators
Consider a discretetime dynamical system
where \(T:X\subset {\mathbb {R}}^N \rightarrow Z\) is assumed to be at least of class \({{\mathcal {C}}}^1\). Associated with the dynamical system (1) is the Borel\(\sigma \) algebra \({{\mathcal {B}}}(X)\) on X and the vector space \({{\mathcal {M}}}(X)\) of bounded complexvalued measures on X. With this, two linear operators, namely, the Perron–Frobenius (P–F) and the Koopman operator, can be defined as follows^{2}:
Definition 1
(Perron–Frobenius operator) The Perron–Frobenius operator \({\mathbb {P}}:{{\mathcal {M}}}(X)\rightarrow {\mathcal {M}}(X)\) is given by
where \(\delta _{T(x)}(A)\) is the stochastic transition function that measures the probability that point x will reach the set A in onetime step under the system mapping T.
Definition 2
(Invariant measures) Invariant measures are the fixed points of the P–F operator \({\mathbb {P}}\) that are also probability measures. Let \({\bar{\mu }}\) be the invariant measure then, \(\bar{\mu }\) satisfies
If the state space Z is compact, it is known that the P–F operator admits at least one invariant measure.
Definition 3
(Koopman operator) Given any \(h\in {\mathcal {F}}\), \({\mathbb {U}}:{{\mathcal {F}}}\rightarrow {{\mathcal {F}}}\) is defined by
where \({\mathcal {F}}\) is the space of function (observables) invariant under the action of the Koopman operator.
Both the P–F and the Koopman operators are linear operators even if the underlying system is nonlinear and while the analysis is made tractable by linearity, the tradeoff is that these operators are typically infinitedimensional (see Fig. 1). In particular, the P–F and Koopman operators lift a dynamical system from a finitedimensional space to generate an infinitedimensional linear system on the space of distributions and functions respectively.
Robust Koopman operator
The Koopman operator is infinitedimensional, but for computational purposes, one has to compute a finitedimensional approximation of the Koopman operator from timeseries data. The most commonly used approach for computing the finitedimensional approximation is known as extended dynamic mode decomposition (EDMD)^{4}.
Extended dynamic mode decomposition
Let
be M data points from a Ndimensional system \(x_t\mapsto T(x_t)\), which evolves on \({\mathbb {R}}^N\). Let
be the set of vectorvalued Koopman observables such that each \(\psi _i:{\mathbb {R}}^N\rightarrow {\mathbb {R}}\) is squareintegrable. Let
Then the finitedimensional approximation \(\textbf{K}\in {\mathbb {R}}^{K\times K}\) is obtained as the solution of the optimization problem
where \(\textbf{G}\) and \(\textbf{A}\) are given by (2).
Robust Koopman operator
The standard approach to compute the Koopman operator from timeseries data is by solving the optimization problem (3). However, in presence of noise in the data, (3) leads to erroneous Koopman operators and one has to explicitly take into account the noise in the data, while computing the Koopman operator.
Consider a discrete time random dynamical system perturbed with additive noise so that the equations of motion are given by
where \(T:X\times W \rightarrow X\) with \(X\subset {\mathbb {R}}^N\) is assumed to be invertible with respect to x for each fixed value of \(\xi \) and smooth diffeomorphism. We assume \(\xi _t\in W\) is independent identically distributed (i.i.d) random variable with probability distribution \(\vartheta \) i.e.,
for every set \(B\subset W\) and all t. Let \({{\mathcal {B}}}(X)\) denote the Borel\(\sigma \) algebra on X and \({{\mathcal {M}}}(X)\) the vector space of bounded realvalued measure on X. With this, we consider snapshots of data set obtained from simulating a discrete time random dynamical system \(x\rightarrow T(x,\xi )\) or from an experiment
where \(x_i\in X\subset {\mathbb {R}}^n\). The dataset \(\{x_k\}\) is a sample path trajectory generated by a random dynamical system and could be corrupted by either process or measurement noise or both. Let \(\{x_k\}_{k=1}^M\) be the one realization of the sample path trajectory generated by RDS.
Assumption 4
Let \(\{x_k\}_{k=1}^M\) be the sample path trajectory of the RDS (4). We assume that the other sample path trajectories, \(\{{\tilde{x}}_k\}_{k=1}^M\) satisfies
for some norm bounded uncertainty set \(\Delta \).
Note that the uncertainty set \(\Delta \) will be related to set W containing the random variable \(\xi \) and the probability distribution \(\vartheta \). However, in our proposed deterministic approach to stochastic uncertainty, we assume that the uncertainty set \(\Delta \) is normbounded. For example
restrict the 2norm of \(\delta \) to \(\rho \). There can be other forms for the uncertainty set \(\Delta \). For details see^{6}.
We also consider measurement noise so that the measurements are of the form
where \(\xi (t)\) is independent and normally distributed with zero mean and variance \(\sigma ^2\).
The uncertainty in the data acts as an adversary which tries to maximize the residual error of the optimization problem which computes the Koopman operator, and hence to obtain the Koopman operator \(\textbf{K}\) for uncertain data, a robust optimization problem is formulated as the following \(\min \max \) optimization problem^{6,30}.
where
with \(\textbf{K},\textbf{G}_\delta ,\textbf{A}_\delta \in {\mathbb {C}}^{K\times K}\) and \(\Delta \) is the bounded uncertainty set.
The robust optimization problem (9), is in general nonconvex because the cost \({\mathcal {J}}\) may not be a convex function of \(\delta \).
Proposition 5
The optimization problem (9) can be approximated as
where \({\mathcal {U}}\) is a compact set in \({\mathbb {R}}^{K\times K}\).
Proof
From Taylor series expansion we have, \({\varvec{\Psi }}(x_i+\delta x_i) = {\varvec{\Psi }}(x_i) + {\varvec{\Psi }}'(x_i) \delta x_i+h.o.t.\), where \(\mathbf{\Psi }'(x_i)\) is the first derivative of \({\varvec{\Psi }}(x)\) at \(x_i\). Hence,
where \(\delta \textbf{G} = \frac{1}{M}\sum _{i=1}^{M}{\varvec{\Psi }}^\top (x_i)\delta z_i {\varvec{\Psi }}'(x_i)\).
Moreover,
Hence, \(\delta \textbf{G}\) belongs to a compact set \({{\mathcal {U}}}_1\). Similarly, one can show \(\textbf{A}_\delta \approx \textbf{A} + \delta \textbf{A}\) and \(\delta \textbf{A}\) belongs to a compact set \({{\mathcal {U}}}_2\). Letting \({{\mathcal {U}}}={{\mathcal {U}}}_1\cup {{\mathcal {U}}}_2\), proves the proposition. \(\square \)
With this, we have the following theorem, which derives a regularized leastsquares optimization problem whose solution is the Robust Koopman Operator.
Theorem 6
The optimization problem
is equivalent to the following optimization problem
where \(\lambda >0\) is a constant dependent on the bound of the noise.
Proof
For a \(K\times K\) matrix \(M=[m_{i,j}]\in {\mathbb {R}}^{K\times K}\), let \({{\mathcal {M}}}\) denote the vector
This follows from the fact that \({\mathbb {R}}^{K\times K} \cong {\mathbb {R}}^{K^2}\). Hence,
For two matrices A and B, let \(A \otimes B\) denote the Kronecker product of A and B. Let \({{\mathcal {K}}}\) be the vector form of \(\textbf{K}\) and let \({\mathcal {A}}\) and \(\delta {{\mathcal {A}}}\) be the vector forms of A and \(\delta A\), respectively.
Then, the min–max optimization problem can be written as
where \(I_K\) is the \(K\times K\) identity matrix. Writing \(\textbf{G}\otimes I_K\) as \(\hat{G}\) and \(\delta \textbf{G}\otimes I_K\) as \(\delta \hat{G}\), the optimization problem (14) can be written as
where \(\Pi _K{{\mathcal {U}}}\) is the projection of \({\mathcal {U}}\) on \({\mathbb {R}}^{K\times K}\otimes {\mathbb {R}}^{K\times K}\).
Fix \(\textbf{K}\in {\mathbb {R}}^{K\times K}\) and let
be the worstcase residual. Then,
Again, choose \([\delta \hat{G} \quad \delta \hat{A}]\) as
where
Then,
Hence, from (17) and (19), the worst case residual is
Since, K is a constant, the \(\textbf{K}\) that minimizes r in (20) is the same \(\textbf{K}\) that minimizes
\(\square \)
Online learning of robust Koopman operator
The Koopman operator is generally computed by solving the optimization problem (13) or directly using the formula
where I is the identity matrix of appropriate dimensions. Note that for computing the Koopman operator one needs to use the entire dataset and hence when a new data point streams in the Koopman operator needs to be recalculated from scratch using the new larger data set. However, this requires the inversion of a matrix, which is computationally expensive, especially for datasets obtained from largedimensional systems. This necessitates developing a recursive algorithm for Robust Koopman operator computation. In this section, we describe an algorithm that computes the Koopman operator recursively and thus reducing the computational cost.
Let
be M data points obtained from simulation of a dynamical system \(x\mapsto T(x)\) or from an experiment, where \(y_i=T(x_i)\). Let
be the data points in the lifted space \(({\mathbb {R}}^K)\), where the points \(x_i\) and \(y_i\) are mapped by the Koopman dictionary functions \({\varvec{\Psi }}\). Let
be the Koopman operator obtained by using the M data points. Now, a new data point \((x_{M+1},y_{M+1})\) is acquired. The problem is to update the Koopman operator \({\textbf{K}}_M\) to \(\textbf{K}_{M+1}\), without explicitly computing the inverse of \(({\textbf{G}}_{M+1}+\lambda I)\).
Note that (24) can be rewritten as
where
and \({\varvec{\Psi }}(X_i)\) and \({\varvec{\Psi }}(Y_i)\) are the ith columns of \({\varvec{\Psi }}(X_M)\) and \({\varvec{\Psi }}(Y_M)\) respectively.
Now, as the new data point \(y_{M+1}=T(x_{M+1})\) streams in, the updated Koopman operator \({\textbf{K}}_{M+1}\) satisfies
where
Now,
Hence, using the matrix inversion lemma, we have
Moreover,
Hence, from (27),
Equation (31) gives the formula for updating the Koopman operator as new data streams in, without explicitly computing the inverse at every step, thus reducing the computational cost and hence improving efficiency.
Initialization of the algorithm
Equation (31) gives the updated Koopman \({\textbf{K}}_{M+1}\) operator in terms of quantities computed from the previous time step. Note that the updated Koopman operator \({\textbf{K}}_{M+1}\) depends on an inverse, namely, \(\hat{\textbf{G}}_M^{1}\). Hence, for computing the Koopman operator \({\textbf{K}}_1\), one needs to initialize both \(\hat{\textbf{G}}_0\) and \({\textbf{A}}_0\). One potential way out of this situation is to compute the Koopman operator \({\textbf{K}}_q\) using the initial q data points \((x_i,y_i)\), \(i=1,2,\ldots ,q\), \(q<M\) as
and use the corresponding \(\hat{\textbf{G}}_q\) and \({\textbf{A}}_q\) to compute the updated Koopman operators \({\textbf{K}}_n\), \(n>q\).
For practical applications, we set
where \(\lambda >0\), \(I_K\) is the \(K\times K\) identity matrix, and \(0_K\) is the \(K\times K\) zero matrix.
Remark 7
Initializing the parameter \(\delta \) can be tricky and usually one should run the algorithm multiple times, with different \(\delta \) on a given training dataset and choose the one which has the lowest error for some validation dataset. However, since the Koopman operator is a Markov operator one does not need to look at the error for many different runs, but can just choose the \(\delta \) for which the Koopman operator has at least one unit eigenvalue.
Simulation results
In this section, we demonstrate and discuss the properties of the proposed framework for iterative learning of dynamical models from noisy timeseries data. All the simulations were done on a 2019 Macbook Pro with 16GB 2667 MHz DDR4 RAM and 2.3 GHz 8Core Intel Core i9 processor.
Van der Pol oscillator
Consider a noisy Van der Pol oscillator, whose equation of motion is given by
where \(x\in {\mathbb {R}}\) is the position variable, \(\mu \ge 0\) is the damping coefficient, \(\sigma >0\) is a constant, and \(\xi _t\in {\mathbb {R}}^2\) is independent and identically distributed Gaussian noise of zero mean and unit variance. For simulation purposes, we chose \(\mu = 0.8\) and \(\sigma = 0.2\) and data were sampled at an interval of 0.01 s. The phase portrait of the noisy Van der Pol oscillator is shown in Fig. 2.
We considered a single trajectory data, from a random initial condition, as the training data and used 40 radial Gaussian basis functions as the Koopman observables. Figure 3 shows that the RREDMD (recursive robust extended dynamic mode decomposition) algorithm recovers the stable limit cycle of the Van der Pol oscillator as new datapoints stream in and the Koopman operator gets updated. In particular, Fig. 3a shows that the eigenvector corresponding to the unit eigenvalue of the Koopman operator obtained after 500 data points have streamed in has partially identified the stable limit cycle. However, as more data points stream in, the identified region of the limit cycle grows and in Fig. 3b we find that with 2000 data points, the complete limit cycle has been identified.
However, the biggest advantage of the RREDMD formulation is the fact that it is much faster compared to EDMD. To compare the computational cost of RREDMD and EDMD, we present in Fig. 4 the computation times of both the algorithms for learning the Koopman operator as new datapoints stream in. It can be seen the computation time of the RREDMD algorithm varies linearly with the number of iterates, whereas for EDMD it varies almost quadratically. This establishes a clear advantage of the RREDMD algorithm over EDMD and it is this fact that facilitates the use of RREDMD framework for online realtime learning of dynamical systems from streaming data.
Henon map
In this example we consider a chaotic system, namely the Henon map. The Henon map is a two dimensional discretetime system with a chaotic attractor with the equations of motion are given by
For this example, we added both process and measurement noise so that the noisy Henon map is given by
where \(\xi _t\) is the 2dimensional i.i.d. Gaussian process noise with zero mean and variance 0.002, \(\Theta _t\) is the observed output and \(\eta _t\) is the 2dimensional i.i.d. Gaussian measurement noise with zero mean and variance 0.01. Note that in order to keep the chaotic nature of the Henon map intact, we use very small process noise. With this the phase portrait for the deterministic Henon map, the phase portrait for Henon map with only process noise and the phase portrait for Henon map with both process and measurement noise state are shown in Fig. 5a–c.
With these the regularization parameter in Algorithm 1 was chosen to be \(\lambda = 0.008\) and the initialization parameter \(\delta \) was set to 0.001. As can be seen from Fig. 5d–f, our iterative framework gradually recovers the chaotic attractor from the noisy data. In particular, figure shows the leading eigenfunctions (eigenvector of the Koopman operator corresponding to the largest eigenvalue) on the phase space and we see that as more data points stream in, the chaotic attractor is indeed being identified.
IEEE 68 bus system
We now discuss the application of the proposed RREDMD algorithm to a power system. We consider synthetic timeseries measurements corresponding to the 68bus power network with 16 generators shown in Fig. 6. The synthetic measurements are generated using GridSTAGE^{31}, a power system toolboxbased simulation platform that emulates PMU measurements corresponding to load changes or faults or adversarial actions.
For the realtime learning of power system dynamics, random and large load changes are created using GridSTAGE. Although the synthetic timeseries measurements obtained through GridSTAGE are free of noise, the practical PMU measurements will not be due to the effect of communication uncertainties. Hence, random noise is artificially added to the synthetic PMU measurements to mimic practical use cases and ensure the proper applicability of the proposed realtime learning framework. The noisecorrupted PMU measurements are shown in Fig. 7. Since the operating point of the underlying power network keeps changing due to random load changes or faults or due to the change in the operating conditions, the dynamics learnt from PMU data will not be valid for all operating conditions and need to be updated. Therefore, the proposed recursive learning method is particularly useful here for continuously learning the system dynamics from PMU data.
The PMU measurements record data at a rate of 40–80 measurements per second. In this study, we fix its rate to 50 measurements per second and each PMU measures several system states such as frequency, rate of change of frequency, voltage magnitude, voltage angle, current flow through the connected branches are available. Furthermore, to capture the noise in the realtime PMU measurements, we manually add the noise to the measurements such that the added noise is i.i.d. Gaussian with zero mean and variance 0.3. To demonstrate the proposed robust recursive Koopman operator to understand the system evolution from noisy data in realtime, we perform the analysis considering the important states, frequency and voltage magnitude.
Considering the initialization given in algorithm 1, a robust Koopman operator corresponding to the IEEE 68 bus system representing the underlying load changes is computed in realtime from streaming noisy PMU data. As the frequency and voltage magnitudes are considered at each bus, there is a total of 136 states and we use 150 Gaussian radial functions as observables, to compute the robust Koopman using RREDMD. Figure 8a–c respectively show the eigenvalues of the learnt Robust Koopman operator after 100, 500 and 1000 measurements. Moreover, we can observe that the robust Koopman updated with every new measurement yields a stable representation (all eigenvalues lying inside the unit circle). Essentially, applying the proposed RREDMD, the power system dynamics is learnt using measurements from a few seconds. However, the Koopman operator learning is a continuous process as the PMU data streams in and the power system properties such as stability margins can be studied at any given timepoint. Furthermore, we compared the computational time of RREDMD against that of EDMD, shown in Fig. 9. It can be seen that the proposed RREDMD outperforms the standard EDMD method.
Scalability of RREDMD with dimension of the underlying system
In the previous two examples, we compared the computation times of the proposed RREDMD method and the existing EDMD method and found that RREDMD outperforms EDMD. In this subsection, we analyze how the scalability of the RREDMD algorithm as the number of states in the underlying system increases. In particular, we considered a ring network (Fig. 10a) of Van der Pol oscillators and recorded the computation times of the Koopman operator using the RREDMD algorithm as the number of oscillators in the system increases. The equation of motion of the ith oscillator is given by
where \(x_i(t)\) is the position variable of the ith oscillator, \(x(t)=[x_1(t), \ldots , x_n(t)]^\top \), \(\mathcal {L}_i\) is the ith row of the network Laplacian, \(\mu \ge 0\) is the damping constant, \(\sigma >0\) is a constant and \(\xi _i(t)\in {\mathbb {R}}^2\) is an i.i.d. Gaussian noise of zero mean and unit variance. We varied the number of oscillators from 50 to 500, so that the number of states of the system varied from 100 to 1000. However, it is to be noted that the Koopman operator is computed in the space of the Koopman observables. In this example, we used 15 radial Gaussian basis functions per oscillator, so that the size of the Koopman operator varied from \(750 \times 750\) to \(7500 \times 7500\). For simulation purposes, we used the same \(\mu =0.8\) and \(\sigma =0.2\) for all the oscillators.
Figure 10b shows how the computation time varies with the number of states. On the face of it, it seems that the computation time varies almost quadratically with the number of states. However, it should be noted as the number of states increases, so does the number of dictionary functions, leading to the quadratic nature of the plot. However, if the number of dictionary functions remains constant, the computation time varies linearly with the number of states (Fig. 4). Since the RREDMD algorithm scales almost linearly with the dimension of the system, it can be used for the identification of largedimensional systems in real time as well.
Conclusions
In this paper, we address the important problem of learning the dynamics of a general dynamical system, from noisy measurements in real time. In particular, we use the Koopman operator framework for datadriven learning, so that one obtains a linear system representation of the underlying dynamical system. We resort to Robust Koopman operator estimation to mitigate the effect of measurement noise and we propose an iterative algorithm for recursively learning the Robust Koopman operator from streaming data. We show that the proposed framework is substantially faster than the existing EDMD algorithm, thus making it practical to learn the dynamics in an online fashion and in real time. We also demonstrate the efficiency of the proposed algorithm by applying it to identify the Van der Pol oscillator, the IEEE 68 bus system and a ring network of Van der Pol oscillators.
Data availability
The data for the power system is available from the corresponding author on reasonable request.
Code availability
The codes used in this paper is available in the following address: https://drive.google.com/file/d/1FNo6SY5c3a4yoVpFYXCYqBX_OSes_TAu/view.
References
Newton, I. Principia Mathematica (1687).
Lasota, A. & Mackey, M. C. Chaos, Fractals, and Noise: Stochastic Aspects of Dynamics (Springer, 1994).
Budisic, M., Mohr, R. & Mezic, I. Applied Koopmanism. Chaos 22, 047510–32 (2012).
Williams, M. O., Kevrekidis, I. G. & Rowley, C. W. A datadriven approximation of the Koopman operator: Extending dynamic mode decomposition. J. Nonlinear Sci. 25(6), 1307–1346 (2015).
Mauroy, A. & Mezić, I. A spectral operatortheoretic framework for global stability. In Proceedings of IEEE Conference of Decision and Control, Florence, Italy (2013).
Sinha, S., Huang, B. & Vaidya, U. On robust computation of Koopman operator and prediction in random dynamical systems. J. Nonlinear Sci. 30(5), 2057–2090 (2020).
Sinha, S., Nandanoori, S. P. & Yeung, E. Koopman operator methods for global phase space exploration of equivariant dynamical systems. IFACPapersOnLine 53(2), 1150–1155 (2020).
Nandanoori, S. P., Sinha, S., Yeung, E. Datadriven operator theoretic methods for global phase space learning. In American Control Conference (ACC), 4551–4557 (IEEE, 2020).
Nandanoori, S. P., Sinha, S. & Yeung, E. Datadriven operator theoretic methods for phase space learning and analysis. arXiv–2106 (arXiv eprints) (2021).
Sinha, S., Nandanoori, S. P., Drgona, J. & Vrabie, D. Datadriven stabilization of discretetime controlaffine nonlinear systems: A Koopman operator approach, accepted for publication in ECC. arXiv:2203.14114 (arXiv preprint) (2022).
Huang, B., Ma, X. & Vaidya, U. Feedback stabilization using Koopman operator. In 2018 IEEE Conference on Decision and Control (CDC), 6434–6439 (IEEE, 2018).
Sinha, S., Vaidya, U., Yeung, E. On computation of Koopman operator from sparse data. In American Control Conference (ACC), 5519–5524 (IEEE, 2019).
Sootla, A. & Ernst, D. Pulsebased control using Koopman operator under parametric uncertainty. IEEE Trans. Autom. Control 63(3), 791–796 (2017).
Harrison, J. & Yeung, E. Stability analysis of parameter varying genetic toggle switches using Koopman operators. Mathematics 9(23), 3133 (2021).
Eisenhower, B., Maile, T., Fischer, M. & Mezic, I. Decomposing building system data for model validation and analysis using the Koopman operator. In Proceedings of the National IBPSAUSA Conference, New York, USA (2010).
Korda, M. & Mezić, I. Linear predictors for nonlinear dynamical systems: Koopman operator meets model predictive control. arXiv:1611.03537 (arXiv preprint) (2016).
Slawinska, J., Ourmazd, A. & Giannakis, D. A quantum mechanical approach for data assimilation in climate dynamics. In International Conference on Machine Learning Workshop on (2019).
Bruder, D., Gillespie, B., Remy, C. D. & Vasudevan, R. Modeling and control of soft robots using the Koopman operator and model predictive control. arXiv:1902.02827 (arXiv preprint) (2019).
Abraham, I. & Murphey, T. D. Active learning of dynamics for datadriven control using Koopman operators. IEEE Trans. Rob. 35(5), 1071–1083 (2019).
Marrouch, N., Slawinska, J., Giannakis, D. & Read, H. L. Datadriven Koopman operator approach for computational neuroscience. Ann. Math. Artif. Intell. 88(11), 1155–1173 (2020).
Susuki, Y., Mezic, I., Raak, F. & Hikihara, T. Applied Koopman operator theory for power systems technology. Nonlinear Theory Appl. IEICE 7(4), 430–459 (2016).
Sinha, S., Sharma, P., Vaidya, U. & Ajjarapu, V. On information transferbased characterization of power system stability. IEEE Trans. Power Syst. 34(5), 3804–3812 (2019).
Nandanoori, S. P. et al. Graph neural network and Koopman models for learning networked dynamics: A comparative study on power grid transients prediction. IEEE Access 10, 32337–32349 (2022).
Kropp, T. System threats and vulnerabilities [power system protection]. IEEE Power Energ. Mag. 4(2), 46–50 (2006).
Sinha, S., Nandanoori, S. P., Yeung, E. Data driven online learning of power system dynamics. In IEEE Power & Energy Society General Meeting (PESGM), 1–5 (IEEE, 2020).
Schrauwen, B., Verstraeten, D. & Van Campenhout, J. An overview of reservoir computing: Theory, applications and implementations. In Proceedings of the 15th European Symposium on Artificial Neural Networks, 471–482 (2007).
Bollt, E. On explaining the surprising success of reservoir computing forecaster of chaos? The universal machine learning dynamical system with contrast to var and dmd. Chaos Interdiscip. J. Nonlinear Sci. 31, 1 (2021).
Gauthier, D. J., Bollt, E., Griffith, A. & Barbosa, W. A. Next generation reservoir computing. Nat. Commun. 12(1), 5564 (2021).
Zhang, Y. & Cornelius, S. P. Catch22s of reservoir computing. Phys. Rev. Res. 5(3), 033213 (2023).
Sinha, S., Huang, B., Vaidya, U. Approximation, robust of Koopman operator and prediction in random dynamical systems. In Annual American Control Conference (ACC), 5491–5496 (IEEE, 2018).
Nandanoori, S. P., Kundu, S., Pal, S., Agarwal, K. & Choudhury, S. Modelagnostic algorithm for realtime attack identification in power grid using Koopman modes. In 2020 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm), 1–6 (IEEE, 2020).
Acknowledgements
This work was supported by the U.S. Department of Energy (DOE) Office of Science, Office of Advanced Scientific Computing Research (ASCR) as part of the Multifaceted Mathematics for Rare, Extreme Events in Complex Energy and Environment Systems (MACSER) project. Pacific Northwest National Laboratory is operated by Battelle for the DOE under Contract DEAC0576RL01830.
Author information
Authors and Affiliations
Contributions
S.S. and D.B.S. came up with the idea of the problem. S.S. did the theoretical analysis, did the simulations for Van der Pol oscillator and the ringnetwork systems and wrote the main manuscript, except “Henon map”. S.P.N. generated the data for the IEEE 68bus system and wrote the “Henon map”. All authors reviewed the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Sinha, S., Nandanoori, S.P. & BarajasSolano, D.A. Online realtime learning of dynamical systems from noisy streaming data. Sci Rep 13, 22564 (2023). https://doi.org/10.1038/s4159802349045w
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s4159802349045w
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.