# KCL equation issue

1. Oct 30, 2016

### CoolDude420

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

In an example in our notes, he applies KCL at the bolded point in the circuit diagram. I have given a part of the KCL equation up there. That's the part I don't understand. Hes finding the current flowing through R1. I don't understand where he gets -vd-vin.

2. Relevant equations

3. The attempt at a solution

2. Oct 30, 2016

### Staff: Mentor

CoolDude420, the forum rules say that you need to provide some attempt at a solution. In future your posts will be deleted if there's no attempt shown. For relevant equations you could name the type of analysis method being employed (nodal analysis) and list KCL and Ohm's law with it.

KCL is being applied at the indicated node so it seems that Nodal Analysis is in progress. What are the potentials at the nodes at either end of R1? How would you employ Ohm's law to write an expression for the current flowing out of the indicated node via the R1 branch?

3. Oct 31, 2016

### CoolDude420

I mean we could say that voltage across R1 is Vr1. And then Vr1 = Vin - (-Vd). I took the node to the left of R1 and to the right of r1. And since they are both in reference to ground I subtracted them to give the voltage across R1 but that's clearly wrong.

My issue is with the signs of the vd and vin in the equation in the picture.

As per your question KCL at that node is: i1 + i3 = i2. (i3 is the current flowing in the branch with Vd).

4. Oct 31, 2016

### Staff: Mentor

Ah, but that's not what I asked. I asked you to write an expression for the current in the branch using Ohm's Law. You need to use the potentials at either end of the resistor, and use them in the right order to make sure that you're assumed current direction is flowing out of the node.

5. Oct 31, 2016

### CoolDude420

Apologies. Current in the branch with R1 is : I = Vin - (-Vd) / R1. I took the voltage at the node to the left of the resistor and subtracted it from the voltage at the node to the right of the resistor to give me the voltage drop across the resistor. However since currents flowing into the node are - and out of the node are postive. This current which is flowing into the node(assuming) would be -Vin - Vd/R1 which is what my lecture notes say

6. Oct 31, 2016

### Staff: Mentor

That's the current flowing INTO the node. You want the current flowing OUT of the node.

In nodal analysis the common procedure is to sum all currents to zero assuming that they all flow out of the node or they all flow into the node, one or the other but not both. Currents defined for other purposes (such as $i_1$ in the figure) are ignored at this point; They can always be reconciled with the directions of the node currents later. The important thing is to make the procedure of writing nodal equations automatic so that the user doesn't have to think about the directions of individual currents and fiddle about rearranging his KCL equation.

So the author of the image was applying nodal analysis assuming all currents are flowing out of the node:

Thus $I_1 + I_2 + I_3 = 0$.

7. Oct 31, 2016

### CoolDude420

Ah I see. In my notes he just says "By KCL and then writes the equations." Apologies for the confusion. I think I understand now. Thank you for the help.