FiniteHorizonGramians

A package for computing matrix exponentials and finite horizon Gramians

https://github.com/filtron/finitehorizongramians.jl

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.6%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

A package for computing matrix exponentials and finite horizon Gramians

Basic Info
  • Host: GitHub
  • Owner: filtron
  • License: mit
  • Language: Julia
  • Default Branch: main
  • Homepage:
  • Size: 470 KB
Statistics
  • Stars: 11
  • Watchers: 3
  • Forks: 2
  • Open Issues: 4
  • Releases: 4
Created over 2 years ago · Last pushed 8 months ago
Metadata Files
Readme License Citation

README.md

FiniteHorizonGramians

Stable Dev Build Status Coverage

Introduction

Associated with the pair of matrices $A \in \mathbb{R}^{n \times n}$ and $B \in \mathbb{R}^{n \times m}$ is the differential Lyapunov equation:

$$ \dot{Q}(\tau) = A Q(\tau) + Q(\tau) A^* + B B^*, \quad Q(0) = 0,\quad \tau \in [0, t]. $$

$Q(t)$ is the finite Horizon controllability Gramian of $(A, B)$, over the interval $[0, t]$, and may be equivalently expressed by the function $Q(t) = G(At, B \sqrt{t})$, where

$$ G(A, B) = \int_0^1 e^{A t} B B^* e^{A^* t} \mathrm{d} t. $$

The Gramian, $G(A, B)$, is positive semi-definite and therefore has an upper triangular Cholesky factor, $U(A, B)$. This package provides algorithms for computing both $e^A$ and $U(A, B)$, without having to form $G(A, B)$ as an intermediate step. This avoids the problem of failing Cholesky factorizations when computing $G(A, B)$ directly leads to a numerically non-positive definite matrix.

Application

Consider the Gauss-Markov process

$$ \dot{x}(t) = A x(t) + B \dot{w}(t). $$

It can be shown that the process $x$ has a transition density given by

$$ p(t + h, x \mid t, x') = \mathcal{N} (x; e^{A h} x', G(A h, \sqrt{h} B) ). $$

This package offers a method to both compute the transition matrix $e^{A h}$ and a Cholesky factor of $G(A h, \sqrt{h} B)$ in a numerically robust way. This is useful for instance in so called array implementations of Gauss-Markov regression (i.e. square-root Kalman filters etc).

Installation

julia ] add FiniteHorizonGramians

Basic usage

```julia using FiniteHorizonGramians, LinearAlgebra

n = 15 A = (I - 2.0 * tril(ones(n, n))) B = sqrt(2.0) * ones(n, 1) ts = LinRange(0.0, 1.0, 2^3)

method = ExpAndGram{Float64,13}() cache = FiniteHorizonGramians.alloc_mem(A, B, method) # allocate memory for intermediate calculations eA, U = similar(A), similar(A) # allocate memory for outputs

for t in ts expandgram_chol!(eA, U, A, B, t, method, cache) # do cool stuff with eA and U here? end

eA, G = expandgram!(eA, similar(U), A, B, last(ts), method, cache) # we can comput the full Gramian if we prefer G ≈ U'U # true eA ≈ exp(A * last(ts)) # we also get an accurate matrix exponential, of course. ```

Related packages

  • MatrixEquations.jl provides an algorithm for computing the Cholesky factor of infinite horizon Gramians (i.e. solutions to algebraic Lyapunov equations).
  • ExponentialUtilities.jl provides various algorithms for matrix exponentials and related quantities.

Owner

  • Name: Filip Tronarp
  • Login: filtron
  • Kind: user
  • Location: Tübingen
  • Company: University of Tübingen

Post-doctoral researcher in the methods of machine learning group at University of Tübingen.

Citation (CITATION.bib)

@article{StillfjordTronarp2023,
	author  = {Tony Stillfjord and Filip Tronarp},
	title   = {Computing the matrix exponential and the {C}holesky factor of a related finite horizon {G}ramian},
	journal = {arXiv preprint arXiv:2310.13462},
	year    = {2023},
}

GitHub Events

Total
  • Create event: 6
  • Commit comment event: 2
  • Release event: 1
  • Issues event: 1
  • Watch event: 2
  • Delete event: 3
  • Issue comment event: 2
  • Push event: 13
  • Pull request event: 8
Last Year
  • Create event: 6
  • Commit comment event: 2
  • Release event: 1
  • Issues event: 1
  • Watch event: 2
  • Delete event: 3
  • Issue comment event: 2
  • Push event: 13
  • Pull request event: 8

Packages

  • Total packages: 1
  • Total downloads:
    • julia 2 total
  • Total dependent packages: 1
  • Total dependent repositories: 0
  • Total versions: 4
juliahub.com: FiniteHorizonGramians

A package for computing matrix exponentials and finite horizon Gramians

  • Versions: 4
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 2 Total
Rankings
Dependent repos count: 3.2%
Dependent packages count: 7.7%
Average: 7.9%
Forks count: 9.5%
Stargazers count: 11.1%
Last synced: 6 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/checkout v3 composite
  • codecov/codecov-action v3 composite
  • julia-actions/cache v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-docdeploy v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CompatHelper.yml actions
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/register.yml actions
  • julia-actions/RegisterAction latest composite