Setup
I am trying to run a parameter sweep in LTspice in order to generate STDP curves for a memristor.
I'm doing this by sweeping a time-delta parameter dT
between -50 and +50 ms, in order to run 100 transient analyses with the "post-synaptic" voltage source shifted w.r.t. to the "pre-synaptic" at each one.
.param dT=-50m
.step param dT -50m 50m 1m
The pulse that is seen around 200 ms is to read the current through one of the probes of the device I'm measuring.
The problem
I would like to sample each of the simulations by taking the current at one of the electrodes of my device at 206 ms, in order to compile them into a classical STDP graph with dT as x-axis and current as y-axis.
Solution:
.meas res find ix(u1:te) at 206m
did the trick to be able to measure the current through the device.
I was then able to plot my quantity of interest by View > Spice Error Log > Right click on res > Plot step'ed .meas data .
.MEAS <probe> AT 206m
. Does that make sense? \$\endgroup\$.meas <probe> find <quantity> at 206m
, where<quantity>
can be eithertime
or any signal or math with signals (i.e.v(out)**2
). Then open up the error log, RClick and select plot step'ped data (or similar). \$\endgroup\$.meas <probe> find <quantity> at 206m
did the trick. I was then able to plot my quantity of interest by View > Spice Error Log > Plot step'ed .meas data \$\endgroup\$find <quantity>
and just write.meas <name> when <condition>
, it is implied that it's using.meas <name> find time when <condition>
. That's why<quantity>
explicitly uses<quantity>
for finding. \$\endgroup\$