Features
- D2C (discrete→continuous) conversion — new
(*System).D2C(method string)entry point (#29)."tustin"— bilinear inverse (equivalent toUndiscretize)."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 singularA_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/gonumfork tov0.17.3-fork.
Not yet
D2C "foh" / "matched" paths and D2C for systems with internal delays — deferred (see #29 "optional scope").