Solving V0 Using Nodal Analysis

Click For Summary

Discussion Overview

The discussion revolves around solving for the voltage V0 in a circuit using nodal analysis. Participants are comparing results obtained from MATLAB and PSPICE, highlighting discrepancies in their findings. The focus is on the formulation of nodal equations and the interpretation of results from different software tools.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • The original poster presents nodal equations derived from the circuit and reports differing results from MATLAB and PSPICE.
  • One participant suggests grounding the node connected to the voltage sources to simplify the analysis.
  • Another participant claims to have solved the problem by hand and asserts that the equations and PSPICE results are correct.
  • A later reply challenges the MATLAB output, stating it does not satisfy the nodal equation and points out potential errors in the conversion of the equations to matrix form.

Areas of Agreement / Disagreement

Participants express differing views on the correctness of the MATLAB results versus PSPICE results, with no consensus reached on which software provides the accurate solution. Disagreement exists regarding the interpretation of the equations and the validity of the MATLAB code.

Contextual Notes

There are unresolved issues regarding the conversion of nodal equations into matrix form, with specific attention to the coefficients used in the MATLAB setup. The discussion reflects uncertainty about the accuracy of the calculations and the assumptions made in the analysis.

smithc2005
Messages
1
Reaction score
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
Try grounding the node connected to 2 voltage sources. This will simplify the analysis by only having to solve for a single node voltage.
 
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.
 
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
 

Similar threads

Replies
2
Views
2K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K