PortHamiltonianModelReduction.btMethod
Σr = bt(Σ::StateSpace, r; Lx=grampd(Σ, :o), Ly=grampd(Σ, :c)')

Reduces the state dimension of the system Σ to r using standard square root balanced truncation (see for instance [1]). The cholesky factors of the Gramians can passed as optional arguments Lx and Ly. The default values are the cholesky factors of the observability and controllability Gramians.

source
PortHamiltonianModelReduction.irkaMethod
Σr = irka(Σ::StateSpace, r; tol=1e-3, max_iter=200)

Reduces the state dimension of the system Σ to r using the iterative rational Krylov algorithm (IRKA) [3].

source
PortHamiltonianModelReduction.klapFunction
klap(Σ::StateSpace; L0=L0(Σ), M=M(Σ), P=gram(Σ, :c); recycl=:schur, restart=false, α=1e-8, ε=1e-4, verbose=true, kwargs...) -> Σp, res

Passivates a system Σ using KLAP [4]. The optimization problem is solved using LBFGS.

source
PortHamiltonianModelReduction.klap_inital_guessFunction
klap_inital_guess(Σ, ΔD=0.0; ε=1e-8) -> L0, ΔD

Computes an initial guess for KLAP [4]. The initial guess is computed by perturbing the feedthrough matrix to achieve a passive realization. Then the perturbed system is used to compute the initial guess. The perturbation ΔD can be specified, otherwise it is computed using ΔD(Σ).

source
PortHamiltonianModelReduction.matchnrgMethod
Σrem = matchnrg(Σ::PortHamiltonianStateSpace, Σr::PortHamiltonianStateSpace; solver=:BFGS, kwargs...)

Applies energy matching [2] to the ROM Σr to match the Hamiltonian dynamics of the original system Σ. If solver is :Hypatia or :COSMO, it uses semidefinite programming with the specified optimizer. If solver is :BFGS, it uses the barrier method with BFGS optimization. If solver is :ARE, the best solution of the ARE is returned.

source
PortHamiltonianModelReduction.matchnrg_sdpFunction
Σphr = matchnrg_sdp(Σ::QuadraticOutputStateSpace, Σr::StateSpace; optimizer=COSMO.Optimizer, ε=1e-8, kwargs...)

Solves the energy matching problem using semidefinite programming.

source
PortHamiltonianModelReduction.opinfMethod
Σr, res = opinf(data::TimeDomainData, Wr::Matrix)

Computes a ROM Σr from time-domain data via operator inference (OpInf) [5]. The error of the OpInf problem is returned as res. The data is projected using with the matrix Wr, which is typically a POD basis.

source
PortHamiltonianModelReduction.passivateFunction
passivate(Σ::StateSpace, method=:klap, args...; kwargs...) -> Σp, res

Passivate the system Σ using the method method. The available methods are:

  • :klap: KLAP optimization [4]
  • :lmi: LMI optimization [6]
  • :lmi_tp: LMI optimization with trace parametrization [7, 8]

The remaining arguments args and keyword arguments kwargs are passed to the corresponding passivation function.

source
PortHamiltonianModelReduction.pgprojectionFunction
pgprojection(Σph::PortHamiltonianStateSpace, V::Matrix, W::Matrix=Σph.Q * V / (V' * Σph.Q * V))
pgprojection(Σ::StateSpace, V::Matrix, W::Matrix=V)

Applies a (Petrov-)Galerkin projection to a pH or LTI. In the pH case, the W matrix has to be chosen such that the structure is preserved. The default choice is W = Σph.Q * V / (V' * Σph.Q * V), which is proposed in [9].

source
PortHamiltonianModelReduction.phdmdMethod
Σph, err = phdmd(data::TimeDomainData, H::AbstractVector; kwargs...)
Σph, err = phdmd(data::TimeDomainData, Q::AbstractMatrix; kwargs...)

Computes a pH system Σph that approximates given time-domain data and a candidate Q for the Hessian of the Hamiltonian or measurements H of the Hamiltonian using the pHDMD method [10].

source
PortHamiltonianModelReduction.phdmd_initial_guessMethod
Γ, W, err = phdmd_initial_guess(data::TimeDomainData, Q::AbstractMatrix; kwargs...)

Computes an initial guess Γ, W for the pHDMD problem from time-domain data data and a candidate Q for the Hessian of the Hamiltonian (see [10, Thm. 3.7]).

source
PortHamiltonianModelReduction.phdmd_sdpMethod
Σph = phdmd_sdp(data::TimeDomainData; kwargs...)
Σph = phdmd_sdp(data::TimeDomainData, Q::AbstractMatrix; kwargs...)

Computes a pH system Σph that approximates given time-domain data using semidefinite programming. Either the Hessian of the Hamiltonian Q is provided or also learned from the data.

source
PortHamiltonianModelReduction.podbasisMethod
podbasis(X::AbstractMatrix, r::Int; kwargs...)
podbasis(F::SVD, r::Int; kwargs...)

Returns the POD basis via the truncated singular value decomposition of a data matrix X. Alternatively, it can be cast on a F::SVD object, such that the SVD is not recomputed.

source
PortHamiltonianModelReduction.prbtMethod
Σr = prbt(Σ, r; Lx=prgrampd(Σ, :o), Ly=prgrampd(Σ, :c))

Reduces the state dimension of the system Σ to r using positive real balanced truncation (PRBT) [11]. The cholesky factors of the positive real Gramians can passed as optional arguments Lx and Ly, in order to avoid recomputation. Σ can be a StateSpace or a PortHamiltonianStateSpace, which will then also be the return type. In the case of a PortHamiltonianStateSpace, for the conversion to the ROM the minimal solution of the KYP inequality is used as the Hessian of the Hamiltonian.

source
PortHamiltonianModelReduction.tddataMethod
data = tddata(Ẋ::Matrix{T},X::Matrix{T},U::Matrix{T},Y::Matrix{T},t::Vector{T})
data = tddata(res::SimResult)

Creates a TimeDomainData object with element type T.

source