Associated with the pair of matrices
The Gramian,
Consider the Gauss-Markov process
It can be shown that the process
This package offers a method to both compute the transition matrix
] add FiniteHorizonGramians
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
exp_and_gram_chol!(eA, U, A, B, t, method, cache)
# do cool stuff with eA and U here?
end
eA, G = exp_and_gram!(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.
- 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.