meas max ERROR

Help
2012-08-04
2013-06-12
  • Hansel Dsilva
    Hansel Dsilva
    2012-08-04

    .control
    run
    meas dc vha max V(vd)
    .endc
    .end

    command-line:-
    No. of Data Rows: 708
    measure 'vha' failed
    Error: measure vha (null)( TRIG):
    out of interval

    meas dc vha max v(vd) failed!

    ---Please help and suggest the error im getting

     
  • Holger Vogt
    Holger Vogt
    2012-08-04

    Hansel,

    please provide a complete input file.

    Holger

     
  • Hansel Dsilva
    Hansel Dsilva
    2012-08-04

    I solved it.

    Correct statement is= meas dc vha max v(vd) from=-3.535 to=3.535

    I had failed to specify interval. Hence, error= out of interval

    Anyways, thanks for the prompt response h_vogt.

     
  • Hansel Dsilva
    Hansel Dsilva
    2012-08-04

    I had another problem…

    .control
    run
    meas dc vha max v(vd) from=-3.535 to=3.535
    meas snm par(''0.7071*vha')
    .endc
    .end

    command-line:-
    No. of Data Rows: 708
    measure 'snm' failed
    Error: measure snm :
    no such function par(''0.7071*vha')
    meas snm par(''0.7071*vha') failed!

     
  • Holger Vogt
    Holger Vogt
    2012-08-04

    par(''0.7071*vha')
    double quote … single quote ?

    Holger

     
  • Holger Vogt
    Holger Vogt
    2012-08-04

    Please see actual manual chapt. 17.5.36:
    par('expression') not available in .control section, see suggestion for replacement.

    Holger

     
  • Hansel Dsilva
    Hansel Dsilva
    2012-08-05

    Got it

    For some reason
    meas dc|tran paramter_name param('expression')
    doesn't seem to work

    correct syntax:-
    .control
    run
    meas dc vha max v(vd) from=-3.535 to=3.535

    let value= 0.7071*vha
    print
    .endc
    .end

     
  • Hansel Dsilva
    Hansel Dsilva
    2012-08-05

    CMOS inverter char T.F: VoH VoL & VIL, VIH& PDmax
    .param vdd=5
    M1 2 1 3 3 mod1 W=10u L=1u 
    M2 2 1 0 0 mod2 W=6u L=1u //varyW= 3 4 5 6
    Vdd 4 0 dc 5

    Vdummy 4 3 dc 0
    Vin 1 0 DC vdd
    C1 2 0 10p //mod1=nmos
    .MODEL mod2 NMOS(vto=1 lambda= 0.1 gamma=0.01 kp=100u)
    .MODEL mod1 PMOS(vto=-1 lambda= 0.1 gamma=0.01  kp=50u)
    .DC Vin 0 5 0.1
    .control
    run
    echo "code written by:- Hansel Dsilva"
    echo ""

    *to find:- Pmax
    plot i(Vdummy)*5
    let pmax1= i(Vdummy)*5
    print pmax1
    .endc
    .end

    // what i wanted to write in last 6 lines was:-
    meas dc Pmax param('i(Vdummy*5)')

    or
    meas dc Pmax pmax1

    But, both seem not to work. Please help.

     
  • Holger Vogt
    Holger Vogt
    2012-08-05

    A quick solution is

    *to find:- Pmax
    plot i(Vdummy)*vddc
    let pmax1= i(Vdummy)*vddc
    print pmax1
    let pmax2=vecmax(pmax1) ; manual 17.2
    print pmax2
    .endc

    I still have to check the 'meas' command.

    Holger

     
  • Holger Vogt
    Holger Vogt
    2012-08-05

    The approprite measure statements are:

    meas dc pmax3 max_at pmax1 from=0 to=5

    or

    meas dc pmax3 max pmax1 from=0 to=5

    Holger

     
  • Holger Vogt
    Holger Vogt
    2012-08-05

    There is now an update to the git source code of ngspice, enabling 'meas dc' without need to specify 'from' and 'to'. If not specified, the whole dc range is used for meas.

    Holger