LTSpice curiosity

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,619
A very simple circuit, two resistors and a diode, generates a changing current in the diode. I know the range of current change is very small but even so. How can this be?
Clipboard_07-29-2024_01.jpg
 

Attachments

crutschow

Joined Mar 14, 2008
38,316
It would appear you are seeing resolution and iteration computational errors in the result, that are well below any practical error considerations.
Remember this is an iterative and incremental digital calculation of analog circuit voltages and currents.
 

Papabravo

Joined Feb 24, 2006
22,058
What you have is a diode in sub-threshold conduction. This can be clearly seen by ramping the supply voltage up and down to reveal the exponential conduction characteristic of the diode below the forward voltage threshold (≈ 685 mV).

1722279196966.png
Why would anybody think this is unusual in the slightest? It beggars the imagination.
 

Attachments

crutschow

Joined Mar 14, 2008
38,316
This can be clearly seen by ramping the supply voltage up and down to reveal the exponential conduction characteristic of the diode below the forward voltage threshold (≈ 685 mV).
A standard diode has no "threshold voltage" as such, but has a logarithmic relation between voltage and current over a very large range (example sim below with log current scale).
It only starts to deviate from that when the diode intrinsic resistance starts affecting the voltage at higher current levels (here above about 10mA).

600-700mV is just the forward drop at typical operating currents in the 1-10 mA region.

1722281166374.png
 
Last edited:

WBahn

Joined Mar 31, 2012
32,702
(Nearly) all simulators work by successively refining the voltages on all nodes and through all devices until a solution converges to an acceptable tolerance. Initially, there is an operating point calculation to determine the solution at t=0. This solution, like the solution at every other time step, is an approximation and as long as everything satisfies the tolerance level specified, it stops. But as the simulation continues, the solution will continue refining and converging until it reaches a point where further iterations result in no change because of the intrinsic resolution of the computations involved.

Let's put some perspective on this.

In your circuit, if we do the analysis manually, assuming a forward voltage of 600 mV (given the large resistances involved), we would get a current of 33.33 µA if we remove R2. If we remove the diode, we would get a current in R2 of 22.22 µA.

So we can expect the current with both to be between these two values (though this is not guaranteed because of our assumption of a voltage across the diode).

So let's map currents from 0 µA to 50 µA onto the 101 floors of Taipei 101, whose top floor is 1470 ft above the bottom floor. For simplicity, let's use 100 floors over a height of 1500 ft, or 15 ft/floor.

So, in coming up with initial estimates of 22 µA and 33 uA, we have narrowed the operating point to somewhere between the 44th floor and the 67th floor. That's a pretty wide margin, so we use a simulator to get better (provided we have sufficiently good device models). But how good is good enough? Let's assume that we run a bunch of different operating point algorithms, each one an order of magnitude better than the last, and that the uncertainty in each result is one half, up or down, of the least significant digit shown.

31 µA (uncertainty is 0.5 µA, this puts us somewhere between the bottom of the 61st floor and the top of the 82 floor, so we know where are located somewhere within a 30 ft span).
31.1 µA (now our uncertainly range is 3 ft wide and we are firmly on the 61st floor at roughly waist level).
31.09 µA (now our range of uncertainty is just 3.6 inches wide)
31.091 µA (we're down to a span of just 0.36 inches, or less than 1 cm -- most people can cover that entire span with the width of one finger. Hard to imagine that that isn't good enough).
31.0908 µA (now we're down under a millimeter, or roughly the thickness of a credit card).
31.09076 µA (now we're down to under 100 µm, or roughly the thickness of a sheet of paper -- out of the height of one of the tallest buildings in the world).

That's the span of what your simulation changed by from where it started to where it ended -- from the bottom side to the top side a sheet of paper on the 61st floor of Taipei 101.
 
Top