Skip to content

PySINDy

Brian de Silva; Kathleen Champion; Jacob Stevens-Haas; Markus Quade; Alan Kaptanoglu

PySINDy is a Python package for inferring dynamical equations from measurement data using sparse system identification, with optional optimization methods for constrained and Bayesian regression.

Catalog updated ·

Overview

PySINDy provides a Python workflow for system identification: estimating governing dynamics from measurements rather than starting with a fully specified equation model. Its main focus is Sparse Identification of Nonlinear Dynamical systems (SINDy), alongside methods from related research. The resulting equation models are intended to support interpretation, prediction of future states, control-input reasoning, and analytical investigation. It is a modeling package, not a pretrained predictor or a complete process-control application.

The project README demonstrates the core input/output pattern with time-indexed observations of two state variables. Measurements are arranged in an array with one column per variable, then passed to a SINDy model together with time values and variable names. The fitted model can print the discovered differential equations. The example uses analytically generated exponential trajectories and shows recovery of their governing equations; it does not establish performance on experimental chemical measurements, noisy industrial signals, or other systems.

Optional dependencies provide access to additional optimization approaches: SR3 and subclasses through the cvxpy extra, MIOSR for an L0-constrained branch-and-bound approach, and SBR for Bayesian regression with posterior outputs. The project also links tutorials, an object-model reference, contribution guidance, and academic citation guidance. Package metadata declares Python >=3.11, but that declaration is not evidence of independently tested compatibility. For chemistry or engineering work, suitability should be evaluated on representative measurements before using an inferred model for prediction or control.

Key Features

  • Fits dynamical equation models from measurement data using SINDy and related system-identification methods.
  • Accepts a state-observation array, time values, and feature names in the documented fitting workflow.
  • Prints fitted governing equations through the model's print method.
  • Provides optional support for SR3 and subclasses through the cvxpy extra.
  • Provides the optional MIOSR optimizer for L0-constrained branch-and-bound optimization.
  • Provides the optional SBR Bayesian regression optimizer with posterior outputs.

Use Cases

  • Intended evaluation: infer candidate dynamical equations from measured concentration or other chemical-process state trajectories, then compare them with held-out observations.
  • Intended evaluation: assess whether an inferred equation model can support process-control analysis before integrating it into a control workflow.
  • Intended evaluation: investigate a measurement-derived equation model as a component of a digital twin, rather than treating PySINDy as a complete twin platform.
  • Use the README's synthetic two-variable example as an introductory exercise in fitting and inspecting discovered equations.

How to Use

  1. Start with the official README to understand the SINDy workflow and its synthetic example. Identify which measured state variables and time values your proposed study would supply.
  2. Check the package metadata before installation planning. It declares Python >=3.11 and lists required and optional dependencies; the README describes pip and conda installation.
  3. Follow the introductory material linked from the documentation. Use the README's column-per-variable observation array as the starting input pattern, and supply time values and descriptive feature names when fitting.
  4. Inspect the fitted equations using the documented print method. Consult the object-model reference before selecting components or considering the cvxpy, miosr, or sbr extras.
  5. For an intended scientific evaluation, compare inferred dynamics with withheld measurements before relying on predictions or control decisions. Use the issue tracker for questions and the academic-use guidance for citation recommendations.

Related resources

do-mpc

Open Source

do-mpc is a Python toolbox for nonlinear and robust model predictive control, moving horizon estimation, and simulation, with support for differential algebraic models and uncertainty.

Open sourcePython

Process Control · Digital Twins

GEKKO

Open Source

GEKKO is a Python modeling and optimization toolkit for differential algebraic systems, supporting process simulation, parameter estimation, mixed-integer optimization, and nonlinear predictive control.

Open sourcePython

Process Optimization · Process Control

SysIdentPy

Open Source

SysIdentPy is a Python toolkit for identifying nonlinear dynamic systems with NARMAX-family models, combining structure selection, parameter estimation, simulation and forecasting.

Open sourcePython

Process Control · Predictive Maintenance

Related guides

Workflows

Evaluating AI workflows for chemical engineering

Plan evaluations that separate process modelling, reaction optimisation and control. Define inputs, operating limits, time-aware validation and approval gates before considering operational use.