-
Notifications
You must be signed in to change notification settings - Fork 34
2.7. Solving Network Equations
In a partitioned approach like the one used in PYPOWER-Dynamics, the algebraic network equations are solved in an iterative fashion as follows:
- Calculate current injections for machines interfaced to the network
- Solve for network bus voltages based on machine current injections
- Repeat steps 1 and 2 until the differences in calculated bus voltages between the last two iterations are within a maximum error tolerance (convergence) or a maximum number of iterations is reached (non-convergence)
The current injections for each machine are calculated as described in the network interfacing section. Note that the state variables are not updated during iterations of the network solution.
As described in the network model section, the network bus voltages are solved directly at each iteration as follows:
[V] = [Ybus]^-1 [I]
where I is the vector of current injections, [Ybus] is the modified bus admittance matrix and V is the vector of bus voltages.
Recall also that the Ybus matrix remains constant unless there is an event and is factorised into lower-upper triangular form only during initialisation and after events so that the bus voltages can be readily solved with back-substitution and multiplication. In PYPOWER-Dynamics, the solve function of the Ybus matrix is used (solve is inherited from the Scipy sparse array object).
The network equations are solved every time the machine algebraic variables are interfaced to the network, i.e. after every stage of numerical integration (twice in the modified Euler algorithm and four times in the 4th-order Runge Kutta algorithm).