In dynamic time-domain simulations, the network model is based on a steady-state power flow solution, which also provides the initial conditions for the dynamic models. For stability simulations, it is commonly assumed that network variables (i.e. voltages and currents) change instantaneously, obviating the need to represent network variables with differential equations (due to inductances and capacitances) and instead representing them as phasor quantities.

Furthermore, rather than having to solve the network equations iteratively at every time step of the simulation (e.g. with a Newton-Raphson algorithm), the bus admittance (Ybus) matrix is modified so that bus voltages can be solved directly based on current injections, i.e.

${\boldsymbol {I}}=[Y_{bus}]{\boldsymbol {V}}\,$ where ${\boldsymbol {I}}$ is a vector of current injections

${\boldsymbol {V}}$ is a vector of bus voltages
$[Y_{bus}]\,$ is the bus admittance matrix

## Treatment of Generators / Sources

Generators (and other sources) are normally interfaced to the network via a source impedance (R + jX), where the source impedance is inserted into the Ybus matrix as a diagonal shunt admittance.

In principle, it isn't mathematically necessary to do this and it would suffice to have generator currents injected directly into the connected bus. However, the Ybus matrix is inherently near-singular and is actually singular when there are no shunt elements connected to the system (e.g. loads, shunt reactive plant, lines with shunt branches, etc). In a network with no shunt elements, for example a simple single machine infinite bus (SMIB) system, the Ybus matrix is singular and the direct solution ${\boldsymbol {V}}=[Y_{bus}]^{-1}{\boldsymbol {I}}$ would not be possible. Therefore, inserting the source impedance into the Ybus matrix has the effect of making it non-singular and invertible. In a more general sense, adding the source impedance conditions the Ybus matrix and leads to more numerically stable network solutions.

The choice of source admittance will affect the calculation of the generator current injections into the network. The following source admittances are commonly used:

${\boldsymbol {Y}}_{g}={\frac {R_{a}-jX'_{d}}{R_{a}^{2}+(X'_{d})^{2}}}\,$ ${\boldsymbol {Y}}_{g}={\frac {R_{a}-j{\frac {1}{2}}(X'_{d}+X'_{q})}{R_{a}^{2}+X'_{d}X'_{q}}}\,$ ${\boldsymbol {Y}}_{g}={\frac {R_{a}-j{\frac {1}{2}}(X''_{d}+X''_{q})}{R_{a}^{2}+X''_{d}X''_{q}}}\,$ In dynamic simulations, generic loads are normally treated as constant admittance type loads. This is in contrast to a typical power flow formulation, where loads are normally treated as constant power (PQ). The reason why loads are treated as constant admittance is so that they can be inserted directly into the Ybus matrix as diagonal shunt elements. This means that loads are dealt with automatically by the direct network solution without having to explicitly calculate load current injections.

If a load is connected to bus 'i', then The load admittance added to the 'ith' diagonal element of the Ybus matrix is:

${\boldsymbol {Y_{load}}}={\frac {P_{i}-jQ_{i}}{V_{i}^{2}}}\,$ where $P_{i}\,$ and $Q_{i}\,$ are the load active and reactive powers respectively at bus 'i'

$V_{i}\,$ is the voltage magnitude at bus 'i'

With load admittances integrated in the Ybus matrix, current injections for loads are then set to zero.

## Factorisation of the Ybus Matrix

The modified Ybus matrix rarely changes during a dynamic simulation and will typically only change after an event has altered the network topology in some way (e.g. connecting or disconnecting lines, transformers, loads, shunts, etc). In order to speed up the calculation of ${\boldsymbol {V}}=[Y_{bus}]^{-1}{\boldsymbol {I}}$ , the Ybus matrix can be factorised, for example with an LU factorisation, and the factorised matrix can be re-used for multiple iterations. The Ybus matrix is generally only re-factorised after an event.