Menu

#222 inaccurate .ac analysis

closed-wont-fix
nobody
analyses (40)
5
2012-12-01
2012-11-23
Anonymous
No

I write a simple low pass filter, 1VAC on input:

*asdf
vac in 0 ac 1
r in out 1000
c out 0 0.000001
.ac dec 100 10 10000
.plot out
.end

I expect that output signal is 0.7 when frequency is 159Hz (f3dB=1/(2piRC)), but on the ac simulation this is 105Hz. I've got this results on ngspice-24 and ngspice on-line, pspice shows correct result (amplitude 0,7 with 159Hz). Transient analysis with sinus in ngspice also gives correct result. I suppose sth is wrong with .ac analysis. It works strangely also with other circuits I've simulated, the same simulations on pspice looks ok.
My operating system - linux mint 11.

Pozdrawiam
Michal Stec

Discussion

  • Robert Larice

    Robert Larice - 2012-11-24

    Hello Michal

    in ngspice v(out) is a complex value
    and
    plot out
    plots the `real' part of this.

    try
    plot abs(v(out))

    Robert

     
  • Holger Vogt

    Holger Vogt - 2012-12-01
    • status: open --> closed-wont-fix
     

Log in to post a comment.