MORpH is a MATLAB toolbox designed for
- efficient storage,
- system analysis,
- interconnection and
- structure-preserving model reduction (MOR)
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.
In MORpH, we work with pH models of the following form:
where
(i) The structure matrix
is skew-symmetric, i.e.,
(ii) The dissipation matrix
is positive semi-definite, i.e.,
(iii) The quadratic Hamiltonian is stated as:
with
PH models are represented as objects of the phs class. They can be created in the following way:
sys = phs(J,R,Q,G,E,P,S,N);
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.
With the phs class comes a set of wrappers for system analysis. For example, you can create a Bode plot for your system via
bode(sys)
The goal of structure-preserving MOR is to approximate a large-scale pH model with a much smaller reduced model
with reduced state vector
MORpH offers different algorithms to reduce large-scale pH models with an intuitive user interface.
For example, we can reduce our created pH model sys
with the IRKA-PH algorithm (see [1]) to a system with dimension redOrder
via
redSys = irkaPH(sys, redOrder, Opts);
The Opts
struct can be used to configure the algorithm's parameters.
An overview of the implemented algorithms is given here. For a more detailed description of the different algorithms, pleases have a look at the demos.
After downloading MORpH, change to the installation directory in MATLAB and run the script setup_morph.m
.
It also assists with the installation of third-party software that may be required for some functionalities within MORpH.
You successfully installed MORpH? Great! The best way to get familiar with the toolbox is the demo for creating pH models. After you created your first pH model, you can analyze your model with the functions provided here. Next, you can have a look here for an overview of the different MOR methods.
The toolbox is structured as follows:
MORpH (main folder)
- src
- @phs: Class definition and functions to store and analyze large-scale, sparse pH models
- MOR: Algorithms for structure-preserving MOR of pH models
- @phsRed: Class to store reduced pH models
- pa-ENF: Passivity enforcement algorithms
- pa-MOR: Passivity-preserving MOR algorithms
- pH-MOR: PH-preserving MOR algorithms
- thirdParty: Third-party code
- Utility: Helper functions
- demos: Test systems and demos for different algorithms
- test: Unit tests for core functionalities
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:
- Manopt for optimization on manifolds
- M-M.E.S.S. for solving matrix equations
- GRANSO for optimization
- CVX for optimization
- YALMIP for optimization
- SADPA/SAMDP for computing dominant spectral zeros
- LINORM_SUBSP for H-infinity norm computations
- HINORM for H-infinity norm computations
Note: If any of these software packages is used, please comply with the licensing and citation rules of each package!
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change. For more information on how to contribute, please look HERE.
This toolbox is developed by MORLab, the model reduction lab at the Chair of Automatic Control at TUM. For more information, see HERE.