RE: [ng-spice-devel] NEW CVS Commit [URGENT]
---"Alan" == Gillespie, Alan <Alan.Gillespie@analog.com> writes:
Alan> I've sometimes worried about this, but I don't think I've ever
Alan> seen it happen in Berkeley spice.
It's just a matter of feeding spice the right circuit. Spice has never
actually checked KCL; it just assumes that if it hasn't damped in the
device load functions and the solution vector hasn't changed much
(delta less than reltol*value+{abstol|vntol}) then you're done. This
is not the same as knowing that KCL is satisfied -- get a circuit with
a very high impedance node drifting along, and you can be volts off.
To do it right, one needs both a check on KCL and a check for the
solution change being small. Even then you can be off, but at
least you're checking the right stuff.
<snip>
Alan> If these functions actually operate, they're supposed to set
Alan> the "can't converge" flag, but since that is done by the model
Alan> which calls the function, rather than the function itself,
Alan> sometimes it slips through the net. I can't remember where that
Alan> was, though :-)
Yup. That's one failure mode, and a reason to not have devices do
their own convergence checking.
Alan> What happened to that Homotopy method, which is mentioned on our
Alan> web page ?
Now you're getting into the black arts. I'm assuming the reference is
to some work by Layne Watson that was carried into Bell Labs by Bob
Melville and others.
In some testing, the hompack stuff works better as the models become
smoother. But so will standard Newton and other methods. Also, while
the hompack methods, given some restrictions on models, are guaranteed
convergence, there is no guarantee how long convergence will take. It
can take a _very_ long time.
Also, the probability-one homotopy methods of Watson et. al. require
C-infinite functions to be guaranteed convergence (continuously
differentiable an indefinite number of times) -- which none of the
standard SPICE models are. Colin McAndrew, when at Bell Labs, spent a
fair amount of time with exponential smoothing functions making
discontinuous models into C-higher continuous ones. That's an ugly
process, and when you're done you have a bunch of ln/exp functions
slowing you down.
The other question is: What homotopy do you use? (I.e. what do you
choose as your homotopy parameter?) Some choices are much more
successful than others. I've heard that Karti Mayaram and Jaijeet
Roychoudhury came up with a very successful homotopy for large MOS
circuits, but I don't know what it was...
I'm sure Al will have some comments on all of this.
--Steve
Partial thread listing:
- RE: [ng-spice-devel] NEW CVS Commit [URGENT], (continued)