PSpice Ideal Diode ... and Crash

I recently had a need for an ideal diode. When I found one and used it, I got results that worked great in one circuit and crashed PSpice in another circuit. I've had convergence problems before, but never a crash.

I found a model for an ideal diode at this MIT site:

formatting link

I used PSpice's Model Editor to invoke the .model statement from the above site. To test the diode, I connected it in series with a 10Vpk sine wave and a 5-ohm resistor. It worked great: only 1 mV drop at the peak, and exact tracking of the sine wave at any point where the voltage was non-negative. Okay, I thought, let's try it in the circuit where I need it.

I put the diode in series with a 15V source and the circuit powered by that source. (The circuit alway converged before adding the diode.) When I ran the simulation, I got two kinds of errors at different times:

  1. Divide by zero error at the diode.
  2. A crash in which PSpice announced it couldn't communicate with the server. Then I couldn't get Probe to stop running. Forcing it to close using Windows Task Manager still left some remnant running so that I couldn't get Capture to transfer to PSpice AD. The only way to get past the problem was to reboot the (Windows 2000) computer.

Any help would be appreciated. Thanks.

Reply to
Bob Penoyer
Loading thread data ...

Is there any resistance in series with the "diode", any capacitance in parallel... CJ0 defaults to zero when not specified... not a good idea.

Do you perchance have two (or more) versions of PSpice installed?

Capture == GROAN :-(

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       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 removed the diode from its series connection with the +15V source. Then I connected the diode from +15V to ground through a 1K resistor. Same problem.

I get this information in PSpice AD's status window:

Divide by Zero in device D_D11, Divide(2.38823e-005) INTERNAL ERROR -- Divide by Zero in device D_D11, Divide(2.38823e-005) Run aborted Disk write error. The disk may be full. I/O ERROR -- Disk write error. The disk may be full. Run aborted

The last 3 lines above continue to repeat until I get a window that says Simulation Error: The RPC server is unavailable.

Then I can't close PSpice AD.

Only rebooting or logging off and back on lets me run PSpice successfully again.

No. I'm using one of the "seats" that the license allows.

I understand, but Capture is what I learned on, so that's what I use.

Reply to
Bob Penoyer

formatting link

I'm not sure why. The MIT site did it. What's the problem?

In any case, I used a single .model statement in Model Editor which is pretty common.

Reply to
Bob Penoyer

"Bob Penoyer" schrieb im Newsbeitrag news: snipped-for-privacy@4ax.com...

formatting link

Hello Bob,

This model uses an extreme low value of N=0.001 in the diode model. The diode equation looks like

Id = Is*exp(V/(N*Vt))

It's obvious that this small value of N can cause very big exponents if the equation solver in SPICE makes too big steps. This can lead to a math overflow. Neverthess a good program shouldn't crash in this case. You could also try with a bigger value like N=0.005 or maybe adding a small series resistance parameter RS=0.01 may help.

Btw, it's nonsense to make a subcircuit around a simple .model statement.

Other SPICE programs may or may not have problems with this extreme paramter value. It's just a question if the programmers had such values in mind or not. LTspice works with this diode model.

I recommend you send your test case to Cadence and ask for "bug" fix.

Best regards, Helmut

The model from the link above.

************************************************************************ **** diode_ideal (approximates ideal diode) **** ************************************************************************ ..subckt diode_ideal 1 2 D12 1 2 diode_ideal ..model diode_ideal D (N=0.001) ..ends diode_ideal *******************************************************
Reply to
Helmut Sennewald

"Bob Penoyer" schrieb im Newsbeitrag news: snipped-for-privacy@4ax.com...

formatting link

Hello Bob,

I haven't said it doesn't work with the .subckt, but it's not necessary. It has the drawback that SPICE eventually makes a bigger matrix.

Best regards, Helmut

Reply to
Helmut Sennewald

[snip]
[snip]

Make sure there isn't more than one version on your machine. That'll screw you up every time.

From support...

"The problem you have mentioned in your email regarding the simulation error is something that can be caused if the user has multiple versions on the system or he still has old version entries in the environment variables and registry. This happens only with Capture and not with PSpice Schematics."

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

Okay, Helmut. Thanks.

Reply to
Bob Penoyer

This is very interesting. I'm sure (I think...) that I uninstalled anything related before installing. Maybe I should go through the process again.

Reply to
Bob Penoyer

Might be worth a try, but I did previously post some bugs in 9.x that were fixed in 10.x that looked like possible culprits.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       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.