This repository contains the code for the paper Energy matching in reduced passive and port-Hamiltonian systems. The goal is to find low-dimensional port-Hamiltonian (pH) models that not only match the input-output dynamic of a full order model (FOM), but also its energy (Hamiltonian) trajectory.
If you use this project for academic work, please consider citing our publication:
T. Holicki, J. Nicodemus, P. Schwerdtner, and B. Unger
Energy matching in reduced passive and port-Hamiltonian systems
ArXiv e-print 2309.05778, 2023.
This code base is using the Julia Language and DrWatson to make a reproducible scientific project named
ph-energy-matching
To (locally) reproduce this project, do the following:
- Download this code base. Notice that raw data are typically not included in the git-history and may need to be downloaded independently.
- Open a Julia console and do:
julia> using Pkg julia> Pkg.add("DrWatson") # install globally, for using `quickactivate` julia> Pkg.activate("path/to/this/project") julia> Pkg.instantiate()
This will install all necessary packages for you to be able to run the scripts and everything should work out of the box, including correctly finding local paths.
You may notice that most scripts start with the commands:
using DrWatson
@quickactivate "ph-energy-matching"
which auto-activate the project and enable local path handling from DrWatson.
The executable script main.jl
is located in the scripts
directory.
It performs the following steps:
- Set up a pH full order model and declare the methods (
Reductors
and (Energy-)Matcher
) to run. - Run the methods.
- Evaluate the ROMs.
- Analyze the results.
Note that for the exact reproduction of the results in the paper for the poroelasticity model,
the solution of the positive-real algebraic Riccati equation from MATLAB's icare
is required.
This requires a running version of MATLAB and the package MATLAB.jl. Then you need to uncomment
- the
using MATLAB
line insrc/PortHamiltonianSystems/PortHamiltonianSystems.jl
. - in the
prgram
function insrc/PortHamiltonianSystems/gramians.jl
, the MATLAB related lines must be uncommented.
Distributed under the MIT License. See LICENSE
for more information.
Jonas Nicodemus - jonas.nicodemus@simtech.uni-stuttgart.de
Tobias Holicki - tobias.holicki@imng.uni-stuttgart.de
Paul Schwerdtner - paul.schwerdtner@nyu.edu
Benjamin Unger - benjamin.unger@simtech.uni-stuttgart.de
Project Link: https://github.com/Jonas-Nicodemus/ph-energy-matching