Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How do I correctly measure current and voltage values in ngspice?

Status
Not open for further replies.

nsguiamano

Junior Member level 1
Junior Member level 1
Joined
Feb 5, 2014
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
170
So I have this netlist:

V1 V1_P 0 dc 9V
V2 Q1_E 0 dc -9V
R1 V1_P R1_N 10k
V3 Q3_B 0 0 Sine(0 10m 1k 0 0)
R2 V1_P R2_N 5.1k
Vx R2_N R2_M dc 0V
V4 Q4_B 0 0 Sine(0 -10m 1k 0 0)
R3 V1_P R3_N 5.1k
Vy Q3_E Q3_F dc 0V
Vz R1_N R1_M dc 0V
Q1 R1_M R1_N Q1_E 0 Q2N3904
Q2 Q3_F R1_N Q1_E 0 Q2N3904
Q3 R2_M Q3_B Q3_E 0 Q2N3904
Q4 R3_N Q4_B Q3_E 0 Q2N3904

.model Q2N3904 NPN(Is=6.734f Xti=3 Eg=1.11 Vaf=74.03 Bf=416.4 Ne=1.259
+ Ise=6.734f Ikf=66.78m Xtb=1.5 Br=.7371 Nc=2 Isc=0 Ikr=0 Rc=1
+ Cjc=3.638p Mjc=.3085 Vjc=.75 Fc=.5 Cje=4.493p Mje=.2593 Vje=.75
+ Tr=239.5n Tf=301.2p Itf=.4 Vtf=4 Xtf=2 Rb=10)

.end

for this circuit: lab6.png

Problem is, whenever I attempt to do commands such as:

print i(Vx)
print v(R2_N)-v(R2_N)

It says that the commands do not exist.

Is there something wrong with my netlist?
 
Last edited:

It says that the commands do not exist
True, The command is .print. You missed the dot. Also the analysis type has to be specified with the print command.
 

I tried doing what you suggested.

.print i(Vx)
.print dc i(Vx)

The same error comes up. :(
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top