¿ªÔÆÌåÓý

Re: .MEAS Failure


 

¿ªÔÆÌåÓý

On 24/02/2025 22:50, eewiz via groups.io wrote:
.meas TooLow1 FIND V(XSW11:X1:Qc,XSW11:X1:Qe) WHEN V(XSW11:X1:Qc,XSW11:X1:Qe)=2 FALL=1
works and produces;
toolow1: v(xsw11:x1:qc,xsw11:x1:qe)=2 at 0.00804696
?
Zooming in the plot window to the end of the universe, I see this point.
8.0469636ms 2.0000203V
The next point is:
8.0469636ms 1.9999355V
The time values must have greater precision than can be seen because a node can't have two different voltages at the same time.
I now see that since there is no value in the data that is exactly 2.0000000 it had to perform a poor mans less-than function.
No, that is not the case - wrong conclusion.
The code saw that 1.9999355 was less-than 2 where the previous sample 2.0000203 was more than two.
So that's a fall.
There was no test to see if data was ever == 2 as the .MEAS statement would imply.
I now see that the Fall and Rise modifiers mimic less-than or greater-than behavior for the .MEAS FIND WHEN statement.
Try again with:

.options numdgt=15.

By default, the .raw file is written with single precision; this option enables double precision (and approximately doubles the .raw file size).

There was no test to see if data was ever == 2 as the .MEAS statement would imply.
That's because the computation used interpolation - an estimation based on the closest two available data points, as previously stated. Obviously, there is no actual data point at exactly 2V. .MEAS can only make guesses on the data that actually exists in the .raw file, as it is a post-analysis calculation. There's no guarantee that any analysis can achieve a data point that shows V ¡Ô 2V, regardless of the maximum time step. This is why interpolation is used. That's just how the LTspice time step algorithm works.

--
Regards,
Tony

Join [email protected] to automatically receive all group messages.