SOM and clustering algorithm-based power consumer classification system and method

By combining the two-stage clustering method of SOM and Kmeans++ algorithms, the problems of initial clustering center selection and high-dimensional data processing in the power user classification are solved, and more accurate and efficient power user classification is achieved, which is suitable for the optimized operation and management of the power system.

CN120448904APending Publication Date: 2025-08-08STATE GRID LIAONING ECONOMIC TECHN INST
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510529170.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing power user classification technology has shortcomings in initial cluster center selection, high-dimensional data processing and complex load curve feature adaptability, resulting in inaccurate classification results and information loss.

Method used

The two-stage clustering method based on SOM and Kmeans++ is adopted, and the initial clustering and dimensionality reduction are performed through the SOM algorithm, and the secondary clustering is performed by combining the Kmeans++ algorithm. The parameters are dynamically adjusted using the adaptive weight allocation mechanism to optimize the clustering process.

Benefits of technology

It improves the accuracy and efficiency of power user classification, reduces information loss, enhances the adaptability and stability of the algorithm, and is suitable for the optimized operation and management of power systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448904A_ABST
    Figure CN120448904A_ABST
Patent Text Reader

Abstract

The invention discloses an SOM and clustering algorithm-based power consumer classification system and method. The method comprises the following steps of: firstly, carrying out initial clustering on load curves subjected to standardization and PCA dimension reduction through an SOM algorithm, and extracting mapping position features; secondly, taking an SOM node as an initial center candidate pool of Kmeans + +, dynamically adjusting the weight of the SOM and the Kmeans + + in combination with an adaptive weight distribution mechanism, preferentially covering a high-density region to select an initial center, and optimizing a clustering process; according to the method, the self-organization characteristic of SOM and the high efficiency of Kmeans + + are fused, information loss is reduced through principal component analysis, a dynamic parameter adjustment mechanism is combined, the problems that a traditional method is sensitive to an initial value, low in convergence speed and poor in adaptability are solved, the accuracy and robustness of power consumer classification are remarkably improved, and the application range of power consumer classification is remarkably widened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine learning and clustering algorithms, and in particular to a system and method for classifying power users based on SOM and clustering algorithms. Background Art

[0002] Studying the classification of electricity users plays an important role in optimizing the planning and operation of the power system, improving power supply reliability, rationally allocating power resources, formulating electricity price policies, and promoting energy conservation and emission reduction.

[0003] Existing electricity user classification techniques primarily rely on clustering algorithms, such as the traditional Kmeans algorithm and the self-organizing map (SOM) algorithm. Some studies have combined other algorithms (such as the adaptive particle swarm optimization algorithm, DBSCAN algorithm, and fuzzy clustering algorithm) to optimize clustering results. However, these methods are generally complex and still have shortcomings when dealing with random and volatile power load data. The traditional Kmeans algorithm is very sensitive to the choice of initial cluster centers, which can easily lead to inaccurate clustering results. Furthermore, when dealing with high-dimensional power load data, the dimensionality reduction process of existing methods can lead to information loss, affecting the clustering effect and resulting in inaccurate or irrational classification results.

[0004] Therefore, the invention of a power user classification system and method based on SOM and clustering algorithm can solve the defects of the existing technology in initial cluster center selection, high-dimensional data processing, adaptability to complex load curve characteristics and noise sensitivity, and provide a more scientific and efficient solution for power user classification, which has become a technical problem that needs to be solved urgently. Summary of the Invention

[0005] The purpose of this invention is to provide a power user classification system based on SOM and clustering algorithm, which can improve clustering efficiency, process different types of load curves more flexibly and accurately, reduce information loss, and ensure the accuracy and robustness of clustering results.

[0006] To achieve this goal, the present invention designs a power user classification system based on SOM and clustering algorithm, which includes:

[0007] The original load data acquisition module is used to pre-process the actual power load curve to obtain a standard typical daily power load curve;

[0008] The dimensionality reduction processing module is used to calculate the covariance matrix of the user's daily electricity load data set based on the standard typical daily electricity load curve, obtain the eigenvalues of the covariance matrix and the eigenvectors of each eigenvalue, thereby calculating the variance contribution rate of the covariance matrix, perform dimensionality reduction on the standard typical daily electricity load curve to obtain a reduced-dimensional typical daily electricity load curve, and select the reduced-dimensionality features in the reduced-dimensional typical daily electricity load curve based on the variance contribution rate;

[0009] The network training module is used to calculate the SOM weight vector of each node in the SOM output network based on the SOM algorithm and the standard typical daily electricity load curve, keep the dimension of the SOM weight vector consistent with the dimension of the dimensionality reduction feature, and update the SOM weight vector through the competitive learning method until the SOM weight vector no longer changes, thereby obtaining a new SOM weight vector. Based on the new SOM weight vector, the mapping position corresponding to the dimensionality-reduced typical daily electricity load curve in the SOM output layer is obtained. The mapping position is the result of the first stage clustering of electricity users based on the typical daily electricity load curve;

[0010] The algorithm classification module is used to perform a second-stage clustering on the results of the first-stage clustering according to the clustering algorithm, and utilize the feedback of the clustering algorithm performance evaluation index during the second-stage clustering process to adaptively adjust the neighborhood radius of the SOM algorithm and the number of clusters in the clustering algorithm until the neighborhood radius of the SOM algorithm and the number of clusters in the clustering algorithm meet the set requirements, thereby obtaining the final electricity user classification result.

[0011] Preferably, the specific method for preprocessing the actual electricity load curve to obtain a standard typical daily electricity load curve is: obtaining a user's daily electricity load data set, drawing the user's actual electricity load curve based on the user's daily electricity load data set, calculating the user's typical daily electricity load curve in each season from the actual electricity load curve, and standardizing the power data of each sampling point on each typical daily electricity load curve of each user to obtain a standard typical daily electricity load curve.

[0012] Beneficial effects of the invention: The invention proposes an electricity user classification system based on SOM and clustering algorithm. By combining SOM and Kmeans++ algorithm, the advantages of SOM in data dimensionality reduction and feature extraction, as well as the advantages of Kmeans++ in clustering efficiency and accuracy are fully utilized. After a two-stage clustering method, SOM is used to reduce the dimensionality and extract features of high-dimensional power load data, and the Kmeans++ algorithm is combined for secondary clustering, which effectively improves the accuracy and efficiency of electricity user classification. By proposing to use SOM nodes as the initial center candidate pool of Kmeans++ clustering, high-density areas are covered first, and the initial clustering centers are selected scientifically and reasonably, the algorithm is prevented from falling into local optimality, and the accuracy and efficiency of power user classification are improved. The stability and reliability of the clustering results are improved; through the proposed adaptive weight distribution mechanism, the weights of SOM and Kmeans++ in the classification process can be dynamically adjusted according to the different characteristics of the power load curve (such as peak difference or time distribution complexity). This mechanism enables the algorithm to process different types of power load curves more flexibly and accurately, and improves the scientificity and adaptability of the classification results; the original high-dimensional data is reduced in dimension through principal component analysis (PCA) technology, which reduces information loss and provides data-driven global structural information for SOM initialization. It not only improves the computational efficiency of the algorithm, but also reduces the complexity of processing high-dimensional data, so that the algorithm can process large-scale power user data more quickly. By combining the SOM and Kmeans++ algorithms, the present invention effectively solves the problems existing in the existing power user classification technology, improves the accuracy, efficiency and adaptability of classification, and provides important technical support for the optimized operation and management of the power system. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a structural schematic diagram of the present invention;

[0014] Figure 2 It is a schematic diagram of a two-dimensional array SOM neural network model;

[0015] Figure 3 This is the flow chart of electricity user classification based on SOM and Kmeans++ algorithms. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0017] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:

[0018] Example 1

[0019] A power user classification system based on SOM and clustering algorithm, such as Figure 1 As shown, it includes:

[0020] The original load data acquisition module is used to pre-process the actual power load curve to obtain a standard typical daily power load curve;

[0021] The dimensionality reduction processing module is used to calculate the covariance matrix of the user's daily electricity load data set based on the standard typical daily electricity load curve, obtain the eigenvalues of the covariance matrix and the eigenvectors of each eigenvalue, calculate the variance contribution rate of the covariance matrix based on the eigenvalues of the covariance matrix and the eigenvectors corresponding to each eigenvalue, use the principal component analysis method to reduce the dimension of the standard typical daily electricity load curve to obtain the reduced dimension typical daily electricity load curve, and select the reduced dimension features in the reduced dimension typical daily electricity load curve based on the variance contribution rate;

[0022] The network training module is used to calculate the SOM weight vector of each node in the SOM output network based on the SOM algorithm and the standard typical daily electricity load curve, keep the dimension of the SOM weight vector consistent with the dimension of the dimensionality reduction feature, and update the SOM weight vector through the competitive learning method until the SOM weight vector no longer changes, thereby obtaining a new SOM weight vector. Based on the new SOM weight vector, the mapping position corresponding to the dimensionality-reduced typical daily electricity load curve in the SOM output layer is obtained. The mapping position is the result of the first stage clustering of electricity users based on the typical daily electricity load curve;

[0023] The algorithm classification module is used to perform a second-stage clustering on the results of the first-stage clustering according to the clustering algorithm, and utilize the feedback of the clustering algorithm performance evaluation index during the second-stage clustering process to adaptively adjust the neighborhood radius of the SOM algorithm and the number of clusters in the clustering algorithm until the neighborhood radius of the SOM algorithm and the number of clusters in the clustering algorithm meet the set requirements, thereby obtaining the final electricity user classification result.

[0024] In the above technical solution, the setting requirement refers to that the neighborhood radius of the SOM algorithm and the number of clusters in the clustering algorithm no longer change or the change amount is less than a threshold.

[0025] In the above technical solution, by clarifying the basic composition and functional modules of an electricity user classification system based on SOM and clustering algorithm, including modules such as original load data acquisition, dimensionality reduction processing, network training and algorithm classification, an effective classification of electricity users is achieved. A complete system framework is constructed with clear division of labor in each module, which is conducive to the subsequent systematic and standardized operation of electricity user classification, thereby improving the accuracy and efficiency of classification.

[0026] In the above technical solution, the specific method of preprocessing the actual power load curve to obtain the standard typical daily power load curve is:

[0027] Obtain a user's daily electricity load dataset, draw the user's actual electricity load curve based on the user's daily electricity load dataset, calculate the user's typical daily electricity load curve in each season based on the actual electricity load curve, and standardize the power data of each sampling point on each typical daily electricity load curve of each user to obtain a standard typical daily electricity load curve.

[0028] In the above technical solution, the user daily electricity load data set obtained shows that the user's electricity consumption habits show obvious seasonal characteristics. The user's daily electricity load data selects the average of the user's daily load in a certain season as the user's typical daily load in a certain season. The daily load curve of each user i corresponds to a D-dimensional vector Pi. The frequency of power system data collection is every hour, every half hour or every 15 minutes, and the corresponding dimensions D are 24, 48, and 96 respectively. The electricity consumption habits on weekdays and holidays should also be distinguished. The loads involved in this patent refer to weekday loads, and the idea of clustering loads on rest days is the same.

[0029] In the above technical solution, the specific meaning of the corresponding dimension D is: the existing data is collected once every hour, so the corresponding dimension is 24, 24 means it is collected once every hour, with a total of 24 sampling points, 48 means the data dimension is sampled once every half hour, and 96 means it is sampled once every quarter hour, corresponding to a total of 96 sampling points in a day.

[0030] In the above technical solution, the x-axis in the typical daily electricity load curve of each season represents time / h, and the y-axis represents power / kw.

[0031] In the above technical solution, a specific method for preprocessing the actual electricity load curve to obtain a standard typical daily electricity load curve is described in detail. By standardizing the preprocessing process, noise and outliers in the data can be eliminated, data quality can be improved, and reliable basic data can be provided for subsequent dimensionality reduction and clustering analysis, ensuring the accuracy of the classification results.

[0032] In the above technical solution, the P of the typical daily electricity load curve of the user in each season is calculated from the actual electricity load curve. i The specific calculation formula is:

[0033]

[0034] Among them, T s is the total number of working days in a season, P i j is the daily load curve vector of user i on the jth day, then the typical daily electricity load curve vectors corresponding to a group of users in a certain season are P1, P2, ...P m ;

[0035] The power data of each sampling point on each typical daily electricity load curve of each user is standardized to obtain a new standard value vector P i 0 , that is, the specific calculation formula of the standard typical daily electricity load curve is:

[0036]

[0037] Among them, P ik represents the sampling power of user i at the kth sampling point, P imax represents the maximum value of real-time power of user i at 96 sampling points per day, P in represents the sampling power of user i at the nth sampling point.

[0038] In the above technical solution, by providing detailed methods of calculation and standardization, the data processing process is made operational and consistent, which can better reflect the actual electricity consumption patterns of users and provide accurate data support for further analysis and classification.

[0039] In the above technical solution, if the sampling device fails at different sampling times and causes inaccurate sampling, the power value at the fault point may be incorrectly recorded as a constant value (such as a value of 0 or an outlier), causing the curve to lose its true fluctuation characteristics (such as "flattening"), and the clustering effect will become inaccurate. In this case, the following calculation formula is applied to correct the inaccurate data:

[0040]

[0041] Among them, P ik * represents the corrected data value of user i at sampling point k, where a and b represent forward points and backward points respectively, a1 represents the number of valid data points before the failure time k, b1 represents the number of valid data points after the failure time k, the forward points are the sampling point data at each moment before the time, and the backward points are the sampling point data at each moment after the time.

[0042] In the above technical solution, the smoothness of the temporally adjacent data for the forward and backward points is used to eliminate the influence of abnormal sampling values on the load curve and ensure the data quality during cluster analysis; this interpolation method utilizes the correlation of power loads at adjacent time points.

[0043] In the above technical solution, a data correction method is proposed to address the problem of inaccurate sampling caused by sampling equipment failure. A specific calculation formula is applied to correct inaccurate data, which can effectively solve the error problems that may occur during the data collection process, ensure the integrity and accuracy of the data, improve the robustness of the system, and ensure the reliability of the clustering effect.

[0044] In the above technical solution, the specific method for calculating the variance contribution rate of the covariance matrix based on the eigenvalues of the covariance matrix and the eigenvectors of each eigenvalue is:

[0045] Before calculating the covariance, the standardized typical daily electricity load curve data X needs to be de-meaned to obtain the de-meaned X'. The specific calculation formula is:

[0046]

[0047] Where, 1≤i≤m, X'={x1',x2',...,x i '...,x m '}, X={x1,x2,...,x i ...,x m}, x i ' represents the i-th typical daily electricity load curve data after removing the mean value, x i represents the typical daily electricity load curve data of the i-th day, is the mean of the typical daily electricity load curve data X, m is the total number of typical daily electricity load curve data, and the specific calculation formula of the covariance matrix Cov is:

[0048]

[0049] The eigenvalue set and eigenvector set of Cov are U={λ1,λ2,...,λ n} and V={v1,v2,...v j ...,v n}, where v j is a column vector with dimension n and 1 <j<n,λ1≥λ2≥...≥λ n , Represented as x i ', then the variance contribution rate of the i-th principal component c a The specific calculation formula is:

[0050]

[0051] Arrange the variance contribution rates from large to small, select the eigenvalues corresponding to the first z variance contribution rates, and then we have CCR z is the comprehensive contribution rate of the first z principal components, and its specific calculation formula is:

[0052]

[0053] Taking the appropriate size of z so that the comprehensive contribution rate is not less than 95%, which can reduce the loss of data information after dimensionality reduction. The data after dimensionality reduction can be expressed as P = XV', where V' represents the eigenvector corresponding to the first z largest eigenvalues after z is selected to have the appropriate size. Now P = [P1, P2, ... P m ] and p i =[p i1 ,p i2 ,...,p iz ] is the typical daily electricity load curve data after dimensionality reduction, then the SOM weight of each dimension corresponding to each node in the SOM output network is C = {c1, c2, ..., c z}.

[0054] In the above technical solution, by calculating and selecting the variance contribution rate, the main features in the data can be determined, providing a basis for dimensionality reduction processing, reducing information loss while reducing data dimensions and improving calculation efficiency.

[0055] In the above technical solution, the specific method for obtaining the mapping position corresponding to the typical daily electricity load curve after dimensionality reduction in the SOM output layer according to the new SOM weight vector is as follows:

[0056] Set the output of SOM to have M×N=p nodes, and assign random numbers to the SOM weight vector W j (j=1,2,...p), which connects the input node to the jth output node and converts the dimension-reduced typical daily electricity load curve data P k As input data, calculate Wj The weight vector W of the winner g And every input P k The specific calculation formula for the distance between is:

[0057]

[0058] Among them, the dimension of the weight vector is consistent with the dimension of the input data after dimensionality reduction. The weight vector with the smallest Euclidean distance from the sample data to the output node is selected as the winning weight vector. The two z-dimensional vectors P k (k=1,...,m) and W j The Euclidean distance can be expressed as:

[0059]

[0060] Among them, p ki is the input sample P k The i-th eigenvalue of ji is the weight vector W j The i-th component of ;

[0061] Define the Gaussian function as the update strength h of the BMU neuron i,j (t) to achieve neighborhood cooperation, and its specific calculation formula is:

[0062]

[0063] Among them, r i 、r j Represents the position coordinates of neurons i and j in the network, exp() represents the exponential function with base e, and σ(t) represents the neighborhood radius that decays over time, controlling the update range;

[0064] The SOM weight vector of the neurons in the BMU and its neighborhood is close to the input sample:

[0065] ω i (t+1)=ω i (t)+α(t)·h i,BMU (t)·(x-ω i )

[0066] Among them, α(t) represents the learning rate, which decays over time, x represents the input sample, and h i,BMU (t) represents the neighborhood relationship strength between neuron i and BMU, ω i (t) represents the neighborhood weight that changes over time;

[0067] Gradually narrow the neighborhood range and fine-tune the neurons in the local area of the winner neuron. The specific calculation formula is:

[0068]

[0069] Among them, τ represents the time constant, which controls the decay rate and simultaneously reduces the learning rate to avoid weight oscillation, σ0 represents the initial neighborhood radius, and t represents time;

[0070] Calculate the learning rate. The specific calculation formula is:

[0071]

[0072] Among them, α0 represents the initial learning rate, α(t) represents the learning rate;

[0073] Then Ng(t) is defined as the winner neighborhood, where the subscript g represents the winner, and the connection weight vector corresponding to each unit in the winner neighborhood is close to Xi; this process is repeated at different training times until the network is stable and the initial clustering of samples is completed based on the response of the output node, and its SOM weight vector Δw ij The specific learning equation is as follows:

[0074]

[0075] Among them, η(t) represents the learning rate of the tth time, and the learning rate decreases with the number of training epochs; represents the input of the i-th input node of the k-th sample; w ij Represents the connection between the i-th input node and the j-th output node value, where j∈N k (t), N k (t) represents the winner neighborhood of the k-th winner;

[0076] After completing the SOM network training according to the above method, the load data of each power user has a corresponding mapping position in the SOM output layer. The mapping position is the result of the first stage clustering of power user types based on the typical daily power load curve.

[0077] In the above technical solution, after the SOM network training is completed, the load data of each power user has a corresponding mapping position in the SOM output layer. At this time, the average weight vector of the neurons around each mapping position is extracted. These weight vectors reflect the common characteristics of the data in the area.

[0078] In the above technical solution, SOM maps input data to discrete output space nodes. Each output node has a weight vector consistent with the dimension of the input data. The vector closest to the input data is declared the winner, that is, the winning weight vector.

[0079] In the above technical solution, the output has a total of M×N=p nodes, and the vector composed is Wj(j=1,2,...p), C={c1,c2,...,c z} is the vector consisting of each node feature.

[0080] In the above technical solution, the goal of SOM is not only to allow a single neuron to represent the input sample, but also to maintain the topological structure; by adjusting the neurons in the neighborhood, samples that are close in the input space can also remain close in the mapped topological structure, thus forming a low-dimensional representation that maintains the topological characteristics.

[0081] In the above technical solution, the weight oscillation refers to the rapid and drastic changes in weight parameters during model training.

[0082] In the above technical solution, the approach refers to adjusting the weight vectors of the BMU and the neurons in its neighborhood to make them closer to the current input sample. This process is a key step in the learning and clustering of the SOM algorithm.

[0083] In the above technical solution, by clarifying the application details of the SOM algorithm in the classification of electricity users and the training and learning of the neural network, dimensionality reduction and feature extraction of high-dimensional power load data are achieved, providing effective data representation for further clustering analysis.

[0084] In the above technical solution, if Figure 2 As shown in the figure, the output layer mapping position of SOM corresponds to the first stage clustering. SOM maps high-dimensional data to a low-dimensional (usually two-dimensional) output layer grid through competitive learning. Each grid node corresponds to a "neuron", representing a potential clustering center. This process is the initial clustering, mapping similar data samples to the same or adjacent nodes to form a preliminary clustering result.

[0085] In the above technical solution, the specific method of performing the second stage clustering on the results of the first stage clustering is:

[0086] The Kmeans++ clustering algorithm is selected as the clustering algorithm to perform the second-stage clustering on the results of the first-stage clustering. First, a node is selected from the candidate pool as the initial cluster center; then the distance D(x) from each sample point to its nearest cluster center is calculated; the probability of each node being selected as the new cluster center is P(x), where the specific formula for calculating the probability P(x) is:

[0087]

[0088] Among them, x ikIt represents the sample data of the category except the i-th one in the second stage clustering. Xk represents all the sample data of the current category. Then, the sum of the squares of the cluster centers of all samples to their category J(C) is calculated, and each sample is assigned to the center of the category with the closest distance. The category center remains unchanged. The specific calculation formula for calculating J(C) is:

[0089]

[0090] Among them, u ji represents a binary variable, u ji =1 means that the i-th sample falls into the j-th category, u ji =0 means that the i-th sample does not fall into the j-th category, d represents the distance from the sample to the cluster center of the category; c j represents the sample cluster center;

[0091] Then, update the cluster center of the category and recalculate the cluster center c from K sample categories to the category based on the cluster center of the category j distance;

[0092] Then, the least squares method and Lagrange principle are applied to the update method of the category center until the convergence condition is met, and the center c of the K categories is updated according to the division results. j The specific calculation formula is:

[0093]

[0094] Among them, c j Represents the sample cluster center. Then we use the Lagrangian principle to solve the problem of minimizing the sum of squares of samples within the cluster to the cluster center. The optimization problem of K-means can be regarded as a constrained minimization problem, where the goal is to minimize J(C). The constraint condition is that each sample can only belong to one cluster. The specific calculation formula for constructing the Lagrangian function L is:

[0095]

[0096] λ is the Lagrange multiplier, which is obtained by continuously optimizing u ji Until the objective function converges, the second stage clustering is completed.

[0097] In the above technical solution, the SOM node serves as the initial center candidate pool for Kmeans++ clustering, giving priority to covering high-density areas. Kmeans++ then randomly selects a point as the first initial cluster center, calculates the distance from all points to the cluster center, and then selects a new cluster center based on the naive principle of "the farther the cluster center, the better". This process is repeated until k cluster centers are selected. Finally, these cluster centers are used as the initial cluster centers to run K-means, and new initial cluster centers are selected one by one by calculating the probability related to the distance ratio until K initial cluster centers are finally selected.

[0098] In the above technical solution, SOM outputs neural network nodes as the candidate pool for Kmeans++ clustering center selection.

[0099] In the above technical solution, J(C) represents the category, and the J(C) calculation formula means calculating the minimum value from the sample to the center, and then dividing the sample into the category.

[0100] In the above technical solution, the advantages of the SOM and Kmeans++ algorithms are fully utilized through a two-stage clustering method. SOM is used for initial clustering to obtain the number of clusters and cluster centers, and Kmeans++ is used for secondary clustering, which improves the accuracy and efficiency of clustering and avoids the problem that the traditional Kmeans algorithm is sensitive to the initial cluster centers.

[0101] In the above technical solution, the specific method of adaptively adjusting the neighborhood radius of the SOM algorithm and the number of clusters in the clustering algorithm by using the feedback of the clustering algorithm performance evaluation index is as follows:

[0102] By using the feedback of DB index and silhouette coefficient, we construct an adaptive network of SOM and Kmeans++ and dynamically adjust key parameters:

[0103] The DB index calculates the intra-class closeness based on the sum of the average distances between two classes, and the inter-class separation DB index is calculated based on the average distance between the class centers. The inter-class separation DB index is a clustering evaluation index based on the ratio of the intra-class closeness to the maximum mean of the inter-class separation function. Its value range is [0, +∞]. The smaller the value, the better the clustering performance. The specific calculation formula of the DB index is:

[0104]

[0105] Where K represents the number of clusters, represents the average distance within the i-th cluster, that is, the intra-cluster density, represents the average distance within the jth cluster, dis(c i ,c j ) represents the cluster center (c i ,cj ), n i Represents cluster C i The number of samples, dis(x,y) represents the distance from sample point x to sample point y; the meaning of the DB calculation formula is to find the ratio of the sum of the average distances within the cluster to the distance to the cluster center;

[0106] The SC index calculates the intra-class closeness based on the distance between all points in the class, and calculates the inter-class separation based on the closest distance between sample points in different classes. The SC index is a clustering evaluation index that combines the intra-class sample closeness and the inter-class sample separation. Its value range is [-1,1]. The larger the value, the better the clustering performance. The specific calculation formula of the SC index is:

[0107]

[0108]

[0109] Among them, C i is a cluster in cluster i; K is the number of clusters, i.e., the number of clusters, n i is the number of sample points in cluster i, a(x) represents the average distance between the sample and other points in the same cluster, and b(x) represents the average distance between the sample and the nearest cluster among all other clusters;

[0110] If the DB index is poor, when the DB index is greater than 0.5, it indicates that the intra-cluster separation is low, and if the SC index is low, when the SC index is less than 0.5, it indicates that the sample distribution is fuzzy. The DB index is used as feedback for the SOM neighborhood radius σ to enhance the topological structure;

[0111] The specific feedback method of DB index is:

[0112]

[0113] Among them, α SOM Indicates the adjustment factor, set to 0.5, DB target represents the target value of the DB index, which is set to 0.2 and is the minimum value during the iteration process. Δσ represents the adjustment amount of the SOM neighborhood radius. DB max and DB min is the maximum and minimum DB index value during the iteration process, DB (n) Indicates the DB index value of the nth iteration;

[0114] The specific update method for the SOM neighborhood radius is:

[0115] σ (n+1) =σ (n) +Δσ

[0116] Among them, σ (n+1)represents the SOM neighborhood radius after the n+1th iteration, σ (n) represents the SOM neighborhood radius after the nth iteration;

[0117] The specific feedback method of SC index is:

[0118]

[0119] Among them, β kmeans++ Indicates the adjustment factor, set to 0.5, SC max is the theoretical maximum value of SC, the value is 1, and then the number of Kmeans++ clusters is updated, SC (n) Indicates the SC index value of the nth iteration, and its specific calculation formula is:

[0120] k (n+1) =k (n) +round(Δk)

[0121] Among them, k (n+1) represents the number of Kmeans++ clusters after n+1 iterations, k (n) represents the number of Kmeans++ clusters after n iterations;

[0122] Finally, the SOM neighborhood radius value σ and the number of Kmeans++ clusters K are obtained after n+1 iterations.

[0123] In the above technical solution, the Davies-Bouldin (DB) index and the silhouette coefficient (SC) are both indicators for adaptively adjusting parameters.

[0124] In the above technical solution, a specific method is proposed to utilize the feedback of the clustering algorithm performance evaluation index to adaptively adjust the neighborhood radius of the SOM algorithm and the number of clusters in the clustering algorithm. The parameters are dynamically adjusted based on the feedback of the DB index and the silhouette coefficient. By introducing the feedback mechanism of the performance evaluation index, the key parameters of the algorithm can be adjusted in real time according to the clustering effect, thereby improving the adaptability of the algorithm and the reliability of the classification results, so that the system can better adapt to power load data of different types and characteristics.

[0125] Example 2

[0126] Electricity user classification method based on SOM and Kmeans++ clustering algorithm, such as Figure 3As shown in the figure, the original data is standardized to obtain the standardized typical daily electricity load curve; the PCA technology is then used to reduce the dimensionality of the original high-dimensional data, and the dimensionality reduction features in the typical daily electricity load curve after dimensionality reduction are obtained; the SOM grid is initialized on the PCA plane, and the weight vector connecting the input nodes and the output nodes is initialized. The number of clusters and cluster centers are determined from the preliminary clustering results obtained by the SOM algorithm, and are used as the input of the Kmeans++ algorithm in the second stage to participate in the iterative process. The parameters are adjusted according to the feedback of the clustering algorithm performance evaluation index until the objective function converges. When the function converges, the second stage clustering is completed and the clustering results are output.

[0127] A method for classifying power users based on SOM and clustering algorithm includes the following steps:

[0128] Preprocess the actual power load curve to obtain a standard typical daily power load curve;

[0129] The covariance matrix of the user's daily electricity load data set is calculated based on the standard typical daily electricity load curve, and the eigenvalues of the covariance matrix and the eigenvectors of each eigenvalue are obtained, thereby calculating the variance contribution rate of the covariance matrix. The standard typical daily electricity load curve is subjected to dimensionality reduction to obtain a reduced-dimensional typical daily electricity load curve, and the reduced-dimensionality features in the reduced-dimensional typical daily electricity load curve are selected based on the variance contribution rate.

[0130] The SOM weight vector of each node in the SOM output network is calculated based on the SOM algorithm and the standard typical daily electricity load curve. The dimension of the SOM weight vector is kept consistent with the dimension of the dimensionality reduction feature. The SOM weight vector is updated through the competitive learning method until the SOM weight vector no longer changes, and a new SOM weight vector is obtained. The mapping position corresponding to the dimensionality-reduced typical daily electricity load curve in the SOM output layer is obtained based on the new SOM weight vector. The mapping position is the result of the first stage clustering of the typical daily electricity load curve on the type of electricity users;

[0131] The results of the first-stage clustering are clustered in the second stage according to the clustering algorithm. During the second-stage clustering process, the feedback of the clustering algorithm performance evaluation index is used to dynamically adjust the SOM algorithm and the number of clusters in the clustering algorithm until the neighborhood radius of the SOM algorithm and the number of clusters in the clustering algorithm meet the set requirements, thereby obtaining the final electricity user classification result.

[0132] Example 3

[0133] A computer program product includes a computer program, which implements the steps of the method described in Example 2 when executed by a processor.

[0134] The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.

[0135] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0136] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or boxes.

[0137] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction system that is implemented in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0138] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit its scope of protection. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that after reading the present invention, those skilled in the art may still make various changes, modifications or equivalent substitutions to the specific implementation methods of the invention, but these changes, modifications or equivalent substitutions are all within the scope of protection of the pending claims of the invention.

Claims

1. A power user classification system based on SOM and clustering algorithm, characterized by: include: The original load data acquisition module is used to pre-process the actual power load curve to obtain a standard typical daily power load curve; The dimensionality reduction processing module is used to calculate the covariance matrix of the user's daily electricity load data set based on the standard typical daily electricity load curve, obtain the eigenvalues of the covariance matrix and the eigenvectors of each eigenvalue, thereby calculating the variance contribution rate of the covariance matrix, perform dimensionality reduction on the standard typical daily electricity load curve to obtain a reduced-dimensional typical daily electricity load curve, and select the reduced-dimensionality features in the reduced-dimensional typical daily electricity load curve based on the variance contribution rate; The network training module is used to calculate the SOM weight vector of each node in the SOM output network based on the SOM algorithm and the standard typical daily electricity load curve, keep the dimension of the SOM weight vector consistent with the dimension of the dimensionality reduction feature, and update the SOM weight vector through the competitive learning method until the SOM weight vector no longer changes, thereby obtaining a new SOM weight vector. Based on the new SOM weight vector, the mapping position corresponding to the dimensionality-reduced typical daily electricity load curve in the SOM output layer is obtained. The mapping position is the result of the first stage clustering of electricity users based on the typical daily electricity load curve; The algorithm classification module is used to perform second-stage clustering on the results of the first-stage clustering according to the clustering algorithm, and utilize the feedback of the clustering algorithm performance evaluation index in the second-stage clustering process to adaptively adjust the neighborhood radius of the SOM algorithm and the number of clusters in the clustering algorithm until the neighborhood radius of the SOM algorithm and the number of clusters in the clustering algorithm meet the set requirements, thereby obtaining the final electricity user classification result.

2. The power user classification system based on SOM and clustering algorithm according to claim 1 is characterized by: The specific method for preprocessing the actual power load curve to obtain the standard typical daily power load curve is as follows: Obtain a user's daily electricity load dataset, draw the user's actual electricity load curve based on the user's daily electricity load dataset, calculate the user's typical daily electricity load curve in each season based on the actual electricity load curve, and standardize the power data of each sampling point on each typical daily electricity load curve of each user to obtain a standard typical daily electricity load curve.

3. The power user classification system based on SOM and clustering algorithm according to claim 2 is characterized by: Calculate the typical daily electricity load curve P of the user in each season based on the actual electricity load curve i The specific calculation formula is: Among them, T s is the total number of working days in a season, P i j is the daily load curve vector of user i on the jth day, then the typical daily electricity load curve vectors corresponding to a group of users in a certain season are P1, P2, ...P m ; The power data of each sampling point on each typical daily electricity load curve of each user is standardized to obtain a new standard value vector P i 0 , that is, the specific calculation formula of the standard typical daily electricity load curve is: Among them, P ik represents the sampling power of user i at the kth sampling point, P imax P represents the maximum value of real-time power of user i at a set number of sampling points per day. in represents the sampling power of user i at the nth sampling point.

4. The power user classification system based on SOM and clustering algorithm according to claim 1 is characterized by: If the sampling device fails at different sampling moments and causes inaccurate sampling, the power value at the fault point is incorrectly recorded as a constant value, causing the curve to lose its true fluctuation characteristics. The clustering effect will become inaccurate. In this case, the following calculation formula should be applied to correct the inaccurate data: Among them, P i,k * represents the corrected data value of user i at sampling point k, where a and b represent forward and backward points respectively, a1 represents the number of valid data points before the failure time k, and b1 represents the number of valid data points after the failure time k.

5. The power user classification system based on SOM and clustering algorithm according to claim 1 is characterized by: The specific method for calculating the variance contribution rate of the covariance matrix based on the eigenvalues of the covariance matrix and the eigenvectors of each eigenvalue is: Before calculating the covariance, the standardized typical daily electricity load curve data X needs to be de-meaned to obtain the de-meaned X'. The specific calculation formula is: Where, 1≤i≤m, X'={x1',x2',...,x i '...,x m '}, X={x1,x2,...,x i ...,x m }, x i ' represents the i-th typical daily electricity load curve data after removing the mean value, x i represents the typical daily electricity load curve data of the i-th day, is the mean of the typical daily electricity load curve data X, m is the total number of typical daily electricity load curve data, and the specific calculation formula of the covariance matrix Cov is: The eigenvalue set and eigenvector set of Cov are U={λ1,λ2,...,λ n } and V={v1,v2,...v j ...,v n }, where v j is a column vector with dimension n and 1 <j<n,λ1≥λ2≥...≥λ n , Represented as x i ', then the variance contribution rate of the i-th principal component c a The specific calculation formula is: Among them, λ a is the eigenvalue of the ath principal component, The sum of all principal component eigenvalues, the variance contribution rate is arranged from large to small, the eigenvalues corresponding to the first z variance contribution rates are selected, and then the CCR is obtained. z is the comprehensive contribution rate of the first z principal components, and its specific calculation formula is: The appropriate size of z is selected so that the comprehensive contribution rate is not less than 95%. The data after dimensionality reduction is expressed as P = XV′, where V′ represents the eigenvector corresponding to the first z largest eigenvalues after z is selected. The current P = [P1, P2, ... P m ] and p i =[p i1 ,p i2 ,...,p iz ] is the typical daily electricity load curve data after dimensionality reduction, then the SOM weight of each dimension corresponding to each node in the SOM output network is C = {c1, c2, ..., c z }.

6. The power user classification system based on SOM and clustering algorithm according to claim 1 is characterized by: The specific method for obtaining the mapping position of the typical daily electricity load curve corresponding to the SOM output layer after dimensionality reduction based on the new SOM weight vector is: Set the output of SOM to have M×N=p nodes, and assign random numbers to the SOM weight vector W j , j=1,2,...p, it connects the input node to the jth output node, and converts the dimension-reduced typical daily electricity load curve data P k As input data, calculate W j The weight vector W of the winner g And every input P k The specific calculation formula for the distance between is: Among them, the dimension of the weight vector is consistent with the dimension of the input data after dimensionality reduction. The weight vector with the smallest Euclidean distance from the sample data to the output node is selected as the winning weight vector. The two z-dimensional vectors P k and W j The Euclidean distance can be expressed as: Where k = 1, ..., m, p ki is the input sample P k The i-th eigenvalue of ji is the i-th component of the weight vector Wj; Define the Gaussian function as the update strength h of the BMU neuron i,j (t) to achieve neighborhood cooperation, and its specific calculation formula is: Among them, r i 、r j Represents the position coordinates of neurons i and j in the network, exp() represents the exponential function with base e, and σ(t) represents the neighborhood radius that decays over time, controlling the update range; The SOM weight vector of the neurons in the BMU and its neighborhood is close to the input sample: oh i (t+1)=ω i (t)+α(t)·h i,BMU (t)·(x-ω i ) Among them, α(t) represents the learning rate, which decays over time, x represents the input sample, and h i,BMU (t) represents the neighborhood relationship strength between neuron i and BMU, ω i (t) represents the neighborhood weight that changes over time, ω i represents the neighborhood weight; Gradually narrow the neighborhood range and fine-tune the neurons in the local area of the winner neuron. The specific calculation formula is: Among them, τ represents the time constant, which controls the decay rate and simultaneously reduces the learning rate, σ0 represents the initial neighborhood radius, and t represents time; Calculate the learning rate. The specific calculation formula is: Among them, α0 represents the initial learning rate, α(t) represents the learning rate; Then Ng(t) is defined as the winner neighborhood, where the subscript g represents the winner, and the connection weight vector corresponding to each unit in the winner neighborhood is close to Xi; this process is repeated at different training times until the network is stable and the initial clustering of samples is completed based on the response of the output node, and its SOM weight vector Δw ij The specific learning equation is as follows: Among them, η(t) represents the learning rate of the tth time, and the learning rate decreases with the number of training epochs; represents the input of the i-th input node of the k-th sample; w ij Represents the connection between the i-th input node and the j-th output node value, where j∈N k (t), N k (t) represents the winner neighborhood of the k-th winner; After completing the SOM network training according to the above method, the load data of each power user has a corresponding mapping position in the SOM output layer. The mapping position is the result of the first stage clustering of power user types based on the typical daily power load curve.

7. The power user classification system based on SOM and clustering algorithm according to claim 1 is characterized by: The specific method for performing the second stage clustering on the results of the first stage clustering is: The Kmeans++ clustering algorithm is selected as the clustering algorithm to perform the second-stage clustering on the results of the first-stage clustering. First, a node is selected from the candidate pool as the initial cluster center; then the distance D(x) from each sample point to its nearest cluster center is calculated; the probability of each node being selected as the new cluster center is P(x), where the specific formula for calculating the probability P(x) is: Among them, x ik It represents the sample data of the category except the i-th one in the second stage clustering. Xk represents all the sample data of the current category. Then, the sum of the squares of the cluster centers of all samples to their category J(C) is calculated, and each sample is assigned to the center of the category with the closest distance. The category center remains unchanged. The specific calculation formula for calculating J(C) is: Among them, u ji represents a binary variable, u ji =1 means that the i-th sample falls into the j-th category, u ji =0 means that the i-th sample does not fall into the j-th category, d represents the distance from the sample to the cluster center of the category; c j represents the sample cluster center; Then, update the cluster center of the category and recalculate the cluster center c from K sample categories to the category based on the cluster center of the category j distance; Then, the least squares method and Lagrange principle are applied to the update method of the category center until the convergence condition is met, and the center c of the K categories is updated according to the division results. j The specific calculation formula is: Among them, c j Represents the sample cluster center, and the Lagrangian principle is used to solve the problem of minimizing the sum of squares of samples within the cluster to the cluster center. The optimization problem of K-means is regarded as a constrained minimization problem, where the goal is to minimize J(C). The constraint condition is that each sample can only belong to one cluster. The specific calculation formula for constructing the Lagrangian function L is: λ is the Lagrange multiplier, which is obtained by continuously optimizing u ji Until the objective function converges, the second stage clustering is completed.

8. The power user classification system based on SOM and clustering algorithm according to claim 1 is characterized by: The specific method of adaptively adjusting the neighborhood radius of the SOM algorithm and the number of clusters in the clustering algorithm using the feedback of the clustering algorithm performance evaluation index is as follows: By using the feedback of DB index and silhouette coefficient, we can build an adaptive network of SOM and Kmeans++ and adjust the parameters dynamically: The DB index calculates the intra-class closeness based on the sum of the average distances between two classes, and the inter-class separation DB index is calculated based on the average distance between the class centers. The inter-class separation DB index is a clustering evaluation index based on the ratio of the intra-class closeness to the maximum mean of the inter-class separation function. The specific calculation formula of the DB index is: Where K represents the number of clusters, represents the average distance within the i-th cluster, that is, the intra-cluster density, represents the average distance within the jth cluster, dis(c i ,c j ) represents the cluster center (c i ,c j ), n i Represents cluster C i The number of samples, dis(x,y) represents the distance from sample point x to sample point y; The SC index calculates the intra-class closeness based on the distance between all points in the class, and calculates the inter-class separation based on the closest distance between sample points in different classes. The SC index is a clustering evaluation index that combines the intra-class sample closeness and the inter-class sample separation. Its value range is [-1,1]. The larger the value, the better the clustering performance. The specific calculation formula of the SC index is: Among them, C i is a cluster in cluster i; K is the number of clusters, i.e., the number of clusters, n i is the number of sample points in cluster i, a(x) represents the average distance between the sample and other points in the same cluster, and b(x) represents the average distance between the sample and the nearest cluster among all other clusters; The DB index is used as feedback of the SOM neighborhood radius σ to enhance the topological structure; The specific feedback method of DB index is: Among them, α SOM represents the adjustment factor, DB target represents the target value of the DB index, Δσ represents the adjustment amount of the SOM neighborhood radius, and DB max and DB min Respectively represent the maximum and minimum DB index values during the iteration process, DB (n) Indicates the DB index value of the nth iteration; The specific update method for the SOM neighborhood radius is: s (n+1) =s (n) +Ds Among them, σ (n+1) represents the SOM neighborhood radius after the n+1th iteration, σ (n) represents the SOM neighborhood radius after the nth iteration; The specific feedback method of SC index is: Among them, β kmeans++ represents the adjustment factor, SC max is the theoretical maximum value of SC, and then the number of Kmeans++ clusters is updated, SC (n) Represents the SC index value of the nth iteration, and its specific calculation formula is: k (n+1) =k (n) +round(Δk) Among them, k (n+1) represents the number of Kmeans++ clusters after n+1 iterations, k (n) represents the number of Kmeans++ clusters after n iterations; Finally, the SOM neighborhood radius value σ and the number of Kmeans++ clusters K are obtained after n+1 iterations.

9. A method for classifying power users based on SOM and clustering algorithm, characterized in that: It includes the following steps: Preprocess the actual power load curve to obtain a standard typical daily power load curve; The covariance matrix of the user's daily electricity load data set is calculated based on the standard typical daily electricity load curve, and the eigenvalues of the covariance matrix and the eigenvectors of each eigenvalue are obtained, thereby calculating the variance contribution rate of the covariance matrix. The standard typical daily electricity load curve is subjected to dimensionality reduction to obtain a reduced-dimensional typical daily electricity load curve, and the reduced-dimensionality features in the reduced-dimensional typical daily electricity load curve are selected based on the variance contribution rate. The SOM weight vector of each node in the SOM output network is calculated based on the SOM algorithm and the standard typical daily electricity load curve. The dimension of the SOM weight vector is kept consistent with the dimension of the dimensionality reduction feature. The SOM weight vector is updated through the competitive learning method until the SOM weight vector no longer changes, and a new SOM weight vector is obtained. The mapping position corresponding to the dimensionality-reduced typical daily electricity load curve in the SOM output layer is obtained based on the new SOM weight vector. The mapping position is the result of the first stage clustering of the typical daily electricity load curve on the type of electricity users; The results of the first-stage clustering are clustered in the second stage according to the clustering algorithm. During the second-stage clustering process, the feedback of the clustering algorithm performance evaluation index is used to dynamically adjust the number of clusters in the SOM algorithm and the clustering algorithm until the neighborhood radius of the SOM algorithm and the number of clusters in the clustering algorithm meet the set requirements, thereby obtaining the final electricity user classification result.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to claim 9 are implemented.

Citation Information

Cited By

  • Electric energy demand response resource allocation method based on load division and Q-learning

    CN120638334A

  • Load partitioning and q-learning based method for electric demand response resource allocation

    CN120638334B