Hello everyone. How can I simulate Noise figure an...
# analog-design
w
Hello everyone. How can I simulate Noise figure and OIp3 with NgSpice?
t
At least for noise figure, I use something like this:
Copy code
noise V(VBGP) VVDDA oct 10 0.1 10 1
let vn = sqrt(onoise_total)
The arguments for
noise
you can look up in the ngspice manual. The important thing is to understand that running the
noise
analysis creates this (non-obvious) value
onoise_total
, that you need to take the square root of it, and the final value is then in volts RMS.
πŸ‘€ 1
h
I am not sure what the more obvious value is in terms of noise (as it is a stochastic signal) πŸ™‚ V/sqrt(Hz) seems strange, too Anyway, the behavior can be changed with
set sqrnoise
or
unset sqrnoise
according the ngspice manual.
For calculating NF or other noise simulations the spectral view is usually more helpful than the integrated value.
For OIP3 take two sinusoidal input signals, run a transient long enough to contain one beat frequency-time plus settling (so ca. 1.5/f_beat), then take an FFT on the output signal of interest and calculate the OPI3 from there. Make sure that the OIM3 products stick out of the FFT noise floor sufficiently.
πŸ‘€ 1
r
I once used something like this to simulate noise figure for a LNA. It uses the inoise (input referred noise) variable. The details can be found in the noise analysis section of ngspice manual.
w
Thank you for the answers.
@Rana Muhammad Shahid Jamil what would that 8.3e-19 value be?
h
That would be the noise of the source at the input: u_in^2/df = 4 k T R with T=300K and R=50Ohm, k=Bomtzmann constant
πŸ‘ 1
w
So, this value is considering the 50 ohm source resistance?
I think I understood @Harald Pretl. Thank you so much!
h
The noise figure is NF = 10 log (total_noise / noise_from_input). You can calculate this either input- or output-referred. Most fundamental definition is NF = SNR_in / SNR_out; you can derive the rest from this.
πŸ™ŒπŸΌ 1
w
I understood. Thanks for clarify with your detailed explanation.