How to get voltage value of a wave form saved in a file in ltspice?

Thread Starter

santlal

Joined Jan 14, 2020
22
I am getting the output voltage at a node of a circuit. I did the transient analysis. What I need is to save amplitude values of the signal after a fixed interval. How do I go about it?
 

Thread Starter

santlal

Joined Jan 14, 2020
22
I have a subcircuit code. I posted below. I need to save the output amplitude at node sv in a fixed interval. Say after every 1msec.

thank you




*Generalized memristor model
.subckt GMM te be xsv
.params a1=0.17 a2=0.17 b=0.05 vp=0.16 vn=0.15 ap=10 an=10 xp=0.9 xn=0.5 alphap=1 alphan=5 eta=1

.func G(v)=if(v <= vp, if(v>=-vn, 0, -an*(exp(-v)-exp(vn))), ap*(exp(v)-exp(vp)))
.func F(v1,v2)=if((eta*v1) >= 0, if(v2>=xp, (exp(-alphap*(v2-xp))*((xp-v2)/(1-xp)+1)), 1), if(v2<=(1-xn), (exp(alphan*(v2+xn-1))*(v2/(1-xn))),1))
.func IVREL(v1,v2)=if(v1 >= 0, (a1*v2*sinh(b*v1)), (a2*v2*sinh(b*v1)))
cx xsv 0 {1}
.ic V(xsv)=x0
Gx 0 xsv value={eta*F(V(te,be),V(xsv,0))*G(V(te,be))}
Gmem te be value={IVREL(V(te,be),V(xsv,0))}
.ends GMM

Xmem x 0 sv GMM x0=0.0099
v1 x 0 0.2
.tran 1
.end
 

ericgibbs

Joined Jan 29, 2010
21,394
hi santial,
Please post your asc file, and we can compare and advise.

Not just the Model listing, we must see the circuit.
E
 

Alec_t

Joined Sep 17, 2013
15,103
Alec_t, will you please give a simple example?
Here's one example of a .measure command, from the LTS Help :-

.MEAS TRAN res1 FIND V(out) AT=5m
(Prints the value of V(out) at t=5ms, labeled as res1).

You can see the printed result in the simulation's SPICE Error Log.
 
Top