Just started using LTspice and I'm struggling with what is probably a total newbie mistake on a DC operating point test.
Created a basic circuit, 10V voltage source and 1k resistor in series, and I'm not getting exactly 10mA current.
Voltage source has zero internal resistance.
Resistor has zero tolerance.
When I run I get correct value of 0.01A on the results text, but not on the circuit label.
What am I doing wrong? Thanks
Best Answer
As already said by Barry, that is the effect of roundoff error. You can improve those results by increasing the internal precision used by LTspice's engine with the following SPICE directive:
this will force the engine to use double precision floating point numbers for calculations (by default it uses single precision).
To add such a directive on the schematic use the menu
edit/spice directive
and enter the text above. Then place the floating box that pops up anywhere on the schematic.Note that this could slow down some complex simulations (not necessarily, it also depends on your CPU, OS, etc.).
For beginners it is reassuring to see simple results not (visibly) affected by roundoff, but keep in mind that as long as computations are done in binary in the CPU there will always be numbers that are "round" when expressed in decimal, but cannot be expressed exactly in binary, and so they will lead to roundoff even in simple calculations, no matter what level of precision the CPU uses internally.