Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/kraketm/ConstrainedDMD
03 May 2026, 08:33:00 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    No releases to show
  • e660bed
  • /
  • README.md
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:7a4b232170be16d92c3fa744da6c7490cb5994a5
origin badgedirectory badge
swh:1:dir:e660bed890263d42b89cb6dcb7ecd1a77acde20d
origin badgerevision badge
swh:1:rev:543b1af120732aa94738315eb75b8a4394caa951
origin badgesnapshot badge
swh:1:snp:3a2a144e060e76b48791aeb591bfbb26116f6bdd

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: 543b1af120732aa94738315eb75b8a4394caa951 authored by timkrake on 24 November 2022, 08:36:43 UTC
Update README
Tip revision: 543b1af
README.md
<h1 align="center">Constrained Dynamic Mode Decomposition</h1>

## ✨ Overview
This repository provides the code for **Constrained Dynamic Mode Decomposition** (Constrained DMD) by Krake et al. [[1]](#1). It describes the main method and additional visualization techniques as well as replications of several figures of the paper.

The content is as follows: 

    │
    ├── datasets
    │   ├── artificial.mat       # Self-made
    │   ├── hourly_data.txt      # Available on www.caiso.com or see github.com/pratha19/Hourly_Energy_Consumption_Prediction 
    │   └── lynx.mat 	     # Lynx dataset, see [2]
    ├── figures	
    │   ├── Fig01.jpg	     # Example figure for Fig. 1   
    │   └── Fig10.jpg	     # Example figure for Fig. 10		
    ├── replication             
    │   ├── replication_fig_1.m
    │   ├── replication_fig_10.m
    │   └── ...
    ├── toolbox    
    │   ├── DMD_***.m            # Core of Constrained DMD    
    │   ├── VIS_***.m            # Visualization techniques     
    │   ├── TOOL_***.m           # Miscellaneous functions 
    │   └── IO_***.m             # Input/Output
    └── main_demo_lynx.m	     # Main demo for the human-in-the-loop method of Constrained DMD (regarding the lynx dataset)

## ⚙️ Usage
This code was tested with MATLAB2022a.

Main functionality can be accessed via the function in the toolbox `DMD_ConstrainedDMD`:

```Matlab
DMDOrig = DMD_ConstrainedDMD(DATA);

DMDCons = DMD_ConstrainedDMD(DATA, DMDOrig, constraints);
```
This function `DMD_ConstrainedDMD` implements the method **Constrained Dynamic Mode Decomposition**. The method is described in Algorithm 1 in more detail in the related publication [[1]](#1). Depending on the number of inputs, this function either computes original DMD (one input) or Constrained DMD (three inputs) incorporating `constraints` into the original decomposition with DMD `DMDOrig`.

A demo of Constrained DMD applied to the lynx dataset [[2]](#2) (see Figure 7, 8, and 9 in the related publication) is described in `main_demo_lynx.m`. The lynx dataset is an univariate time series that consists of seasonal and cyclic patterns. These patterns are characterized by a non-integer period given by 9.63. In this demo, the core method, the visualization techniques, and the human-in-the-loop procedure is illustrated.


<h2 align="left"><img src="figures/representative_small_icon.png" width="28"> Replication of Results</h2>

The replication folder consists of files that aim to reproduce visualizations from the related publication [[1]](#1). The replication of the teaser (Fig. 1), which is based on the dataset `artificial.mat`, can be done with the file `replication_fig_1.m`:

![alt text](figures/Fig01.jpg)

Furthermore, the replication of Fig. 10, which is based on the dataset `hourly_data.txt`, can be done with the file `replication_fig_10.m`:

![alt text](figures/Fig10.jpg)


## 📖 References
<a id="1">[1]</a> 
T. Krake, D. Klötzl, B. Eberhardt, and D. Weiskopf,
"Constrained Dynamic Mode Decomposition",
In: IEEE Transactions on Visualization and Computer Graphics, 2022,
doi: [https://doi.org/10.1109/TVCG.2022.3209437].

```
@article{krake2022ConstrainedDMD,
  title={Constrained Dynamic Mode Decomposition},
  author={Krake, Tim and Klötzl, Daniel and Eberhardt, Bernhard and Weiskopf, Daniel},
  journal={IEEE Transactions on Visualization and Computer Graphics},  
  year={2022},
  volume={},
  number={},
  pages={1-11},
  doi={10.1109/TVCG.2022.3209437}
  }
```

<a id="2">[2]</a> 
Brockwell, P. J. and Davis, R. A.,
"Time Series and Forecasting Methods",
In: Second edition. Springer. Series G,
page 557, 1991.


## 👤 Authors
**Tim Krake** and **Daniel Klötzl**

- Github: [@kraketm](https://github.com/kraketm)
- Github: [@visdan93](https://github.com/visdan93)


## License
Copyright 2022 Tim Krake & Daniel Klötzl

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API