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

Re: gEDA-user: Spice noise analysis



John Doty wrote:
In ngspice/tclspice use something like:

noise v(vout) v3 dec 1 100k 10meg 1

v(out) is the point for output noise assesment
v3 is the source relative to which input noise is calculated
dec means do it by decades
1 means one point per decade
100k means start at 100 kHz
10meg means end at 10 MHz
1 means record source contibutions at each point

Then do "print all": that'll tell you the values, in
V^2/Hz. inoise_spectrum is the total input referred noise, onoise_spectrum
is the total output referred noise, and the other onoise* are the noise
contributions broken down by elementary component and physical noise
source. To get the total from a subcircuit, you need to add up all its
component noise contributions, or (probably easier here) subtract
contributions from components you aren't assessing. It may also be useful
to set resistor temps to zero for resistors whose noise you don't want to
assess.

To just plot input or output noise, leave out the last argument, and throw
in more points:

noise v(vout) v3 dec 10 100k 10meg

Then you'll only get inoise_spectrum and onoise_spectrum.

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.

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.

-Dan