SINDy: Sparse Identification of Nonlinear Dynamics
SINDy1 is an algorithm for identifying a nonlinear dynamic model from data. The algorithm fits a dynamic model, $\dot{x} = f(\mathbf{x}(t))$, for a state vector $\mathbf{x}$. Steps:
-
Sample $\mathbf{x}$ and $\mathbf{\dot{x}}$ at $m$ points in time into matrices $\mathbf{X}$ and $\mathbf{\dot{X}}$ . The derivative may also be approximated here using numerical methods.
-
Compute a “library” matrix $\Theta(\mathbf{X})$ where each column is a candidate nonlinear function like $1$, $X$, $X^2$, $\sin{X}$ etc. This is completely arbitrary and is chosen based on intuition or prior knowledge about the system.
-
A vector of coefficients $\Xi = {\xi_1, \xi_2, … }$ are fit such that $\mathbf{\dot{X}} = \Phi(\mathbf{X}) \Xi$. The fitting is done while encouraging sparsity in $\Xi$ in order to have the fewest number of terms in the final dynamic equations.
Libraries like PySINDy2 implements this algorithm.
References
[1] Sparse Identification of Nonlinear Dynamics (SINDy): Sparse Machine Learning Models 5 Years Later