Power load clustering method based on multi-dimensional feature fusion and dynamic optimization
The method integrates time and frequency domain features with dynamic optimization to improve electric load clustering accuracy and adaptability, addressing the limitations of traditional static models in complex load data environments.
Patent Information
- Application Number
- CN202510803772.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-07-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional power load clustering methods are difficult to adapt to the complexity and diversity of modern power systems, especially in the context of high permeability renewable energy and multi-load access, and cannot effectively integrate multi-time scale and frequency domain characteristics, resulting in inaccurate clustering results.
The power load clustering method based on multi-dimensional feature fusion and dynamic optimization is adopted. By extracting time and frequency domain features, combining the improved random forest algorithm and K-means algorithm, high-dimensional feature screening and dimensionality reduction are carried out, and dynamic weight adjustment and sliding time window mechanism are introduced to realize dynamic update of the clustering center.
It improves the ability to identify power load behavior patterns, improves the accuracy and adaptability of clustering results, and ensures the safe and stable operation of the distribution network.
Smart Images

Figure CN120316541A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electric power information technology, and particularly relates to a power load clustering method based on multi-dimensional feature fusion and dynamic optimization. Background Art
[0002] In the context of the continuous increase in global energy demand, the problems of energy crisis and environmental deterioration have become increasingly prominent. As the core link in power grid planning, operation, and control, power load analysis plays an irreplaceable role in ensuring the safe and stable operation of the power system. With the rapid development of information technology and the significant improvement of the informatization level of the distribution network, the factors affecting power load show highly complex and diverse characteristics, including not only meteorological conditions such as temperature and humidity, but also external variables such as holiday effects and economic activities. This multi-dimensional complex influence makes the traditional load clustering methods based on a single dimension or simple models difficult to meet the needs of refined management of modern power systems. The traditional power load clustering methods are mainly constructed based on static statistical models. When facing load data with highly non-linear characteristics, these methods often show obvious limitations and are difficult to fully explore and characterize the internal laws of complex data.
[0003] In addition, the traditional load clustering methods generally ignore the dynamic change characteristics of load data at different time scales. For example, the daily load shows obvious morning and evening peak characteristics, the weekly load reflects the difference in electricity consumption between weekdays and weekends, and the monthly and annual loads can better reflect seasonal and periodic fluctuations. If only a single time scale is used for modeling, it is easy to cause the model to extract key features incompletely, thus affecting the accuracy and practical application value of the clustering results. Especially in the context of high-penetration renewable energy and diversified load access, the power load shows stronger volatility and uncertainty, and the static clustering method of the traditional model has been difficult to meet the actual needs.
[0004] At the same time, with the continuous improvement of data acquisition accuracy and granularity, the dimension and complexity of load data have also increased rapidly, bringing problems such as information redundancy and dimensional explosion. How to extract representative features from multi-dimensional high-frequency data and effectively fuse these features is an important challenge faced by current load clustering research. Therefore, there is an urgent need for an advanced clustering method that can simultaneously fuse time-domain and frequency-domain features, take into account multi-time scale information, and have the ability of dynamic optimization to improve the recognition ability of power load behavior patterns and provide a more reliable foundation for load forecasting, dispatching optimization, and demand response of smart grids.
[0005] In view of the above problems, an efficient and accurate load clustering method is particularly important. On the basis of traditional load clustering, considering the time-domain and frequency-domain features of multiple time scales, a power load clustering method based on multi-dimensional feature fusion and dynamic optimization is designed.
[0006] The power load clustering method based on multi-dimensional feature fusion and dynamic optimization mainly considers two aspects of problems: (1) how to model the load clustering model by simultaneously fusing the dual factors of time domain and frequency domain; (2) how to reduce the influence of multi-time scales such as daily load, weekly load, monthly load, annual load, etc. and high-dimensional features on power load clustering. Summary of the Invention
[0007] In order to overcome the problems in the prior art, the present invention proposes a power load clustering method based on multi-dimensional feature fusion and dynamic optimization.
[0008] The technical solution of the present invention to solve the above technical problems is as follows: A power load clustering method based on multi-dimensional feature fusion and dynamic optimization includes the following steps: Obtain load data and preprocess the load data; Based on the preprocessed load data, extract time domain features and frequency domain features of different time scales, and construct a multi-scale time-frequency domain fusion feature; Improve the unsupervised importance evaluation model of the random forest, use the Kmeans algorithm to generate pseudo-labels, take the pseudo-labels as the target variables, train the improved unsupervised importance evaluation model of the random forest, and update the feature importance ranking; Based on the updated feature importance ranking, obtain a load feature matrix, obtain a new load feature matrix through dimensionality reduction, and calculate the weights of features of different time scales; Based on the weights of features of different time scales, define a weighted DTW distance, use the GEP algorithm to initialize the clustering center, and perform load clustering based on the Kmeans algorithm, and output the final load pattern label.
[0009] Further, based on the preprocessed load data, extracting time domain features and frequency domain features of different time scales, and constructing a multi-scale time-frequency domain fusion feature includes: Perform multi-time scale analysis on the preprocessed load data to obtain load data of each time scale, that is, including daily-level data, weekly-level data, monthly-level data, and annual-level data, and respectively extract time domain statistical features of the load data of each time scale, multi-scale time domain features: Perform wavelet decomposition and Fourier transform on the load data of each time scale to extract frequency domain features, and construct multi-scale frequency domain load features; Multilevel hierarchical fusion of the multi-time scale time domain statistical features and the multi-scale frequency domain features is performed according to the time scale to obtain the final fused feature, that is, the multi-scale time-frequency domain fusion feature.
[0010] Furthermore, the time-domain statistical features include the mean value, peak value, valley value, variance, kurtosis, and stability index, and the frequency-domain features include wavelet transform energy entropy, approximation coefficient, and detail coefficient.
[0011] Furthermore, the unsupervised importance evaluation model of the improved random forest includes: The unsupervised importance evaluation model of the improved random forest adjusts the node splitting criterion based on the principle of internal clustering index driving: Dynamically combine the silhouette coefficient and DBI index in the internal evaluation index of clustering: ; In the above formula, represents the weighted clustering evaluation index; represents the weight factor; represents the distance from the sample to the nearest different-class cluster; represents the average distance from the sample to the same-class cluster; represents the average distance from the data within the class to the cluster centroid; represents any class sample; represents any class sample; represents the number of clusters of the clustering; And in the construction of the decision tree, use the formula: ; In the above formula, represents the information gain brought by splitting through the feature ; represents the information measure of the parent node; represents the number of data samples of the left child node after splitting; represents the total number of data samples of the parent node; represents the information measure of the left child node after splitting; represents the number of data samples of the right child node after splitting; represents the information measure of the right child node after splitting; Select the feature that maximizes gain for partitioning. During the splitting process, use the formula to maximize the intra-class compactness and inter-class separability of the samples, where is the between-class scatter matrix, and is the within-class scatter matrix.
[0012] Furthermore, training the unsupervised importance evaluation model of the improved random forest and updating the feature importance ranking includes: Based on Calculate the contribution of each feature to the pseudo-class division, gradually eliminate the features with the lowest importance. After each round of feature elimination, verify the consistency of the clustering results through subsampling, and retrain and improve the unsupervised importance evaluation model of the random forest and update the importance ranking in each iteration; Judge whether the number of features or the clustering evaluation index reaches the preset threshold. When the number of features drops to the preset threshold or the clustering evaluation index fluctuation threshold, the feature screening ends.
[0013] Furthermore, based on the updated feature importance ranking, obtain the load feature matrix, and obtain the new load feature matrix through dimensionality reduction, including: According to the feature importance ranking, obtain the screened load feature matrix: Perform standardization processing on the screened load feature matrix to obtain the standardized load feature matrix; Use covariance to obtain the covariance matrix of the standardized load feature matrix; Construct a characteristic equation to obtain the eigenvalues of the covariance matrix; Based on the eigenvalues of the covariance matrix, calculate the variance contribution rate and the cumulative variance contribution rate, and construct the new sample matrix after dimensionality reduction.
[0014] Furthermore, use the GEP algorithm to initialize the clustering center, perform load clustering based on the Kmeans algorithm, and output the final load pattern labels, including: Use the GEP algorithm to initialize the clustering center, and at the same time introduce a sliding time window mechanism to generate the data set for each aggregation training; Introduce the weighted DTW distance and the weighted clustering evaluation index, and combine with the Kmeans algorithm to perform clustering analysis on the load data; When new data is detected, slide the time window to update the data set; if the load change within the sliding window exceeds the preset threshold, recalculate the clustering center: Use the current cluster center as the initial population, perform crossover and mutation operations, and retain the individual with the highest fitness as the new generation cluster center to update the clustering center; If the number of iterations reaches the maximum threshold or the weighted clustering evaluation index meets the preset minimum threshold, output the final load pattern labels.
[0015] Compared with the prior art, the present invention has the following technical effects: The present invention proposes a power load clustering method based on multi-dimensional feature fusion and dynamic optimization. By constructing a joint time-frequency domain feature space, the system extracts the time-domain statistical features and frequency-domain parameters of power load data, and fuses the load feature matrices of multiple time scales. An improved random forest combined with recursive feature elimination is used for high-dimensional feature screening, and then joint dimensionality reduction is performed through PCA and an adaptive threshold, achieving feature compression while retaining more than 95% of the information. Subsequently, based on an improved KMeans clustering algorithm, a dynamic weight adjustment, GEP optimization, and sliding time window mechanism are introduced to achieve self-adaptive determination of the number of clusters, avoidance of local optima, and real-time dynamic update. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0017] Figure 1 It is a schematic diagram of the overall structure of the system of the present invention; Figure 2 It is a schematic flowchart of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following, in combination with the accompanying drawings and preferred embodiments, details the specific embodiments, structures, features, and effects of the technical solutions proposed according to the present invention. The specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0019] The purpose of the present invention is to provide a power load clustering method based on multi-dimensional feature fusion and dynamic optimization to address the challenges in power load pattern recognition. This mechanism is a strategic method that can be used to effectively and accurately identify electricity consumption load patterns, thereby ensuring the safe and stable operation of the distribution network.
[0020] Figure 1 A power load clustering system based on multi-dimensional feature fusion and dynamic optimization is provided, which includes: a time-frequency domain multi-scale feature fusion device, a high-dimensional feature selection and dimensionality reduction device, and an adaptive dynamic load clustering device; The time-frequency domain multi-scale feature fusion device extracts time-domain features and frequency-domain features at different time scales to construct a multi-scale time-frequency domain fusion feature space, systematically characterizing the transient behavior, periodic characteristics, and long-term trends of the load; The high-dimensional feature selection and dimensionality reduction device calculates the feature importance based on the improved random forest algorithm, combines recursive feature elimination to screen key features, and reduces the high-dimensional features to low-dimensional through adaptive PCA, significantly reducing the complexity of the model; The adaptive dynamic load clustering device combines the K-means algorithm and the GEP algorithm to achieve dynamic update of the clustering centers, and jointly determines the optimal number of clusters through the elbow method and the silhouette coefficient.
[0021] The following is a specific introduction: The time-frequency domain multi-scale feature fusion device: By extracting the time-domain statistical features and frequency-domain features at the daily, weekly, monthly, and annual levels, a multi-scale time-frequency domain joint feature space is constructed to systematically characterize the transient behavior, periodic law, and long-term trend of the load; among them, the time-domain statistical features include the average value, peak value, valley value, variance, kurtosis, stability index, etc., and the frequency-domain features include wavelet transform energy entropy, approximation coefficient, and detail coefficient.
[0022] The specific implementation steps of the time-frequency domain multi-scale feature fusion device include: For the load data Perform multi-time scale analysis at the daily, weekly, monthly, and annual levels to obtain daily-level data , weekly-level data , monthly-level data and annual-level data ; among them, for the data sequences of each time scale (day, week, month, year), extract 6 time-domain statistical features including the average value, peak value, valley value, variance, kurtosis, and stability index, and construct a multi-scale time-domain feature set : ; Average value: ; Peak value: ; Valley value: ; Variance: ; Kurtosis: ; Stability index: , where is the standard deviation; In the above formula, represents the average value of the daily-level data; represents the average value of the weekly-level data; represents the average value of the monthly-level data; Represents the average value of grade data; Represents the peak value of daily data; Represents the peak value of weekly data; Represents the peak value of monthly data; Represents the peak value of grade data; Represents the trough value of daily data; Represents the trough value of weekly data; Represents the trough value of monthly data; Represents the trough value of grade data; Represents the variance of daily data; Represents the variance of weekly data; Represents the variance of monthly data; Represents the variance of grade data; Represents the kurtosis of daily data; Represents the kurtosis of weekly data; Represents the kurtosis of monthly data; Represents the kurtosis of grade data; Represents the stability index of daily data; Represents the stability index of weekly data; Represents the stability index of monthly data; Represents the stability index of grade data; N represents the length of the load data sequence.
[0023] Use discrete wavelet transform to perform multi-scale decomposition on the data sequences of each time scale (daily data , weekly data , monthly data and grade data ) to capture the transient changes and periodic behaviors at different scales. The specific process is as follows: (1) Calculate the approximation coefficients and detail coefficients respectively: ; ; In the above formula, Represents the approximation coefficient of the th layer; Represents the wavelet function; Represents the detail coefficient of the th layer; Represents the scaling function; Represents the time shift index.
[0024] (2) Calculate the energy coefficients of each decomposition layer, which can effectively reflect the change intensity of the load in different frequency bands and time scales. The specific calculation formula is as follows: ; In the above formula, Indicates the approximate energy coefficient; Indicates the detail energy coefficient.
[0025] (3)Calculate high-level features such as wavelet energy entropy to further characterize the distribution of energy in each layer in the time-frequency space. The specific calculation formula is as follows: ; ; In the above formula, Indicates the proportion of the energy of the th coefficient in the th layer of wavelet transform; Indicates the wavelet energy entropy of the th layer; Indicates the wavelet coefficient of the th layer; Indicates the wavelet coefficient of the th layer; m and Indicate the indices of different coefficients in the th layer of wavelet transform.
[0026] (4)By performing separate wavelet decompositions on the data sequences of each time scale (daily data , weekly data , monthly data , and annual data ), multi-scale frequency domain features are obtained: ; In the above formula, Indicates the approximate energy coefficient of the daily data in the th layer; Indicates the approximate energy coefficient of the weekly data in the th layer; Indicates the approximate energy coefficient of the monthly data in the th layer; Indicates the approximate energy coefficient of the annual data in the th layer; Indicates the detail energy coefficient of the daily data in the th layer; Indicates the detail energy coefficient of the weekly data in the th layer; Indicates the detail energy coefficient of the monthly data in the th layer; Indicates the detail energy coefficient of the annual data in the th layer; Indicates the wavelet energy entropy of the daily data in the th layer; Indicates the wavelet energy entropy of the weekly data in the Wavelet energy entropy of the layer; Indicates the wavelet energy entropy of the monthly data at the layer; Indicates the wavelet energy entropy of the annual data at the layer.
[0027] After the frequency domain feature extraction, due to the large number of time-frequency domain features, direct fusion will cause the model complexity to be too high. Therefore, the time-frequency domain multi-scale feature fusion device performs multi-level hierarchical fusion on the extracted time-domain features of multiple time scales and frequency-domain features of multiple scales, and defines the cross-layer fusion weight , satisfying , which is used to balance the contribution degrees of different time scales, so that not only can multi-dimensional features of different time scales and different frequency bands be retained, but also the model complexity can be reduced. The final feature set after fusion is , specifically expressed as follows: ; where L represents the number of time scales (e.g., L = 4 corresponds to day, week, month, year).
[0028] High-dimensional feature selection and dimensionality reduction device: used to avoid the excessive dimensionality of the time-domain features and frequency-domain features of different time scales in the dataset, resulting in too high model complexity and thus too low clustering efficiency of the model. It calculates the feature importance based on the improved random forest algorithm, combines recursive feature elimination to screen key features, and reduces the dimension through adaptive PCA. Before performing load clustering, it screens and reduces the dimension of the high-dimensional features, thereby reducing the complexity of the clustering model and improving the clustering efficiency and recognition accuracy.
[0029] The specific implementation steps of the high-dimensional feature selection and dimensionality reduction device include: Step 1: Assume that there are a total of trees in the random forest algorithm, and there are a total of sample data in the dataset D after the time-frequency domain multi-scale feature fusion, and each sample data has features, ; Step 2: For each of the trees, use the Bagging algorithm to randomly sample the same scale of data from the dataset as samples, and a total of sample training subsets are formed to obtain a new data subset , where . The data not drawn forms the out-of-bag data (OOB), and the out-of-bag data is equally divided into subsets, denoted as ; Step 3: Randomly select feature variables as the random feature subspace , and use it as the input of the decision tree. Train on the new data subset corresponding to this decision tree; Step 4: For each decision tree, repeat Step 3, conduct multiple trainings, and select the optimal random feature subspace as the input of the decision tree; Step 5: Do not perform pruning operations on each decision tree, and generate the corresponding decision tree according to its respective data subset ; Step 6: Generate a random forest model composed of decision trees . For each decision tree corresponding number of (Out-Of-Bag) data for voting, and record the voting score of each sample in the data as ; Step 7: Randomly change the values of each feature variable in the out-of-bag data samples to generate new out-of-bag data test samples, denoted as . Re-vote on the data through the random forest model to obtain the voting matrix ; Step 8: Use the formula to evaluate the importance of each feature variable , and sort them in descending order; Step 9: According to the feature importance ranking, remove the last two features in the ranking, so as to obtain a new feature set. Repeat Steps 2 - 8 until only features are left, and obtain the filtered feature matrix , which is specifically expressed as:
[0030] Step 10: Calculate the sample mean and standard deviation of the j-th variable; Sample mean of the j-th variable: ; Sample standard deviation of the j-th variable: ; In the above formula, k 3 represents the number of rows in this matrix.
[0031] The standardized sample elements are , the standardized sample matrix is , and its specific representation is: , where , .
[0032] Step 11: Calculate the covariance matrix of the standardized sample matrix : : ; In the above formula, represents covariance.
[0033] Step 12: Construct the characteristic equation , and calculate the eigenvalues of the covariance matrix and their corresponding eigenvectors I ; Step 13: Calculate the variance contribution rate of the th index and the cumulative variance contribution rate . When the current th eigenvalue satisfies , select the eigenvectors corresponding to the first largest eigenvalues to form the projection matrix , where , , ; where represents the eigenvalue of the th index; represents the eigenvalue of the k th index.
[0034] Step 14: Construct the new sample matrix after dimensionality reduction , where , and the specific calculation formula is as follows: ; In the above formula, represents the conversion coefficient, .
[0035] Adaptive dynamic load clustering algorithm: It is used to solve the problems faced by traditional clustering algorithms in power load scenarios, such as fixed number of clusters, easy to fall into local optimum, and unable to update in real time. It combines the improved DTW algorithm with the K-means algorithm, and introduces a dynamic weight adjustment, a sliding time window mechanism and an adaptive clustering number determination strategy to achieve global optimization of the clustering center, adaptive determination of the number of clusters, and real-time dynamic update of the model.
[0036] The specific implementation steps of the adaptive dynamic load clustering device include: ; Among them, represents the Euclidean distance between the load curve and ; is the alignment path, is the path penalty term, is obtained by normalizing the feature importance vector calculated by the high-dimensional feature selection module, so that the critical period occupies a higher weight in the distance calculation.
[0037] To adapt to the real-time changes of load data, a sliding time window mechanism is introduced to dynamically update the input data. Suppose the length of the sliding window is , and the sliding step size each time is , then the data set for each aggregation training is: . After each slide, the clustering center vector is recalculated, , where represents the th clustering cluster, is the data point belonging to this cluster. If the load change within the sliding window exceeds the preset threshold, the recalculation of the clustering center is triggered to ensure the fast response ability of the clustering model to the load dynamic changes.
[0038] The adaptive dynamic load clustering device does not require a preset number of clusters , combines the silhouette coefficient and the DBI index, and realizes multi-objective optimization based on the GEP algorithm, minimizes the DBI index and maximizes the silhouette coefficient, so as to dynamically determine the optimal number of clusters.
[0039] Based on the same inventive concept, the embodiment of the present application also provides a power load clustering method based on multi-dimensional feature fusion and dynamic optimization for implementing a power load clustering system based on multi-dimensional feature fusion and dynamic optimization involved above. The implementation solution provided by this method to solve the problem is similar to the implementation solution recorded in the above system. Therefore, the specific limitations in one or more system embodiments provided below can refer to the limitations on a power load clustering system based on multi-dimensional feature fusion and dynamic optimization in the above text, and will not be repeated here.
[0040] In an embodiment of the present invention, referring to Figure 2 , a power load clustering method based on multi-dimensional feature fusion and dynamic optimization is provided, including the following steps: Obtain load data and preprocess the load data; Based on the preprocessed load data, extract time-domain features and frequency-domain features at different time scales, and construct multi-scale time-frequency domain fusion features; Improve the unsupervised importance evaluation model of the random forest, use the Kmeans algorithm to generate pseudo-labels, take the pseudo-labels as the target variables, train the improved unsupervised importance evaluation model of the random forest, and update the feature importance ranking; Based on the updated feature importance ranking, obtain the load feature matrix, obtain a new load feature matrix through dimensionality reduction, and calculate the weights of features at different time scales; Based on the weights of features at different time scales, calculate the weighted DTW distance of features at different time scales, use the GEP algorithm to initialize the clustering center, and perform load clustering based on the Kmeans algorithm to output the final load pattern label.
[0041] The following details each of the above steps: Step 100: Obtain load data and preprocess the load data.
[0042] Read the load data, preprocess the read load data, delete the invalid load data, repair the abnormal load data, and normalize the repaired load data using Z-score to eliminate the dimension difference, obtaining the preprocessed load data, and enter Step 200.
[0043] Step 200: Based on the preprocessed load data, extract time-domain features and frequency-domain features at different time scales, and construct multi-scale time-frequency domain fusion features to systematically characterize the transient behavior, periodic characteristics, and long-term trends of the load.
[0044] As an example, this Step 200 may include: Step 210: Perform multi-time scale analysis on the preprocessed load data to obtain time-domain statistical features.
[0045] For the preprocessed load data perform multi-time scale analysis to obtain the load data at each time scale, that is, including daily data , weekly data , monthly data and annual data , and respectively extract 6 time-domain statistical features of the average value, peak value, valley value, variance, kurtosis, and stability index from the load data at each time scale, and the multi-scale time-domain feature set : ; Average value: ; Peak value: ; Valley value: ; Variance: ; Kurtosis: ; Stability index: , where is the standard deviation; In the above formula, represents the daily data average value; represents the weekly data average value; represents the monthly data average value; represents the annual data average value; represents the daily data peak value; represents the weekly data peak value; represents the monthly data peak value; represents the annual data peak value; represents the daily data trough value; represents the weekly data trough value; represents the monthly data trough value; represents the annual data trough value; represents the daily data variance; represents the weekly data variance; represents the monthly data variance; represents the annual data variance; represents the daily data kurtosis; represents the weekly data kurtosis; represents the monthly data kurtosis; represents the annual data kurtosis; represents the daily data stability index; represents the weekly data stability index; represents the monthly data stability index; represents the annual data stability index.
[0046] Step 220: Use discrete wavelet transform to perform multi-scale decomposition on the load data of each time scale to obtain multi-scale frequency domain features.
[0047] Adopt wavelet decomposition and Fourier transform for the load data of each time scale, extract wavelet energy entropy, approximation coefficients, and detail coefficients, and construct a multi-scale frequency domain load feature set : ; In the above formula, , , , respectively represent the approximate energy coefficients of daily data, weekly data, monthly data, and annual data at the th layer; , , , respectively represent the detailed energy coefficients of daily data, weekly data, monthly data, and yearly data at the th layer; , , , respectively represent the wavelet energy entropy of daily data, weekly data, monthly data, and yearly data at the th layer.
[0048] Step 230: Multilevel hierarchical fusion of the multi-time-scale time-domain statistical features and multi-scale frequency-domain features is performed according to the time scale to obtain the final fused features, i.e., the multi-scale time-frequency domain fusion features.
[0049] Define the cross-layer fusion weight , satisfying , which is used to balance the contribution degrees of different time scales. For the extracted multi-scale time-domain features and multi-scale frequency-domain features, multilevel hierarchical fusion is performed according to the time scale, and the final fused feature set is .
[0050] Step 300: Improve the unsupervised importance evaluation model of the random forest. Use the Kmeans algorithm to generate pseudo-labels, take the pseudo-labels as the target variables, train the improved unsupervised importance evaluation model of the random forest, and update the feature importance ranking.
[0051] As an example, Step 300 may include the following sub-steps: Step 310: Improve the unsupervised importance evaluation model of the random forest, and adjust the node splitting criterion based on the principle of internal clustering index driving.
[0052] Dynamically combine the silhouette coefficient and DBI index in the internal evaluation index of clustering to replace the traditional information gain: ; In the above formula, represents the weighted clustering evaluation index; represents the weight factor; represents the distance from the sample to the nearest different-class cluster; represents the average distance from the sample to the same-class cluster; represents the average distance from the data within the class to the cluster centroid; represents any class sample; represents any class sample; represents the number of clusters of the clustering; And in the construction of the decision tree, use the formula: ; In the above formula, represents the information gain brought by splitting through feature ; represents the information measure of the parent node; represents the number of data samples of the left child node after splitting; represents the total number of data samples of the parent node; represents the information measure of the left child node after splitting; represents the number of data samples of the right child node after splitting; represents the information measure of the right child node after splitting; Select the feature that maximizes for partitioning. During the splitting process, use the formula to maximize the intra-class compactness and inter-class separability of the samples, where is the between-class scatter matrix, is the within-class scatter matrix.
[0053] Step 320: Use the Kmeans algorithm to generate pseudo-labels, use the pseudo-labels as the target variable, train the unsupervised importance evaluation model of the improved random forest, and eliminate the feature with the lowest importance in this round.
[0054] Use the Kmeans algorithm for fast clustering to generate preliminary "class labels", that is, pseudo-labels. Use the pseudo-labels as the target variable to train the unsupervised importance evaluation model of the improved random forest. Based on calculate the contribution degree of each feature to the pseudo-classification , gradually eliminate the feature with the lowest importance. After each round of feature elimination, verify the consistency of the clustering results through subsampling to avoid over-deletion. Retrain the model and update the importance ranking each time.
[0055] Step 320: Determine whether the number of features or the clustering evaluation index reaches the preset threshold. When the number of features drops to the preset threshold or the clustering evaluation index fluctuation threshold, the feature screening ends.
[0056] Calculate the volatility of the load feature between sliding windows : ; In the above formula, represents the number of time points within the sliding window; represents the time point at the value of the th load feature, j represents the average value of the
[0057] Dynamically adjust the importance weight: ; In the above formula, represents the importance weight of the j th load characteristic after dynamic adjustment; represents the maximum value of the volatility of all load characteristics; represents the volatility of the j th load characteristic between sliding windows; represents the original importance weight of the j th load characteristic.
[0058] When the number of features drops to the preset threshold or the fluctuation threshold of the clustering evaluation index, the iteration terminates and the feature screening ends.
[0059] Step 400: Based on the updated feature importance ranking, obtain the load feature matrix, and through dimensionality reduction, obtain a new load feature matrix, and calculate the weights of features at different time scales.
[0060] As an example, this step 400 may include: Step 410: According to the feature importance ranking, obtain the filtered load feature matrix : ; In the above formula, represents the th feature after screening.
[0061] Step 410: Perform standardization processing on the filtered load feature matrix to obtain a standardized load feature matrix.
[0062] The sample mean of the jth variable: ; The sample standard deviation of the jth variable: ; The sample element after standardization is: ; The standardized sample matrix is and its specific representation is: where , .
[0063] Step 430: Obtain the covariance matrix of the standardized sample matrix : ; Among them, , , is the covariance coefficient of variables and in the sample matrix.
[0064] Step 440: Obtain a new sample matrix through PCA adaptive dimensionality reduction.
[0065] Construct the characteristic equation , and obtain the eigenvalues of the covariance matrix and their corresponding eigenvectors ; Based on the eigenvalues of the covariance matrix , calculate the variance contribution rate of the th index and the cumulative variance contribution rate : , , ; When the cumulative variance contribution rate reaches a preset threshold, for example, the preset threshold is 95%, select the eigenvectors corresponding to its eigenvalues as the feature matrix after dimensionality reduction.
[0066] Construct the new sample matrix after dimensionality reduction: ; ; Among them, .
[0067] Step 450: Calculate the weights of features at different time scales and output the weight vector.
[0068] Obtained by normalizing the feature importance vector calculated by high-dimensional feature selection, so that the critical period occupies a higher weight in distance calculation.
[0069] Furthermore, calculate the weights of features in four dimensions: daily, weekly, monthly, and yearly: , Output the weight vector: ; Satisfy .
[0070] Step 500: Define the weighted DTW distance based on the weights of features at different time scales; initialize the clustering center using the GEP algorithm, and perform load clustering based on the Kmeans algorithm to output the final load pattern label.
[0071] As an example, this step 500 may include the following steps: Step 510: For time series samples P and Q, define a weighted DTW distance such that key features carry higher weights in distance calculation: ; where, represents the path penalty term; represents the weighted DTW distance; represents the distance from the sample to the nearest outlier cluster; represents the average distance from the sample to the inlier clusters.
[0072] Step 520: Use the GEP algorithm to initialize the clustering centers, and at the same time introduce a sliding time window mechanism to dynamically update the obtained load data, generating the data set for each aggregation training as: ; Introduce the above-mentioned weighted DTW distance and weighted clustering evaluation index , and combine with the Kmeans algorithm to perform clustering analysis on the load data.
[0073] Step 530: When new data is detected, slide the time window and update the data set ; If the load change within the sliding window exceeds a preset threshold, recalculate the clustering centers: ; In the above formula, represents the center of the th cluster; represents the sample set in the th cluster, represents the number of samples in the th cluster; is the data point belonging to this cluster.
[0074] If it does not exceed the preset threshold, directly go to step 540; Step 540: Take the current cluster centers as the initial population, through crossover and mutation operations, retain the individual with the highest fitness as the new generation of cluster centers, and update the clustering centers ; Step 550: If the number of iterations reaches the maximum threshold or the weighted clustering evaluation index meets the preset minimum threshold, output the final load pattern label, otherwise go to step 530.
[0075] The method of the present invention proposes an intelligent clustering method for electric power loads based on multi-dimensional feature fusion and dynamic optimization, effectively solving the pattern recognition problem brought by high-dimensional and large-scale load data. By fusing time-domain statistical features and frequency-domain features, combining high-dimensional feature selection and dynamic clustering methods, the accuracy of load type recognition is significantly improved, avoiding the traditional algorithm from falling into local optimum and ensuring the safe and stable operation of the distribution network.
[0076] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A power load clustering method based on multi-dimensional feature fusion and dynamic optimization, characterized in that The steps include: Obtain load data and preprocess the load data; Based on the preprocessed load data, extract time-domain features and frequency-domain features on different time scales, and construct a multi-scale time-frequency domain fusion feature; Improve the unsupervised importance evaluation model of the random forest, use the Kmeans algorithm to generate pseudo-labels, take the pseudo-labels as the target variables, train the improved unsupervised importance evaluation model of the random forest, and update the feature importance ranking; Based on the updated feature importance ranking, obtain a load feature matrix, obtain a new load feature matrix through dimensionality reduction, and calculate the weights of features on different time scales; Based on the weights of features on different time scales, calculate the weighted DTW distances of features on different time scales, use the GEP algorithm to initialize the cluster centers, and perform load clustering based on the Kmeans algorithm to output the final load pattern labels.
2. The power load clustering method based on multi-dimensional feature fusion and dynamic optimization according to claim 1, characterized in that, Based on the preprocessed load data, extract time-domain features and frequency-domain features on different time scales, and construct a multi-scale time-frequency domain fusion feature, including: Perform multi-time scale analysis on the preprocessed load data to obtain load data on each time scale, that is, including daily data, weekly data, monthly data, and annual data, and extract time-domain statistical features from the load data on each time scale, multi-scale time-domain features: Perform wavelet decomposition and Fourier transform on the load data on each time scale, extract frequency-domain features, and construct multi-scale frequency-domain load features; Multilevel hierarchical fusion of the multi-time scale time-domain statistical features and multi-scale frequency-domain features is performed according to the time scale to obtain the final fused features, that is, the multi-scale time-frequency domain fusion feature.
3. A power load clustering method based on multi-dimensional feature fusion and dynamic optimization according to claim 2, characterized in that The time-domain statistical features include mean value, peak value, valley value, variance, kurtosis, and stability index, and the frequency-domain features include wavelet transform energy entropy, approximation coefficient, and detail coefficient.
4. A power load clustering method based on multi-dimensional feature fusion and dynamic optimization according to claim 1, characterized in that, Improve the unsupervised importance evaluation model of the random forest, including: Improve the unsupervised importance evaluation model of the random forest, and adjust the node splitting criterion based on the internal clustering index driving principle: Dynamically combine the silhouette coefficient and DBI index in the internal evaluation index of clustering: ; In the above formula, represents the weighted clustering evaluation index; represents the weight factor; represents the distance from the sample to the nearest different-class cluster; represents the average distance from the sample to the same-class cluster; represents the average distance from the in-class data to the cluster centroid; represents any class sample; represents any class sample; represents the number of clusters in the clustering; represents the class sample mean; represents the class sample mean; And in the construction of the decision tree, use the formula: ; In the above formula, represents the information gain brought about by splitting through feature ; represents the information measure of the parent node; represents the number of data samples of the left child node after splitting; represents the total number of data samples of the parent node; represents the information measure of the left child node after splitting; represents the number of data samples of the right child node after splitting; represents the information measure of the right child node after splitting; Select to make The feature with the maximum gain is selected for division. During the splitting process, the formula is used to maximize the within-class compactness and between-class separability of the samples. Among them, is the between-class scatter matrix, is the within-class scatter matrix.
5. A power load clustering method based on multi-dimensional feature fusion and dynamic optimization according to claim 4, characterized in that Train the improved unsupervised importance evaluation model of the random forest, and update the feature importance ranking, including: Based on Calculate the contribution of each feature to the pseudo-class division, gradually eliminate the feature with the lowest importance. After each round of feature elimination, verify the consistency of the clustering results through subsampling. Re-train and improve the unsupervised importance evaluation model of the random forest and update the importance ranking at each iteration. Judge whether the number of features or the clustering evaluation index reaches the preset threshold. When the number of features drops to the preset threshold or the clustering evaluation index fluctuation threshold, the feature screening ends.
6. A power load clustering method based on multi-dimensional feature fusion and dynamic optimization according to claim 1, characterized in that, Based on the updated feature importance ranking, obtain a load feature matrix, and obtain a new load feature matrix through dimensionality reduction, including: According to the feature importance ranking, obtain the filtered load feature matrix: Perform normalization processing on the filtered load feature matrix to obtain a normalized load feature matrix; Use covariance to obtain the covariance matrix of the normalized load feature matrix; Construct a characteristic equation to obtain the eigenvalues of the covariance matrix; Based on the eigenvalues of the covariance matrix, calculate the variance contribution rate and the cumulative variance contribution rate, and construct a new sample matrix after dimensionality reduction.
7. A power load clustering method based on multi-dimensional feature fusion and dynamic optimization according to claim 1, characterized in that Use the GEP algorithm to initialize the cluster centers, and perform load clustering based on the Kmeans algorithm to output the final load pattern labels, including: Initialize the clustering centers using the GEP algorithm, and at the same time introduce a sliding time window mechanism to generate the data set for each aggregation training; Introduce the weighted DTW distance and weighted clustering evaluation index mentioned above, and combine with the Kmeans algorithm to perform clustering analysis on the load data; When new data is detected, slide the time window to update the data set; if the load change within the sliding window exceeds the preset threshold, recalculate the clustering centers: Use the current cluster centers as the initial population, and through crossover and mutation operations, retain the individual with the highest fitness as the new generation of cluster centers to update the clustering centers; If the number of iterations reaches the maximum threshold or the weighted clustering evaluation index meets the preset minimum threshold, output the final load pattern label.
Citation Information
Patent Citations
A building cooling and heating load forecasting method based on stochastic forest
CN109543203A
User abnormal request detection method and device, equipment and storage medium
CN113901441A
Industrial raw material consumption prediction method based on multi-task time sequence learning
CN114186711A
Mountain torrent disaster zoning method based on machine learning
CN114186780A
Method for identifying key pressure control points of water supply network
CN114493234A
Cited By
Fuzzy power consumption prediction method and system based on multi-scale dual supervised driving
CN120525378A
Ball mill load unsupervised soft measurement method based on space-time decoupling
CN120974193A
Dynamic response method of network attack defense strategy based on multi-head attention fusion
CN121037108A
Load clustering method and system based on multiple types of parks
CN121167345A
