## 3 Proposed GIS-Based Approach
### PSs Optimal Siting
#### 3.2.3 Overview of the PSs Siting Optimization Approach  
Figure 16 shows the flowchart of the optimization approach. The first step of the procedure requires loading the input data: the number of new PSs to be installed, the candidate squares for PSs settlement, and the power demand of the squares. Later on, PSO parameters and the starting solution are selected: \(w=1\), \(c_{1}=c_{2}=2\), number of paricles equal to 100, 150 iterations. At the end of each iteration, the weight \(w\) is damped by a \(w_{damp}=0.95\), to reduce the acceleration through the iteration process. Moreover, on the one hand, we load the extreme coordinates of the grid, i.e., \(X_{min}=\) 1,504,229 \(-\)\(X_{max}=\) 1,519,789; \(Y_{min}=\) 5,027,479 \(-\)\(Y_{max}=\) 5,041,474, and using a random function, we selected the initial position of the new PSs within this range. On the other hand, we initialize to zero all the particles' velocities. Additionally, a limit on \(X\) and \(Y\) velocities is also imposed equal to 10% of \((X_{max}-X_{min})\) and \((Y_{max}-Y_{min})\). Lastly, the initial PSs location is checked, and the PSs felt out of the candidate squares are moved to the closest available square.  
The next step of the methodology is to run the PSO algorithm. The fitness function of each particle is evaluated first. Referring to Figure 17, each square is labeled with the nearest PSs using Equation (6). For instance, square 1 falls in the service area of the PS called New \(PS_{1}\), being \(d_{w}(p_{1},New\ PS_{1})=|p_{1}-New\ PS_{1}|\ w_{p1}\) the smaller distance to all the PSs. Evaluating \(d_{w}(p_{i},PS_{i})\) for each square, the fitness function is computed as in Equation (7):  
\[\text{Fitness}=\sum_{i=1}^{n^{c}\ squares}\frac{d_{w}(p_{i},PS_{i})}{\sum_{j=1 }^{n^{c}\ PS_{i}}\ P_{PS_{j}}} \tag{7}\]  
where \(P_{PS_{j}}\) is the power demand of the PS \(PS_{j}\), the sum of the power demand of the squares belonging to the \(PS_{j}\) service area. Therefore, the fitness is the weighted mean of the distances between each square and the related PSs biased by the squares' power demand.  
Figure 15: Example of weighted Voronoi diagram approach for PS location.  
The weighted Voronoi approach is also used to compute the PS loadings. The particles with a power demand greater than 75% of the PS transformers' nominal power are excluded from the personal and global best computation. This constraint allowed us to save a reasonable power margin for the feeder's backup purposes. Regarding the new PSs, the Unareti standard is to install three transformers with a nominal power of 63 MW each. Thus, the new PS power limit is \(P_{PS\_max}=0.75\times 3\times 63=142\) MW. Finally, the position of the new PSs is compared with the location of the PSs included in the Unareti developing plan and the existing MV substations. If a PS suggested from the PSO is nearer than 750 away, its position is updated to take the advantages of using already investigated lands (authorizations, etc.) or using existing space. The output of the optimization process gives the best locations of the new PSs, their service areas, and the power demand.  
Figure 16: Flowchart of the optimization approach.  
Figure 17: Example of computing the Fitness function.