# Node-voltage method to find current

1. Feb 18, 2014

### zealeth

1. The problem statement, all variables and given/known data

Use the node-voltage method to find i_0 in the figure (Figure 1) if v = 29.0V.

2. Relevant equations

G = 1/R

$\sum$G connected to node 1 * v_1 - $\sum$G between node 1 and 2 * v_2 = Current source into node 1

$\sum$G connected to node 2 * v_2 - $\sum$G between node 1 and 2 * v_1 = Current source into node 2

3. The attempt at a solution

Labels: Top node = 1, left node = 2, right node = 3, bottom node = 4

v_1 = 29, v_4 = 0

Node 1:
0 = 29*(1/2000+1/5000) - v_2*(1/2000) - v_3*(1/5000) - 0

Node 2:
-i_0 = -29*(1/2000) + v_2*(1/2000+1/5000+1/30000) - v_3*(1/5000) - 0

Node 3:
i_0 = -29*(1/5000) - v_2*(1/5000) + v_3*(1/5000+1/5000+1/1000) - 0

Node 4:
0 = 0 - v_2*(1/30000) - v_3*(1/1000) + 0

Solving, I get i_0 = -0.0160 which isn't right. Thoughts?

2. Feb 18, 2014

### FOIWATER

Write nodal equations for nodes 2 and 3. Keep in mind, node 1 is at the same potential as the source with respect to ground. Node 4 is grounded. You can write two equations which consist only of the voltages at nodes 2 and 3.

These are the voltages across the resistor (whose resistance is known) which we want to know the current through.

The trick is to find V2 and V3. We know V1 and V4..

Are you familiar with the 'king of the hill' approach to solving nodal?

Treat V2 as the point of highest potential and make an equation (as you have done) of the form:

(v2-29)/2000 + V2/(30000) + (V3-V2)/5000 = 0

A similar equation can be made for node three, treating it as the point of highest potential.

The result is a system of equations with two equations and two variables. The variables are the voltages across the resistor of which we want to find the current.. Does it make sense?

3. Feb 18, 2014

### zealeth

I've never heard it called the 'king of the hill' approach, but I have seen the method you're using.

If I follow correctly, the equation for node 3 should be:

(v_3 - 29)/5000 + (v_3)/1000 + (v_2 - v_3)/5000 = 0

I'm unsure if the third term should be (v_2 - v_3)/5000 or (v_3 - v_2) though. Anyhow, solving these two equations (assuming what I have for node 3 is correct) gives me:

v_2 = 45.5 V, v_3 = -3.30 V

If this is right, I believe I should get (v_2-v_3)/5000 = i_0 which gives me i_0 = 0.00976, which is also incorrect apparently.

What I also don't get is why these equations are set equal to 0 rather than setting them equal to a variable i_0.

4. Feb 18, 2014

### FOIWATER

They are set to zero because there is no net injected current at the nodes. Kirchoff's current law (all these nodal equations are based on it!) With regards to why not set them to I0, remember, you had three terms in your expression for Node 2. One of them WAS I0

The third term should have been V3-V2. You assume whichever node you are working at is the point of highest potential and you assume current flows away from it always unless a current source blatently tells you it is entering the node.

Let me tell you something which will be very useful for you any time you ever do nodal analysis again. You probably know that the assigned current directions do not matter as long as you are consistent. The correct signs will, as my old instructor said, 'fall out in the wash'. But, a good approach (not that I would try to force any way of thinking) Is to follow this king of the hill approach. Assign current directions such that every current is leaving the node you are currently analyzing even if it is obviously incorrect. The only thing is, current sources should be entered with their given current directions. If a current source is shown as entering the node, you do not assume it is leaving.

Does it make sense? What do you get for your answer now? Do you have the correct value?

Last edited: Feb 18, 2014
5. Feb 18, 2014

### zealeth

I understand what you're saying, but I'm still not getting the correct answer. Solving the equation you posted with the now corrected node 3 equation:

(v_3-29)/5000 + v_3/1000 + (v_3-v_2)/5000 = 0

I get v_2 = 37.8 V and v_3 = 9.54 V.

i_0 = (v_3 - v_2)/5000 = -0.0056 A which is incorrect (+0.0056 A is also incorrect).

I'm out of attempts so I do have the correct answer now which is 2.90*10^(-3) A, but I'd still like to understand how to get there.

6. Feb 18, 2014

### FOIWATER

I appreciate enough hard work to run out of attempts lol. I will try my best to help but I cannot supply the answer directly.

I got that answer you posted, 2.9mA using king of the hill. This is what I did,

Write a nodal eqn for node 2.

Write a nodal eqn for node 3.

Solve V2 and V3.

V2-V3/5000 = 2.9mA

Those voltages are not the ones I got. Do you realize that you have constant terms in each equation? 29/2000 and 29/5000 that will go to the other side?

You are on the right track don't give up. I will check back later hopefully you got it

7. Feb 18, 2014

### zealeth

Finally got the answer using what you said. Only difference between what I did on my last attempt and what you did is I was being lazy and used WolframAlpha to solve the equations, which was apparently bugging out. Doing it manually, I got exactly the right answer. Serves me right I guess, lol. Thanks a bunch.

8. Feb 18, 2014

### FOIWATER

You're most welcome all the best.