Power grid resource allocation method and system based on generative artificial intelligence
By employing generative artificial intelligence methods, combined with distributed data acquisition and improved conditional generative adversarial networks, the problems of constraint violation and computational time consumption in power grid resource allocation were solved, achieving fast and accurate power grid resource allocation.
Patent Information
- Application Number
- CN202511194854.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-08-26
AI Technical Summary
Existing power grid resource allocation methods are prone to violating physical constraints during policy generation, and deep reinforcement learning models are computationally time-consuming, making it difficult to meet the real-time requirements of power grid response at the second level.
A generative artificial intelligence-based approach is adopted, which uses a distributed data acquisition architecture and an improved conditional generative adversarial network, combined with a two-layer structured constraint rule layer and a lightweight reinforcement learning model, to achieve dynamic generation and optimization of power grid resource allocation strategies.
The generated resource allocation strategy ensures that it meets the physical constraints of the power grid, reduces the workload of post-processing adjustments, improves inference speed, meets the real-time scheduling requirements of the power grid, reduces scheduling risks, and achieves accurate resource allocation.
Smart Images

Figure CN120746209B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power processing, and in particular to a power grid resource allocation method and system based on generative artificial intelligence. BACKGROUND
[0002] In recent years, artificial intelligence technology has been applied to the field of power grid dispatching, and has experienced a transition from shallow machine learning to deep learning. Early algorithms such as support vector machine (SVM) and random forest were used for load forecasting, and later deep neural networks were used to process high-dimensional power grid state data. In particular, the application of reinforcement learning in AGC control and voltage regulation provides a new idea for dynamic resource allocation. However, these methods still have problems such as lack of physical constraint guarantee in strategy generation and high model complexity.
[0003] Currently, existing power grid resource allocation methods often treat physical constraints as a post-processing step, resulting in generated strategies that violate basic rules of power grid operation, such as power balance and device safety limits. In addition, current mainstream deep reinforcement learning models typically include multiple layers of fully connected networks, which have large parameter quantities and long computation times, making it difficult to meet the real-time requirements of power grid second-level response. Therefore, a power grid resource allocation method and system based on generative artificial intelligence are proposed. SUMMARY
[0004] In order to overcome the above-mentioned defects of the prior art, in order to achieve the above-mentioned purpose, the present application proposes the following technical solutions:
[0005] The power grid resource allocation method based on generative artificial intelligence comprises:
[0006] S1: Collecting power grid state data using a distributed data acquisition architecture;
[0007] S2: Dynamically generating a real resource allocation strategy based on the power grid state data using an improved conditional generative adversarial network containing a double-layer structured constraint rule layer;
[0008] The double-layer structured constraint rule layer includes a power balance constraint rule layer and a state of charge constraint rule layer;
[0009] The framework structure of the improved conditional generative adversarial network includes a generator, a discriminator, a power balance constraint rule layer, and a state of charge constraint rule layer;
[0010] S3: Based on the real resource allocation strategy, outputting a candidate execution scheme and corresponding execution confidence using a pre-set lightweight reinforcement learning model combined with a sparse connection mechanism;
[0011] The lightweight reinforcement learning model adopts a deep deterministic policy gradient simplified architecture, removes a basic fully connected layer, retains an input layer, one hidden layer and an output layer, and introduces a sparse connection mechanism to realize forward propagation and back propagation.
[0012] The lightweight reinforcement learning model comprises a state space and an action space, and the state space comprises a global state and a local state.
[0013] S4: Based on the candidate execution scheme and the corresponding execution confidence, a confidence threshold is preset, the candidate execution scheme higher than the confidence threshold is reserved as an optimal execution scheme, and the optimal execution scheme is decomposed into an AGC instruction to realize dynamic allocation of power grid resources.
[0014] The power grid state data comprises node voltage data, line flow data and power grid state data.
[0015] The process of the power balance constraint rule layer is as follows:
[0016] A power grid power balance equation is set: wherein, Pm(t) represents the output power of the mth conventional power source at the time point t, M is the number of types of power grid resources, P(t) is the output power of the power grid at the time point t, Pload(t) is the total load of the power grid at the time point t, Ploss(t) is the network loss of the power grid at the time point t.
[0017] The real resource allocation strategy generated by the generator needs to meet the power balance constraint, that is: wherein, Pm(t) is the power adjustment amount of the mth conventional power source at the time point t according to the generated real resource allocation strategy, Ploss(t) is the network loss at the time point t, P(t) is the output power of the power grid at the time point t, Pload(t) is the total load of the power grid at the time point t.
[0018] The process of the state of charge constraint rule layer is as follows:
[0019] The state of charge constraint rule is defined as , and wherein, SOCm(t) is the state of charge of the energy storage device, Cm is the capacity of the energy storage device, ηm is the charging and discharging efficiency of the energy storage device, Δt is a time interval, and SOCmin and SOCmax are the minimum value and the maximum value of the state of charge of the energy storage device, respectively;
[0020] Simultaneously satisfying the state of charge demand response: and wherein, is the load adjustment amount of demand response at time point t according to the real resource allocation strategy, is the maximum load amount that can be reduced.
[0021] The improved conditional generative adversarial network training process is:
[0022] Set a target function to train the improved conditional generative adversarial network:
[0023] ;
[0024] wherein, z is a random noise vector, is the probability distribution of the real resource allocation strategy , is the probability distribution of the random noise vector z, denotes the expectation of the real data real resource allocation strategy , denotes the expectation of the random noise vector z;
[0025] In the training process, the grid state data and the corresponding real resource allocation strategy are obtained from historical data, and then the generator and the discriminator are alternately updated;
[0026] If the generated strategy violates the constraint, a penalty term is applied, and for the constraint rules of the power balance constraint rule layer and the state of charge constraint rule layer, if it is not satisfied:
[0027] wherein is the penalty coefficient, M is the number of grid resources, and m is the index, is the new power adjustment amount of the mth conventional power source at time point t according to the generated real resource allocation strategy, is the network loss of the grid at time point t, is the output power of the grid at time point t, is the total load of the grid at time point t.
[0028] The implementation process of the sparse connection mechanism is:
[0029] A sparse connection matrix U representing the connection relationship of neurons is created, with a dimension of 32x32, and the elements in the matrix represent whether neuron i is connected to neuron j;
[0030] Assuming all elements are initially 0, for each neuron i, calculate the number of neurons that need to be connected based on the sparsity p. ,in Indicates rounding down;
[0031] Randomly select from the remaining 31 neurons One neuron, generated using a random function. Given three distinct random integers, for each randomly selected neuron j, connect two neurons in the matrix. and Setting both to 1 indicates that there is a connection between the two neurons. When constructing a sparse connection layer, only connections with a value of 1 in the sparse matrix U are considered to achieve sparse connections during forward and backward propagation.
[0032] The process of implementing forward and backward propagation is as follows:
[0033] For each neuron i in the hidden layer, its input The calculation method is as follows:
[0034] ,in yes The corresponding connection weights, It is the output of neuron j in the previous layer. It is the bias of neuron i;
[0035] Then, the output of neuron i is calculated using the ReLU activation function. Where F represents the ReLU activation function, This represents the input to neuron i, completing the forward propagation;
[0036] When calculating the gradient, only connections with a value of 1 in the sparse connection matrix U are considered, and the connection weights are... The gradient update is calculated according to the chain rule:
[0037] Where L is the loss function, only when The weight will only be updated at that time. Weight initialization and update for weights in sparse connections ,when At that time, a random initialization method is adopted, and random sampling is performed from a normal distribution with a mean of 0 and a standard deviation of 0.01. During the training process, stochastic gradient descent is used to update the weights. Each time, only the weights of the corresponding connections in the sparse connection matrix U are updated to achieve backpropagation.
[0038] The action space is a sub-region A set of real resource allocation strategies;
[0039] The global state is based on power grid state data Different dynamic weights are given to power grid state data at different time steps That is, Wherein, is a preset attenuation coefficient, is a time window, t is a time point;
[0040] The local state is a sub-area Local state Wherein is the local node feature of the sub-area is the load deviation of the sub-area is the equipment failure state of the sub-area is the equipment failure state of the sub-area is the equipment failure state of the sub-area is the equipment failure state of the sub-area
[0041] The execution confidence acquisition process is:
[0042] The confidence is calculated and obtained based on the execution success rate of the candidate execution scheme in the historical similar scene and the matching degree of the current power grid state, and the formula is:
[0043] Wherein, is the success execution ratio of the strategy in the historical similar scene, is the feature matching degree of the current power grid state and the historical scene, is the weight coefficient of the confidence, represents the execution confidence.
[0044] The power grid resource allocation system based on generative artificial intelligence comprises:
[0045] The state acquisition module: adopts a distributed data acquisition architecture to acquire power grid state data;
[0046] The strategy extraction module: based on the power grid state data, a modified conditional generative adversarial network containing a double-layer structured constraint rule layer is used to dynamically generate a real resource allocation strategy;
[0047] The execution checking module: based on the real resource allocation strategy, a preset lightweight reinforcement learning model is used to output a candidate execution scheme and the corresponding execution confidence by combining a sparse connection mechanism;
[0048] The resource allocation module: based on the candidate execution scheme and the corresponding execution confidence, a confidence threshold is preset, the candidate execution scheme higher than the confidence threshold is reserved as the optimal execution scheme, and the optimal execution scheme is decomposed into AGC instructions to realize dynamic allocation of power grid resources.
[0049] The present application has the following beneficial effects:
[0050] In the present application, first, by the innovative double-layer structured constraint rule layer, including the power balance constraint rule layer and the state of charge constraint rule layer, the power grid physical rules are directly embedded into the training process of the generative adversarial network, ensuring that the generated resource allocation strategy meets the core constraints, avoiding the common constraint violation problem in traditional methods, and greatly reducing the workload of post-processing adjustment.
[0051] Secondly, by adopting the deep deterministic policy gradient simplification architecture, removing the basic full connection layer, retaining the input layer, 1 hidden layer and output layer, and introducing the innovative sparse connection mechanism, the dimension of the sparse matrix U is 32x32, while maintaining the quality of the policy, the model parameter quantity is reduced, only processing effective connections, the inference speed is improved by 3 times, meeting the real-time scheduling requirements of the power grid.
[0052] Finally, by the confidence quantification method based on historical success rate and state matching degree, by querying the historical database and feature similarity analysis, an objective credibility score is provided for each candidate scheme, greatly reducing the scheduling risk, avoiding the waste of resources or unreasonable allocation caused by the traditional allocation method due to the inability to fully consider complex factors, so that the power grid can get accurate resource allocation, ensuring the stable supply of power. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 The method steps of the power grid resource allocation method and system based on generative artificial intelligence proposed by the present application are shown in the figure.
[0054] Figure 2 The system block diagram of the power grid resource allocation method and system based on generative artificial intelligence proposed by the present application is shown in the figure. DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0056] Embodiment one:
[0057] As shown in the figure, the power grid resource allocation method based on generative artificial intelligence proposed by the present application comprises the following steps: Figure 1 S1: Collecting power grid state data by using a distributed data acquisition architecture;
[0058] The power grid state data includes node voltage data , line flow data and grid state data ;
[0059] node voltage data The voltage data is formed by collecting the node voltage amplitude and phase angle through devices such as voltage transformers (PT) and smart meters installed at the grid nodes;
[0060] Specifically, the voltage data reflects the electrical state of the grid nodes;
[0061] line flow data The active power flow and reactive power flow on the line are obtained by using current transformers (CT) and power measurement devices;
[0062] Specifically, the line flow data can reflect the transmission of electric energy in the power grid;
[0063] grid state data The power grid state data is formed by collecting the user's power load every certain time (15 minutes) through smart meters, and simultaneously uploading the power generation of new energy and its prediction error in real time through the inverter devices of photovoltaic and wind power plants;
[0064] Specifically, due to the large volatility of new energy, its data has an important influence on the stable operation of the power grid, and the equipment state data formed by these data helps to understand the operation state of the generator in the power grid;
[0065] A distributed data collection architecture is adopted, and sensors and monitoring devices are deployed on each key node and device of the power grid. These devices transmit data to the data center through a high-speed communication network. For N nodes in the power grid, the feature vector of each node at time point t contains various data of the node, and the grid state data of the power grid at time point t is represented as: , node voltage data , line flow data and grid state data .
[0066] S2: Based on the grid state data, an improved conditional generative adversarial network containing a double-layer structured constraint rule layer is used to dynamically generate a real resource allocation strategy;
[0067] The double-layer structured constraint rule layer includes a power balance constraint rule layer and a state of charge constraint rule layer;
[0068] The framework structure of the improved conditional generative adversarial network includes a generator, a discriminator, a power balance constraint rule layer, and a state of charge constraint rule layer;
[0069] The input of the generator G is the grid state data and a random noise vector z;
[0070] The generator outputs a real resource allocation policy where M is the number of types of grid resources, is the time period of resource allocation;
[0071] The input of the discriminator D includes grid state data and a preset real resource allocation policy and the real resource allocation policy generated by the generator The output of the discriminator is a probability value for judging whether the input real resource allocation policy is real or generated, and the value range is between [0, 1];
[0072] The implementation process of the power balance constraint rule layer is:
[0073] Set a grid power balance equation: where, represents the output power of the mth conventional power source (such as a generator) at time point t, M is the number of types of grid resources, is the output power of the grid at time point t, is the total load of the grid at time point t, is the grid loss at time point t;
[0074] Specifically, the physical meaning of this equation is that at any time point, the sum of the output powers of all power sources in the grid (including conventional power sources and new energy) should be equal to the total load of the grid plus the power lost in the process of power transmission;
[0075] and the real resource allocation policy generated by the generator needs to satisfy the power balance constraint, that is: where, is the power adjustment amount of the mth conventional power source at time point t according to the generated real resource allocation policy, is the grid loss at time point t, is the output power of the grid at time point t, is the total load of the grid at time point t;
[0076] Specifically, this is because the charging and discharging power of the energy storage device needs to be within a specified range, and the state of charge (SOC) constraint needs to be considered. When the generated strategy may cause the SOC to exceed the allowed range, the charging and discharging power of the energy storage device needs to be adjusted. The power balance constraint rule layer can calculate a reasonable charging and discharging power range according to the current value and target value of the SOC, and then modify the generated strategy;
[0077] The implementation process of the state of charge constraint rule layer is:
[0078] The charge state constraint rule is defined as , and wherein, is the state of charge of the energy storage device, is the capacity of the energy storage device, is the charge-discharge efficiency of the energy storage device, is a time interval, and are the minimum and maximum values of the state of charge of the energy storage device, respectively;
[0079] The state of charge also satisfies the demand response: and wherein, is the load adjustment amount of the demand response at time point t according to the real resource allocation strategy, is the maximum load amount that can be reduced, and the demand response is mainly adjusted by reducing the power load of the user to adjust the grid resource;
[0080] For example: in a region, the maximum load amount that can be reduced is 500 kW, and if the power load of the user is reduced according to the real resource allocation strategy, the reduction amount cannot exceed 500 kW, and the reduction amount is a non-positive value;
[0081] After the framework structure of the improved conditional generative adversarial network is constructed, the improved conditional generative adversarial network is trained, and the implementation process is as follows:
[0082] The training target of the improved conditional generative adversarial network is to optimize the generator and the discriminator through a minimax game, and the improved conditional generative adversarial network is trained by setting a target function, and the implementation process is as follows:
[0083] ;
[0084] wherein, z is a random noise vector, is the probability distribution of the real resource allocation strategy , is the probability distribution of the random noise vector z, denotes the expectation of the real data real resource allocation strategy , and denotes the expectation of the random noise vector z.
[0085] In the training process, the grid state data and the corresponding real resource allocation strategy are obtained from historical data, and then the generator and the discriminator are alternately updated.
[0086] Discriminator update: maximize the target function to improve the ability to distinguish real strategies and generated strategies;
[0087] Generator update: minimize the objective function to make the generated strategy as close to the real strategy as possible;
[0088] If the generated strategy violates the constraints, a penalty term is imposed For the constraint rules of the power balance constraint rule layer and the state of charge constraint rule layer, if the constraint rule is not satisfied:
[0089] where is the penalty coefficient, M is the number of types of grid resources, and m is the index, is the new power adjustment amount of the mth conventional power source at time point t according to the generated real resource allocation strategy, is the network loss of the grid at time point t, is the output power of the grid at time point t, is the total load of the grid at time point t;
[0090] Further, from the historical data, the grid state data and the corresponding real resource allocation strategy pair are obtained, and the generator and the discriminator are updated alternately. The discriminator improves the discrimination ability by maximizing the objective function, and the generator makes the generated strategy close to the real strategy by minimizing the objective function, and satisfies the embedded constraint conditions. If the constraint is violated, a penalty term is imposed;
[0091] Strategy generation in real-time operation, the current grid state data and a random noise vector z are input into the trained generator, and the generator outputs candidate real resource allocation strategies A, which all satisfy the preset constraint conditions.
[0092] S3: Based on the real resource allocation strategy, a preset lightweight reinforcement learning model is used to output the candidate execution scheme and the corresponding execution confidence level through a preset lightweight reinforcement learning model and combined with a sparse connection mechanism.
[0093] The preset lightweight reinforcement learning model adopts a simplified architecture of deep deterministic policy gradient, removes the basic fully connected layer, retains the input layer, one hidden layer and the output layer, and introduces a sparse connection mechanism to realize the forward propagation and back propagation process.
[0094] The structure of the lightweight reinforcement learning model includes:
[0095] Based on deep deterministic policy gradient (DDPG), the redundant fully connected layer is removed, and the input layer, one hidden layer (containing 32 neurons) and the output layer are retained,
[0096] The input layer of the lightweight reinforcement learning model:
[0097] Receive candidate true resource allocation strategy A and use principal component analysis (PCA) to reduce dimensionality;
[0098] The hidden layer of the lightweight reinforcement learning model uses the ReLU activation function to achieve non-linear feature mapping;
[0099] The output layer of a lightweight reinforcement learning model directly outputs K candidate execution schemes. ;
[0100] A sparse join mechanism is introduced, and the implementation process of the sparse join mechanism is as follows:
[0101] First, create a sparse connection matrix U representing the connections between neurons, with dimensions 32×32 (because the hidden layer has 32 neurons). The elements in the matrix... Indicates whether neuron i is connected to neuron j;
[0102] Assuming all elements are initially 0, for each neuron i (i=1,2,...,32), calculate the number of neurons that need to be connected based on the sparsity p. ,in Indicates rounding down;
[0103] Randomly select from the remaining 31 neurons (excluding itself). One neuron, generated using a random function. Given three distinct random integers, for each randomly selected neuron j, connect two neurons in the matrix. and Setting both to 1 indicates that there is a connection between the two neurons. When constructing a sparse connection layer, only the connections with a value of 1 in the sparse matrix U are considered to achieve sparse connection during forward and backward propagation.
[0104] The forward and backward propagation processes of a lightweight reinforcement learning model are as follows:
[0105] Forward propagation:
[0106] For each neuron i in the hidden layer, its input The calculation method is as follows:
[0107] ,in yes The corresponding connection weights, It is the output of neuron j in the previous layer. It is the bias of neuron i;
[0108] Then, the output of neuron i is calculated using the ReLU activation function. Where F represents the ReLU activation function, This represents the input to neuron i, completing the forward propagation;
[0109] Backpropagation:
[0110] When calculating the gradient, we only consider connections with a value of 1 in the sparse connection matrix U, and for the connection weights... The gradient update is calculated according to the chain rule:
[0111] Where L is the loss function, only when The weight will only be updated at that time. Weight initialization and update for weights in sparse connections ,when At that time, a random initialization method is adopted, and random sampling is performed from a normal distribution with a mean of 0 and a standard deviation of 0.01. During the training process, stochastic gradient descent is used to update the weights. Each time, only the weights of the corresponding connections in the sparse connection matrix U are updated.
[0112] Specifically, through this sparse connection mechanism, the number of model parameters can be reduced while maintaining a certain expressive power of the model, thereby achieving model lightweighting. It may also uncover more representative power grid features, improving the model's generalization ability and training efficiency.
[0113] Define the state space and action space of a lightweight reinforcement learning model. Furthermore, the state space of a lightweight reinforcement learning model includes the global state and the local state.
[0114] The global state is based on power grid state data. Different dynamic weights are assigned to the power grid state data at different time steps. For example, data closer to the current time point has a higher weight, which can better reflect the real-time status of the power grid. The dynamic weight adopts an exponential decay form, that is:
[0115] ,in, For the preset attenuation coefficient, Let t be the time window, and t be the time point.
[0116] The local state is a sub-region. Local state ,in sub-region Local node characteristics, sub-region Load deviation, sub-region The equipment malfunction status;
[0117] The action space is: for a certain sub-region The set of real resource allocation strategies, represented as ,in, Subregion Generator power adjustment amount Subregion energy storage capacity, Subregion Demand response to grid load reduction;
[0118] A smoothing constraint is introduced into the action space to avoid drastic changes in resource adjustment. Between adjacent time steps, the variation in generator power adjustment is limited to a preset threshold ϵ, i.e.:
[0119] ,in, This indicates the generator power adjustment amount at the next time point after time point t;
[0120] Simultaneously, a reward function is designed, which includes cost rewards and security rewards. A weighted score is then applied to the cost rewards and security rewards, expressed by the following formula:
[0121] ,in, Weight of cost incentives (0 < <1), As a cost incentive, As a safety reward;
[0122] When multiple candidate policies are input into the model sequentially, the lightweight reinforcement learning model optimizes and extracts a series of candidate execution schemes for each resource allocation policy through the aforementioned forward propagation, back propagation, and sparse connection mechanisms. It outputs the execution confidence score, which is calculated based on the success rate of the candidate execution scheme in similar historical scenarios and the matching degree of the current power grid state. The formula is:
[0123] ,in, This represents the success rate of this strategy in similar historical scenarios. The feature matching degree between the current power grid status and historical scenarios, The weighting coefficients for confidence levels. Indicates the execution confidence level;
[0124] Specifically, the success rate Obtained directly by querying historical data, feature matching degree By selecting the execution plan The features of the to-be-selected execution scheme and the historical power grid scene features are matched by using a similarity measurement method, and the similarity between the features of the to-be-selected execution scheme and the historical power grid scene features, i.e., a feature matching degree, is obtained , and the value is between 0 and 1.
[0125] S4: Based on the to-be-selected execution scheme and the corresponding execution confidence, a confidence threshold is preset, the to-be-selected execution scheme higher than the confidence threshold is reserved as an optimal execution scheme, and the optimal execution scheme is decomposed into AGC instructions to realize dynamic allocation of power grid resources;
[0126] The preset execution confidence threshold , the to-be-selected execution scheme with a confidence higher than is reserved as an optimal execution scheme , if the confidence of all schemes is lower than the threshold, the S2 is returned to re-generate the resource allocation strategy;
[0127] The optimal execution scheme is decomposed into specific automatic generation control (AGC) instructions according to the power grid control area and the device type, and the AGC instructions are real-time issued to each device controller through a power dispatching communication network, and the controller adjusts the device operation state according to the instructions;
[0128] Specifically, the optimal execution scheme is decomposed into specific automatic generation control (AGC) instructions according to the power grid control area and the device type, including:
[0129] A conventional power source instruction is determined according to The power regulation amount of each generator, and the instruction format is generator number, target power and regulation time;
[0130] A storage device instruction is obtained based on a state of charge constraint rule The charge and discharge power instruction of the storage device is obtained , so that , is ensured;
[0131] A demand response instruction is generated according to The user load reduction instruction is obtained, the reduction object, reduction amount and execution period are determined, and is satisfied.
[0132] Embodiment two
[0133] As shown in Figure 2 , the power grid resource allocation system based on the generative artificial intelligence provided by the application comprises:
[0134] State acquisition module: adopt distributed data acquisition architecture to collect power grid state data;
[0135] Strategy extraction module: based on power grid state data, a modified conditional generative adversarial network containing a double-layer structured constraint rule layer is used to dynamically generate real resource allocation strategies;
[0136] Execution checking module: based on the real resource allocation strategy, a pre-set lightweight reinforcement learning model is used to output the candidate execution scheme and the corresponding execution confidence through a sparse connection mechanism;
[0137] Resource allocation module: based on the candidate execution scheme and the corresponding execution confidence, a confidence threshold is pre-set, and the candidate execution scheme higher than the confidence threshold is reserved as the optimal execution scheme. The optimal execution scheme is decomposed into AGC instructions to realize dynamic allocation of power grid resources.
[0138] In the application, several formulas involved are dimensionless values for calculation, and the establishment of the formula is obtained by software simulation of a formula of the nearest real situation by collecting a large amount of data. Some coefficients or weights in the formula are set by the person skilled in the art according to the actual situation, so no more will be described here.
[0139] The above embodiments can be realized wholly or partially by software, hardware, firmware or any other combination. When realized by software, the above embodiments can be realized wholly or partially in the form of a computer program product. Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized by hardware or software depends on the specific application and design constraints of the technical solutions.
[0140] Although the embodiments of the present application have been shown and described, those skilled in the art can understand that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and spirits of the present application, and the scope of the present application is defined by the appended claims and their equivalents.
Claims
1. A power grid resource allocation method based on generative artificial intelligence, characterized in that, Comprise: S1: adopt a distributed data acquisition architecture to collect power grid state data; S2: based on the power grid state data, a real resource allocation strategy is dynamically generated through an improved conditional generative adversarial network containing a double-layer structured constraint rule layer; The double-layer structured constraint rule layer comprises a power balance constraint rule layer and a state of charge constraint rule layer; The framework structure of the improved conditional generative adversarial network comprises a generator, a discriminator, a power balance constraint rule layer and a state of charge constraint rule layer; The improved conditional generative adversarial network obtains power grid state data from historical data in a training process and a corresponding real resource allocation strategy and then alternately update the generator and the discriminator If the generated policy violates the constraints, a penalty term is imposed For the constraint rules of the power balance constraint rule layer and the state of charge constraint rule layer, the following is not satisfied: wherein is a penalty factor, M is the number of categories of grid resources, m is an index, is the new power adjustment of the mth conventional power source at time point t according to the generated real resource allocation strategy, is the network loss of the grid at time point t, is the output power of the grid at time point t, is the total load of the grid at time point t; S3: based on the real resource allocation strategy, a preset lightweight reinforcement learning model is used to output a candidate execution scheme and a corresponding execution confidence in combination with a sparse connection mechanism; The lightweight reinforcement learning model adopts a deep deterministic policy gradient simplified architecture, removes the basic fully connected layer, retains the input layer, one hidden layer and the output layer, and introduces a sparse connection mechanism to realize forward propagation and back propagation; The process of the sparse connection mechanism is: A sparse connection matrix U representing the connection relationship of neurons is created, with a dimension of 32x32, and the elements in the matrix represent whether neuron i is connected to neuron j; Let all elements be 0 at the initial time, for each neuron i, according to the sparsity p, calculate the number of neurons that need to be connected where denotes the floor function; Randomly select one neuron from the remaining 31 neurons Use a random function to generate different random integers, for each randomly selected neuron j, set both of the two neurons in the connection matrix and to 1, indicating that there is a connection between the two neurons, and build a sparse connection layer. When performing forward propagation and back propagation, only consider the connections with a value of 1 in the connection sparse matrix U to realize sparse connection. The lightweight reinforcement learning model comprises a state space and an action space, and the state space comprises a global state and a local state; S4: based on the candidate execution scheme and the corresponding execution confidence, a confidence threshold is preset, the candidate execution scheme higher than the confidence threshold is retained as an optimal execution scheme, and the optimal execution scheme is decomposed into AGC instructions to realize dynamic allocation of power grid resources.
2. The generative artificial intelligence based power grid resource allocation method of claim 1, wherein, The power grid state data comprises node voltage data, line flow data and power grid state data.
3. The generative artificial intelligence based power grid resource allocation method of claim 1, wherein, The process of the power balance constraint rule layer is: Setting up a power balance equation for the grid: where, Pm(t) denotes the output power of the mth conventional power source at time point t, M is the number of types of grid resources, Pgrid(t) is the output power of the grid at time point t, Pload(t) is the total load of the grid at time point t, Ploss(t) is the grid loss at time point t; And the real resource allocation strategy generated by the generator , needs to meet the power balance constraint, that is: , wherein, is the power adjustment amount of the mth conventional power source at time point t according to the generated real resource allocation strategy, is the network loss of the power grid at time point t, is the output power of the power grid at time point t, is the total load of the power grid at time point t.
4. The generative artificial intelligence based power grid resource allocation method of claim 1, wherein, The process of the state of charge constraint rule layer is: The state-of-charge constraint rule is defined as , and wherein, is the state-of-charge of the energy storage device, is the capacity of the energy storage device, is the charge-discharge efficiency of the energy storage device, is the time interval, and are the minimum and maximum values of the state-of-charge of the energy storage device, respectively; Simultaneously the state of charge meets the demand response: wherein is the load adjustment amount of the demand response at the time point t according to the real resource allocation strategy, is the maximum load amount that can be cut.
5. The generative artificial intelligence based power grid resource allocation method of claim 4, wherein, The training process of the improved conditional generative adversarial network is: A target function is set to train the improved conditional generative adversarial network: ; Where z is a random noise vector, It is a real resource allocation strategy The probability distribution, It is the probability distribution of the random noise vector z. This indicates a strategy for allocating real resources to real data. Expectations This represents the expectation of the random noise vector z.
6. The generative artificial intelligence based power grid resource allocation method of claim 5, wherein, The process of realizing forward propagation and back propagation is: For each neuron i in the hidden layer, the computation of its input is given by: wherein is the corresponding connection weight, is the output of the previous layer neuron j, is the bias of neuron i; Then, the output of neuron i is calculated by a ReLU activation function where F denotes the ReLU activation function, denotes the input of neuron i, and the forward propagation is completed; When computing the gradient, only connections with value 1 in the sparse connectivity matrix U are considered, and the gradient update for the connection weight is computed according to the chain rule: where L is the loss function, and the weights are updated only when The weights are initialized and updated for the weights in the sparse connections When The random initialization method is used, which randomly samples from a normal distribution with a mean of 0 and a standard deviation of 0.01, and during the training process, the weights are updated using stochastic gradient descent, and each time the weights are updated, only the weights corresponding to the connections in the sparse connection matrix U are updated, and backpropagation is implemented. 7. The generative artificial intelligence-based power grid resource allocation method of claim 6, wherein, The action space is a sub-region A real resource allocation policy set The global state is based on grid state data Different dynamic weights are assigned to grid state data of different time steps That is, Wherein, is a preset attenuation coefficient, is a time window, and t is a time point; the local state is a local state of a sub-area of the sub-area wherein the local node feature is a local node feature of a sub-area the load deviation is a load deviation of a sub-area the device failure state is a device failure state of a sub-area the local state is a local state of a sub-area the local node feature is a local node feature of a sub-area the load deviation is a load deviation of a sub-area 8. The generative artificial intelligence based power grid resource allocation method of claim 7, wherein, The execution confidence acquisition process is: The confidence is calculated and obtained based on the execution success rate of the candidate execution scheme in the historical similar scene and the matching degree of the current power grid state, and the formula is: wherein, is the success execution ratio of the policy in the historical similar scenario, is the feature matching degree of the current grid state and the historical scenario, is the weight coefficient of the confidence level, represents the execution confidence level.
9. A power grid resource allocation system based on generative artificial intelligence, implemented according to the method of any one of claims 1-8, characterized in that, Comprise: The state acquisition module adopts a distributed data acquisition architecture to collect power grid state data; The strategy extraction module dynamically generates a real resource allocation strategy through an improved conditional generative adversarial network containing a double-layer structured constraint rule layer based on the power grid state data; The execution checking module outputs a candidate execution scheme and a corresponding execution confidence through a preset lightweight reinforcement learning model in combination with a sparse connection mechanism based on the real resource allocation strategy; The resource allocation module presets a confidence threshold based on the candidate execution scheme and the corresponding execution confidence, retains the candidate execution scheme higher than the confidence threshold as an optimal execution scheme, and decomposes the optimal execution scheme into AGC instructions to realize dynamic allocation of power grid resources.
Citation Information
Patent Citations
Micro-energy network group division method based on multi-objective optimization
CN119813276A
Multi-layer distributed micro-grid control system and method based on edge cloud collaborative lightweight reinforcement learning
CN120073869A