Skip to main content

Autoencoder-based port-Hamiltonian Identification Networks (ApHIN) is a Python package for structure-preserving model order reduction and system identification of port-Hamiltonian systems.

Project description

Documentation Status MIT License

ApHIN - Autoencoder-based port-Hamiltonian Identification Networks

A data-driven framework for the identification of latent port-Hamiltonian systems [1].

ApHIN

Abstract

Conventional physics-based modeling techniques involve high effort, e.g.~time and expert knowledge, while data-driven methods often lack interpretability, structure, and sometimes reliability. To mitigate this, we present a data-driven system identification framework that derives models in the port-Hamiltonian (pH) formulation. This formulation is suitable for multi-physical systems while guaranteeing the useful system theoretical properties of passivity and stability.

Our framework combines linear and nonlinear reduction with structured, physics-motivated system identification. In this process, high-dimensional state data obtained from possibly nonlinear systems serves as the input for an autoencoder, which then performs two tasks: (i) nonlinearly transforming and (ii) reducing this data onto a low-dimensional manifold. In the resulting latent space, a pH system is identified by considering the unknown matrix entries as weights of a neural network. The matrices strongly satisfy the pH matrix properties through Cholesky factorizations. In a joint optimization process over the loss term, the pH matrices are adjusted to match the dynamics observed by the data, while defining a linear pH system in the latent space per construction. The learned, low-dimensional pH system can describe even nonlinear systems and is rapidly computable due to its small size.

The method is exemplified by a parametric mass-spring-damper and a nonlinear pendulum example as well as the high-dimensional model of a disc brake with linear thermoelastic behavior.

Features

This repository implements neural networks that identify linear port-Hamiltonian systems from (potentially high-dimensional) data[1].

  • Autoencoders (AEs) for dimensionality reduction
  • pH layer to identify system matrices that fullfill the definition of a linear pH system
  • pHIN: identify a (parametric) low-dimensional port-Hamiltonian system directly
  • ApHIN: identify a (parametric) low-dimensional latent port-Hamiltonian system based on coordinate representations found using an autoencoder
  • Examples for the identification of linear pH systems from data
    • One-dimensional mass-spring-damper chain
    • Pendulum
    • discbrake model

Installation

You can either clone the repository and install the package locally or install it directly from PyPI.

PyPI

pip install aphin

Local

Clone this repository and install it to your local environment as package using pip:

git clone https://github.com/Institute-Eng-and-Comp-Mechanics-UStgt/ApHIN.git
cd ApHIN

Then you can activate the environment in which you want to install the package, and use pip to perform the installation.

pip install -e .

:warning: Please note that you need pip version 24.0 to install the repository in editable mode. Either upgrade pip to the latest version or install it without the -e argument

References

[1] Johannes Rettberg, Jonas Kneifl, Julius Herb, Patrick Buchfink, Jörg Fehr, and Bernard Haasdonk. Data-driven identification of latent port-Hamiltonian systems. Arxiv, 2024.

[2] Volker Mehrmann and Benjamin Unger. Control of port-Hamiltonian differential-algebraic systems and applications, 2022.

[3] Kathleen Champion, Bethany Lusch, J. Nathan Kutz, and Steven L. Brunton. Data-driven discovery of coordinates and governing equations. Proceedings of the National Academy of Sciences, 116(45):22445–22451, 2019.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aphin-1.0.tar.gz (83.4 kB view details)

Uploaded Source

Built Distribution

aphin-1.0-py3-none-any.whl (98.0 kB view details)

Uploaded Python 3

File details

Details for the file aphin-1.0.tar.gz.

File metadata

  • Download URL: aphin-1.0.tar.gz
  • Upload date:
  • Size: 83.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for aphin-1.0.tar.gz
Algorithm Hash digest
SHA256 29504911af250de0ca4b5a8b7f3f50774ae9493ae33d94c55722c0e5d3e38f29
MD5 3ea31cbe3a3b453ab33fc48aac29e969
BLAKE2b-256 2a58d4937b0febca3b5aaed80c31099341eaa568a669f91cc5d8fc1d598a2f13

See more details on using hashes here.

File details

Details for the file aphin-1.0-py3-none-any.whl.

File metadata

  • Download URL: aphin-1.0-py3-none-any.whl
  • Upload date:
  • Size: 98.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for aphin-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 501c92580a2d5b6d503dffce35347b3f2b6d19c033340b04866067bdaaeb96cb
MD5 e3a42ea784e7c7689432e497f5c566e4
BLAKE2b-256 17a641314683620442525fce56b03fe9d3427db7ac8fafdcbffeb8d267889b5d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page