[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Spice noise analysis



Al Davis wrote:

You've touched on something I'd like to see.  As far as I
know, none of the free tools (ngspice/tclspice/gnucap) can do
either a periodic steady state (PSS) analysis or periodic
noise analysis (need pss first for this).  I wonder how hard
it would be to add these.  My understanding is that for a PSS
analysis the algorithm is basically

  - run normal transient sim for 1 period.
  - compare state at end of the period with state at the
beginning of the period
  - compute new guess as to what the state should be in a
periodic steady state solution
  - repeat until ending state == starting state to within
some convergence criteria.


I forgot to mention, I believe this is called "shooting methods". Seem to recall a Kundert tutorial paper on this somewhere.


It looks fairly easy, but I am swamped.

I think you can get close to that now. In gnucap, you can run a transient analysis for some time, stop it, change some settings, and continue where it left off. Spice doesn't do this.

For what you want, consider this:

Start the transient analysis with normal settings. Let it run for a couple of cycles. Then stop it.

Change it to Euler differentiation, which disables truncation error as a step control mechanism, set the time steps very coarse, maybe only twice the Nyquist rate. You really want a first order method here. In this case, it is more accurate than higher order methods. Run it for a bunch of cycles, until it reaches steady state. Stop it. This step is the equivalent of your "compute new guess" step.

Change the settings back to high accuracy, with tight tolerances and trapezoidal differentiation. Run for maybe two cycles to confirm it is in steady state. Then do your Fourier analysis.

Some option settings will cause time to reset, messing up this method, but I can probably change it, and likely will for the next official release.

that is pretty cool. I've used a similar technique (changing convergence tolerances) with some commercial spice-like simulators, but I've always had many issues and had to jump through hoops to get the tool to do what I wanted.


-Dan