PSpice Ideal Diode ... and Crash

B

Bob Penoyer

Guest
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:
http://ocw.mit.edu/NR/rdonlyres/Electrical-Engineering-and-Computer-Science/6-334Spring2003/56F6E619-0B02-424D-AC10-88D1AC4AB3E1/0/idealdiode.lib

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.
 
On Wed, 12 Oct 2005 21:10:12 -0700, Bob Penoyer
<bob@NOSPAMbobpenoyer.com> wrote:

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:
http://ocw.mit.edu/NR/rdonlyres/Electrical-Engineering-and-Computer-Science/6-334Spring2003/56F6E619-0B02-424D-AC10-88D1AC4AB3E1/0/idealdiode.lib

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.
Is there any resistance in series with the "diode", any capacitance in
parallel... CJ0 defaults to zero when not specified... not a good
idea.

2. A crash in which PSpice announced it couldn't communicate with the
server.
Do you perchance have two (or more) versions of PSpice installed?

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.
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.
 
"Bob Penoyer" <bob@NOSPAMbobpenoyer.com> schrieb im Newsbeitrag
news:tilrk1d2orvu4m088eaamp87p3111nq9g4@4ax.com...
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:
http://ocw.mit.edu/NR/rdonlyres/Electrical-Engineering-and-Computer-Science/6-334Spring2003/56F6E619-0B02-424D-AC10-88D1AC4AB3E1/0/idealdiode.lib

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
*******************************************************
 
On Thu, 13 Oct 2005 07:44:26 -0700, Jim Thompson
<thegreatone@example.com> wrote:

On Wed, 12 Oct 2005 21:10:12 -0700, Bob Penoyer
bob@NOSPAMbobpenoyer.com> wrote:

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.

Is there any resistance in series with the "diode", any capacitance in
parallel... CJ0 defaults to zero when not specified... not a good
idea.
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.

2. A crash in which PSpice announced it couldn't communicate with the
server.

Do you perchance have two (or more) versions of PSpice installed?
No. I'm using one of the "seats" that the license allows.

Capture == GROAN :-(
I understand, but Capture is what I learned on, so that's what I use.
 
On Thu, 13 Oct 2005 21:43:17 +0200, "Helmut Sennewald"
<helmutsennewald@t-online.de> wrote:

"Bob Penoyer" <bob@NOSPAMbobpenoyer.com> schrieb im Newsbeitrag
news:tilrk1d2orvu4m088eaamp87p3111nq9g4@4ax.com...
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:
http://ocw.mit.edu/NR/rdonlyres/Electrical-Engineering-and-Computer-Science/6-334Spring2003/56F6E619-0B02-424D-AC10-88D1AC4AB3E1/0/idealdiode.lib


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.
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.
 
"Bob Penoyer" <bob@NOSPAMbobpenoyer.com> schrieb im Newsbeitrag
news:mr7uk1tpvql5heis85f9jmo23co6ae5fk7@4ax.com...
On Thu, 13 Oct 2005 21:43:17 +0200, "Helmut Sennewald"
helmutsennewald@t-online.de> wrote:

"Bob Penoyer" <bob@NOSPAMbobpenoyer.com> schrieb im Newsbeitrag
news:tilrk1d2orvu4m088eaamp87p3111nq9g4@4ax.com...
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:
http://ocw.mit.edu/NR/rdonlyres/Electrical-Engineering-and-Computer-Science/6-334Spring2003/56F6E619-0B02-424D-AC10-88D1AC4AB3E1/0/idealdiode.lib


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.

I'm not sure why. The MIT site did it. What's the problem?
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.

In any case, I used a single .model statement in Model Editor which is
pretty common.
Best regards,
Helmut
 
On Thu, 13 Oct 2005 19:57:30 -0700, Bob Penoyer
<bob@NOSPAMbobpenoyer.com> wrote:

On Thu, 13 Oct 2005 07:44:26 -0700, Jim Thompson
thegreatone@example.com> wrote:

[snip]

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

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

[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.
 
On Fri, 14 Oct 2005 07:26:45 +0200, "Helmut Sennewald"
<helmutsennewald@t-online.de> wrote:

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

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

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.
Okay, Helmut. Thanks.
 
On Fri, 14 Oct 2005 07:50:59 -0700, Jim Thompson
<thegreatone@example.com> wrote:

On Thu, 13 Oct 2005 19:57:30 -0700, Bob Penoyer
bob@NOSPAMbobpenoyer.com> wrote:

On Thu, 13 Oct 2005 07:44:26 -0700, Jim Thompson
thegreatone@example.com> wrote:

[snip]

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

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

[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."
This is very interesting. I'm sure (I think...) that I uninstalled
anything related before installing. Maybe I should go through the
process again.
 
On Sat, 15 Oct 2005 12:03:54 -0700, Bob Penoyer
<bob@NOSPAMbobpenoyer.com> wrote:

On Fri, 14 Oct 2005 07:50:59 -0700, Jim Thompson
thegreatone@example.com> wrote:

On Thu, 13 Oct 2005 19:57:30 -0700, Bob Penoyer
bob@NOSPAMbobpenoyer.com> wrote:

On Thu, 13 Oct 2005 07:44:26 -0700, Jim Thompson
thegreatone@example.com> wrote:

[snip]

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

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

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

This is very interesting. I'm sure (I think...) that I uninstalled
anything related before installing. Maybe I should go through the
process again.
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.
 

Welcome to EDABoard.com

Sponsor

Back
Top