Open ra3xdh opened 9 years ago
For some reason the system is becoming singular. The warnings are coming from here: https://github.com/Qucs/qucs/blob/master/qucs-core/src/nasolver.cpp#L184
Using eigen advanced solver will help here.
it seems that there are several issues here:
t=0
(seems reasonable...) but in this case this will cause a discontinuity, since the source value for the next point (t>0
) will be zero, no matter how small the timestep is.PTF>0
) will cause the NR iterations to loop indefinitely or to fail to converge. I am checking the BJT model code and while it seems to have some slight differences w.r.t. the SPICE code I did not find any obvious error up to now. qucsator
to go over the switching pointsI wanted to report another switching circuit where transient simulation generates a singular jacobian (cockroft-walton voltage multiplier):
simlog.txt
netlist.txt
thanks; could you please attach also the schematic file (you can rename it to a .txt
, it's actually a text file).
The netlist above here runs fine - but it might just be due to some small differences in the actual binary code (optimizations, etc.) Which version of Qucs are you running and on which OS?
I'm running Qucs 0.0.19 under Windows 10 64bit. I might have changed something but it's still generating that error. multiplier.txt
ok, also simulating from the schematic here it runs fine:
but it fails when changing a little the simulation end time. I'm using the 0.0.20 release candidate on Linux and as mentioned sometimes we saw differences between platforms - I don't remember any changes to the transient solver for this release.
If you want to try if the latest code behaves differently, you can try the code from here.
I too did experience similar things. I don't know a whole lot of circuit simulation, but if the error is highly time dependant would it make sense, as a temporary patch, to try to avoid the exact time step that generates error? Cause I see this is a very old issue. something like this
yes, the issue is very old and unfortunately not much progress has been made. I have some code here locally which tries to improve things but it's not yet stable/fully working. The Qucs simulator already does something similar to what you suggested (and of course spice and others do too and with much more refined algorithms) but the devil is in the details. E.g. sometimes the simulator tries to go back in time and "sees" that it needs to reduce the time step but this can cause numerical issues due to the small differences involved. One thing that should be easy is to tell the simulator to slow down when an independent source, as the pulse generator in your schematic, is about to do a fast change, but also here there are a few pitfalls.
Transient simulation for some types of bipolar transistors (switch-mode) failed. 2N2222A works ok, but 2N3055 fails. This bug appears for some other types of BJTs and with some conditions for MOSFETs.
Schematic is here:![2n3055](https://cloud.githubusercontent.com/assets/4920080/4235431/482893ae-39bf-11e4-9e51-d0651507e200.png)
It is available also at Gist: https://gist.github.com/ra3xdh/6cd1996486c1c5e59e32/download Simulation log is here.