Re: [ng-spice-devel] NEW CVS Commit [URGENT]
On Fri, 20 Apr 2001, Gillespie, Alan wrote:
> > New function: CKTncDump.
>
> I couldn't remember what that was, but I checked it out, and it
> prints out the last iteration, and the one before that, for use
> in the case where spice doesn't converge. It gives you a clue
> where the problem nodes are. It's not always very useful, though.
What is useful is to see a full trace, every iteration. ACS has this
feature. It always has. I can't comprehend how anyone can do model
development without it.
When I have worked with Spice, I put print statements in the code for
debugging, then took them out of the final version.
> That code was for the "node damping" option. It's experimental,
> and I don't think it works properly. It's supposed to limit the
> iteration to iteration change in node voltages and voltage source/
> inductor currents. I've only seen it help convergance on a couple
> of cases, and mostly it makes things worse.
Limiting improperly applied usually makes it worse. If you violate
Kirchoff's law it is guaranteed to make it worse.
I think it's 'cos I'm
> not damping the ckt state variables stored elsewhere, so it needs
> more work.
>
> I spotted the technique in the APLAC documentation, if anyone's
> interested. I think Al's doing something similar in ACS.
ACS applies all damping at the state variables. The characteristics
dynamically adjust. There is limiting applied at the gather step,
primarily as protection against overflow. Then, damping may be
applied to the state variables after evaluating model equations
before loading the matrix. The decision of whether to damp, and by
how much, is made after all models are evaluated and before any are
loaded. There are several user .options to control it.
Sometimes it helps. Sometimes it makes it worse. You can turn it
off. It usually does succeed at breaking limit cycles, fixing that
kind of convergence problem. Sometimes it just turns it into a
longer limit cycle. If you set the damping to be severe enough, you
can virtually guarantee convergence, by becoming essentially
equivalent to a test-and-creep-along method, but it becomes more
likely to converge to a wrong answer, and may take 500 iterations to
do it.
If you use any kind of damping, you will need to make the convergence
testing more rigorous. The method used in Spice is already too prone
to false indications of convergence
To apply this method in Spice would take some major rewriting.
Convergence in simulation is still a valid research area.
Partial thread listing:
- Re: [ng-spice-devel] NEW CVS Commit [URGENT], (continued)