# On computing the distance to stability for matrices using linear dissipative Hamiltonian systems

arXiv: https://arxiv.org/abs/1611.00595 · HTML: https://mlsanity.com/paper/1611.00595/

## Key facts

- Cited by 6 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 2 Nov 2016.

## Built on by (most cited first, 6 of 6)

- [Guaranteed Stable Quadratic Models and their applications in SINDy and Operator Inference](https://mlsanity.com/paper/2308.13819/) (2023)
- [Data-driven identification of latent port-Hamiltonian systems](https://mlsanity.com/paper/2408.08185/) (2024)
- [Stability Preserving Data-driven Models With Latent Dynamics](https://mlsanity.com/paper/2204.11744/) (2022)
- [Inference of Continuous Linear Systems from Data with Guaranteed Stability](https://mlsanity.com/paper/2301.10060/) (2023)
- [Stability-Certified Learning of Control Systems with Quadratic Nonlinearities](https://mlsanity.com/paper/2403.00646/) (2024)
- [A Novel Schur-Decomposition-Based Weight Projection Method for Stable State-Space Neural-Network Architectures](https://mlsanity.com/paper/2605.14489/) (2026)

## Abstract (arXiv)

In this paper, we consider the problem of computing the nearest stable matrix to an unstable one. We propose new algorithms to solve this problem based on a reformulation using linear dissipative Hamiltonian systems: we show that a matrix A is stable if and only if it can be written as A = (J-R)Q, where J=-JT, R succeq 0 and Q succ 0 (that is, R is positive semidefinite and Q is positive definite). This reformulation results in an equivalent optimization problem with a simple convex feasible set. We propose three strategies to solve the problem in variables (J,R,Q): (i) a block coordinate descent method, (ii) a projected gradient descent method, and (iii) a fast gradient method inspired from smooth convex optimization. These methods require O(n3) operations per iteration, where n is the size of A. We show the effectiveness of the fast gradient method compared to the other approaches and to several state-of-the-art algorithms.
