A method, apparatus, equipment and medium for clustering loads in a power system
By using the improved FCM clustering algorithm and the weighted method of in-class and out-of-class variance ratio, load characteristic indicators are dynamically obtained and iterative clustering is performed. This solves the problems of low computational efficiency and unstable results in power system load clustering under high-dimensional data, and improves the accuracy and stability of clustering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID SHANGHAI ELECTRIC POWER DESIGN
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-02
AI Technical Summary
Existing power system load clustering methods are computationally inefficient and produce unstable results with high-dimensional data. Traditional clustering algorithms are prone to getting trapped in local optima and have inaccurate weight configurations, resulting in poor reliability of clustering results.
By dynamically acquiring load characteristic indicators, an improved FCM clustering algorithm is used to select high-density data points as initial cluster centers. Weights are configured using the in-class-out-of-class variance ratio weighting method, and iterative clustering is performed. Outliers are removed, and a second clustering is performed using the improved FCM algorithm.
It improves the accuracy and stability of load clustering, ensures that the clustering results conform to the spatiotemporal differences of load behavior, reduces the impact of interference information, and achieves efficient load characteristic analysis.
Smart Images

Figure CN122132860A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system load analysis technology, and in particular to a power system load clustering method, apparatus, equipment and medium. Background Technology
[0002] Clustering daily load data is an important way to analyze and extract user electricity consumption characteristics, and it has wide applications in the power system field. Load clustering methods are divided into direct clustering and indirect clustering according to whether they directly process the collected daily load data. Direct clustering usually uses methods such as fuzzy clustering, hierarchical clustering, and density clustering. Indirect clustering, on the other hand, extracts feature indicators that can effectively characterize the load data from the original data through dimensionality reduction, and performs clustering based on these indicators.
[0003] For direct clustering methods, with the continuous improvement of the performance of current data acquisition equipment, the sampling frequency of daily load data is constantly increasing. Although high-dimensional data can describe load characteristics more precisely, it also leads to a decrease in the computational efficiency of clustering algorithms. In addition, high-dimensional data will reduce the importance of key load features in the overall features to a certain extent, thus affecting the reliability of the clustering results of load data. Direct clustering methods are difficult to achieve good clustering analysis. Therefore, indirect clustering methods are generally used at present.
[0004] Indirect clustering methods achieve dimensionality reduction by extracting load characteristic indicators, then assigning weights to these features, and finally performing clustering based on the weighted features. Common features include daily load factor, peak-valley difference rate, and peak-valley load factor. However, indirect clustering methods typically calculate load characteristic indicators based on fixed time periods. This fixed division method ignores the spatiotemporal differences in user electricity consumption behavior and is difficult to accurately represent nonlinear load changes. When assigning weights, entropy weighting and singular value methods are used to give load characteristic indicators greater weights to achieve better load clustering. Although these weighting methods impart a large amount of information, they may contain interference information unrelated to clustering, leading to overfitting of irrelevant variations in the clustering model and weakening its ability to identify real electricity consumption patterns. Finally, when performing clustering based on features, traditional clustering algorithms use random initialization of cluster centers, resulting in poor stability of the clustering results and ultimately making it difficult to achieve high-accuracy load clustering. Summary of the Invention
[0005] This invention provides a method, apparatus, equipment, and medium for clustering power system loads, which can solve the problems existing in the prior art.
[0006] This invention provides a power system load clustering method, comprising the following steps: Acquire daily load data of the power system, and dynamically acquire multiple load characteristic indicators of the daily load data based on the daily dynamic peak and valley periods of the power system and the time points when the load dynamically occurs. An improved FCM clustering algorithm is set up as follows: For data points in the load characteristic index, the number of data points less than a preset distance from the data point is obtained, and the number of data points is defined as the density of the corresponding data points; the data point with the highest density is taken as the first cluster center and clustered to form an initial center set; the data points that are farthest from the initial center set and whose density is higher than a preset threshold are selected as new cluster centers for clustering until the number of data points in the selected cluster centers reaches the preset number of clusters, and the load is clustered using the finally selected cluster centers; The weights of each load characteristic index in the daily load data are configured to be equal, and the improved FCM clustering algorithm is used to perform clustering to obtain the initial clustering results. For each load characteristic index in the initial clustering results, the inter-class variance and intra-class variance of the load characteristic index are obtained, and the ratio of the inter-class variance to the intra-class variance is obtained. The final weight of the corresponding load characteristic index is obtained based on the ratio. Based on the final weight of each load characteristic index, the initial clustering results are clustered again using the improved FCM clustering algorithm to obtain the final load clustering partitioning results.
[0007] Preferably, the multiple load characteristic indicators for dynamically acquiring daily load data include: The load characteristic indicators include daily load factor, daily peak-to-valley difference rate, peak load factor, valley load factor, time of maximum load occurrence, and time of minimum load occurrence; When obtaining peak load rate, the calculation period is calculated by taking the time of the highest load occurrence in the load data as the center, and then taking two hours before and after the center time point, for a total of five hours. Similarly, when obtaining valley load rate, the calculation period is calculated by taking the time of the lowest load occurrence in the load data as the center, and then taking two hours before and after the center time point, for a total of five hours. This is represented as: ; ; in: P ave.peak Indicates the average load during peak periods; P ave.val This indicates the average load during the trough period; k 3 indicates peak load rate; k 4 indicates the load factor during the off-peak period; The time distance between the occurrence times of maximum and minimum loads is obtained using the cyclic distance acquisition method, and is expressed as follows: ; ; in: T max.a express a The time of occurrence of maximum load in the group load data; T max.b express b The time of occurrence of maximum load in the group load data; T min.a express a The time of occurrence of minimum load in the group load data; T min.b express b The time of occurrence of minimum load in the group load data; D max This indicates the distance between the times when the maximum load occurs; D min This indicates the distance between the times when the minimum load occurs; The times of maximum load occurrence and minimum load occurrence are obtained based on the time interval between the times of maximum load occurrence and minimum load occurrence.
[0008] Preferably, the improved FCM clustering algorithm includes: For the data points in the load characteristic index, define the density of the data points. d i To be with data points b i The distance is less than the preset distance r The number of data points; Let the number of clusters be k Obtain the density of all data points and select the point with the highest density as the first cluster center. c 1. Place in the central set C =[ c 1, c 2, …, c k ]; Obtain the set of remaining data points and cluster centers. C distance D i , is represented as: ; Based on distance D i Finding the set of cluster centers C The farthest sample point b i And determine whether it satisfies d i > r min , rmin for b i The minimum density value required to become a cluster center; if the condition is met, it is added to the cluster. C Otherwise, according to D i Search for subsequent data points in descending order until the next center that meets the criteria is found; Determine the current center set C Is the number of data points equal to the number of clusters? k If they are equal, calculate the weighted membership degree and update the membership degree matrix, which is represented as follows: ; Based on the updated membership matrix, the new cluster centers are obtained, represented as follows: ; Get the current membership matrix U (t+1) The matrix from the previous iteration U (t) The iteration stops when the change in membership degree is less than a preset threshold, and the final cluster centers are obtained for clustering.
[0009] Preferably, after the improved FCM clustering algorithm is set up, a clustering validity check is performed, including: Cluster validity is tested using the silhouette coefficient, expressed as: ; in: x i Represents sample points i The average distance between it and other sample points within its class; y i Represents sample points i The average distance between sample points and other classes.
[0010] Preferably, obtaining the final weights of the corresponding load characteristic indicators includes: For each load characteristic index in the initial clustering results, the between-class variance and within-class variance of that load characteristic index are obtained, and expressed as follows: ; ; in: k Represents the number of clusters; n c Indicates the first c Number of load data sample points for each class; m i Indicates that all samples are in the first... i The mean of each feature; Indicates the first c Samples of class n in the nth i The mean of each feature; V B Indicators i within-class variance; V W Indicators i The inter-class variance; index i The ratio of between-class variance to within-class variance VP i , is represented as: ; According to the indicators i The ratio of between-class variance to within-class variance is used to obtain the first... i Weight of each indicator w i , is represented as: ; in: q Indicates the number of indicators.
[0011] Preferably, after acquiring the daily load data of the power system, the daily load data is further preprocessed, including: The interquartile range (IQR) is used to obtain the first and third quartiles of the daily load data, and the normal data range for the daily load data is set within... L 1 and L Data points falling between 2 and 3 are marked as outliers, represented as follows: ; ; ; in: Q 1 indicates the first quartile of the data; Q 3 indicates the third quartile of the data; IQR Represents intermediate variables used in calculating outlier boundaries; L 1 indicates the lower limit of outliers. L 2 indicates the upper limit of outliers; For the identified outliers, they are removed from the daily load data and replaced by second-order Lagrange interpolation.
[0012] Preferably, the daily load factor is calculated as follows: ; in: P ave Indicates the average daily load; Pmax Indicates the maximum daily load; k 1 represents the daily load factor; The calculation of the daily peak-valley difference rate is expressed as follows: ; in: P min Indicates the daily minimum load; k 2 represents the daily peak-to-valley difference rate.
[0013] This invention also provides a power system load clustering device, comprising: The indicator module is used to acquire daily load data of the power system and dynamically acquire multiple load characteristic indicators of the daily load data based on the daily dynamic peak and valley periods of the power system and the time points when the load dynamically occurs. The clustering setting module is used to set the improved FCM clustering algorithm: For data points in the load characteristic index, the number of data points less than a preset distance from the data point is obtained, and the number of data points is defined as the density of the corresponding data points; the data point with the highest density is taken as the first cluster center and clustered to form an initial center set; the data points that are farthest from the initial center set and whose density is higher than a preset threshold are selected as new cluster centers for clustering until the number of data points in the selected cluster centers reaches the preset number of clusters, and the load is clustered using the finally selected cluster centers; The weight configuration module is used to configure the weight of each load characteristic indicator in the daily load data to be equal, and to perform clustering using an improved FCM clustering algorithm to obtain the initial clustering results. For each load characteristic indicator in the initial clustering results, the inter-class variance and intra-class variance of the load characteristic indicator are obtained, and the ratio of the inter-class variance to the intra-class variance is obtained. Based on the ratio, the final weight of the corresponding load characteristic indicator is obtained. The clustering module is used to re-cluster the initial clustering results based on the final weight of each load characteristic index using the improved FCM clustering algorithm, so as to obtain the final load clustering partitioning results.
[0014] This invention also provides an electronic device, including a memory and a processor; The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the steps of the power system load clustering method described above.
[0015] This invention also provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps of a power system load clustering method as described above.
[0016] This invention provides a method, apparatus, device, and medium for clustering power system loads, which offers the following advantages compared to existing technologies: This invention first dynamically extracts load characteristic indicators based on the daily dynamic peak and valley periods of electricity consumption and the time points when load dynamics occur. This takes into account the spatiotemporal differences in user electricity consumption behavior and the nonlinear changes in load, making it more consistent with the periodic nature of load behavior. Then, in weighting, the in-class variance ratio weighting method is used to directly extract the consistency (small in-class variance) and the separation (large inter-class variance) of each feature within the class from the preliminary clustering results. This allows the weights to directly serve the clustering objective. That is, through the natural filtering of the in-class variance ratio, the weights of traditional interference features with large amounts of information are automatically reduced, improving the ability to identify real electricity consumption patterns. Finally, in clustering, high-density data points are preferentially selected as initial cluster centers to ensure their representativeness. And, based on the density condition, the point farthest from the selected center is selected as the new cluster center for iterative clustering to promote class dispersion and ensure the stability of clustering, ultimately achieving high-accuracy load clustering. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the overall process of a power system load clustering method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the improved weighted FCM algorithm for power system load clustering provided in an embodiment of the present invention. Detailed Implementation
[0018] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0019] Currently, load clustering methods are divided into direct clustering and indirect clustering based on whether they directly process the collected daily load data. Direct clustering usually uses methods such as fuzzy clustering, hierarchical clustering, and density clustering. Indirect clustering, on the other hand, extracts feature indicators that can effectively characterize the load data from the original data through dimensionality reduction, and performs clustering based on these indicators.
[0020] For direct clustering methods, with the continuous improvement of data acquisition equipment performance and the increasing sampling frequency of daily load data, while high-dimensional data can describe load characteristics more precisely, it also leads to a decrease in the computational efficiency of clustering algorithms. Furthermore, some studies have pointed out that high-dimensional data can reduce the importance of key load features in the overall characteristics, thus affecting the reliability of the clustering results. Therefore, indirect clustering methods are commonly used in existing research.
[0021] For indirect clustering methods, significant progress has been made in current research. Some literature points out that traditional clustering algorithms such as K-means and FCM suffer from initialization problems. Since both K-means and FCM randomly select initial cluster centers, different selections can lead to significant differences in clustering results and easily get trapped in local optima. Therefore, subsequent research often uses optimization algorithms such as genetic algorithms to initialize traditional clustering algorithms. Other literature indicates that the importance of feature indicators after dimensionality reduction varies in load clustering, and that features that better distinguish different classes should be given greater weight to achieve better load clustering. Some subsequent studies have attempted to use entropy weighting and singular value decomposition, while others have opted for equal weights. These weighting methods are all based solely on the information content carried by the indicators; however, this information content may contain interference information unrelated to clustering and cannot truly reflect the importance of the indicators to cluster discrimination. The configured weights may not be suitable for load clustering. For dimensionality reduction methods for load data, relevant literature proposes methods such as Principal Component Analysis (PCA) and Singular Value Decomposition (SVFD). Methods such as Decomposition (SVD) and Singular Spectrum Analysis have been used, but none of them consider the load characteristics of load data clustering. The dimensionality reduction results obtained based on the above methods are difficult to characterize the load characteristics of daily load data, and their practical significance is unclear, making them difficult to apply in actual production. A few studies have considered the practical significance of load clustering and have chosen to use load characteristic indicators as the dimensionality reduction results to replace the original load data for clustering. However, they have not combined the load characteristic indicators with the clustering requirements, but instead have adopted the traditional load characteristic indicator calculation methods.
[0022] Addressing the problems existing in current direct and indirect clustering methods, this invention proposes a load clustering method based on improved load characteristic indicators. This method selects load characteristic indicators to replace the original load data for clustering, and improves four indicators—peak / valley load rate and the time of maximum / minimum load occurrence—to better suit load clustering. Regarding the weight allocation method, to ensure that the allocated weights better reflect the importance of the indicators in clustering, a weight allocation method based on the ratio of in-class to out-of-class variance is proposed. Specifically, this includes: 1. Preprocess the collected daily load data to remove abnormal and invalid data. This specifically includes:
[0023] 1. Outlier identification.
[0024] The interquartile range (IQR) is a statistical method commonly used to identify outliers. For outliers that significantly deviate from the normal range, the IQR can be used for processing. Its principle is as follows: (1) (2) (3) in: Q 1 represents the first quartile of the data (the value at the 25th percentile). Q 3 represents the third quartile of the data (the value at the 75th percentile). IQR Intermediate variables for calculating outlier boundaries; L 1 is the lower limit for outliers. L 2 represents the upper limit for outliers; when a daily load data point exceeds this limit... L 1 and L If the value is between 2 and 2, then the data is marked as an outlier.
[0025] 2. Outlier handling.
[0026] For identified outliers, they are removed from the load data and replaced with second-order Lagrange interpolation. Lagrange interpolation is a commonly used interpolation method in numerical analysis, and its calculation is shown in the following formula:
[0027] (4) In the formula: n The number of times for Lagrange interpolation, x i , x j The x-coordinates of the known data points are... y i , y j The y-coordinates of the known data points are... x Let x be the x-coordinate of the data point to be determined. Equation (4) is... n The second Lagrange interpolation formula, where l i ( x ) is called the basis function of Lagrange interpolation.
[0028] When the number of outliers reaches 20% of the sampled data, the daily load data is considered invalid and is removed from the total load data.
[0029] II. Based on the processed load data, calculate the improved load characteristic indicators for each daily load data point. Specifically, this includes:
[0030] 1. Load characteristic indicators.
[0031] The commonly used load characteristic indicators in current power industry and partial load clustering literature are daily load factor, daily peak-to-valley difference rate, peak load factor, valley load factor, time of maximum load occurrence, and time of minimum load occurrence. Their specific meanings and calculation methods are as follows: The daily load factor reflects the load changes throughout the day, and it is calculated as follows: (5) In the formula: P ave The average daily load P max Maximum daily load k 1 represents the calculated daily load factor.
[0032] The daily peak-valley difference rate reflects the peak-shaving capacity of the power grid, and its calculation method is as follows: (6) In the formula: P min Minimum daily load, k 2 represents the calculated daily peak-to-valley difference rate.
[0033] Peak load factor and valley load factor reflect the changes in peak load and valley load, respectively, and are calculated as follows: (7) (8) In the formula: P ave.peak This represents the peak average load. P ave.val The average load during the trough period, k 3 represents the calculated peak load factor. k 4 represents the calculated valley period load factor.
[0034] The times of maximum and minimum daily load can reflect the overall load changes over time. T max and T min express.
[0035] 2. Methods for improving load characteristic indicators.
[0036] Currently, the selection of peak and valley periods in peak and valley load rate calculations typically involves fixed time periods (e.g., selecting 8:00-11:00 and 18:00-21:00 as peak periods, and 22:00-6:00 the next day as valley periods). This method fails to consider the different actual conditions of various load curves. For example, the peak and valley periods for off-peak loads often differ from other types of loads. If a fixed peak and valley period division method is used, the relevant indicators may not accurately describe the characteristics of specific loads, thus affecting the reliability of clustering results. Therefore, this invention considers combining the occurrence times of maximum and minimum loads, treating a 24-hour day as a cycle group, i.e., before 0:00 is 23:00, and after 23:00 is 0:00. Based on the occurrence times of maximum and minimum loads in different load data, a time range of 2 hours before and after the occurrence times of maximum and minimum loads, totaling 5 hours, is selected as the peak and valley periods. The specific method is as follows:
[0037] (9) (10) Furthermore, the method for calculating the distance between the times of maximum / minimum load occurrence also needs improvement; assuming a The maximum load on the data set occurred at 23:00. b When the maximum load of the data set occurs at time 0, if the traditional Euclidean distance calculation method is used, a Groups and b The time interval between the occurrence of the group's maximum load is 23, while considering the characteristics of the load curve, a Groups and b The distance between the times of maximum load in a group should be 1. Obviously, the above distance is unreasonable. Therefore, the method for calculating the distance between maximum and minimum loads is changed to: (11) (12) In the formula: T max.a for a The time of occurrence of maximum load in the group load data. T max.b for b The time of occurrence of maximum load in the group load data. T min.a for a The time of occurrence of minimum load in the group load data. T min.b for b The time of occurrence of minimum load in the group load data. D max The distance between the times when the maximum load occurs. Dmin This represents the distance between the times when the minimum load occurs.
[0038] Third, using the calculated improved load characteristic index as input, preliminary clustering is performed using the improved weighted FCM, with equal weights selected for the weight configuration, such as... Figure 2 As shown. Specifically includes:
[0039] 1. Improve the FCM clustering algorithm.
[0040] Traditional FCM uses random selection of initial cluster centers, which is easily influenced by the initial cluster centers and prone to getting trapped in local optima. The selection of cluster centers should meet the following two conditions: 1. The density of cluster centers should be relatively high. "Density" refers to the concentration of data points in the vicinity of a data point. If a data point has a high density, it means it is located in a densely populated area. In clustering, such points usually represent the "core" or "typical" members of a class. Selecting a high-density point as a cluster center ensures that the center can well represent the characteristics of a class. 2. Cluster centers should be far away from any points with a higher density. If a point A has a high density, but there is another point B with a higher density nearby, then point A should not be selected as a cluster center. This helps avoid duplication or overlap of cluster centers, ensuring that each cluster center corresponds to an independent class. Furthermore, since subsequent clustering introduces weights, the membership calculation formula of traditional FCM will no longer be used and needs to be modified. To solve the problems of traditional FCM mentioned above, an improved FCM clustering method is proposed, with the following steps:
[0041] Step 1: Define density d i To be with data points b i The distance is less than r The number of data points; let the number of clusters be... k Calculate the density of all data points and select the point with the highest density as the first cluster center. c 1. Place in the central set C =[ c 1, c 2,…, c k ].
[0042] Step 2: Calculate the set of remaining data points and cluster centers according to formula (13). C distance D i Find the set of existing cluster centers C The farthest sample point b i (Right now Di (Maximum), and determine whether it satisfies d i > r min ( r min for b i The minimum density value required to become a cluster center is used as a center condition; if this condition is met, the cluster is added to the cluster. C Otherwise, according to D i Search for subsequent data points in descending order until the next center that meets the criteria is found.
[0043] (13) Step 3: Determine the current central set C Is the number of data points equal to the number of clusters? k If they are equal, proceed to the next step; otherwise, return to step 2 to continue iterating.
[0044] Step 4: Calculate the weighted membership degree according to equation (14) and update the membership degree matrix.
[0045] (14) Step 5: Calculate the new cluster centers based on equation (15) and the current membership matrix.
[0046] (15) Step 6: Calculate the current membership matrix U (t+1) The matrix from the previous iteration U (t) If the changes between the given values satisfy any of the following conditions, stop the iteration and output the result; otherwise, proceed to step 4: ① (The change in membership degree is small enough).
[0047] ② (Maximum number of iterations reached).
[0048] 2. Cluster validity test.
[0049] The silhouette coefficient is a commonly used clustering evaluation index. This index combines intra-cluster tightness and inter-cluster separation, and can comprehensively evaluate the clustering quality. Its calculation method is shown in Equation (16): (16) In the formula: x i For sample pointsi The average distance between it and other sample points within its class. y i For sample points i The average distance between sample points and other classes.
[0050] The average silhouette coefficient is obtained by calculating the average silhouette coefficient of all sample points, which is used to evaluate the clustering effect of the clustering algorithm. The larger the value, the denser the intra-cluster clusters and the higher the inter-cluster separation, and the better the clustering effect. Therefore, the number of clusters k that maximizes the average silhouette coefficient is the optimal number of clusters.
[0051] IV. Based on the preliminary clustering results, calculate the ratio of between-class variance to within-class variance for each load characteristic index, and use this as the basis for weighting. Based on the recalculated weights, and using the load characteristic index as input, perform secondary clustering using the improved weighted FCM algorithm to obtain the final clustering results. Specifically, this includes:
[0052] 1. Weight configuration method.
[0053] Existing studies mostly use information content as the sole criterion when assigning weights to load clustering indicators. This ignores a crucial point: the "information content" measured from an information theory perspective may contain interfering information that is irrelevant to the analysis objective. This irrelevant information may distort the actual allocation of weights, causing indicators with high information content but low ability to distinguish load data to be given excessive weights, which in turn weakens the clustering model's ability to distinguish different load characteristics.
[0054] To address the problems of current weight allocation methods, a weight allocation method based on cluster variance ratio is proposed. The core idea of this method is to dynamically assign weights to each feature based on its separability within the cluster structure. This method is based on the following fundamental assumption: an ideal clustering feature should ensure that samples within the same cluster are as compact as possible (small intra-cluster variance), while samples between different clusters are as dispersed as possible (large inter-cluster variance). The specific process is as follows:
[0055] Step 1: Using the processed load characteristic index as input, select equal weights, and use the improved FCM clustering algorithm to perform the initial clustering to obtain the initial clustering results.
[0056] Step 2: Based on the initial clustering results, for each feature in the dataset, calculate its inter-class variance and intra-class variance according to Equations (17) and (18), respectively. The inter-class variance measures the degree of dispersion of the feature among different class centers. The larger the value, the greater the contribution of the feature to distinguishing different classes. The intra-class variance measures the degree of dispersion of the feature among samples within the same class. The smaller the value, the higher the intra-class consistency represented by the feature.
[0057] (17) (18) In the formula: k The number of clusters, n c For the first c Number of load data sample points for each class m i Indicates that all samples are in the first... i The mean of each feature Indicates the first c Samples of class n in the nth i The mean of each feature V B As an indicator i within-class variance V W As an indicator i The inter-class variance.
[0058] Step 3: Calculate the index according to formula (19) i The ratio of between-class variance to within-class variance: (19) Step 4: Calculate the first step according to formula (20). i The weights of each indicator, with the number of indicators being... q .
[0059] (20) 2. Secondary clustering.
[0060] Based on the calculated new load characteristic index weights, a second clustering process is performed using the improved weighted FCM to obtain the final clustering result.
[0061] This invention first preprocesses the collected daily load data and calculates improved load characteristic indicators, which are then used as input to a clustering algorithm. Next, a weighting configuration method based on the ratio of in-class to out-of-class variance is proposed to assign weights to the improved load characteristic indicators. Finally, the weighted FCM clustering algorithm is initialized using the density distance method to achieve load data clustering, effectively improving the reliability of the load data clustering results and facilitating subsequent load characteristic analysis by practitioners.
[0062] The intra- and extra-class variance ratio weighting method of this invention directly extracts the consistency (small intra-class variance) and the separability (large inter-class variance) of each feature from the preliminary clustering results, so that the weights directly serve the clustering objective. When the intra-class variance is small, the feature is stable within the same class, so it should be given a higher weight. When the inter-class variance is large, the feature is significantly different between different classes, so it should be given a higher weight. This automatically reduces the weight of features with a lot of information but no distinguishing effect on user categories, thereby reducing noise interference and improving the generalization ability and robustness of the clustering model.
[0063] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A power system load clustering method, characterized in that, Includes the following steps: Acquire daily load data of the power system, and dynamically acquire multiple load characteristic indicators of the daily load data based on the daily dynamic peak and valley periods of the power system and the time points when the load dynamically occurs. An improved FCM clustering algorithm is set up as follows: For data points in the load characteristic index, the number of data points less than a preset distance from the data point is obtained, and the number of data points is defined as the density of the corresponding data points; the data point with the highest density is taken as the first cluster center and clustered to form an initial center set; the data points that are farthest from the initial center set and whose density is higher than a preset threshold are selected as new cluster centers for clustering until the number of data points in the selected cluster centers reaches the preset number of clusters, and the load is clustered using the finally selected cluster centers; The weights of each load characteristic index in the daily load data are configured to be equal, and the improved FCM clustering algorithm is used to perform clustering to obtain the initial clustering results. For each load characteristic index in the initial clustering results, the inter-class variance and intra-class variance of the load characteristic index are obtained, and the ratio of the inter-class variance to the intra-class variance is obtained. The final weight of the corresponding load characteristic index is obtained based on the ratio. Based on the final weight of each load characteristic index, the initial clustering results are clustered again using the improved FCM clustering algorithm to obtain the final load clustering partitioning results.
2. The power system load clustering method according to claim 1, characterized in that, The multiple load characteristic indicators for dynamically acquiring daily load data include: The load characteristic indicators include daily load factor, daily peak-to-valley difference rate, peak load factor, valley load factor, time of maximum load occurrence, and time of minimum load occurrence; When obtaining peak load rate, the calculation period is calculated by taking the time of the highest load occurrence in the load data as the center, and then taking two hours before and after the center time point, for a total of five hours. Similarly, when obtaining valley load rate, the calculation period is calculated by taking the time of the lowest load occurrence in the load data as the center, and then taking two hours before and after the center time point, for a total of five hours. This is represented as: ; ; in: P ave.peak Indicates the average load during peak periods; P ave.val This indicates the average load during the trough period; k 3 indicates peak load rate; k 4 indicates the load factor during the off-peak period; The time distance between the occurrence times of maximum and minimum loads is obtained using the cyclic distance acquisition method, and is expressed as follows: ; ; in: T max.a express a The time of occurrence of maximum load in the group load data; T max.b express b The time of occurrence of maximum load in the group load data; T min.a express a The time of occurrence of minimum load in the group load data; T min.b express b The time of occurrence of minimum load in the group load data; D max This indicates the distance between the times when the maximum load occurs; D min This indicates the distance between the times when the minimum load occurs; The times of maximum load occurrence and minimum load occurrence are obtained based on the time interval between the times of maximum load occurrence and minimum load occurrence.
3. The power system load clustering method according to claim 1, characterized in that, The improved FCM clustering algorithm includes: For the data points in the load characteristic index, define the density of the data points. δ i To be with data points b i The distance is less than the preset distance r The number of data points; Let the number of clusters be k Obtain the density of all data points and select the point with the highest density as the first cluster center. c 1. Place in the central set C =[ c 1, c 2, …, c k ]; Obtain the set of remaining data points and cluster centers. C distance D i , is represented as: ; Based on distance D i Finding the set of cluster centers C The farthest sample point b i And determine whether it satisfies δ i > r min , r min for b i The minimum density value required to become a cluster center; if the condition is met, it is added to the cluster. C Otherwise, according to D i Search for subsequent data points in descending order until the next center that meets the criteria is found; Determine the current center set C Is the number of data points equal to the number of clusters? k If they are equal, calculate the weighted membership degree and update the membership degree matrix, which is represented as follows: ; Based on the updated membership matrix, the new cluster centers are obtained, represented as follows: ; Get the current membership matrix U (t+1) The matrix from the previous iteration U (t) The iteration stops when the change in membership degree is less than a preset threshold, and the final cluster centers are obtained for clustering.
4. The power system load clustering method according to claim 3, characterized in that, After the improved FCM clustering algorithm is set up, a clustering validity test is performed, including: Cluster validity is tested using the silhouette coefficient, expressed as: ; in: x i Represents sample points i The average distance between it and other sample points within its class; y i Represents sample points i The average distance between sample points and other classes.
5. The power system load clustering method according to claim 1, characterized in that, The process of obtaining the final weights of the corresponding load characteristic indicators includes: For each load characteristic index in the initial clustering results, the between-class variance and within-class variance of that load characteristic index are obtained, and expressed as follows: ; ; in: k Represents the number of clusters; n c Indicates the first c Number of load data sample points for each class; μ i Indicates that all samples are in the first... i The mean of each feature; Indicates the first c Samples of class n in the nth i The mean of each feature; V B Indicators i within-class variance; V W Indicators i The inter-class variance; index i The ratio of between-class variance to within-class variance VP i , is represented as: ; According to the indicators i The ratio of between-class variance to within-class variance is used to obtain the first... i Weight of each indicator w i , is represented as: ; in: q Indicates the number of indicators.
6. The power system load clustering method according to claim 1, characterized in that, After acquiring the daily load data of the power system, the daily load data is also preprocessed, including: The interquartile range (IQR) is used to obtain the first and third quartiles of the daily load data, and the normal data range for the daily load data is set within... L 1 and L Data points falling between 2 and 3 are marked as outliers, represented as follows: ; ; ; in: Q 1 indicates the first quartile of the data; Q 3 indicates the third quartile of the data; IQR Represents intermediate variables used in calculating outlier boundaries; L 1 indicates the lower limit of outliers. L 2 indicates the upper limit of outliers; For the identified outliers, they are removed from the daily load data and replaced by second-order Lagrange interpolation.
7. A power system load clustering method according to claim 2, characterized in that, The daily load factor is calculated as follows: ; in: P ave Indicates the average daily load; P max Indicates the maximum daily load; k 1 represents the daily load factor; The calculation of the daily peak-valley difference rate is expressed as follows: ; in: P min Indicates the daily minimum load; k 2 represents the daily peak-to-valley difference rate.
8. A power system load clustering device, characterized in that, include: The indicator module is used to acquire daily load data of the power system and dynamically acquire multiple load characteristic indicators of the daily load data based on the daily dynamic peak and valley periods of the power system and the time points when the load dynamically occurs. The clustering setting module is used to set the improved FCM clustering algorithm: For data points in the load characteristic index, the number of data points less than a preset distance from the data point is obtained, and the number of data points is defined as the density of the corresponding data points; the data point with the highest density is taken as the first cluster center and clustered to form an initial center set; the data points that are farthest from the initial center set and whose density is higher than a preset threshold are selected as new cluster centers for clustering until the number of data points in the selected cluster centers reaches the preset number of clusters, and the load is clustered using the finally selected cluster centers; The weight configuration module is used to configure the weight of each load characteristic indicator in the daily load data to be equal, and to perform clustering using an improved FCM clustering algorithm to obtain the initial clustering results. For each load characteristic indicator in the initial clustering results, the inter-class variance and intra-class variance of the load characteristic indicator are obtained, and the ratio of the inter-class variance to the intra-class variance is obtained. Based on the ratio, the final weight of the corresponding load characteristic indicator is obtained. The clustering module is used to re-cluster the initial clustering results based on the final weight of each load characteristic index using the improved FCM clustering algorithm, so as to obtain the final load clustering partitioning results.
9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the steps of the power system load clustering method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the steps of a power system load clustering method as described in any one of claims 1 to 7.