A short-term prediction method and system for residential loads

By employing data preprocessing and a hybrid neural network model with self- and external attention mechanisms, the method addresses residential load variability, improving peak and average load prediction accuracy and grid stability.

CN115689026BActive Publication Date: 2025-07-15HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The huge difference in peak and mean values of family housing loads leads to poor accuracy of existing prediction models and it is difficult to achieve accurate load prediction.

Method used

Through the historical load data after variational modal decomposition and data cleaning, a reference load curve is constructed, and the benchmark load curve is corrected to improve prediction accuracy by combining the self-attention mechanism, external attention mechanism and prediction model of the time convolution network.

Benefits of technology

It effectively reduces the difference between load peaks and mean values, improves the accuracy of load prediction, and the model can extract time series features more effectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115689026B_ABST
    Figure CN115689026B_ABST
Patent Text Reader

Abstract

The present invention discloses a short-term prediction method and system for residential load, belonging to the technical field of power grid dispatching. Aiming at the problem of huge differences between the peak value and the mean value of residential electricity consumption, the load value to be predicted is decomposed into two parts: a basic load curve and a difference value. Among them, the determination of the basic load curve mainly considers two aspects: one is the periodicity of the daily load curve of the residence, and the other is the effectiveness of the load curve. Constructing a reference load curve effectively reduces the difference between the load peak value and the mean value and improves the prediction accuracy. At the same time, the present invention combines the self-attention mechanism and the external attention mechanism. After being trained by big data, the model can more effectively extract time series features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power grid dispatching, and more specifically, relates to a method and system for short-term prediction of residential load. Background Art

[0002] In global energy consumption, the proportion of electricity consumption in buildings has reached 40%, and residential electricity consumption accounts for a large part. Due to the variable electricity consumption patterns in households, the peak electricity consumption periods in a day are uncertain, which may bring certain difficulties to the peak shaving and valley filling of the power grid. However, if a relatively accurate prediction of residential load can be made, the power grid can formulate some incentive-based demand response plans for users during peak periods, enabling users to actively avoid their electricity consumption periods from the peak electricity consumption periods, thus achieving the effect of peak shaving and valley filling, improving the stability of the power grid, and ensuring the economic operation of the power grid.

[0003] Residential load is affected by various factors such as external weather and holidays, with complex and variable situations, large fluctuations in the load curve, and obvious non-linear characteristics, which bring great difficulties to prediction. Moreover, the difference between the peak value and the average value of residential electricity consumption is huge, making the prediction accuracy of the peak value by general prediction models very poor. To address the problem of large fluctuations in residential load, the volatility can be reduced by load decomposition or normalization. Load decomposition is to decompose the load sequence into multiple subsequences with more regular signals, and the sum of the subsequences can restore the original sequence. The number of subsequences can be determined according to the size of the volatility. For loads with large fluctuations, decomposing them into multiple subsequences can effectively alleviate the influence of high-frequency noise. However, since the decomposed sequences cannot completely restore the original sequence, there is a certain error after restoration, and the processing time is positively correlated with the number of subsequences, so it cannot be infinitely decomposed. For some of these subsequences, there is still a huge difference between the peak value and the average value. Directly normalizing all load sequences for prediction, the ratio of the peak value to the average value remains unchanged, and the problem of the huge difference between the peak value and the average value is not solved. The prediction effect of the peak value after inverse normalization is still poor. Summary of the Invention

[0004] In view of the above defects or improvement requirements of the prior art, the present invention provides a method and system for short-term prediction of residential load, aiming to solve the technical problem of the huge difference between the peak value and the average value of residential electricity consumption, resulting in poor prediction accuracy.

[0005] To achieve the above object, according to one aspect of the present invention, a method for short-term prediction of residential load is provided, including:

[0006] S1. After performing variational mode decomposition on the historical load data that has undergone data cleaning, use it as the training set;

[0007] S2. Segment the historical load data after data cleaning by natural week for the first time, calculate the mean value of all subsequences after the first segmentation, and then segment the mean value sequence by day for the second time;

[0008] S4. Use the mean value sequence as the daily typical load curve, select the load data for the N days before the date to be predicted, and calculate the benchmark load curve for the date to be predicted with the similarity between the load data for the previous N days and the typical load curve as the weight;

[0009] S5. Adopt the method of sliding window to sequentially take data from the training set and input it into the prediction network for iterative training to obtain a trained prediction model; the prediction network includes a self-attention mechanism, an external attention mechanism, and a temporal convolutional network;

[0010] The self-attention mechanism is used to assign weights to the input data according to its internal features, increase the weights of its internal key features, and decrease the weights of other features, helping the prediction model extract key features;

[0011] The external attention mechanism is used to assign weights to the current input data according to the features of all input data in the training set, increase the weights of periodically related features, and decrease the weights of other features;

[0012] The temporal convolutional network is used to learn the data processed by the self-attention mechanism and the external attention mechanism, change the values of internal parameters through error backpropagation, extract the periodicity and time dependence of the data, and output the prediction result;

[0013] S6. Input the historical load data for the N days before the measured date into the trained prediction model to obtain the load prediction result, and superimpose the load prediction result with the benchmark load curve to obtain the load prediction value for the next day.

[0014] Further, data cleaning includes filling the null values in the data and removing the data where the load is less than a certain threshold within a set time period.

[0015] Further, the calculation formula for the benchmark load curve is:

[0016]

[0017] represents the benchmark load curve, h i represents the load data for the N days before the date to be predicted, c i is the serial number of the most similar typical load curve corresponding to h i , d i =(c i +N - i + 1) mod 7 represents the serial number.

[0018] The present invention also provides a short-term residential load forecasting system, including:

[0019] A first data preprocessing module, which is used to perform variational mode decomposition on the historical load data after data cleaning and use it as a training set;

[0020] A second data preprocessing module, which is used to initially segment the historical load data after data cleaning according to the natural week, calculate the mean value of all subsequences of the initial segmentation, and then perform a secondary segmentation on the mean value sequence on a daily basis;

[0021] A benchmark load curve construction module, which is used to use the mean value sequence as the typical load curve of each day, select the load data of the N days before the date to be predicted, and calculate the benchmark load curve of the day to be predicted with the similarity between the load data of the previous N days and the typical load curve as the weight;

[0022] A prediction model training module, which is used to sequentially take data from the training set using a sliding window method and input it into the prediction network for iterative training to obtain a trained prediction model; the prediction network includes a self-attention mechanism, an external attention mechanism, and a temporal convolutional network;

[0023] The self-attention mechanism is used to assign weights to the input data according to its internal features, increase the weights of its internal key features, and decrease the weights of other features, helping the prediction model extract key features;

[0024] The external attention mechanism is used to assign weights to the current input data according to the features of all input data in the training set, increase the weights of periodically related features, and decrease the weights of other features;

[0025] The temporal convolutional network is used to learn the data processed by the self-attention mechanism and the external attention mechanism, change the values of internal parameters through error backpropagation, extract the periodicity and time dependence of the data, and output a prediction result;

[0026] A short-term load forecasting module, which is used to input the historical load data of the N days before the measured date into the trained prediction model to obtain a load forecasting result, and superimpose the load forecasting result with the benchmark load curve to obtain the load forecasting value for the next day.

[0027] Generally speaking, compared with the prior art through the above technical solutions conceived by the present invention, the following beneficial effects can be achieved.

[0028] (1) By constructing a benchmark load curve, the present invention decomposes the prediction target into the difference between the actual load curve and the benchmark load curve, effectively reducing the difference between the load peak and the mean value, and improving the prediction accuracy.

[0029] (2) The present invention combines the self-attention mechanism and the external attention mechanism. After being trained by big data, the model can extract time series features more effectively. Description of the Drawings

[0030] Figure 1 is the framework for short-term prediction of residential load; Detailed Embodiments

[0031] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0032] Aiming at the problem of the huge difference between the peak value and the average value of residential electricity consumption, the present invention decomposes the load value to be predicted into two parts: a basic load curve and a difference. Among them, the determination of the basic load curve mainly considers two aspects: one is the periodicity of the daily load curve of the residence, and the other is the effectiveness of the load curve. The electricity consumption patterns of residential users are similar within a certain limited time period. That is to say, within this time period, the load curve of the residence will show a certain natural periodicity, and the period is usually a natural week. After segmenting the load curve of the user over a long period according to this period, a set of load sequences in a certain electricity consumption pattern can be obtained. Further, the sequences in the set are segmented again with a day as the period to obtain a smaller periodic sequence. According to the similarity degree of the sequences, a reference load curve can be predicted.

[0033] The effectiveness of the load curve considers the data where the load is at a relatively low level for a long time. Being at a relatively low level for a long time indicates that the household appliances in the residence are in a standby state and are not actually used. In this state, the value of the load curve of the residence will not be 0, but it will interfere with the prediction, and this part of the data needs to be removed.

[0034] (1) Data preprocessing

[0035] Data preprocessing includes two parts: (i) data cleaning and variational mode decomposition, which are used to provide input data for the prediction model; (ii) data cleaning and segmenting with a week as the period, and then segmenting again with a day as the period to obtain 7 subsets of daily load sequences, which are used to calculate the reference load curve.

[0036] Data cleaning mainly has two functions. One is to fill in the null values in the data. The null values in the data are filled by using linear interpolation to prevent them from affecting the calculation. The other is to remove the data with a load staying at a relatively low level for a long time. A long-term low level indicates that the electrical appliances in the residence are in the standby state during this period and are not actually used. This part of the data will interfere with the results and needs to be removed.

[0037] The electricity consumption behavior of residential users shows significant periodicity on a weekly basis, and the load can utilize its periodicity when divided by week. Within a week, the order of their daily behaviors is not fixed. Therefore, to predict the load of the next day, it is necessary to segment by day on the basis of segmenting by week.

[0038] (2) Construct the reference load curve

[0039] First, set the 7 daily load subsets in Step 1 as S = [s1, s2, s3, s4, s5, s6, s7]. These seven subsets respectively correspond to all the daily load historical data for 7 days from Monday to Sunday. Then, calculate the average value of all subsets to obtain

[0040] M = [m1, m2, m3, m4, m5, m6, m7] (1)

[0041] where, m j is the average value of s j , j = 1, …, 7. Use the average value as the typical load curve for each of the 7 days from Monday to Sunday.

[0042] Then, select the load data of the N days before the date to be predicted as the input to construct the reference load curve. Define it as:

[0043] H = [h1, h2, …h i …, h N (2)

[0044] Assume that h N+1 is the load data of the day to be predicted. Equation (2) represents the historical load data of the N days before the day to be predicted, i = 1, …, N;

[0045] Furthermore, through the cosine similarity, find the most similar typical load curve m corresponding to each h.

[0046] The calculation process is as follows.

[0047]

[0048] In Equation (3), c i is the serial number of the most similar typical load curve corresponding to h i , that is, it indicates that h iand is the most similar...

[0049] d i =(c i +N - i + 1) mod 7 (4)

[0050] where d i represents that according to the historical data h i , is most likely to occur on the (N + 1)-th day. Therefore, for multiple h i , taking the similarity between h i and as the weight, the benchmark load curve of the day to be predicted can be calculated as follows:

[0051]

[0052] where is the final benchmark load curve, d i =(c i +N - i + 1) mod 7 represents the serial number, represents the typical load curve corresponding to the d i -th day, that is, according to the historical data h i , is most likely to occur on the (N + 1)-th day. N represents that a total of N days of historical load data are used.

[0053] (3) Using the prediction model to correct the benchmark load curve

[0054] Based on the idea of residuals, the present invention designs a prediction model to predict the difference between the actual load and the benchmark load curve, and then corrects the benchmark load curve to obtain the final prediction result.

[0055] The present invention designs a prediction model that combines a temporal convolutional network and a dual attention mechanism. The network calculation formulas of the self-attention mechanism and the external attention mechanism are:

[0056]

[0057] r = E v (Norm(E k (x)) (7)

[0058] where n is the dimension of x. The training formula of the temporal convolutional network is:

[0059]

[0060] h = [h1, h2,..., h n (9)

[0061] s = W·(h+(z+r)) (10)

[0062] Where w is an element of z+r. f(·) is a filter, and k is its dimension. d is the dilation factor.

[0063] To increase the stability and reliability of model prediction and reduce its sensitivity at the optimal result, the present invention uses the mean square error (MSE) as the accuracy metric and selects an appropriate N in combination with the training time to achieve a balance between accuracy and time cost. The calculation method of the mean square error is as follows:

[0064]

[0065] (4) Obtain the prediction result

[0066] Using historical load data as the training set, the sliding window method is adopted to sequentially extract data from the historical load sequence and input it into the network for training. After the network is trained, a historical data of an appropriate length is determined as the input, that is, N in formula (2) is determined.

[0067] After obtaining the trained network, the historical load data of the N days before the predicted day is input into the network to obtain the output, and the output is added to the reference load curve to obtain the load prediction value for the next day.

[0068] It is easy for those skilled in the art to understand that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A short-term prediction method for residential loads, characterized in that, Including: S1. After performing variational mode decomposition on the historical load data that has undergone data cleaning, use it as the training set; S2. Segment the historical load data that has undergone data cleaning by natural week for the first time, calculate the mean value of all subsequences of the first segmentation, and then segment the mean value sequence by day for the second time; S4. Use the mean value sequence as the typical load curve for each day, select the load data for the N days before the date to be predicted, and calculate the benchmark load curve for the day to be predicted using the similarity between the load data for the previous N days and the typical load curve as the weight; S5. Adopt the sliding window method to sequentially take data from the training set and input it into the prediction network for iterative training to obtain a trained prediction model; the prediction network includes a self-attention mechanism, an external attention mechanism, and a temporal convolutional network; The self-attention mechanism is used to assign weights to the input data according to its internal features, increasing the weights of its internal key features and decreasing the weights of other features, helping the prediction model extract key features; The external attention mechanism is used to assign weights to the current input data according to the features of all input data in the training set, increasing the weights of periodically related features and decreasing the weights of other features; The temporal convolutional network is used to learn the data processed by the self-attention mechanism and the external attention mechanism, change the values of internal parameters through error backpropagation, extract the periodicity and time dependence of the data, and output the prediction result; S6. Input the historical load data for the N days before the measured date into the trained prediction model to obtain the load prediction result, and superimpose the load prediction result with the benchmark load curve to obtain the load prediction value for the next day.

2. A short-term prediction method for residential load according to claim 1, characterized in that, Data cleaning includes filling in the null values in the data and removing the data where the load is less than a certain threshold within a set time period.

3. A short-term residential load forecasting method according to claim 2, characterized in that, The calculation formula for the benchmark load curve is: Represents the reference load curve, h i Represents the load data for N days before the date to be predicted, c i Is h i The serial number of the most similar typical load curve corresponding to d i =(c i +N - i + 1) mod 7 represents the serial number.

4. A short-term prediction system for residential loads, characterized in that, Including: The first data preprocessing module is used to perform variational mode decomposition on the historical load data that has undergone data cleaning and use it as the training set; The second data preprocessing module is used to segment the historical load data that has undergone data cleaning by natural week for the first time, calculate the mean value of all subsequences of the first segmentation, and then segment the mean value sequence by day for the second time; The benchmark load curve construction module is used to use the mean value sequence as the typical load curve for each day, select the load data for the N days before the date to be predicted, and calculate the benchmark load curve for the day to be predicted using the similarity between the load data for the previous N days and the typical load curve as the weight; The prediction model training module is used to adopt the sliding window method to sequentially take data from the training set and input it into the prediction network for iterative training to obtain a trained prediction model; the prediction network includes a self-attention mechanism, an external attention mechanism, and a temporal convolutional network; The self-attention mechanism is used to assign weights to the input data according to its internal features, increasing the weights of its internal key features and decreasing the weights of other features, helping the prediction model extract key features; The external attention mechanism is used to assign weights to the current input data according to the features of all input data in the training set, increasing the weights of periodically related features and decreasing the weights of other features; A temporal convolutional network is used to learn the data processed by the self-attention mechanism and the external attention mechanism, change the values of internal parameters through error backpropagation, extract the periodicity and time dependence of the data, and output the prediction results; A short-term load forecasting module is used to input the historical load data of the N days before the measured day into the trained forecasting model to obtain the load forecasting results, and superimpose the load forecasting results with the benchmark load curve to obtain the load forecasting value for the next day.

5. The short-term residential load prediction system according to claim 4, characterized in that Data cleaning includes filling the null values in the data and removing the data with the load less than a certain threshold within a set time period.

6. The short-term residential load forecasting system according to claim 5, wherein The calculation formula for the benchmark load curve is: represents the reference load curve, h i represents the load data for N days before the date to be predicted, c i is h i the serial number of the most similar typical load curve corresponding to d i =(c i +N - i + 1) mod 7 represents the serial number.

7. A computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.