Method and device for site selection and capacity determination of distribution network substation based on improved K-means algorithm

Through the improved K-mean algorithm, the location and capacity of the distribution network substation are automatically adjusted, and the problem of great influence of human factors in the existing technology is solved, and the location selection of the distribution network substation is realized is automated and accurate, and it is adapted to various planning areas. Improve the economical and operating reliability of power grid construction.

CN112258231BActive Publication Date: 2024-11-05STATE GRID XINJIANG ELECTRIC POWER CO ECONOMIC TECH RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011138416.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-22
Publication Date
2024-11-05
Estimated Expiration
2040-10-22

AI Technical Summary

Technical Problem

The existing distribution network substation site selection method requires manual setting of different control parameters, which leads to great influence of human factors and is difficult to promote and apply to various planning areas.

Method used

Using the improved K-mean algorithm, the location and capacity of the substation are automatically adjusted by determining the initial clustering center and iterative clustering process, and the substation site selection and capacity are automatically determined according to the load value and position, and the total load threshold is set for secondary adjustment. , ensure that the location selection approaches the optimal solution.

Benefits of technology

There is no need to set parameters manually, adapt to various planned areas, improve the automation and accuracy of distribution network substation site selection, and promote the economical and operational reliability of power grid construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112258231B_ABST
    Figure CN112258231B_ABST
Patent Text Reader

Abstract

The present invention relates to a technical field of substation site selection and capacity determination, and is a method and device for site selection and capacity determination of distribution network substations based on an improved K-means algorithm, including determining the total number of newly built substations, the total number of loads, the location and load value of each load in a planning area; taking each substation as a cluster, obtaining the location and load value of the initial cluster center; performing K-means cluster analysis on the loads that have not entered the cluster, and updating the cluster center and total load value of each cluster; setting the total load threshold of the cluster so that the total load values ​​of all clusters are less than the total load threshold, and updating the cluster center and total load value of the corresponding cluster. The present invention does not need to manually set parameters and randomly specify the initial cluster center of each cluster. The site selection and capacity determination of the substation can be realized by the load value size and load location of each load in the planning area, and the cluster center and total load value of each cluster are adjusted twice by setting the threshold of the total load value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of substation site selection and capacity determination, in particular to a distribution network substation site selection and capacity determination method and device based on an improved K-means algorithm. Background Art

[0002] The site selection and capacity determination of distribution network substations is to determine the optimal number, capacity and location of substations in the planning area. It is directly related to whether the distribution network structure is reasonable and the configuration of reactive power sources, and affects the economy and operational reliability of the entire urban power grid construction.

[0003] The site selection results of distribution network substations based on intelligent algorithms are greatly affected by control parameters. Currently, there is a lack of unified control parameter values. Different control parameters need to be selected in different planning areas, which makes it difficult to promote practical applications. Summary of the invention

[0004] The present invention provides a method and device for site selection and capacity determination of distribution network substations based on an improved K-means algorithm, which overcomes the shortcomings of the above-mentioned prior art and can effectively solve the problem that the existing distribution network substation site selection method needs to manually set different control parameter values ​​according to different planning areas, resulting in a large impact of human factors and being unfavorable for promotion.

[0005] One of the technical solutions of the present invention is achieved by the following measures: a method for site selection and capacity determination of distribution network substations based on an improved K-means algorithm, comprising:

[0006] Determine the total number of new substations, the total number of loads, the location of each load and the load value in the planning area;

[0007] Taking each substation as a cluster, determine the initial cluster center of each cluster, and obtain the location and load value of the initial cluster center, where the initial cluster center is the load with the largest sum of distances to all cluster centers;

[0008] Set the number of iterations, perform K-means clustering analysis on the loads that have not entered the cluster, put each load into the cluster closest to it, and update the cluster center and total load value of each cluster;

[0009] Set the total load threshold of the clusters, compare and obtain clusters with a total load greater than the threshold, move one or more loads to the nearest cluster with a load less than the threshold, so that the total load values ​​of all clusters are less than the threshold, and update the cluster center and total load value of the corresponding cluster.

[0010] The following are further optimizations and / or improvements to the above technical solutions:

[0011] In the above, each substation is clustered, the initial cluster center of each cluster is determined, and the location and load value of the initial cluster center are obtained, including:

[0012] Assume that the load number is j and the cluster number is i, then j = 1, 2, ..., N l , the position of the jth load is (x j ,y j ), the active power of the jth load is P j ,i=1,2,...,N s , where N l is the total number of loads, N s is the total number of substations;

[0013] Find the load j with the largest load value max , take it as the initial cluster center of the first cluster C1, and obtain the initial cluster center of the first cluster C1 Load value And put it into the set of cluster C1; let cluster number i = i + 1, traverse each load, obtain the sum of the distances from each load to all initial cluster centers, and obtain the load j corresponding to its maximum value max As C i The initial cluster center, cluster C i The initial cluster center Load value And put it into cluster C i In the set, loop to obtain the initial cluster centers of all clusters.

[0014] The above K-means clustering analysis is performed on the loads that have not entered the cluster, each load is placed in the cluster closest to it, and the cluster center and total load value of each cluster are updated, including:

[0015] Set the number of iterations, It=1;

[0016] Calculate the distance from each load to each cluster center, obtain the load closest to each cluster center, put it into the corresponding cluster, and update the cluster center of each cluster;

[0017] Set the number of iterations It = It + 1, and determine whether It is greater than N l -N s , otherwise the clustering process is cyclic, each load is placed in the cluster closest to it, and then the cluster center and total load of each cluster are output, where N l is the total number of loads, N s is the total number of substations.

[0018] The above method obtains the load closest to each cluster center, puts it into the corresponding cluster, and updates the cluster center of each cluster including:

[0019] Get the load closest to each cluster center and put it into the corresponding cluster;

[0020] Get the total load S of each cluster i and the square sum of loads Q i ;

[0021] Get the cluster center of each cluster (x i ,y i ), as shown below:

[0022]

[0023] Among them C i is the clustering, (x k ,y k ) is cluster C i The position of the kth load in k is cluster C i Load value of the kth load.

[0024] The total number of new substations in the above-mentioned planning area includes:

[0025] Get the total load value P of the planning area ∑ and capacity ratio C;

[0026] The total number of new substations N in the planning area is determined by the following formula s .

[0027] N s =P ∑ / C

[0028] The second technical solution of the present invention is achieved by the following measures: a distribution network substation site selection and capacity determination device based on an improved K-means algorithm, comprising:

[0029] A data acquisition unit determines the total number of new substations, the total number of loads, the location of each load and the load value in the planning area;

[0030] The initial cluster center determination unit takes each substation as a cluster, determines the initial cluster center of each cluster, and obtains the position and load value of the initial cluster center, wherein the initial cluster center is the load with the largest sum of distances to all cluster centers;

[0031] The first location and capacity unit sets the number of iterations, performs K-means clustering analysis on the loads that have not entered the cluster, puts each load into the cluster closest to it, and updates the cluster center and total load value of each cluster;

[0032] The second site selection and capacity determination unit sets the total load threshold of the clusters, compares the clusters with a total load greater than the threshold, moves one or more loads to the nearest cluster with a load less than the threshold, so that the total load values ​​of all clusters are less than the threshold, and updates the cluster center and total load value of the corresponding cluster.

[0033] The third technical solution of the present invention is achieved through the following measures: a storage medium, on which a computer program that can be read by a computer is stored, and the computer program is configured to execute a distribution network substation site selection and sizing method based on an improved K-means algorithm when running.

[0034] The fourth technical solution of the present invention is achieved through the following measures: an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement a distribution network substation site selection and sizing method based on an improved K-means algorithm.

[0035] The present invention does not need to manually set parameters and randomly specify the initial cluster center of each cluster. The substation site selection and capacity can be realized through the load value size and load position of each load in the planning area. It is suitable for various planning areas and is conducive to promotion. In addition, the threshold of the total load value can be set when determining the substation site selection and capacity, and the cluster center and the total load value of each cluster are adjusted for the second time. The site selection of the substation is further approached to the optimal solution, which is beneficial to the economy of power grid construction and operational reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Attached Figure 1 This is a flowchart of site selection and capacity determination according to Example 1 of the present invention.

[0037] Attached Figure 2 This is a flowchart of setting the total load threshold of clusters in Embodiment 1 of the present invention, and correspondingly adjusting clusters.

[0038] Attached Figure 3 This is a flowchart of site selection and capacity determination according to Example 2 of the present invention.

[0039] Attached Figure 4 This is a flow chart of determining the initial cluster centers of the remaining clusters except the first cluster in Example 2 of the present invention.

[0040] Attached Figure 5 This is a flowchart of site selection and capacity determination according to Example 3 of the present invention.

[0041] Attached Figure 6 This is a clustering flow chart for each iteration in Example 3 of the present invention.

[0042] Attached Figure 7 This is a structural block diagram of embodiment 4 of the present invention.

[0043] Attached Figure 8 This is a schematic diagram of the planning area of ​​Example 5 of the present invention. DETAILED DESCRIPTION

[0044] The present invention is not limited by the following embodiments, and specific implementation methods can be determined based on the technical solution of the present invention and actual conditions.

[0045] The present invention will be further described below in conjunction with embodiments and drawings:

[0046] Embodiment 1: As attached Figure 1 As shown, this embodiment discloses a method for selecting a substation site and determining a capacity of a distribution network based on an improved K-means algorithm, including:

[0047] S101, determining the total number of new substations, the total number of loads, the location of each load and the load value in the planning area;

[0048] S102, taking each substation as a cluster, determining the initial cluster center of each cluster, and obtaining the position and load value of the initial cluster center, wherein the initial cluster center is the load with the largest sum of distances to all cluster centers;

[0049] S103, setting the number of iterations, performing K-means clustering analysis on the loads that have not entered the cluster, placing each load into the cluster closest to it, and updating the cluster center and total load value of each cluster;

[0050] S104, setting a total load threshold for the clusters, comparing and obtaining clusters with a total load greater than the total load threshold, moving one or more loads therein to the nearest cluster with a load less than the total load threshold, so that the total load values ​​of all clusters are less than the total load threshold, and updating the cluster center and total load value of the corresponding cluster.

[0051] In step S102 of the above technical solution, the initial cluster center of each cluster is obtained. In step S103, the K-means clustering analysis is performed on the load that has not entered the cluster in combination with the initial cluster center and the number of iterations to obtain the cluster center and the total load value of each cluster, that is, to preliminarily determine the location and capacity of each substation. In step S104, the total load threshold of the cluster is set, and the cluster center and capacity of each cluster are adjusted to finally determine the location and capacity of each substation.

[0052] In the above technical solution, step S101 determines the total number of new substations in the planning area, including:

[0053] S1011, obtaining the total load value P of the planning area ∑ and capacity ratio C;

[0054] S1012: Determine the total number of new substations N in the planning area by the following formula: s .

[0055] N s =P ∑ / C

[0056] The above technical solution, as attached Figure 2 As shown, step S104 specifically includes:

[0057] S1041, set the total load threshold of the cluster to P max ;

[0058] S1042, find the cluster with the largest total load value by comparing the following formula Determine the total load value S i Is it greater than P max ;

[0059] max{S i}

[0060] Where i is the cluster number, i = 1, 2, ..., N s ; N s is the total number of substations; S i is the total load value of the i-th cluster;

[0061] S1043, in response to no, output each cluster C i The cluster center (x i ,y i ) and the total load value S i ; The response is, then all the total load values ​​S are counted i Less than P max Clustering of

[0062] S1044, obtain clustering Each load in the total load value S i Less than P max The distance to the cluster is Each load in the total load value S i Less than P max The distance between cluster centers;

[0063] S1045, clustering The load that meets the moving conditions is put into the corresponding total load value S i Less than P max The moving conditions include 1. The load value of a certain load and a certain total load value S i Less than P max The total load value of the clusters is still less than P max ; 2. The load reaches a total load value S that satisfies condition 1 i Less than P max The distance of the cluster is the shortest;

[0064] S1046, updating the cluster center and total load value S of the cluster with load change i , loop through steps S1042 to S1046 until all clusters C i The total load value S i Both are less than P max ;

[0065] S1047, output each cluster C i The cluster center (x i ,y i ) and the total load value S i .

[0066] The invention discloses a method for site selection and capacity determination of distribution network substations based on an improved K-means algorithm. The method does not require manual setting of parameters and random designation of initial cluster centers of various clusters. The method can realize site selection and capacity determination of substations by considering the load values ​​and load positions of various loads in a planning area. The method is suitable for various planning areas and is conducive to promotion. When determining the site selection and capacity determination of substations, the method can adjust the cluster centers and total load values ​​of various clusters by setting a threshold of the total load value. Further, the site selection of the substation approaches the optimal solution, thereby facilitating the economy and operational reliability of power grid construction.

[0067] Embodiment 2: As attached Figure 3 As shown, this embodiment discloses a method for selecting a substation site and determining a capacity of a distribution network based on an improved K-means algorithm, including:

[0068] S201, determine the total number of new substations N in the planning area s 、Total number of loads N l , the location and load value of each load;

[0069] S202, set the load number to j, the cluster number to i, then j = 1, 2, ..., N l , the position of the jth load is (x j ,y j ), the load value of the jth load is P j ,i=1,2,...,N s , where N l is the total number of loads, N s is the total number of substations;

[0070] S203, find the load value P j Maximum load j max , take it as the initial cluster center of the first cluster C1, and obtain the initial cluster center of the first cluster C1 Load value And put it into the set of cluster C1;

[0071] S204, set cluster number i=i+1, traverse each load, obtain the sum of the distances from each load to all initial cluster centers, and obtain the load j corresponding to its maximum value max As C i The initial cluster center, cluster C i The initial cluster center Load value And put it into cluster C i In the set of , loop to obtain the initial cluster centers of all clusters;

[0072] S205, setting the number of iterations, performing K-means clustering analysis on the loads that have not entered the cluster, placing each load into the cluster closest to it, and updating the cluster center and total load value of each cluster;

[0073] S206, setting a total load threshold for the clusters, comparing and obtaining clusters with a load greater than the total load threshold, moving one or more loads therein to the nearest cluster with a load less than the total load threshold, so that the total load values ​​of all clusters are less than the total load threshold, and updating the cluster center and total load value of the corresponding cluster.

[0074] In the above technical solution, step S204 is as shown in the attached Figure 4 As shown, specifically including:

[0075] S2041, set cluster number i=i+1, and determine whether i is greater than N s ;

[0076] S2042, in response to yes, output the initial cluster centers and load values ​​of all clusters, and in response to no, set the load number j=1;

[0077] S2043, determine the position (x j ,y j ) is equal to the position of the existing initial cluster center, that is, (x k ,y k ), k=1,2,...,i-1;

[0078] S2044, the response is, then the sum of the load j to the location of the existing initial cluster center D j = 0, if the response is no, then the sum of the distances from load j to the existing initial cluster centers is D j As shown below:

[0079]

[0080] Where (x k ,y k ) is the existing initial cluster center and k=1,2,...,i-1;

[0081] S2045, set load number j=j+1, and determine whether j is greater than N l ;

[0082] S2046, in response to no, loop S2043 to S2045, obtain the sum of the distances from each load to the existing initial cluster center, and in response to no, set max{D j ,j=1,2,...,N l The corresponding load number is j max , the load j max As the i-th cluster C i The initial cluster center, i.e., j max ∈C i , initial cluster center Cluster C i Load value Then, S2041 to S2046 are looped until the initial cluster center of each cluster is determined.

[0083] Embodiment 3, as attached Figure 5 As shown, this embodiment discloses a method for selecting a substation site and determining a capacity of a distribution network based on an improved K-means algorithm, including:

[0084] S301, determining the total number of new substations, the total number of loads, the location of each load and the load value in the planning area;

[0085] S302, taking each substation as a cluster, determining the initial cluster center of each cluster, and obtaining the position and load value of the initial cluster center, wherein the initial cluster center is the load with the largest sum of distances to all cluster centers;

[0086] S303, setting the total number of iterations, setting the number of iterations It = 1;

[0087] S304, calculating the distance from each load to each cluster center, obtaining the load closest to each cluster center, placing it into the corresponding cluster, and updating the cluster center of each cluster;

[0088] S305, set the number of iterations It = It + 1, and determine whether It is greater than N l -N s , in response to otherwise loop S304, each load is placed in the cluster closest to it, and in response to then outputting each cluster C i ,i=1,2,...,N s The cluster center (x i ,y i ) and total load S i , where N l is the total number of loads, Ns is the total number of substations.

[0089] S306, setting a total load threshold for the clusters, comparing and obtaining clusters with a load greater than the total load threshold, moving one or more loads therein to the nearest cluster with a load less than the total load threshold, so that the total load values ​​of all clusters are less than the total load threshold, and updating the cluster center and total load value of the corresponding cluster.

[0090] In the above technical solution, step S304 is as shown in the attached Figure 6 As shown, including:

[0091] S3041, set load number j=1;

[0092] S3042, determine whether load j belongs to any cluster set, that is, whether j∈C i ,i=1,2,...,N s ;

[0093] S3043, the response is yes, then cluster C i The distance D between the load j ij =∞; if the response is no, cluster C i The distance D between the load j ij As shown below:

[0094] D ij =||(x i ,y i )-(x j ,y j )||

[0095] S3044, set load number j=j+1, and determine whether j is greater than N l In response to no, loop S3042 to S3045 to obtain each load to cluster C i If yes, set cluster number i=i+1, and determine whether i is greater than N s ;

[0096] S3045, if the response is no, loop S3042 to S3046 to obtain the distance between each load and each cluster; if the response is yes, enter S3047;

[0097] S3046, at all distances D ij In the example, select the minimum distance value min{D ij |i=1,2,...,N s ,j=1,2,...,N l} corresponding load j, and put it into the corresponding cluster C i middle;

[0098] S3047, obtain the total load S of each cluster i and the square sum of loads Q i ;

[0099] S3048, obtain the cluster center of each cluster (x i ,y i ), as shown below:

[0100]

[0101] Among them C i is the clustering, (x k ,y k ) is cluster C i The position of the kth load in k is cluster C i Load value of the kth load.

[0102] Embodiment 4, as attached Figure 7 As shown, this embodiment discloses a distribution network substation site selection and capacity determination device based on an improved K-means algorithm, including:

[0103] A data acquisition unit determines the total number of new substations, the total number of loads, the location of each load and the load value in the planning area;

[0104] The initial cluster center determination unit takes each substation as a cluster, determines the initial cluster center of each cluster, and obtains the position and load value of the initial cluster center, wherein the initial cluster center is the load with the largest sum of distances to all cluster centers;

[0105] The first location and capacity unit sets the number of iterations, performs K-means clustering analysis on the loads that have not entered the cluster, puts each load into the cluster closest to it, and updates the cluster center and total load value of each cluster;

[0106] The second site selection and capacity determination unit sets the total load threshold of the clusters, compares the clusters with a total load greater than the threshold, moves one or more loads to the nearest cluster with a load less than the threshold, so that the total load values ​​of all clusters are less than the threshold, and updates the cluster center and total load value of the corresponding cluster.

[0107] Embodiment 5. This embodiment discloses a storage medium, characterized in that a computer program that can be read by a computer is stored on the storage medium, and the computer program is configured to execute the distribution network substation site selection and sizing method based on the improved K-means algorithm as described in any one of claims 1 to 6 when running.

[0108] The above storage medium may include, but is not limited to: a USB flash drive, a read-only memory, a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0109] Embodiment 6. This embodiment discloses an electronic device, characterized in that it includes a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the distribution network substation site selection and sizing method based on the improved K-means algorithm as described in any one of claims 1 to 6.

[0110] The electronic device mentioned above further includes a transmission device and an input / output device, wherein the transmission device and the input / output device are both connected to the processor.

[0111] Example 7, as specified in the attached Figure 8 For the planning area shown, the distribution network substation site selection process based on the improved K-means algorithm is as follows:

[0112] 1. Based on the predicted long-term annual total load value of 59057kW and the requirement of load-to-capacity ratio of 2 in the planning area, the number of new substations (clusters) is determined to be 2. The location and load value of each load in the planning area are shown in Table 1;

[0113] 2. The initial cluster centers of each cluster are shown in Table 2 below;

[0114] 3. After the first cluster analysis, the cluster centers and total load values ​​of each cluster are shown in Table 3;

[0115] 4. Set the total cluster load threshold to 31500kW, and adjust the load and total load value of each cluster. The adjustment results are shown in Table 4, that is, the sites and capacities of the two substations are shown in Table 4.

[0116] The above technical features constitute the best embodiment of the present invention, which has strong adaptability and best implementation effect. Non-essential technical features can be added or reduced according to actual needs to meet the requirements of different situations.

[0117] Table 1 Location and load value of each load in the planning area

[0118]

[0119]

[0120]

[0121]

[0122]

[0123]

[0124]

[0125]

[0126] Table 2 Initial cluster centers of each cluster

[0127] Substation (cluster) number Location coordinates Load value (kW) 1 Load 47 (5.1875, 0.28125) 3675 2 Load 166(0.03125,3) 74

[0128] Table 3 Cluster centers and total load values ​​of each cluster after the first cluster analysis

[0129] Substation (cluster) number Location coordinates Load value (kW) 1 (4.85821,1.1667) 21630 2 (1.47767,1.77305) 37472

[0130] Table 4 Sites and capacities of two substations

[0131] Substation (cluster) number Location coordinates Load value (kW) 1 (4.72595,1.19852) 27808 2 (1.36425,1.78356) 31294

Claims

1. A method for site selection and capacity determination of distribution network substations based on an improved K-means algorithm, characterized in that: include: Determine the total number of new substations, the total number of loads, the location of each load and the load value in the planning area. Determine the total number of new substations in the planning area including: Get the total load value P of the planning area Σ and capacity ratio C; The total number of new substations N in the planning area is determined by the following formula s : N s =P Σ / C; Taking each substation as a cluster, determine the initial cluster center of each cluster, and obtain the location and load value of the initial cluster center, where the initial cluster center is the load with the largest sum of distances to all cluster centers; Set the number of iterations, perform K-means clustering analysis on the loads that have not entered the cluster, put each load into the cluster closest to it, and update the cluster center and total load value of each cluster; The total load threshold of the cluster is set, and the clusters with a total load greater than the total load threshold are obtained by comparison, and one or more loads are moved to the cluster with a total load less than the total load threshold closest to the cluster, so that the total load values ​​of all clusters are less than the total load threshold, and the cluster center and the total load value of the corresponding cluster are updated. The clustering is performed by taking each substation as a cluster, determining the initial cluster center of each cluster, and obtaining the position and load value of the initial cluster center, including: Assume that the load number is j and the cluster number is i, then j = 1, 2, ..., N l , the position of the jth load is (x j ,y j ), the active power of the jth load is P j ,i=1,2,...,N s , where N l is the total number of loads, N s is the total number of substations; Find the load j with the largest load value max , take it as the initial cluster center of the first cluster C1, and obtain the initial cluster center of the first cluster C1 Load value And put it into the set of cluster C1; Let cluster number i = i + 1, traverse each load, obtain the sum of the distances from each load to all initial cluster centers, and obtain the load j corresponding to its maximum value max As C i The initial cluster center, cluster C i The initial cluster center Load value And put it into cluster C i In the set, the initial cluster centers of all clusters are obtained cyclically, the loads that have not entered the cluster are subjected to K-means cluster analysis, each load is placed in the cluster closest to it, and the cluster centers and total load values ​​of each cluster are updated, including: Set the number of iterations, It=1; Calculate the distance from each load to each cluster center, obtain the load closest to each cluster center, put it into the corresponding cluster, and update the cluster center of each cluster; Set the number of iterations It = It + 1, and determine whether It is greater than N l -N s , otherwise the clustering process is cyclic, each load is placed in the cluster closest to it, and then the cluster center and total load of each cluster are output, where N l is the total number of loads, N s is the total number of substations. The method of obtaining the load closest to each cluster center, placing it into the corresponding cluster, and updating the cluster center of each cluster includes: Get the load closest to each cluster center and put it into the corresponding cluster; Get the total load S of each cluster i and the square sum of loads Q i ; Get the cluster center of each cluster (x i ,y i ), as shown below: Among them C i is the clustering, (x k ,y k ) is cluster C i The position of the kth load in k is cluster C i Load value of the kth load.

2. A device for selecting and sizing substations in a distribution network based on an improved K-means algorithm using the method as claimed in claim 1, characterized in that: include: The data acquisition unit determines the total number of new substations, the total number of loads, the location of each load and the load value in the planning area, wherein determining the total number of new substations in the planning area includes: Get the total load value P of the planning area ∑ and capacity ratio C; The total number of new substations N in the planning area is determined by the following formula s : N s =P ∑ / C; The initial cluster center determination unit takes each substation as a cluster, determines the initial cluster center of each cluster, and obtains the position and load value of the initial cluster center, wherein the initial cluster center is the load with the largest sum of distances to all cluster centers; The first location and capacity unit sets the number of iterations, performs K-means clustering analysis on the loads that have not entered the cluster, puts each load into the cluster closest to it, and updates the cluster center and total load value of each cluster; The second site selection and capacity determination unit sets the total load threshold of the clusters, compares the clusters with a total load greater than the threshold, moves one or more loads to the nearest cluster with a load less than the threshold, so that the total load values ​​of all clusters are less than the threshold, and updates the cluster center and total load value of the corresponding cluster.

3. A storage medium, characterized in that: The storage medium stores a computer program that can be read by a computer, and the computer program is configured to execute the method for site selection and sizing of distribution network substations based on the improved K-means algorithm as claimed in claim 1 when running.

4. An electronic device, characterized in that: It comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the method for site selection and capacity determination of distribution network substations based on the improved K-means algorithm as claimed in claim 1.