Load flow studies form the basis for the steady-state analysis of power systems and are performed for a wide range of applications from planning to operations. The studies are typically conducted using computer software packages such as PSSE, DIgSILENT PowerFactory, ETAP, PowerWorld and SKM Power*Tools.

The load flow (or power flow) calculation solves for four steady-state electrical quantities (at each bus and branch element):

- Voltage V at each bus
- Phase angle Φ at each bus
- Active power flow P through each branch element
- Reactive power flow Q through each branch element

We can use these four basic electrical quantities to calculate other quantities of interest, for example:

- Apparent power S through each branch element
- Current I flowing through each branch element
- Loading of branch elements (e.g. transformers, cables, etc) based on continuous and short-term equipment ratings
- Voltage drop between buses
- Total system load
- Total amount of generation dispatched
- Network losses

These calculated quantities are of interest to electrical network operators and design engineers in order to ensure that the power system operates efficiently and within limits. The rest of this article will talk about the generic structure of a commercial power flow solver / algorithm and how to debug convergence problems.

**Algorithm Structure**

Power flow solution algorithms are typically comprised of inner and outer loops:

- The
**inner loop**calculates the main iterations of the solver (e.g. Newton-Raphson, Gauss-Seidel, etc) in order to minimise the power (or current) mismatch equations. - The
**outer loop**is used to check and satisfy control conditions (e.g. auto tap changer / shunt control) and limiting behaviour (e.g. generator reactive power limits).

Note that automatic tap or shunt control is sometimes included in the inner loop, but only when continuous tap/shunt steps are used. When automatic tap and shunt control is incorporated in the outer loop, the power flow algorithm will attempt to switch the positions of the taps and shunts at the end of every inner loop iteration to satisfy the control conditions (e.g. bus voltage or branch power flow setpoints).

**Diagnosing Convergence Issues**

When a load flow fails to converge, the first step to diagnosing the problem is to identify whether the algorithm has failed in the inner or outer loop.

An inner loop problem signifies that the Newton-Raphson equations could not be solved, which could be due to ill-conditioning, voltage stability issues, etc. This usually results in a program error message stating that the algorithm has either diverged or stagnated.

On the other hand, when the problem is in the outer loop, the Newton-Raphson equations can be solved, but control conditions can’t be met (e.g. voltage setpoint could not be reached with transformer taps at maximum / minimum settings or are hunting between two tap steps). Typically, a maximum number of outer loop iterations must be reached before an error is reported by the program.

**Tackling Inner Loop Problems**

As mentioned earlier, inner loop problems suggest that the system is ill-conditioned and the Newton-Raphson algorithm either diverges or is stuck in a local minimum (i.e. stagnated). Mismatches in generation, poor distribution of generator dispatch and local voltage stability issues are among the common causes for an inner loop problem:

**Mismatches in generation and load**: when there is a large mismatch in generation and load (i.e. over- or under-generation), the discrepancy in active power has to be supplied or absorbed by the slack element. Depending on the location of the slack element, this can lead to large power flows from one part of the network to another, which can cause imbalances in the voltage profile and lead to convergence problems.**Distribution of generator dispatch**: similar to mismatches in generation, poor distribution of dispatched generation can lead to large unwanted power flows from one part of the network to another.**Local voltage stability**: relates to busbars reaching the nose point of the PV curve (voltage collapse). This could be very localised due to large loads placed at weak radial parts of the network without sufficient reactive compensation, or could affect larger areas where multiple buses have depressed voltages.

Some approaches to resolving inner loop problems are as follows:

**Turn off enforce reactive power limits option**: most programs have an option to limit the reactive power output of PV buses (generators, SVCs, etc) so that they are within their reactive power capability curves. When a PV bus reaches limits, it is converted to a PQ bus in the outer loop with the reactive power set to its limits and the inner loop is run again, which can then fail due to voltage stability reasons (i.e. the PV bus is supporting the local voltage, but with limits enforced, voltages can go wild). Turning this option off can help diagnose which generators, SVCs, etc are supplying / absorbing large amounts of reactive power and their associated problem buses.**Change the location of the slack element and distribute generator dispatch**: so that there are more balanced flows through the network. Some programs have a*distributed slack bus*option that automatically caters for mismatches in generation by distributing the slack across all in-service generators according to their nominal ratings.**Switch in or add shunt compensation**: in order to support weak buses that may have voltage stability problems.

**Tackling Outer Loop Problems**

Outer loop problems are normally associated with voltage control issues from the following elements:

- Generators – reaching their reactive power capability limits
- SVCs – reaching their reactive power capability limits
- Transformer automatic tap changers – reaching maximum tap settings without satisfying voltage setpoint tolerances
- Shunt controllers – reaching maximum shunt steps without satisfying voltage setpoint tolerances

Some approaches to resolving outer loop problems are as follows:

**Increase the maximum number of outer loop iterations**: particularly for larger systems, the outer loop solution may take many iterations.**Change voltage control setpoints and tolerances**: the bus voltage setpoints and tolerances can be adjusted to help the solution along.**Lock taps and/or shunts**: automatic transformer tap and shunt adjustment options can be de-selected to lock the taps and shunts at their initial positions.**Reset taps and/or shunts**: the initial tap and shunt positions may not be well configured for the particular scenario. Reset tap positions by setting all transformers to neutral tap and re-configure initial shunt positions to better control system voltages (e.g. if you know that a bus has a low voltage, put some capacitors in service).