Deep Koopman Learning of Nonlinear Time-Varying Systems

Wenjian Hao, Bowen Huang, Wei Pan, Di Wu, Shaoshuai Mou

Abstract

This paper presents a data-driven approach to approximate the dynamics of a nonlinear time-varying system (NTVS) by a linear time-varying system (LTVS), which is resulted from the Koopman operator and deep neural networks. Analysis of the approximation error between states of the NTVS and the resulting LTVS is presented. Simulations on a representative NTVS show that the proposed method achieves small approximation errors, even when the system changes rapidly. Furthermore, simulations in an example of quadcopters demonstrate the computational efficiency of the proposed approach.

Introduction

Many autonomous systems—from quadcopters battling wind gusts to robots with wearing parts—exhibit Nonlinear Time-Varying (NTV) dynamics. Controlling these is a significant challenge because the underlying physical laws of the system evolve as time passes.

The Koopman operator offers a clever workaround: it "lifts" nonlinear states into a higher-dimensional space where the dynamics appear linear. Once linear, well-understood tools like Model Predictive Control (MPC) can be applied. However, existing Koopman methods (like DMD or EDMD) typically assume the system is time-invariant or that changes happen very slowly. This paper introduces Deep Koopman Learning for Time-Varying Systems (DKTV), a framework designed to handle rapidly changing nonlinear systems by providing a way to update the model online without the massive computational overhead of retraining from scratch.

Methodology

The authors propose the Deep Koopman Representation (DKR), which uses a Deep Neural Network (DNN) to learn the optimal "observable functions" (the mapping to the higher-dimensional space).

Key technical components include:

  • Simultaneous Optimization: The algorithm tunes both the DNN parameters and the linear system matrices ($A, B, C$) simultaneously, minimizing a dual loss for prediction and reconstruction accuracy.
  • Batch-Wise Online Learning: Data is processed in discrete batches. As new data arrives, the model updates to "track" the evolving dynamics.
  • Recursive Matrix Updates: To maintain real-time speed, the authors derived an update rule based on the Sherman-Morrison formula, allowing linear matrix updates without recomputing expensive pseudo-inverses.
Illustration of the temporal discretization and batch-wise update scheme used in the DKTV framework.

As illustrated in the figure above, the continuous time $t$ is discretized into sampling instants $t_k$, which are then grouped into batches $\mathcal{B}_\tau$. This structure allows the system to treat the problem as a tracking task, focusing on the latest data to "forget" old dynamics that are no longer relevant.

Experimental Evaluation

The researchers evaluated their method using three simulated environments:

  1. Synthetic 2D NTVS: A mathematical system where the speed of change can be manually adjusted to test tracking limits.
  2. Quadcopter Dynamics: A 12-state simulation of a drone subjected to time-varying disturbances like unpredictable wind.
  3. Time-Varying Cartpole: A control benchmark modified so that the coefficient of friction on the track increases significantly over time.

Key Results

  • Superiority over TVDMD: In 2D system tests with rapid changes, DKTV maintained consistently low error while standard Time-Varying Dynamic Mode Decomposition (TVDMD) failed to track the state.
  • Faster Convergence: In quadcopter experiments, DKTV converged in significantly fewer training epochs and maintained a lower loss compared to standard "black-box" DNN approaches.
  • Effective Control: Integrated with an MPC controller, DKTV successfully stabilized the time-varying cartpole despite a massive, unmodeled increase in friction that would typically cause a static controller to fail.

Conclusion and Future Work

Deep Koopman Learning provides a robust, computationally efficient method for approximating complex, evolving dynamics. By utilizing DNNs as universal "lifters" and implementing recursive updates, the framework enables real-time adaptation to rapidly changing environments.

While current analysis relies on stability assumptions for the learned matrices, future work aims to build harder guarantees into the architecture. The authors plan to apply this to adaptive autonomy—enabling robots to learn to fly or walk in new environments on the fly—and human-robot teaming, where systems must adapt to the changing dynamics of human partners.

Summary updated

Abstract

This paper presents a data-driven approach to approximate the dynamics of a nonlinear time-varying system (NTVS) by a linear time-varying system (LTVS), which is resulted from the Koopman operator and deep neural networks. Analysis of the approximation error between states of the NTVS and the resulting LTVS is presented. Simulations on a representative NTVS show that the proposed method achieves small approximation errors, even when the system changes rapidly. Furthermore, simulations in an example of quadcopters demonstrate the computational efficiency of the proposed approach.
BibTeX
@article{hao2023deep,
  author = {Wenjian Hao and Bowen Huang and Wei Pan and Di Wu and Shaoshuai Mou},
  title = {{Deep Koopman Learning of Nonlinear Time-Varying Systems}},
  journal = {Automatica},
  year = {2023},
  doi = {10.1016/j.automatica.2023.111372},
}
Figure