Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ngspice transfer function

Status
Not open for further replies.

ced

New Member
Hi,
I am a ngspice newbie and I'd like to get a frequential transfer function of a Wien filter
as an exercise .
I'd like to plot V(3)/ISRC versus frequency .

Here is the .sch file I simulate :

Tranfer 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 is the result I get :

ngspice 1 -> run
Doing analysis at TEMP = 27.000000 and TNOM = 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 = 1.0000E-03 Note: One successful Gmin step
Trying gmin = 1.0000E-04 Note: One successful Gmin step
Trying gmin = 1.0000E-05 Note: One successful Gmin step
Trying gmin = 1.0000E-06 Note: One successful Gmin step
Trying gmin = 1.0000E-07 Note: One successful Gmin step
Trying gmin = 1.0000E-08 Note: One successful Gmin step
Trying gmin = 1.0000E-09 Note: One successful Gmin step
Trying gmin = 1.0000E-10 Note: One successful Gmin step
Trying gmin = 1.0000E-11 Note: One successful Gmin step
Trying gmin = 1.0000E-12 Note: One successful Gmin step
Trying gmin = 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 = 1.0000E-02 Note: One successful Gmin step
Trying gmin = 1.0000E-03 Note: One successful Gmin step
Trying gmin = 1.0000E-04 Note: One successful Gmin step
Trying gmin = 1.0000E-05 Note: One successful Gmin step
Trying gmin = 1.0000E-06 Note: One successful Gmin step
Trying gmin = 1.0000E-07 Note: One successful Gmin step
Trying gmin = 1.0000E-08 Note: One successful Gmin step
Trying gmin = 1.0000E-09 Note: One successful Gmin step
Trying gmin = 1.0000E-10 Note: One successful Gmin step
Trying gmin = 1.0000E-11 Note: One successful Gmin step
Trying gmin = 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 has an idea about what's wrong in the scheme file ?
Thanks for your help,
ced
 
I know nothing about NGSpice (No Good Spice?).

Driving the Wien Bridge network with a current source is a problem. The input should be from a voltage source. Look at the two frequency sweeps in the attachment. The second is the correct behavior.

Get the free LTSpice.
 

Attachments

  • Wien.gif
    Wien.gif
    65.2 KB · Views: 864
Hi,
ngspice is a linux spice simulator, it was a bad joke :) !
Actually it works fine as long as their is a dc path between any node and ground.
I've added a large resistor between node 1 and ground, and it works fine .
I'll try soon LTspice
Thanks and bye,
Cédric
 
Hi,
ngspice is a linux spice simulator, it was a bad joke :) !
Actually it works fine as long as their is a dc path between any node and ground.
I've added a large resistor between node 1 and ground, and it works fine .
I'll try soon LTspice
Thanks and bye,
Cédric
I think that Mike was implying that the Vout/Iin transfer function is almost trivial, because the values of R3 and C3 (in his schematic) are irrelevant. If you don't believe me, try changing R3 and C3.:eek:
 
Last edited:
I think that Mike was implying that the Vout/Iin transfer function is almost trivial, because the values of R3 and C3 (in his schematic) are irrelevant. If you don't believe me, try changing R3 and C3.:eek:

I agree that the Vout/Iin transfer function is trivial .
I am spice beginner, so to gain confidence, I'd like to see well-known results, before
trying to simulate circuits that I don't precisely know .
I thought it would an easy way to get the impedance versus frequency of a network
plotting the voltage between the nodes of the network versus frequency with a 1A AC
input current .

Does that seem right to you ?
 
Vout/Iin is definitely a good way to plot impedance. With 1 Amp in, the result is in Ohms, which is of course what you were implying. It's not a great way to plot Vout/Vin, which is what you need for a Wien network. You can do it with current stimulus, but you have to do some math in the plot (Vout/Vin) to get useful information.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top