Table of Contents
Fetching ...

On-line learning of dynamic systems: sparse regression meets Kalman filtering

Gianluigi Pillonetto, Akram Yazdani, Aleksandr Aravkin

TL;DR

The resulting Sindy Kalman Filter (SKF) unifies both frameworks by treating unknown system parameters as state variables, enabling real-time inference of complex, time-varying nonlinear models unattainable by either method alone.

Abstract

Learning governing equations from data is central to understanding the behavior of physical systems across diverse scientific disciplines, including physics, biology, and engineering. The Sindy algorithm has proven effective in leveraging sparsity to identify concise models of nonlinear dynamical systems. In this paper, we extend sparsity-driven approaches to real-time learning by integrating a cornerstone algorithm from control theory -- the Kalman filter (KF). The resulting Sindy Kalman Filter (SKF) unifies both frameworks by treating unknown system parameters as state variables, enabling real-time inference of complex, time-varying nonlinear models unattainable by either method alone. Furthermore, SKF enhances KF parameter identification strategies, particularly via look-ahead error, significantly simplifying the estimation of sparsity levels, variance parameters, and switching instants. We validate SKF on a chaotic Lorenz system with drifting or switching parameters and demonstrate its effectiveness in the real-time identification of a sparse nonlinear aircraft model built from real flight data.

On-line learning of dynamic systems: sparse regression meets Kalman filtering

TL;DR

The resulting Sindy Kalman Filter (SKF) unifies both frameworks by treating unknown system parameters as state variables, enabling real-time inference of complex, time-varying nonlinear models unattainable by either method alone.

Abstract

Learning governing equations from data is central to understanding the behavior of physical systems across diverse scientific disciplines, including physics, biology, and engineering. The Sindy algorithm has proven effective in leveraging sparsity to identify concise models of nonlinear dynamical systems. In this paper, we extend sparsity-driven approaches to real-time learning by integrating a cornerstone algorithm from control theory -- the Kalman filter (KF). The resulting Sindy Kalman Filter (SKF) unifies both frameworks by treating unknown system parameters as state variables, enabling real-time inference of complex, time-varying nonlinear models unattainable by either method alone. Furthermore, SKF enhances KF parameter identification strategies, particularly via look-ahead error, significantly simplifying the estimation of sparsity levels, variance parameters, and switching instants. We validate SKF on a chaotic Lorenz system with drifting or switching parameters and demonstrate its effectiveness in the real-time identification of a sparse nonlinear aircraft model built from real flight data.

Paper Structure

This paper contains 17 sections, 1 theorem, 42 equations, 5 figures.

Key Result

Proposition 1

Consider the time-invariant setting where system parameters do not vary in time. If the prior on the parameters is not informative (no knowledge on $\Xi$ is available before seeing the data) the estimates returned by SKF and Sindy perfectly match. If an informative prior is instead assigned to $\Xi$

Figures (5)

  • Figure 1: The left block represents a nonlinear, time-varying dynamical system with state vector $x(t)$, evolving according to an unknown function $f$. An experiment is performed on this physical system to collect training data $\{x_t, y_t\}$, from which $f$ is to be estimated. The top block depicts the system model, which approximates the behavior of the real system. It includes unknown parameters $\Xi_t$, which may vary over time and typically represent coefficients of monomials, such as in a truncated Volterra series. They are viewed as latent states in a higher-level state-space model and are linearly related to noisy measurements $y_t$ through regression matrices $\Theta_t$ built from $x_t$. The central block shows the SINDY Kalman Filter (SKF), which estimates $\Xi_t$ in real time by combining Kalman filtering and sparse identification (SINDY). This promotes sparsity and extracts the most relevant components of $\Xi_t$ that govern the system's dynamics. The right block receives the estimated parameters $\hat{\Xi}_t$ to reconstruct a sparse model capable of replicating the original system's behavior. The bottom block highlights a real-time model generalization index (e.g., one-step-ahead prediction error), which can help infer hidden variables or switching behavior, and enhance model structure selection. As a result, SKF provides sparse, interpretable models with strong predictive capability for future (unseen) system behavior. Thanks to its linear computational complexity with respect to the data set size, the SKF structure is efficient and also applicable to large-scale batch identification problems.
  • Figure 2: Identification of a time-invariant Lorenz system. The example consider estimation of the first governing equation $\dot{x}_1=\sigma(x_2-x_1)$, with $\sigma=10$. So, there are just two parameters different from zero, equal to $10$ and $-10$. The evolution of the system is shown in the top left panel while 2000 noisy measurements of the first governing equation are in the top right. The signal-to-noise ratio (SNR), expressed in decibels, is around 15 dB. The unknown parameters of the Lorenz system are the coefficients of monomials up to $4$th order and are the state of a Kalman filter. They are estimated in a on-line manner as noisy derivatives become available in time. Classical Kalman estimates are in the bottom left panel. No sparsity is promoted, so that all the estimates are different from zero at any instant. Their behaviour is somewhat erratic. At the end of the experiment the estimated value of the nonzero monomials coefficients is $-14.4,12.7$. SKF estimates are in the middle panel. The new procedure tries to determine at any iteration the most predictive sparse model by minimizing the average one-step ahead error. After few steps the governing equation returned by the filter is very close to truth and a perfect sparsity pattern is reconstructed. At the end of the experiment, the estimated value of the nonzero monomials coefficients are $-10.01,9.97$. The time-course of the norm of the estimation error of the two filters is reported in the bottom right panel.
  • Figure 3: Identification of a smoothly time-varying Lorenz system. The first governing equation is $\dot{x}_1=\sigma(t) (x_2-x_1)$, where the time-course of $\sigma$ is the black dashed line in the right panels. After the time instant 3, its decreases linearly from 20 to 10. The left panel shows 10000 noisy measurements of $\dot{x}_1$, the SNR is around 15. As in the previous case studies the unknown system parameters are the coefficients of monomials up to $4$th order. Parameters of the linear part of the system are modeled as independent random walks whose common variance is estimated by minimizing the average prediction error. Estimates from the classical Kalman filter are in the middle panel, they are unable to track the evolution of Lorenz parameters. SKF estimates are in the right panel, obtained with the sparsity parameter $\lambda=0.4$. An estimate with the right level of sparsity is obtained. Furthermore, SKF learns from data that the value of $\sigma$ decreases: its estimate is close to 20 immediately after $t=2$ and then converges to 10 as time progresses.
  • Figure 4: Identification of a switching Lorenz system. In this example the parameter $\sigma$ of the first governing equation $\dot{x}_1=\sigma(x_2-x_1)$ follows an abrupt change, moving from the value $20$ to $10$ at time instant $t=6$. The 2000 noisy measurements (SNR around 15) of the first governing equation are in the top left panel. One can see that it is difficult to detect from them the instant where the dynamics shift happens. The unknown parameters of the Lorenz system are the coefficients of monomials up to $4$th order and are the state of SKF. Estimate of the switching instant is the minimizer of the average prediction error (see also Appendix for details). The resulting objective is displayed in the top right panel and its minimizer is exactly equal to $t=6$. SKF outcomes are in the bottom left panel and are obtained setting the switching instant to its estimate. The governing switching equation returned by the filter is very close to truth and a perfect sparsity pattern is obtained. Just before the switching instant and at the end of the experiment the estimated values of the nonzero monomials coefficients are $-19.94,20.00$ and $-9.93,9.95$ . The time-course of the estimation error norm is visible in the bottom right panel.
  • Figure 5: Identification of an aircraft model. The three-dimensional nonlinear motion equations describing the angular velocities of the shaft are in the top left panel. We consider estimation of the first equation $\dot{\omega}_x = 1.061e-3 V^2 (\delta_{lx}- \delta_{rx}) -4.8e-2 V\omega_x$, derived from real data in Li2023, from the 10000 noisy derivatives in the top right panel. In this example, such derivative estimates are obtained by fitting smoothing splines Wahba:90 to noisy measurements of angular velocities (with an SNR of approximately 20) over a moving temporal window of 1 second, containing 100 measurements. This window is updated every 0.5 seconds. Basis functions given by monomials up to third-order are built using the following signals measurable by sensors in the aircraft: angular velocities $\omega_x,\omega_y,\omega_z$, aileron angle $\delta_{lx}-\delta_{rx}$ and velocity $V$. Thus, the model depends only on two monomials, one of second- and the other of third-order. In this thought experiment the on-board computer of the aircraft estimates in real-time the motion equation by making run in parallel a bank of SKF filters equipped with different sparsity parameters $\lambda$. At any time instant, the estimate of $\lambda$ is obtained as the minimizer of the average of the prediction errors computed up to that instant. The classical Kalman estimates are in the bottom left panel. The filter does not have a good control of complexity since no sparsity can be promoted. Monomial coefficients estimates are different from zero at any instant and far from the true values. The middle panel instead shows how SKF improves dramatically model quality as time advances. After 60 seconds the right sparsity pattern is found: SKF learns from data that velocity enters the model both linearly and quadratically in combination with other two state variables. At the end of the experiment the estimated equation is $\dot{\omega}_x = 1.07e-3 V^2 (\delta_{lx}- \delta_{rx}) -4.83e-2 V\omega_x$.

Theorems & Definitions (1)

  • Proposition 1