You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go library for linear state-space control systems.
Supports continuous and discrete LTI models with MIMO capability.
Install
go get github.com/jamestjsp/controlsys
Note: This package depends on a gonum fork for additional LAPACK routines. Because replace directives do not propagate to downstream modules, applications that import controlsys must add this to their own go.mod:
This package is intended to be usable in production control and estimation code, with the usual caveat that numerical software still needs application-specific validation.
Pin both controlsys and the required gonum fork to explicit versions.
Validate mission-critical models against an external reference, especially for ill-conditioned realizations and delay-heavy systems.
System values are mutable. Use Copy before sharing a model across goroutines that may mutate names, delays, notes, or other receiver state.
The repository CI runs go vet ./... and go test -v -count=1 -race ./...; those are the recommended baseline checks for downstream integrations.
Features
Three representations: state-space, transfer function, zero-pole-gain (ZPK) with bidirectional conversion
Frequency response: Bode, Nyquist, Nichols, singular values
Stability analysis: gain/phase margins, disk margins, bandwidth, damping
Control design: LQR, LQE (Kalman), LQI, pole placement, Riccati solvers (CARE/DARE)
Model reduction: controllability/observability staircase, balanced realization, balanced truncation
System norms: H2 and H-infinity
Interconnection: series, parallel, feedback, append, sum blocks