PortHamiltonianModelReduction

Documentation for PortHamiltonianModelReduction.

A Julia package implementing model reduction techniques for port-Hamiltonian systems.

Example

import Random
Random.seed!(1234) # for reproducibility

using LinearAlgebra, ControlSystemsBase
using PortHamiltonianSystems, PortHamiltonianModelReduction
using PortHamiltonianBenchmarkSystems

J, R, Q, B = construct_system(SingleMSDConfig());
Σ = phss(J, R, Q, B, zero(B), 1e-6*I(2), zeros(2,2)); # create pH system with the artificial feedthrough term 1e-6*I(2)
size(Σ.G) # (100, 2)

Σ = phminreal(Σ); # structure preserving minimal realization
size(Σ.G) # (73, 2)

r = 10 # reduced order

Σr1 = phirka(Σ, r);
norm(Σ - Σr1) # 0.08325552559202813

Σr2 = prbt(Σ, r);
norm(Σ - Σr2) # 0.0031763828389874994

Σr3 = irka(ss(Σ), r);
norm(Σ - Σr3) # 0.0016571113588666688
ispassive(Σr3) # false

Σr4, _ = klap(Σr3);
norm(Σ - Σr4) # 0.0016577342723135616
ispassive(Σr4) # true

References

[1]
T. Breiten and T. Stykel. Balancing-Related Model Reduction Methods. In: Model Order Reduction Volume 1: System- and Data-Driven Methods and Algorithms, edited by P. Benner, S. Grivet-Talocia, A. Quarteroni, G. Rozza, W. Schilders and L. M. Silveira (De Gruyter, 2021); pp. 15–56.
[2]
T. Holicki, J. Nicodemus, P. Schwerdtner and B. Unger. Energy Matching in Reduced Passive and Port-Hamiltonian Systems. SIAM J. Control Optim. 63, 2154–2176 (2025).
[3]
S. Gugercin, A. C. Antoulas and C. Beattie, $\mathcal{H}_2$ Model Reduction for Large-Scale Linear Dynamical Systems. SIAM J. Matrix Anal. Appl. 30, 609–638 (2008).
[4]
J. Nicodemus, M. Voigt, S. Gugercin and B. Unger. KLAP: KYP Lemma Based Low-Rank Approximation for $\mathcal{H}_2$-Optimal Passivation. ArXiv e-print 2501.05178 (2025).
[5]
B. Peherstorfer and K. Willcox. Data-Driven Operator Inference for Nonintrusive Projection-Based Model Reduction. Computer Methods in Applied Mechanics and Engineering 306, 196–215 (2016).
[6]
S. Grivet-Talocia and L. Silveira. Post-processing methods for passivity enforcement. In: Model Order Reduction: Volume 1 – System- and Data-Driven Methods and Algorithms, edited by P. Benner, S. Grivet-Talocia, A. Quarteroni, G. Rozza, W. Schilders and L. M. Silveira (De Gruyter, Berlin, Boston, 2021); pp. 139–180.
[7]
B. Dumitrescu. Parameterization of Positive-Real Transfer Functions with Fixed Poles. IEEE Trans. Circuits Syst. I. Regul. Pap. 49, 523–526 (2002).
[8]
C. Coelho, J. Phillips and L. Silveira. A Convex Programming Approach for Generating Guaranteed Passive Approximations to Tabulated Frequency-Data. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 23, 293–301 (2004).
[9]
S. Gugercin, R. V. Polyuga, C. Beattie and A. van der Schaft. Structure-Preserving Tangential Interpolation for Model Reduction of Port-Hamiltonian Systems. Automatica J. IFAC 48, 1963–1974 (2012).
[10]
R. Morandin, J. Nicodemus and B. Unger. Port-Hamiltonian Dynamic Mode Decomposition. SIAM J. Sci. Comput. 45, A1690–A1710 (2023).
[11]
U. Desai and D. Pal. A Transformation Approach to Stochastic Model Reduction. IEEE Trans. Automat. Control 29, 1097–1100 (1984).