## 4 Numerical Example  
This section presents a small test feeder comprising 13 nodes that can handle radial or mesh configurations. This facilitates the demonstration of the convergence of the proposed matricial reformulation of the classical backward--forward power flow approach. Figure 2 presents the electrical configuration of the 13-node test feeder.  
Table 2 lists the branch and load information for the 13-node test feeder that has a total demand of active and reactive power of 24,200 kW and 7700 kVAr, respectively, and it operates on a line-to-neutral voltage of 23 kV.  
To solve the power-flow problem in the 13-node test feeder, we consider the following: (i) a radial configuration is reached when all the dashed lines in Figure 2 are open, and a meshed configuration is obtained when one or more dashed lines are connected; (ii) the recursive formula (12) was implemented in MATLAB using scripts in a tutorial style.  
Figure 3 reports the MATLAB implementation of the proposed matricial backward-forward (MBF) power flow while considering the meshed configuration for the 13-node test feeder depicted in Figure 2.  
In the MATLAB implementation presented in Figure 3, we can observe the following:  
* From lines 1 to 36, all the numerical information in the test system is presented and transformed into a per-unit representation.
* Lines 37 to 48 comprise the branch-to-node incidence matrix, impedance matrix, and all the constant components for evaluating the recursive power-flow formula.
* From lines 49 to 59, the iterative procedure for solving the power-flow problem while considering a matricial formulation is implemented while considering a convergence tolerance of approximately \(\epsilon=1\times 10^{-10}\). It should be noted that lines 53 and 54 present the required calculations for determining the total grid power losses using branch variables, i.e., \(\mathbb{J}\) and \(\mathbb{E}\), and the line impedance matrix \(\mathbb{Z}\).  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Node \(i\)** & **Node \(j\)** & \(R_{ij}\) [\(\Omega\)] & \(X_{ij}\) [\(\Omega\)] & \(P_{j}\) [kW] & \(Q_{j}\) [kvar] \\ \hline
1 & 2 & 0.3968 & 0.5290 & 2000 & 1600 \\
2 & 3 & 0.4232 & 0.5819 & 3000 & 400 \\
2 & 4 & 0.4761 & 0.9522 & 2000 & -400 \\
4 & 5 & 0.2116 & 0.2116 & 1500 & 1200 \\
1 & 6 & 0.5819 & 0.5819 & 4000 & 2700 \\
6 & 7 & 0.4232 & 0.5819 & 5000 & 1800 \\
6 & 8 & 0.5819 & 0.5819 & 1000 & 900 \\
7 & 9 & 0.5819 & 0.5819 & 600 & -400 \\
1 & 10 & 0.5819 & 0.5819 & 1000 & 900 \\
10 & 11 & 0.4761 & 0.6348 & 1000 & -1100 \\
10 & 12 & 0.4232 & 0.5819 & 1000 & 900 \\
12 & 13 & 0.2116 & 0.2116 & 2100 & -800 \\ \hline \multicolumn{5}{c}{Tie-lines} \\ \hline
3 & 9 & 0.2116 & 0.2116 & — & — \\
8 & 11 & 0.2116 & 0.2116 & — & — \\
5 & 13 & 0.4761 & 0.6348 & — & — \\ \hline \hline \end{tabular}
\end{table}
Table 2: Branch and load parameters of the 13-node test feeder.  
Figure 2: Electrical configuration of a radial/mesh distribution network (adapted from [31]).  
Lines 60 to 65 comprise the \(\theta\) coefficients for all the loads for proving that each of them fulfills the [PERSON] fixed-point theorem condition.  
It is important to mention that if the last three lines related to the branches are removed in the matrix (see Figure 3), then the radial test system can be evaluated. However, Figure 4 presents the \(\theta-\)coefficient for the radial and mesh 13-node configurations.  
From Figure 4, it can be concluded that expression (19) is fulfilled for all the demand nodes as the \(\theta\) values are between 0 and 1. For both the simulation cases, the maximum value of \(\theta\) is reached at node 7 and is 0.016 and 0.009 in the case of the radial and meshed configurations, respectively. It should be noted that, in the case of the meshed configuration, the minimum voltage is 0.983 p.u at node 7, and in the radial configuration, this value is 0.976 p.u at node 9.  
Figure 3: MATLAB implementation of the matricial iterative sweep power flow.