Nodal Analysis Problem (Matlab and PSpice Output Included)

Thread Starter

smithc2005

Joined Oct 2, 2009
1
I have to solve for V0 , using nodal analysis. I am getting different answers in matlab and PSPICE. The circuit is below


2 supernodes ; or 1 big supernode Here are my nodal equations:

v1-v3 = 12
v3 - v2 = 6

(v3)/6k + (v1)/4k - 6/k = 0

Matlab output is here:

Rich (BB code):
A=[1,0,-1;0,-1,1;.004,0,.006]
b=[12;6;.006]
format long
inv(A)*b

A =

    1.0000         0   -1.0000
         0   -1.0000    1.0000
    0.0040         0    0.0060


b =

   12.0000
    6.0000
    0.0060


ans =

   7.799999999999999
 -10.200000000000001
  -4.200000000000001
PSPICE Schematic:


So confused!!!!
 
Last edited:

t_n_k

Joined Mar 6, 2009
5,455
A couple of your matrix terms look wrong - you should have values like 1/4000 = .00025 and 1/6000 = 0.000167 there somewhere.
 

t_n_k

Joined Mar 6, 2009
5,455
Starting equations were correct but Matlab stuff should be like this ....


-->A
A =

1. 0. - 1.
0. - 1. 1.
0.00025 0. 0.0001667

-->b
b =

12.
6.
0.006

-->inv(A)*b
ans =

19.2
1.2
7.2
 
Top