A baseline load estimation method and apparatus based on generative adversarial networks
By constructing a generative adversarial network and utilizing historical load data from user terminals and power flow constraints, the problem of insufficient reliability and robustness of baseline load estimation methods is solved, and efficient and accurate baseline load estimation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
- Filing Date
- 2022-12-19
- Publication Date
- 2026-04-17
AI Technical Summary
Existing baseline load estimation methods are insufficient in terms of reliability and robustness. In particular, the averaging method, regression method, and control group method have large errors and low robustness in practical applications, making it difficult to effectively estimate the user's baseline load.
A generative adversarial network is adopted to construct a network architecture including a first generative model and a discriminative model. By using bidirectional gated recurrent units and multilayer perceptrons, a second generative model is generated through training the generative adversarial network. Baseline load estimation is performed using historical load data from user terminals, taking into account time-series correlations and introducing power flow constraints.
It improves the reliability and robustness of baseline load estimation, accurately estimates baseline load, relies only on historical data from user terminals, and does not require load data or non-load type data from other users, thus meeting the practical application needs of power systems.
Smart Images

Figure CN115906660B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system technology, and in particular to a baseline load estimation method and apparatus based on generative adversarial networks. Background Technology
[0002] Demand response refers to projects that address imbalances between electricity supply and demand and assist in the integration of renewable energy by scheduling flexible resources on the demand side, thereby improving the flexibility and reliability of the power system. In evaluating the effectiveness of demand response projects, the user's baseline load provides a quantitative basis for assessing the degree to which demand response adjusts the user's load. However, the baseline load during the demand response period cannot be measured, therefore, it needs to be estimated.
[0003] The current baseline load estimation methods are mainly divided into three categories: the averaging method, the regression method, and the control group method.
[0004] The averaging method estimates the load based on historical loads prior to user participation in demand response. However, since it only performs simple statistical analysis and calculations on historical load data without considering other factors, and user loads are highly volatile and random, the averaging method results in large estimation errors and lacks generalization and robustness.
[0005] Regression methods estimate loads by constructing a linear / nonlinear fit between baseline loads and other factors (such as time, weather, and social factors). To describe this fit, a fitting function and data features are typically constructed. However, manually selected features are difficult to quantify in terms of their effectiveness on model accuracy and can lead to information loss. Furthermore, regression methods do not consider the relationships between time-series load data, resulting in lower reliability and robustness in practical applications.
[0006] The control group method divides users in the power system according to their electricity consumption habits and estimates the baseline load using the actual load of users in the same group who do not participate in demand response. However, considering that user electricity consumption behavior is highly individualized, load patterns are heterogeneous. This makes it difficult to form user groups with similar consumption habits, or even impossible, to do so. Without a sufficient number of control users, effective baseline estimation is difficult, resulting in high implementation difficulty and low robustness in practical applications. Summary of the Invention
[0007] This invention provides a baseline load estimation method and apparatus based on generative adversarial networks, which solves the technical problems of low reliability and robustness of other baseline load estimation methods in the prior art.
[0008] This invention provides a baseline load estimation method based on generative adversarial networks for a power system, the power system comprising multiple user terminals, the method comprising:
[0009] In response to a model training request, a generative adversarial network is constructed using a bidirectional gated recurrent unit and a multilayer perceptron; wherein the generative adversarial network includes a first generative model and a discriminative model;
[0010] Obtain historical load data of all user terminals that did not participate in demand response, construct a sample sequence group, and calculate a simulated sequence group in combination with a preset event pool;
[0011] Based on the sample sequence group and the simulated sequence group, the first generative model and the discriminative model are trained to obtain the second generative model;
[0012] When a baseline load estimation request for the power system is received, the demand response period is extracted from the baseline load estimation request, the actual load data corresponding to the baseline load estimation request is obtained, and a load sequence is constructed.
[0013] The load sequence is input into the second generative model, which outputs an estimated sequence.
[0014] The baseline load sequence is obtained by replacing the load data corresponding to the demand response period in the load sequence with the estimated data corresponding to the demand response period in the estimated sequence.
[0015] Optionally, the event pool includes multiple records obtained from historical demand response events, and the records include user terminal type, time point, and corresponding load change ratio;
[0016] The step of acquiring all historical load data of user terminals that did not participate in demand response, constructing a sample sequence group, and calculating a simulated sequence group in conjunction with the event pool includes:
[0017] Obtain historical load data of multiple user terminals that have not participated in demand response for several days, extract historical load values according to preset time points, construct sample sequences with the number of elements equal to the preset number of time points, and form a sample sequence group whose sample sequence count is the product of the number of user terminals and the number of days.
[0018] Based on a preset set of historical time periods for demand response, select a subset of elements from each of the sample sequences as target elements;
[0019] Records with the same user terminal type and time point as each target element are extracted from the event pool, and a preset number are randomly selected as target records. The average load change ratio corresponding to each target element is calculated based on the target records.
[0020] Based on the average load change ratio, calculate the simulated value corresponding to each target element, replace the target element with the corresponding simulated value, and obtain the simulated sequence group.
[0021] Optionally, based on a preset set of historical demand response periods, a subset of elements are selected as target elements from each of the sample sequences, including:
[0022] Randomly match each of the sample sequences with a historical time period from the set of historical time periods for demand response;
[0023] The element corresponding to the historical time period in the sample sequence is selected as the target element.
[0024] Optionally, the formula for calculating the simulated value is:
[0025] x′=x·(1-p)+η
[0026] Where x is the target element, p is the average load change ratio corresponding to the target element, x′ is the simulated value, and η is random Gaussian noise.
[0027] Optionally, the score output by the discrimination model is the true probability of the input data;
[0028] The step of training the first generative model and the discriminative model based on the sample sequence group and the simulated sequence group to obtain the second generative model includes:
[0029] A target simulated sequence is randomly selected from the simulated sequence group and input into the first generation model, outputting a false sequence;
[0030] Calculate the random sequence between the fake sequence and the target sample sequence corresponding to the target simulated sequence;
[0031] The false sequence is input into the discrimination model, and a first discrimination score is output.
[0032] The target sample sequence is input into the discrimination model, and a second discrimination score is output.
[0033] The random sequence is input into the discrimination model, and a third discrimination score is output.
[0034] A first loss function is constructed based on the first discrimination score, and the first generative model is trained.
[0035] A second loss function is constructed based on the first discrimination score, the second discrimination score, and the third discrimination score, and the discrimination model is trained accordingly.
[0036] The process jumps to the step of randomly selecting a simulated sequence from the simulated sequence group and inputting it into the first generative model. The first generative model outputs a false sequence until the first loss function and the second loss function converge. After the first generative model is trained, the second generative model is obtained.
[0037] Optionally, the formula for calculating the random sequence is:
[0038]
[0039] in, For the random sequence, Let X be the false sequence, X be the target sample sequence, and ∈ be a random variable that follows a uniform distribution on (0,1).
[0040] Optionally, the first loss function is:
[0041]
[0042] Among them, L G The loss function of the generative model is... For the spurious sequence, P is the first discrimination score. g The distribution of the spurious sequences;
[0043] The second loss function is:
[0044]
[0045] Among them, L D Let P be the loss function of the discriminant model. r Let X be the distribution of the sample sequence, X be the target sample sequence, and D(X) be the second discrimination score. For the random sequence, The distribution of the random sequence, Let λ be the third discrimination score, λ be the penalty term coefficient, and e be the load error.
[0046] Optionally, the calculation process for the load error includes:
[0047] Collect the power system's topology, conductor parameters, historical phase data of all user terminals that did not participate in demand response, and corresponding historical power flow data;
[0048] Based on the topology and the conductor parameters, a measurement matrix is constructed in which the number of rows and columns are both equal to the number of user terminals.
[0049] A measurement matrix, with the number of rows and columns equal to the number of user terminals, is constructed from the historical phase data;
[0050] Extract phase data from the historical phase data that are on the same day as the target sample sequence, and construct a phase matrix with the number of rows equal to the number of user terminals and the number of columns equal to the preset number of time points;
[0051] Using the measurement matrix and the phase matrix, calculate the theoretical net net load matrix:
[0052] z N =Hθ+δ
[0053] Among them, z N Let H be the theoretical net net load matrix, H be the measurement matrix, θ be the phase matrix, and δ be a noise matrix with a mean of 0 and identical elements in each column.
[0054] Extract power flow data from the historical power flow data that are on the same day as the target sample sequence, and construct a power flow matrix with the number of rows equal to the number of user terminals and the number of columns equal to the preset number of time points;
[0055] Extract sample sequences from the sample sequence group that are on the same day as the target sample sequence, and replace the target sample sequence with the fake sequence to construct a power consumption matrix with the number of rows equal to the number of user terminals and the number of columns equal to the number of preset time points;
[0056] Using the power flow matrix and the power consumption matrix, calculate the actual net grid load matrix:
[0057] z R =P R -L R
[0058] Among them, z R Let P be the actual net net load matrix sequence. R Let L be the power flow matrix. R This is the power consumption matrix;
[0059] Using the actual net load matrix, the measurement matrix, and the phase matrix, the system state estimation matrix is calculated:
[0060]
[0061] in, Let W be the system state estimation matrix, and let W be the covariance matrix of one row of the noise matrix.
[0062] Using the system state estimation matrix and the measurement matrix, calculate the estimated net network load matrix:
[0063]
[0064] in, The estimated net network load matrix;
[0065] The load error matrix is calculated using the covariance matrix, the actual net network load matrix, and the estimated net network load matrix.
[0066]
[0067] Where r is the load error matrix;
[0068] The load error is calculated using the load error matrix:
[0069] e = ||r||2.
[0070] Optionally, when the load error is less than or equal to a preset threshold, the penalty term coefficient is 0; when the load error is greater than the preset threshold, the penalty term coefficient is 10.
[0071] The present invention also provides a baseline load estimation device based on generative adversarial networks for a power system, the power system including multiple user terminals, the device comprising:
[0072] The model building module is used to respond to model training requests and constructs a generative adversarial network using bidirectional gated recurrent units and multilayer perceptrons; wherein the generative adversarial network includes a first generative model and a discriminative model;
[0073] The sample construction module is used to obtain historical load data of all user terminals that did not participate in demand response, construct sample sequence groups, and calculate simulation sequence groups in combination with a preset event pool.
[0074] The model training module is used to train the first generative model and the discriminative model based on the sample sequence group and the simulated sequence group to obtain the second generative model;
[0075] The data processing module is used to extract the demand response period from the baseline load estimation request when the power system's baseline load estimation request is received, obtain the actual load data corresponding to the baseline load estimation request, and construct a load sequence.
[0076] The result generation module is used to input the load sequence into the second generation model and output an estimated sequence;
[0077] The result processing module is used to replace the load data corresponding to the demand response period in the load sequence with the estimated data in the estimated sequence to obtain the baseline load sequence.
[0078] As can be seen from the above technical solutions, the present invention has the following advantages:
[0079] This invention constructs and trains a generative adversarial network (GAN) comprising a first generative model and a discriminative model to obtain a second generative model. The load sequence of the user terminal whose baseline load needs to be estimated is input into the second generative model. The estimated output sequence is then used to replace the load data corresponding to the demand response period in the load sequence, thus obtaining the estimated baseline load sequence. This invention utilizes a GAN, considering the correlation between time-series load data, improving the reliability of the baseline load estimation results. Furthermore, it only requires the user terminal's own load data for baseline load estimation, without relying on load data from other users or other non-load type data, thus improving robustness in practical applications. Attached Figure Description
[0080] 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.
[0081] Figure 1 The flowchart illustrates the steps of a baseline load estimation method based on generative adversarial networks provided in Embodiment 1 of the present invention.
[0082] Figure 2 This is a flowchart illustrating the steps of a baseline load estimation method based on generative adversarial networks provided in Embodiment 2 of the present invention.
[0083] Figure 3 This is a structural block diagram of a baseline load estimation device based on generative adversarial networks provided in Embodiment 3 of the present invention. Detailed Implementation
[0084] This invention provides a baseline load estimation method and apparatus based on generative adversarial networks to address the technical problems of low reliability and robustness in other baseline load estimation methods in the prior art.
[0085] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0086] Please see Figure 1 , Figure 1The flowchart illustrates the steps of a baseline load estimation method based on generative adversarial networks provided in Embodiment 1 of the present invention.
[0087] This invention provides a baseline load estimation method based on generative adversarial networks for a power system, which includes multiple user terminals. The method includes:
[0088] Step 101: In response to the model training request, construct a generative adversarial network using a bidirectional gated recurrent unit and a multilayer perceptron; wherein the generative adversarial network includes a first generative model and a discriminative model.
[0089] Understandably, both the generative and discriminative models employ bidirectional gated recurrent units (Bi-GRUs) and multilayer perceptrons (MLPs). In the generative model, the Bi-GRU is a temporal neural network responsible for extracting the temporal relationships of sample sequences to obtain high-dimensional features. The MLP is then responsible for generating new time-series data based on these high-dimensional features. In the discriminative model, the Bi-GRU extracts the temporal relationships between sample and fake sequences to obtain high-dimensional features. The MLP then generates the true probability of the data against these high-dimensional features, distinguishing sample and fake sequences as much as possible. During the training of both the generative and adversarial models, a zero-sum game exists: the discriminative model needs to distinguish sample and fake sequences as much as possible, while the generative model needs to make the generated fake sequences as close as possible to the sample sequences, and the discriminative model needs to output a true probability of 1 for the fake sequences as close as possible to the true probability of 1.
[0090] Step 102: Obtain historical load data of all user terminals that did not participate in demand response, construct sample sequence groups, and calculate simulation sequence groups in combination with preset event pools.
[0091] Step 103: Based on the sample sequence group and the simulated sequence group, train the first generative model and the discriminative model to obtain the second generative model.
[0092] Step 104: When a baseline load estimation request for the power system is received, the demand response period is extracted from the baseline load estimation request, the actual load data corresponding to the baseline load estimation request is obtained, and a load sequence is constructed.
[0093] Step 105: Input the load sequence into the second generative model and output the estimated sequence.
[0094] Step 106: Replace the load data corresponding to the demand response period in the load sequence with the estimated data in the estimated sequence to obtain the baseline load sequence.
[0095] This invention provides a baseline load estimation method based on generative adversarial networks (GANs). By constructing and training a GAN comprising a first generative model and a discriminative model, a second generative model is obtained. The load sequence of the user terminal whose baseline load needs to be estimated is input into the second generative model. The estimated output sequence is used to replace the load data corresponding to the demand response period in the load sequence, thus obtaining the estimated baseline load sequence. This invention utilizes GANs, considering the correlation between time-series load data, improving the reliability of the baseline load estimation results. Furthermore, it only requires the user terminal's own load data for baseline load estimation, without relying on load data from other users or other non-load type data, thus improving robustness in practical applications.
[0096] Please see Figure 2 , Figure 2 This is a flowchart illustrating the steps of a baseline load estimation method based on generative adversarial networks provided in Embodiment 2 of the present invention.
[0097] This invention provides a baseline load estimation method based on generative adversarial networks for power systems, which include multiple user terminals. The method includes:
[0098] Step 201: In response to the model training request, construct a generative adversarial network using a bidirectional gated recurrent unit and a multilayer perceptron; wherein the generative adversarial network includes a first generative model and a discriminative model.
[0099] Step 202: Obtain historical load data of all user terminals that did not participate in demand response, construct sample sequence groups, and calculate simulation sequence groups in combination with preset event pools.
[0100] Optionally, the event pool includes multiple records obtained from historical demand response events. These records include user terminal type, time point, and corresponding load change ratio. Step 202 includes:
[0101] Obtain historical load data from all user terminals that did not participate in demand response, construct a sample sequence group, and combine it with the event pool to calculate a simulated sequence group including:
[0102] Acquire historical load data of multiple user terminals that have not participated in demand response for several days, extract historical load values according to preset time points, construct sample sequences with the number of elements equal to the preset number of time points, and form a sample sequence group whose sample sequence count is the product of the number of user terminals and the number of days.
[0103] Based on a preset set of historical demand response periods, select some elements from each sample sequence as target elements. Specifically, randomly match a historical period from the set of historical demand response periods for each sample sequence, and select the elements in the sample sequence that correspond to the historical period as target elements.
[0104] Extract records from the event pool that are the same type of user terminal and the same time point as each target element, and randomly select a preset number of records as target records. Calculate the average load change ratio for each target element based on the target records.
[0105] Based on the average load change ratio, calculate the simulated value corresponding to each target element, replace the target element with the corresponding simulated value, and obtain the simulated sequence group.
[0106] It should be noted that the source of historical demand response events is historical data from this power system or other power systems participating in demand response. This data includes actual load, user terminals, the time period and time point in time during which demand response was participated, user terminal type, and baseline load obtained using other baseline load estimation methods. The load change ratio of a specific user terminal at a specific time point can be calculated from the baseline load and actual load at that user terminal. Data with a load change ratio greater than a preset ratio is removed. This data is used as the source for recording in the event pool. Depending on the characteristics of the power system, the preset ratio can be set to 30%.
[0107] In the second real-time example of this invention, the event pool is used to provide a pattern of participation in demand response by different user types in a load power system. This pattern is used to simulate the corresponding simulated sequences that participated in demand response by analyzing sample sequences that did not participate in demand response. Compared to the common technique of replacing some elements in a sample sequence with a specific value, replacing elements based on the event pool makes the simulation more realistic and reliable. It also avoids the problem that the replacement results are too uniform, preventing the model from only learning to distinguish fixed situations and thus becoming unsuitable for real-world scenarios.
[0108] The preset time points can be set every hour, half hour, fifteen minutes, or other fixed intervals starting from 0:00, and can be configured according to actual load acquisition or actual needs. The preset number can be set to 10. The preset demand response historical time period set can be obtained by extracting the time period information that participated in the demand response from historical demand response events.
[0109] Optionally, the formula for calculating the simulated value is:
[0110] x′=x·(1-p)+η
[0111] Where x is the target element, p is the average load change ratio corresponding to the target element, x′ is the simulated value, and η is random Gaussian noise.
[0112] Step 203: Randomly select a target simulated sequence from the simulated sequence group and input it into the first generation model to output a fake sequence.
[0113] Step 204: Calculate the random sequence between the spurious sequence and the target sample sequence corresponding to the target simulated sequence.
[0114] Optionally, the formula for calculating a random sequence is:
[0115]
[0116] in, It is a random sequence. Let X be a spurious sequence, X be the target sample sequence, and ∈ be a random variable that follows a uniform distribution on (0,1).
[0117] Step 205: Input the spurious sequence into the discrimination model and output the first discrimination score.
[0118] Step 206: Input the target sample sequence into the discrimination model and output the second discrimination score.
[0119] Step 207: Input the random sequence into the discrimination model and output the third discrimination score.
[0120] Step 208: Construct a first loss function based on the first discrimination score and train the first generative model.
[0121] Step 209: Construct a second loss function based on the first, second, and third discrimination scores, and train the discrimination model.
[0122] The first loss function is:
[0123]
[0124] Among them, L G The loss function for generating the model, It is a spurious sequence. P is the first discriminant score. g The distribution of spurious sequences;
[0125] The second loss function is:
[0126]
[0127] Among them, L D To determine the loss function of the model, P r Let X be the distribution of the sample sequence, X be the target sample sequence, and D(X) be the second discriminant score. It is a random sequence. The distribution of a random sequence, λ is the third discrimination score, λ is the penalty term coefficient, and e is the load error.
[0128] Optionally, the calculation process for load error includes:
[0129] Collect the power system topology, conductor parameters, historical phase data of all user terminals that are not involved in demand response, and corresponding historical power flow data;
[0130] Based on the topology and conductor parameters, a measurement matrix is constructed with the number of rows and columns equal to the number of user terminals.
[0131] A measurement matrix with the number of rows and columns equal to the number of user terminals was constructed from historical phase data;
[0132] Extract phase data from historical phase data that are on the same day as the target sample sequence, and construct a phase matrix with the number of rows equal to the number of user terminals and the number of columns equal to the preset number of time points;
[0133] The theoretical net net load matrix is calculated using the measurement matrix and phase matrix:
[0134] z N =Hθ+δ
[0135] Among them, z N Here, H is the theoretical net net load matrix, θ is the measurement matrix, δ is the phase matrix, and δ is the noise matrix with a mean of 0 and identical elements in each column.
[0136] Extract power flow data from historical power flow data that are on the same day as the target sample sequence, and construct a power flow matrix with the number of rows equal to the number of user terminals and the number of columns equal to the preset number of time points;
[0137] Extract sample sequences from the sample sequence group that are on the same day as the target sample sequence, replace the target sample sequence with a fake sequence, and construct a power consumption matrix with the number of rows equal to the number of user terminals and the number of columns equal to the number of preset time points;
[0138] The actual net grid load matrix is calculated using the power flow matrix and the power consumption matrix:
[0139] z R =P R -L R
[0140] Among them, z R For the actual net load matrix sequence, P R For the power flow matrix, L R This is a power consumption matrix;
[0141] Using the actual net load matrix, measurement matrix, and phase matrix, the system state estimation matrix is calculated using the least squares method:
[0142]
[0143] in, Let W be the system state estimation matrix, and let W be the covariance matrix of one row of the noise matrix.
[0144] Using the system state estimation matrix and measurement matrix, the estimated net network load matrix is calculated:
[0145]
[0146] in, To estimate the net network load matrix;
[0147] The load error matrix is calculated using the covariance matrix, the actual net load matrix, and the estimated net load matrix.
[0148]
[0149] Where r is the load error matrix;
[0150] The load error is calculated using the load error matrix:
[0151] e = ||r||2.
[0152] It should be noted that the purpose of introducing load error and penalty term coefficient is to infer whether the load meets the power system constraints by judging whether the power parameter state containing spurious sequences meets the load flow constraints.
[0153] In the second embodiment of the present invention, the element H in the i-th row and j-th column of the measurement matrix H is... i,j If the i-th user terminal is not connected to the j-th user terminal, then H i,j H is 0; if there is a connection, then H is 0. i,j Let θ be the admittance value of the connecting wire between the i-th user and the j-th user. Let θ be the element θ in the i-th row and j-th column of the phase matrix θ. i,j Let P be the phase value of the i-th user terminal at time j. Power flow matrix P R The element P in the i-th row and j-th column i,j Let be the power flow value of the i-th user terminal at time j.
[0154] Optionally, when the load error e is less than or equal to a preset threshold, the penalty term coefficient λ is 0; when the load error e is greater than the preset threshold, the penalty term coefficient λ is 10.
[0155] It should be noted that by comparing whether the load error exceeds a preset threshold, it can be determined whether the generated load meets the power flow constraints of the power system. The preset threshold can be set to 1.
[0156] Step 210: Proceed to step 203 until the first loss function and the second loss function converge. After the first generative model is trained, the second generative model is obtained.
[0157] Step 211: When a baseline load estimation request for the power system is received, the demand response period is extracted from the baseline load estimation request, the actual load data corresponding to the baseline load estimation request is obtained, and a load sequence is constructed.
[0158] Step 212: Input the load sequence into the second generative model and output the estimated sequence;
[0159] Step 213: Replace the load data corresponding to the demand response period in the load sequence with the estimated data in the estimated sequence to obtain the baseline load sequence.
[0160] This invention provides a baseline load estimation method based on generative adversarial networks (GANs). By constructing and training a GAN comprising a first generative model and a discriminative model, a second generative model is obtained. The load sequence of the user terminal whose baseline load needs to be estimated is input into the second generative model. The estimated output sequence replaces the load data corresponding to the demand response period in the load sequence, thus obtaining the estimated baseline load sequence. During the training of the discriminative model, power flow constraints are introduced as part of the discriminative model's loss function. Based on the power system's state estimation and power flow equations, this helps the discriminative model determine whether the generated load data meets the constraints. This invention utilizes a GAN, considers the correlation between time-series load data, and introduces power flow constraints during the loss model training process, improving the reliability of the baseline load estimation results. Furthermore, it only requires the user terminal's own load data for baseline load estimation, without relying on load data from other users or other non-load types of data, thus improving robustness in practical applications.
[0161] Please see Figure 3 , Figure 3 This is a structural block diagram of a baseline load estimation device based on generative adversarial networks provided in Embodiment 3 of the present invention.
[0162] This invention provides a baseline load estimation device based on generative adversarial networks for use in a power system, which includes multiple user terminals. The device includes:
[0163] The model building module 301 is used to respond to model training requests and constructs a generative adversarial network using bidirectional gated recurrent units and multilayer perceptrons; wherein the generative adversarial network includes a first generative model and a discriminative model;
[0164] The sample construction module 302 is used to obtain historical load data of all user terminals that did not participate in demand response, construct sample sequence groups, and calculate simulation sequence groups in combination with a preset event pool.
[0165] The model training module 303 is used to train a first generative model and a discriminative model based on a sample sequence group and a simulated sequence group to obtain a second generative model.
[0166] Data processing module 304 is used to extract the demand response period from the baseline load estimation request, obtain the actual load data corresponding to the baseline load estimation request, and construct a load sequence when a baseline load estimation request is received from the power system.
[0167] The result generation module 305 is used to input the load sequence into the second generation model and output the estimated sequence.
[0168] The result processing module 306 is used to replace the load data corresponding to the demand response period in the load sequence with the estimated data in the estimated sequence to obtain the baseline load sequence.
[0169] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0170] In the several embodiments provided in this application, it should be understood that the disclosed apparatus, modules, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0171] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0172] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0173] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0174] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A baseline load estimation method based on generative adversarial networks, characterized in that, For use in a power system, the power system including multiple user terminals, the method includes: In response to a model training request, a generative adversarial network is constructed using a bidirectional gated recurrent unit and a multilayer perceptron; wherein the generative adversarial network includes a first generative model and a discriminative model; Obtain historical load data of all user terminals that did not participate in demand response, construct a sample sequence group, and calculate a simulated sequence group in combination with a preset event pool; Based on the sample sequence group and the simulated sequence group, the first generative model and the discriminative model are trained to obtain the second generative model; When a baseline load estimation request for the power system is received, the demand response period is extracted from the baseline load estimation request, the actual load data corresponding to the baseline load estimation request is obtained, and a load sequence is constructed. The load sequence is input into the second generative model, which outputs an estimated sequence. The estimated data corresponding to the demand response period in the estimated sequence is used to replace the load data corresponding to the demand response period in the load sequence to obtain the baseline load sequence; The event pool includes multiple records obtained from historical demand response events, and the records include user terminal type, time point, and corresponding load change ratio. The step of acquiring all historical load data of user terminals that did not participate in demand response, constructing a sample sequence group, and calculating a simulated sequence group in combination with a preset event pool includes: Obtain historical load data of multiple user terminals that have not participated in demand response for several days, extract historical load values according to preset time points, construct sample sequences with the number of elements equal to the number of preset time points, and form a sample sequence group with the number of sample sequences equal to the product of the number of user terminals and the number of days. Based on a preset set of historical time periods for demand response, select a subset of elements from each of the sample sequences as target elements; Records with the same user terminal type and time point as each target element are extracted from the event pool, and a preset number are randomly selected as target records. The average load change ratio corresponding to each target element is calculated based on the target records. Based on the average load change ratio, calculate the simulated value corresponding to each target element, replace the target element with the corresponding simulated value, and obtain the simulated sequence group; The score output by the discriminant model is the true probability of the input data. The step of training the first generative model and the discriminative model based on the sample sequence group and the simulated sequence group to obtain the second generative model includes: A target simulated sequence is randomly selected from the simulated sequence group and input into the first generation model, outputting a false sequence; Calculate the random sequence between the fake sequence and the target sample sequence corresponding to the target simulated sequence; The false sequence is input into the discrimination model, and a first discrimination score is output. The target sample sequence is input into the discrimination model, and a second discrimination score is output. The random sequence is input into the discrimination model, and a third discrimination score is output. A first loss function is constructed based on the first discrimination score, and the first generative model is trained. A second loss function is constructed based on the first discrimination score, the second discrimination score, and the third discrimination score, and the discrimination model is trained accordingly. Jump to execute the step of randomly selecting a target simulated sequence from the simulated sequence group and inputting it into the first generation model, outputting a false sequence, until the first loss function and the second loss function converge, and the second generation model is obtained after the first generation model is trained; The first loss function is: Among them, L G The loss function of the generative model is... For the spurious sequence, P is the first discrimination score. g The distribution of the spurious sequences; The second loss function is: Among them, L D Let be the loss function of the discriminant model. The distribution of the sample sequence, The target sample sequence, The second discrimination score, For the random sequence, The distribution of the random sequence, Let λ be the third discrimination score, λ be the penalty term coefficient, and e be the load error.
2. The baseline load estimation method based on generative adversarial networks according to claim 1, characterized in that, Based on a preset set of historical demand response periods, a subset of elements is selected as target elements from each of the sample sequences, including: Randomly match each of the sample sequences with a historical time period from the set of historical time periods for demand response; The element corresponding to the historical time period in the sample sequence is selected as the target element.
3. The baseline load estimation method based on generative adversarial networks according to claim 1, characterized in that, The formula for calculating the simulated value is: Where x is the target element. The average load corresponding to the target element is changed by a certain percentage. The simulated value, It is random Gaussian noise.
4. The baseline load estimation method based on generative adversarial networks according to claim 1, characterized in that, The formula for calculating the random sequence is: in, For the random sequence, For the spurious sequence, The target sample sequence, Let be a random variable that follows a uniform distribution on (0,1).
5. The baseline load estimation method based on generative adversarial networks according to claim 1, characterized in that, The calculation process for the load error includes: Collect the power system's topology, conductor parameters, historical phase data of all user terminals that did not participate in demand response, and corresponding historical power flow data; Based on the topology and the conductor parameters, a measurement matrix is constructed in which the number of rows and columns are both equal to the number of user terminals. Extract phase data from the historical phase data that are on the same day as the target sample sequence, and construct a phase matrix with the number of rows equal to the number of user terminals and the number of columns equal to the preset number of time points; Using the measurement matrix and the phase matrix, calculate the theoretical net net load matrix: in, Let H be the theoretical net net load matrix, and H be the measurement matrix. The phase matrix is... This is a noise matrix with a mean of 0 and identical elements in each column. Extract power flow data from the historical power flow data that are on the same day as the target sample sequence, and construct a power flow matrix with the number of rows equal to the number of user terminals and the number of columns equal to the preset number of time points; Extract sample sequences from the sample sequence group that are on the same day as the target sample sequence, and replace the target sample sequence with the fake sequence to construct a power consumption matrix with the number of rows equal to the number of user terminals and the number of columns equal to the number of preset time points; Using the power flow matrix and the power consumption matrix, calculate the actual net grid load matrix: in, The actual net net load matrix, For the power flow matrix, This is the power consumption matrix; Using the actual net load matrix, the measurement matrix, and the phase matrix, the system state estimation matrix is calculated: in, The system state estimation matrix is... The covariance matrix of one row of the noise matrix; Using the system state estimation matrix and the measurement matrix, calculate the estimated net network load matrix: in, The estimated net network load matrix; The load error matrix is calculated using the covariance matrix, the actual net network load matrix, and the estimated net network load matrix. in, The load error matrix is described above. The load error is calculated using the load error matrix: 。 6. The baseline load estimation method based on generative adversarial networks according to claim 1, characterized in that, When the load error is less than or equal to a preset threshold, the penalty term coefficient is 0; when the load error is greater than the preset threshold, the penalty term coefficient is 10.
7. A baseline load estimation device based on generative adversarial networks, characterized in that, For use in a power system, the power system including multiple user terminals, the device includes: The model building module is used to respond to model training requests and constructs a generative adversarial network using bidirectional gated recurrent units and multilayer perceptrons; wherein the generative adversarial network includes a first generative model and a discriminative model; The sample construction module is used to obtain historical load data of all user terminals that did not participate in demand response, construct sample sequence groups, and calculate simulation sequence groups in combination with a preset event pool. The model training module is used to train the first generative model and the discriminative model based on the sample sequence group and the simulated sequence group to obtain the second generative model; The data processing module is used to extract the demand response period from the baseline load estimation request when the power system's baseline load estimation request is received, obtain the actual load data corresponding to the baseline load estimation request, and construct a load sequence. The result generation module is used to input the load sequence into the second generation model and output an estimated sequence; The result processing module is used to replace the load data corresponding to the demand response period in the load sequence with the estimated data in the estimated sequence to obtain the baseline load sequence; The event pool includes multiple records obtained from historical demand response events, and the records include user terminal type, time point, and corresponding load change ratio. The sample construction module is specifically used for: Obtain historical load data of multiple user terminals that have not participated in demand response for several days, extract historical load values according to preset time points, construct sample sequences with the number of elements equal to the number of preset time points, and form a sample sequence group with the number of sample sequences equal to the product of the number of user terminals and the number of days. Based on a preset set of historical time periods for demand response, select a subset of elements from each of the sample sequences as target elements; Records with the same user terminal type and time point as each target element are extracted from the event pool, and a preset number are randomly selected as target records. The average load change ratio corresponding to each target element is calculated based on the target records. Based on the average load change ratio, calculate the simulated value corresponding to each target element, replace the target element with the corresponding simulated value, and obtain the simulated sequence group; The score output by the discriminant model is the true probability of the input data. The model training module is specifically used for: A target simulated sequence is randomly selected from the simulated sequence group and input into the first generation model, outputting a false sequence; Calculate the random sequence between the fake sequence and the target sample sequence corresponding to the target simulated sequence; The false sequence is input into the discrimination model, and a first discrimination score is output. The target sample sequence is input into the discrimination model, and a second discrimination score is output. The random sequence is input into the discrimination model, and a third discrimination score is output. A first loss function is constructed based on the first discrimination score, and the first generative model is trained. A second loss function is constructed based on the first discrimination score, the second discrimination score, and the third discrimination score, and the discrimination model is trained accordingly. Jump to execute the step of randomly selecting a target simulated sequence from the simulated sequence group and inputting it into the first generation model, outputting a false sequence, until the first loss function and the second loss function converge, and the second generation model is obtained after the first generation model is trained; The first loss function is: Among them, L G The loss function of the generative model is... For the spurious sequence, P is the first discrimination score. g The distribution of the spurious sequences; The second loss function is: Among them, L D Let be the loss function of the discriminant model. The distribution of the sample sequence, The target sample sequence, The second discrimination score, For the random sequence, The distribution of the random sequence, Let λ be the third discrimination score, λ be the penalty term coefficient, and e be the load error.
Citation Information
Patent Citations
User baseline load estimation method, terminal and computer readable storage medium
CN113469506A