Commit 20ce4d7
fix comparator output spike by forcing re-convergence on switch state change (#90)
When the analog switch changes state during Newton-Raphson subiterations,
force sim.converged = false to ensure additional iterations settle the
circuit. This prevents brief voltage spikes when the switch transitions
between open and closed states, particularly in the ComparatorElm where
the OpAmp output and AnalogSwitch react with a one-subiteration lag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7755622 commit 20ce4d7
1 file changed
Lines changed: 3 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| 155 | + | |
| 156 | + | |
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
| |||
0 commit comments