SINDy

Controle Baseado em Dados

Prof. Dr. Raphael Teixeira

Universidade Federal do Pará

O que é SINDy?

Sparse Identification of Nonlinear Dynamics: descobre as equações diferenciais de um sistema, assumindo que poucos termos de uma biblioteca de candidatos bastam para descrever a dinâmica (Brunton; Proctor; Kutz, 2016; Schmidt; Lipson, 2009).

Formulação

Do estado medido \(X\) e sua derivada \(\dot X\), constrói-se uma biblioteca de candidatos e resolve-se uma regressão esparsa:

\[ \Theta(X) = \begin{bmatrix} 1 & X & X^2 & \sin(X) & \cdots \end{bmatrix} \qquad \dot X = \Theta(X)\,\Xi, \quad \Xi \text{ esparsa} \]

Coeficiente \(\Xi_{j,i}\ne 0\): o \(j\)-ésimo candidato participa da equação de \(\dot x_i\).

O Algoritmo STLSQ

  1. Ajusta-se \(\Xi\) por mínimos quadrados: \(\Xi \leftarrow \Theta^\dagger \dot X\);
  2. Zeram-se coeficientes com \(|\Xi_{j,i}| < \tau\);
  3. Reajustam-se só os sobreviventes; repete-se até convergir.

Nota

\(\tau\) equilibra esparsidade e ajuste aos dados.

Por que Esparsidade?

A maioria dos sistemas físicos é descrita por poucos termos — a esparsidade evita sobreajuste e dá um modelo interpretável.

Sensível a ruído em \(\dot X\): normalmente exige filtragem ou diferenciação robusta.

Extensões

Robustez a Ruído

Software e Aplicação a Controle

PySINDy implementa STLSQ, SR3, SINDYc e bibliotecas prontas (Kaptanoglu et al., 2022; Silva et al., 2020) — aqui usamos só numpy para deixar o algoritmo explícito.

O modelo esparso \(\dot x=\Theta(x)\Xi\) vira planta para MPC não linear ou linearização por realimentação (Kaiser; Kutz; Brunton, 2018).

Referências

BRUNTON, Steven L.; PROCTOR, Joshua L.; KUTZ, J. Nathan. Discovering Governing Equations from Data by Sparse Identification of Nonlinear Dynamical Systems. Proceedings of the National Academy of Sciences, v. 113, n. 15, p. 3932–3937, 2016.
CHAMPION, Kathleen et al. Data-Driven Discovery of Coordinates and Governing Equations. Proceedings of the National Academy of Sciences, v. 116, n. 45, p. 22445–22451, 2019.
FASEL, Urban et al. Ensemble-SINDy: Robust Sparse Model Discovery in the Low-Data, High-Noise Limit, with Active Learning and Control. Proceedings of the Royal Society A, v. 478, p. 20210904, 2022.
KAISER, Eurika; KUTZ, J. Nathan; BRUNTON, Steven L. Sparse Identification of Nonlinear Dynamics for Model Predictive Control in the Low-Data Limit. Proceedings of the Royal Society A, v. 474, p. 20180335, 2018.
KAPTANOGLU, Alan A. et al. PySINDy: A Comprehensive Python Package for Robust Sparse System Identification. Journal of Open Source Software, v. 7, n. 69, p. 3994, 2022.
RUDY, Samuel H. et al. Data-Driven Discovery of Partial Differential Equations. Science Advances, v. 3, n. 4, p. e1602614, 2017.
SCHMIDT, Michael; LIPSON, Hod. Distilling Free-Form Natural Laws from Experimental Data. Science, v. 324, n. 5923, p. 81–85, 2009.
SILVA, Brian M. de et al. PySINDy: A Python Package for the Sparse Identification of Nonlinear Dynamics from Data. Journal of Open Source Software, v. 5, n. 49, p. 2104, 2020.
ZHENG, Peng et al. A Unified Framework for Sparse Relaxed Regularized Regression: SR3. IEEE Access, v. 7, p. 1404–1423, 2019.

Encerramento

Prof. Dr. Raphael Teixeira

Universidade Federal do Pará

raphaelbt@ufpa.br