Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!decvax!decwrl!sun!gravity!klein From: klein%gravity@Sun.COM (Mike Klein) Newsgroups: comp.lsi Subject: Re: SPICE time-step too small Message-ID: <16921@sun.uucp> Date: Fri, 17-Apr-87 14:05:01 EST Article-I.D.: sun.16921 Posted: Fri Apr 17 14:05:01 1987 Date-Received: Sun, 19-Apr-87 12:51:18 EST References: <8704151403.AA16347@decwrl.dec.com> <6654@philabs.UUCP> Sender: news@sun.uucp Reply-To: klein@sun.UUCP (Mike Klein) Organization: Sun Microsystems, Mountain View, CA Lines: 42 In article <6654@philabs.UUCP> nje@philabs.UUCP (Norman J. Elias) writes: > >You will also encounter convergence problems if the input driving signal >changes too rapidly, for example a PULSE input with rise-time less than >the stepsize specified in the .tran statement. What happens is that SPICE >steps over the pulse edge and encounters an apparent discontinuity in the >input signal. The SPICE time-step reduction algorithm merely jumps the >time-point back and forth around the discontinuity and the algorithm never >converges. Seems to be a common misconception... the time step given on the .TRAN line has nothing to do with the internal time steps that SPICE takes. It only governs the print and plot increments on transient output. The fast rise time causing SPICE to scale back its time step that Norman mentions is something that occurs commonly in most simulations, and the algorithm is designed to (ideally) handle it just fine. If for any reason the Newton-Raphson iterations at a chosen time point don't converge in an acceptable number of iterations, the time step is scaled back, and the Newton-Raphson iterations start again at that time point. The simulator will keep scaling back the time step until either it achieves convergence or the time step has shrunk below a certain number. This number is defaulted to something pretty small (typically about 10e-14 or 10e-15 seconds), and may be overridden by some parameters on some versions on SPICE (I forget the magical incantations, but numerous articles on this subject have explained how to do this). It is unusual, although it does happen, that a fast-rising but realistic input waveform alone forces SPICE into nonconvergence. You would need a signal that has a rise time of, say, 10e-13 seconds. Note that after each convergence at a time point, the integration algorithm does a check to see whether its estimate of the local truncation error (LTE), due to the approximation inherent in the numerical integration method used, is acceptable. If the LTE is very low, the simulator will increase its step size. Thus it is almost certain that after the circuit has settled, and the simulator is taking big time steps with low LTEs, that the next change in input stimulus will cause it to scale back its time steps many times until it finally converges. -- Mike Klein klein@sun.{arpa,com} Sun Microsystems, Inc. {ucbvax,hplabs,ihnp4,seismo}!sun!klein Mountain View, CA