elementary transfer function with ngspice

Hi, I am a spice newbie and I'd like to plot the transfer function V/I (f) . Here is the scheme :

Transfer function : ISRC 1 0 AC 1 R1 1 2 1k C1 2 3 1u R2 3 0 1k C2 3 0 1u .AC DEC 10 1 10K .END

Here are the results I get :

ngspice 25 -> run Doing analysis at TEMP =3D 27.000000 and TNOM =3D 27.000000

Warning: Source isrc has no value, DC 0 assumed

Warning: singular matrix: check nodes 1 and 1

Note: starting dynamic Gmin stepping Trying gmin =3D 1.0000E-03 Note: One successful Gmin step Trying gmin =3D 1.0000E-04 Note: One successful Gmin step Trying gmin =3D 1.0000E-05 Note: One successful Gmin step Trying gmin =3D 1.0000E-06 Note: One successful Gmin step Trying gmin =3D 1.0000E-07 Note: One successful Gmin step Trying gmin =3D 1.0000E-08 Note: One successful Gmin step Trying gmin =3D 1.0000E-09 Note: One successful Gmin step Trying gmin =3D 1.0000E-10 Note: One successful Gmin step Trying gmin =3D 1.0000E-11 Note: One successful Gmin step Trying gmin =3D 1.0000E-12 Note: One successful Gmin step Trying gmin =3D 1.0000E-12 Note: One successful Gmin step Warning: singular matrix: check nodes 1 and 1

Warning: Dynamic Gmin stepping failed Note: starting source stepping Supplies reduced to 0.0000% Warning: singular matrix: check nodes 1 and 1

Trying gmin =3D 1.0000E-02 Note: One successful Gmin step Trying gmin =3D 1.0000E-03 Note: One successful Gmin step Trying gmin =3D 1.0000E-04 Note: One successful Gmin step Trying gmin =3D 1.0000E-05 Note: One successful Gmin step Trying gmin =3D 1.0000E-06 Note: One successful Gmin step Trying gmin =3D 1.0000E-07 Note: One successful Gmin step Trying gmin =3D 1.0000E-08 Note: One successful Gmin step Trying gmin =3D 1.0000E-09 Note: One successful Gmin step Trying gmin =3D 1.0000E-10 Note: One successful Gmin step Trying gmin =3D 1.0000E-11 Note: One successful Gmin step Trying gmin =3D 1.0000E-12 Note: One successful Gmin step Note: One successful source step Supplies reduced to 0.1000% Warning: singular matrix: check nodes 1 and 1

Supplies reduced to 0.0000% Warning: singular matrix: check nodes 1 and 1

Warning: source stepping failed

AC operating point failed -

Last Node Voltages

------------------

Node Last Voltage Previous Iter

---- ------------

-------------

1 0 0 2 0 0 3 0 0

doAnalyses: iteration limit reached

run simulation(s) aborted

Does someone sees what's wrong in the scheme file ?

Thanks very much,

C=E9dric

Reply to
cedric
Loading thread data ...

It doesn't like the fact that you've got a capacitor with no DC path to ground -- a current source doesn't count. Try adding a 10 meg resistor (or other ridiculously large value) from node 1 or 2 to ground, and see if it gets happier.

Alternate #1: take ISRC and R1 and turn them into their Thevenin equivalent; a voltage source provides a very positive path to ground, and the Thevenin equivalent source is easy to calculate when you've got a nice round number for the resistor value.

Alternate #2: just do it on paper -- this is sophomore signals and systems stuff; unless you're doing it as a warm up to something real or you're learning SPICE you shouldn't need to get close to a computer to do this.

--
www.wescottdesign.com
Reply to
Tim Wescott

.

in =3D

E-05

l

in =3D

E-11

l

s 1

in =3D

E-04

l

in =3D

E-10

l

s 1

s 1

=A0 Last Voltage =A0 =A0 =A0 =A0Previous Iter

=A0 ------------ -------------

=A0 =A0 =A0 =A0 =A0 =A0 =A0 0 0

=A0 =A0 =A0 =A0 =A0 =A0 =A0 0 0

=A0 =A0 =A0 =A0 =A0 =A0 =A0 0 0

Thanks very much,

the point was the missing DC path to ground of node 1 . Yes, as you guessed it, it was just a warm-up, before other doing something more difficult (for ngspice :-) ) . Bye cedric

Reply to
cedric

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.