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

Re: gEDA-user: Spice noise analysis



John Doty wrote:
> > Beware that this is linear analysis around your DC
> > operating point. Dynamic noise sources associated with
> > changing operating points are not evaluated. You can get
> > some of these by careful use of initial conditions to
> > evalate noise at particular operating points (say, if your
> > Shottkys turn on at some particular phase of input signal
> > and make shot noise), but you'll have to then assess the
> > system effect of such modulated noise by other means. SPICE
> > can't handle things like clock jitter and capacitor
> > switching ("kTC") noise at all, so in general SPICE noise
> > analysis is only part of a total noise assessment.

Although this is not one of the features of gnucap, it is one of 
the reasons gnucap exists.  Gnucap was designed to provide an 
expandable base, in which extras like this can be done.  A long 
time ago, I realized that we needed to move beyond Spice, and 
that a new simulator was needed to do this.  The simulator 
needs to evolve to meet new needs.  The architecture of Spice 
is holding us back.

On Thursday 04 August 2005 10:43 pm, Dan McMahill 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.
>
> Why would I care about PSS analysis?  It supposedly converges
> faster to a periodic steady state solution than running a
> transient analysis with enough periods to reach steady state.
>  Now you can get things like RF amplifier distortion, mixer
> distortion, etc.
>
> Once you have this, I think its probably not too bad to add
> the periodic noise analysis.

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.