Re: [ng-spice-devel] convergence
---"Al" == Al Davis <aldavis@ieee.org> writes:
Al> Then, since the right side is now F(x) (where x is delta_v) (instead
I'm probably not explaining this well. x is still v with any MNA
currents appended.
Al> of J*x - F(x), where x is v), you can do J*x - F(x) to see if you get
Al> zero. Of course you do, except for round-off error, unless the
Al> matrix solution has a problem. This has nothing to do with
Al> convergence. It also has nothing to do with round-off errors that
Al> occur in building the matrix.
F(x) + J*dx would just be the linear system residual. F=0 is still the
system being solved, so some norm of F(x) is a direct measure of KCL.
Al> Spice/ACS formulation: solves for v, checks v against v_old.
Al> Steve's formulation: solves for x, which is (v-v_old), checks x
Al> against 0. I don't see the difference.
We're checking F(x).
Al> I still must be missing something.
Al> Consider:
Al> V 1 0 2
Al> Y1 1 0 poly(0 0 1)
Al> The second line is a nonlinear admittance, i = v^2
Al> The correct solution is v(1) = 2 (obviously)
Al> The current in Y1 should be 4 amps.
Al> Consider an initial guess, v(1) = 0.
Al> So ... i=v^2 ..means i=0.
Al> J = f'(x) = 2v = 0. (an open circuit!)
Al> So, solving that equivalent circuit for v=2 means that current still
Al> is 0. KCL is satisfied, yet it is still the wrong answer.
The MNA equations are I(Y1) + I(V) = 0 and V(1) - V = 0.
F(x) is [0, -2]^T and solving would give delta v(1)=2.
One more function evaluation gets you the right current in Y1
and F(x)=0.
--Steve
Partial thread listing:
- Re: [ng-spice-devel] convergence, (continued)