New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pH DMD Algorithm #2027
base: main
Are you sure you want to change the base?
pH DMD Algorithm #2027
Conversation
Mirroring external branch in external_pr_2027 |
The demo and tests are failing, probably because the |
This requires some thought on time-stepping, so I postponed it to the next milestone. |
With regards to time-stepping the main difference consists in the way the implicit methods sample from the control. From my point of view, the easiest way forward would be to implement an additional EDIT: I noticed that the signs in the implicit step are no issue, I misread some code there... |
fa75757
to
13ac5dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments:
pymortests/demos.py
should be updated to runpymordemos/phdmd.py
(the demo is failing currently)- the conflicts should be resolved (in particular,
msd_example
frompymor.models.examples
should be used inpymordemos/phlti.py
)
Co-authored-by: Petar Mlinarić <petar.mlinaric@gmail.com>
I resolved the conflicts, however I'm having trouble with getting the demos test to run locally. As far as I am aware, adding the line ('phdmd', ['--fom-order=4', '--rom-order=10']) in the demo test file should allow the demo to run, but for some reason this test just does not cooperate with me. Could you have another look at it @pmli ? |
Running the demo works fine for me, e.g., using cd src/pymortests
xvfb-run pytest 'demos.py::test_demos[phdmd:"--fom-order=4 --rom-order=10"]' |
I tried fixing the implementation, but the demo and tests still fail, so I'll postpone working on this (including if the implementation can be generalized to |
@peoe , @Jonas-Nicodemus, are you still interested in working on this PR? Otherwise we would close it .. |
What needs to be done? Unfortunately, to be honest this is not to high on my priority list right now :/ |
The tests and demos are failing (the algorithm doesn't converge when it is expected to converge). I tried comparing with your code, but I couldn't find a significant difference, so I don't know what the issue is. There is also the design issue of a specialized time-stepper used in the tests and demos. In principle, it would be better to have it inside |
This PR implements the pH DMD algorithm from @Jonas-Nicodemus arXiv preprint. This algorithm suits itself to non-intrusive inference of port-Hamiltonian systems from time domain system data. Alongside the basic algorithm a simple demo has been implemented showing the use of this algorithm on a full order MSD model and a reduced model thereof.
Currently, the main source is only available as a preprint, upon possible publication, an update in the bibliography may be necessary.
It depends on merging #1836 beforehand to make use of the pH reductors implemented there.