- #1
oswald2323
- 5
- 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):
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
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.