Search

Search papers and lessons

Admittance Matrix

Level 3 · 13 min read

The admittance matrix collects the admittances of every line in a network into one table, so that the node currents equal the matrix times the node voltages.

On this page

  • Colour = topic mix
  • Calculus
  • Linear algebra
  • Electromagnetism
  • Discrete math
  • Electrical engineering
  • Classical mechanics
  • ReadReady to readNot yet

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 Z=0.5iZ = 0.5i ohms, a pure reactance of 0.5 ohms, so its resistance (the real part) is zero. The engineering convention writes the imaginary unit as jj, but this lesson uses ii to match Electrical Impedance. Find the admittance of the line, then build the matrix, then check it.

  1. Find the admittance of the line. The admittance is the reciprocal of the impedance: y=1/Z=1/(0.5i)y = 1/Z = 1/(0.5i). Since 1/i=−i1/i = -i, this gives y=2⋅(−i)=−2iy = 2 \cdot (-i) = -2i. Check: multiplying back, (−2i)(0.5i)=−i2=1(-2i)(0.5i) = -i^2 = 1, so yy is the reciprocal of ZZ.

  2. Fill the matrix. Each node has one line, so its diagonal entry is the admittance of that line: Y11=Y22=−2iY_{11} = Y_{22} = -2i. The off-diagonal entries are the negative of the line's admittance: Y12=Y21=2iY_{12} = Y_{21} = 2i. The matrix is

Y=(−2i2i2i−2i).Y = \begin{pmatrix} -2i & 2i \\ 2i & -2i \end{pmatrix}.

Check: each row adds to zero, −2i+2i=0-2i + 2i = 0. That is expected, because nothing connects the network to ground.

  1. Apply the matrix to equal voltages. Set both node voltages to 1 (the same value at both nodes). Then the injected currents are I1=Y11V1+Y12V2=−2i+2i=0I_1 = Y_{11}V_1 + Y_{12}V_2 = -2i + 2i = 0, and I2=0I_2 = 0 by the same sum. Check: equal voltages across a line make no current flow, so zero is the right answer.

  2. Apply the matrix to one node held at zero. Set V1=1V_1 = 1 and V2=0V_2 = 0. Then I1=−2iI_1 = -2i and I2=2iI_2 = 2i. Check: the current leaving node 1 along the line is (V1−V2)/Z=1/(0.5i)=−2i(V_1 - V_2)/Z = 1/(0.5i) = -2i, which matches I1I_1.

  3. 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

Definition: Admittance matrix

For a network of nn nodes, with voltages V1,…,VnV_1, \dots, V_n measured from a reference node, the admittance matrix YY is the n×nn \times n matrix whose entries are given by the rules below, so that the vector of injected currents I\mathbf{I} satisfies I=YV\mathbf{I} = Y\mathbf{V}. Here IiI_i is the current injected into the network at node ii.

Admittance is the reciprocal of impedance, y=1/Zy = 1/Z, measured in siemens (S), where 1 S is 1 per ohm. It is a complex number y=G+iBy = G + iB, where GG is the conductance and BB is the susceptance. For a resistor of RR ohms, y=1/Ry = 1/R with B=0B = 0. In step 1 the line has G=0G = 0 and B=−2B = -2.

Step 2 in symbols: the entries

Let yiky_{ik} be the admittance of the line between nodes ii and kk, and let yi0y_{i0} be the admittance from node ii to ground, which is zero if there is none. The current that flows from node ii into the line toward node kk is yik(Vi−Vk)y_{ik}(V_i - V_k). Kirchhoff's current law says that the current injected at node ii equals the sum of the currents leaving it through its lines:

Ii=∑k≠iyik(Vi−Vk)+yi0Vi.I_i = \sum_{k \neq i} y_{ik}(V_i - V_k) + y_{i0} V_i.

Collect the terms in each voltage:

Ii=(∑k≠iyik+yi0)Vi−∑k≠iyikVk.I_i = \Bigl(\sum_{k \neq i} y_{ik} + y_{i0}\Bigr) V_i - \sum_{k \neq i} y_{ik} V_k.

Comparing this with Ii=∑kYikVkI_i = \sum_k Y_{ik} V_k gives the two rules that define the matrix:

Yii=∑k≠iyik+yi0,Yik=−yik(k≠i).Y_{ii} = \sum_{k \neq i} y_{ik} + y_{i0}, \qquad Y_{ik} = -y_{ik} \quad (k \neq i).

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 yik=ykiy_{ik} = y_{ki} 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

Ii=∑k=1nYikVkfor each i,orI=YV.I_i = \sum_{k=1}^{n} Y_{ik} V_k \qquad \text{for each } i, \qquad \text{or} \qquad \mathbf{I} = Y\mathbf{V}.

This is the matrix-vector product from Matrix Multiplication, with one row for each node. Row ii of YY dotted with the voltage vector gives the current at node ii.

Step 4 in symbols: sparsity

YikY_{ik} is zero unless nodes ii and kk are the same or are joined by a line. A network with nn nodes and LL lines therefore has at most n+2Ln + 2L nonzero entries: nn diagonal entries and two off-diagonal entries per line. Most of the n2n^2 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

Example
1. One resistor to ground (tiny)

A single node has a 2 ohm resistor from it to ground, and the node voltage is 3 volts.

  1. The admittance of the resistor is y=1/R=1/2=0.5y = 1/R = 1/2 = 0.5 S.
  2. The matrix is one entry: Y=(0.5)Y = (0.5), since the node has one element and no other node.
  3. Apply I=YV\mathbf{I} = Y\mathbf{V} with V=3V = 3: I=0.5×3=1.5I = 0.5 \times 3 = 1.5 A.
  4. Check with Ohm's law: I=V/R=3/2=1.5I = V/R = 3/2 = 1.5 A.

Interpretation: a one-node matrix is the same as Ohm's law written as I=YVI = YV. The matrix is a generalisation, not a new rule.

Example
2. Three elements at two nodes (standard)

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.

  1. Diagonal entries, from the rules in step 2: Y11=2+1=3Y_{11} = 2 + 1 = 3 and Y22=2+3=5Y_{22} = 2 + 3 = 5.
  2. Off-diagonal entries: Y12=Y21=−2Y_{12} = Y_{21} = -2. So Y=(3−2−25)Y = \begin{pmatrix} 3 & -2 \\ -2 & 5 \end{pmatrix}.
  3. Check the row sums: row 1 gives 3−2=13 - 2 = 1, which is the 1 S to ground at node 1. Row 2 gives −2+5=3-2 + 5 = 3, the 3 S to ground at node 2.
  4. Inject 11 A at node 1 and none at node 2, so I=(11,0)\mathbf{I} = (11, 0). Solve 3V1−2V2=113V_1 - 2V_2 = 11 and −2V1+5V2=0-2V_1 + 5V_2 = 0. The second equation gives V1=2.5V2V_1 = 2.5 V_2. Substituting gives 7.5V2−2V2=117.5V_2 - 2V_2 = 11, so V2=2V_2 = 2 V and V1=5V_1 = 5 V.
  5. Check the matrix: 3×5−2×2=113 \times 5 - 2 \times 2 = 11 and −2×5+5×2=0-2 \times 5 + 5 \times 2 = 0. Both equations hold.
  6. Check the currents: from node 1 to node 2 the current is (5−2)×2=6(5 - 2) \times 2 = 6 A, and from node 1 to ground it is 5×1=55 \times 1 = 5 A. Together that is 11 A, the injected current. At node 2, 6 A arrives and 2×3=62 \times 3 = 6 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.

Example
3. A radial feeder of ten buses (realistic)

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.

  1. Diagonal entries. Bus 1 and bus 10 each have one line, so Y11=Y10,10=2Y_{11} = Y_{10,10} = 2. Each of the 8 middle buses has two lines, so each has Yii=4Y_{ii} = 4.
  2. Off-diagonal entries. Each of the 9 lines contributes two entries, Yi,i+1=Yi+1,i=−2Y_{i,i+1} = Y_{i+1,i} = -2. That is 1818 nonzero off-diagonal entries.
  3. Count the nonzeros: 1010 diagonal plus 1818 off-diagonal gives 2828. The matrix has 10×10=10010 \times 10 = 100 cells, so 72 are zero.
  4. Check the structure: every nonzero lies on the diagonal or next to it, so the matrix is tridiagonal, as the chain predicts.
  5. Scale up, illustratively. A grid with n=1000n = 1000 buses and L=1500L = 1500 lines has at most n+2L=4000n + 2L = 4000 nonzeros, out of 10610^6 cells. The density is 4000/106=0.44000 / 10^6 = 0.4 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 10+20=3010 + 20 = 30 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 1/4=0.251/4 = 0.25 S. Adding their admittances, 0.5+0.5=10.5 + 0.5 = 1 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 YY once the reference node has been removed: Zbus=Y−1Z_{\text{bus}} = Y^{-1}. That inverse is generally full, not sparse, so the voltages are found by solving YV=IY\mathbf{V} = \mathbf{I} with a factorisation, not by forming Y−1Y^{-1}.

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 YY is singular, with Determinant zero. The two-node line above is such a case: its determinant is (−2i)(−2i)−(2i)(2i)=−4−(−4)=0(-2i)(-2i) - (2i)(2i) = -4 - (-4) = 0. 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 I=YV\mathbf{I} = Y\mathbf{V} 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 YikY_{ik} of the admittance matrix when ii and kk 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 Y11=1Y_{11} = 1. Node 2 has two lines, so Y22=2Y_{22} = 2. Node 3 has one line, so Y33=1Y_{33} = 1. The off-diagonal entries are Y12=Y21=−1Y_{12} = Y_{21} = -1 and Y23=Y32=−1Y_{23} = Y_{32} = -1, and the others are zero. So Y=(1−10−12−10−11)Y = \begin{pmatrix} 1 & -1 & 0 \\ -1 & 2 & -1 \\ 0 & -1 & 1 \end{pmatrix}. The rows sum to 00, 00 and 00, 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, Z=Z1+Z2Z = Z_1 + Z_2, and admittance is the reciprocal of impedance. The admittance of the combination is therefore 1/(Z1+Z2)1/(Z_1 + Z_2), which is not 1/Z1+1/Z21/Z_1 + 1/Z_2. 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 Y44Y_{44} and Y55Y_{55} fall from 4 to 2. The off-diagonal entries Y45Y_{45} and Y54Y_{54} change from −2-2 to 00. The other entries are unchanged, and the number of nonzeros falls from 28 to 26.

Sources