Ngspice Commands

Commands use in Ngspice-

1. help - It opens ngspice manual and gives information about all ngspice commands.

2. listing - It prints the current netlist of the ciruit.

3. print v(out) or print v(3) - It prints the voltage valuesof corresponding node name or node number.

4. plot v(out) or plot v(3) - It plots the voltage values of corresponding node name or node number.

5. plot v(in1,in2) or print v(2,1) - It plots the voltage differrence of two nodes.

6. plot v(in1) - v(in2) or print v(2) - v(1) - It plots or prints the voltage differrence of two nodes.

7. plot v(in1) + v(in2) or print v(2) + v(1) - It plots or prints the voltage addition of two nodes.

8. plot v(in1) * v(in2) or print v(2) * v(1) - It plots or prints the voltage multiplication of two nodes.

9. plot v(in1) / v(in2) or print v(2) / v(1) - It plots or prints the voltage division of two nodes.

10. plot i(vs) or print i(v1)- It prints the current values of corresponding branch.
Here we have connect 0v voltage source in series(vs or v1),to find current in particular branch.

11. plot i(v2) or plot i(vout) - It plots the current values of corresponding branch.
Here we have connect 0v voltage source in series(vs or v1),to find current in particular branch.

12. plot mag(v(2)) or print mag(v(2)) - It plots or prints magnitude values of corresponding node.

13. plot db(v(2)) or print db(v(2)) - It plots or prints volatge values of corresponding node in decibel.

14. plot imag(v(2)) or print imag(v(2)) - It plots or prints imaginary part of voltage values of corresponding node.

15. plot phase(v(2)) or print phase(v(2))- It plots or prints phase values of corresponding node in radian.

16. plot 180/PI*phase(v(2)) or print 180/PI*phase(v(2)) - It plots or prints phase values of corresponding node in degree.