Connect with us

PSpice Ideal Diode ... and Crash

Discussion in 'CAD' started by Bob Penoyer, Oct 13, 2005.

Scroll to continue with content
  1. Bob Penoyer

    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/Ele...-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.
     
  2. Jim Thompson

    Jim Thompson Guest

    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
     

  3. 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
    *******************************************************
     
  4. Bob Penoyer

    Bob Penoyer Guest

    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.
     
  5. Bob Penoyer

    Bob Penoyer Guest

    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.
     
  6. 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
     
  7. Jim Thompson

    Jim Thompson Guest

    [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
     
  8. Bob Penoyer

    Bob Penoyer Guest

    Okay, Helmut. Thanks.
     
  9. Bob Penoyer

    Bob Penoyer Guest

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

    Jim Thompson Guest

    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
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-