Re: [ng-spice-devel] convergence


To ng-spice-devel@ieee.ing.uniroma1.it
From Steve Hamm <Steve.Hamm@motorola.com>
Date Fri, 27 Apr 2001 09:49:36 -0500 (CDT)
Delivered-To mailing list ng-spice-devel@ieee.ing.uniroma1.it
In-Reply-To <01042616271003.10628@hobbes >
Mailing-List contact ng-spice-devel-help@ieee.ing.uniroma1.it; run by ezmlm
References <CF654D964573D311A1CA0090278A36FF4CBE4C@EDIN_EXM1 ><01042610530002.10628@hobbes ><15080.28846.753313.245097@pearls ><01042616271003.10628@hobbes >
Reply-To ng-spice-devel@ieee.ing.uniroma1.it

---"Al" == Al Davis <aldavis@ieee.org> writes:

Al> When the device level checks are adequate, does the KCL check
Al> really do anything?

Well, it checks KCL. :) If you're checking changes in things like
linearizations, you've probably bounded KCL error. But...  consider
very high impedance and very low impedance situations.  In one case,
small changes in voltages make large changes in current; in the other, 
small changes in current make large changes in voltage.  Makes sense
to me that checking KCL and delta-v would be the most direct way to
ensure a good solution.

Al> Also, unless I am missing something obvious, it is an expensive
Al> operation.  It means another pass with full model evaluations.
Al> Doing it from the matrix will only show round-off errors in
Al> solving the matrix, which are rarely a problem.  Even if the
Al> matrix is ill-conditioned, the dominant error is usually in
Al> building the matrix, not solving it.

Actually, KCL is cheap if you're solving the right equation. If F(x)
is the KCL equations for each node with MNA constraints appended, then
if in solving F(x) = 0 you calculate delta x, rather than x like Spice
does, then Newton is:

       J^(-1) F(x_k) = -delta_x
       x_{k+1} = x_k + delta_x

So the right-hand side vector is F(), which can be used directly as a
KCL check as well as in the calculation of delta_x.

--Steve

Partial thread listing: