TL;DR
The admittance matrix is a square table with one row and one column for each node (junction) of a network. It holds the admittance of every element between nodes, so that one equation, current equals matrix times voltage, describes the whole circuit at once. Engineers use it to solve for voltages and currents in large networks, and it is the starting point for power flow studies of electrical grids.
Builds on: Kirchhoff's laws, Electrical Impedance, Matrix, Complex Numbers · Leads to: Power Flow Equations
Where it's used
Power flow studies. A grid operator keeps a model of every line, transformer and generator. The line data is turned into one admittance matrix, often called the Y-bus, and the power flow solver starts from it. Open-source tools such as MATPOWER and commercial packages such as PSS/E work this way. Power Flow Equations are written in terms of this matrix.
Outage studies. When a line is switched out, only the entries that belong to that line change. Two diagonal entries and two off-diagonal entries are updated, and the rest of the matrix stays as it was. Engineers therefore re-solve the grid for each possible outage without rebuilding the model from scratch.
Circuit simulation. Programs that analyse electronic circuits build a matrix of the same kind, one row per node, from Kirchhoff's current law applied at each node. The computer then solves the resulting linear system for the node voltages, by Gaussian elimination or a related method.
How it works
Take the smallest network with two nodes and one line. The line has impedance ohms, a pure reactance of 0.5 ohms, so its resistance (the real part) is zero. The engineering convention writes the imaginary unit as , but this lesson uses to match Electrical Impedance. Find the admittance of the line, then build the matrix, then check it.
-
Find the admittance of the line. The admittance is the reciprocal of the impedance: . Since , this gives . Check: multiplying back, , so is the reciprocal of .
-
Fill the matrix. Each node has one line, so its diagonal entry is the admittance of that line: . The off-diagonal entries are the negative of the line's admittance: . The matrix is
Check: each row adds to zero, . That is expected, because nothing connects the network to ground.
-
Apply the matrix to equal voltages. Set both node voltages to 1 (the same value at both nodes). Then the injected currents are , and by the same sum. Check: equal voltages across a line make no current flow, so zero is the right answer.
-
Apply the matrix to one node held at zero. Set and . Then and . Check: the current leaving node 1 along the line is , which matches .
-
Read the result. One matrix gives the currents for every pair of voltages, and it reproduces Ohm's law for the line in each case. A larger network works the same way: each node's current is a sum over its neighbours, and the matrix stores all those sums in one place.
flowchart TD A["Each line: admittance y = 1 / Z"] --> B["Diagonal entry: sum of admittances at the node"] A --> C["Off-diagonal entry: minus the admittance of the line"] B --> D["Matrix Y"] C --> D D --> E["Currents I = Y times voltages V"]
The math
For a network of nodes, with voltages measured from a reference node, the admittance matrix is the matrix whose entries are given by the rules below, so that the vector of injected currents satisfies . Here is the current injected into the network at node .
Admittance is the reciprocal of impedance, , measured in siemens (S), where 1 S is 1 per ohm. It is a complex number , where is the conductance and is the susceptance. For a resistor of ohms, with . In step 1 the line has and .
Step 2 in symbols: the entries
Let be the admittance of the line between nodes and , and let be the admittance from node to ground, which is zero if there is none. The current that flows from node into the line toward node is . Kirchhoff's current law says that the current injected at node equals the sum of the currents leaving it through its lines:
Collect the terms in each voltage:
Comparing this with gives the two rules that define the matrix:
The diagonal entry is the total admittance at the node. Each off-diagonal entry is minus the admittance of the line joining the two nodes, or zero if there is no line. Because for a line with no phase-shifting device, the matrix is symmetric. When no node has a connection to ground, every row sums to zero, so the matrix has the same form as a complex-valued graph Laplacian.
Step 3 in symbols: the matrix equation
Stacking the currents and voltages into vectors gives
This is the matrix-vector product from Matrix Multiplication, with one row for each node. Row of dotted with the voltage vector gives the current at node .
Step 4 in symbols: sparsity
is zero unless nodes and are the same or are joined by a line. A network with nodes and lines therefore has at most nonzero entries: diagonal entries and two off-diagonal entries per line. Most of the cells are zero whenever the network is large and each node has only a few neighbours, which is the situation in a grid. The methods for such matrices are covered in Sparse Matrix.
Worked examples
A single node has a 2 ohm resistor from it to ground, and the node voltage is 3 volts.
- The admittance of the resistor is S.
- The matrix is one entry: , since the node has one element and no other node.
- Apply with : A.
- Check with Ohm's law: A.
Interpretation: a one-node matrix is the same as Ohm's law written as . The matrix is a generalisation, not a new rule.
Node 1 and node 2 are joined by a 2 S admittance. Node 1 has a 1 S admittance to ground, and node 2 has a 3 S admittance to ground.
- Diagonal entries, from the rules in step 2: and .
- Off-diagonal entries: . So .
- Check the row sums: row 1 gives , which is the 1 S to ground at node 1. Row 2 gives , the 3 S to ground at node 2.
- Inject 11 A at node 1 and none at node 2, so . Solve and . The second equation gives . Substituting gives , so V and V.
- Check the matrix: and . Both equations hold.
- Check the currents: from node 1 to node 2 the current is A, and from node 1 to ground it is A. Together that is 11 A, the injected current. At node 2, 6 A arrives and A leaves to ground.
Interpretation: the matrix turns a set of loop-free connections into two linear equations, and both can be solved by hand.
A feeder is a line of buses, each joined to the next. Take 10 buses in a chain, with 9 lines and every line having admittance 2 S. There is no shunt to ground.
- Diagonal entries. Bus 1 and bus 10 each have one line, so . Each of the 8 middle buses has two lines, so each has .
- Off-diagonal entries. Each of the 9 lines contributes two entries, . That is nonzero off-diagonal entries.
- Count the nonzeros: diagonal plus off-diagonal gives . The matrix has cells, so 72 are zero.
- Check the structure: every nonzero lies on the diagonal or next to it, so the matrix is tridiagonal, as the chain predicts.
- Scale up, illustratively. A grid with buses and lines has at most nonzeros, out of cells. The density is percent. These numbers are chosen for the calculation, not measured from a real network.
Interpretation: a real grid is almost entirely zeros in its admittance matrix, which is why power flow programs store it in a sparse form.
Try it: a line is added from bus 10 back to bus 1 with admittance 2 S, closing the chain into a ring. How many nonzero entries does the matrix now have?
Answer: every bus now has two lines, so all 10 diagonal entries are nonzero, each equal to 4. There are 10 lines, each giving two off-diagonal entries, so 20 off-diagonal entries. The total is nonzeros.
Common mistakes and tradeoffs
It is tempting to think that the off-diagonal entries are the admittances themselves, with the same sign as the diagonal. In fact the off-diagonal entry is minus the admittance of the line. If the sign is wrong, the check in step 3 fails: equal voltages would produce a current, which cannot happen across a line.
It is tempting to add the admittances of elements in series. In fact impedances add in series and admittances add in parallel. Two 2 ohm resistors in series have impedance 4 ohms and admittance S. Adding their admittances, S, gives the wrong answer. Combine the elements into one impedance first, then take its reciprocal.
It is tempting to think that the admittance matrix is the matrix of impedances. In fact the bus impedance matrix is the inverse of once the reference node has been removed: . That inverse is generally full, not sparse, so the voltages are found by solving with a factorisation, not by forming .
It is tempting to think that the matrix can always be solved. In fact, if no node has any admittance to ground, every row sums to zero, and then is singular, with Determinant zero. The two-node line above is such a case: its determinant is . One node must be chosen as the reference, with its voltage fixed at zero, and that node is removed from the system before solving.
When to use it: a linear network of impedances, driven by sinusoidal sources in steady state, with many nodes. When not to use it: for transient behaviour, use the Laplace Transform; for devices that are not linear, such as some loads, the matrix needs a different treatment; and for a network with only two or three nodes, direct substitution is often quicker.
History
Engineers analysed networks node by node for a long time before the table form became standard, writing one equation per node and solving them by hand. Once digital computers could store and solve large systems of such equations, the same equations were kept as a matrix, and grid studies adopted that form. As grids grew, the sparsity of the matrix became the main concern, and storage and solution methods were chosen for it.
Recap
- The admittance matrix has one row and column per node. Its diagonal entry is the total admittance at a node, and each off-diagonal entry is minus the admittance of the line between two nodes.
- The matrix equation states Kirchhoff's current law at every node at once.
- Each line touches only four entries (two diagonal, two off-diagonal), so the matrix is sparse, and a change to one line updates only those four.
- If no node is connected to ground, the matrix is singular, so one node's voltage must be fixed as the reference before solving.
- Read next: Power Flow Equations, which uses this matrix to find the voltages and powers of a grid, and Sparse Matrix, which covers how such a matrix is stored and solved.
Check yourself
QuestionRecall: what is the entry of the admittance matrix when and are different nodes and no line joins them?Show answer
It is zero. The off-diagonal entry is minus the admittance of the line between the two nodes, and with no line the admittance is zero.
QuestionComputation: three nodes are joined in a chain, node 1 to node 2 with 1 S and node 2 to node 3 with 1 S, and there is no ground connection. Write the matrix and check that its rows sum to zero.Show answer
Node 1 has one line of 1 S, so . Node 2 has two lines, so . Node 3 has one line, so . The off-diagonal entries are and , and the others are zero. So . The rows sum to , and , as expected for a network with no connection to ground.
QuestionWhy: why is the admittance of two elements in series not the sum of their admittances?Show answer
Series elements add their impedances, , and admittance is the reciprocal of impedance. The admittance of the combination is therefore , which is not . Admittances add only for elements in parallel, where they share the same two nodes.
QuestionApplied: the ten-bus chain of worked example 3 has one line cut, between bus 4 and bus 5. Which entries of the admittance matrix change, and what are their new values?Show answer
Only the entries that belong to that line change. Bus 4 and bus 5 each lose one line, so and fall from 4 to 2. The off-diagonal entries and change from to . The other entries are unchanged, and the number of nonzeros falls from 28 to 26.