Sub topic 1
Loops, meshes and branches: the vocabulary of KVL
Kirchhoff's voltage law (KVL) is stated in terms of loops. Before you can write a loop equation, you need to know exactly what a node, a branch, a loop and a mesh are. This chapter fixes that vocabulary. It also shows how to count the independent equations a circuit gives you and how to spot the common ways the terms get misused.
Prerequisites
This chapter assumes you already know the following:
- Electric current, voltage and resistance, and their units (amperes, volts, ohms).
- Ohm's law, V = IR.
- The ideal voltage source and the resistor as circuit elements.
- How to solve a small system of linear equations, such as two equations in two unknowns.
You do not need to know KVL itself yet. The chapter only prepares the vocabulary the law uses.
Why the vocabulary matters
KVL says that the voltages around a closed path add up to zero. To apply it, you must choose a closed path and walk around it. The words in this chapter describe what a path is made of and which paths are worth choosing.
Several words sound alike but mean different things. A mesh is a loop, but a loop is not always a mesh. A node in circuit analysis is bigger than a single dot on the drawing. Getting these right now prevents counting mistakes later, especially when you decide how many equations a circuit needs.
Elements, nodes and branches
Circuit elements
An element is one two-terminal device, such as a resistor or an ideal voltage source. Each element has two terminals. Current enters one terminal and leaves the other.
Nodes
A node is a point where two or more elements connect. In a schematic, a node is drawn as a dot, or as the place where wires meet.
An ideal wire has zero resistance. So every point joined by wire without any element in between is the same node, and it has a single voltage. A schematic may show a long wire that bends around the page, and that whole wire is still one node.
Some nodes have only two elements attached. Others have three or more. Nodes with three or more elements are called essential nodes. They are the ones that matter for Kirchhoff's current law (KCL), covered later in this tutorial.
Branches
A branch is a path that carries one current. It is a single element, or several elements connected end to end through nodes that have only two elements attached. Current entering a branch at one end leaves at the other end with the same value, because nothing along the way splits it.
An essential branch is a branch that connects two essential nodes without passing through another essential node. Some books call every single element a branch. Others use the essential-branch definition above. Check which one your textbook uses. This tutorial uses the essential-branch meaning when it counts branches.
Loops and meshes
Loops
A loop is a closed path through the circuit. It starts at a node, passes through elements and nodes, and returns to the starting node. The path must not visit any other node twice.
A loop may enclose other parts of the circuit. A circuit with many elements usually has many possible loops. KVL holds for every one of them.
Meshes
A mesh is a loop that contains no other loop inside it. If you draw the circuit on a flat sheet with no wires crossing, a mesh is one of the "windows" of the drawing. You can think of the circuit as a window frame, and each pane of glass is one mesh.
This means every mesh is a loop. A loop that surrounds two or more windows is not a mesh.
Planar circuits
Meshes are defined cleanly only for planar circuits. A planar circuit can be drawn on a flat surface without any wires crossing each other. Most introductory circuits are planar. A circuit that can only be drawn with crossing wires needs a different method, such as node-voltage analysis.
A worked example: counting the parts
Consider a circuit with two voltage sources and three resistors. The left side has source V1 in series with R1. The middle branch is R2. The right side has R3 in series with source V2. The top wire joins the three branches at node A. The bottom wire joins them at node B.
Count the parts:
| Item | Count | Reason |
|---|---|---|
| Elements | 5 | V1, R1, R2, R3, V2 |
| Essential nodes | 2 | A and B each join three branches |
| Essential branches | 3 | Left, middle and right |
| Meshes | 2 | Left window and right window |
| Loops | 3 | Left mesh, right mesh, and the outer loop around both |
The outer loop passes through V1, R1, R3 and V2. It encloses the middle branch, so it contains other loops. It is a valid loop, and KVL holds for it. It is not a mesh.
How many independent equations do you get?
You can write one KVL equation for every loop. But not all of them give new information. In the example, the outer-loop equation is the sum of the two mesh equations. The shared middle resistor cancels when you add them. The outer loop adds nothing you did not already have.
The count of independent equations follows a rule. Let b be the number of essential branches and n the number of essential nodes. Then:
- KCL gives n − 1 independent equations.
- KVL gives b − (n − 1) independent equations.
For the example, b = 3 and n = 2. KCL gives 1 equation. KVL gives 3 − 1 = 2 equations. The two meshes supply exactly those two. For a planar circuit, the number of meshes equals b − n + 1, so writing one KVL equation per mesh always gives a complete, independent set.
This is the reason mesh analysis, covered in a later chapter, works. You do not have to hunt for independent loops. The windows of the drawing are independent by construction.
Listing loops by computer
For larger circuits, you can list every loop with a graph search. The code below stores the example as a graph. Each edge is a branch, and it finds all closed paths that do not revisit a node.
# Circuit as a graph: nodes A and B, three parallel branches.
# Each branch is (name, node1, node2).
branches = [
("B1", "A", "B"),
("B2", "A", "B"),
("B3", "A", "B"),
]
from itertools import combinations
# With only two essential nodes, a loop uses exactly two branches:
# it goes out on one and returns on another.
loops = [set(pair) for pair in combinations([b[0] for b in branches], 2)]
b = len(branches)
n = 2 # essential nodes
independent = b - (n - 1)
print("Loops found:", len(loops))
for lp in loops:
print(" ", sorted(lp))
print("Independent KVL equations:", independent)The program finds three loops: B1 with B2, B2 with B3, and B1 with B3. Only two of them are independent. The loop that uses B1 and B3 is the outer loop, and it is the combination of the other two.
This shortcut works only because every branch joins the same two nodes. For a general circuit you need a proper cycle search, and the independent count still comes from the formula.
Common vocabulary mistakes
- Treating every dot as a separate node. Two dots joined by a plain wire are the same node. Merge them before you count.
- Calling every loop a mesh. A loop that encloses another loop is not a mesh. Only the smallest windows are meshes.
- Counting each element as a branch. Two resistors in series carry the same current. They form one branch for counting purposes.
- Applying mesh counting to a non-planar circuit. The window count is only valid when the drawing has no crossing wires.
- Forgetting that the outer loop is redundant. It is valid, but it does not add a new independent equation.
Summary of the vocabulary
| Term | Meaning |
|---|---|
| Node | A point, or a set of wire-connected points, where elements join |
| Essential node | A node with three or more elements attached |
| Branch | A path of elements carrying one current |
| Loop | A closed path that does not revisit any node |
| Mesh | A loop with no other loop inside it |
| Planar circuit | A circuit that can be drawn without crossing wires |
Exercise
A planar circuit has 4 essential nodes and 6 essential branches. (a) How many independent KCL equations does it give? (b) How many independent KVL equations does it give, and so how many meshes does the drawing have?
Show answer
(a) KCL gives n − 1 = 4 − 1 = 3 independent equations. (b) KVL gives b − (n − 1) = 6 − 3 = 3 independent equations. For a planar circuit this equals the number of meshes, so the drawing has 3 meshes.
Exercise
In a drawing with two side-by-side windows sharing a middle branch, you write a KVL equation around the outer boundary. Is this loop a mesh? Does it give you an independent equation if you have already written both mesh equations?
Show answer
The outer boundary is a loop, but it is not a mesh because it contains the middle branch and so encloses other loops. Its equation is the sum of the two mesh equations, because the shared middle branch cancels. It is not independent.