Giter Club home page Giter Club logo

koopman's Introduction

KOOPMAN MODE DECOMPOSITION

Matlab toolbox for Koopman mode decomposition.

By Marko Budisic
Department of Mathematics, Clarkson University
[email protected]
http://www.clarkson.edu/~mbudisic

Koopman mode decomposition is a method for data analysis that identifies fixed shapes (modes) which evolve by exponential growth/decay + oscillation. For a (very) basic overview and comparison with Proper Orthogonal Decomposition, see a blog post on Marko's website. For a more in-depth overview, please see references Mezic 2013 and Budisic et al. 2012 at the bottom of this file.

The goal of this toolbox is to collect several common Koopman mode decomposition algorithms, in a documented, transparent code.

The code is licensed under a BSD3 license, found in the accompanying LICENSE file.

Installation

Place the toolbox on the drive, e.g., to ~/MatlabToolbox/koopman (from now on referred to as [toolboxfolder], and add its top folder to Matlab path.

>>> addpath("[toolboxfolder]")
>>> savepath

Then functions from the toolbox can be accessed via namespace "koopman". Executing

>> doc koopman

should list the contents of the toolbox.

Use

Basic syntax

Currently, the toolbox implements three algorithms based on Dynamic Mode Decomposition:

  • DMD by Tu et al. 2014 which uses SVD decomposition of input snapshots,
  • DMD by Duke et al. 2012 which uses QR decomposition of input snapshots,
  • DMD by Chen et al. 2012 which uses SVD decomposition of the square of input snapshots, and
  • direct Koopman mode decomposition based on Discrete Fourier Transform (FFT) of input data.

All functions have a similar syntax. Let's suppose that a Snapshots matrix holds a multidimensional data sampled from a process, with each column corresponding to a snapshot at a single time instance, and snapshots taken at a time resolution of dt.

To compute Koopman modes using the provided algorithms, run either:

>> [Spectrum, Modes, Amplitudes] = koopman.DMD( Snapshots, dt )
>> [Spectrum, Modes, Amplitudes] = koopman.DMD_Duke( Snapshots, dt )
>> [Spectrum, Modes, Amplitudes] = koopman.DMD_Snapshot( Snapshots, dt )
>> [Spectrum, Modes, Amplitudes] = koopman.KDFT( Snapshots, dt )

Output variables are

  • Spectrum, a vector of complex frequencies, where positive real parts indicate growing modes, negative decaying modes, and imaginary parts give oscillation frequencies
  • Modes, matrix of spatial shapes, where complex-valued column corresponds to an element of Spectrum,
  • Amplitudes, a vector of complex amplitudes that minimize the L2 distance between the input data, and the reconstruction, due to Jovanovic et al. 2014

For further documentation, see help lines for individual functions in the koopman namespace.

Validation script

A demo (and validation) for the toolbox is located in koopman/validate folder. Once the namespace +koopman is in the path, demo can be run by

>> cd [toolboxfolder]/validate
>> DemoKoopmanModes

Demo implements an exponentially growing mode used by Duke et al. Spatial shape of the data set is fixed in demo, while the time behavior is set via arguments to the demo function.

Duke data with decay rate -0.1 and angular frequency 21:

Input visualization

Data for -0.1+21i set

Output

Results for -0.1+21i set

Duke data with no decay and angular frequency 20:

Input visualization

Data for 0+20i set

Output

Results for 0+20i set

Von Karman street example

A more realistic application can be found in [toolboxfolder]/examples/VonKarmanStreet.m. Change your current directory to [toolboxfolder]/examples and run

>> web(publish('VonKarmanStreet'))

to see the step-by-step guide to how the toolbox may be used. The required data file can be downloaded at this link (~170 MB).

The data used is a flow past cylinder, computed by Lattice Boltzmann technique, implemented by FlowKit Inc. .

Input data

Speed and vorticity of Von Karman Street

Output spectrum

Koopman spectrum (DMD) of Von Karman Street

Size is the L2-optimal amplitude of the mode, color is the L2-optimal phase.

Output modes

Koopman modes (DMD) of Von Karman Street

Each row corresponds to a single mode, visualized in speed and vorticity.

References

koopman's People

Contributors

mbudisic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

koopman's Issues

How to arrange CFD data for koopman analysis?

Hi,

I would like to run Koopman analysis on VIV. My data set is in the Tecplot format at various times instances. How to arrange? If possible, can you provide a script to do this?

Regards

Example for classifying time series data

I have data which has 50000 rows. In that 41 features and 23classes. Is it possible to apply dynamic mode decomposition. If so can you give an example for classifying my dataset

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.