Connect with us

How to perform pole zero analysis with spice3f?

Discussion in 'CAD' started by [email protected], Jan 4, 2007.

Scroll to continue with content
  1. Guest

    I'm trying to perform pole zero analysis with spice3f.
    This is the circuit file:
    test
    vin 1 0 dc 0 ac 1
    r1 1 2 1
    c1 2 0 1
    r2 1 3 1
    c2 3 2 1
    ..print ac v(3)
    ..pz 1 0 3 0 VOL PZ
    ..ac dec 20 10m 10k
    ..end

    When I run Spice3F5 I always get the message:
    Error: no data saved for pole-zero analysis; analysis not run

    The user manual also tells to use the 'print all' command but supplies
    no examples of how to that.

    any help welcome

    hugo
     
  2. Guest

    Isn't the print all on the printer? if not Go back to the computer
    program look at the top left hand corner of the monitor.There should be
    a menu bar there. Go to file left click "FILE" and hit print or print
    all. If you are in the command line type PRINT ALL in the command line.
    If you are in windows go to Start, RUN, Type "print all".
     
  3. Guest

    schreef:
    this doesn't help me much further :-(


    hugo
     
  4. Jim Thompson

    Jim Thompson Guest

    I'm not familiar with Spice3f, but I'd hazard a guess that you need a
    statement of the form:

    ..print pz ...

    Read the manual ?:)

    ...Jim Thompson
     
  5. Guest

    Jim Thompson schreef:
    tried that and some variations without success
    Yes (of course)
    Maybe someone can answer my question?

    hugo
     
  6. Guest

    Looks OK in LTspice...

    Version 4
    SHEET 1 880 680
    WIRE 80 272 64 272
    WIRE 176 272 160 272
    WIRE 176 288 176 272
    WIRE 64 320 64 272
    WIRE 64 320 -32 320
    WIRE -32 336 -32 320
    WIRE 64 384 64 320
    WIRE 80 384 64 384
    WIRE 176 384 176 352
    WIRE 176 384 160 384
    WIRE 176 400 176 384
    WIRE -32 432 -32 416
    WIRE 176 480 176 464
    FLAG 176 480 0
    FLAG -32 432 0
    SYMBOL res 176 368 R90
    WINDOW 0 0 56 VBottom 0
    WINDOW 3 32 56 VTop 0
    SYMATTR InstName R1
    SYMATTR Value 1
    SYMBOL res 176 256 R90
    WINDOW 0 0 56 VBottom 0
    WINDOW 3 43 63 VTop 0
    SYMATTR InstName R2
    SYMATTR Value 1
    SYMBOL cap 160 400 R0
    SYMATTR InstName C1
    SYMATTR Value 1
    SYMBOL cap 160 288 R0
    SYMATTR InstName C2
    SYMATTR Value 1
    SYMBOL voltage -32 320 R0
    WINDOW 123 24 44 Left 0
    WINDOW 39 0 0 Left 0
    SYMATTR InstName V1
    SYMATTR Value ""
    SYMATTR Value2 AC 1
    TEXT -66 506 Left 0 !.ac dec 20 10m 10k
     
  7. : I'm trying to perform pole zero analysis with spice3f.
    [...]
    : When I run Spice3F5 I always get the message:
    : Error: no data saved for pole-zero analysis; analysis not run

    I guess my question is: Which SPICE3f5? There are scads of SPICE
    versions out there, some buggier than others. Where did you get your
    version?

    Stuart
     
  8. Guest

    Stuart Brorson schreef:
    It's a version which I installed on Debian Sarge as follows:
    apt-get install termcap-compat
    alien --to-deb spice-3f5-8mdk.i586.rpm
    dpkg -i spice_3f5-9_i386.deb

    any help appreciated

    regards,
    hugo
     
  9. : Stuart Brorson schreef:

    :> : I'm trying to perform pole zero analysis with spice3f.
    :> [...]
    :> : When I run Spice3F5 I always get the message:
    :> : Error: no data saved for pole-zero analysis; analysis not run
    :>
    :> I guess my question is: Which SPICE3f5? There are scads of SPICE
    :> versions out there, some buggier than others. Where did you get your
    :> version?
    :>
    :> Stuart
    : It's a version which I installed on Debian Sarge as follows:
    : apt-get install termcap-compat
    : alien --to-deb spice-3f5-8mdk.i586.rpm
    : dpkg -i spice_3f5-9_i386.deb

    So it's as I suspected: You just downloaded some unknown code and --
    suprise! suprise! -- it's buggy.

    Since you're a Linux head, I suggest you switch to NGSpice. It's
    open-source, available for $0.00, and is actively worked upon (and
    therefore has fewer trivial bugs like yours). Get it
    here:

    http://ngspice.sourceforge.net/

    Stuart
     
  10. Guest

    Stuart Brorson schreef:
    I'm not sure about that, as it performs AC-analysis quite well, it's
    only pole-zero analysis which gives a problem which may be caused by my
    input file or by buggy code
    I installed ngspice and it produces exactly the same error as the other
    spice-version did:
    Error: no data saved for pole-zero analysis; analysis not run
    Therefore I think there is something wrong with my circuit file, here
    it is once more:

    test
    vin 1 0 dc 0 ac 1
    r1 1 2 1
    c1 2 0 1
    r2 1 3 1
    c2 3 2 1
    ..print ac v(3)
    ..pz 1 0 3 0 VOL PZ
    ..ac dec 20 10m 10k
    ..end

    any help welcome

    hugo
     
  11. Le Thu, 04 Jan 2007 01:23:46 -0800, a écrit :
    Hi Hugo !

    I just copy/paste test.cir and run it on ng-spice. It runs !
    I suggest you to install ng-spice on your system. It is well known that
    the original spice3f5 is quite buggy.

    For further informations i suggest you to compile ngspice with xspice
    extensions (./configure .... --enable-xspice) to enable poly()
    constructions. May be other usefull extensions are required, it depends
    what are your needs with ngspice.

    Please read carrefully the output of ./configure --help in the ngspice
    package.

    Hope it helps !

    Habib
     
  12. "habib.bouaziz-viallet" <>
    schrieb im Newsbeitrag

    Hello Habib,

    What is the result of the PZ-analysis with ngspice?

    Best regards,
    Helmut
     
  13. : What is the result of the PZ-analysis with ngspice?

    Helmut,

    I think I know where you are going with your question.....

    Upon reflection, I believe that PZ analysis -- along with noise
    analysis -- is one of the things ngspice doesn't do yet. Even in
    ngspice it's still broken, if I am not mistaken. I recall trying it
    out a few years ago and not getting any answer. I haven't tried it
    recently, so things might have changed, but OTOH I have seen no
    activity about it on the development list, nor in the code (not that I
    look a lot).

    For the OP: Our suggestion is to try another SPICE program, for
    example LTSpice from Linear Tech.

    HTH,

    Stuart
     

  14. Hello Stuart,

    I wondered that Habib hasn't presented a result. It would be of interest
    to know whether PZ-analysis of SPICE calculates useful numbers for the
    discussed circuit.

    LTspice doesn't have PZ-analysis.

    Best regards,
    Helmut
     
  15. Jim Thompson

    Jim Thompson Guest

    I can recall a specialty calculator/computer in the early '70's that
    could do PZ extractions. Can't remember the name now but, IIRC, they
    were a Tek spin-off.

    ...Jim Thompson
     
  16. Guest

    habib.bouaziz-viallet schreef:
    thanks for the reply,
    I configured ngspice with --enable-xspice and installed it (make, make
    install). However when I try to simulate my circuit, only AC-analysis
    is performed correctly, concerning pole-zero analysis, I still get the
    message:
    Error: no data saved for pole-zero analysis; analysis not run

    I also tried to configure it with --enable-pzdebug the resulting
    executable however also does not work properly for pole-zero analysis
    with my circuit

    Could you please tell me which options you enabled for configuring
    ngspice. Is it also possible to show me a fragment of the result of the
    pole-zero analysis you got.

    shukran ilak wa ma3assalaama
    hugo
     
  17. Le Tue, 09 Jan 2007 23:40:10 -0800, a écrit :
    I've installed ng-spice-rework revision 17 on my debian machine.
    What is the result of ngspice --version on yours ?

    Are you sure ./configure-make-make install process worked well ?
    I have been installed ngspice with xspice enhancement and (may be) with
    other like readline ... i did not remeber exactly.

    Here the result of your test circuit :

    ******
    ** ngspice-17 : Circuit level simulation program
    ** The U. C. Berkeley CAD Group
    ** Copyright 1985-1994, Regents of the University of California.
    ** Please submit bug-reports to:
    ** Creation Date: Tue Jan 9 13:07:17 CET 2007
    ******

    Circuit: test

    ngspice 32 -> run
    Doing analysis at TEMP = 300.150000 and TNOM = 300.150000

    No. of Data Rows : 121

    No. of Data Rows : 1
    ngspice 33 -> print all
    pole(1) = -2.61803e+00,0.000000e+00
    pole(2) = -3.81966e-01,0.000000e+00
    zero(1) = -3.33333e-01,0.000000e+00

    Habib
     
  18. Guest

    habib.bouaziz-viallet schreef:
    Hello Habib,
    Until now I always used ngspice like this
    ngspice <complete_spice_input_file

    I think you use it interactively and not in batch-mode like I did until
    now.

    Do you just make a file with a netlist+title and then start ngspice
    like this?
    ngspice file_with_netlist_and_title_line.net

    This is what happens with my version:
    ngspice file_with_netlist_and_title_line

    Could you tell which commands you enter?

    regards,
    hugo
     
  19. Le Thu, 11 Jan 2007 03:59:26 -0800, a écrit :
    mmh ... ok, when i do ngspice -b your_very_simple.cir

    [email protected]:~/GNU-TOOLS/ng-spice-rework-17$ ngspice -b
    tests/polezero/test.cir Got 1 devices.
    Added device: spice2poly
    Got 0 udns.
    Got 17 devices.
    Added device: climit
    Added device: divide
    Added device: d_dt
    Added device: gain
    Added device: hyst
    Added device: ilimit
    Added device: int
    Added device: limit
    Added device: mult
    Added device: oneshot
    Added device: pwl
    Added device: sine
    Added device: slew
    Added device: square
    Added device: summer
    Added device: s_xfer
    Added device: triangle
    Got 0 udns.
    Got 26 devices.
    Added device: adc_bridge
    Added device: dac_bridge
    Added device: d_and
    Added device: d_buffer
    Added device: d_dff
    Added device: d_dlatch
    Added device: d_fdiv
    Added device: d_inverter
    Added device: d_jkff
    Added device: d_nand
    Added device: d_nor
    Added device: d_open_c
    Added device: d_open_e
    Added device: d_or
    Added device: d_osc
    Added device: d_pulldown
    Added device: d_pullup
    Added device: d_ram
    Added device: d_source
    Added device: d_srff
    Added device: d_srlatch
    Added device: d_state
    Added device: d_tff
    Added device: d_tristate
    Added device: d_xnor
    Added device: d_xor
    Got 0 udns.
    Got 9 devices.
    Added device: aswitch
    Added device: capacitor
    Added device: cmeter
    Added device: core
    Added device: inductor
    Added device: lcouple
    Added device: lmeter
    Added device: potentiometer
    Added device: zener
    Got 0 udns.
    Got 4 devices.
    Added device: d_to_real
    Added device: real_delay
    Added device: real_gain
    Added device: real_to_v
    Got 2 udns.
    Added udn: int
    Added udn: real

    Circuit: test

    Doing analysis at TEMP = 300.150000 and TNOM = 300.150000

    No. of Data Rows : 121
    Error: no data saved for pole-zero analysis; analysis not run

    No. of Data Rows : 1
    test
    AC Analysis Thu Jan 11 14:26:38 2007
    --------------------------------------------------------------------------------
    Index frequency v(3)
    --------------------------------------------------------------------------------
    0 1.000000e-02, 0.000000e+00 1.003826e+00, -7.241282e-04
    1 1.122018e-02, 0.000000e+00 1.004779e+00, -1.015776e-03
    2 1.258925e-02, 0.000000e+00 1.005957e+00, -1.422420e-03
    3 1.412538e-02, 0.000000e+00 1.007406e+00, -1.987585e-03
    4 1.584893e-02, 0.000000e+00 1.009180e+00, -2.769966e-03
    5 1.778279e-02, 0.000000e+00 1.011336e+00, -3.847810e-03
    6 1.995262e-02, 0.000000e+00 1.013933e+00, -5.323960e-03
    7 2.238721e-02, 0.000000e+00 1.017029e+00, -7.331242e-03
    8 2.511886e-02, 0.000000e+00 1.020672e+00, -1.003757e-02
    9 2.818383e-02, 0.000000e+00 1.024888e+00, -1.364975e-02
    10 3.162278e-02, 0.000000e+00 1.029673e+00, -1.841456e-02
    11 3.548134e-02, 0.000000e+00 1.034976e+00, -2.461542e-02
    12 3.981072e-02, 0.000000e+00 1.040678e+00, -3.256313e-02
    13 4.466836e-02, 0.000000e+00 1.046588e+00, -4.258011e-02
    14 5.011872e-02, 0.000000e+00 1.052425e+00, -5.497859e-02
    15 5.623413e-02, 0.000000e+00 1.057824e+00, -7.003565e-02
    16 6.309573e-02, 0.000000e+00 1.062340e+00, -8.796892e-02
    17 7.079458e-02, 0.000000e+00 1.065470e+00, -1.089173e-01
    18 7.943282e-02, 0.000000e+00 1.066666e+00, -1.329294e-01
    19 8.912509e-02, 0.000000e+00 1.065357e+00, -1.599592e-01
    20 1.000000e-01, 0.000000e+00 1.060962e+00, -1.898661e-01
    21 1.122018e-01, 0.000000e+00 1.052897e+00, -2.224147e-01
    22 1.258925e-01, 0.000000e+00 1.040580e+00, -2.572678e-01
    23 1.412538e-01, 0.000000e+00 1.023440e+00, -2.939722e-01
    24 1.584893e-01, 0.000000e+00 1.000927e+00, -3.319367e-01
    25 1.778279e-01, 0.000000e+00 9.725489e-01, -3.704075e-01
    26 1.995262e-01, 0.000000e+00 9.379161e-01, -4.084501e-01
    27 2.238721e-01, 0.000000e+00 8.968150e-01, -4.449477e-01
    28 2.511886e-01, 0.000000e+00 8.492860e-01, -4.786306e-01
    29 2.818383e-01, 0.000000e+00 7.957026e-01, -5.081437e-01
    30 3.162278e-01, 0.000000e+00 7.368267e-01, -5.321557e-01
    31 3.548134e-01, 0.000000e+00 6.738182e-01, -5.494980e-01
    32 3.981072e-01, 0.000000e+00 6.081827e-01, -5.593124e-01
    33 4.466836e-01, 0.000000e+00 5.416548e-01, -5.611721e-01
    34 5.011872e-01, 0.000000e+00 4.760337e-01, -5.551478e-01
    35 5.623413e-01, 0.000000e+00 4.130029e-01, -5.417980e-01
    36 6.309573e-01, 0.000000e+00 3.539742e-01, -5.220863e-01
    37 7.079458e-01, 0.000000e+00 2.999834e-01, -4.972483e-01
    38 7.943282e-01, 0.000000e+00 2.516529e-01, -4.686398e-01
    39 8.912509e-01, 0.000000e+00 2.092144e-01, -4.375976e-01
    40 1.000000e-00, 0.000000e+00 1.725738e-01, -4.053341e-01
    41 1.122018e+00, 0.000000e+00 1.413972e-01, -3.728731e-01
    42 1.258925e+00, 0.000000e+00 1.151969e-01, -3.410241e-01
    43 1.412538e+00, 0.000000e+00 9.340711e-02, -3.103862e-01
    44 1.584893e+00, 0.000000e+00 7.544201e-02, -2.813697e-01
    45 1.778279e+00, 0.000000e+00 6.073589e-02, -2.542271e-01
    46 1.995262e+00, 0.000000e+00 4.876791e-02, -2.290868e-01
    47 2.238721e+00, 0.000000e+00 3.907462e-02, -2.059831e-01
    48 2.511886e+00, 0.000000e+00 3.125396e-02, -1.848836e-01
    49 2.818383e+00, 0.000000e+00 2.496383e-02, -1.657102e-01
    50 3.162278e+00, 0.000000e+00 1.991737e-02, -1.483562e-01
    51 3.548134e+00, 0.000000e+00 1.587682e-02, -1.326984e-01
    52 3.981072e+00, 0.000000e+00 1.264690e-02, -1.186065e-01
    53 4.466836e+00, 0.000000e+00 1.006830e-02, -1.059494e-01
    54 5.011872e+00, 0.000000e+00 8.011792e-03, -9.459890e-02


    Index frequency v(3)
    --------------------------------------------------------------------------------
    55 5.623413e+00, 0.000000e+00 6.373018e-03, -8.443311e-02
    56 6.309573e+00, 0.000000e+00 5.067977e-03, -7.533750e-02
    57 7.079458e+00, 0.000000e+00 4.029246e-03, -6.720592e-02
    58 7.943282e+00, 0.000000e+00 3.202825e-03, -5.994080e-02
    59 8.912509e+00, 0.000000e+00 2.545535e-03, -5.345311e-02
    60 1.000000e+01, 0.000000e+00 2.022901e-03, -4.766197e-02
    61 1.122018e+01, 0.000000e+00 1.607422e-03, -4.249425e-02
    62 1.258925e+01, 0.000000e+00 1.277184e-03, -3.788400e-02
    63 1.412538e+01, 0.000000e+00 1.014732e-03, -3.377191e-02
    64 1.584893e+01, 0.000000e+00 8.061749e-04, -3.010474e-02
    65 1.778279e+01, 0.000000e+00 6.404587e-04, -2.683477e-02
    66 1.995262e+01, 0.000000e+00 5.087920e-04, -2.391927e-02
    67 2.238721e+01, 0.000000e+00 4.041842e-04, -2.132003e-02
    68 2.511886e+01, 0.000000e+00 3.210779e-04, -1.900288e-02
    69 2.818383e+01, 0.000000e+00 2.550557e-04, -1.693731e-02
    70 3.162278e+01, 0.000000e+00 2.026071e-04, -1.509609e-02
    71 3.548134e+01, 0.000000e+00 1.609423e-04, -1.345489e-02
    72 3.981072e+01, 0.000000e+00 1.278446e-04, -1.199203e-02
    73 4.466836e+01, 0.000000e+00 1.015529e-04, -1.068816e-02
    74 5.011872e+01, 0.000000e+00 8.066779e-05, -9.526003e-03
    75 5.623413e+01, 0.000000e+00 6.407761e-05, -8.490183e-03
    76 6.309573e+01, 0.000000e+00 5.089923e-05, -7.566971e-03
    77 7.079458e+01, 0.000000e+00 4.043106e-05, -6.744131e-03
    78 7.943282e+01, 0.000000e+00 3.211576e-05, -6.010757e-03
    79 8.912509e+01, 0.000000e+00 2.551060e-05, -5.357124e-03
    80 1.000000e+02, 0.000000e+00 2.026388e-05, -4.774564e-03
    81 1.122018e+02, 0.000000e+00 1.609623e-05, -4.255350e-03
    82 1.258925e+02, 0.000000e+00 1.278573e-05, -3.792596e-03
    83 1.412538e+02, 0.000000e+00 1.015609e-05, -3.380162e-03
    84 1.584893e+02, 0.000000e+00 8.067282e-06, -3.012578e-03
    85 1.778279e+02, 0.000000e+00 6.408079e-06, -2.684967e-03
    86 1.995262e+02, 0.000000e+00 5.090124e-06, -2.392982e-03
    87 2.238721e+02, 0.000000e+00 4.043233e-06, -2.132750e-03
    88 2.511886e+02, 0.000000e+00 3.211656e-06, -1.900816e-03
    89 2.818383e+02, 0.000000e+00 2.551111e-06, -1.694105e-03
    90 3.162278e+02, 0.000000e+00 2.026420e-06, -1.509874e-03
    91 3.548134e+02, 0.000000e+00 1.609643e-06, -1.345677e-03
    92 3.981072e+02, 0.000000e+00 1.278585e-06, -1.199336e-03
    93 4.466836e+02, 0.000000e+00 1.015617e-06, -1.068910e-03
    94 5.011872e+02, 0.000000e+00 8.067332e-07, -9.526669e-04
    95 5.623413e+02, 0.000000e+00 6.408111e-07, -8.490654e-04
    96 6.309573e+02, 0.000000e+00 5.090144e-07, -7.567304e-04
    97 7.079458e+02, 0.000000e+00 4.043245e-07, -6.744368e-04
    98 7.943282e+02, 0.000000e+00 3.211664e-07, -6.010924e-04
    99 8.912509e+02, 0.000000e+00 2.551116e-07, -5.357242e-04
    100 1.000000e+03, 0.000000e+00 2.026423e-07, -4.774647e-04
    101 1.122018e+03, 0.000000e+00 1.609645e-07, -4.255409e-04
    102 1.258925e+03, 0.000000e+00 1.278587e-07, -3.792638e-04
    103 1.412538e+03, 0.000000e+00 1.015618e-07, -3.380192e-04
    104 1.584893e+03, 0.000000e+00 8.067337e-08, -3.012599e-04
    105 1.778279e+03, 0.000000e+00 6.408114e-08, -2.684982e-04
    106 1.995262e+03, 0.000000e+00 5.090146e-08, -2.392993e-04
    107 2.238721e+03, 0.000000e+00 4.043247e-08, -2.132757e-04
    108 2.511886e+03, 0.000000e+00 3.211665e-08, -1.900822e-04
    109 2.818383e+03, 0.000000e+00 2.551116e-08, -1.694109e-04
    110 3.162278e+03, 0.000000e+00 2.026424e-08, -1.509876e-04
    111 3.548134e+03, 0.000000e+00 1.609646e-08, -1.345679e-04
    112 3.981072e+03, 0.000000e+00 1.278587e-08, -1.199337e-04


    Index frequency v(3)
    --------------------------------------------------------------------------------
    113 4.466836e+03, 0.000000e+00 1.015618e-08, -1.068911e-04
    114 5.011872e+03, 0.000000e+00 8.067338e-09, -9.526676e-05
    115 5.623413e+03, 0.000000e+00 6.408114e-09, -8.490659e-05
    116 6.309573e+03, 0.000000e+00 5.090146e-09, -7.567308e-05
    117 7.079458e+03, 0.000000e+00 4.043247e-09, -6.744370e-05
    118 7.943282e+03, 0.000000e+00 3.211665e-09, -6.010926e-05
    119 8.912509e+03, 0.000000e+00 2.551116e-09, -5.357243e-05
    120 1.000000e+04, 0.000000e+00 2.026424e-09, -4.774648e-05

    CPU time since last call: 0.026 seconds.

    Total CPU time: 0.026 seconds.

    Current dynamic memory usage = 135168,
    Dynamic memory limit = -495617.

    Yes of course because i want to do "print all" in order to make PZ
    analysis !!! (do this "? .pz" within ngspice)
    Habib
     
  20. "habib.bouaziz-viallet" <>
    schrieb im Newsbeitrag
    Hello Habib,

    You reported in a previous reply the result of the PZ-analysis.
    How have you achieved that?
    I see an error message about PZ-analysis in your report above.

    Best regards,
    Helmut
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-