Method for automatic short-term load forecasting of residential electricity
By combining the K-means algorithm and a temporal convolutional neural network, the problem of short-term electricity load forecasting for residents was solved, enabling optimized management of the power sector and electricity pricing, while reducing manual workload.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEBEI UNIV OF TECH
- Filing Date
- 2022-01-24
- Publication Date
- 2026-04-14
AI Technical Summary
The lack of effective automated forecasting methods for short-term residential electricity load in existing technologies makes it difficult for power companies to set reasonable electricity prices and optimize power supply management.
The K-means algorithm is used to divide the region, and combined with the sliding window method and temporal convolutional neural network, the model is trained using electricity consumption and temperature data from the past two years to predict future electricity load and formulate electricity consumption guidance schemes.
It enables automated forecasting of short-term residential electricity load, helps power companies formulate reasonable electricity prices, optimize power plant equipment management and power line planning, and reduces manual workload.
Smart Images

Figure CN114421463B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power technology, specifically a method for automatically predicting short-term residential power load. Background Technology
[0002] China's power industry has entered a new stage of development, with energy conservation, emission reduction, and green development becoming key tasks. With the rapid development of computer technology, the country is continuously promoting the power industry towards intelligent, digital, and international development. In 2009, my country officially launched its smart grid plan, establishing overall development goals and accelerating the construction of a robust power grid foundation with ultra-high-voltage power grids as the backbone and coordinated development of power grids at all levels. This involves utilizing advanced communication, information, and control technologies to build a robust smart grid characterized by informatization, digitalization, automation, and interactivity, achieving independent innovation and international leadership. From 2021 to 2026, the construction of smart meters and electricity consumption information collection systems will generate a market demand exceeding 200 billion yuan. User electricity consumption collection systems collect user electricity data for big data analysis, achieving purposes such as electricity consumption inspection, load forecasting, and saving electricity costs. Therefore, the industry needs an automated method for short-term residential electricity load forecasting to address the challenges faced by the industry. Summary of the Invention
[0003] In view of the above situation and to overcome the shortcomings of the prior art, the present invention provides an automated forecasting method for short-term residential electricity load, which effectively solves the problems mentioned in the background art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: an automated forecasting method for short-term residential electricity load, comprising the following steps:
[0005] S1: Model Establishment: Establish an automated forecasting model for short-term residential electricity load;
[0006] S2: Regional division: Using the K-means algorithm, a large region is spatially divided into several regions with related characteristics based on the geographical locations of each resident's home.
[0007] S3: Data Collection: Collect and statistically analyze total electricity consumption and temperature data for each region within a large area over the past two years;
[0008] S4: Data partitioning: The total electricity consumption and temperature data of each region in a large area collected and statistically analyzed in step S3 over the past two years are partitioned by using a sliding window method with flow control function.
[0009] S5: Model Training: Input the data divided in step S4 into the automated prediction model of short-term residential electricity load established in step S1 for data training.
[0010] S6: Result Prediction: The trained network automatically predicts the local daily or weekly electricity load.
[0011] S7: Develop a plan: Develop an electricity usage guidance plan for the future period based on the results predicted in step S5.
[0012] Preferably, the automated prediction model for short-term residential electricity load in step S1 includes a data processing module and a network prediction module.
[0013] Preferably, the K-means algorithm in step S2 includes the following steps:
[0014] S21: Randomly select k objects from n data objects as initial cluster centers;
[0015] S22: Calculate the distance between each object and these central objects based on the mean of each cluster object, and re-divide the corresponding objects based on the minimum distance;
[0016] S23: Recalculate the mean of each changed cluster;
[0017] S24: Calculate the standard measure function. When a certain condition is met, such as when the function converges, the algorithm terminates. If the condition is not met, return to step S22 to continue the calculation until the condition is met.
[0018] Preferably, the data partitioning step S4 includes the following steps:
[0019] S41: Divide the collected data into training set, validation set and test set according to 7:1:2, and use the sliding window method to expand the data after division.
[0020] S42: The processed power load data is decomposed into several subsequences using empirical mode decomposition, and the correlation coefficients between these subsequences and the original sequence are calculated.
[0021] Preferably, step S5, model training, includes the following steps:
[0022] S51: Input the original data, the subsequence with the highest correlation coefficient and the temperature data into the residential short-term power load automatic prediction model in step S1. Train it using a time convolutional neural network. After every 10 rounds of training, test it with the validation set and calculate the mean square error of the validation set. Stop training when the mean square error of the validation set no longer decreases for 3 consecutive times.
[0023] S52: Model hyperparameter tuning: Adjust the adjustable parameters of the model (learning rate, number of hidden layers, and batch size) to obtain a set of parameters with the minimum mean squared error on the test set, which will be used as the final parameters of the model.
[0024] Preferably, the steps further include: when the sliding window changes the input and output windows in step S41, steps S42, S51 and S52 are performed again to retrain the model.
[0025] Preferably, the temporal convolutional neural network employs a one-dimensional convolutional module.
[0026] Compared with the prior art, the beneficial effects of the present invention are: the method of the present invention can formulate reasonable electricity prices for the power sector by predicting the short-term electricity load of residents; it provides a guiding scheme to ensure the normal operation of power plants, for example, the standby capacity should be opened in advance when the load demand is high, and some power generation equipment can be shut down for maintenance when the load demand is low; it guides the power supply line planning of power supply units in different regions; and it automates the prediction, reducing the workload of personnel. Attached Figure Description
[0027] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0028] In the attached diagram:
[0029] Figure 1 This is a flowchart of an automated forecasting method for short-term residential electricity load according to an embodiment of the present invention;
[0030] Figure 2 This is a schematic diagram of the K-means algorithm in the automated forecasting method for short-term residential electricity load according to an embodiment of the present invention;
[0031] Figure 3 This is a schematic diagram of the sliding window method in the automated forecasting method for short-term residential electricity load according to an embodiment of the present invention;
[0032] Figure 4 This is a schematic diagram of the temporal convolutional neural network architecture in the automated forecasting method for short-term residential electricity load according to an embodiment of the present invention;
[0033] Figure 5 This is a schematic diagram of a residual network in a temporal convolutional neural network according to an embodiment of the present invention;
[0034] Figure 6 This is a schematic diagram of a time convolutional neural network in the automated prediction method for short-term residential electricity load according to an embodiment of the present invention. Detailed Implementation
[0035] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0036] According to an embodiment of the present invention, an automated forecasting method for short-term residential electricity load is provided, comprising the following steps:
[0037] S1: Model Establishment: Establish an automated forecasting model for short-term residential electricity load;
[0038] S2: Regional division: Using the K-means algorithm, a large region is spatially divided into several regions with related characteristics based on the geographical locations of each resident's home.
[0039] S3: Data Collection: Collect and statistically analyze total electricity consumption and temperature data for each region within a large area over the past two years;
[0040] S4: Data partitioning: The total electricity consumption and temperature data of each region in a large area collected and statistically analyzed in step S3 over the past two years are partitioned by using a sliding window method with flow control function.
[0041] S5: Model Training: Input the data divided in step S4 into the automated prediction model of short-term residential electricity load established in step S1 for data training.
[0042] S6: Result Prediction: The trained network automatically predicts the local daily or weekly electricity load.
[0043] S7: Develop a plan: Develop an electricity usage guidance plan for the future period based on the results predicted in step S5.
[0044] In a preferred embodiment, step S1, the automated forecasting model for short-term residential electricity load, includes data processing and network forecasting.
[0045] In a preferred embodiment, step S2 of the K-means algorithm includes the following steps:
[0046] S21: Randomly select k objects from n data objects as initial cluster centers;
[0047] S22: Calculate the distance between each object and these central objects based on the mean of each cluster object, and re-divide the corresponding objects based on the minimum distance;
[0048] S23: Recalculate the mean of each changed cluster;
[0049] S24: Calculate the standard measure function. When a certain condition is met, such as when the function converges, the algorithm terminates. If the condition is not met, return to step S22 to continue the calculation until the condition is met.
[0050] In a preferred embodiment, step S4, data partitioning, includes the following steps:
[0051] S41: Divide the collected data into training set, validation set and test set according to 7:1:2, and use the sliding window method to expand the data after division.
[0052] S42: The processed power load data is decomposed into several subsequences using empirical mode decomposition, and the correlation coefficients between these subsequences and the original sequence are calculated.
[0053] In a preferred embodiment, step S5, model training, includes the following steps:
[0054] S51: Input the original data, the subsequence with the highest correlation coefficient and the temperature data into the residential short-term power load automatic prediction model in step S1. Train it using a time convolutional neural network. After every 10 rounds of training, test it with the validation set and calculate the mean square error of the validation set. Stop training when the mean square error of the validation set no longer decreases for 3 consecutive times.
[0055] S52: Model hyperparameter tuning: Adjust the adjustable parameters of the model (learning rate, number of hidden layers, and batch size) to obtain a set of parameters with the minimum mean squared error on the test set, which will be used as the final parameters of the model.
[0056] In a preferred embodiment, the steps further include: when the sliding window changes the input and output windows in step S41, steps S42, S51 and S52 are performed again to retrain the model.
[0057] In a preferred embodiment, the temporal convolutional neural network employs a one-dimensional convolutional module.
[0058] To facilitate understanding of the above technical solutions of the present invention, the flow of the above solutions of the present invention will be described in detail below with reference to the accompanying drawings, as follows:
[0059] According to an embodiment of the present invention, an automated forecasting method for short-term residential electricity load is provided.
[0060] like Figure 1-6 As shown, the automated forecasting method for short-term residential electricity load in actual forecasting includes the following steps:
[0061] S101: Model Establishment: Establish an automated forecasting model for short-term residential electricity load;
[0062] S103: Regional Division: Using the K-means algorithm, a large region is spatially divided into several regions with related characteristics based on the geographical locations of each resident's home.
[0063] S105: Data Collection: Collect and statistically analyze the total electricity consumption and temperature data for each region within a large area over the past two years;
[0064] S107: Data partitioning: The total electricity consumption and temperature data of each region in a large area collected and statistically analyzed in step S105 over the past two years are partitioned by the sliding window method with flow control function.
[0065] S109: Model Training: Input the data divided in step S107 into the automated prediction model of short-term residential power load established in step S101 for data training.
[0066] S111: Result Prediction: The trained network automatically predicts the local daily or weekly electricity load.
[0067] S113: Formulate a plan: Formulate an electricity consumption guidance plan for the future period based on the prediction results of step S109.
[0068] Specifically, step S101, the automated prediction model for short-term residential electricity load, includes data processing and network prediction. Data processing is divided into two parts: using the K-means algorithm to divide the region into areas and using the sliding window method to expand the electricity load data. Network prediction is achieved through model training. First, a temporal convolutional neural network is built, and then the single variable control method is used to conduct parameter tuning experiments on the model.
[0069] Specifically, such as Figure 2 As shown, in the K-means algorithm, Figure 2 The right side represents a large region, and each small cross above represents a specific electricity consumption. Each user's electricity consumption varies due to their geographical location; for example, industrial areas and residential areas differ. Therefore, they need to be analyzed separately to better reflect reality. The K-means algorithm can automatically divide regions based on geographical location; the sliding window method, for example... Figure 3 As shown, the above 21-day electricity load data, if we choose to predict 1 day out of 7 days, without using the sliding window method, would be divided into 8-day units. Since 16 is less than 21, we can only divide the data into a maximum of 2 sequences. However, when using the sliding window method in this method, as shown... Figure 3 As shown, 14 sequences can be divided, greatly improving data utilization efficiency; temporal convolutional neural networks, such as... Figure 4 as well as Figure 5As shown, the temporal convolutional network uses a one-dimensional convolutional module. The input data dimension is 8, the filter dimension is 5, and the output data dimension after convolution is 8-5+1=4. If the number of filters is still 1, the number of channels in the input data becomes 16, that is, the input data dimension is 8×16. The concept of channel is equivalent to the embedding in natural language processing. The input data represents 8 words, where the word vector dimension of each word is 16. In this case, the filter dimension changes from 5×16 to 5×16, and the final output data dimension is still 44. If the number of filters is n, then the output data dimension becomes 4×n.
[0070] Specifically, the K-means algorithm is used to spatially divide the geographical locations of residents in a large region into several characteristically related areas. Based on predicted demand, the total electricity consumption and temperature data (in hours, days, and weeks) of each area over the past two years are collected. The collected data is divided into training, validation, and test sets in a 7:1:2 ratio. A sliding window method is used to augment the data after partitioning. The input and prediction output window sizes can be freely set. The processed electricity load data is decomposed into several subsequences using empirical mode decomposition, and the correlation coefficients between these subsequences and the original sequence are calculated. The original data, the subsequence with the highest correlation coefficient, and the temperature data are input into a temporal convolutional neural network for training. After every 10 training iterations, the validation set is used for testing, and the mean squared error of the validation set is calculated. When the mean squared error of the validation set reaches a certain level, the system is considered to have achieved a certain level of performance. When the variance no longer decreases after three consecutive iterations, training is stopped. The adjustable parameters of the model (learning rate, number of hidden layers, and batch size) are adjusted to obtain a set of parameters with the minimum mean squared error on the test set, which are then used as the final parameters of the model. For example, assuming that parameters a and b need to be adjusted, firstly, based on experience, five pre-selected values are chosen for parameters a and b. Then, b is fixed as one of the pre-selected values. Step 5 is then performed sequentially on the five pre-selected values of a to obtain the pre-selected value with the minimum mean squared error on the validation set. Next, a is fixed as this pre-selected value, and step S109 is repeated on the five pre-selected values of b to obtain the best pre-selected value for b. Finally, the pre-selected value of b is fixed, and step S109 is performed again on a. If the result of parameter a is the same as before, the parameter tuning is complete. If it is different, the operation is repeated. When the sliding window changes the input and output windows, the model is retrained.
[0071] In summary, by utilizing the above-mentioned technical solutions of the present invention, the method of the present invention can help the power sector formulate reasonable electricity prices by predicting short-term residential electricity load; provide a guiding scheme to ensure the normal operation of power plants, for example, to open up standby capacity in advance when load demand is high, and to shut down some generating equipment for maintenance when load demand is low; guide the power supply line planning of power supply units in different regions; and automate the prediction, reducing the workload of personnel.
[0072] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0073] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. An automated method for predicting short-term residential electricity load, characterized in that, Includes the following steps: S1: Model Establishment: Establish an automated forecasting model for short-term residential electricity load; S2: Regional division: Using the K-means algorithm, a large region is spatially divided into several regions with related characteristics based on the geographical locations of each resident's home. S3: Data Collection: Collect and statistically analyze total electricity consumption and temperature data for each region within a large area over the past two years; S4: Data partitioning: The total electricity consumption and temperature data of each region in a large area collected and statistically analyzed in step S3 over the past two years are partitioned by using a sliding window method with flow control function. S5: Model Training: Input the data divided in step S4 into the automated prediction model of short-term residential electricity load established in step S1 for data training. S6: Result Prediction: The trained network automatically predicts the local daily or weekly electricity load. S7: Develop a plan: Develop an electricity consumption guidance plan for the future period based on the prediction results of step S5; The data partitioning step S4 includes the following steps: S41: Divide the collected data into training set, validation set and test set according to 7:1:2, and use the sliding window method to expand the data after division. S42: The processed power load data is decomposed into several subsequences using empirical mode decomposition, and the correlation coefficients between these subsequences and the original sequence are calculated. The model training in step S5 includes the following steps: S51: Input the original data, the subsequence with the highest correlation coefficient and the temperature data into the automated prediction model for short-term residential power load in step S1. Train the model using a time convolutional neural network. After every 10 rounds of training, test the model with a validation set and calculate the mean square error of the validation set. Stop training when the mean square error of the validation set no longer decreases for three consecutive times. S52: Model hyperparameter tuning: Adjust the adjustable parameters of the model to obtain a set of parameters with the minimum mean square error on the test set, which are used as the final parameters of the model.
2. The automated forecasting method for short-term residential electricity load according to claim 1, characterized in that, The automated prediction model for short-term residential electricity load in step S1 includes data processing and network prediction.
3. The automated forecasting method for short-term residential electricity load according to claim 2, characterized in that, The K-means algorithm in step S2 includes the following steps: S21: Randomly select k objects from n data objects as initial cluster centers; S22: Calculate the distance between each object and these central objects based on the mean of each cluster object, and re-divide the corresponding objects based on the minimum distance; S23: Recalculate the mean of each changed cluster; S24: Calculate the standard measure function. When a certain condition is met, such as when the function converges, the algorithm terminates. If the condition is not met, return to step S22 to continue the calculation until the condition is met.
4. The automated forecasting method for short-term residential electricity load according to claim 3, characterized in that, The steps also include: when the sliding window changes the input and output windows in step S41, steps S42, S51 and S52 are performed again to retrain the model.
5. The automated forecasting method for short-term residential electricity load according to claim 4, characterized in that, The temporal convolutional neural network uses a one-dimensional convolutional module.
Citation Information
Patent Citations
Photovoltaic power generation power short-term rolling prediction method based on improved MKPLS
CN113361782A
Short-term power load prediction method based on CNN-LSTM-ARIMA combination
CN113705915A