-
Notifications
You must be signed in to change notification settings - Fork 31
2.3. Network Model
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, which can then be solved algebraically.
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. [I] = [Ybus] [V]
In PYPOWER-Dynamics, the network model is built from a standard PYPOWER case and the power flow solution used is the PYPOWER Newton-Raphson algorithm.
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 [V] = [Ybus]^-1 [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. If a generator is connected to bus 'i', then following source admittances are commonly added to the 'ith' diagonal element of the Ybus matrix:
-
Classical Machine:
-
4th Order Machine:
-
6th Order Machine:
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:
With load admittances integrated in the Ybus matrix, current injections for loads are then set to zero.
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 [V] = [Ybus]^-1 [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.
In PYPOWER-Dynamics, the splu
function from the scipy.sparse.linalg
library is used to factorise the Ybus matrix.