Skip to content

lti_system_gen delayed-causal state assembly is live but unverified and produces marginally-stable systems #34

Description

@dantzert

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions