# Distributed Generation Cluster Division Method Considering Frequency Regulation Response Speed
## 4 Cluster Division Solution Based on Adaptive GA  
### Proposed Method  
The proposed cluster performance index quantifies the structural strength of clusters and the performance of the system in providing frequency support, according to which the direction of cluster division can be guided. The metric system proposed in this paper mainly considers the structural and functional aspects of clusters. Given the complexity of the actual divided network, the attribution of nodes within clusters and the mutations of the power of each node have a significant impact on the performance of divided small clusters, and it is difficult for the conventional solution algorithm to search for the global optimal performance metric. Therefore, this paper uses a GA that takes into account the global search capability for cluster division, and the solution process ensures that the global optimal solution is gradually approached as the number of iterations increases. Traditional GAs are encoded in binary or floating point numbers and usually solve numerical optimization problems. In order to adapt to cluster division and further improve the convergence speed and global search capability of the algorithm, this paper improves the GA in two aspects: encoding and self-adaptability. The first problem is chromosome encoding. Considering the specificity of the cluster division problem, i.e., the connectivity constraint of individuals within a cluster, this paper takes the adjacency matrix of the network as the basis for encoding the chromosome. This encoding method not only ensures the connectivity of nodes but also greatly reduces the search range of the GA and the search time as each individual is a connected individual. At the same time, this encoding method does not have the node merging process of the general algorithm; it uses a probabilistic mechanism for iteration and has a strong search capability for irregular clusters. Figure 3 illustrates the adjacency matrix encoding approach. The second problem is adaptation, which is mainly reflected in the improved convergence speed and global search capability of the GA, which adaptively adjusts the crossover  
Figure 3: Chromosome coding based on adjacency matrix. and mutation rates. The adjustment formula follows the following principle: if the individual is poor, i.e., its fitness value is smaller than the average fitness value, it is given a larger crossover probability and a smaller mutation probability; if the individual is good, i.e., the individual fitness value is larger than the average fitness value, it is given a corresponding crossover and mutation probability according to its iteration status. The higher the number of iterations, the more similar the pattern of individuals, i.e., the closer the clusters are to each other. Accordingly, the high individual crossover probability loses its meaning, and the mutation probability should be increased appropriately to improve the local search capability of the algorithm. In this paper, the reconciliation method proposed by [PERSON] et al. is used, as shown in Equations (8) and (9):  
\[p_{c}= \begin{cases}p_{c,\max}-\left(\frac{p_{c,\max}-p_{c,\min}}{I_{\max}} \right)I&f>f_{avg}\\ p_{c,\max}&f\leq f_{avg}\end{cases}  \tag{14}\]  
\[p_{m}= \begin{cases}p_{m,\min}-\left(\frac{p_{m,\max}-p_{m,\min}}{I_{\max}} \right)I&f^{\prime}>f_{avg}\\ p_{m,\min}&f^{\prime}\leq f_{avg}\end{cases} , \tag{15}\]  
where \(p_{c}\) and \(p_{m}\) are the crossover and mutation probability, respectively, and \(p_{c,\max}\), \(p_{c,\min}\), \(p_{m,\max}\), and \(p_{m,\min}\) are the maximum and minimum values of crossover and mutation probability, respectively. The crossover probability is typically taken to be 0.4-0.99, and the variance probability is typically taken to be 0.0001-0.1.