Solving V0 Using Nodal Analysis

In summary, when solving for V0 using nodal analysis, the MATLAB and PSPICE outputs differed. The nodal equations were correctly set up and the PSPICE schematic was correct. However, the conversion of the nodal equations into the MATLAB code was incorrect, resulting in the wrong answer. By grounding one of the nodes connected to two voltage sources, the analysis can be simplified and the correct answer can be obtained.
  • #1
smithc2005
1
0

Homework Statement


I have to solve for V0 , using nodal analysis. I am getting different answers in MATLAB and PSPICE. The circuit is below
2j4eel3.jpg



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:

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:
20poeas.jpg


So confused!



Homework Equations


I = V/R


The Attempt at a Solution


I have gotten -4.2 from MATLAB and 7.2 from pspice.
 
Physics news on Phys.org
  • #2
Try grounding the node connected to 2 voltage sources. This will simplify the analysis by only having to solve for a single node voltage.
 
  • #3
I have solved this by hand and I can tell you that your equations, and pspice are correct.

I just wonder about what it is you're 'saying' by that MATLAB code, I will have to look at it in more depth.
 
  • #4
Clearly the Matlab answer is wrong since it does not satisfy the III equation:

(v3)/6k + (v1)/4k = -4.2/6k + 7.8/4k = -.7/k + 1.9/k =1.2/k != 6/k

On closer inspection, you will see that the conversion from
(v3)/6k + (v1)/4k - 6/k = 0
to
A=[1,0,-1;0,-1,1;.004,0,.006] is erroneous -
1/4k != .004, 1/6k != .006

I suppose you already figured it out by now.. anyhow it may help someone who reads the thread.

Cheers,
Abha
 

FAQ: Solving V0 Using Nodal Analysis

What is Nodal Analysis?

Nodal Analysis is a method commonly used in circuit analysis to determine the voltage at each node in a circuit. It involves setting up equations using Kirchhoff's Current Law and Ohm's Law to solve for the unknown node voltages.

How do you set up equations for Nodal Analysis?

To set up equations for Nodal Analysis, you will need to identify all the nodes in the circuit and assign a variable for each node voltage. Then, use Kirchhoff's Current Law to write equations for each node, taking into account the currents entering and leaving the node. Finally, use Ohm's Law to relate the node voltages to the resistances in the circuit.

What is V0 in Nodal Analysis?

V0 refers to the voltage at the specified output node in a circuit. This is the voltage that we are solving for using Nodal Analysis.

What is the purpose of Nodal Analysis?

The purpose of Nodal Analysis is to determine the voltage at each node in a circuit. This information can then be used to analyze the behavior of the circuit and make informed design decisions.

Are there any limitations to Nodal Analysis?

While Nodal Analysis is a powerful tool for circuit analysis, it does have some limitations. It can only be used for circuits with a single output node, and it is not suitable for circuits with nonlinear or time-varying elements.

Similar threads

Replies
15
Views
3K
Replies
2
Views
2K
Replies
5
Views
2K
Replies
4
Views
2K
Replies
1
Views
2K
Replies
7
Views
2K
Replies
4
Views
2K
Back
Top