A user daily power consumption pattern prediction method
By using spectral clustering and support vector machine regression models to predict users' daily electricity consumption patterns, the problem of predicting users' electricity consumption patterns has been solved, and the optimization of power grid dispatch and resource conservation have been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN POWER SUPPLY BUREAU
- Filing Date
- 2018-12-24
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies are unable to effectively predict users' future electricity consumption patterns, resulting in a lack of data support for demand response analysis, which makes it impossible to effectively shave peaks and fill valleys and optimize power grid dispatch.
Typical daily electricity consumption patterns are obtained through spectral clustering analysis, and support vector machine regression models are used to predict users' future daily electricity consumption data. A prediction model is constructed by combining meteorological data and statistical indicators to calculate the daily electricity consumption pattern of users on the day to be predicted.
It provides accurate forecasts of users' daily electricity consumption patterns, supporting power companies in developing demand response plans, optimizing grid dispatching, and reducing the waste of power resources.
Smart Images

Figure CN109726862B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of user daily electricity consumption pattern prediction technology, and in particular to a method for predicting user daily electricity consumption patterns. Background Technology
[0002] The rapid economic development and increasing electricity consumption have exacerbated the imbalance between electricity supply and demand. Blindly increasing installed capacity to meet peak demand will inevitably lead to a significant waste of electricity resources and increase the burden on businesses and users. Demand response, however, refers to the behavior of electricity users in response to price signals or incentive mechanisms that primarily alter their existing electricity consumption patterns. As a supplement to traditional generation dispatch, it can smooth peak and valley loads, balance intermittent energy fluctuations, and provide ancillary services, greatly enriching the regulatory means of grid dispatch. However, demand response analysis requires data support based on predictions of future user electricity consumption patterns. Summary of the Invention
[0003] The technical problem to be solved by this invention is to provide a method for predicting user daily electricity consumption patterns. This method obtains typical daily electricity consumption patterns by clustering the acquired daily electricity consumption time data, and predicts the user's future daily electricity consumption time data by establishing a support vector machine regression model. The method determines the user's daily electricity consumption pattern on the day to be predicted by calculating the similarity between the predicted daily electricity consumption time data and the typical daily electricity consumption pattern, thus providing data support for demand response analysis.
[0004] To address the aforementioned technical problems, this invention provides a method for predicting user daily electricity consumption patterns, comprising the following steps:
[0005] Historical daily electricity consumption data of multiple users is obtained, spectral clustering is performed on the obtained historical daily electricity consumption data to obtain the cluster center of each cluster, and the typical daily electricity consumption curve of the user is obtained based on the cluster center.
[0006] Obtain the meteorological data for the day of the historical daily electricity consumption data, and construct statistical indicators of daily electricity consumption based on the meteorological data and the historical daily electricity consumption data. Construct a prediction model of the user's daily electricity consumption based on the statistical indicators, and calculate the user's electricity consumption at the time of the predicted day based on the prediction model.
[0007] Based on the typical daily electricity consumption curve and the electricity consumption at the time of the predicted day, predict the user's daily electricity consumption pattern for the predicted day.
[0008] Specifically, acquiring the meteorological data for the day on which the historical daily electricity consumption data was obtained, and constructing statistical indicators of daily electricity consumption based on the meteorological data and the historical daily electricity consumption data, includes:
[0009] Obtain the meteorological data for the day in which the historical daily electricity consumption data is generated;
[0010] The acquired meteorological data is preprocessed, and statistical indicators of daily electricity consumption are constructed based on the preprocessed meteorological data and historical daily electricity consumption data.
[0011] Specifically, the preprocessing of the acquired meteorological data includes:
[0012] Determine the abnormal thresholds for various meteorological characteristics in different seasons, and filter out abnormal meteorological data based on the abnormal thresholds;
[0013] The linear interpolation method is used to fill in the abnormal meteorological data, thus forming the meteorological data after data preprocessing.
[0014] Specifically, determining the anomaly thresholds for various meteorological characteristics in different seasons and filtering out abnormal meteorological data based on these thresholds includes:
[0015] Calculate the quartiles and quartertiles of the time series for each meteorological feature in each season;
[0016] The upper and lower limits of the abnormal threshold are calculated based on the 3 / 4 and 1 / 4 quantiles.
[0017] Abnormal meteorological data are filtered out based on the upper and lower limits of the abnormality threshold.
[0018] Specifically, the calculation of the upper and lower limits of the anomaly threshold based on the 3rd quartile and the 1 / 4 quartile includes:
[0019] upQT mk =QT mk [3]+1.5*(QT mk [3]-QT mk [1])
[0020] downQT mk =max(min(QT),QT mk [1]-1.5*(QT mk [3]-QT mk [1]))
[0021] Among them, QT mk [3] is a third-quarter digit, QT mk [1] is the quarter quantile, upQT mk The upper limit of the abnormal threshold, downQR mk This is the lower limit of the abnormal threshold, min(QT) k ) represents the minimum value of the k-th meteorological feature, where m = 1, 2, 3, 4; k = 1, 2, 3.
[0022] Specifically, the step of performing spectral clustering on the preprocessed daily electricity consumption data to obtain the cluster center for each cluster includes:
[0023] A similarity matrix is calculated based on the weighting coefficients among users.
[0024] The adjacency matrix is obtained by calculating the similarity matrix, and the degree matrix is obtained by calculating the adjacency matrix.
[0025] The Laplace matrix is obtained by calculating the adjacency matrix and the degree matrix;
[0026] Obtain the regular Laplacian matrix from the Laplacian matrix;
[0027] Calculate the eigenvectors corresponding to the K1 lowest eigenvalues of the regular Laplacian matrix;
[0028] The corresponding feature vectors are combined into a matrix, and the matrix is then standardized row-wise to form a feature matrix;
[0029] Each row in the feature matrix is treated as a sample. The samples in the feature matrix are clustered to obtain K clustering results and the cluster center of each clustering result.
[0030] Where K1 is the dimension after dimensionality reduction, and K is the optimal dimension after clustering.
[0031] Specifically, the corresponding clustered dimensions are obtained by using the sum of squared errors within groups, the silhouette coefficient, and the Calinski-Harabasz criterion, respectively, and the maximum value of the obtained clustered dimensions is selected as the optimal clustered dimension.
[0032] The statistical indicators of the electricity consumption specifically include:
[0033] The time characteristics, temperature characteristics, and historical point-in-time electricity changes are as follows: the time characteristics include determining whether the day is a holiday; the temperature characteristics specifically include the daily maximum temperature, daily minimum temperature, and daily average temperature; and the historical point-in-time electricity changes specifically include: the point-in-time average electricity lagging one day, the standard deviation of the point-in-time electricity lagging one day, the minimum point-in-time electricity lagging one day, and the coefficient of variation of the point-in-time electricity lagging one day.
[0034] Specifically, the method for predicting the user's daily electricity consumption on the predicted day based on the typical daily electricity consumption curve and the electricity consumption at the time of the predicted day includes:
[0035] Calculate the similarity between the time-based electricity consumption of the day to be predicted and the electricity consumption patterns of various typical days;
[0036] The daily electricity consumption pattern with the highest similarity was selected as the daily electricity consumption pattern for the day to be predicted.
[0037] The beneficial effects of this invention are as follows: typical daily electricity consumption patterns of users are obtained through spectral clustering analysis, and then the electricity consumption data of users on the predicted day is predicted using the support vector regression method. Based on the typical daily electricity consumption patterns of users and the electricity consumption data of users on the predicted day, the daily electricity consumption pattern of users on the predicted day is determined. Power supply companies can specify corresponding demand response plans based on the typical daily electricity consumption patterns of users on the predicted day, providing data support for the implementation of demand response strategies. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a flowchart illustrating a user daily electricity consumption pattern prediction method according to an embodiment of the present invention. Detailed Implementation
[0040] The following description of the embodiments is taken with reference to the accompanying drawings, which illustrate specific embodiments in which the invention can be implemented.
[0041] The following is for reference Figure 1 As explained in Embodiment 1 of the present invention, a method for predicting a user's daily electricity consumption pattern is provided, which includes the following steps:
[0042] S1. Obtain historical daily electricity consumption data for multiple users, perform spectral clustering on the obtained daily electricity consumption data, obtain the cluster center of each cluster, and obtain a typical daily electricity consumption curve based on the cluster center.
[0043] Specifically, the system obtains daily electricity consumption data from the marketing system database, with 24 data points per day, at a frequency of 1 hour.
[0044] Historical daily electricity consumption data is identified using the interquartile range method. When outliers are identified, they are set as missing values. Then, the nearest neighbor algorithm is used to fill in all the missing values, thereby obtaining the preprocessed historical daily electricity consumption data.
[0045] Spectral clustering analysis was performed on the preprocessed historical daily electricity data to extract the center points of each category, thereby obtaining the daily electricity time curves.
[0046] Spectral clustering treats each object in the dataset as a vertex V of a graph, and measures the similarity between vertices as the weight of the edges E connecting those vertices. This results in an undirected weighted graph G(V,E) based on similarity. The clustering problem can then be transformed into a graph partitioning problem, aiming to maximize the similarity within subgraphs and minimize the similarity between subgraphs based on graph theory's optimal partitioning criteria. In essence, spectral clustering first calculates the similarity matrix, then normalizes it, calculates the first K eigenvectors, and finally applies the K-Means algorithm for clustering. This method is used to cluster users {x1, x2…x...} N The data is divided into K classes, with each user's daily hourly electricity consumption serving as a feature indicator for the clustering algorithm. The cluster centers of each class are then used as typical daily electricity consumption patterns. The main steps are as follows:
[0047] a. Calculate the weight coefficient between any two users. Where ω ij For any user x i And user x j The weights between them are determined, and the similarity matrix W is calculated based on the weight coefficients, where W = {ω ij |1≤i≤N,1≤j≤N};
[0048] b. Construct an adjacency matrix S using similarity matrices, and sum the rows of adjacency matrix S to obtain the degree. The degree matrix can then be obtained. Specifically, the adjacency matrix can be set to be equal to the similarity matrix, i.e., S = W, and the degree matrix D has values only on the main diagonal, with the rest being 0.
[0049] c. Calculate the Laplacian matrix L based on the adjacency matrix and degree matrix, where L = DS.
[0050] d. Construct the standardized Laplace matrix D -1 / 2 LD -1 / 2 .
[0051] e. Calculate the normalized Laplace matrix D -1 / 2 LD -1 / 2 The eigenvectors f corresponding to the smallest k1 eigenvalues, where k1 is the dimension of the matrix after dimensionality reduction;
[0052] f. Standardize the matrix composed of the eigenvectors f corresponding to each eigenvalue by row, and finally form an N×k1 dimensional eigenma matrix F;
[0053] g. Treat each row in F as a k1-dimensional sample, perform k-Means clustering on these N samples, and obtain K clustering results, where K is the final number of clusters.
[0054] Furthermore, the determination of the number of clusters K in spectral clustering will employ the sum of squared errors within groups, the silhouette coefficient, and the Calinski-Harabasz criterion to seek a relatively optimal number of clusters within the range of 2 to 8. The maximum value among the three values obtained by the above methods will be taken as the optimal K value.
[0055] Where K1 is the dimension after dimensionality reduction, and K is the optimal dimension after clustering.
[0056] S2. Obtain the meteorological data for the current day of the historical daily electricity consumption data, and construct statistical indicators of daily electricity consumption based on the meteorological data and the historical daily electricity consumption data. Construct a prediction model of the user's daily electricity consumption based on the statistical indicators, and calculate the user's electricity consumption at the time of the predicted day based on the prediction model.
[0057] Specifically, we retrieve the corresponding daily maximum and minimum temperature data from third-party internet websites. The meteorological data obtained through third-party internet access includes daily maximum temperature, daily minimum temperature, and daily relative humidity. During the acquisition and transmission process, some data may be missing or abnormal. Therefore, we need to clean this meteorological data.
[0058] First, the division of the year into four seasons. According to the meteorological division method, March to May is spring, June to August is summer, September to November is autumn, and December to February of the following year is winter.
[0059] Secondly, outlier identification and handling. The data was divided into four parts according to season, and outliers were identified for each season using the interquartile range method. The specific process is as follows:
[0060] (1) The time series of the k-th meteorological characteristic (daily maximum temperature, daily minimum temperature, and daily relative humidity) in the m-th season is denoted as Where u mki Let be the meteorological feature value of the k-th meteorological feature in the m-th season on the i-th day, where m = 1, 2, 3, 4; k = 1, 2, 3; i = 1, 2, ..., n, and n is the number of historical data for the k-th meteorological feature in the m-th season.
[0061] (2) Calculate QT mk The third-quarters of QT mk [3] and the quarter quantile QT mk [1] Determine the anomaly threshold for each feature in different seasons, with the upper limit of the threshold being upQT. mk and threshold lower limit downQR mk Defined as:
[0062] upQT mk =QT mk[3]+1.5*(QT mk [3]-QT mk [1])
[0063] downQT mk =max(min(QT),QT mk [1]-1.5*(QT mk [3]-QT mk [1]))
[0064] In the above formula, min(QT) k ) represents the minimum value of the k-th meteorological feature;
[0065] (3) will u mki With upQT mk and downQR mk Compare them, if u mki >upQT mk or u mki <updownQT mk Then u mki This is considered abnormal data.
[0066] (4) Set the above abnormal data as missing values and fill them in using the corresponding missing value handling method.
[0067] Finally, the original k-th meteorological feature is taken as a complete time series and filled in using linear interpolation.
[0068] Descriptive statistical analysis of daily point-in-time electricity consumption revealed that temperature variations and weekday patterns significantly impact electricity usage. Therefore, characteristic indicators influencing daily point-in-time electricity consumption will be constructed from three dimensions: temporal characteristics, temperature characteristics, and historical point-in-time electricity consumption variations. Temporal characteristics primarily consider the impact of different weekday patterns on electricity consumption, such as working from Monday to Friday and resting at home on weekends. Temperature characteristics mainly consider the daily maximum, minimum, and average temperatures, as the degree of influence varies across different point-in-time periods. Historical point-in-time electricity consumption variations primarily consider the average electricity consumption one day behind, the standard deviation of the electricity consumption one day behind, the minimum electricity consumption one day behind, and the coefficient of variation of the electricity consumption one day behind.
[0069] Support vector regression model is used to describe the variable f(X) at each time point. i ) and the above indicator X i The nonlinear relationship between them, i.e. Estimate the parameter values of each indicator. and
[0070] Support vector regression models do not require prior knowledge of the specific relationships; they map onto a high-dimensional feature space using kernel functions, and their objective function is:
[0071]
[0072] in, ||ω|| 2 =ω'ω is the L2 norm of the parameter vector ω, C is the penalty parameter, and y i Let L(y) be the dependent variable of the sample data. i ,f(X i )) is the penalty function, and its expression is:
[0073]
[0074] Here, ε represents the error within a certain range, and a value of 0.1 can be taken as a reference. A non-negative slack variable ξ is introduced. i ,ξ i * The original optimization problem then becomes:
[0075]
[0076]
[0077] To find the minimum value of the above equation, construct the Lagrange function L:
[0078]
[0079] Where, α i ,α i * ,η i ,η i * ≥0 (i=1,2...n) are Lagrange multipliers, and the above optimization problem is equivalent to the following quadratic convex programming problem.
[0080]
[0081] Under the constraints of the KKT complementarity condition, the following equation can be obtained through the Lagrange duality transformation:
[0082]
[0083] That is, we can solve for the right-hand side. First, find the minimum value of the Lagrange function L, then we have:
[0084]
[0085] Substituting this into the Lagrange function L and In the middle, there are:
[0086]
[0087]
[0088] Among them, For the hyperparameters (C, γ), the grid method is used to obtain the optimal hyperparameter values, and the sequential minimal optimization algorithm (SMO) is adopted to find the optimal solution α = (α1, α2,... α n , α1 * , α2 * ,... α n * ) and the estimated values of ω In addition, according to the KKT complementary conditions, the following formula holds:
[0089]
[0090] From this, the sample index set I sv = {i = 1, 2,... n|0 < α i < C, 0 < α i * < C}, and according to the formula the estimated value of b is obtained Therefore, the support vector regression model obtained according to the sample points (X i , y i ) is:
[0091]
[0092] After obtaining the prediction model, the above-mentioned index values X i at each time point of the next day are extracted, and compared with the estimated and to calculate the power at each time point of the next day Repeating the above steps for each time point for calculation realizes the prediction of the power at each time point for 24 hours of the next day.
[0093] S3. Predict the daily power pattern of the user's to-be-predicted day according to the described typical daily power time point curve and the predicted values of the power at each time point.
[0094] After obtaining the typical daily power pattern and the predicted values of the power at each time point for 24 hours of the predicted next day, further calculate the similarity between the power at each time point of the to-be-predicted day and each typical daily power pattern, and select the daily power pattern with the highest similarity as the daily power pattern of the to-be-predicted day.
[0095] The user daily electricity consumption pattern prediction method of the present invention obtains the user's typical daily electricity consumption pattern through spectral clustering analysis, and then uses the support vector regression method to predict the user's electricity consumption data for the predicted day. Based on the user's typical daily electricity consumption pattern and the user's electricity consumption data for the predicted day, the user's daily electricity consumption pattern for the predicted day is determined. The power supply company can specify the corresponding demand response plan based on the user's typical daily electricity consumption pattern for the predicted day, providing data support for the implementation of the demand response strategy.
[0096] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for predicting a user's daily electricity consumption pattern, the method comprising the following steps: The system acquires historical daily electricity consumption data for multiple users, performs spectral clustering on the acquired historical daily electricity consumption data, obtains the cluster center of each cluster, and obtains the typical daily electricity consumption curve for each user based on the cluster center. The meteorological data for the day in which the historical daily electricity consumption data is obtained is acquired, and statistical indicators of daily electricity consumption are constructed based on the meteorological data and the historical daily electricity consumption data. A prediction model of the user's daily electricity consumption is constructed based on the statistical indicators, and the user's electricity consumption at the time of the predicted day is calculated based on the prediction model. Based on typical daily electricity consumption curves and the electricity consumption at specific times on the day to be predicted, predict the user's daily electricity consumption pattern for the day to be predicted. The acquisition of historical daily electricity consumption data is subjected to spectral clustering to obtain the cluster center of each cluster, specifically including: A similarity matrix is calculated based on the weighting coefficients among users. The adjacency matrix is obtained by calculating the similarity matrix, and the degree matrix is obtained by calculating the adjacency matrix. The Laplace matrix is obtained by calculating the adjacency matrix and the degree matrix; Obtain the regular Laplacian matrix from the Laplacian matrix; Calculate the eigenvectors corresponding to the K1 lowest eigenvalues of the regular Laplacian matrix; The corresponding feature vectors are combined into a matrix, and the matrix is then standardized row-wise to form a feature matrix; Each row in the feature matrix is treated as a sample. The samples in the feature matrix are clustered to obtain K clustering results and the cluster center of each clustering result. Where K1 is the dimension after dimensionality reduction, and K is the optimal dimension after clustering; the corresponding dimensions after clustering are obtained by using the sum of squared errors within groups, the silhouette coefficient, and the Calinski-Harabasz criterion, respectively, and the maximum value of the obtained dimensions after clustering is selected as the optimal dimension after clustering. The specific statistical indicators of the electricity consumption include: The time characteristics, temperature characteristics, and historical point-in-time electricity changes are as follows: the time characteristics include determining whether the day is a holiday; the temperature characteristics specifically include the daily maximum temperature, daily minimum temperature, and daily average temperature; and the historical point-in-time electricity changes specifically include: the point-in-time average electricity lagging one day, the standard deviation of the point-in-time electricity lagging one day, the minimum point-in-time electricity lagging one day, and the coefficient of variation of the point-in-time electricity lagging one day. The method for predicting a user's daily electricity consumption on a predicted day based on a typical daily electricity consumption curve and the electricity consumption at a specific point in time on the predicted day specifically includes: Calculate the similarity between the point-in-time electricity volume of the day to be predicted and the electricity volume patterns of each typical day; The daily electricity consumption pattern with the highest similarity was selected as the daily electricity consumption pattern for the day to be predicted.
2. The method according to claim 1, characterized in that, The process of acquiring the meteorological data for the day in which the historical daily electricity consumption data is generated, and constructing statistical indicators of daily electricity consumption based on the meteorological data and the historical daily electricity consumption data, specifically includes: Obtain the meteorological data for the day in which the historical daily electricity consumption data is generated; The acquired meteorological data is preprocessed, and statistical indicators of daily electricity consumption are constructed based on the preprocessed meteorological data and historical daily electricity consumption data.
3. The method according to claim 2, characterized in that, The preprocessing of the acquired meteorological data specifically includes: Determine the abnormal thresholds for various meteorological characteristics in different seasons, and filter out abnormal meteorological data based on the abnormal thresholds; The linear interpolation method is used to fill in the abnormal meteorological data, thus forming the meteorological data after data preprocessing.
4. The method according to claim 3, characterized in that, The process of determining the anomaly thresholds for various meteorological characteristics in different seasons and filtering out abnormal meteorological data based on these thresholds specifically includes: Calculate the quartiles and quartertiles of the time series for each meteorological feature in each season; The upper and lower limits of the abnormal threshold are calculated based on the 3 / 4 and 1 / 4 quantiles. Abnormal meteorological data are filtered out based on the upper and lower limits of the abnormality threshold.
5. The method according to claim 4, characterized in that, The calculation of the upper and lower limits of the anomaly threshold based on the 3rd quartile and 1 / 4 quartile specifically includes: downQT mk =max(min(QT k ),QT mk [1]-1.5 (QT mk [3]-QT mk [1])) in, It is a third-quarter digit. It is a quarter quantile. This is the upper limit of the abnormal threshold. This is the lower limit of the abnormal threshold. Let m be the minimum abnormal threshold value of the k-th meteorological feature, where m = 1, 2, 3, 4, where m represents the m-th season; k = 1, 2, 3, where k represents the k-th meteorological feature.