Why doesn't LTSPICE Simulator give us exact calculation result

Thread Starter

enesene

Joined Mar 3, 2020
29
Adsız.png

In real life there are tolerances of resistors or other components but in simulator it should gives us what we calculate, right?
I calculated VO1 as -600 and VO3 as 6.400 but in the simulate it's not
 

Papabravo

Joined Feb 24, 2006
21,225
Sure it is. I don't see the problem here. I guess you never did engineering with a slide rule.
The problem is that not all numbers have an exact floating point representation.
You sometimes have to live with compromises. Can you do that?
Check out the following tool for some insight

https://www.h-schmidt.net/FloatConverter/IEEE754.html

Shows quite explicitly that neither 6.4, nor 0.600 can be represented exactly.
 
Last edited:

LvW

Joined Jun 13, 2013
1,758
No - this will never be the case.
The reason is imple: All our formulas and expressions for calculating gain factors, frequency responses, input-/output impedances must contain some simplifications and neglections...otherwise we could not us them for our handy calculations.
Example: Did you consider the input and output resistances of the opamp and the opamps finite open-loop gain in your calculation? No - I don`t think so.
However, good simulation models for opamps, in fact, include these non-ideal parameters ...and much more...
Therefore, we cannot expect hat hand calculations (based on existing formulas) will exactly match the simulation results.
The latter are always more exact.
 

OBW0549

Joined Mar 2, 2015
3,566
In real life there are tolerances of resistors or other components but in simulator it should gives us what we calculate, right?
Wrong.

Your own calculations are not exact because, as mentioned above, they are based on numerous simplifying assumptions. The simulator's calculations are not exact either, in part because they're based on device models which are not (and cannot be) exact and also because Spice's simulation control parameters-- chiefly RELTOL and ABSTOL-- limit the degree to which Spice will attempt a precise solution so as to save computation time.

I calculated VO1 as -600 and VO3 as 6.400 but in the simulate it's not
You need to learn what is significant, and what is not; in this case, the simulation results and your own calculations are, for all practical purposes, identical. Expecting any better correspondence than that is completely unrealistic.
 

Papabravo

Joined Feb 24, 2006
21,225
So tell me, what is the correct floating point representation of 6.4 Volts and 600 mV. In each case tell me which value you prefer, the one that is a bit bigger or the one that is a bit smaller.
 
Top