logo

WSINDy: Weak SINDy Algorithm 📂Statistical Analysis

WSINDy: Weak SINDy Algorithm

Algorithm 1 2

SINDy algorithm: Let a dynamical system with state space $\mathbb{R}^{n}$ be governed by the smooth function $f : \mathbb{R}^{n} \to \mathbb{R}^{n}$ as follows. $$ \dot{\mathbf{x}} = f \left( \mathbf{x} \right) $$ Construct the matrix $\Theta \left( X \right) \in \mathbb{R}^{m \times p}$ whose columns are derived variables obtained by applying some nonlinear functions to the independent variables $X$, and perform STLSQ (../2579) on the following matrix equation to find the governing equation; this algorithm is called SINDy. $$ \dot{X} = \Theta \left( X \right) \Xi $$

A variant of SINDy that bypasses numerical approximation of derivatives via finite differences by using the weak formulation is called Weak SINDy.

Explanation

As in the original SINDy, the method generalizes to the multidimensional case by repeating the optimization for each component of the multivariate vector function $\mathbf{x} (t) = \left( x_{1} , \cdots , x_{n} \right)$, so for simplicity of exposition we consider a one-dimensional ordinary differential equation of the form $\dot{x} = f (x)$. Similarly, if the support of the test function $\phi : \mathbb{R} \to \mathbb{R}$ is $[a,b]$, consider the inner product obtained by multiplying on the left by $\phi$ as follows. $$ \left< \phi , \dot{x} \right> = \left< \phi , f ( x ) \right> $$ Here $f (x)$ is a function that, as in original SINDy, is represented by $\dot{x} = f(x) = \Theta (x) \Xi$.

Definition of weak derivative: Let $u \in {L}_{\mathrm{loc}}^1(\Omega)$. If there exists $v_{\alpha}$ satisfying the following relation, then it is called the weak derivative, or the distributional derivative, of $u$. $$ \begin{align*} T_{{v}_{\alpha}} &= {D}^{\alpha}T_{u} & \text{in } \mathcal{D}^{\ast}(\Omega) \\ \int_{\Omega}v_{\alpha}(x)\phi (x)dx &= (-1)^{|\alpha|} \int_{\Omega} u(x){D}^{\alpha}\phi (x)dx & \forall\ \phi \in \mathcal{D}(\Omega) \end{align*} $$

On the other hand, if one rewrites the inner product on the left as an integral, since $\phi$ is assumed to be a test function it has compact support and therefore must satisfy $\phi (a) = \phi (b) = 0$, and by integration by parts this directly builds the weak derivative. $$ \begin{align*} & \left< \phi , \dot{x} \right> \\ =& \int_{a}^{b} \phi (t) \dot{x} dt \\ =& \left[ \phi (t) x(t) \right]_{a}^{b} - \int_{a}^{b} \dot{\phi} (t) x(t) dt \\ =& \left( -1 \right)^{1} \int_{a}^{b} {\frac{ d }{ dt }} \phi (t) x(t) dt \\ =& - \int_{a}^{b} \dot{\phi} (t) x(t) dt \end{align*} $$

In fact, $\dot{x}$ is the derivative of $x$ and also serves as its weak derivative. $$ - \int_{a}^{b} \dot{\phi} (t) x(t) dt = \left< \phi , \dot{x} \right> = \left< \phi , f ( x ) \right> = \int_{a}^{b} \phi (t) \Theta \left( x (t) \right) \Xi dt $$ Moreover, one typically assumes $\Xi$ is independent of time $t$ so that $\Xi$ can be taken outside the time integral. Ultimately this becomes a least-squares problem that minimizes the discrepancy between both sides, and $\Xi$ is recovered via sparse regression.

$$ - \int_{a}^{b} \dot{\phi} (t) x(t) dt = \int_{a}^{b} \phi (t) \Theta \left( x (t) \right) dt \Xi $$ In the end, as above, although $\dot{x}$ is absent, we end up identifying only the right-hand side of $\dot{x} = f(x)$. The test function can, for example as in the references, be chosen for constants (../2465) $C$ and $p, q \ge 1$ as the following function. $$ \phi (t) := \begin{cases} C \left( t - a \right)^{p} \left( b - t \right)^{q} & , \text{if } a < t < b \\ 0 & , \text{otherwise} \end{cases} $$ The test function is known exactly, and $x (t)$ is the originally provided time series; while it may contain noise up to $\Theta (x)$, it does not contain unknown information.


  1. Messenger, D. A., & Bortz, D. M. (2021). Weak SINDy: Galerkin-based data-driven model selection. Multiscale Modeling & Simulation, 19(3), 1474-1497. https://doi.org/10.1137/20M1343166 ↩︎

  2. Messenger, D. A., & Bortz, D. M. (2021). Weak SINDy for partial differential equations. Journal of Computational Physics, 443, 110525. https://doi.org/10.1016/j.jcp.2021.110525 ↩︎