Class FluidLyapunov

java.lang.Object
jline.solvers.fluid.moments.FluidLyapunov

public final class FluidLyapunov extends Object
Stationary covariance of the linear noise approximation. Java twin of the MATLAB fluid_lyapunov.

Around a fixed point x* of the fluid drift, the fluctuation process Z = (X - x*) obeys the linear stochastic differential equation dZ = A*Z*dt + sqrt(Qdiff)*dW, whose stationary covariance solves the Lyapunov equation

   A*Sigma + Sigma*A' + Qdiff = 0,   Qdiff = D*diag(r(x*))*D'
 

A is singular whenever the model conserves population: every closed class contributes a left null vector, so the equation has no unique solution on the full state space. It does have one on the reachable subspace, which is exactly range(D): the state can only move along jump directions, so the fluctuation lives there and nowhere else. Both A = D*diag(rateBase)*G and Qdiff map into range(D) as well, so restricting to an orthonormal basis V of range(D) is an exact reduction, not an approximation, and the reduced Lyapunov equation is nonsingular whenever the fixed point is stable.

See Also:
  • Method Details

    • solve

      public static FluidLyapunov.Result solve(Matrix A, Matrix Qdiff, Matrix D, double tol)
      Solves the Lyapunov equation on the reachable subspace.
      Parameters:
      A - drift Jacobian at the fixed point (n x n)
      Qdiff - diffusion matrix D*diag(r)*D' (n x n)
      D - jump matrix (n x nevents), spanning the reachable subspace
      tol - stability margin; eigenvalues of the reduced A with real part above -tol are reported as non-hyperbolic
      Returns:
      the stationary covariance, supported on range(D)
    • orth

      public static Matrix orth(Matrix A)
      Orthonormal basis of the column space, mirroring MATLAB orth: the left singular vectors whose singular value exceeds max(size(A))*eps*max(s).
      Parameters:
      A - any matrix
      Returns:
      an (rows x rank) matrix with orthonormal columns