Commit 1b0313c
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 6b826de commit 1b0313c
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 | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| 157 | + | |
| 158 | + | |
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| |||
0 commit comments