¿ªÔÆÌåÓý

computed expression values


Jonathan Kirwan
 

I want to start out by saying that I'm a hobbyist, not an
electronics professional.

When I first heard of SwitcherCAD III/LT Spice perhaps a year
ago, I went to the Linear web site with the intent to download
the program and completely failed to understand what I almost
had in hand. From the descriptions, it looked like some kind of
specialized program for switcher-based power supplies and that
was far too limited to be very interesting at the time. It
wasn't until later reading of comments by one of the active
members of the LT Spice team (Mike) that I began to realize my
mistake and attempted to download LT Spice in January. Boy, was
that a good decision.

In the past, I've tried, and actually purchased, a few other
programs claiming to provide electronics simulations. I've had
a crashed Windows, substantial memory leaks, and overly complex
setup for simulation and overly complex arrangements to observe
the signal values I'm interested in (in some cases, having to
manually wire up a "meter" in order to get those results, and
even then with difficulty.) By comparison, and this isn't
simply a false impression because of my building on prior
experience, LT Spice was a dream to use. Once I set down to
seriously confront a simple circuit, it took me no time at all
(and without reading any help files) to create it and get
results I was interested in seeing. This stands in stark
contrast to past experience.

As I've spent a little more time in LT Spice, every moment has
been well paid back by discovery of still more useful and
interesting features. It's actually such a joy, that I've gone
out and purchased an original Spice II PhD thesis from 1975,
recommended by Mike, and another similar book and have found all
of it very useful. Every minute has been well-paid and I can
barely imagine a tool which is easier to use.

Of course, I'm still too much a neophyte, both in electronics
knowledge as well as in simulation depth, to know whether or not
this program provides simulations which are incorrect in some
important details and which will lead me into very wrong
impressions which will be hard to unlearn. But I'm pretty
confortable in my current belief, tested in a few cases I've
actually built and used, that it's providing good results. And
comforted aslo by the active support of this program.

All that is by way of introduction for a question I have:

I've taken advantage of .param in order to allow me to specify
certain important values for a basic degenerative amplifier
design. The components used in this model design are all
specified with expressions using the set signs, {}. Simulation
results look encouraging to me, now, but I'd like to see what
the results of the calculations for these expressions were, in
simulation, so that I can now specify real values and build one
for testing. I could go use my calculator, of course, and
figure these out. But I'd like LT Spice to display the results
of its own calculations without my having to use a calculator,
by hand. Is this easily doable?

My guess is that I could write an expression into the graphical
display as another trace and just see the value of the straight
line, but that's not a good way to do this. What I'm
considering as "nice" would be to right-click over the
expression on the schematic and call up a dialog box for
extering the expression, but where this dialog box would *also*
show the current result of the existing expression.

Anyway, that's my question for now. Thanks to all!

Jon


 

Jon,

Thanks for that wonderful letter you wrote. I
forwarded it to the Chief Technical Officer at
Linear. Hope that's okay.

For your question, it might help you to know that
you can see what your {} expressions evaluated to
in this manner:

1. Go to Tools=>Control Panel=>Operation.
2. Check "Generate Expanded Listing"
3. Then, after you run the simulation, make the
schematic the active window and use the menu
command View=>SPICE Error Log. In the listing
you will see how the {} expressions were
evaluated.

Anyway, that's how I do it.

Regards,

--Mike

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more


Jonathan Kirwan
 

On Sat, 8 Mar 2003 13:58:35 -0800 (PST), you wrote:

Thanks for that wonderful letter you wrote. I
forwarded it to the Chief Technical Officer at
Linear. Hope that's okay.
Hehe. Sure! I want folks at Linear to realize it's all
appreciated.

For your question, it might help you to know that
you can see what your {} expressions evaluated to
in this manner:

1. Go to Tools=>Control Panel=>Operation.
2. Check "Generate Expanded Listing"
3. Then, after you run the simulation, make the
schematic the active window and use the menu
command View=>SPICE Error Log. In the listing
you will see how the {} expressions were
evaluated.

Anyway, that's how I do it.
Works for me. Looks good. Thanks!

...

Is there way to get the peak-to-peak over a specific time range?
One simple calculation I'd like to do is to get a close estimate
of the gain figure by, say, dividing the output p-p by the input
p-p. But I want this figure computed, based on the time range
of, say, t0=100ms to t1=200ms?

I'm also going to have to figure out a simple way to look at
effects of temperature variation and component variation on gain
and DC quiescent point, again only over a specified time range.

What about computing group delay through a filter or amplifier?

And can LT Spice conserve or account for charge in the
calculations?

Sorry, I keep wondering about all the possibilities, now.

Jon


 

Jon,

Is there way to get the peak-to-peak over a specific
time range? One simple calculation I'd like to do
is to get a close estimate of the gain figure by,
say, dividing the output p-p by the input p-p.
But I want this figure computed, based on the time
range of, say, t0=100ms to t1=200ms?
No really, but the cursors are helpful. You can get
a quick idea by dragging a box as if you were going
to zoom that just touches the peak and valley points
and looking at the dy value on the status bar. You
can read differences on the waveforms in this manner
and skip the zoom by either pressing the right button
before releasing the left or pressing ECS.

Another method is to attach both attachable cursors
to the same trace.(Right click on the trace label
use the "Attached Cursor:" list of possibilities.
Drag one cursor to the peak and the other to the
valley and then you can read off the difference
on the attached cursor readout.

I'm also going to have to figure out a simple way
to look at effects of temperature variation and
component variation on gain and DC quiescent point,
again only over a specified time range.
See .step and .temp in the help. Also check out
the examples with the word step in the file name.

What about computing group delay through a
filter or amplifier?
Do a .AC analysis. Then move the mouse to the right
of the plot. The mouse cursor will turn into a
ruler trying to indicate that you are pointing
at that axis' attributes. Pick group delay
instead of phase in the representation group.

--Mike

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more