Resident load prediction method based on generative adversarial network
By constructing a Conditional Wasserstein Generative Adversarial Network (WGAN-GP) generator, the problem of low efficiency in generating user behavior sequences in existing load modeling methods is solved, achieving efficient, diverse, and high-fidelity residential electricity load forecasting, and supporting power system planning and simulation.
Patent Information
- Application Number
- CN202511679011.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-04-07
AI Technical Summary
Existing load modeling methods suffer from efficiency bottlenecks when generating user behavior sequences, making it difficult to perform real-time or high-frequency simulations at the city level. Furthermore, they have limited ability to model contextual information, resulting in insufficient diversity of generated load scenarios and difficulty in accurately reflecting the spatiotemporal variation characteristics of real electricity consumption.
A residential load forecasting method based on generative adversarial networks (GANs) is adopted. By acquiring time utilization survey data, a conditional Wasserstein generative adversarial network (WGAN-GP) is constructed. The generator can learn the distribution of user behavior, generate user activity sequences according to specified conditions, and reconstruct the electricity load curve by combining the power characteristic data of household appliances.
It greatly improves the speed of behavior sequence generation, the generated load curves are highly consistent with real data, have good diversity, can accurately control the context scenario, provide high-fidelity refined power load data, and support power system planning and simulation.
Smart Images

Figure CN121809733A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of intelligent power grid simulation and artificial intelligence, and more specifically relates to a residential load forecasting method based on a generative adversarial network. BACKGROUND
[0002] Under the background of global energy transformation, the accurate modeling of residential electricity load becomes increasingly important. The popularity of electric vehicles, heat pumps, and distributed photovoltaic technologies has greatly changed the shape of the load curve, posing new challenges to the planning and operation of power grids. Load modeling is a key tool for analyzing these changes and testing new solutions.
[0003] Existing load modeling methods can be mainly divided into two categories:
[0004] 1) Top-down method: This method directly fits and generates based on total load curve data, such as using a generative adversarial network (GAN) to learn the distribution of historical load data and generate new total load curves. Although this method is computationally efficient, it is essentially a "black box" model that cannot reveal the details of load composition, making it difficult to simulate the impact of the popularity of specific appliances or changes in user behavior, and lacking in interpretability and flexibility.
[0005] 2) Bottom-up method: This method starts from simulating the basic electricity usage behavior of users and synthesizes load curves by driving appliance models. Traditional methods usually use Markov chains, stochastic processes, and other probability models to generate sequences of daily activities. Although this method can provide fine-grained information at the device level and has a clear principle, the core sequence generation process is sequential. Simulating a household's activities for a day requires sampling hundreds of times, and when simulating thousands of households, the computation time increases dramatically, becoming a bottleneck for large-scale simulation, making it difficult to apply to real-time or high-frequency simulation scenarios at the city level.
[0006] Generative adversarial networks (GANs) have shown great capabilities in image, text, and speech generation, and have been introduced into the load generation field in recent years. However, existing GAN-based load generation research has almost been limited to generating aggregate load curves "top-down", failing to address the core efficiency bottleneck in the "bottom-up" framework - the generation efficiency of user behavior sequences. How to combine the efficient parallel generation capability of GAN technology with the fine-grained advantage of bottom-up models is a problem that needs to be solved. In addition, existing behavior models often have limited modeling capabilities for context information such as the distinction between weekdays and weekends, resulting in insufficient diversity of generated load scenarios and difficulty in accurately reflecting the spatiotemporal variation characteristics of real electricity usage. SUMMARY
[0007] The present application aims to overcome the deficiencies of the prior art, and provide a resident load prediction method based on a generative adversarial network, which can generate behavior patterns and load curves in accordance with specific contexts according to external conditions (such as date type, family size).
[0008] To achieve the above-mentioned application purposes, the present application provides a resident load prediction method based on a generative adversarial network, characterized in that it comprises the following steps:
[0009] S1: data acquisition and preprocessing;
[0010] 1) Data source: obtain the target area public time utilization survey dataset, household energy consumption survey dataset, population census data and public household appliance power feature dataset;
[0011] 2) Activity definition and screening: screen out activity types closely related to residential electricity consumption behavior from the time utilization survey dataset, including: learning, watching TV, using computer, reading, cooking, eating, washing dishes, cleaning, ironing, bathing, washing clothes, and remove other irrelevant activities, finally form a list containing K activities, K=11;
[0012] 3) Matrix encoding: encode the activity records of each respondent in a day into a binary KxT-dimensional "activity-time" matrix P with 10-minute intervals, T is the number of time slices in a day, taking 144, and the element P(i, j) in the matrix is 1 indicates that the activity the user is performing in the jth time slice is i;
[0013] 4) Condition label addition: add a condition label vector c to each sample matrix;
[0014] 5) Appliance probability statistics: from the energy consumption survey data, statistics the retention rate and average weekly use frequency of each type of household appliance under different family sizes to form a probability query table;
[0015] S2: construction and training of conditional WGAN-GP behavior model;
[0016] 1) Network structure:
[0017] Generator G: input is a random noise vector z subject to standard normal distribution and a condition label c; c is first mapped to a continuous vector through an embedding layer, and then concatenated with z; the concatenated vector is sequentially passed through multiple fully connected layers and activated using the ReLU activation function, and finally outputs a KxT-dimensional matrix G(z|c); finally, the matrix G(z|c) is activated through the Sigmoid activation function, so that the element value is between 0-1, thereby approximating the probability of activity occurrence;
[0018] Discriminator D: input is matrix G(z|c) and conditional label c; G(z|c) is flattened and concatenated with the processing vector of c, then through multiple fully connected layers, finally output a scalar representing the confidence of the input sample being a real sample;
[0019] 2) Loss function: the loss function of WGAN-GP is adopted, which contains a gradient penalty term to force the discriminator to meet the Lipschitz constraint, so as to stabilize the training process;
[0020] L = E[D(x|c)] - E[D(G(z|c))] + lambda * E[(||nabla_x D(x|c)||2 - 1)2]
[0021] Where x is the sampling point of the real sample and the generated sample, and lambda is the gradient penalty coefficient;
[0022] 3) Training process: use Adam optimizer to alternately train discriminator D and generator G, and after training, the generator G can be used to quickly generate realistic user activity sequences from random noise and given conditions;
[0023] S3: load curve reconstruction;
[0024] 1) Activity sequence sampling: for each family that needs to be simulated, first determine its family size according to the census data, and then call the trained generator G to generate the activity sequence of each member throughout the day according to the family size;
[0025] 2) Appliance mapping and triggering: establish the mapping rules between activities and appliances, and when an activity occurs in a time slice, decide whether to trigger the corresponding appliance according to the precomputed probability;
[0026] 3) Power curve synthesis: once the appliance is triggered, the typical power curve of the appliance is extracted from the power feature database, and is superimposed on the total load curve of the family at the corresponding position of the time slice;
[0027] 4) Add basic load;
[0028] 5) Load aggregation: sum the power curves of all appliances and the basic load according to the time dimension to obtain the high-resolution total load curve of the household.
[0029] The invention purpose of the application is realized as follows:
[0030] The application is based on a resident load prediction method of a generative adversarial network, acquires time utilization survey data, and pre-processes the data into an activity-time matrix with conditional labels; a conditional Wasserstein generative adversarial network WGAN-GP is constructed, and the activity matrix is used as a sample for training, so that the generator can learn the user behavior distribution; the trained generator is used to batch generate user activity sequences according to specified conditions; according to the mapping relationship between the activities and the appliances and the triggering probability, combined with the power characteristic data of the household appliances, the device-level and household-level power load curves are reconstructed.
[0031] Meanwhile, the resident load prediction method based on the generative adversarial network also has the following beneficial effects:
[0032] 1) Greatly improved simulation efficiency: The most prominent effect of the application is to greatly improve the generation speed of the behavior sequence. The traditional Markov chain model needs to generate activities for each time slice in sequence, and the time complexity is O(N*T), wherein N is the number of simulated residents, and T is the number of time slices. The GAN model of the application can generate activities of all residents and all time slices in parallel at one time, and the time complexity is nearly O(1). For simulating the activities of 100,000 households, the GAN only needs about 1 second, while the Markov chain needs 3 minutes, and the efficiency is improved by more than 100 times, making large-scale city-level simulation possible.
[0033] 2) Maintaining high granularity and authenticity: The application inherits all the advantages of the bottom-up method, can generate device-level load data, and finally aggregates into household-level and community-level load. Through indicators such as KL divergence and correlation coefficient, it is proved that the generated activity distribution and load curve are highly consistent with the statistical characteristics of the real data, and the fidelity is comparable to or even better than the Markov chain method.
[0034] 3) Generation diversity and condition controllability: GAN can learn and reproduce the complex distribution and pattern in the real behavior data, and the generated load curve has good diversity, avoiding simple averaging. Through the condition label (such as the day of the week), the context of the generated scene can be accurately controlled to obtain the load of the "workday mode" or "weekend mode", enhancing the practicability and flexibility of the model.
[0035] 4) Good scalability and adaptability: The framework does not depend on specific countries or data sets. By replacing the standardized TUS data and energy survey data published by other countries, a model suitable for the region can be trained, and the universality is strong. The model can also easily integrate new types of household appliances or user behavior patterns.
[0036] 4) Privacy and security: The entire method is trained based on macroscopic and anonymous statistical survey data, and the generated synthetic data effectively avoids the risk of leaking user personal privacy and power consumption information.
[0037] 5) The application uses the generative adversarial network technology in deep learning to learn the resident electricity consumption behavior pattern from the macro statistical survey data, and generates fine electricity consumption load data with high fidelity, thereby providing data support and simulation tools for power system planning, demand side response strategy formulation, distribution network reliability analysis and energy community optimization. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 is a resident load prediction method flowchart based on the generative adversarial network of the application;
[0039] Figure 2 is a typical household appliance power characteristic curve schematic diagram obtained from the UK-DALE data set in the embodiment of the application; DETAILED DESCRIPTION
[0040] The specific embodiments of the application will be described below in conjunction with the accompanying drawings, so that those skilled in the art can better understand the application. It should be particularly noted that in the following description, when the detailed description of known functions and designs may obscure the main content of the application, these descriptions will be omitted here.
[0041] EMBODIMENT
[0042] The application proposes a resident electricity consumption load modeling method based on conditional generative adversarial network, the core of which is to use conditional WGAN-GP to replace the traditional Markov chain as the generator of user behavior sequence, the method specifically includes the following steps:
[0043] S1: data acquisition and preprocessing
[0044] 1) Data source: obtain the target area public time utilization survey (TUS) data set, household energy consumption survey data set, population census data and public household appliance power characteristic data set (such as UK-DALE).
[0045] 2) Activity definition and screening: screen out the activity types closely related to the electricity consumption behavior in the residence from the TUS data, for example: learning, watching TV, using computer, reading, cooking, eating, washing dishes, cleaning, ironing, in the bathroom, washing clothes. Other irrelevant activities are excluded, and finally a list containing K activities (such as K = 11) is formed.
[0046] 3) Matrix encoding: encode the activity records of each respondent in a day (usually with 10 minutes interval) into a binary KxT dimension "activity-time" matrix (T is the number of time slices in a day, such as 144). The element (i, j) in the matrix is 1, indicating that in the jth time slice of the day, the activity the user is performing is i.
[0047] 4) Condition label appending: Appending a condition label vector c to each sample matrix. The label can contain various contextual information, the most basic of which is the date type (e.g. weekday / weekend). It can also be extended to family population, season, etc.
[0048] 5) Appliance probability statistics: From the energy consumption survey data, the possession rate and average weekly usage frequency of each type of household appliance (dishwasher, washing machine, dryer, oven, etc.) under different family sizes are counted to form a probability query table.
[0049] S2: Construction and training of conditional WGAN-GP behavior model
[0050] 1) Network structure:
[0051] Generator (G): The input is a random noise vector z (subject to standard normal distribution) and a condition label c. c is first mapped to a continuous vector through an embedding layer, then concatenated with z. The concatenated vector is passed through multiple fully connected layers (using ReLU activation function) in turn, and finally outputs a K x T dimensional matrix G(z|c). The matrix is activated by the Sigmoid function, whose value is between 0-1, which can be approximately regarded as the probability of activity occurrence.
[0052] Discriminator (D): The input is a real or generated activity matrix x (or G(z|c)) and a condition label c. After x is flattened, it is concatenated with the processed vector of c, and then passed through multiple fully connected layers. Finally, a scalar is output, representing the confidence that the input sample is a real sample (in WGAN, D is regarded as a critic, whose output does not require Sigmoid activation).
[0053] 2) Loss function: The loss function of WGAN-GP is adopted, which contains a gradient penalty term to force the discriminator to satisfy the Lipschitz constraint, thereby stabilizing the training process.
[0054] L = E[D(x|c)] - E[D(G(z|c))] + λ * E[(||∇_x̂ D(x̂|c)||2 - 1)²]
[0055] Where x̂ is the sampling point of real samples and generated samples, and λ is the gradient penalty coefficient.
[0056] 3) Training process: Use the Adam optimizer to alternately train the discriminator D and the generator G. After training is complete, the generator G can be used to quickly generate realistic user activity sequences from random noise and given conditions.
[0057] S3: Load curve reconstruction
[0058] 1) Activity sequence sampling: For each household to be simulated, first determine its size according to census data, and for each member, call the trained generator G (input corresponding conditional label, e.g. day type) to generate its activity sequence for the day (threshold the output of G, e.g. >0.5 as activity occurrence).
[0059] 2) Appliance mapping and triggering: Establish mapping rules between activities and appliances (e.g. "washing clothes" activity maps to "washing machine"). When an activity occurs in a time slice, decide whether to actually trigger the corresponding appliance according to pre-computed probability (derived from household size and weekly usage frequency).
[0060] 3) Power profile synthesis: Once an appliance is triggered, extract its typical power profile (high resolution, e.g. 6 seconds per point) from the power characteristics database, and superimpose it onto the household total load curve at the corresponding position.
[0061] 4) Baseline load addition: Take some typical loads as examples (Refrigerator: simulate as a periodic on-off load, with its first start time randomized. Lighting: decide whether to turn on according to solar irradiance data of the location (e.g. below 100 W / m²). Standby power: add a constant baseline power value.)
[0062] 5) Load aggregation: Sum up all the power profiles of appliances and baseline loads by time dimension, to get the high-resolution total load curve of the household. Further, aggregate load curves of many households to get the load at transformer or neighborhood level.
[0063] Example 1:
[0064] 1. Data preparation and pre-processing
[0065] Public microdata of the Italian Time Use Survey (TUS) 2013 is obtained from ISTAT. 41,227 valid respondent-day records are selected. Each person's activity record for each day is converted into an 11-row (corresponding to 11 activity categories), 144-column (corresponding to 24 hours * 6 10-minute periods) binary matrix X. Meanwhile, the matrix is labeled with date c (0 for weekdays, 1 for weekends / holidays).
[0066] From the ISTAT household energy consumption survey, the ownership probability and weekly usage frequency of dishwasher, oven, washing machine, dryer are extracted for different household sizes (1-5 people). The household size distribution is obtained from Italian census data.
[0067] From the UK-DALE public dataset, high-resolution power profiles of refrigerator, dishwasher, washing machine, dryer, oven, iron are extracted, e.g.Figure 2
[0068] 2. Model building and training
[0069] Conditional WGAN-GP model is built using TensorFlow framework.
[0070] Generator (G):
[0071] Input: noise z (32-dim), condition c (1-dim, scalar).
[0072] c is mapped to a 32-dim vector through an Embedding layer.
[0073] z is concatenated with the embedding vector of c to a 64-dim vector.
[0074] Two fully connected layers (Dense) are connected afterwards, each with 128 neurons and using ReLU activation.
[0075] The output layer has 1584 neurons (11*144), using Sigmoid activation, and reshaped to a 11x144 matrix.
[0076] Discriminator (D):
[0077] Input: data x (11x144-dim, flattened to a 1584-dim vector), condition c (1-dim).
[0078] c is mapped to a 32-dim vector through the same Embedding layer.
[0079] The flattened x is concatenated with the embedding vector of c to a 1616-dim vector.
[0080] Several fully connected layers are connected afterwards (e.g. 3 layers, with decreasing number of neurons).
[0081] The output layer has 1 neuron, with no activation function.
[0082] Hyperparameters: Adam optimizer is used, with learning rate set to 0.001, β1=0.5, β2=0.9. Batch size is 64. Gradient penalty coefficient λ=10. Epoch is 200. Train the generator for 1 time, and train the discriminator for 5 times.
[0083] Training: The pre-processed 41,227 (X, c) sample pairs are input to the network for training. The KL divergence between the active distribution of the generated samples and the real distribution is monitored during the training process to determine convergence.
[0084] 3. Load simulation process
[0085] Take the example of simulating the load of 1000 households for two weeks:
[0086] Generate household attributes: Randomly generate the population of 1000 households according to the household size distribution.
[0087] Generate behavior sequences: For each member in each household, select the corresponding condition label c according to whether the simulation date is a weekday or weekend. Call the trained generator G to generate the activity sequences of all members for 14 days at once (a total of 1000 * average household population * 14 sequences).
[0088] Reconstruct the load: For each household:
[0089] a. Determine the appliance ownership: According to the population of the household, determine whether the household owns a dishwasher, dryer, etc. with a certain probability.
[0090] b. Trigger appliances: Traverse each member's activity in each time slice. If activity i occurs and its mapped appliance j exists in the household, trigger it according to the rules. For example, when encountering the "laundry" activity, start the washing machine with a probability P_wash = (the weekly usage of the population) / 7, and mark the day as having been started to prevent multiple triggers.
[0091] c. Insert power curve: When appliance j is triggered, randomly select a typical power curve of this appliance from the power feature library and insert it into the corresponding starting time point of the household total load curve.
[0092] d. Add basic load: Superimpose the periodic curve of the refrigerator, the lighting load generated according to the Turin region illumination data, and a constant standby power consumption.
[0093] Aggregation and analysis: Align and add all 1000 households' load curves by time to get the total load at the substation level. Calculate the average bias (Bias) and correlation (Correlation) with the real data for verification
[0094] 4. Effect verification
[0095] Activity level: Calculate the KL divergence between the generated activity distribution and the TUS real distribution. The results show that the GAN model and the Markov chain model have comparable accuracy, both of which can well fit the real distribution.
[0096] Device level: Compare the average daily load curve of the simulated dishwasher, washing machine, etc. with the measured data of the REMODECE project. The two are highly consistent in shape, with a correlation coefficient generally higher than 0.7, even exceeding 0.9.
[0097] Household level: The total load curve of the simulated household is compared with the average load curve of Italian households reported in RSE. The correlation coefficient is very high (>0.9), indicating that the timing of the simulated load is very realistic. The systematic negative bias (about -150 W) is mainly due to the fact that large power devices such as electric heating, air conditioning, etc. are not included in the simulation, which is in line with expectations.
[0098] Efficiency level: In simulation tasks of different scales (100 to 100,000 households), the time consumption of the GAN method is much lower than that of the Markov chain method, and the time consumption grows slowly with the scale, showing excellent scalability.
[0099] Although the above describes the specific embodiments of the present application in detail, so as to facilitate the understanding of the present application by those skilled in the art, it should be clear that the present application is not limited to the scope of the specific embodiments, and for those skilled in the art, all kinds of changes within the spirit and scope of the present application defined and determined by the appended claims are obvious, and all kinds of inventions utilizing the concept of the present application are within the scope of protection.
Claims
1. A residential load forecasting method based on generative adversarial networks, characterized in that, Includes the following steps: S1: Data acquisition and preprocessing; 1) Data sources: Obtain publicly available time utilization survey datasets, household energy consumption survey datasets, census data, and publicly available household appliance power characteristic datasets for the target area; 2) Activity definition and screening: Select the types of activities closely related to electricity use behavior in the home from the time use survey data, including: studying, watching TV, using a computer, reading, cooking, eating, washing dishes, cleaning, ironing, in the bathroom, and doing laundry. Remove other irrelevant activities to form a list of K types of activities, K=11. 3) Matrix encoding: The activity records of each respondent for one day are encoded into a binary K×T-dimensional "activity-time" matrix P at 10-minute intervals, where T is the number of time slices in a day, with a value of 144. An element P(i, j) of 1 in the matrix indicates that the user is performing activity i in the j-th time slice. 4) Conditional label appending: Append a conditional label vector c to each sample matrix; 5) Home appliance probability statistics: From energy consumption survey data, the ownership rate and average weekly usage frequency of various home appliances under different family sizes are statistically analyzed to form a probability lookup table; S2: Construction and training of the conditional WGAN-GP behavior model; 1) Network structure: Generator G: The input is a random noise vector z that follows a standard normal distribution and a condition label c; c is first mapped to a continuous vector through an embedding layer, and then concatenated with z; the concatenated vector is passed through multiple fully connected layers and activated by the ReLU activation function, and finally outputs a K × T matrix G(z|c); finally, the matrix G(z|c) is activated by the Sigmoid activation function, so that its element values are between 0 and 1, thus approximating the probability of the event occurring; Discriminator D: The input is a matrix G(z|c) and a condition label c; G(z|c) is flattened and concatenated with the processing vector of c, and then passed through multiple fully connected layers to finally output a scalar, representing the confidence that the input sample is a real sample; 2) Loss function: The loss function of WGAN-GP is adopted, which includes a gradient penalty term to force the discriminator to satisfy the Lipschitz constraint, thereby stabilizing the training process; L = E[D(x|c)] - E[D(G(z|c))] + λ * E[(||∇_x̂ D(x̂|c)||2 - 1)²]; Where x̂ are the sampling points of the real sample and the generated sample, and λ is the gradient penalty coefficient; 3) Training process: Using the Adam optimizer, the discriminator D and the generator G are trained alternately. After training, the generator G can be used to quickly generate realistic user activity sequences from random noise and given conditions. S3: Load curve reconstruction; 1) Activity sequence sampling: For each family to be simulated, the family size is first determined based on census data, and then the trained generator G is called to generate the activity sequence for each member throughout the day. 2) Home appliance mapping and triggering: Establish mapping rules between activities and home appliances. When an activity occurs within a certain time slice, determine whether to actually trigger the corresponding home appliance based on the pre-calculated probability. 3) Power curve synthesis: Once the appliance is triggered, the typical power curve of the appliance is extracted from the power characteristic database and superimposed on the position corresponding to the time slice on the total household load curve. 4) Adding base load; 5) Load aggregation: sum the power curves and base loads of all household appliances over time to obtain the household's high-resolution total load curve.