User day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering

By introducing a density recognition mechanism and the shortest distance method to generate initial cluster centers, and combining this with automatic evaluation of effectiveness indicators, the instability and noise interference problems of the fuzzy C-means clustering algorithm in the clustering of users' day-ahead electricity consumption curves were finally solved, improving the accuracy and adaptability of clustering.

CN121144889APending Publication Date: 2025-12-16ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID JIBEI ELECTRIC POWER CO LTD +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511199904.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Existing fuzzy C-means clustering algorithms suffer from problems such as unstable random selection of initial cluster centers, the need to manually set the number of cluster categories, and interference from noise points and outliers when clustering user day-ahead electricity consumption curves, which affect clustering accuracy and robustness.

Method used

A density recognition mechanism is introduced to remove noise points, the shortest distance method is used to generate initial cluster centers, and the optimal clustering result is automatically evaluated by combining an effectiveness index, thereby improving the stability and accuracy of the clustering process.

Benefits of technology

By constructing initial cluster centers through noise removal and the shortest distance method, the repeatability and global optimality of clustering results are significantly enhanced, and the accuracy and adaptability of electricity user consumption curve clustering are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144889A_ABST
    Figure CN121144889A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electricity consumption behavior analysis, in particular to a user day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering, which comprises the following steps: S1, setting a minimum sample number threshold, a neighborhood radius, a fuzzy weighting index, a maximum category number and an initial iteration step number; s2, identifying noise points based on a density judgment criterion and removing the noise points; s3, combining the samples by adopting a shortest distance method to form an initial clustering center; s4, constructing a fuzzy classification matrix based on the current clustering center; s5, updating a clustering center according to the classification matrix and the fuzzy weighting index; s6, judging whether a set convergence condition is met or not; s7, calculating an effectiveness index value; s8, the category number is adjusted, and re-clustering is carried out; and S9, outputting a clustering result with the maximum effectiveness index. According to the invention, by introducing noise elimination, shortest distance method initialization and effectiveness index optimization mechanisms, the stability, accuracy and self-adaptability of a clustering result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electricity consumption behavior analysis technology, and in particular to a user day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering. Background Technology

[0002] With economic development and the continuous improvement of social electrification, the electricity load on the user side is becoming more diversified and volatile, putting considerable pressure on the operation and management of the power system. Utilizing load data acquisition and processing technologies to conduct electricity user behavior analysis has become an important means to improve the accuracy of load forecasting, optimize demand response strategies, and achieve energy conservation and emission reduction. In particular, by performing cluster analysis on the day-ahead electricity consumption curves of users, it is possible to classify and understand user behavior patterns, which helps to assist the power grid in peak shaving and valley filling, orderly electricity management, and refined operation and scheduling.

[0003] Currently, there are many clustering analysis methods for electricity user load data. Common methods include multi-class clustering algorithms based on partitioning, density, fuzzy, and hierarchical structures. Among them, the fuzzy C-means clustering algorithm (FCM) is widely used in electricity consumption behavior identification due to its simple principle and high computational efficiency. However, this algorithm still has shortcomings in practical applications. For example, random selection of initial cluster centers may lead to unstable clustering results. The number of clusters needs to be set manually, which can easily lead to getting trapped in local optima. In addition, there are often noise points and outliers in actual data, which can easily interfere with the calculation of cluster centers and affect the clustering accuracy and algorithm robustness. Summary of the Invention

[0004] This invention provides a user day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering. By introducing a density recognition mechanism to remove noise points and reduce the impact of noise interference on the clustering results, the method uses the shortest distance method to generate initial cluster centers, improving the stability of the clustering process. At the same time, it combines an effectiveness index to automatically evaluate and select the optimal clustering result, avoiding performance degradation caused by unreasonable cluster number settings, thereby improving the accuracy and adaptability of user electricity consumption behavior clustering.

[0005] A user day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering includes the following steps:

[0006] S1, Parameter Initialization: Set the minimum sample size threshold S min The neighborhood radius parameter μ and the fuzzy weighting index m are set, and the maximum number of categories c is set. maX And the initial iteration step number T;

[0007] S2, Noise Identification and Removal: Based on the sample density judgment criterion, the number of samples S is identified. i Below S min The sample points are treated as noise points and removed from the original sample.

[0008] S3, Initial Cluster Center Determination: Using the shortest distance method, samples are sequentially merged to form c initial cluster centers P. (0) ;

[0009] S4, Classification Matrix Update: Based on the current cluster center positions, construct the classification matrix U using fuzzy membership rules. T ;

[0010] S5, Cluster center update: Based on the current classification matrix U T And the fuzzy weighted index m, calculate the updated next round of cluster centers P t+1 ;

[0011] S6, Iteration judgment: Judge the set iteration convergence threshold η to determine whether the iteration condition is met;

[0012] S7, Calculate the effectiveness index value: Calculate the mean distance between samples within a cluster and the mean distance between centers between clusters based on the current clustering results, and calculate the clustering effectiveness index E(c) accordingly;

[0013] S8, Adjustment of the number of clusters and re-clustering: If the current number of clusters c > 1, then let c = c - 1, reset the iteration step T = 0, and return to S3 to recalculate the clustering.

[0014] S9, Output Results: The clustering result with the highest validity index E(c) among the clustering results obtained under different numbers of categories is used as the final clustering partition output.

[0015] Optionally, the number of samples S i Represented as:

[0016]

[0017] Among them, S i For x i The number of samples within a neighborhood centered at μ and with a radius of μ.

[0018] Optionally, the determination of the initial cluster centers in S3 includes:

[0019] S31, Define the initial sample class set, denoted by G, with m elements in G, represented by a column vector x. i (i = 1, 2, ..., m) represents;

[0020] S32, define the distance between sample points as the Euclidean distance, denoted as d. i,j D KL Represents class G K With class G L The distance between them;

[0021] S33 uses the shortest distance method to perform hierarchical clustering of samples until they are clustered into c classes.

[0022] Optionally, the shortest distance method in S33 includes:

[0023] S331, construct an initial class set by treating each sample point as an initial class, and calculate the Euclidean distance between all sample points to generate a symmetric distance matrix D. (0) ;

[0024] S332, Searching for D (0) Let D be the smallest element in the middle. K,L , will G K and G L They are grouped into a new class, denoted as G. M G M ={G K G L};

[0025] S333, Calculate the new class G M With any class G J The distance between them is expressed as:

[0026]

[0027] S334, based on the newly calculated D M,J For distance matrix D (0) Updating, G is coming soon K and G L The current row and column are merged into a new row and column, resulting in a new G. M Generate a new distance matrix D (1) ;

[0028] S335, repeat S332, S333, S334, each iteration reduces one class, continuously merges the two closest classes, and updates the distance matrix, until the number of classes is reduced to the preset number of clusters c.

[0029] Optionally, the classification matrix update in S4 includes:

[0030] S41, introduce fuzzy C-means clustering to divide sample points into clusters according to their membership degree, each sample point x k The membership degree of belonging to class i is μ i,k , is represented as:

[0031]

[0032] Where U is the membership matrix, P is the cluster center, and μ i,k For membership functions, d i,k For sample x in class i kWith the i-th class sample p i The distance between samples, J(U,P) is the sum of squared errors between samples in each class, and m is the weighting exponent;

[0033] S42, based on the distance d between the sample point and the cluster center i,k Update membership degree μ i,k Specifically, it includes:

[0034] When I k When =φ,

[0035] When I k When ≠φ, μ i,k =0 and ∑ i∈I μ i,j =1;

[0036] S43, Calculate cluster centers based on the updated membership matrix U.

[0037] Optionally, the cluster center Represented as:

[0038]

[0039] Optionally, the iterative judgment in S6 includes if ||U L+1 -U L If || < η, then output U. T With P T+1 Otherwise, T = T + 1, and S4 is executed again.

[0040] Optionally, the calculation validity index values ​​in S7 include:

[0041] S71, Evaluate the similarity of samples within a class: Calculate the average distance between a sample point and its cluster center, defined as the mean intra-class distance. Represented as:

[0042]

[0043] Where n is the total number of samples, c is the number of clusters, and n i Let d be the number of samples in the i-th class. i,k For sample x in class i k With the i-th cluster center p i The distance between them;

[0044] S72, Assessing the independence between clusters: Calculate the average distance between all cluster centers, defined as the mean inter-cluster distance. Represented as:

[0045]

[0046] Where, p ij For cluster center p i With p j The distance between them;

[0047] S73, based on mean intra-class distance and mean inter-class distance Define the clustering effectiveness index E(c) as follows:

[0048]

[0049] The beneficial effects of this invention are:

[0050] This invention effectively filters out the interference of outliers on the cluster center calculation process by introducing a noise identification and removal mechanism based on sample density before clustering, thereby improving the robustness and accuracy of the clustering results. By using the shortest distance method to construct the initial cluster centers, it avoids the instability problem caused by the random initialization of cluster centers in the traditional fuzzy C-means algorithm, and significantly enhances the repeatability and global optimality of the clustering results.

[0051] This invention, by designing a clustering effectiveness index and combining iterative evaluation mechanism, can automatically select the optimal number of clusters without presetting a fixed number of clusters. This effectively overcomes the local optimum problem caused by manually specifying the number of clusters and improves the accuracy and adaptability of electricity user consumption curve clustering. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 This is a schematic diagram of the clustering method in an embodiment of the present invention. Detailed Implementation

[0054] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. Those skilled in the art may employ other alternative methods to implement some well-known technologies; moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.

[0055] like Figure 1 As shown, a user day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering includes the following steps:

[0056] Step 1: Parameter Initialization. Set the minimum sample size threshold S. min The neighborhood radius parameter μ and the fuzzy weighting index m, and the maximum number of categories are usually taken as... (Rounded down), initial iteration step T = 0;

[0057] Step 2: Identify noise points in the sample data and delete noisy sample data;

[0058] Noise points can be identified based on sample density, i.e., the number of samples within a certain area, calculated as follows:

[0059]

[0060] In the formula: S i For x i The center is μ, and the radius is μ, which is the number of samples in the neighborhood, and μ is a selected positive number.

[0061] Let S min Let S be the minimum number of samples that should exist in a certain area near the normal sample data. i min When, x can be considered i It is a noise point.

[0062] Step 3: Using the shortest distance method, obtain c initial cluster centers P. (0) ;

[0063] Let G represent a class, assuming G has m elements, represented by a column vector x. i (i = 1, 2, ..., m) are used to represent; d i,j Represents element x i With x j Spacing; D KL Represents class G K With class G L The distance between them. d i,j Using Euclidean distance:

[0064] d i,j =||x i -x j || (2-3)

[0065] The shortest distance method defines the distance between classes as the distance between the nearest samples in the two classes, that is:

[0066] D K,L =min{d i,j :x i ∈G K ,x j ∈G L} (2-4)

[0067] If a certain step is of class G​K With class G L They are grouped into a new class, denoted as G. M Class G M With any existing class G J The distance between them is:

[0068] D M,J =min{D K,J D L,J}J≠K,L (2-5)

[0069] The steps of shortest distance clustering are as follows:

[0070] (1) Treat each initial sample as a separate class and define the distance between samples, typically using Euclidean distance. Calculate the distance matrix D for the n samples. (0) It is a symmetric matrix.

[0071] (2) Finding D (0) Let D be the smallest element in the middle. K,L , will G K and G L They are grouped into a new class, denoted as G. M G M ={G K G L}

[0072] (3) Calculate the new class G M With any class G J The recursive formula for calculating the distance between them is:

[0073]

[0074] Then, for the distance matrix D (0) Updating, G is coming soon K and G L The row and column are merged into a new row and column, resulting in G. M The distances in the new row and column are calculated using equation (7), while the values ​​in the remaining rows and columns remain unchanged. The resulting new distance matrix is ​​denoted as D. (1) .

[0075] (4) For D (1) Repeat the above D (0) The two steps in the update process yield the distance matrix D. (2) This continues until all elements are merged into one category.

[0076] Step 4: Update the classification matrix U T ;

[0077] Fuzzy C-means clustering is a typical algorithm in the field of fuzzy clustering. It is characterized by its simple algorithm design and wide range of problems that can be solved. It is also suitable for situations with large amounts of data and high real-time requirements.

[0078] Fuzzy partitioning does not assign every sample point to a specific class, but rather classifies it based on a certain degree of membership. Fuzzy C-clustering can be described as follows:

[0079]

[0080] In the formula: U is the membership matrix; P is the cluster center; μ i,k Let μ be the membership function, representing the membership relationship between a sample and a subset. i,k ∈[0,1], membership matrix U=[μ i,k ] c×k ;d i,k For sample x in class i k Compared with the typical sample p of class i i The distance between them; J(U,P) is the sum of squared errors between the samples in each class and the typical samples; m is the weighting index.

[0081] Membership degree μ i,k The calculation formula is:

[0082] (1) When I k When =φ,

[0083]

[0084] (2) When I k When ≠φ, μ i,k =0 and ∑ i∈I μ i,j =1.

[0085] Therefore, the cluster centers are:

[0086]

[0087] Update the classification matrix U using formula (2-8) i ;

[0088] Step 5: Update cluster center P T+1 ;

[0089] Update the cluster centers P using formula (2-9) T+1 ;

[0090] Step Six: Determine if the iteration condition is met. For a given iteration convergence threshold η, if ||U L+1 -U L If || < η, then output U. T With PT+1 Otherwise, T = T + 1, proceed to step four;

[0091] Step 7: Calculate the effectiveness index values;

[0092] The effectiveness index can be used to judge the quality of clustering results by analyzing the similarity of samples within a class and the independence between different classes.

[0093] The similarity between samples within a class can be measured by the average class center distance, which is the average distance between each sample and the center of its respective cluster.

[0094]

[0095] In the formula: n is the total number of samples; c is the number of cluster categories; n i d is the number of samples in the i-th class; i,k For sample x in class i k With the i-th cluster center p i The distance between them.

[0096] The degree of independence between classes can be measured by the average inter-class distance, and the specific calculation formula is as follows:

[0097]

[0098] In the formula: p ij For cluster center p i With p j The distance between them.

[0099] The effectiveness index is defined as follows:

[0100]

[0101] As defined, the more independent the classes are and the more tightly packed the classes are, the larger the value of the effectiveness index E will be.

[0102] Step 8: Let c = c - 1. If c > 1, then T = 0, and then proceed to step 3; otherwise, proceed to step 9.

[0103] Step 9: Take the clustering result with the highest validity index value as the best result.

[0104] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.

[0105] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A user day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering, characterized in that, Includes the following steps: S1, Parameter Initialization: Set the minimum sample size threshold S min The neighborhood radius parameter μ and the fuzzy weighting index m are set, and the maximum number of categories c is set. max And the initial iteration step number T; S2, Noise Identification and Removal: Based on the sample density judgment criterion, the number of samples S is identified. i Below S min The sample points are treated as noise points and removed from the original sample. S3, Initial Cluster Center Determination: Using the shortest distance method, samples are sequentially merged to form c initial cluster centers P. (0) ; S4, Classification Matrix Update: Based on the current cluster center positions, construct the classification matrix U using fuzzy membership rules. T ; S5, Cluster center update: Based on the current classification matrix U T And the fuzzy weighted index m, calculate the updated next round of cluster centers P T+1 ; S6, Iteration judgment: Judge the set iteration convergence threshold η to determine whether the iteration condition is met; S7, Calculate the effectiveness index value: Calculate the mean distance between samples within a cluster and the mean distance between centers between clusters based on the current clustering results, and calculate the clustering effectiveness index E(c) accordingly; S8, Adjustment of the number of clusters and re-clustering: If the current number of clusters c > 1, then let c = c - 1, reset the iteration step T = 0, and return to S3 to recalculate the clustering. S9, Output Results: The clustering result with the highest validity index E(c) among the clustering results obtained under different numbers of categories is used as the final clustering partition output.

2. The user day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering according to claim 1, characterized in that, The number of samples S i Represented as: Among them, S i For x i The number of samples within a neighborhood centered at μ and with a radius of μ.

3. The user day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering according to claim 2, characterized in that, The determination of the initial cluster centers in S3 includes: S31, Define the initial sample class set, denoted by G, with m elements in G, represented by a column vector x. i (i = 1, 2, ..., m) represents; S32, define the distance between sample points as the Euclidean distance, denoted as d. i,j D KL Represents class G K With class G L The distance between them; S33 uses the shortest distance method to perform hierarchical clustering of samples until they are clustered into c classes.

4. The user day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering according to claim 3, characterized in that, The shortest distance method in S33 includes: S331, construct an initial class set by treating each sample point as an initial class, and calculate the Euclidean distance between all sample points to generate a symmetric distance matrix D. (0) ; S332, Searching for D (0) Let D be the smallest element in the middle. K,L , will G K and G L They are grouped into a new class, denoted as G. M G M ={G K G L }; S333, Calculate the new class G M With any class G J The distance between them is expressed as: S334, based on the newly calculated D M,J For distance matrix D (0) Updating, G is coming soon K and G L The current row and column are merged into a new row and column, resulting in a new G. M Generate a new distance matrix D (1) ; S335, repeat S332, S333, S334, each iteration reduces one class, continuously merges the two closest classes, and updates the distance matrix, until the number of classes is reduced to the preset number of clusters c.

5. The user day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering according to claim 4, characterized in that, The classification matrix update in S4 includes: S41, introduce fuzzy C-means clustering to divide sample points into clusters according to their membership degree, each sample point x k The membership degree of the i-th class is μ i,k , is represented as: Where U is the membership matrix, P is the cluster center, and μ i,k For membership functions, d i,k For sample x in class i k With the i-th class sample p i The distance between samples, J(U,P) is the sum of squared errors between samples in each class, and m is the weighting exponent; S42, based on the distance d between the sample point and the cluster center i,k Update membership degree μ i,k Specifically, it includes: When I k When =φ, When I k When ≠φ, μ i,k =0 and ∑ i∈I μ i,j =1; S43, Calculate cluster centers based on the updated membership matrix U.

6. The user day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering according to claim 5, characterized in that, The cluster center Represented as:

7. The user day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering according to claim 6, characterized in that, The iterative judgment in S6 includes if ||U L+1 -U L If || < η, then output U. T With P T+1 Otherwise, T = T + 1, and S4 is executed again.

8. The user day-ahead electricity consumption curve clustering method based on improved fuzzy C-means clustering according to claim 7, characterized in that, The calculation validity index values ​​in S7 include: S71, Evaluate the similarity of samples within a class: Calculate the average distance between a sample point and its cluster center, defined as the mean intra-class distance. Represented as: Where n is the total number of samples, c is the number of clusters, and n i Let d be the number of samples in the i-th class. i,k For sample x in class i k With the i-th cluster center p i The distance between them; S72, Assessing the independence between clusters: Calculate the average distance between all cluster centers, defined as the mean inter-cluster distance. Represented as: Where, p ij For cluster center p i With p j The distance between them; S73, based on mean intra-class distance and mean inter-class distance Define the clustering effectiveness index E(c) as follows: