Recently I am trying to use the meas command to measure the graph.
But I face the problem in meas command. I wan to measure the inoise_spectrum but it come out with error.
Error: measure limited to tran, dc, sp, or ac analysis
meas noise anom find inoise_spectrum at=1.8g failed!
this error shows that there is still no noise measurement for the command. Is there anyway that I can measure the point from the graph without manually measurement?
you may do it with a script (example see below).
RES_NOISE.CIR - NOISE ANALYSIS: RESISTOR DIVIDER, AMP, AND LP FILTER
*frequency of interest
*parameter freq is handed over to control section
.csparam freq = 1.1MEG
* RESISTOR DIVIDER
V1 1 0 AC 1 DC 5
R1 1 2 100K
R2 2 0 100K
* AMP AND LP FILTER
EAMP 3 0 2 0 1
RLP1 3 4 100
CLP1 4 0 1.59NF
.NOISE V(4) V1 DEC 5 100 100MEG
.PRINT NOISE ONOISE
plot noise1.inoise_spectrum noise1.onoise_spectrum
print noise2.inoise_total noise2.onoise_total
*** script to read a specific y-value if x given
* find index where freqency is just above interesting value
let nn = 0
while frequency[nn] < freq
let nn = nn + 1
* define vectors of frequncies and values just above and below
* selected frequeny
let fnn = frequency[nn]
let nn1 = nn - 1
let fnn1 = frequency[nn1]
let snn = onoise_spectrum[nn]
let snn1 = onoise_spectrum[nn1]
*print vector values
echo nn = "$&nn" fnn = "$&fnn" snn = "$&snn"
echo nn1 = "$&nn1" fnn1 = "$&fnn1" snn1 = "$&snn1"
*linear interpolation for exact frequency
let newsnn = snn1 + (snn - snn1)/(fnn - fnn1)*(freq - fnn1)
echo newfnn = "$&freq" newsnn = "$&newsnn"
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.