Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!cadence!steveg From: steveg@cadence.com (Steven Greenberg; x6231) Newsgroups: comp.lsi.cad Subject: Re: Modeling of ideal diodes in (H)spice Keywords: simulation, spice, modeling, convergence Message-ID: <1991Mar19.185326.4818@cadence.com> Date: 19 Mar 91 18:53:26 GMT References: <1991Mar16.211609.9149@zip.eecs.umich.edu> Sender: usenet@cadence.com (USENET News) Organization: Cadence Design Systems, Inc. Lines: 43 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