Skip to content

A review of HAVOK and reservoir computing for chaotic dynamics forecasting

License

Notifications You must be signed in to change notification settings

danieleninni/rhavok-analysis

 
 

Repository files navigation

HAVOK and reservoir computing for chaotic dynamics forecasting

Group 2202 // Francesco Pio Barone, Gianmarco Nagaro Quiroz, Daniele Ninni, Lorenzo Valentini
Referee // Prof. Jeff 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 for chaotic dynamics forecasting.

The first technique is the Hankel Alternative View Of Koopman (HAVOK) analysis, based on a paper by Steven L. 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 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 the 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 Nonlinear Vector AutoRegression (NVAR). NVAR has the advantage of being computationally much less demanding and providing interpretable results. In this work, we used NVAR in order to make predictions on the behavior of the Lorenz attractor.

In this review, we probe the two techniques above to characterize the accuracy of the dynamics reconstruction and the 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 from switching lobes. To achieve this, we train a reinforcement learning model to interact with the Lorenz system.


HAVOK sentinel reinforced model

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 from switching lobes.

Watch the video
click to open on YouTube


Usage of rhavok

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 the 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 folder.


Workflow summary

HAVOK analysis

workflow_havok

Reservoir computing

workflow_reservoir

Picture from 10.1038/s41467-021-25801-2.


Bibliography


Laboratory of Computational Physics (Module B)
University of Padua, A.Y. 2021/22

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%