Meas command for Noise

Help
wjlim
2013-01-22
2013-06-12
  • wjlim

    wjlim - 2013-01-22

    Hi all,
    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?

    thanks.

    Regards
    WJLIM

     
  • Holger Vogt

    Holger Vogt - 2013-01-22

    WJLIM,

    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
    .control
    run
    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
    setplot noise1
    let nn = 0
    while frequency[nn] < freq
      let nn = nn + 1
    end
    * 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"
    echo 
    .endc
    .END
    

    Holger

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks