Sub topic 1
Ohm's Law and Conductance
Nodal analysis writes a current equation at each node, and the unknowns are node voltages. Ohm's law has to be in the form "current equals something times a voltage". That form uses conductance, the reciprocal of resistance. This chapter builds that form, shows how to apply it between two nodes, and covers the unit and sign mistakes that most often break later equations.
Prerequisites
This chapter assumes you already know:
- What voltage, current, and resistance are, and their units (volts, amperes, ohms).
- Ohm's law in the form V = I R.
- How to combine resistors in series and in parallel.
- How to solve a linear system of two or three equations.
You do not need Kirchhoff's current law yet. The next chapter reviews it.
Ohm's law in two forms
The familiar form treats current as the cause of a voltage drop:
V = I R
Solving for current gives the form nodal analysis uses:
I = V / R = G V, where G = 1 / R
G is the conductance of the resistor. Its unit is the siemens (S), and 1 S = 1 A/V. A larger conductance passes more current for the same voltage. The two forms carry the same information, but I = G V puts the voltage, which is the unknown, on the right-hand side of a linear expression.
| Resistance R | Conductance G |
|---|---|
| 1 Ω | 1 S |
| 4 Ω | 0.25 S |
| 10 Ω | 0.1 S |
| 1 kΩ | 1 mS |
| 2 kΩ | 0.5 mS |
| 100 kΩ | 10 µS |
Conductance is just a change of bookkeeping. Nothing physical changes, and a resistor is the same device whichever number you use.
Current through a resistor between two nodes
In nodal analysis you rarely know the voltage across a resistor directly. You know, or want, the voltage of each end relative to the reference (ground) node. For a resistor between node a and node b, the voltage across it is the difference of the node voltages:
vab = va − v_b
The current flowing from a to b through the resistor is then
iab = G (va − v_b)
Current flows from the higher potential to the lower one. If va is greater than vb, iab is positive. If vb is greater, i_ab comes out negative, which means the current actually flows from b to a. Do not "fix" a negative result by swapping the subtraction. The sign is information.
If one end of the resistor is the reference node, its voltage is 0 and the expression simplifies:
- Resistor from node a to ground: i = G v_a
- Resistor from ground to node b: i = −G vb when measured out of b, or equivalently G vb flowing from b into ground
The first form appears constantly. A resistor to ground drains current G v from its node.
Worked example
Node a is at 10 V and node b is at 4 V. A 2 Ω resistor connects them.
- G = 1 / 2 = 0.5 S.
- The voltage across the resistor is 10 − 4 = 6 V.
- i_ab = 0.5 × 6 = 3 A, flowing from a to b.
Power is covered in a later section, but you can already check the result with V = I R: 3 A × 2 Ω = 6 V, which matches.
Combining conductances
Conductances combine in the opposite way to resistances.
- Parallel: conductances add. G_eq = G1 + G2 + G3 + …
- Series: reciprocals add. 1 / Geq = 1 / G1 + 1 / G2 + …, which for two elements gives Geq = G1 G2 / (G1 + G2).
Parallel is where conductance is more convenient. Each parallel branch sees the same voltage, so each carries G v, and the total current is (G1 + G2 + …) v.
Example, two resistors in parallel: 4 Ω and 12 Ω.
- G1 = 0.25 S and G2 = 1/12 S ≈ 0.0833 S.
- Geq = 0.25 + 0.0833 = 0.3333 S, so Req = 3 Ω.
Example, two resistors in series: 6 Ω and 3 Ω.
- G1 = 1/6 S and G2 = 1/3 S.
- Geq = (1/6 × 1/3) / (1/6 + 1/3) = (1/18) / (1/2) = 1/9 S, so Req = 9 Ω.
For series elements, adding resistances (6 + 3 = 9 Ω) is simpler. Use whichever form fits the structure. Nodal analysis mostly deals with elements that meet at a node, which is the parallel case in spirit, and that is why conductances add up on the matrix diagonal later in this tutorial.
Power in terms of conductance
Power absorbed by a resistor, with the voltage across it v and the current i entering the higher-voltage terminal, is p = v i. Substituting i = G v gives
p = G v²
This equals v² / R. A resistor always absorbs power, so p is never negative, because G is positive and v² is non-negative. If you compute negative power for a resistor, there is an arithmetic or sign error. Later chapters use this for the power-balance check, where the power absorbed by the resistors must equal the power delivered by the sources.
For the worked example above: p = 0.5 × 6² = 18 W. Cross-check with p = v i = 6 × 3 = 18 W.
Doing it in code
The same relationships in Python, with a guard for the case where conductance is undefined:
def conductance(ohms):
if ohms == 0:
raise ValueError("A 0 ohm resistor is a short circuit and has no finite conductance.")
return 1.0 / ohms
def branch_current(v_a, v_b, ohms):
"""Current through the resistor from node a to node b, in amps."""
return conductance(ohms) * (v_a - v_b)
def branch_power(v_a, v_b, ohms):
"""Power absorbed by the resistor, in watts."""
return conductance(ohms) * (v_a - v_b) ** 2
v1, v2 = 10.0, 4.0
print(branch_current(v1, v2, 2.0)) # 3.0
print(branch_power(v1, v2, 2.0)) # 18.0
print(branch_current(v2, v1, 2.0)) # -3.0, same current seen from the other endSwapping the nodes flips the sign of the current and leaves the power unchanged.
Units and scaling
Mixed prefixes cause many arithmetic errors. Two combinations keep the numbers manageable:
- Resistance in kΩ gives conductance in mS. A 1 kΩ resistor is 1 mS, and a 4 kΩ resistor is 0.25 mS.
- Conductance in mS times voltage in V gives current in mA.
So a circuit with resistors in kΩ and sources in mA gives voltages directly in volts with no powers of ten to track. Pick one consistent set (kΩ, mS, mA, V) for the whole problem and convert only at the end.
Edge cases
- Short circuit (R = 0). G would be infinite, so the formula i = G v cannot be used. An ideal wire forces both ends to the same voltage. Merge the two nodes into one, or treat the connection as a voltage source of 0 V (a later chapter).
- Open circuit (G = 0). A missing connection is a resistor of infinite resistance and zero conductance. It contributes nothing to any equation. This is valid, and it is the reason a sparse circuit gives a sparse matrix.
- Extreme ratios. Mixing a 1 mΩ resistor with a 10 MΩ resistor gives conductances that differ by ten orders of magnitude. The equations are still correct, but a numerical solver may lose precision. This matters when you build the matrix in code.
- Negative resistance. Passive resistors have positive R and G. A negative value in a formula usually points to a typo, unless it is a deliberate dependent-source model.
Common errors
- Using R where G belongs, for example writing i = R v. Check units: A/V for G, V/A for R.
- Adding resistances for parallel branches instead of conductances.
- Using the voltage at one end of the resistor instead of the difference across it, which is only correct when the other end is ground.
- Mixing Ω with mS, or kΩ with S, in the same equation.
- Accepting a negative power for a resistor.
Exercise
Node a is at 12 V and node b is at 5 V. A 500 Ω resistor connects them. Find the conductance, the current from a to b, and the power absorbed by the resistor.
Show answer
G = 1/500 S = 2 mS. The voltage across the resistor is 12 − 5 = 7 V, so i_ab = 2 mS × 7 V = 14 mA, flowing from a to b. Power is p = G v² = 0.002 × 49 = 0.098 W = 98 mW. Check: v i = 7 V × 14 mA = 98 mW.
Exercise
Three resistors of 2 Ω, 3 Ω, and 6 Ω are connected in parallel across the same two nodes, with 6 V between the nodes. Use conductances to find the equivalent resistance and the total current.
Show answer
The conductances are 1/2 S, 1/3 S, and 1/6 S. They add to Geq = 3/6 + 2/6 + 1/6 = 1 S, so Req = 1 Ω. The total current is G_eq × 6 V = 6 A. The branch currents are 3 A, 2 A, and 1 A, which sum to 6 A.
Exercise
A resistor connects node 2 to node 3. The node voltages are v2 = 3 V and v3 = 8 V, and the resistor is 5 kΩ. What is the current from node 2 to node 3 in mA, and which way does the current actually flow?
Show answer
G = 1/5 kΩ = 0.2 mS. i_23 = 0.2 mS × (3 − 8) V = −1 mA. The negative sign means the current actually flows from node 3 to node 2, at 1 mA, because node 3 is at the higher voltage.