NE-2 I-V Curve ??

Mar 16, 2014 127 Replies

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?

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.

If it isn't doing what you want it to, what would you call it?
[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.

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

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

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

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
[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.

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

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.

...snip... 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

yes, it seems TI purposely causes trouble for LTspice, to encourage the use of TINA.

On most of those, I simply use a PWL as the power supply, usually works.

As you know I'm building a business making models that work properly, match the real device (or at least the data sheet), and a number of TI parts are on the wish list... not only because the models are obtuse, but many new ones are encrypted. ...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.

Well, good luck then...

I've just sold my first major manufacturer modeling job. So your good wishes paid off ;-) ...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.

I've never had to do that, but I'm running it under wine which may make a difference.

0000000 56 65 72 73 69 6f 6e 20 34 0a 53 48 45 45 54 20 V e r s i o n sp 4 nl S H E E T sp 0000020 31 20 31 33 38 38 20 36 38 30 0a 57 49 52 45 20 1 sp 1 3 8 8 sp 6 8 0 nl W I R E sp 0000040 34 39 36 20 2d 31 36 30 20 2d 38 30 20 2d 31 36 4 9 6 sp - 1 6 0 sp - 8 0 sp - 1 6 0000060 30 0a 57 49 52 45 20 33 38 34 20 2d 31 34 34 20 0 nl W I R E sp 3 8 4 sp - 1 4 4 sp 0000100 33 35 32 20 2d 31 34 34 0a 57 49 52 45 20 2d 38 3 5 2 sp - 1 4 4 nl W I R E sp - 8
Neither the pheasant plucker, nor the pheasant plucker's son. --- news://freenews.netfront.net/ - complaints: news@netfront.net ---

In other words, it works better if _you_ turn it on :)

Neither the pheasant plucker, nor the pheasant plucker's son. --- news://freenews.netfront.net/ - complaints: news@netfront.net ---

That's a good catch, thanks. :-) I've been having the same kind of problem with Notepad and LTspice, but instead of trying to solve it I just worked around it using Word.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required