--- In LTspice@..., "jtanalog" <ltlist@...> wrote:
Is there any way, in a LTspice plot, to _display_ the average of a waveform over a specified interval? Something like the AVGX mechanism in PSpice's Probe?
-Jim Thompson
Hello Jim.
Unfortunately it's not possible to directly define a formula
with integration in the waveform viewer. One has to make a
Bv-source in the schematic or netlist.
.param d=100u
.func avgx(x,d) {(idt(x)-delay(idt(x),d))/d}
BV1 avgout 0 V=avgx(V(out),d)
BV2 avg37 0 V=avgx(V(37),d)
By the way you don't need a Bv-symbol. You could directly add
these SPICE-lines from above to your schematic. You will need
one B-device SPICE-line for every item you want to average.
I tried an example and found it's necessary to define a small
max time step in .TRAN and to switch off data compression for
best results.
.options plotwinsize=0 ; data compression off
The text after ';' is only comment.
Best regards,
Helmut