Skip to content

v0.9.0 — D2C conversion + matLog perf

Latest

Choose a tag to compare

@jamestjsp jamestjsp released this 25 Apr 00:10

Features

  • D2C (discrete→continuous) conversion — new (*System).D2C(method string) entry point (#29).
    • "tustin" — bilinear inverse (equivalent to Undiscretize).
    • "zoh" / "" — matrix-log based: A_c = log(A_d)/dt, B_c = (A_d − I)⁻¹·A_c·B_d.
    • Validates IsDiscrete, rejects non-positive-real eigenvalues (branch cut) and singular A_d − I.
    • Round-trip safe with DiscretizeZOH / Discretize; propagates input/output/IO delays.

Performance

matLog now skips the explicit V⁻¹ and solves V^T·L^T = (V·D)^T directly in the 2n×2n real-augmented complex LU. One factor + one back-solve with n complex RHS, no follow-up matmul.

benchmark before after delta
D2C_ZOH_N50 770 µs 422 µs -45%
D2C_ZOH_N20 90 µs 62 µs -31%
MatLog_N50 689 µs 338 µs -51%
MatLog_N20 81 µs 50 µs -38%

Memory: -34% to -38% B/op on large sizes.

Deps

  • Bumped jamestjsp/gonum fork to v0.17.3-fork.

Not yet

D2C "foh" / "matched" paths and D2C for systems with internal delays — deferred (see #29 "optional scope").