Skip to content

Reject spurious integrator clusters in state-space models - #1088

Closed
baggepinnen wants to merge 1 commit into
masterfrom
fix/state-space-integrator-count
Closed

baggepinnen wants to merge 1 commit into
masterfrom
fix/state-space-integrator-count

Conversation

@baggepinnen

@baggepinnen baggepinnen commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

The ship heading plant in JuliaComputing/DyadControlSystems.jl#821 has no integrators, but ControlSystemsBase 1.25.0 counts ten. The expanding-radius heuristic introduced in #1077 eventually finds ten ordinary poles inside a radius of about 0.86 rad/s, even though the state matrix is nonsingular. This also supplies an excessively large tolerance to callers of integrator_excess_with_tol.

For state-space models, check a candidate integrator cluster against the rank of the balanced state matrix (A - I in discrete time). A full-rank matrix rejects the cluster and restores the simple-pole tolerance. Rank-deficient matrices retain the existing multiplicity heuristic, including its time-scaling and repeated-pole handling. A pivoted QR test supports BigFloat and Julia 1.10 without adding dependencies. The pole-only helper and its explicit tolerance argument are unchanged.

Validation: the ControlSystemsBase analysis suite passes 335 checks, including mixed fast/slow modes under rotations and time scaling, discrete-time modes near one, and repeated integrators with Float32, Float64, and BigFloat. The original ship autotuning reproducer also runs with zero integrator excess using this branch.

Full PR CI also passes: the ControlSystems and ControlSystemsBase test suites, documentation build, and coverage checks. All modified coverable lines are covered by tests.

@JuliaControlBot

Copy link
Copy Markdown

This is an automated message.
Plots were compared to references. 6/11 images have changed, see differences below.
After pulling this PR, please update the reference images by creating a PR to ControlExamplePlots.jl here.

Difference Reference Image New Image
✔️ 0.0 Reference New
⚠️ 0.021 Reference New
✔️ 0.0 Reference New
✔️ 0.0 Reference New
✔️ 0.0 Reference New
✔️ 0.013 Reference New

@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.23%. Comparing base (594c0eb) to head (c843f5f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1088      +/-   ##
==========================================
+ Coverage   92.22%   92.23%   +0.01%     
==========================================
  Files          42       42              
  Lines        6146     6157      +11     
==========================================
+ Hits         5668     5679      +11     
  Misses        478      478              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JuliaControlBot

Copy link
Copy Markdown

This is an automated message.
Plots were compared to references. 6/11 images have changed, see differences below.
After pulling this PR, please update the reference images by creating a PR to ControlExamplePlots.jl here.

Difference Reference Image New Image
✔️ 0.0 Reference New
⚠️ 0.021 Reference New
✔️ 0.0 Reference New
✔️ 0.0 Reference New
✔️ 0.0 Reference New
✔️ 0.013 Reference New

@baggepinnen

Copy link
Copy Markdown
Member Author

Superseded by ControlSystems.jl PR 1090, whose polynomial coefficient validation also applies to pole and zero clusters in transfer-function models. DyadControlSystems.jl PR 823 now uses that approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants