Day load curve clustering method based on convolutional variational autoencoder

By preprocessing and reducing the dimensionality of power load data through a convolutional variational autoencoder, and combining it with the K-means algorithm, the clustering effect of daily load curves is optimized, which solves the problem of poor clustering effect of high-dimensional power load data and realizes more accurate analysis of user electricity consumption behavior.

CN115526277BActive Publication Date: 2025-11-21SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211401329.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-09
Publication Date
2025-11-21
Estimated Expiration
2042-11-09

AI Technical Summary

Technical Problem

Existing technologies have poor clustering performance when processing high-dimensional and complex power load curve data, making it difficult to effectively distinguish categories and have low computational efficiency. Traditional methods also struggle to extract nonlinear features.

Method used

A method based on convolutional variational autoencoder is used to preprocess, reduce dimensionality, and reconstruct power load data. The reconstruction error and distribution error are used as loss functions, and K-means algorithm is combined for clustering. The typical daily load curve is optimized by Gaussian weights.

Benefits of technology

It improves the clustering effect of power load curves, with greater inter-class differentiation and more accurate clustering results, enabling better understanding of user electricity consumption behavior patterns and supporting personalized electricity consumption strategies and energy-saving solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115526277B_ABST
    Figure CN115526277B_ABST
Patent Text Reader

Abstract

The present application relates to a daily load curve clustering method based on convolutional variational autoencoder, and belongs to the technical field of power system data processing, which proposes to use convolutional variational autoencoder, utilize its excellent reconstruction ability and nonlinear learning ability of neural network to extract time sequence characteristics of user daily load curve, and realize data dimension reduction, then cluster the extracted potential representation through K-means algorithm, and simultaneously utilize Gaussian distance weighting to optimize typical daily load curve. Through comparison with DBI clustering indexes of other clustering modes, the effectiveness of convolutional variational autoencoder used for clustering proposed in the present application is proved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of power system data processing, and particularly relates to a daily load curve clustering method based on a convolutional variational autoencoder. BACKGROUND

[0002] With the continuous development of smart grids, a large number of smart meters and smart terminals are installed in distribution networks to monitor and predict the power consumption behavior of power customers. These smart instruments can collect operation data of each link of power production and aggregate them into power big data, which contains huge potential data mining value. The basic characteristics of these big data can be summarized as "4V": large quantity (Volume), multiple types (Variety), high speed (Velocity) and high value (Value). Among them, the transformer or power user daily consumption data collected at different time intervals constitute the daily load curve of each monitoring point. The daily load curve has a strong supporting relationship for the analysis of user characteristics and the construction of power portraits. The clustering analysis task of the daily load curve can support the construction of typical daily load curves of power users and the extraction of load characteristics, which is conducive to the subsequent development of individualized power consumption strategies and energy-saving schemes for demand-side users, and the reduction of energy consumption and carbon emissions.

[0003] Currently, the main means for power load clustering includes direct and indirect methods. A current two-layer clustering analysis method improves the selection rule of the initial clustering center and solves the problem that the clustering algorithm is prone to local minimization. There is also an optimization algorithm to find the optimal clustering center and the number of clusters. The existing fuzzy C-means algorithm (FCM) is used to cluster the load data, but the FCM algorithm is sensitive to the initial condition and is prone to local optimization; the improved adaptive fuzzy C-means algorithm is proposed to solve the problem that the traditional FCM algorithm is prone to local optimization and sensitive to the initial condition, but it is still difficult to determine the optimal number of clusters. The improved K-means algorithm is used to optimize the selection of clustering center and clustering number, and the clustering analysis of the substation data of a certain province shows that the algorithm is feasible and effective. The above algorithms directly use the original data for clustering, but with the popularization and refinement of smart meters and smart terminals, the amount of data collected is large and the complexity is high, and the direct clustering method cannot guarantee the clustering effect.

[0004] Indirect clustering refers to combining the dimension reduction task and the clustering task, extracting the potential space of the original data through dimension reduction, and then clustering with the potential representation, which can not only save computer power, but also optimize the clustering effect. The existing features of the power load curve are compared with the information loss and calculation efficiency of various dimension reduction algorithms, and it is concluded that the principal component analysis (PCA) dimension reduction integrated clustering algorithm has the best effect. The existing day load curve dimension reduction clustering method based on singular value decomposition is proposed, and the example results show that the method has short running time, good robustness, and improves the accuracy of the load curve clustering. The existing method first uses the information entropy segmented aggregation approximation method to re-express the day load data set with variable time resolution, and then uses the spectral clustering method to obtain the load classification result. The above methods all use traditional methods for dimension reduction processing, but the analysis efficiency of a large number of high-dimensional and complex load curves is not high. Deep learning has strong nonlinear transformation ability and can obtain nonlinear potential features of the original space, and has higher clustering performance on large-scale complex data sets.

[0005] The existing method proposes a day load deep embedding clustering method based on one-dimensional convolution autoencoder, which optimizes the reconstruction error of the convolution autoencoder and the self-defined clustering layer. However, the clustering results show that the original power data has obvious stratification, and the difference between the load data is not considered. The existing method extracts the load potential features based on the deep convolution embedding autoencoder, and realizes the clustering task combined with K-means, and the results show that although the normalized power with little difference is used, the two categories have not large discrimination. The existing method proposes a deep embedding clustering method using a stacked autoencoder to jointly optimize the feature extraction and clustering task, which has good effect on image data clustering, but the results applied to time-discrete day load data need to be further verified. SUMMARY

[0006] The present application aims to provide a day load curve clustering method based on convolutional variational autoencoder, which solves the technical problems existing in the prior art, so that the dimension reduction algorithm can obtain as many features of the original data as possible, and obtain as many categories as possible, so that the inter-class discrimination is larger and the clustering effect is better.

[0007] To achieve the above purpose, the technical scheme of the present application is:

[0008] The day load curve clustering method based on convolutional variational autoencoder comprises the following steps:

[0009] S1, data deletion, abnormal data detection and replacement, and data normalization are used to realize the preprocessing of the original day load data;

[0010] S2, the convolutional variational autoencoder is used for dimension reduction and reconstruction of the load data, and the reconstruction error and distribution error are used as the loss function together, to obtain the potential representation of the day load curve;

[0011] S3, the data after dimension reduction is obtained by K-means algorithm to get clustering label and clustering center, and the clustering label is assigned to the original load data, and the clustering center is restored through the decoder to obtain the clustering center of the original data;

[0012] S4, the load power of each class at a certain moment is set with different Gaussian weight values according to the distance from the clustering center, so as to optimize the typical daily load curve.

[0013] Further, the data deletion in step S1 is as follows:

[0014] The deletion operation is taken for the missing data in the load data, and the load data with more than 20 data points measured as 0 or the load data with no change in the whole day.

[0015] Further, the abnormal data detection and replacement in step S1 is as follows:

[0016] The quartile range method is used to detect the load data, according to the upper quartile Q3 and the lower quartile Q1 of 96 data per day, and a certain margin is given to form a screening interval, and the data within the screening interval is effective data, and the data outside the screening interval is abnormal data, and the abnormal data is replaced with the mean value of the effective data.

[0017] Further, the data normalization in step S1 is as follows:

[0018] The maximum and minimum value normalization is adopted for each daily load curve, which is compressed to the interval [0, 1], and the expression is as follows:

[0019]

[0020] In the formula, p(x, t) is the power consumption of the xth user load curve at time t, p'(x, t) is the normalized power consumption of the xth user load curve at time t, p(x) max and p(x) min are the maximum and minimum load data of the xth user load curve.

[0021] Further, step S2 is as follows:

[0022] In the convolutional variational autoencoder, the encoder is composed of two convolutional layers and two maximum pooling layers, and finally the time sequence features of the reduced load sequence are obtained through a fully connected layer. The extracted time sequence features are sent to the decoder, the decoder is composed of a reshaping layer, two deconvolutional layers and two up sampling layers, and finally the data similar to the original sample is obtained. The KL divergence and the reconstruction error are used as the loss function of the network together, and the encoder and the decoder are trained by the gradient descent algorithm to minimize the loss function;

[0023] Encoder and decoder are respectively with parameters and p θ (x|z) with parameter θ, which is constructed by a neural network; the input data is encoded into latent variable z by the encoder

[0024] Introducing to estimate the posterior distribution p θ (z|x); then, sample from to approximate sampling in p θ (z|x); the approximation degree of two distributions is measured by using KL divergence, and the optimization objective function of the neural network is:

[0025]

[0026] In the formula, the calculation of KL divergence is:

[0027]

[0028] The deep learning network aims to maximize the likelihood probability log p θ (x), which is achieved by maximizing its variational lower bound L(φ,θ), and the variational lower bound is as follows:

[0029]

[0030] In the formula, the first term makes q φ (z|x) a normal distribution, and p θ (z) a standard normal distribution, that is, q φ (z|x) ~ N(μ1,σ1), p θ (z) ~ N(0,1), and its KL divergence can be calculated:

[0031]

[0032] The second term is an evaluation index of the reconstruction performance of the network, and z in the formula is obtained by the encoder q φ (z|x).

[0033] Further, step S3 is specifically as follows:

[0034] Suppose that the normalized daily load data of the original time series with length n is x=[x1,x2,...x n ], and its latent representation after encoding can be expressed as:

[0035]

[0036] In the formula, x∈R​​1×n , This represents the convolution operation, k represents the number of network layers, and ω represents the number of layers. k and b k Let represent the convolution kernel and bias of the k-th layer of the network in the encoding process, respectively, and σ be the activation function;

[0037] Potential characterization h k The reconstructed daily load data obtained through the decoder can be represented as:

[0038]

[0039] In the formula, and These represent the convolution kernel and bias of the k-th layer of the network during the decoding process, respectively.

[0040] Furthermore, step S4 is detailed as follows:

[0041] The mean square error L of the input and output r In the calculation of the minimum inclusion error function, the objective function L is optimized. r It can be represented as:

[0042]

[0043] The loss function of the network can be expressed as:

[0044] L=D KL (q φ (z|x)||p θ (z))+L r (8)

[0045] Finally, by minimizing the objective function using the gradient descent algorithm, the convolutional variational autoencoder can be constructed.

[0046] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0047] One of the beneficial effects of this scheme is the use of a convolutional variational autoencoder (CVA). This autoencoder leverages the excellent reconstruction capabilities and nonlinear learning abilities of neural networks to extract the temporal features of users' daily load curves, achieving data dimensionality reduction. The extracted latent representations are then clustered using the K-means algorithm, while Gaussian distance weighting is used to optimize typical daily load curves. The effectiveness of the proposed CVA for clustering is demonstrated by comparing it with the DBI clustering index of other clustering methods. Attached Figure Description

[0048] Figure 1 This is a flowchart of the daily load clustering process in a specific embodiment of the present invention.

[0049] Figure 2 The principle diagram of the quartile range method for one specific embodiment in the present application.

[0050] Figure 3 The clustering result diagram of the daily load curve for one specific embodiment in the present application. DETAILED DESCRIPTION

[0051] The accompanying drawings are included to provide a further understanding of the present application, and are incorporated herein and constitute a part of the detailed description. Figure 1 The accompanying drawings are included to provide a further understanding of the present application, and are incorporated herein and constitute a part of the detailed description. Figure 3 The technical solutions in the embodiments of the present application are clearly and completely described, and obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0052] Embodiment:

[0053] A daily load curve clustering method based on a convolutional variational autoencoder is provided.

[0054] The method mainly includes the following steps, as shown in Figure 1

[0055] Data deletion, abnormal data detection and replacement, and data normalization are adopted to realize the pretreatment function of the original daily load data.

[0056] The convolutional variational autoencoder is used to reduce the dimension and reconstruct the load data, and the reconstruction error and distribution error are used as the loss function together to obtain the latent representation of the daily load curve.

[0057] The data after dimension reduction is used to obtain the clustering label and clustering center by the K-means algorithm, the clustering label is assigned to the original load data, and the clustering center is restored by the decoder to obtain the clustering center of the original data.

[0058] In order to further obtain more accurate daily load feature curve, the load power at a certain moment of each class is set with different Gaussian weight values according to the distance from the clustering center, so as to optimize the typical daily load curve.

[0059] The data of this study is downloaded from the machine learning database of the University of California Irvine (UCI), and the UCI data platform provides a set of actual electricity consumption data of Portuguese users. The data set records the electricity consumption data of 370 power users in Portugal from 2011 to 2014 for a total of 4 years, and the recording mode is to sample once every 15 minutes, a total of 96 data points in a day. The user electricity consumption data in 2013 is selected and data preprocessing is performed.

[0060] ​In the process of data collection, there may be missing data or error data in the data set due to the damage of measuring instruments, signal interference, and human error. In order to obtain better clustering results, the original data should have high accuracy and effectiveness, so the data preprocessing in this paper includes the following three parts:

[0061] For the missing data in the load data, the deletion operation is taken for the load data with more than 20 data points measured as 0 or the whole day data value unchanged.

[0062] In the actual load data collection process, there may be small faults such as signal interference, resulting in abnormal data but low deviation from the true value. Since the damage is small, this paper uses the method of abnormal data detection and replacement for processing.

[0063] The specific processing method is to use the interquartile range (IQR) method to detect the load data. According to the upper quartile Q3 and lower quartile Q1 of the 96 data of each day, and give a certain margin, form a screening interval, the data within the interval is effective data, the data outside the interval is abnormal data, and the abnormal data is replaced by the mean value of the effective data, the principle is shown in Figure 2 .

[0064] Due to the different nature of users, the load power has great difference. The target of this paper is to cluster the fluctuation characteristics of the load. Therefore, in order to eliminate the influence of the difference between the magnitudes of the load data on the clustering results, and also to improve the convergence speed and reduce the training time of the neural network training, the data needs to be normalized. This paper adopts the maximum and minimum value normalization method for each daily load curve, which is compressed to the interval [0, 1], and its expression is as follows:

[0065]

[0066] In the formula, p(x, t) is the power consumption of the xth user load curve at time t, p'(x, t) is the normalized power consumption of the xth user load curve at time t, p(x) max and p(x) min are the maximum and minimum load data of the xth user load curve.

[0067] As a commonly used self-supervised learning model, the auto-encoder (AE) mainly consists of two parts:

[0068] 1) Encoder: encode the input high-dimensional data into low-dimensional hidden features;

[0069] 2) Decoder: is the inverse process of the encoder, which decodes the hidden features into the original data.

[0070] The high-dimensional input data is encoded by the encoder to obtain low-dimensional hidden variables, and the hidden variables are decoded by the decoder to restore the input data. The encoder and the decoder are both multi-layer neural networks, which have strong fitting ability and can complete the data dimension reduction task.

[0071] The variational auto-encoder (VAE) is improved on the basis of the auto-encoder. The encoder and the decoder of the VAE are respectively the probability distribution models with parameters and p θ (x|z) with parameters θ, which are constructed by neural networks. The input data is encoded into hidden variables z by the encoder

[0072]

[0073] The standard normal distribution is usually taken as p(z).

[0074] Since the real posterior distribution p θ (z|x) cannot be directly obtained, the VAE introduces to estimate the posterior distribution p θ (z|x). Then, the sampling from approximates the sampling in p θ (z|x). In order to make and p θ (z|x) as equal as possible, the KL (Kullback-Leibler) divergence is used to measure the approximation degree of the two distributions. The smaller the KL divergence of the two distributions, the closer their probability distributions are. Then, the optimization objective function of the neural network is:

[0075]

[0076] In the formula, the calculation of the KL divergence is:

[0077]

[0078] The deep learning network takes maximizing the likelihood probability log p θ (x) as the goal, which is realized by maximizing its variational lower bound L(φ,θ). The variational lower bound is as follows:

[0079]

[0080] In the formula, the first term can make q φ (z|x) a normal distribution, and p θ ​​​(z) is the standard normal distribution, i.e. q φ (z|x) ~ N(μ1, σ1), p θ (z) ~ N(0, 1) can be calculated as follows:

[0081]

[0082] The second term is the reconstruction performance indicator for evaluating the network, where z is the latent representation of the input x through the encoder q φ (z|x) obtained.

[0083] The encoder and the decoder of the variational autoencoder are both full-connection neural networks, while the convolutional variational autoencoder replaces the full-connection layers with convolutional neural networks to improve the data feature extraction performance. Each node of the full-connection layer needs to be connected to all nodes of the next layer, and the dynamic parameters required for training are numerous. The convolutional layer maintains a low number of training parameters in a single convolutional layer through weight sharing and sparse connection, so that the parameter calculation amount is smaller, which can improve the feature extraction performance and speed up the training time.

[0084] The variational autoencoder has excellent reconstruction ability, and can extract time series features from high-dimensional load data to reduce the data dimension in cooperation with the two-dimensional convolutional neural network. This structure can effectively improve the accuracy and effectiveness of the clustering results.

[0085] The network structure of the convolutional variational autoencoder is shown in Figure 2 The encoder is composed of two convolutional layers and two maximum pooling layers, and finally obtains the time series features of the reduced load sequence through a full-connection layer. The extracted features are sent to the decoder, which is composed of a reshaping layer, two deconvolutional layers and two up-sampling layers, and finally obtains data similar to the original sample. The KL divergence derived in the foregoing and the reconstruction error are used as the loss function of the network, and the encoder and the decoder are trained by the gradient descent algorithm to minimize the loss function. After the network training is completed, the reduced data is used as the clustering sample, and the K-means clustering algorithm is used to obtain the clustering results in this paper.

[0086] Suppose the normalized daily load data of the input original time series with a length of n becomes x = [x1, x2,... x n ], and the latent representation after encoding can be expressed as:

[0087]

[0088] In the formula, x ∈ R 1×n , represents convolution operation, k represents the number of network layers, ω k and b kLet represent the convolution kernel and bias of the k-th layer of the network in the encoding process, respectively, and σ be the activation function.

[0089] Potential characterization h k The reconstructed daily load data obtained through the decoder can be represented as:

[0090]

[0091] In the formula, and These represent the convolution kernel and bias of the k-th layer of the network during the decoding process, respectively.

[0092] In order to reconstruct the load data By extracting effective latent representations that are as similar as possible to the original input data x, the mean square error L between the input and output can be reduced. r In the calculation of the minimum inclusion error function, the objective function L is optimized. r It can be represented as:

[0093]

[0094] Adding the previously derived KL divergence expression, the network's loss function can then be expressed as:

[0095] L=D KL (q φ (z|x)||p θ (z))+L r (8)

[0096] Finally, by minimizing the objective function using the gradient descent algorithm, the convolutional variational autoencoder can be constructed.

[0097] The UCI dataset used only contains power information for Portuguese residential electricity consumption, and no specific clustering evaluation index was designed. Commonly used clustering effectiveness evaluation indexes include the sum of squared error (SSE), the Calinski-Harabasz Index (CHI), and the DBI. The DBI index is simple to calculate and has an intuitive curve, making it suitable as an effectiveness indicator for load curve clustering. Therefore, this paper selects the DBI index for quantitative analysis. The DBI calculation formula is as follows:

[0098]

[0099] In the formula, ω i and ω j Let ||ω| represent the cluster centers of samples in class i and class j, respectively. i -ω j ||2 represents the distance between two cluster centers, which can measure the degree of dispersion between cluster categories; and Ri and Rj represent the average distance of the ith and jth cluster to its cluster center, which can measure the tightness of each cluster; R ij Ri,j represents the similarity between the ith and jth cluster;

[0100]

[0101] Then the maximum similarity between the ith cluster and other clusters is obtained as R i ;

[0102]

[0103] Finally, the DBI index is equal to the average of the maximum similarity of each cluster. The smaller the DBI value, the tighter the samples within each cluster, the more dispersed the samples between clusters, and the better the clustering effect.

[0104] Case analysis:

[0105] After data preprocessing, 3920 valid daily load data curves were finally selected from the selected 96 daily electricity data of 370 users in Portugal in 2013 in the UCI data set. The convolutional variational autoencoder model in the example is based on the deep learning framework TensorFlow 2.1. The model is trained using CPU. The computer CPU is Intel Core i7-8700 3.2GHz, and the memory is 8GB.

[0106] The main structure and parameters of the variational convolutional autoencoder are shown in Table 1. The input dimension of the load sequence is 96x1. Since a two-dimensional convolution is used, the input is increased by one dimension to 1x96x1. Through two convolutional layers with a convolution kernel number of 16 and 32 and a convolution kernel size of 1x3, a 1x2 max pooling layer is added after each convolutional layer. Then, the output of the pooling layer is flattened to a one-dimensional sequence through the Flatten layer. After the Embedding layer, the 12-dimensional mean and variance sequence is obtained through the Dense layer. The mean and variance are obtained through the reparameterization trick to obtain the intermediate layer hidden variable z. After the Dense layer and the Reshape operation, the dimension before the Flatten layer is restored. Then, the output dimension of 1x96x1 is obtained by alternately passing through two 1x2 up-sampling layers and two convolution kernel numbers of 16 and 1, and a convolution kernel size of 1x3 deconvolution layer. Finally, the 96x1 reconstructed load sequence is obtained by removing the extra dimension.

[0107] Table 1 Network structure parameters

[0108]

[0109] The whole network adopts Adam optimizer, sets learning rate lr=0.001, each input batch is 64, and the training number is 300.

[0110] By comparing the DBI index and the clustering average distance under different clustering numbers, it can be seen that when the clustering number k=3, it is the inflection point (knee method) of the fastest decline of the clustering average distance, and the DBI index is near the minimum value, indicating that the clustering effect is good, and the data in the clustering cluster is relatively compact. Therefore, the clustering number of 3 is selected, which is more appropriate.

[0111] The clustering algorithm based on variational convolution autoencoder is used to cluster the daily electricity data of 370 households in Portugal in 2013, and the typical daily load curve of each class is extracted, and the clustering result is as shown in Figure 3 The horizontal coordinate is 00:00 to 23:45 every 15 minutes, and the vertical coordinate is the normalized power. Finally, 3920 daily load curves are divided into three categories (the darker the color, the more concentrated the curve).

[0112] In the clustering center of the three types of user load curves, it can be seen that each type of user has its own characteristics, and the user's electricity behavior can be mined, analyzed and judged.

[0113] The first type of user has two obvious electricity peaks, at 11 am to 1 pm and 8 pm to 11 pm, and the electricity consumption is at the lowest level before 10 am, and the electricity consumption decreases slowly after 11 pm. This user group is likely to be a restaurant that only sells lunch and dinner. The electricity consumption starts to increase from 11 am to 1 pm, which is lunch time. Unlike our country's habit of eating dinner at 6-7 pm, Portuguese people are used to eating dinner at 8-9 pm. Considering the meal time, the restaurant starts to serve after 11 pm, and the electricity consumption starts to decrease slowly.

[0114] The second type of user has less electricity consumption before 8 am, and the electricity consumption starts to increase steadily after 8 am. From 9 am to 8 pm, the electricity consumption remains stable and always remains at the peak. The electricity consumption decreases gradually after 8 pm. This user group is likely to be an enterprise user, because the working hours are from 9 am to 8 pm (there may be overtime), so the electricity consumption remains unchanged and is the largest.

[0115] The third type of user has a balanced electricity consumption from 10 am to 10 pm, and the electricity consumption decreases after 0. This user group is likely to be an ordinary family user, and there may be young people staying up late in the family, maintaining a certain amount of electricity consumption at night, and the parents are at home during the day, so the electricity consumption increases.

[0116] According to the extracted typical daily load curve, the user area distribution can be combined for analysis. If each type of user has regional distribution characteristics, such as large enterprises and restaurants have regional distribution characteristics, in order to ensure the normal power consumption of users in the power consumption peak period, load transfer, peak load shifting and other methods can be used to allocate power resources and improve the reliability of power supply in the region.

[0117] From Figure 3 It can be seen from the first type of clustering result that the clustering center curve obtained by the K-means algorithm is not in the deepest color at time points 20-40 and around time point 80, indicating that the extracted clustering center cannot well describe the typical characteristics of this type to some extent. In order to find more representative typical daily load clustering curves, a Gaussian function is used to weight the distance, that is, according to the distance between the user power consumption data at each time point and the clustering center, different weights are given. The closer to the initial clustering center, the higher the weight, and the weight is 1 when the distance is 0; the farther the distance, the smaller the weight and approaching to 0. The weight expression is as follows:

[0118]

[0119] In the formula, p'(x, t) is the normalized power at time t, b(t) represents the clustering center at time t, and c is a constant, which is taken as 0.3 here.

[0120] Compared with the original clustering center, the clustering center after Gaussian distance weighting of the daily load curve. It can be seen from the first type that the clustering center after distance weighting is more consistent with the dense area of the daily load curve during time points 20-40 and around time point 80, and can more accurately describe the characteristics of the user power consumption behavior.

[0121] Similarly, the second and third types are processed by using the Gaussian distance weighting function. It can be seen that the improved clustering center of the second type is more consistent with the dense area of the daily load curve at time points 0-20; the improved clustering center of the third type is more consistent with the dense area of the daily load curve at time points 0-40, which can more typically reflect the mass level of user power consumption.

[0122] To verify the effectiveness of the proposed clustering method, DBI index is selected for quantitative analysis, and the smaller the DBI index, the better the clustering effect. By comparing and analyzing the same data input by K-means, PCA+K-means, AE+K-means and C-VAE+K-means four kinds of clustering algorithms, the DBI index obtained is shown in the following table:

[0123] Table 2 Comparison of four clustering methods

[0124]

[0125] From the comparison of the four clustering methods in Table 2, it can be seen that different dimension reduction methods have different clustering effects. The effect of using K-means clustering after PCA dimension reduction is better than that of directly using K-means clustering, and the DBI index is reduced by about 0.13; the effect of using clustering after AE dimension reduction is better than that of using PCA dimension reduction, and the DBI index is reduced by about 0.08, which shows that the nonlinear learning ability of neural network can indeed extract deeper time sequence features than traditional linear dimension reduction; the effect of using convolutional variational autoencoder dimension reduction and clustering is better than that of AE+K-means method, and the DBI index is reduced by about 0.6, which verifies that the convolutional variational autoencoder proposed in this paper has stronger ability to extract time sequence features than traditional autoencoder, and helps to improve the clustering effect.

[0126] In summary, in view of the problem that high-dimensional and large amount of daily load data is difficult to cluster, a clustering method based on convolutional variational autoencoder is proposed. The effectiveness and practicability of the method are verified by analyzing the 2013 Portuguese user load data in the UCI data set. The specific conclusions of this paper are as follows:

[0127] Compared with other dimension reduction clustering methods, the DBI index of clustering is lower, which shows that the classes are more compact and the classes are more distant, improving the clustering quality and better mining the electricity behavior patterns and characteristics of various users,

[0128] The typical daily load curve extracted by using Gaussian distance weighting to improve the clustering center is more representative, which helps the power supply company to master the electricity level of various users, and to use load transfer, peak clipping and valley filling and other ways to relieve the pressure of power system in the electricity peak period, and to improve the power supply quality.

[0129] Further research on this topic can consider how to introduce other factors that affect user electricity, such as weather, temperature, etc., to realize load classification under multi-dimensional data and more accurately describe the characteristics of user electricity consumption behavior.

[0130] The above is the preferred embodiment of the present application, any changes made according to the technical solutions of the present application, as long as the generated function does not exceed the scope of the technical solutions of the present application, belongs to the protection scope of the present application.

Claims

1. A method for clustering daily load curves based on a convolutional variational autoencoder, characterized in that, The method comprises the following steps: S1, data deletion, abnormal data detection and replacement, and data normalization are used to realize preprocessing of original daily load data; S2, a convolutional variational autoencoder is used to reduce dimension and reconstruct the load data, and the reconstruction error and distribution error are taken together as a loss function to obtain a latent representation of the daily load curve; in the convolutional variational autoencoder, the encoder is composed of two convolutional layers and two maximum pooling layers, and finally a time sequence feature of the reduced load sequence is obtained through a fully connected layer, the extracted time sequence feature is sent to the decoder, the decoder is composed of a reshaping layer, two deconvolutional layers and two up-sampling layers, and finally data similar to the original sample is obtained; the KL divergence and the reconstruction error are taken together as the loss function of the network, and the encoder and the decoder are trained by the gradient descent algorithm to minimize the loss function; S3, the reduced data is used to obtain clustering labels and clustering centers by using the K-means algorithm, the clustering labels are assigned to the original load data, and the clustering centers are restored by using the decoder to obtain the clustering centers of the original data; S4, the load power at a certain moment of each class is set with different Gaussian weights according to the distance from the clustering center, so as to optimize the typical daily load curve; The distance is weighted by using the Gaussian function, that is, different weights are given to each time point according to the distance between the user power consumption data and the clustering center, and the weight expression is as follows: In formula (13), p'(x, t) is the normalized power at t, b(t) represents the clustering center at t, and c is a constant.

2. The convolutional variational autoencoder-based daily load curve clustering method of claim 1, wherein, The data deletion in step S1 is as follows: For the missing data in the load data, the deletion operation is taken for the load data with more than 20 data points of 0 or the load data with no change of the collected data value all day.

3. The convolutional variational autoencoder-based daily load curve clustering method of claim 2, wherein, The abnormal data detection and replacement in step S1 is as follows: The quartile range method is used to detect the load data, according to the upper quartile Q3 and the lower quartile Q1 of 96 data per day, and a certain margin is given to form a screening interval, the data in the screening interval is effective data, and the data outside the screening interval is abnormal data, and the abnormal data is replaced with the mean value of the effective data.

4. The convolutional variational autoencoder-based daily load curve clustering method of claim 3, wherein, The data normalization in step S1 is as follows: The maximum and minimum value normalization is adopted for each daily load curve, and the daily load curve is compressed to the interval [0, 1], and the expression is as follows: In formula (2), p(x, t) is the power consumption of the xth user load curve at time t, p'(x, t) is the normalized power consumption of the xth user load curve at time t, p(x) max and p(x) min are the maximum and minimum load data of the xth user load curve.

5. The convolutional variational autoencoder-based daily load curve clustering method of claim 4, wherein, In step S2, The encoder and the decoder are respectively parametrized by θ and p θ (x|z) with a neural network; the input data is encoded into the latent variables z by the encoder , Introduction to estimate the posterior distribution p θ (z|x); then, sample from to approximate sampling in p θ (z|x); the optimization objective function of the neural network is to measure the approximation degree of two distributions using the KL divergence: In formula (3), the calculation of the KL divergence is as follows: The deep learning network maximizes the likelihood probability logp θ (x) is the objective, which maximizes its variational lower bound The implementation, the variational lower bound is as follows: In formula (5), the first term is q φ (z|x) is a normal distribution, p θ (z) is a standard normal distribution, i.e. q φ (z|x) ~ N(μ1, σ1), p θ (z) ~ N(0, 1) can be calculated as follows: The second is to evaluate the reconstruction performance of the network, z in equation (6) is obtained by the encoder q φ (z|x) is obtained.

6. The convolutional variational autoencoder-based daily load curve clustering method of claim 5, wherein, Step S3 is as follows: Suppose the daily load data of original time series length n is normalized to x = [x1, x2,... x n ] after processing, and its encoded latent representation can be expressed as: In formula (7), x e R 1×n , denotes a convolution operation, k denotes a network layer number, ω k and b k respectively denote a convolution kernel and a bias of the kth layer network in an encoding process, and σ is an activation function. Potential representation h k The reconstructed daily load data by the decoder can be expressed as: In formula (8), and respectively represent the convolution kernel and the bias of the kth layer network of the decoding process.

7. The convolutional variational autoencoder-based daily load curve clustering method of claim 6, wherein, Step S4 is as follows: The mean square error L between the input and output r In the calculation of the minimum inclusion error function, the optimization objective function L r Can be expressed as: The loss function of the network can be expressed as: Finally, the convolutional variational autoencoder is constructed by minimizing the objective function formula (10) through the gradient descent algorithm.