I have a subcircuit model that I’ve created to mimic the AimSpice level 16 model (poly-Si TFT) that I’ve been using for a while now. I recently updated from KiCAD 8.0 to KiCAD 9.0 which also moved me from ngspice 42 to ngspice 44. Once I updated, I quickly noticed that the subcircuit model I was using no longer works the same way that it did before - notably the devices turns on either earlier or later than anticipated (see images below). I tested the response separately using ngspice 43 and got the same response as ngspice 42. I tried to forced the matrix solver to be the same (setting SPARSE, reltol, abstol, vntol) - but this did not appear to have any effect. I also forced integration method to gear on both, and saw the same variation between the two versions.
My subcircuit model uses several conditional statements, and several comparisons of voltages where rounding could cause a change in the equation response. I can’t find any documentation, but did anything change in ngspice44 regarding the conditional (if) statements or how rounding is performed? I looked through the change list between ngspice43 and ngspice44 and didn’t see anything that would cause this effect, but is there another change that I missed or that might not be documented?
I’m unable to upload the full project, but I’ve provided the netlist below and an image of the circuit - it is a discrete device test for a transistor. The netlists being generated are the same.
That looks like ngspice44 is more accurately including the sub threshold behaviour of mosfets. They don’t just snap on as the Vgs reaches the threshold voltage.
Could you maybe post your amorphous_TFT_Model_RPI16_Von-adjusted.txt model also (or is this confidential). So, the issue can be reproduced.
I have another wild guess, because you are saying that ngspice44 simulation results are not consistent. Have you been maybe playing with the “cshunt” option? Currently ngspice doesn’t consistently remove this option again. I was burned by this a little while ago (this is really just guess).
I realize it may be difficult to find the root cause without the full model, which is why I was hoping someone might know if any changes were made to how ngspice44 solved the system.
I’m not using cshunt currently. By ngspice44 being not consistent, sometimes model parameters make the device start conducting before ngspice42 results, and other parameters make the device conduct after ngspice42 results (different parameters though, it doesn’t change when running the exact same parameters).