Things you should know about LTSpice

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
if you want to see how LTSPICE tries to resolve the operating point when given a difficult solution, take the class AB example schematic (...\LTSpiceIV\Examples\Educational\audioamp.asc) and swap the inverting and noninverting inputs (R1 to Q2-base, R6+R7 to Q1-base) and run the sim.

i just did it.... used to be if i made such an obvious error, LTSpice would try to solve it for about 10 minutes. looks like they've improved the solvers. hmmm.... now it only takes a few seconds to latch the output to a rail.
 
Last edited:
. . . used to be if i made such an obvious error, LTSpice would try to solve it for about 10 minutes. looks like they've improved the solvers. hmmm . . . .
There are several options, aids, and tweaks available in the "Hacks" and "SPICE" tabs of the "Control Panel". I don't claim to understand them more than superficially, but if a circuit misbehaves during initial solution or takes excessive simulation time, playing with the options will sometimes improve the situation. The "gottcha" is remembering to restore the default options for routine use, since LTSpice retains some of those option selections on subsequent runs.

Dale
 
I keep making the point that PIM IS IMD - you can't have more PIM than indicated by the magnitude of the IMD components

the trick is to resolve the IMD components into "quadrature" sub components, aligning and identifying one phase with "AM" IMD and the other with "FM" IMD

Cordell has his PIM rebuttal papers on his site - he outlines the design of his hardware quadrature IMD measurement

you could try siming hardware or use some ideas from my distortion residual subcircuit employing arbitrary behavioral source mathematics
 
I'm trying to learn to use the .meas command during a .trans analysis. I want to do something simple and print the resulting attenuation in dB comparing two wave forms at their max. I tried this, to no avail:

.meas tran attenuation MAX VDB(node_after_attenuator,node_before_attenuator)

The documentation around this seems a bit sparse, has anyone done this before?
 
I have been modelling a circuit using some of the Cordell transistor models, but all of a sudden the program tells me it cant open any of them, has anybody else found such a thing happening?
rcw
Probably best to ask a question like this in the Yahoo LTSpice user's group at https://groups.yahoo.com/neo/groups/LTspice/info Upload your circuit file to the "Temp" folder in the "Files" section. (Attachments aren't allowed in the "Messages" section.)

I haven't done anything with LTSpice for a couple of weeks, but I see there was a new version released on Monday of this week. If there was a problem with that version, it probably would have been mentioned in the user's group, and almost certainly corrected by now (3 days after release).

Your symptom sounds like a problem defining search paths. Years ago I tried to do elegant and impressive things with the LTSpice search paths, ".lib" command, etc, but decided the results weren't worth the effort. I have added quite a few models - including Bob Cordell's transistor models - to the components libraries ("standard.bjt", "standard.dio", etc) so I could easily specify them while composing a schematic. For seldom-used models, models of uncertain accuracy, and models that have been tweaked for a particular investigation (e.g., "best case" or "worst case" device behavior) the often-repeated advice in the user's group is to paste the model directly into the schematic as a SPICE directive. That guarantees LTSpice will find it, and give it precedence over any other model of the same name in the search path.

(Yeah, that really clutters up the schematic. Would be nice if LTSpice had a separate "Models" tab where you could park the models you want to use, without having them eat up so much acreage on the schematic itself.)

Dale
 
ltspice woes

Thank you for the information Dale, I have loaded the file into the temp folder as you suggested.

I have only been using ltspice for a couple of months, and although it has the reputation as the best freeware around, it also seems difficult to use and the info on how to use it hard to find and obscure. I am also suspicious of some of its findings, that may well be to do with being sixty five years of age and finding myself becoming more curmudgeonly all the time.
rcw
 
I have only been using ltspice for a couple of months, and although it has the reputation as the best freeware around, it also seems difficult to use and the info on how to use it hard to find and obscure.
In my opinion the lack of documentation is perhaps the biggest shortcoming of LTSpice. On the other hand - it is extremely generous for Linear Technology to share LTSpice (at no charge) in ANY form with any mere mortal who wishes to download it. This is, after all, an engineering tool, created to meet the needs of Linear Technology's internal engineering activities. As much as I might complain about the documentation, I understand why LT hasn't put resources into creating a slick, comprehensive, set of manuals featuring many color pictures with circles and arrows and a paragraph explaining what each one is about.

I don't think you're one of the folks who expect LTSpice to design a circuit for you. It simply can't - just as owning Albert Pujols' bat can't make me a professional baseball homerun hitter.

LTSpice DOES expect you to have at least minimal familiarity with SPICE simulation in general, and the SPICE program syntax. On that topic some of the guides and how-to documents written for the original Berkely SPICE program may be helpful. (I am amazed that a computer program written over 40 years ago, for mainframe machines operating in a computing environment almost unrecognizable from today's expectations, is still viable.)

If you poke around the "Files" section of the Yahoo user's group I believe you'll find a folder called "Tutorials", containing several dozen documents and links. Many of them were created by academic instructors trying to show their students how to effectively use LTSpice in their engineering class work. Some are more helpful than others, and some go beyond the details of LTSpice per se into topics related to the design or analysis of particular circuit topologies. I suggest you try a few until you find one that is compatible with your current level of understanding as well as your personal learning style.

I am also suspicious of some of its findings, that may well be to do with being sixty five years of age and finding myself becoming more curmudgeonly all the time.
Truman was president when I was born, too. (In fact, my wife is eagerly counting down the days until I must refrain from referring to her as "my old lady", because in a week or so we will be the same age once again.)

Back on topic - as with any simulation - electrical, mechanical, meteorological, etc - the reported results are highly dependent on the quality of the models from which they are determined.In the 1970's it was adequate for SPICE simulations to answer simple questions of a "GO/NO-GO" nature, in less time than it took to build a breadboard model of a circuit from parts on hand, or to crank out a numerical answer on your Texas-Packard 4-function calculator. Now we expect, and I believe rightly, to get answers well beyond GO/NO-GO into the realm of how far will it go, how fast, how soon, etc. Driven by my own insight and intuition, a simulator can provide information in seconds that would require days of calculation or dozens of breadboards.

When you receive results that seem contradictory to experience or expectations please consider posting your circuit file, along with an explanation of the discrepancy, to the LTSpice user's group, or this Forum.

Dale
 
I remember when spice first appeared on the scene, the consensus seemed to be, (as someone once said about something else), the wonder is not how well it is done but that it can be done at all.

I have used geophysics programs something like it, basically old fortran programs with a bit of a "user friendly" interface hung off them.

I suppose there is nothing for it but to go back over computer modeling 101 again.
rcw
 
The best way to get good at simulation is to ask, ask, ask. As a side benefit, you can learn a lot about electronics by trying to make simulations realistic.
There's definitely a synergistic effect there. As you become more knowledgeable about the subtleties and details of the electronics, you expect that your tools should be able to reveal such subtlety and detail. So you build a better tool, which suggests an even deeper layer of subtlety and detail which you try to exploit with a design . . . and so it goes.

Dale
 
What I have now done is to paste the models directly into spice directives.

They now appear on the schematic which is not really good but will do for now.
rcw
 

Attachments

  • HEDAMPWITHMODELS.GIF
    HEDAMPWITHMODELS.GIF
    12.9 KB · Views: 181
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.