Re: [ng-spice-devel] convergence
On Mon, 30 Apr 2001, Steve Hamm wrote:
> ---"Al" == Al Davis <aldavis@ieee.org> writes:
>
> Al> Actually, both are inconsistent.
>
> Al> With form 1, x is solved using the latest state variables,
> which Al> may not match what you get using the latest x. With form
> 2, the Al> state variables are solved using the latest x, which may
> not match Al> what you get when you apply the state variables you
> have.
>
> I'm not sure how you get "form 2" being inconsistent.
>
> In "form 2", when the iteration quits, F and J are evaluated at x_n
> and the accepted solution is x_n, so everything is consistent.
>
"form 2" violates KCL.
For consistency, take form 1 and add a last step to reevaluate F
using the formula F(x_(n+1)) = F(x_n) + J(x_n) * (x_(n+1) - x_n)
Now it is consistent and KCL is satisfied. Note that J is not
re-evaluated.
Or take form 2 and change the last step as above, which is really the
same.
This is what you get when evaluation is "bypassed" at the last
iteration, except that the change in F needs to be back-annotated.
> Al> But, at convergence it doesn't matter. The error is bounded.
>
> I expect that this is often true, but given the sloppy checking in
> spice, I expect that this difference could account for some
> timestep problems, since, for instance, capacitor charge won't
> correspond to the voltage across the branch.
With sloppy checking there is are bigger problems than this
consistency.
In ACS, you can make it go either way. On my regression suite,
usually there is no difference. In a few cases there is a small
difference. In no case was the difference significant.
Partial thread listing:
- Re: [ng-spice-devel] convergence, (continued)