Skip to content

Commit 265967c

Browse files
author
Tim Moser
committed
add first public version of MORpH
1 parent 042e829 commit 265967c

File tree

444 files changed

+76985
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

444 files changed

+76985
-2
lines changed

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Windows image file caches
2+
Thumbs.db
3+
ehthumbs.db
4+
5+
# Folder config file
6+
Desktop.ini
7+
8+
# Recycle Bin used on file shares
9+
$RECYCLE.BIN/
10+
11+
# Windows shortcuts
12+
*.lnk
13+
14+
# OSX
15+
.DS_Store
16+
.AppleDouble
17+
.LSOverride
18+
19+
# Thumbnails
20+
._*
21+
22+
# Files that might appear on external disk
23+
.Spotlight-V100
24+
.Trashes
25+
26+
# MATLAB
27+
*.asv
28+
*.mat
29+
30+
# External third-party content
31+
*src/thirdParty/external/*
32+
!*src/thirdParty/external/README.md

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Contributing to MORpH
2+
3+
Contributions to **MORpH** are welcome!
4+
5+
In the following are a few guidelines to respect when developing code for **MORpH**.
6+
7+
## Styleguide
8+
9+
The file ``StyleGuidelines.mlx`` contains some general programming and naming rules aimed at improving the quality of the code, its readability and the homogeneity of the toolbox as a whole.
10+
11+
## Testing
12+
13+
We have implemented test routines for different algorithms. [HERE](/test) you can find more information on how to write your own tests.
14+
15+
16+
If you have any questions on how to contribute, just get in touch with us at [morlab.rt@ed.tum.de](mailto:morlab.rt@ed.tum.de).

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 2-Clause License
22

3-
Copyright (c) 2022, MORLab
3+
Copyright (c) 2022, Chair of Automatic Control, Technical University of Munich.
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,77 @@
1-
# MORpH
1+
# MORpH: Model reduction of linear port-Hamiltonian systems
2+
3+
## Description
4+
5+
**MORpH** is a MATLAB toolbox designed for
6+
- efficient storage,
7+
- system analysis,
8+
- interconnection and
9+
- structure-preserving model reduction (MOR)
10+
11+
of large-scale port-Hamiltonian (pH) models. The model class of pH systems enables energy-based modeling and a flexible coupling of models across different physical domains. This makes them well-suited for the simulation and control of complex technical systems.
12+
13+
### The *phs* class
14+
15+
In **MORpH**, pH models are represented as objects of the *phs* class. They can be created in the following way:
16+
```
17+
sys = phs(J,R,Q,G,E,P,S,N);
18+
```
19+
Upon object creation, the *phs* class checks the pH structural constraints. The system matrices are saved in MATLAB's *sparse* format to reduce storage demands for large-scale systems.
20+
21+
With the *phs* class comes a set of wrappers for system analysis. For example, you can create a Bode plot for your system via
22+
```
23+
bode(sys)
24+
```
25+
26+
### Structure-preserving MOR
27+
28+
**MORpH** offers different ways to reduce large-scale pH models in a structure-preserving way, meaning that the reduced model also has pH form.
29+
For example, we can reduce our created pH model ```sys``` with the IRKA-PH algorithm (see [[1]](https://doi.org/10.1016/j.automatica.2012.05.052)) to a system with dimension ```redOrder``` via
30+
```
31+
redSys = irkaPH(sys, redOrder, Opts);
32+
```
33+
The ```Opts``` struct can be used to configure the algorithm's parameters.
34+
An overview of the implemented algorithms is given [HERE](src/MOR/README.md). For a more detailed description of the different algorithms, pleases have a look at the [DEMO](/demos) files.
35+
36+
37+
## Installation
38+
39+
After downloading **MORpH**, change to the installation directory in MATLAB and run the script `setup_morph.m`.
40+
It also assists with the installation of third-party software that may be required for some functionalities within **MORpH**.
41+
42+
### Toolbox structure
43+
The toolbox is structured as follows:
44+
45+
**MORpH** (main folder)
46+
- **src**
47+
- **@phs**: Class definition and functions to store and analyze large-scale, sparse pH models
48+
- **MOR**: Algorithms for structure-preserving MOR of pH models
49+
- **@phsRed**: Class to store reduced pH models
50+
- **pa-ENF**: Passivity enforcement algorithms
51+
- **pa-MOR**: Passivity-preserving MOR algorithms
52+
- **pH-MOR**: PH-preserving MOR algorithms
53+
- **thirdParty**: Third-party code
54+
- **Utility**: Helper functions
55+
- **demos**: Test systems and demos for different algorithms
56+
- **test**: Unit tests for core functionalities
57+
58+
## Dependencies
59+
Additional to the Control System Toolbox and Optimization Toolbox of MATLAB, **MORpH** partially relies on (or provides interfaces to) the following third-party open-source software packages which are greatfully acknowledged:
60+
- [Manopt](https://github.com/NicolasBoumal/manopt) for optimization on manifolds
61+
- [M-M.E.S.S.](https://github.com/mpimd-csc/mmess) for solving matrix equations
62+
- [GRANSO](https://gitlab.com/timmitchell/GRANSO) for optimization
63+
- [CVX](https://github.com/cvxr/CVX) for optimization
64+
- [YALMIP](https://github.com/yalmip/YALMIP) for optimization
65+
- [SADPA/SAMDP](https://sites.google.com/site/rommes/software) for computing dominant spectral zeros
66+
- [LINORM_SUBSP](http://www.math.tu-berlin.de/index.php?id=186267&L=1) for H-infinity norm computations
67+
- [HINORM](http://www.mpi-magdeburg.mpg.de/mpcsc/software/infnorm) for H-infinity norm computations
68+
69+
> Note: If any of these software packages is used, please comply with the licensing and citation rules of each package!
70+
71+
## Contributing
72+
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
73+
For more information on how to contribute, please look [HERE](/CONTRIBUTING.md).
74+
75+
## Copyright
76+
This toolbox is developed by [MORLab](https://www.epc.ed.tum.de/en/rt/research/model-order-reduction/), the model reduction lab at the [Chair of Automatic Control](https://www.epc.ed.tum.de/en/rt/home/) at [TUM](https://www.tum.de/en/).
77+
For more information, see [HERE](/LICENSE.md).

demos/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# demos
2+
This folder provides some demos on how to use the MORpH toolbox.
3+
4+
The folder *test_systems* contains functions for creating exemplary system models (e.g. mass-spring-damper and ladder network systems).

demos/demo_arnoldiPH.mlx

194 KB
Binary file not shown.

demos/demo_balPH.mlx

66.5 KB
Binary file not shown.

demos/demo_cirkaPH.mlx

64.4 KB
Binary file not shown.

demos/demo_dszm.mlx

59.6 KB
Binary file not shown.

demos/demo_ecm.mlx

77.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)