[comp.lsi.cad] Modeling of ideal diodes in

ayman@eecs.umich.edu (03/13/91)

I am trying to simulate a circuit in Hspice, where all diodes are modeled by
a switched voltage source in series with a resistor.

        _______ \__________/\/\/\/\/\______
        +                     Rd           |              switches closes when
                                           |              Vd becomes greater
        Vd                             ----+----  Vi      than Vi
                                          ===
        -                                  |
        -----------------------------------+

I tried the voltage-controlled resistor switch (Rd = 1M for Vd < Vi, Rd = 100
for Vd > Vi), but the dc solution didn't converge.
Any suggestions on how to make the solution converge? Or, are there other ways
to model the diodes to get a convergent solution?
Thanks.

--------------------------------------------
- Ayman I. Kayssi (ayman@eecs.umich.edu)   -
- Advanced Computer Architecture Lab.      -
- EECS Dept., Univ. of Michigan, Ann Arbor -
--------------------------------------------

steveg@cadence.com (Steven Greenberg; x6231) (03/20/91)

In article <1991Mar16.211609.9149@zip.eecs.umich.edu> ayman@eecs.umich.edu writes:
>I am trying to simulate a circuit in Hspice, where all diodes are modeled by
>a switched voltage source in series with a resistor.
>
>        _______ \__________/\/\/\/\/\______
>        +                     Rd           |              switches closes when
>                                           |              Vd becomes greater
>        Vd                             ----+----  Vi      than Vi
>                                          ===
>        -                                  |
>        -----------------------------------+
>
>I tried the voltage-controlled resistor switch (Rd = 1M for Vd < Vi, Rd = 100
>for Vd > Vi), but the dc solution didn't converge.
>Any suggestions on how to make the solution converge? Or, are there other ways
>to model the diodes to get a convergent solution?
>Thanks.
>
>--------------------------------------------
>- Ayman I. Kayssi (ayman@eecs.umich.edu)   -
>- Advanced Computer Architecture Lab.      -
>- EECS Dept., Univ. of Michigan, Ann Arbor -
>--------------------------------------------


Piece-wise linear circuits like this (especially with very coarse
pieces) are not too friendly to Spice's Newton-Raphson non-linear
equation solving algorithm.  The problem is that the resistance in one
segment is not a good predictor of the behavior of the component when
it switches segments.  Newton-Raphson depends on the predictive nature
of the derivative (resistance).

You might need to give Spice a large number of iterations to find the
answer.  Unfortunately, piece-wise-linear circuits can go into
oscillations in the Newton-Raphson solver so that no amount of iterations
would be sufficient.

By the way, the switch as you have described it has about a microamp
of negative current at zero volts.  You might want to add a parallel
current source to cancel out this current.  This current may or may not
matter in your circuit.

/Steve