Local Lyapunov analysis

For comparison with neural Lyapunov methods, we also provide a function for local Lyapunov analysis by linearization.

NeuralLyapunov.get_quadratic_lyapunov_functionFunction
get_quadratic_lyapunov_function(dynamics; <keyword_arguments>)

Get a quadratic Lyapunov function for the linearization of the given system around the fixed point. Return the Lyapunov function and its time derivative.

When the system is closed-loop, the continuous-time Lyapunov equation ($A^T P + P A + Q = 0$) is solved directly using the supplied Q (defaults to the identity matrix). The resulting Lyapunov function is then $V(x) = (x - x_0)^T P (x - x_0)$.

When the system is open-loop, the LQR problem is solved to find a linear feedback controller and its associated quadratic Lyapunov function.

Positional Arguments

  • dynamics: the dynamical system being analyzed, represented as a System or the function f such that ẋ = f(x[, u], p, t); either way, the ODE should not depend on time and only t = 0 will be used. If dynamics isa System, call mtkcompile(dynamics) before NeuralLyapunovPDESystem, or mtkcompile(dynamics; inputs = ..., split = false) if the system has unbound inputs.

Keyword Arguments

  • fixed_point: the equilibrium being analyzed, around which to linearize the system (defaults to the origin, dimension inferred from Q or x_dim if available).
  • Q: The weighting matrix for the state in the Lyapunov equation or the LQR problem (defaults to the identity matrix).
  • R: The weighting matrix for the control input in the LQR problem (only used when the system is open-loop; defaults to the identity matrix).
  • p: the values of the parameters of the dynamical system being analyzed; defaults to SciMLBase.NullParameters(); not used when dynamics isa System, then use the default parameter values of dynamics.
  • u_eq: The equilibrium control input (only used when the system is open-loop`; defaults to zero control input).
  • u_dim: The dimension of the control vector (only used when the system is open-loop and !(dynamics isa System)); inferred from R or u_eq if available.
  • x_dim: The dimension of the state vector (only used when dynamics is not a System nor an ODEFunction nor an ODEInputFunction); inferred from Q or fixed_point if available.
source