Dynamic systems#

Identification of dynamic systems: input–output (NARX) and state-space (ODE) models.

Input–output models predict the output from its own past and from past inputs,

\[y(t) = f\bigl(y(t-1),\dots,y(t-n_a),\,u(t-n_k),\dots,u(t-n_k-n_b+1)\bigr),\]

the nonlinear autoregressive model with exogenous input (NARX; Leontaritis and Billings, 1985). Any eqdisco regressor identifies \(f\) from the lagged regressors (NARXRegressor); GP-OLS finds the order and the structure of linear-in-parameters NARX models (Madár, Abonyi and Szeifert, 2005). A model must be judged by its free-run simulation, in which its own predictions are fed back, not only by its one-step-ahead prediction (Ljung, 1999).

State-space models are ordinary differential equations \(\dot{\mathbf{z}} = \mathbf{g}(\mathbf{z})\). Their right-hand sides are found by regressing estimated derivatives on the states: by sparse regression over a library (SINDy; Brunton, Proctor and Kutz, 2016) or by any symbolic regressor (SymbolicODE). ODEModel holds the identified equations and simulates them.

NARX models, order scan, derivatives, SINDy, symbolic ODEs.

Classes#

NARXRegressor([estimator, na, nb, nk, ...])

NARX model identified by any eqdisco regressor.

ODEModel(equations, state_names[, input_names])

A system of identified ODEs \(\dot z_i = g_i(\mathbf z, \mathbf u)\).

SINDy([degree, functions, library, method, ...])

Sparse identification of nonlinear dynamics (Brunton, Proctor and Kutz, 2016).

SymbolicODE([estimator, derivative_method, ...])

ODE identification with any symbolic regressor, one state equation at a time.

Functions#

lagged_regressors(u, y[, na, nb, nk, ...])

Regressor matrix of a NARX model.

narx_order_scan(u, y[, max_na, max_nb, nk, ...])

Model order selection: FROLS on a polynomial NARX library for every \((n_a, n_b)\).

derivative(x, t[, method, window, order])

Time derivative of sampled signals.

simulate_ode(rhs, z0, t[, u, method, rtol, atol])

Integrate \(\dot{\mathbf z}=\mathbf g(\mathbf z[, u])\) with scipy.integrate.solve_ivp().