Commit 23cefde
The previous heuristic always returned `0.07` because the appended `0` in
`minimum([abs.(real.(ps));0])` and `minimum([sys.Tau;0])` forced `r = 0`,
which then fell back to `r = 1.0`. As a result `step(delay(0.01))`
(issue #544) sampled at `dt = 0.07` and could not resolve the delay.
Rewritten to mirror `_default_dt(::LTISystem)`: take the fastest pole of
`sys.P.P` and the smallest positive delay, and pick the more demanding
of `1/(12·ω_max)` and `τ_min/12`. Add a regression test for #544.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 75801d6 commit 23cefde
2 files changed
Lines changed: 19 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 83 | + | |
92 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
0 commit comments