As we have seen, the power flow routines compute the voltage at every bus of an island grid. However we do not get from those routines the “power flow” values, this is the power that flows through the branches of the grid. In this section I show how the post power flow values are computed.

First we compute the branches per unit currents:  These are matrix-vector multiplications. The result is the per unit currents flowing through a branch seen from the from bus or from the to bus.

Then we compute the power values:  These are element-wise multiplications, resulting in the per unit power flowing through a branch seen from the from bus or from the to bus.

Now we can compute the losses in MVA as:  • : From and To bus-branch admittance matrices
• : Array of currents at the from buses in p.u.
• : Array of currents at the to buses in p.u.
• : Array of powers at the from buses in p.u.
• : Array of powers at the to buses in p.u.
• : Array of voltages at the from buses in p.u.
• : Array of voltages at the to buses in p.u.
• : Array of branch ratings in MVA.