Menu

#68 measure sweeping the temperature

v1.0 (example)
open
nobody
None
2
2023-12-08
2023-12-07
roberto
No

I am sweeping the tempareture and i wouzld like to get a measure of the signal.
I have a bandgap reference and i would like to measure the maximum value of bandgap voltage, sweeping the temperature.
.measure dc ymax MAX v(vbg) from=-40 to=150

But i get this error
Error: no such vector as time, frquency or v-sweep.

Error: measure ymax max v(vbg) : out of interval
meas dc ymin max v(vbg) from=-40 to=150 failed!

Discussion

  • Giles Atkinson

    Giles Atkinson - 2023-12-07

    In that line, there is nothing to tie the numbers -40,150 to temperature. I think they will be treated as DC voltages. Manual 1.3,2 shows temperature sweeping, is that what you are using?

    It may be that after such a sweep, the values in .measure should be automatically applied to temperature , but that is not happening. That would be a bug, and bugs must usually be reproduced as a first step. So please post a complete netlist that demonstrates the problem.

    Meanwhile, you should be able to do the measurement with scripting, by adding a .control section to the netlist.

     

    Last edit: Giles Atkinson 2023-12-07
    • roberto

      roberto - 2023-12-07

      Here the netlist. for transient it works fine.

       
  • Giles Atkinson

    Giles Atkinson - 2023-12-07

    Thanks, someone will take a look. If me, it may take a few days.

     
  • Holger Vogt

    Holger Vogt - 2023-12-07

    Currently only
    meas dc ...
    with scale vector v-sweep is supported (no i-sweep, res-sweep, nor temp-sweep).

    I will have a look if this may be enhanced without too much effort, so to become available in ngspice-42.

     
  • Holger Vogt

    Holger Vogt - 2023-12-07

    I have got a fix, and its output is

    ******
    ** ngspice-41+ : Circuit level simulation program
    ** Compiled with KLU Direct Linear Solver
    ** The U. C. Berkeley CAD Group
    ** Copyright 1985-1994, Regents of the University of California.
    ** Copyright 2001-2023, The ngspice team.
    ** Please get your ngspice manual from https://ngspice.sourceforge.io/docs.html
    ** Please file your bug-reports at https://ngspice.sourceforge.io/bugrep.html
    ** Creation Date: Dec  7 2023   23:23:03
    ******
    Start finished after 0.12 seconds.
    
    Note: Compatibility modes selected: hs a
    
    Warning: m=xx on .subckt line will override multiplier m hierarchy!
    
    Warning: redefinition of .subckt sky130_fd_pr__pnp_05v5_w0p68l0p68, ignored
    
    Circuit: ** sch_path: /home/roberto/documents/circuits/bandgap_2/tb_bg.sch
    
    Source Deck finished after 1.59 seconds.
    option SCALE: Scale is set to 1e-06 for instance and model parameters
    Prepare Deck finished after 1.61 seconds.
    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
    
    Parse finished after 1.63 seconds.
    Using SPARSE 1.3 as Direct Linear Solver
    Device Setup finished after 1.63 seconds.
    
    No. of Data Rows : 1
    ASCII raw file "tb_bg_op.raw"
    op finished after 1.63 seconds.
    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
    
    Parse finished after 1.63 seconds.
    Using SPARSE 1.3 as Direct Linear Solver
    Device Setup finished after 1.65 seconds.
    op finished after 1.65 seconds.
    
    No. of Data Rows : 191
    ASCII raw file "tb_bg_dc.raw"
    ymax                =  1.203137e+00 at=  2.700000e+01
    ngspice 1 -> 
    

    A little more testing is due before uploading.

     
  • Holger Vogt

    Holger Vogt - 2023-12-08

    I have uploaded a fix to ngspice git branch pre-master-42.

     
  • roberto

    roberto - 2023-12-08

    Thank you very much, i will wait for the official release

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.