# A Common Framework for Developing Robust Power-Flow Methods with High Convergence Rate
## 3 Developed PF Solvers  
For the sake of exemplifying, we have developed two novel robust techniques based on the introduced solution paradigms defined by (8) and (13).  
Firstly, we have taken the [PERSON]'s method for solving (7), which brings the following iterative procedure for solving the PF equations:  
\[\left\{\begin{array}{c}\mathbf{y}_{2}^{(k)}\ =\ \mathbf{x}^{(k)}-\mathbf{h}\Big{(} \mathbf{x}^{(k)},\mathbf{x}^{(k)}\Big{)}\\ \mathbf{x}^{(k+1)}\ =\ \mathbf{x}^{(k)}-\frac{1}{2}\Big{[}\mathbf{h}\Big{(}\mathbf{x}^{(k)}, \mathbf{x}^{(k)}\Big{)}+\mathbf{h}\Big{(}\mathbf{y}_{2}^{(k)},\mathbf{x}^{(k)}\Big{)}\Big{]} \end{array}\right.. \tag{23}\]  
On the other hand, taking the developed formulation (13) and considering the Embedded Heun-Euler method, the following iterative procedure for solving the PF equations is introduced:  
\[\left\{\begin{array}{c}\mathbf{y}_{2}^{(k)}\ =\ \mathbf{x}^{(k)}-\mathbf{h}\Big{(} \mathbf{x}^{(k)},\mathbf{x}^{(k)}\Big{)}\\ \mathbf{\hat{x}}^{(k)}\ =\ \mathbf{x}^{(k)}-(1-0)\mathbf{h}\Big{(}\mathbf{x}^{(k)},\mathbf{x}^{(k)} \Big{)}\\ \mathbf{x}^{(k+1)}\ =\ \mathbf{\hat{x}}^{(k)}-\Big{(}1-\frac{1}{2}\Big{)}\mathbf{h} \Big{(}\mathbf{x}^{(k)},\mathbf{x}^{(k)}\Big{)}-\Big{(}0-\frac{1}{2}\Big{)}\mathbf{h} \Big{(}\mathbf{y}_{2}^{(k)},\mathbf{x}^{(k)}\Big{)}\end{array}\right.. \tag{24}\]The developed PF solution techniques require two matrix evaluations (and factorizations) along with a function evaluation each iteration. In addition, they achieve cubic convergence (see Appendix A). As a result of these features, one can guess that the developed techniques are more efficient than those presented in [1; 9; 10]. It is worth remarking on the outstanding features of the developed methods since, besides their intrinsic robustness characteristics that are empirically proved by results (see Section 4), they present a high convergence rate. These two characteristics are very difficult to be found simultaneously in a PF solver.  
For the sake of summarizing, Table 1 shows the \(\mathbf{A}\) matrix and \(\mathbf{b}\) vectors (or \(\mathbf{B}\) matrix), of NR, NRJ, and the developed PF solution methods (23) and (24). To complete the section, the PF solution procedure using any of the developed techniques is summarized in Algorithm 1 using pseudocode. This algorithm aims to serve as a guidance for easily implementing the developed solvers in standard programming languages such as MATLAB or C. It is worth mentioning that this algorithm can be adapted to NR and NRJ by just replacing Equation (23) or (24) by (2) or (6), respectively. In addition, we have considered the failure of our algorithms when they do not converge in a predetermined number of iterations \(k^{\text{max}}\). This situation usually indicates divergence. In the pseudocode of Algorithm (1), the parameter _tolerance_ makes mention of a predefined value beyond which it is assumed that the calculated solution is accurate enough and the algorithm may be determined successfully convergent. It is worth noting that the iterative nonlinear algorithms are unable to calculate the exact solution as in the case of linear systems; therefore, it is customary to establish a threshold for determining when the correct solution is sufficiently approached. Typical values for convergence tolerances in PF studies are fixed below \(10^{-4}\)[7; 8; 9; 10; 11].  
```
1:Set iteration counter: \(k\gets 0\)
2:Initial variable guess: \(x^{(k)}\gets x^{(0)}\)
3:#Iterations
4:while\(\left\|\mathbf{g}\big{(}x^{(k)}\big{)}\right\|_{\infty}>\)tolerancedo
5: Solve (23) # _or (24)_
6: Update iteration counter: \(k\gets k+1\)
7:if\(k\geq k^{\text{max}}\)then
8:break #fail
9:endif
10:enddo
11:return solution \(x^{(k)}\)
```  
**Algorithm 1**Developed PF solution techniques