On Tue, May 6, 2025 at 09:33 AM, Tony Casey wrote:
Assuming you want to calculate the average inductor current:If I understand correctly, that would of course find the average inductor current over one complete cycle. ?
But Ankit wants to find the average voltage over three distinct time intervals, each of which is a portion of one cycle:
These three intervals are identified as t0-to-t1, t1-to-t2, and t2-to-t3??-- or as d1Ts, d2Ts, and d3Ts -- in the second photo that Ankit uploaded earlier today.
?
That is a little more challenging because one wants to identify the starting and ending times of each of the three semi-linear portion of the I(L) waveform, but there is some noise (ringing) which makes finding the exact corners challenging.
?
That is why I recommended adding guard bands.? Instead of looking for
? ? I(L_filter_DC)=0,
Ankit may want to test for
? ? I(L_filter_DC)=50m
or some other number (75mV, 200mV, ?mV) that is not exactly zero, but large enough to be unaffected by ringing.? Admittedly it requires Ankit to accept the errors caused by measuring over inexact time intervals.? I think it may be a necessary trade-off.
?
The mechanics of putting that into one or a collection of .MEAS commands is another matter.? Perhaps the syntax Ankit used was incorrect (but we may never know because of unwillingness to show the non-working .MEAS commands).? Or perhaps the tested events never happened.? Unfortunately, the error message can be the same in either case, making it challenging to diagnose.? Breaking it up into multiple .MEAS commands does help and you can see where it fails.
?
Andy
?
? |