Giter Club home page Giter Club logo

rhavok-analysis's Introduction

HAVOK & Reservoir computing for chaotic dynamics forecast

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.

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 to switch 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 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.


Workflow summary

HAVOK analysis

workflow_havok

Reservoir Computing

workflow_reservoir

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


Bibliography

Lab of Computational Physics (module B) project
AY 2021/2022 University of Padua

โ€ƒ

rhavok-analysis's People

Contributors

baronefr avatar danieleninni avatar gnagaro avatar lorenzov1999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

rhavok-analysis's Issues

Lorenz data

Hi. Why isn't the Lorenz Data csv generated through "data_generation.ipynb" used in the prediction ipynb notebook?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.