## 3 Materials and Methods
### Case Studies: Distribution Systems  
The problem of optimal location and sizing of PV systems to reduce energy losses was raised and validated in the 33-node system, shown in Figure 2, and in the 69-node system, shown in Figure 3. These figures show the radial configuration of the distribution systems, whose base parameters are \(V_{base}=12.66\) kV and \(S_{base}=1000\) kVA taken at the slack node. For each one, the installation of three PV systems with a capacity of 0-2000 kW was considered.  
Figure 1: Flowchart of the proposed power flow method based on successive approximations.  
Figure 2: IEEE radial 33-node test system.  
```
Enter data of the distribution network;  Establish the number of PV systems to install to define the center \(\mu_{0}\) with (7);  Create the neighboring solutions of the center of the solution space \(C_{i}^{t}(x)\) with (8);  Define the initial radius \(r_{0}\) of the hyper-ellipse with (10);  Verify the upper limit \(x^{max}\) and lower limit \(x^{min}\) of the candidate solutions \(C_{i}^{t}(x)\)  with (11);  Solve the power flow for each of the solutions \(C_{i}^{t}(x)\) with (1);  Calculate the value of energy losses for each of the solutions \(C_{i}^{t}(x)\) with (16);  Find the minimum value of energy losses for each solution \(C_{i}^{t}(x)\) with (1); for\(t\)=1 :\(t_{max}\)do  Replace the center of the hyper-ellipse \(\mu\) with the best solution of \(C_{i}^{t}(x)\);  Determine the new radius of the hyper-ellipse \(r_{t}\) with (14);  Generate the new set of neighboring solutions \(C_{i}^{t}(x)\) with (8);  Verify the upper limit \(x^{max}\) and lower limit \(x^{min}\) of the candidate solutions \(C_{i}^{t}(x)\) with (11);  Solve the power flow for each of the solutions \(C_{i}^{t}(x)\) with (1);  Find the value of \(E_{loss}\)energy losses for each of the solutions \(C_{i}^{t}(x)\) with (16);  Determine the minimum value of energy losses \(\min\{E_{\text{loss}}\}\) for each of the solutions \(C_{i}^{t}(x)\) with (1); if\(\tau\geq\tau_{max}\)then  Present the solution of the problem as the center \(\mu\) of the current  hyper-ellipsoid; break;  end if  end for Result: Report the optimal solution found
```  
**Algorithm 1**Implementation of the DCVSA algorithm for the optimal location and dimensioning of PV systems in distribution networks.  
The electrical parameters of connection between active and reactive power nodes, resistance, and reactance of the systems are shown [14]. Likewise, it is necessary to mention that these systems are urban distributions that feed industrial users as they have a single main generator that supplies a demand of 3.715 MW and 2.300 MVAr at peak hours in the 33-node system and 3.802 MW and 2.694 MVAr in the method of 69 nodes.  
Table 2 demonstrates the variation in active power that a PV system can inject and the characteristic demand for the study proposed in this article.  
According to Table 2, the pick load scenario occurs at hour 19, while the PV system will have variable generation from 8:00 a.m. to 7:00 p.m. The data of the percentage of consumption and energy availability for the PV system can be found in [14].  
Figure 3: IEEE radial 69-node test system.