|
From: Paolo N. <p....@ie...> - 2003-07-14 19:57:15
|
On Mon, 2003-07-14 at 10:17, Stefan Jones wrote: > The ngspice gshunt option seems to be more intelligent. It comes into > play with Gmin, and when a DC initial solution fails. It just slowly > increases the diagonal elements until the simulation converges. Yes, seems more intelligent, find the less disturbing conductance that will make the system converge. Anyway I am thinking about 2 issues: - Compatibility: to be compatible with xspice, i think that both options should be implemented, adding an option like "shuntopt": shuntopt = 0 (default) -> Alan's scheme (ngspice default) shuntopt = 1 -> xspice r-shunt scheme Doing this we can test (tcl/ng)spice against xspice known results. - Gshunt and rshunt add a conductance to the diagonal elemnts only, to improve matrix condtion. I believe it is interesting to add a minimal conductance between ANY node and ground, because, a parasite resistance between any component and ground is physically present in every circuit. Well, a capacitance in parallel will add even more realism. This can help the simulation to converge and stop signal to rise or fall with irrealistical rates. - Sparse library can calculate the condition number of the circuit matrix. I think that this can be printed on the stdout to see how a simulation evolves. I will check but, if my memory is not failing, the condition number can be used to estimate the number of correct digits. Why not print this info too ? Bye, Paolo -- -- Paolo Nenzi GnuPG public key available on keyservers Key FingerPrint: FCC5 FDA4 4A31 EDE6 982D AABE 6D48 9D3A 8FC0 A981 |