0
\$\begingroup\$

I have a simple circuit in spice that I put a 0-5V step function into. So basically as square-wave going in. Then I can get my current and voltage waveforms out, or do some math to get power. But I really want to know say for 1ms how much power was used. I just want to compare a few approaches and my comparison that other people on my team will understand will be Watts. So I was thinking how many Watts were used in 1ms.

I'm thinking maybe I want to integrate under the power curve? Not sure exactly how to accomplish that in LTspice so I'm asking for some advice. I did read a little about the idt function.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ You can do simple maths in the graph and multiply voltage and current. \$\endgroup\$
    – PlasmaHH
    Dec 14, 2016 at 15:23
  • \$\begingroup\$ That'll get me a graph of power, but I want to be able to say 1mW was used over 1ms and the response is non-linear. \$\endgroup\$
    – confused
    Dec 14, 2016 at 15:26
  • 3
    \$\begingroup\$ @Confused - Do what PlasmaHH said and plot V(t)*I(t). You can export that waveform to Excel/spreadsheet format. It is often easier to do calculations in Excel than trying to figure out how to do it in the waveform plotter. You can sum the discrete instantaneous power values over the time window you're concerned with. (Reimann sum ~= integral for sufficiently small timesteps). Note that the unit is [J] or [W*s] after summing, not [W]. \$\endgroup\$
    – vofa
    Dec 14, 2016 at 15:27
  • 5
    \$\begingroup\$ LTSpice will integrate over a plotted signal. Ctrl + left click (maybe right click - I'm away from my computer and unsure now...). It can be made to integrate over a desired time period. \$\endgroup\$
    – Matthew
    Dec 14, 2016 at 18:19
  • \$\begingroup\$ @Matthew +1 Thank you I found that by accident, and that is the method that worked great for me. \$\endgroup\$
    – confused
    Dec 15, 2016 at 15:36

1 Answer 1

1
\$\begingroup\$

There are two methods already mentioned for you in:

How to integrate a signal in LTSpice?

You really should start out with a search here. Spehro provides one method there, using a behavioral source ('bv' in the F2 dialog box) that you add to the schematic. Then you can probe that using the plot display viewer, use cursors to get values, etc. Another way was ALSO provided by Sergei on that same link. This uses .MEAS (just hit 'S' on your schematic and get the pop-up that allows you to create one of these) to perform the calculations for you. You can then use the View/SPICE Error Log menu choice to cause the error log to popup and display your measured value there. It's a great way to go if you know the exact start and stop times, for example.


Technically, I should have just commented all of the above to you. But it is long text and would have taken several comments to achieve. But also, I'm willing to post up an example case if you modify your question to be very specific about an example you'd like to see and don't feel you can work out. So I've added this as an answer with that in mind, as well. Just in case.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.