Integrating in LTSPICE

Thread Starter

OccamsUbersaw

Joined Feb 23, 2013
4
tl;dr : how do you use "idt" to integrate the product of 2 waveforms?

I have been trawling the web for hours now and am still no closer to working this out.
I have seen this operator 'idt' floating around on various pages but have had no luck using it.
I am trying to model switching losses in a BJT, and am trying to generate a waveform that follows the integral of Ic*Vce so i can record the change in energy over the switching period.

I have Ic and Vce plotted for around 10 cycles over 400us.
I have the power plotted Ic*Vce
but using idt(Ic*Vce) is not working (says 'undefined symbol in' <formula>)and I cant think of a workaround / work out how to make it work.

Any spice gurus know / can help?

Thanks
 

w2aew

Joined Jan 3, 2012
219
I haven't seen the "idt" operator in LTSpice. Searching the help file for "integral" or "integration" only really yields the following entry for waveform plotter:

"The waveform viewer can integrate a trace to obtain the average and RMS value over the displayed region. First zoom the waveform to the region of interest, then move the mouse to the label of the trace, hold down the control key and left mouse click."
 

gootee

Joined Apr 24, 2007
447
You can use LaPlace transforms in a behavioral source... 1/s? I don't think that would work for a time-domain simulation, though.

Or you could use a multiplier and then an opamp integrator circuit. But that probably wouldn't quite give the "ideal" result.

Have you tried searching the archives of the LT-Spice users group, at yahoogroups.com?
 

Ron H

Joined Apr 14, 2005
7,063
tl;dr : how do you use "idt" to integrate the product of 2 waveforms?

I have been trawling the web for hours now and am still no closer to working this out.
I have seen this operator 'idt' floating around on various pages but have had no luck using it.
I am trying to model switching losses in a BJT, and am trying to generate a waveform that follows the integral of Ic*Vce so i can record the change in energy over the switching period.

I have Ic and Vce plotted for around 10 cycles over 400us.
I have the power plotted Ic*Vce
but using idt(Ic*Vce) is not working (says 'undefined symbol in' <formula>)and I cant think of a workaround / work out how to make it work.

Any spice gurus know / can help?

Thanks
Do you want to see a waveform, or simply a numerical result? The latter is easy.
 

kf5rcl

Joined Apr 13, 2016
1
I use a B source ("bv" in components) to output a idt calculation. For example, I have a B source whose value is "V=idt(I(G1) * V(vr))" where I(G1) is the current of a VCCS and V(vr) is the voltage at a label. So the voltage of the B source is the integral of a current times a voltage.
 

crutschow

Joined Mar 14, 2008
34,452
If you Alt-Left Click on the transistor, you will get a plot of the instantaneous power dissipated in the transistor with time.
If you then do as Alan suggest in Post #2:
"First zoom the waveform to the region of interest, then move the mouse to the label of the trace, hold down the control key and left mouse click."
you will get the integrated value of the power over the time interval.
Is that what you want?
 
Top