The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Simulators >> Circuit Simulators >> Gmin parameter for analog simulations https://designers-guide.org/forum/YaBB.pl?num=1365570962 Message started by arupkg on Apr 9th, 2013, 10:16pm |
Title: Gmin parameter for analog simulations Post by arupkg on Apr 9th, 2013, 10:16pm What is the meaning of the parameter gmin in the analog simulations? What is the reason why a default value of 1p is chosen? What are the typical scenarios where we have to change it? |
Title: Re: Gmin parameter for analog simulations Post by raja.cedt on Apr 10th, 2013, 12:31am It is mainly for convergence, simulator make sure's that every node has min gmin conductance, if any node open means simulator place gmin conductance over the node. For instance you are working on a sample and hold circuit, if you need higher impedance across the cap then reduce gmin. |
Title: Re: Gmin parameter for analog simulations Post by arupkg on Apr 10th, 2013, 10:54pm Thanks very much |
Title: Re: Gmin parameter for analog simulations Post by Kevin Aylward on Jul 6th, 2013, 8:22am Alternatively, set it larger if there are convergence problems. I routinely use 10p, unless examining say, PSRR. For large top level analog sims where functionality is being checked rather than detailed characteristics, I might go as high as 100p-1000p. 3V at 1000p is still only 2na. Setting IABSTOL to 10p rather than its default of 1p can also be very beneficial. |
Title: Re: Gmin parameter for analog simulations Post by Ken Kundert on Jul 6th, 2013, 5:32pm Circuit simulators use Newton's method to solve the nonlinear circuit equations. Newton's method requires that the solution be isolated. Thus, Newton's method cannot solve circuits with floating nodes or loops of rigid branches. Loops of rigid branches are not so common, but floating nodes are. For this reason, all SPICE simulators insert very small conductors (very large resistors) into the circuit so as to avoid floating nodes. Once the node floats, the size of the conductance (gmin=1pS) is of little consequence as there are no other conductances between that node and ground, it just has to be non-zero. Thus, in general, for the job it was intended to do, there is little reason to make it larger. Gmin was chosen to be very small so as to avoid it changing the behavior of the circuit, but even at 1pS it can have an effect on the circuit. This is why Spectre prints an estimate of how much the voltage of your circuit changes as a result of adding Gmin. If you raise Gmin you do risk the possibility that you are "simulating the wrong circuit". In other words, if your circuit had a problem with floating nodes, then using the default value of gmim should resolve that problem. If you feel the need to add a larger gmin, then your circuit may be suffering from convergence issues unrelated to floating nodes. By adding a larger gmin you are changing the circuit to get convergence. The standard argument for doing this is that the conductors are still so small that they cannot be significant to the behavior of the true circuit. For example, setting gmin=10pS was suggested. This is the equivalent of adding 100GΩ resistors. Such resistors seem so large as to be insignificant. But, they must be affecting your circuit in some significant way, otherwise they would not affect the convergence of your circuits. So, in general, I avoid changing gmin. But if you feel the need to do so, be careful. Take some time to try to understand how it would affect your circuit. -Ken |
Title: Re: Gmin parameter for analog simulations Post by Kevin Aylward on Jul 7th, 2013, 1:28am I would echo Ken’s comments on using caution, yes, too high a gmin may cause problems, and yes the defaults of Spice are usually set to achieve high accuracy with 99.999999% of circuits. The circuit does need to be understood as to the effect of leakages. However, for most circuits, if it collapses with 50pa of leakage on all nodes, it will also collapse in the real world as well. Typically, I increase gmin as I run higher up the levels of hierarchy where I am checking functionality rather than detailed performance. On 10k analog transistor top levels, Spectre often has convergence problems, as do all spices, e.g. SuperSpice :-). Spice designers do like to point out that there may be issues with YOUR circuit as to why Spice is not converging, and in many cases they are right. Sometimes they are not. Solving non-linear equations is not trivial. Simply the presence of an unconnected component to main circuit can allow the circuit to converge. |
Title: Re: Gmin parameter for analog simulations Post by Ken Kundert on Jul 7th, 2013, 8:40am Actually, in my experience, convergence issues generally stem more often from the user's settings than the user's circuit. I would say that half the time I encounter a simulation that does not converge I can easily get it to converge simply by deleting the user's settings and using the simulator defaults. It seems like a lot of designer's accumulate settings from circuit to circuit. If something goes wrong on one circuit, someone suggests a collection of settings and the circuit works, so then they apply those to all future circuits. As time goes by their simulations get slower and slower as they keep adding more settings. That is why, when people suggest changing the settings from their default values without giving a good explanation as to why that particular setting should be changed, I tend to speak up. To those designers that tend to accumulate simulator settings, I would like to point out that the default settings in the simulator were not chosen arbitrarily. In general they were chosen to work well in the majority of cases after a lot of experimenting. And before you complain about how the simulator is slow or does not converge well, at least try your circuit with the default settings. You might find that it works much better. -Ken |
Title: Re: Gmin parameter for analog simulations Post by Kevin Aylward on Jul 7th, 2013, 9:09am Ken, yes I agree, in the majority of cases, in my experience as well, is that the user has twiddled the wrong knobs. Actually, now that you are to hand, I would be interested on your view on the use of the modified companion equations for capacitors with regard to reducing “time step too small” convergence errors. Mike Engelhard of Liner Technology’s LTSpice implements an internal esr resistor in the cap so that the conductance matrix becomes, 2c/(h+2cr) ( I believe and with Ieq modified to (h-2cr)/(h+2cr)) so that at zero time step for h, the matrix is no longer singular. For example, a 1m ohm esr would have negligible effect on most circuits. LTSpice has very good convergence, and he has claimed that such an approach makes a big difference. However, he has done a lot of other modifications to improve convergence and speed, so I don’t know just how significant this particular modification would be in practice. Do you have any input as to the worth of this technique? |
Title: Re: Gmin parameter for analog simulations Post by Frank Wiedmann on Jul 8th, 2013, 2:43am Some more information on this subject can be found at http://tech.groups.yahoo.com/group/LTspice/message/47062 and http://tech.groups.yahoo.com/group/LTspice/message/47071. |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |