Reply by Joe Gwinn June 7, 20142014-06-07
In article <lmgtk8$8su$1@dont-email.me>, Tim Williams
<tmoranwms@charter.net> wrote:

> "Joe Gwinn" <joegwinn@comcast.net> wrote in message > news:010620141342206648%joegwinn@comcast.net... > > But this kind of mathematical software isn't cheap to maintain and > > upgrade, and especially to provide models for. The operating-system > > equivalent to component models is I/O drivers. > > Well, now you're not doing yourself any favors. Windows comes with tens > of thousands of drivers, and only costs a hundred bucks! (c;
Huh? Too much context is gone, and I don't recall what I was reacting to. Joe Gwinn
Reply by Tim Williams June 2, 20142014-06-02
"Joe Gwinn" <joegwinn@comcast.net> wrote in message 
news:010620141342206648%joegwinn@comcast.net...
> But this kind of mathematical software isn't cheap to maintain and > upgrade, and especially to provide models for. The operating-system > equivalent to component models is I/O drivers.
Well, now you're not doing yourself any favors. Windows comes with tens of thousands of drivers, and only costs a hundred bucks! (c; Tim -- Seven Transistor Labs Electrical Engineering Consultation Website: http://seventransistorlabs.com
Reply by Joe Gwinn June 1, 20142014-06-01
In article <lme829$n5r$1@dont-email.me>, Tim Williams
<tmoranwms@charter.net> wrote:

> "Joe Gwinn" <joegwinn@comcast.net> wrote in message > news:310520142232300925%joegwinn@comcast.net... > >> The most obscure setting of them all seems to be pivot (PIVREL, > >> PIVTOL). > >> It's purely a computational thing, and of the few references I can find > >> to > >> it, the only sentiment is "does nothing, leave it alone". Yet I've had > >> more than a few failing circuits fixed by setting a more strict > >> (larger) > >> value, like as shown. I dare someone to explain that. > > > > They are most likely talking about pivoting, which is done in the > > solution of linear equations by gaussian elimination. Spice solves a > > linear equation at each time step. > > > > If these are really absolute and relative tolerances (as the names > > would suggest), I doubt that larger values are more strict. Making > > these tolerances larger makes the algorithm less fussy. > > Oops, I probably had "less strict" or "more relaxed" in my mind when > typing that. Or, you know how it is when talking about loading with > resistance (a reciprocal quantity). :) > > > Anyway, it's a long story, but the system matrixes that describe > > circuitry are quite nonlinear (all those semiconductors!) and are often > > ill-conditioned (and thus very sensitive to tiny errors). A lot of > > this is in Nagel's PhD thesis, the founding document of SPICE, although > > SPICE has evolved considerably since then. > > > > ..<http://en.wikipedia.org/wiki/SPICE> > > If it has evolved significantly, then why haven't partial-matrix > timestepping methods and such trickled down to our level yet? :)
I haven't followed the internals of SPICE since I read Nagel's thesis, but I'd hazard a guess that it's too much work to be done for the income stream one gets.
> My understanding of the average commercial offering is, they either start > with 3f5, which was the last and most useful Berkeley version, or XSpice, > which includes digital models and a couple more convergence hacks (I think > it introduced Gmin stepping..?). And apply their own proprietary mods > from there (PSpice with more functions and weird syntax; HSpice with even > more, and some more convergence I think, and those fucking encrypted > models; LTSpice with multithreading, also encrypted models; etc.), with a > graphical schematic capture and graphing and postprocessor tossed in > front. And ALL the low to mid level software (OrCAD, Altium, etc.) > resides at this level and there is simply no core development or > competition beyond that level. Which it seems to me, if it weren't for > the grace of academia having written SPICE for free, these companies > wouldn't give less than two shits abuut putting simulation in their > products at all!
Somebody would have invented SPICE if Nagel had not, because the time was ripe - both the means (computers) and the need (IC design) had arrived. But you are right - widespread use of SPICE has forced manufacturers to provide at least checkbox support. But this kind of mathematical software isn't cheap to maintain and upgrade, and especially to provide models for. The operating-system equivalent to component models is I/O drivers. Joe Gwinn
Reply by Tim Williams June 1, 20142014-06-01
"Joe Gwinn" <joegwinn@comcast.net> wrote in message 
news:310520142232300925%joegwinn@comcast.net...
>> The most obscure setting of them all seems to be pivot (PIVREL, >> PIVTOL). >> It's purely a computational thing, and of the few references I can find >> to >> it, the only sentiment is "does nothing, leave it alone". Yet I've had >> more than a few failing circuits fixed by setting a more strict >> (larger) >> value, like as shown. I dare someone to explain that. > > They are most likely talking about pivoting, which is done in the > solution of linear equations by gaussian elimination. Spice solves a > linear equation at each time step. > > If these are really absolute and relative tolerances (as the names > would suggest), I doubt that larger values are more strict. Making > these tolerances larger makes the algorithm less fussy.
Oops, I probably had "less strict" or "more relaxed" in my mind when typing that. Or, you know how it is when talking about loading with resistance (a reciprocal quantity). :)
> Anyway, it's a long story, but the system matrixes that describe > circuitry are quite nonlinear (all those semiconductors!) and are often > ill-conditioned (and thus very sensitive to tiny errors). A lot of > this is in Nagel's PhD thesis, the founding document of SPICE, although > SPICE has evolved considerably since then. > > ..<http://en.wikipedia.org/wiki/SPICE>
If it has evolved significantly, then why haven't partial-matrix tiumestepping methods and such trickled down to our level yet? :) My understanding of the average commercial offering is, they either start with 3f5, which was the last and most useful Berkeley version, or XSpice, which includes digital models and a couple more convergence hacks (I think it introduced Gmin stepping..?). And apply their own proprietary mods from there (PSpice with more functions and weird syntax; HSpice with even more, and some more convergence I think, and those fucking encrypted models; LTSpice with multithreading, also encrypted models; etc.), with a graphical schematic capture and graphing and postprocessor tossed in front. And ALL the low to mid level software (OrCAD, Altium, etc.) resides at this level and there is simply no core development or competition beyond that level. Which it seems to me, if it weren't for the grace of academia having written SPICE for free, these companies wouldn't give less than two shits abuut putting simulation in their products at all! Tim -- Seven Transistor Labs Electrical Engineering Consultation Website: http://seventransistorlabs.com
Reply by Joe Gwinn May 31, 20142014-05-31
In article <lm5dtg$o13$1@dont-email.me>, Tim Williams
<tmoranwms@charter.net> wrote:

> "RobertMacy" <robert.a.macy@gmail.com> wrote in message > news:op.xgksy1ym2cx0wh@ajm... > > Exactly where is a good description for all these options? > > ...Let alone how to use them? > > Stuff like GEAR is well documented by most SPICE descriptions, and > computational solvers in general; it's their word for Runge-Kutta of order > MAXORD. Note that TRAP (trapezoidal, i.e. Newton's Method, more or less) > is essentially RK1.
For even more information, consult books on numerical methods, especially numerical solution of differential equations. Also books on linear algebra, especially numerical methods.
> I very rarely use TRAP in my simulations because the settling is poor and > erratic (the result is a distinctive alternation, every other timestep, of > a given variable about its ideal value -- it looks like triangles when > zoomed), particularly for nonlinear (switching) circuits. Occasionally, I > find RK4 (GEAR, MAXORD = 4) beneficial: the average timestep is calculated > much more slowly (more derivatives to compute), but the worst-cases are > much better -- it's not digging as deep (constantly redoing a bad > calculation at progressively smaller timesteps) or as often, around > strongly nonlinear events (such as switching edges), so the overall > simulation can run faster (and more stable -- less likely to get stuck on > a randomly too-small timestep). > > I don't believe I've ever seen GEAR2 produce "bobbling" results; either it > settles asyptotically, or the oscillation is really there (as evidenced by > finding a smooth sinusoidal oscillation after setting smaller RELTOL > and/or max. timestep to enhance detail). > > As for "how to use", judging by the dearth of instructions or even useful > documentation on most SPICE settings, I can only assume three things: > > 1. Don't touch that, you'll screw it up! Use the default settings! If it > starts throwing errors, the circuit /must/ be impossible! > 2. Play with all of them and see what works. Life is a journey, or > something. > 3. I know what works, but I'm not going to tell you. > > Against the apparent collective wisdom of all three, I dare suggest these, > which seem to work well enough (these are in Multisim, which is your basic > XSPICE backend): > http://seventransistorlabs.com/Images/SimSettings1.png > http://seventransistorlabs.com/Images/SimSettings2.png > http://seventransistorlabs.com/Images/SimSettings3.png > but not all are available in LTSpice, so YMMV. > > The most obscure setting of them all seems to be pivot (PIVREL, PIVTOL). > It's purely a computational thing, and of the few references I can find to > it, the only sentiment is "does nothing, leave it alone". Yet I've had > more than a few failing circuits fixed by setting a more strict (larger) > value, like as shown. I dare someone to explain that.
They are most likely talking about pivoting, which is done in the solution of linear equations by gaussian elimination. Spice solves a linear equation at each time step. If these are really absolute and relative tolerances (as the names would suggest), I doubt that larger values are more strict. Making these tolerances larger makes the algorithm less fussy. Anyway, it's a long story, but the system matrixes that describe circuitry are quite nonlinear (all those semiconductors!) and are often ill-conditioned (and thus very sensitive to tiny errors). A lot of this is in Nagel's PhD thesis, the founding document of SPICE, although SPICE has evolved considerably since then. ..<http://en.wikipedia.org/wiki/SPICE> Joe Gwinn
Reply by RobertMacy May 28, 20142014-05-28
On Wed, 28 May 2014 12:38:06 -0700, Tim Williams <tmoranwms@charter.net>  
wrote:

> ...with gret regret having to snip to keep Aioe happy...
> 1. Don't touch that, you'll screw it up! Use the default settings! If > it > starts throwing errors, the circuit /must/ be impossible! > 2. Play with all of them and see what works. Life is a journey, or > something. > 3. I know what works, but I'm not going to tell you.
LOL!
> ...snip some great URL's
I purchased from MicroSim their PSpice manual. It's in storage and I have no access. But I do remember excellent explanations for what is going on. to the point of being able to make a great deal of decent models.
> The most obscure setting of them all seems to be pivot (PIVREL, PIVTOL). > It's purely a computational thing, and of the few references I can find > to > it, the only sentiment is "does nothing, leave it alone". Yet I've had > more than a few failing circuits fixed by setting a more strict (larger) > value, like as shown. I dare someone to explain that. > > Tim >
Thanks for the great suggestions, will try them. Sadly, while at University I seemd to have missed three important areas: Maxwell's equations, which I need to use constantly; noise, although took some great courses at Stanford from Robert Geray and T. Kailath, which now live and breathe noise everyday; and numerical analysis, which was best described by moving hand over forehead loudly declaring 'whoosh' and now every day fight battles with simple things like truncation errors, convergence issues, and accumulation truncation errors, ad nauseum. And now, the 'nuances' of spice kernel. sigh.[if that was even the correct word]
Reply by Tim Williams May 28, 20142014-05-28
"RobertMacy" <robert.a.macy@gmail.com> wrote in message 
news:op.xgksy1ym2cx0wh@ajm...
> Exactly where is a good description for all these options?
...Let alone how to use them? Stuff like GEAR is well documented by most SPICE descriptions, and computational solvers in general; it's their word for Runge-Kutta of order MAXORD. Note that TRAP (trapezoidal, i.e. Newton's Method, more or less) is essentially RK1. I very rarely use TRAP in my simulations because the settling is poor and erratic (the result is a distinctive alternation, every other timestep, of a given variable about its ideal value -- it looks like triangles when zoomed), particularly for nonlinear (switching) circuits. Occasionally, I find RK4 (GEAR, MAXORD = 4) beneficial: the average timestep is calculated much more slowly (more derivatives to compute), but the worst-cases are much better -- it's not digging as deep (constantly redoing a bad calculation at progressively smaller timesteps) or as often, around strongly nonlinear events (such as switching edges), so the overall simulation can run faster (and more stable -- less likely to get stuck on a randomly too-small timestep). I don't believe I've ever seen GEAR2 produce "bobbling" results; either it settles asyptotically, or the oscillation is really there (as evidenced by finding a smooth sinusoidal oscillation after setting smaller RELTOL and/or max. timestep to enhance detail). As for "how to use", judging by the dearth of instructions or even useful documentation on most SPICE settings, I can only assume three things: 1. Don't touch that, you'll screw it up! Use the default settings! If it starts throwing errors, the circuit /must/ be impossible! 2. Play with all of them and see what works. Life is a journey, or something. 3. I know what works, but I'm not going to tell you. Against the apparent collective wisdom of all three, I dare suggest these, which seem to work well enough (these are in Multisim, which is your basic XSPICE backend): http://seventransistorlabs.com/Images/SimSettings1.png http://seventransistorlabs.com/Images/SimSettings2.png http://seventransistorlabs.com/Images/SimSettings3.png but not all are available in LTSpice, so YMMV. The most obscure setting of them all seems to be pivot (PIVREL, PIVTOL). It's purely a computational thing, and of the few references I can find to it, the only sentiment is "does nothing, leave it alone". Yet I've had more than a few failing circuits fixed by setting a more strict (larger) value, like as shown. I dare someone to explain that. Tim -- Seven Transistor Labs Electrical Engineering Consultation Website: http://seventransistorlabs.com
Reply by Jim Thompson May 28, 20142014-05-28
On Wed, 28 May 2014 10:45:53 -0700, RobertMacy
<robert.a.macy@gmail.com> wrote:

>On Wed, 28 May 2014 10:34:48 -0700, Jim Thompson ><To-Email-Use-The-Envelope-Icon@on-my-web-site.com> wrote: > >>> ...snip....incomprehensible tirade >> ,,,snip....righteous indignation >> ...Jim Thompson > >You must have missed the "Do not feed the trolls" sign? ;)
Every once in a while they make me want to swat them like flies. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
Reply by RobertMacy May 28, 20142014-05-28
On Wed, 28 May 2014 10:34:48 -0700, Jim Thompson  
<To-Email-Use-The-Envelope-Icon@on-my-web-site.com> wrote:

>> ...snip....incomprehensible tirade > ,,,snip....righteous indignation > ...Jim Thompson
You must have missed the "Do not feed the trolls" sign? ;)
Reply by RobertMacy May 28, 20142014-05-28
On Wed, 28 May 2014 10:26:48 -0700, Jim Thompson  
<To-Email-Use-The-Envelope-Icon@on-my-web-site.com> wrote:

>> ...snip... > "Speed kills"... in a simulator you can trade accuracy for speed. I > tend to use a max timestep equal to 1/(32*Fmax). > > "Patience is a virtue" >:-} > > ...Jim Thompson
I don't know what Mike Engelhardt did inside that LTspice but it is a 'screamer'! for example, using the built-in models with graphics is usually ten times faster than using the same models, but spelling them out, in a *.cir old style entry. Mike said the noise modeling inside ALL the Linear OpAmps in the LTspice library are accurate! Which appeared to be true on the ones I checked. Even had the 1/f contributions in there! Only downside is the noise values are 'typical' ;)