elise1993 / sysidHAVOK

This is a testbed for system identification and forecasting of dynamical systems using the Hankel Alternative View of Koopman (HAVOK) algorithm and Sparse Identification of Nonlinear Dynamics (SINDy). This code is based on the work by Brunton & Kutz (2022) and Yang et. al. (2022).
MIT License
1 stars 0 forks source link

Extend algorithm to multivariable data sets #4

Open elise1993 opened 8 months ago

elise1993 commented 8 months ago

The current implementation only allows for single-variable time series. Research and implement how multivariable data may be included.

elise1993 commented 7 months ago

I believe this requires a complete refactor of the whole code, and thus won't be added at this time.

While DMD is naturally well-suited for multivariable data sets, I do not know how Hankel matrices, and thus the HAVOK model itself, generalizes to multivariable data sets. Perhaps we can construct a separate HAVOK model for each variable and couple them using the forcing functions.

elise1993 commented 5 months ago

I cannot find any information on how to generalize HAVOK to multivariate datasets. A few ideas on how to do this:

  1. Since DMD treats each column of data as its own positional argument (variable), the order of the Hankel matrix may not be as important. However, re-ordering the columns of the Hankel matrix will have an impact on how the coordinate system is represented, and may not be ideal. For testing, when multivariate data (e.g., $x$ and $y$) is available, we could stack the Hankel matrix as follows:
H = \begin{bmatrix}
x(t_1) & y(t_1) & x(t_2) & y(t_2) & \cdots & x(t_p) & y(t_p) \\
x(t_2) & y(t_2) & x(t_3) & y(t_3) & \cdots & x(t_{p+1}) & y(t_{p+1}) \\
\vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\
x(t_q) & y(t_q) & x(t_{q+1}) & y(t_{q+1}) & \cdots & x(t_{p+q}) & y(t_{p+q}) 
\end{bmatrix}
  1. We can also develop a HAVOK model for each variable ($x$ and $y$) separately, and then link them through the nonlinear term. For example, if we have the following models for $x$ and $y$:

$$ \dot{\textbf{v}} = \textbf{A}_x \textbf{v} + \textbf{B}_x v_r(x,y)$$

$$ \dot{\textbf{w}} = \textbf{A}_y \textbf{w} + \textbf{B}_y w_r(x,y)$$

We can train the ML models for $v_r$ and $w_r$ as functions of both $x$ and $y$.