Group 2202 // Barone, Nagaro, Ninni, Valentini
Referee // Prof. Jeff M. Byers, Naval Research Laboratory, Washington (linkedin)
This is our final project for Laboratory of Computational Physics (module B). In this work, we review two dynamical systems analysis techniques and explore whether it is possible to use them in chaotic dynamics forecast.
The first technique is the Hankel Alternative View Of Koopman (HAVOK) analysis, based on a paper by S. Brunton et al, 2017. At first, we develop the framework to achieve the same results shown in the paper; then we discuss some features of the new coordinate space.
The second technique in our review is reservoir computing. Reservoir computing is an excellent machine learning tool for analyzing dynamical systems in a data driven fashion. The reservoir computing algorithm uses randomly sampled matrices for defining an underlying recurrent neural network, which has a pool of interconnected neurons (which make the reservoir), an input layer feeding observed data to the network, and an output layer with weights assigned to the network states. Recently, theoretical results demonstrated the equivalence between reservoir computing and the nonlinear vector autoregression. Nonlinear vector autoregression has the advantage of being computationally much less demanding, and of providing interpretable results. In this work, we used nonlinear vector autoregression in order to make predictions on the behavior of the Lorenz attractor.
In this review, we probe the two techniques above to characterize the dynamics reconstruction accuracy & prediction capabilities. Our results are benchmarked on a Lorenz attractor system. Eventually, we provide a demo which uses HAVOK to issue a trigger that prevents the Lorenz attractor to switch lobes. To achieve this, we train a Reinforcement Learning model to interact with the Lorenz system.
The following demo implements a trigger for chaotic dynamics control. The acting model is a Deep Deterministic Policy Gradient built in Keras, whereas the sentinel model is a thresholded HAVOK coordinate. In other words, when the coordinate computed through the HAVOK analysis (on a moving window) exceeds a given threshold, the actor model is triggered to execute an action that prevents the Lorenz attractor to switch lobes.
rhavok is a small library we use to collect all the common routines required by this work. You can install the library in development mode running the following command from current directory:
pip install -e ./lib/
Then, the library will by available on your system through the usual import fashion:
import rhavok
You may find some documentation on it, provided as Jupyter notebooks (doc_*.ipynb
) inside the lib_rhavok
folder.
Picture from 10.1038/s41467-021-25801-2.
- Chaos as an intermittently forced linear system 10.1038/s41467-017-00030-8 YouTube
- Next generation reservoir computing 10.1038/s41467-021-25801-2
- Introduction to Next Generation Reservoir Computing YouTube
- GitHub/reservoirpy Next Generation Reservoir Computing