Engineering Nodal analysis algorithm applied to a circuit without voltage sources

AI Thread Summary
The discussion focuses on applying the nodal analysis algorithm to a circuit without voltage sources to determine equivalent resistance. The user encounters a singular G matrix while attempting to solve the linear system, which prevents them from calculating the resistance. Key advice includes ensuring that all nodes, particularly V3 and V4, are properly grounded by adding small resistors to avoid matrix singularity. By adjusting the G matrix and I vector accordingly, the user can successfully compute the circuit's resistance. The conversation highlights the importance of accurately representing circuit components in nodal analysis.
oswald2323
Messages
5
Reaction score
0

Homework Statement



I am having some trouble with the nodal analysis algorithm explained in this web page http://www.swarthmore.edu/NatSci/echeeve1/Ref/mna/MNA3.html

My electrical circuits knowledge is very basic, and I need to get the equivalent resistance of a circuit for a non related task (I am building an automated Hex player, see http://home.earthlink.net/~vanshel/VAnshelevich-01.pdf if you are interested).

The most basic circuit would be (excuse the ugly drawing):
fm6m14.png


Homework Equations



I set 1 Ampere for the generator, all resistors to 1 ohm and all wires 0.01 ohm (except the ones from the generator to A and B, which should have resistance 0). I want to get equivalent resistance from A to B. As you can see, there are no voltage sources so this is the most basic case of nodal analysis: I want to solve G*v = I, so I can get the voltage at node A and finally use it to calculate the circuit resistance (which should be equal to [voltage at node A] Ohms).

The Attempt at a Solution


I have coded a little program that solves the thing. The problem is that following the algorithm, it comes up with this G matrix:

Code:
     200.00     -100.00     -100.00        0.00        0.00
    -100.00      103.00       -1.00       -1.00       -1.00
    -100.00       -1.00      102.00        0.00       -1.00
       0.00       -1.00        0.00        2.00       -1.00
       0.00       -1.00       -1.00       -1.00        3.00

which is singular, and thus I cannot solve the linear system. The I vector is set as:

Code:
       1.00
       0.00
       0.00
       0.00
       0.00
Do you have any clues as to what I am doing wrong? Should node B be represented in the G matrix? (I tried it and the same thing happens, G matrix is singular).

PD: even though this is not a homework or coursework assignment, I am posting here because I got a warning when I posted in the electrical engineering forum.
 
Physics news on Phys.org
I see that this question is a follow-on from your earlier thread.

You have followed my advice to replace wires with small resistors, but you have not provided a new schematic where the little .01 ohm resistors are shown. This puts those who might help you in a difficult position. We have to guess where the .01 ohm resistors are.

You should also show in your schematic the numbering of the nodes that you used when you created your matrix.

However, I can tell that you have a couple of .01 ohm resistors between node A and each of V1 and V2, and that node A is node 1, and nodes V1, V2, V3 and V4 are numbered 2, 3, 4 and 5.

Your problem is that you have treated nodes V3 and V4 as though they weren't grounded. Unless you insert .01 resistors between V3 and ground, and between V4 and ground, your matrix will be singular.

But if you eliminate rows 4 and 5, and columns 4 and 5 in the matrix shown in your post #1 (this is what you should get by taking into account the fact that V3 and V4 are at ground potential), and shorten your I vector to only have 3 elements, then you can solve the system.

If I do this, I get a result of .338870967742 ohms.

If you don't insert the .01 ohm resistors, the resistance from A to B is .333333333333 ohms.

The .01 ohm resistors don't make much difference.

If you insert .01 ohm resistors between V3 and ground, and between V4 and ground, then you will have a matrix which won't be singular.

If I do this, I get a result of .344415584416 ohms.
 
Great! Now I get what I was doing wrong. I have fixed that and the resistance calculation is working perfectly, even for a larger circuit =)

Thanks again!
 
Please Help With This .. how to resolve ..
 

Attachments

  • untitled.JPG
    untitled.JPG
    13.5 KB · Views: 631

Similar threads

Replies
7
Views
2K
Replies
2
Views
2K
Replies
15
Views
4K
Replies
4
Views
2K
Replies
10
Views
3K
Back
Top