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
On main, lti_system_gen builds a global A/B/C by splicing each input's lti_from_gamma LTI subsystem into the state-space for delayed ("d") forcing edges. The block that does this is flagged in lti.py:
### everything below this point is garbage. not performing at all as desired at the moment
This is not dead/commented-out code — it is the live path that runs whenever an output has a delayed-forcing edge. Verified empirically on the documented known_topology test fixture (x2←delayed-u1, x8←immediate-u2, x9←immediate-x8, x9←delayed-x2) with bibo_stable=True:
assembled A is 103×103 (state explosion from the gamma-subsystem expansion),
2 eigenvalues have real part ≈ 0 (max = 0.0) → the system is marginally stable / has an integrator mode, NOT Hurwitz — even though bibo_stable=True is supposed to guarantee stability,
the only test (test_lti_system_gen_returns_state_space in tests/test_modpods.py) checks return-shape + simulatability, not correctness of A/B/C.
Stale TODOs remain: lti.py:344 ("incorporate bibo stability constraint into instantaneous fits"), lti.py:644 ("cast strings back to tuples" for the swmm path).
This is the missing bridge between #16 (LTI impulse-response kernels) and the stated promise of an "LTI state-space model suitable for control design."
Proposal: add a correctness test (assembled A/B/C reconstruct a known cascade / are Hurwitz for bibo_stable=True), then either fix the splicing or remove the broken expansion.
Cost: High (rewrite the matrix-splicing logic + a correctness test).
On
main,lti_system_genbuilds a globalA/B/Cby splicing each input'slti_from_gammaLTI subsystem into the state-space for delayed ("d") forcing edges. The block that does this is flagged inlti.py:This is not dead/commented-out code — it is the live path that runs whenever an output has a delayed-forcing edge. Verified empirically on the documented
known_topologytest fixture (x2←delayed-u1, x8←immediate-u2, x9←immediate-x8, x9←delayed-x2) withbibo_stable=True:Ais 103×103 (state explosion from the gamma-subsystem expansion),0.0) → the system is marginally stable / has an integrator mode, NOT Hurwitz — even thoughbibo_stable=Trueis supposed to guarantee stability,test_lti_system_gen_returns_state_spaceintests/test_modpods.py) checks return-shape + simulatability, not correctness ofA/B/C.Stale TODOs remain:
lti.py:344("incorporate bibo stability constraint into instantaneous fits"),lti.py:644("cast strings back to tuples" for the swmm path).This is the missing bridge between #16 (LTI impulse-response kernels) and the stated promise of an "LTI state-space model suitable for control design."
Proposal: add a correctness test (assembled
A/B/Creconstruct a known cascade / are Hurwitz forbibo_stable=True), then either fix the splicing or remove the broken expansion.