NE-2 I-V Curve ??

--
We're not talking about Jim's version, we're talking about why you 
seem to be having trouble with LTspice native library parts.
Reply to
John Fields
Loading thread data ...

Having trouble?

Sometimes LT Spice converges very slowly. It's not the parts so much as it's Spice itself. Usually you can fiddle with sim params or values to get it to run faster, but I haven't found a predictable way to do that.

I wish there was a min time step setting, or better yet a fixed time step setting.

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation
Reply to
John Larkin

Same circuit, 150 volts, 1 megohm, 10 nF.

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation
Reply to
John Larkin

There are in Spice variants you pay for. I think there's a way in LTspice, also, to set Tstepmax, but I'll leave it up to you to find it

...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   Skype: Contacts Only  |             | 
| 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 to
Jim Thompson

I really wish you guys would just put a potato in your shorts or whatever it takes to make you feel confident enough to lay off this crapola.

Hint: put the potato in the front, not the back.

Cheers

Phil Hobbs

Reply to
Phil Hobbs

I'd like to know how to get LT Spice to quit saying "Stepping source 12 gazillion N-R iterations 165 fill-ins" for minutes at a time, and just get on with it. Hitting esc a couple of times often works, but it's silly.

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation
Reply to
John Larkin

What a setup... Larkin's "potato" is clearly in the back... of his diaper >:-} ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   Skype: Contacts Only  |             | 
| 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 to
Jim Thompson

OK, let me elaborate. As you said, SPICE (or anything based on numerical integration) has issues with functions which are discontinuous or have undefined derivatives at certain points. To that effect, convergence and simulation speed can be improved by smoothing out the transfer function. One could theoretically achieve any degree of simulation speed improvement by "ironing out" the transfer function with a progressively heavier hand. However, it appears to me that the transfer function of an NE-2 has an actual discontinuity in it (or at least something that looks an awful lot like a discontinuity), and therefore that if you speed up simulation too much, you throw the essence of the device out with the bath water. So my question was which side are you aiming for? Are you trying to make a highly accurate model that runs as fast as it can under the circumstances, or the fastest model which is as accurate as it can be under the circumstances?

Reply to
Ralph Barone

Yes ;-)

See...

for possibilities. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   Skype: Contacts Only  |             | 
| 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 to
Jim Thompson

--
Works fine for me...
Reply to
John Fields

--
If it isn't doing what you want it to, what would you call it?
Reply to
John Fields

--
Ask Helmut.
Reply to
John Fields
[snip]

It usually _is_ the parts, or rather, the model/subcircuit of the part... discontinuities with no derivatives... the very topic I've been harping about... making better models.

LTspice runs faster because, by default, the .TRAN command leaves off filling in the "Maximum Timestep" amount. Thus, on an "active" circuit with a parasitic oscillation, it skips over that "grass" and _you_ think your circuit is gorgeous and you chide me when I point out that it's oscillating, claiming I'm wrong... your standard retort... when you're wrong, claim the truth is wrong :-(

What you seek is right under your nose...

_Simulate | Edit Simulation Cmd | Transient | [Maximum Timestep] ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   Skype: Contacts Only  |             | 
| 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 to
Jim Thompson

ISTR that just makes the plot window catch up with the transient.

There's a list of convergence suggestions at

formatting link
. It points out that the source stepping mode uses short time steps in order to make the capacitances dominate the impedance, so that everything starts up smoothly from zero.

You can set a minimum capacitance from each node to ground

.options cshunt=10f

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

I don't think the library parts have problems. Sometimes Spice converges slowly. I don't use it often enough that hitting esc now and then is a big deal. When I esc out of the initial convergence stall, the rest of the sims seem fine.

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation
Reply to
John Larkin

Sometimes that helps, often it doesn't. What I really want is a *minimum* time step. The convergence hangup is almost always at the beginning of a transient run; once that's over, after a while or after a couple of esc hits, the rest runs fine.

If the RC neon thing is oscillating at the beginning of the run, it's not real.

It's no big deal; I don't design many neon oscillators.

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation
Reply to
John Larkin

Ah, I see--it depends on what the solver is doing at the moment. Usually when mine get hung up it's early in the damped pseudo-transient stage, where that doesn't help.

A lot of TI's op amp models don't play at all well in LTspice--try the OPA140, for instance. None of the tricks on the webpage below help that one at all, whereas it converges instantly with an LM358 macromodel (fwiw).

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs
[snip]

Easy to see why...

.MODEL S_VSWITCH_1 VSWITCH (RON=1 ROFF=100MEG VON=100M VOFF=-100M) .MODEL S_VSWITCH_2 VSWITCH (RON=1 ROFF=100MEG VON=100M VOFF=-100M) .MODEL S_VSWITCH_3 VSWITCH (RON=1 ROFF=10MEG VON=100M VOFF=-100M) .MODEL S_VSWITCH_4 VSWITCH (RON=1 ROFF=10MEG VON=100M VOFF=-100M) .MODEL S_VSWITCH_5 VSWITCH (RON=10M ROFF=100MEG VON=150 VOFF=0) .MODEL S_VSWITCH_6 VSWITCH (RON=10M ROFF=100MEG VON=150 VOFF=0) .MODEL S_VSWITCH_7 VSWITCH (RON=1M ROFF=10MEG VON=-10M VOFF=0) .MODEL S_VSWITCH_8 VSWITCH (RON=1M ROFF=10MEG VON=10M VOFF=0) .MODEL S_VSWITCH_9 VSWITCH (RON=1 ROFF=10MEG VON=1 VOFF=-1) .MODEL S_VSWITCH_10 VSWITCH (RON=1 ROFF=10MEG VON=1 VOFF=-1) .MODEL S_VSWITCH_11 VSWITCH (RON=1 ROFF=1G VON=10 VOFF=-10) .MODEL S_VSWITCH_12 VSWITCH (RON=1 ROFF=1G VON=10 VOFF=-10) .MODEL S_VSWITCH_13 VSWITCH (RON=1 ROFF=1G VON=10 VOFF=-10) .MODEL S_VSWITCH_14 VSWITCH (RON=1 ROFF=1G VON=10 VOFF=-10)

Whoever writes TI's models doesn't know how to apply bounding conditions except with a switch.... all those switches cause static convergence problems.

You could substitute Mike's TANH-based switch and see if that helps.

Of course the model works quite well in PSpice in spite of those switches >:-}

Often what works around all these obstacles is to have your power supply be a pulse- or PWL-based source... start up from zero (in a .TRAN situation) seems to work every time. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   Skype: Contacts Only  |             | 
| 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 to
Jim Thompson

Not with that mess, it doesn't. It toddles along till the power supply starts to ramp, and then pukes.

The VSWITCH device has a gradual turn-on of some sort as well.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

Have you tried forcing a maximum timestep?

Also, I think LTspice supports gmin stepping... which is well worth trying. (I tend to make gmin stepping my default method.) ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   Skype: Contacts Only  |             | 
| 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 to
Jim Thompson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.