• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. Why Kirchhoff's Current Law is not satisfied at my circuit...

Stats

  • Locked Locked
  • Replies 14
  • Subscribers 125
  • Views 6581
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why Kirchhoff's Current Law is not satisfied at my circuit?

yysunj
yysunj over 4 years ago

I designed a circuit and applied voltages (DC voltage or Pulse) to each node. (Please refer to the uploaded file.)

And, I performed transient simulation under given situation.

However, At node N of my circuit, KCL is not satisfied. (Also please refer to the uploaded file.)

Why did this happen?

Please tell me.

yysunjCadence forum question_yysunj.pptx

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to yysunj

    I'm sorry, but that's a ridiculous goal. Your model won't have anywhere near that accuracy - and if it's not modelling leakage, what is the point?

    You can get it lower with conservative, reltol=1e-5, gmin=1e-15 (500fA spike - the flat parts are about 12fA), but I cannot see any practical example with made up models where you really would expect this level of accuracy. That's not what circuit simulators are designed for.

    BTW, you could also (with this simple circuit) set the gmin to 0, and then the flat parts are rather spiky due to numerical accuracy, but peak at 13aA (and is much lower than that the rest of the time). I would still question the meaning of such a simulation though.

    Setting reltol to 1e-9 is not going to be a good idea, because you'd be running out of numerical resolution - given that you only have about 14-15 digits in a double precision floating point number, you're expecting to resolve the error by using 9 of those digits, plus there needs to be accurate derivatives computed and so on - that's asking for trouble. It's not just about simulation time - it's just that you're asking for accuracy when the model itself is probably a much coarser fit than that.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yysunj
    yysunj over 4 years ago in reply to Andrew Beckett

    Thank you for your valuable reply, Andrew.

    Leakage current of my transistor (IGZO TFT) is very low. (1e-21A/um).

    And, I am simulating a situation where the charge stored in the capacitor is drained by the leakage current.

    Therefore, I need very low error value.

    But, you said that 13aA error value is impossible goal.

    Why it is impossible?

    It is because of the limitations of the simulator?

    Or is it because of the limitations of the model (RPI-aTFT model)?

    Or is it just because of the time it takes to simulate?

    Please tell me.

    Thank you 

    yysunj

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to yysunj

    The issue is that you have a very high dynamic range - the normal currents in the circuit (which I assume might be of the order of 1uA) are 1e15 times higher than your leakage current is supposedly. If your model is really modelling that level of leakage current, it's going to be very difficult to resolve. Simulators use numerical analysis techniques to iterate towards a solution - and have to determine when they are close enough (within an acceptable error tolerance). That is usually (simplifying it for here - for more details you might want to look at The Designer's Guide to SPICE and Spectre by Ken Kundert or Steady-State Methods for Simulating Analog and Microwave Circuits by Kundert et al.) of the form |Fn(v(k))| < reltol*Fnmax + iabstol where Fn(...) are the currents flowing into a node, and Fnmax is the absolute value of the largest current. You can set iabstol to a very small number, but it does mean that it will spend a long time trying to resolve the differences in tiny currents (iabstol defaults to 1pA in spectre, and is normally about a millionth of a typical current in the circuit to give reasonable accuracy/performance). reltol is a measure of the normal dynamic range (worse-case) in the circuit, but you can't set it above around 1e9 because you'll just run out of numerical headroom. Added to that, there's gmin which is added to provide an artificial conductance to ground to ensure that nodes are not floating - effectively floating nodes (when there's no leakage path) lead to the simulator having to solve an ill-conditioned problem (in essence the matrices become impossible to solve as there are an infinite number of solutions that meet the conditions). That too helps with convergence but degrades modelling of leakage (especially if the gmin resistance is 1e-12 Siemens, which leads to pA scale currents in circuit operating around 1V). 

    So you could set iabstol very small (e.g. 1e-30) and you could set gmin=0 and for this circuit that will simulate very quickly. However, I see a pretty noisy solution in the flat parts (getting a very accurate answer in the switching parts will be difficult because the dynamic range is higher there). You could also try relref=pointlocal but that will probably be very slow indeed and fail to converge.

    This is really beyond the normal accuracy criteria used for circuit simulation. I can't spend more time trying to coax the simulator into an extremely atypical usage case.

    Overall, I doubt the models you're using are good enough too.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yysunj
    yysunj over 4 years ago in reply to Andrew Beckett

    Thank you for your exact reply!

    yysunj

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
<

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information