| Electronics > Beginners |
| Floating kilofarad capacitor causes noise in LTspice BJTs |
| << < (3/3) |
| SilverSolder:
Try a transient analysis instead, with the "Start external DC supply voltages at 0V" checked. Now, the curve looks a lot more realistic. Also, if you don't like the default parallel resistance for C1, you can change it by right clicking on it and entering a suitably astronomical value. I got the current down to the femtoamp region that way. |
| iMo:
--- Quote from: SilverSolder on July 23, 2019, 08:06:49 pm --- One possible trap with LTSpice for high precision work is the need to add ".OPTIONS numdgt=7" somewhere on the sheet, in order to tell LTSPICE to switch to double precision math on dependent variables. Otherwise, the results can be too coarse/ noisy. --- End quote --- ".OPTIONS numdgt=15" PS: do read the manual before using a tool :) I would also recommend you to start with more realistic scenarios. LTSpice is basically a math engine, working on the SISO principle.. Also mind it does not use an unlimited floating point precision.. |
| SilverSolder:
--- Quote from: imo on July 25, 2019, 10:23:29 pm --- --- Quote from: SilverSolder on July 23, 2019, 08:06:49 pm --- One possible trap with LTSpice for high precision work is the need to add ".OPTIONS numdgt=7" somewhere on the sheet, in order to tell LTSPICE to switch to double precision math on dependent variables. Otherwise, the results can be too coarse/ noisy. --- End quote --- ".OPTIONS numdgt=15" PS: do read the manual before using a tool :) I would also recommend you to start with more realistic scenarios. LTSpice is basically a math engine, working on the SISO principle.. Also mind it does not use an unlimited floating point precision.. --- End quote --- The manual says "In LTspice, if 'numdgt' is set to be > 6, double precision is used for dependent variable data." By setting it to 15, aren't we needlessly and wastefully using up too many numbers in between??? :) |
| magic:
--- Quote from: imo on July 25, 2019, 10:23:29 pm ---I would also recommend you to start with more realistic scenarios. LTSpice is basically a math engine, working on the SISO principle.. Also mind it does not use an unlimited floating point precision.. --- End quote --- Fair enough, but IEEE754 has not even just one but a whole two ways of representing zero with absolute accuracy. I naively expected DC conductance of capacitors to be just that. It seems I can override their leakage resistance, but sometimes I would rather simply disable it :-- By the way, the reason I created this RC circuit was to get AC coupling of some signal for more convenient viewing. Is there a better way of doing that? Now going back to my first problem, I think what may have happened is that this leakage resistance added by SPICE created a loop with the capacitor and allowed SPICE to think that current flow through the capacitor is possible, resulting in numeric glitches due to the unusually high capacitance or whatever. Lesson learned: don't leave floating nodes in places that matter and expect hidden parasitics even in ideal components. :palm: |
| SilverSolder:
Sadly, nothing is ideal... e.g. https://stackoverflow.com/questions/588004/is-floating-point-math-broken |
| Navigation |
| Message Index |
| Previous page |