#2096·gonum

Proposal: upstream LAPACK support needed by a Go control-systems toolkit

Author: jamestjspCreated Jul 10, 2026Updated Jul 10, 2026

Motivation

I maintain controlsys, a Go toolbox for continuous- and discrete-time LTI control systems. It covers state-space, transfer-function, ZPK, FRD, descriptor, generalized, and tunable models; analysis and design workflows; Riccati solvers; model reduction; system identification; and time-domain simulation.

Several of its core numerical paths need LAPACK routines that are not yet available in upstream Gonum. I have implemented and currently use them through a fork of Gonum. This is a real downstream integration cost: Go replace directives do not propagate, so every application that imports controlsys must also add its own replacement for gonum.org/v1/gonum. Upstream availability would let users consume the package normally and would make the routines available to other scientific and engineering packages.

Why these routines matter

  • RZ factorization and incremental condition estimation support controllability/observability staircase decompositions, rank decisions, model reduction, and transmission-zero workflows.
  • Real Schur decomposition, reordering, and Sylvester solves are building blocks for robust eigenvalue partitioning and Riccati/conditioning algorithms.
  • The planned generalized Schur (QZ) stack is important for descriptor systems, generalized eigenvalue problems, and numerically robust pole/zero and reduction workflows.
  • Complex utilities, reflectors, and LU support provide reusable primitives for future complex LAPACK algorithms, not just this one package.

Staged upstream work

The work is deliberately split into narrow, tested PRs rather than proposed as a monolithic port:

  • #2093: Dlaic1, Dtzrzf, Dormrz
  • #2094: Dgees, Dtrsen, Dtrsyl
  • #2095: complex utilities, Householder routines, and Zgetrf/Zgetrs/Zgesv

Each is ready for review with its focused CI passing. The next series, after the real-Schur foundation lands, will add generalized balancing, QZ primitives, generalized Schur reordering/Sylvester solves, and finally Dgges and Dggev.

Request

I would value maintainer guidance on the staged direction and review priorities. The aim is not to ask for a blanket acceptance: each routine is being ported against Netlib LAPACK semantics, covered by Gonum-style tests, and presented in independently reviewable units.

If accepted upstream, controlsys can remove its fork-only dependency and downstream users can depend directly on released Gonum versions.