Skip to content

Releases: jamestjsp/controlsys

v0.5.0

23 Mar 03:59

Choose a tag to compare

Breaking Changes

  • Lqe, Kalman, Kalmd now accept *RiccatiOpts as final parameter for workspace reuse

Performance Optimizations

Riccati Solvers (Care/Dare)

  • RiccatiWorkspace struct pools ~25 arrays, reducing GC churn by ~96% (1.95 MB/call eliminated)
  • Care_N10: 54,640 → 994 B/op, Dare_N10: 63,784 → 906 B/op

HinfNorm

  • Replace 50x per-frequency EvalFr+SVD loop with single vectorized Sigma() call
  • 43% faster, 95% less memory, 83% fewer allocs

Transfer Functions

  • Pool vPolyRecurrence allocations: 25% fewer allocs per matrix transformation

FeedbackLFT

  • Scoped BLAS workspace eliminates ~48 intermediate allocations (321 → 273 allocs/op)

Balreal / Balred

  • Single unified buffer replaces 17 make() calls (104 → 88 allocs/op)

ControllabilityStaircase

  • Static blockBuf eliminates per-iteration mat.NewDense (126 → 109 allocs/op)

Raw Stride Indexing

  • Replace At()/Set() with direct RawMatrix().Data indexing in transfer.go, frequency.go, feedback_lft.go hot paths

Lqr/Kalman Workspace Propagation

  • Lqe/Kalman/Kalmd proxy RiccatiOpts to inner Care/Dare calls
  • Kalman_N100: 2,213 Ki → 309 Ki B/op (86% reduction)

v0.4.0

22 Mar 21:37

Choose a tag to compare

Breaking Changes

  • System.InternalDelay, System.B2, System.C2, System.D12, System.D21, System.D22 fields replaced by System.LFT *LFTDelay nested struct
    • sys.InternalDelaysys.LFT.Tau
    • sys.B2sys.LFT.B2 (same for C2, D12, D21, D22)
    • nil check: sys.LFT == nil replaces individual field checks

Improvements

  • Add copyStrided/copyBlock matrix copy helpers, eliminating ~100 duplicate inline copy loops
  • Unify duplicate extractBlock/extractSubmatrix functions
  • -3.5% benchmark geomean improvement across 101 benchmarks (up to -17% on delay operations)
  • Net -51 lines of code

Tests & Coverage

  • Add MATLAB delay system tests (Pade, Thiran, c2d, feedback, margins)
  • Add exact MATLAB/python-control expected values to all tests
  • Tighten test tolerances
  • Coverage 83.9% → 85.7%

Other

  • Update README with full API coverage

v0.3.0

22 Mar 00:36

Choose a tag to compare

Performance & Robustness

Simulation hot-path optimizations

  • Replace gonum MulVec/AddVec wrappers with direct blas64.Gemv calls in simulateNoDelay (-22%) and simulateWithInternalDelay (-74%)
  • Fuse A*x + B*u into Gemv(beta=1) accumulation, eliminating intermediate buffers

Frequency response allocation reduction

  • Add TransferFunc.evalInto for allocation-free transfer function evaluation
  • FreqResponse allocs -71% (560→160), Bode allocs -81% (992→192)

Numerical robustness (#347510c)

  • Harden numerical robustness and close test coverage gaps

Simulation performance (#4429669)

  • Batch delayed MIMO simulation to remove per-input replay overhead (#2)

New benchmarks

  • 7 MATLAB-inspired benchmarks: DC motor, Boeing 747 lateral/longitudinal, mass-spring-damper chain, large system (50 states), feedback+simulate pipeline, large MIMO Bode

v0.2.0

20 Mar 14:05

Choose a tag to compare

Bug Fixes

  • Fix DiscretizeZOH silently dropping InternalDelay (#1)

    DiscretizeZOH and Discretize now properly handle systems with internal delays (LFT structure produced by Feedback with delays in the feedback path).

    Two underlying bugs fixed:

    • DiscretizeZOH/Discretize silently discarded the LFT delay structure (B2, C2, D12, D21, D22, InternalDelay), reducing the system to its delay-free rational part — causing S ≈ 1 and T ≈ 0 instead of correct sensitivity functions.
    • discretizeWithInternalDelay copied the continuous-time B2 unchanged instead of computing Bd2 = Γ·B2 via the augmented matrix exponential, making the delayed feedback gain ~20× too large.

v0.1.0

19 Mar 08:08

Choose a tag to compare

Initial release: Go library for linear state-space control systems.