controlsys v1.12.0: a control-systems toolbox for Go (MIT)
▲ 23 r/ControlTheory+2 crossposts

controlsys v1.12.0: a control-systems toolbox for Go (MIT)

controlsys is a Go package for linear control systems. It works on continuous-time and discrete-time models. The main model form is state space.

Main capabilities:

  • Models: state space, transfer function, zero-pole-gain (ZPK), frequency-response data (FRD), model arrays and tunable blocks.
  • Analysis: Bode, Nyquist and Nichols plots, gain and phase margins, disk margins and step metrics.
  • Design: LQR, LQG, Kalman filters, H2 and H-infinity synthesis, pole placement and PID tuning.
  • Simulation: step, impulse, initial-condition and arbitrary-input responses.
  • Model reduction: balanced truncation and modal truncation.
  • Delays: input, output and internal delays, with Pade and Thiran approximations.
  • Conversion: ZOH, FOH, Tustin, matched, impulse and least-squares methods between continuous and discrete time, in both directions and for resampling. We test the results against MATLAB behaviour.

New in v1.12.0:

  • Tustin conversion with Thiran filters is approximately 30% faster than in v1.11.0.
  • Tustin conversion with Thiran filters now supports MIMO models with delays on individual input-to-output paths.
  • ThiranDelay now accepts short delays when the filter is stable.

Install:

go get plantcontrol.org/v1/controlsys

Repo: https://github.com/PlantControl/controlsys
Release notes: https://github.com/PlantControl/controlsys/releases/tag/v1.12.0

We want your feedback, especially from people who use MATLAB or python-control.

u/8bitjam — 12 days ago
▲ 9 r/fortran+1 crossposts

Translated DGGES to Go

I’ve been working on my fork of Gonum and recently translated the Netlib LAPACK reference implementation of DGGES and its supporting routines into pure Go.
For transparency, I definitely used Codex and Claude Code throughout the process, and I’m pretty sure Gemini helped with a few parts along the way as well.
This wasn’t a blind translation. The majority of the work was understanding decades-old Fortran, preserving the algorithm, adapting it to idiomatic Go, validating numerical behavior, and tracking down subtle bugs.
I know AI-generated code can be a sensitive topic in open source. My view is that these tools are just that; tools. They can dramatically speed up tedious translation work, but correctness still depends on careful review, testing, and understanding of the underlying numerical algorithms.

reddit.com
u/8bitjam — 3 months ago