Electronics Design AVG and RMS in LTSpice?

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
AVG and RMS in LTSpice? Joerg 07-14-08
Posted by Joerg on July 14, 2008, 5:54 pm
Please log in for more thread options
Ok, guys, I don't use Spice much and usually get around this stuff via
some extra placed parts. Not this time.

How can one calculate the (running) average of a trace? IOW as if there
was an RC or LC lowpass. Or something where I can set a scooting window.

I know you can find out the AVG by zooming the plot, then
CTRL-right_click. But I'd like graphs that show me efficiency penalties
over the course of simulated load changes. It doesn't spit out the raw
data and I don't really want to go via Excel if possible. Also,
preferably not the V-Source plus I-Source scheme of LTSpice because
that's restricted to one each.

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.

Posted by D from BC on July 14, 2008, 6:18 pm
Please log in for more thread options
On Mon, 14 Jul 2008 14:54:43 -0700, Joerg

>Ok, guys, I don't use Spice much and usually get around this stuff via
>some extra placed parts. Not this time.
>
>How can one calculate the (running) average of a trace? IOW as if there
>was an RC or LC lowpass. Or something where I can set a scooting window.
>
>I know you can find out the AVG by zooming the plot, then
>CTRL-right_click. But I'd like graphs that show me efficiency penalties
>over the course of simulated load changes. It doesn't spit out the raw
>data and I don't really want to go via Excel if possible. Also,
>preferably not the V-Source plus I-Source scheme of LTSpice because
>that's restricted to one each.

Dunno if I've grasped the problem, but it reminds me of the time I was
sim'ing PWM instability.
It's goofy to check the length of hundreds of pulses in LTSpice.
So I made a spice circuit to help me spot PWM variations as LTSpice
was plotting.
Fake circuits to help design real circuits. :)
I just call'm helper circuits to get quick analysis.

Perhaps make the electronic equivalent for the behavior you want to
observe.

Maybe that helps..


D from BC
British Columbia
Canada

Posted by Joerg on July 14, 2008, 6:44 pm
Please log in for more thread options
D from BC wrote:
> On Mon, 14 Jul 2008 14:54:43 -0700, Joerg
>
>> Ok, guys, I don't use Spice much and usually get around this stuff via
>> some extra placed parts. Not this time.
>>
>> How can one calculate the (running) average of a trace? IOW as if there
>> was an RC or LC lowpass. Or something where I can set a scooting window.
>>
>> I know you can find out the AVG by zooming the plot, then
>> CTRL-right_click. But I'd like graphs that show me efficiency penalties
>> over the course of simulated load changes. It doesn't spit out the raw
>> data and I don't really want to go via Excel if possible. Also,
>> preferably not the V-Source plus I-Source scheme of LTSpice because
>> that's restricted to one each.
>
> Dunno if I've grasped the problem, but it reminds me of the time I was
> sim'ing PWM instability.
> It's goofy to check the length of hundreds of pulses in LTSpice.
> So I made a spice circuit to help me spot PWM variations as LTSpice
> was plotting.
> Fake circuits to help design real circuits. :)
> I just call'm helper circuits to get quick analysis.
>
> Perhaps make the electronic equivalent for the behavior you want to
> observe.
>

That's exactly what I've been doing for years. This time it would really
clutter things though. Lots of currents to be measure and filtered. I
was just wondering whether there was a reasonable math approach.

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.

Posted by Jonathan Kirwan on July 14, 2008, 7:10 pm
Please log in for more thread options
On Mon, 14 Jul 2008 14:54:43 -0700, Joerg

>Ok, guys, I don't use Spice much and usually get around this stuff via
>some extra placed parts. Not this time.
>
>How can one calculate the (running) average of a trace? IOW as if there
>was an RC or LC lowpass. Or something where I can set a scooting window.
>
>I know you can find out the AVG by zooming the plot, then
>CTRL-right_click. But I'd like graphs that show me efficiency penalties
>over the course of simulated load changes. It doesn't spit out the raw
>data and I don't really want to go via Excel if possible. Also,
>preferably not the V-Source plus I-Source scheme of LTSpice because
>that's restricted to one each.

I just use the mouse to highlight a desired rectangle and release. The
chart expands. Then I use ctrl-right-mouse-click, I think, to get the
AVG and RMS figures. Something like that... it just pops up in a
small dialog box.

Jon

Posted by Andrew Holme on July 14, 2008, 7:21 pm
Please log in for more thread options

> Ok, guys, I don't use Spice much and usually get around this stuff via
> some extra placed parts. Not this time.
>
> How can one calculate the (running) average of a trace? IOW as if there
> was an RC or LC lowpass. Or something where I can set a scooting window.

What about an arbitrary voltage source with something like:

V=idt(V(x)-absdelay(V(x),100n))/100n

for a 100ns moving average?



Similar ThreadsPosted
LTspice August 10, 2005, 1:52 pm
Best LTSpice to PCB July 21, 2007, 8:51 pm
Help with LTspice September 16, 2007, 7:19 am
LTspice October 4, 2007, 11:38 pm
AVG and RMS in LTSpice? July 14, 2008, 5:54 pm
More LTSpice models December 25, 2004, 12:48 pm
Ltspice question. September 13, 2005, 5:29 am
LTSpice newbie February 3, 2006, 2:43 pm
AC simulation - LTSpice August 21, 2006, 6:53 am
How to fix LTspice schematic September 27, 2006, 10:56 pm
LTspice Question February 19, 2007, 7:49 pm
Need Help, LTspice SCR model February 23, 2007, 7:57 pm
LTspice .model help March 6, 2007, 7:26 am
Simulate LED in LTSpice August 8, 2007, 10:01 am
LTSpice: how to add a transformer? September 19, 2007, 11:07 am