Skip to content

decargroup/total_extended_dmd_koopman

Repository files navigation

Asymptotically Stable Data-Driven Koopman Operator Approximation with Inputs using Total Extended DMD

Companion code for Asymptotically Stable Data-Driven Koopman Operator Approximation with Inputs using Total Extended DMD

Installation

To clone the repository and its submodule, which contains the soft robot dataset, run

$ git clone --recurse-submodules git@github.com:decargroup/forward_backward_koopman.git

To install all the required dependencies for this project, it is recommended to create a virtual environment. After activating the virtual environment, run

(venv) $ pip install -r ./requirements.txt

The LMI solver used, MOSEK, requires a license to use. You can request personal academic license here.

Usage

Generating data

To generate the data required for fitting the models, run

python preprocess.py --multirun preprocessing.data.noise=0,0.00001,0.0001,0.001,0.01,0.1,1 preprocessing=soft_robot,nl_msd

Fitting models

To fit all models and obtain all predictions for the figures of the soft robot in the paper except for Figure 6, run

python main.py --multirun robot=soft_robot variance=0.01,0.1 regressors@pykoop_pipeline=EDMD,EDMD-AS,FBEDMD,FBEDMD-AS,TEDMD,TEDMD-AS lifting_functions@pykoop_pipeline=soft_robot_poly2_centers10

Similarly, for the Duffing oscillator, run

python main.py --multirun robot=nl_msd variance=0.01,0.1 regressors@pykoop_pipeline=EDMD,EDMD-AS,FBEDMD,FBEDMD-AS,TEDMD,TEDMD-AS lifting_functions@pykoop_pipeline=nl_msd_poly2_centers10

To generate FIgure 6, run separetly

python main.py --multirun regressors@pykoop_pipeline=EDMD-AS,FBEDMD-AS,TEDMD-AS variance=0,0.00001,0.0001,0.001,0.01,0.1,1 pred=false

Generating plots

To generate all figures except Figure 6, run

python plot.py --multirun what_to_plot.variance=0.01,0.1 plotting@what_to_plot=soft_robot_plots,nl_msd_plots

To generate Figure 6, run separately

python plot.py plotting@what_to_plot=frob_err_plots

The plots will be found in build/figures/paper.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages