Hey Guys,
i have some convergence issues with my circuit (gmin.cir). I´m loading a varistor from the library.
https://www.tdk-electronics.tdk.com/download/385720/cefe5507ca0c95c968a140b701d54c17/siov.zip
In my userfolder: C:\Users\"Name" i created the file "spice.rc"
+++++++++++++++++++++++++++++++++++++
spice.rc:
+++++++++++++++++++++++++++++++++++++
ngspice report:
ngspice-31 : Circuit level simulation program
The U. C. Berkeley CAD Group
Copyright 1985-1994, Regents of the University of California.
Please get your ngspice manual from http://ngspice.sourceforge.net/docs.html
Please file your bug-reports at http://ngspice.sourceforge.net/bugrep.html
Creation Date: Oct 6 2019 15:17:58
ngspice 1 -> source gmin.cir
Circuit: gmin schematic
ngspice 2 -> run
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
Note: Starting dynamic gmin stepping
Trying gmin = 1.0000E-03 Warning: Further gmin increment
Trying gmin = 5.6234E-03 Warning: Further gmin increment
Trying gmin = 8.6596E-03 Warning: Further gmin increment
Trying gmin = 9.6466E-03 Warning: Further gmin increment
Trying gmin = 9.9105E-03 Warning: Further gmin increment
Trying gmin = 9.9775E-03 Warning: Further gmin increment
Trying gmin = 9.9944E-03 Warning: Further gmin increment
Trying gmin = 9.9986E-03 Warning: Further gmin increment
Trying gmin = 9.9996E-03 Warning: Last gmin step failed
Warning: Dynamic gmin stepping failed
Note: Starting source stepping
Supplies reduced to 0.0000%
Trying gmin = 1.0000E-02 Warning: gmin step failed
Warning: source stepping failed
Transient solution failed -
Node Last Voltage Previous Iter
---- ------------ -------------
in 0 0
out -594.637 594.637
xrvar.x1.3 -594.639 594.639
xrvar.x1.4 -594.401 594.401
xrvar.x1.5 -600.345 600.345
xrvar.x1.6 233168 -233168
xrvar.x1.e_var_int1 -606.348 606.348
xrvar.x1.7 100.99 100.99
xrvar.x1.e_sw_int1 102 102
b.xrvar.x1.be_sw#branch 0 0
b.xrvar.x1.be_var#branch 0 0
h.xrvar.x1.h_i_sense#branch -0.00023086 0.00023086
v.xrvar.x1.v_i_sense#branch 23.55 -23.55
l.xrvar.x1.l_series#branch 23.7855 -23.7855
e.xrvar.x1.e_sw#branch -9.99902e-08 -9.99902e-08
e.xrvar.x1.e_var#branch 23.3168 -23.3168
v0#branch -5.8875 5.8875 *
doAnalyses: Too many iterations without convergence
run simulation(s) aborted
ngspice 3 ->
Interrupted once . . .
Warning: clearing control structures
ngspice 3 ->
Interrupted again (ouch)
Warning: clearing control structures
ngspice 3 ->
++++++++++++++++++++++++++++++++++
When im testing the circuit in ltspice it is working (ltspice_varistor.PNG)
fortgot the .cir
Last edit: Christoph 2019-10-21
ngspice version:
ngspice-31 : Circuit level simulation program
Creation Date: Oct 6 2019 15:17:58
Maybe one of you can help me out. Thank you.
We also need siov.lib .
-marcel
Hmm... a classical NR problem: pretty persistent oscillation between two extremes (look at the node voltages now and previous).
-marcel
Wait a minute, this is not a varistor -- it limits no matter the device terminal voltage amplitude ... Where did I make a mistake in this translation?
Congratulations to LTspice -- it can simulate this strangeness (but for two missing braces on the subcircuit call line).
-marcel
Last edit: marcel hendrix 2019-10-24
The following is an input file made of the circuit after parsing it with the ngspice inpcom parser (only slight modified to get the subcircuit calls right), as delivered by debug-out1.txt:
Same result as with the original file, LTSPICE o.k., ngspice not.
We have to spend some time looking at the op calculation.
And we should re-check if the derivatives of the pwr (**) function are o.k.
Hi all,
if a varistor is a variable resistance, I think we are suffering from non-linearity issue here...
You need to smooth more the variations of that resistance, IMHO.
Thank you,
Fra
Feeding this preparsed NGSPICE cir file to LTspice is possible, and LTspice
converges (maybe Holger did this already, I am not sure). Therefore the
observed differences are indeed in NGSPICE's simulation engine.
However, in LTspice when I use the following slightly modified V0 source:
... LTspice also crashes.
BTW, again the output is in no way resembling a varistor (e.g. the
clipping boundaries are asymmetric).
-marcel