Skip to content

Add gmin stepping to VCCS/CCCS for convergence aid#255

Open
esaruoho wants to merge 1 commit intopfalstad:devfrom
esaruoho:fix-vccs-gmin-stepping
Open

Add gmin stepping to VCCS/CCCS for convergence aid#255
esaruoho wants to merge 1 commit intopfalstad:devfrom
esaruoho:fix-vccs-gmin-stepping

Conversation

@esaruoho
Copy link
Copy Markdown

@esaruoho esaruoho commented Mar 2, 2026

Summary

Test plan

Fixes #172

🤖 Generated with Claude Code

@esaruoho esaruoho changed the base branch from v3-dev to dev April 15, 2026 09:49
When Newton-Raphson subiterations exceed 100, add a gradually increasing
parallel conductance (gmin) across the controlled source output nodes.
This follows the same pattern used by Diode.java and TransistorElm.java.

Without this, circuits with controlled sources in positive feedback loops
(e.g., optocoupler Schmitt triggers) can fail to converge because the
solver oscillates between two states with no damping mechanism. The gmin
conductance provides damping that helps the solver find a stable solution.

Uses a slower ramp rate (subIterations/3000) than transistors (subIters/300)
to minimize impact on circuits that converge normally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@esaruoho esaruoho force-pushed the fix-vccs-gmin-stepping branch from 342887d to 4af394c Compare April 15, 2026 09:51
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.

1 participant