A method for safe and economical power dispatch based on multi-agent reinforcement learning
Through the multi-agent leniency reinforcement learning method, combined with reputation value detection and leniency reinforcement learning, the problems of network attacks and uncertain costs in distributed economic dispatch are solved, the safe economic dispatch and cost control of the power system are realized, and the system's security is enhanced. Flexibility and attack resistance.
Patent Information
- Application Number
- CN202210043886.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-14
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-01-14
AI Technical Summary
Existing distributed economic dispatch algorithms fail to effectively consider uncertainties caused by cyber attacks and renewable energy power generation equipment, resulting in grid security and cost control problems.
Using a method based on multi-agent leniency reinforcement learning, by constructing a multi-agent system, using Q estimation network and R estimation network for collaborative decision-making, combined with reputation value detection and leniency reinforcement learning, the processing of network attacks and uncertain costs is achieved.
It improves the safe and economic dispatching capabilities of the power system under network attacks and uncertain interference, enhances flexibility and generalization capabilities, effectively reduces costs, and achieves isolation from network attacks.
Smart Images

Figure CN114386331B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of economic dispatch of power systems, and in particular relates to a method for safe economic dispatch of power based on multi-agent wide reinforcement learning. Background Art
[0002] In recent years, with the development and application of deep reinforcement learning, researchers have conducted detailed studies on economic dispatch problems based on deep reinforcement learning. For example: Patent document 1 (CN201810999580.8) proposes a safe economic dispatch optimization method that takes into account the elastic space of transmission operation, converts the economic dispatch model of the power system into a typical multi-stage sequential decision-making model, and realizes dynamic economic dispatch of the power system in any scenario. Patent document 2 (CN202010812190.2) discloses a microgrid energy dispatch method based on deep reinforcement learning of a dual Q-value network, and designs a reward function to guide the strategy to achieve the goal of microgrid operation. However, the above research does not involve distributed economic dispatch.
[0003] As the scale of power grids continues to expand, distributed economic dispatch has received widespread attention. Distributed systems are more vulnerable to cyber attacks, and most existing distributed economic dispatch algorithms ignore these potential cyber attacks, which may have a great impact on the security of the power grid. In addition, due to the use of renewable energy generation equipment and network interference, there are usually uncertainties in the cost function, and existing planning algorithms and gradient-based algorithms will not be able to solve these uncertainties. Therefore, the problem of secure economic dispatch considering cyber attacks and uncertain interference faces new challenges and is a problem that needs to be solved. Summary of the invention
[0004] In view of the shortcomings of the existing technology, the present invention proposes a power safety and economic dispatch method based on multi-agent large-scale reinforcement learning, and provides a feasible energy management and economic dispatch solution for distributed power generating units under network attacks and uncertain interference, filling the gap in the existing distributed safety and economic dispatch method under network attacks.
[0005] For a group G of N generating units, its distributed economic dispatch problem can be described as the following constrained optimization problem:
[0006]
[0007]
[0008]
[0009] Among them, C is the total power generation cost, C i is the power generation cost of unit i, P iis the power generation capacity of unit i, D is the total power demand in the environment, P i , are the lower and upper limits of power generation of unit i respectively. The power generation cost C of unit i i The cost function is usually described as a quadratic function as follows:
[0010]
[0011] where a i 、b i 、c i is the cost coefficient of unit i. When considering renewable energy generation equipment and network interference, it is necessary to introduce uncertain terms into the cost function, so the cost function should be rewritten as:
[0012]
[0013] Where N is the uncertainty term that follows Gaussian distribution and σ is the distribution parameter.
[0014] The power security economic dispatch method based on multi-agent reinforcement learning builds a multi-agent system according to the power consumption environment. Taking the power demand in the environment as the state, the output power of the generator set is optimized through multi-agent reinforcement learning, and the distributed economic dispatch problem is constructed as a cooperative decision-making problem solved by multi-agent reinforcement learning. Multiple agents collaborate through communication modules and jointly calculate the consistency results. The specific steps include:
[0015] Step 1: Initialize the number of iterations of multi-agent reinforcement learning and the parameters of the Q estimation network and the R estimation network, and set the probability ∈=1 of the greedy algorithm.
[0016] Step 2: At the current time t, observe the power demand D in the environment i,t , using average consistency, the agent obtains information about the total power demand of the network:
[0017]
[0018] Where k is the number of iterations, ε is the step size, and D i [k] is the electricity demand of agent i in the kth iteration, a ij,t is the communication weight between agent i and agent j, and is the element of the adjacency matrix of the multi-agent network. i is the set of all agents that send information to agent i. The average power demand is
[0019] Step 3: To solve the network security problem of the multi-agent system, detection is performed on DoS attacks and FDI (false data injection) attacks.
[0020] The DoS attack model is:
[0021] λ i =φ
[0022] Among them, λ i represents the data sent by agent i, and φ represents an empty set. The detection criterion of DoS attack is set to d = φ.
[0023] The FDI attack model is:
[0024] λ i =x i +δ i
[0025] Among them, x i represents the real data, δ i Represents false data. Using the linear distance d as the criterion, the detection criterion of FDI attack is set as Where ΔC i =C i (P i,t )-C i (P i,t-1 ), η FDI is the judgment threshold of FDI attack.
[0026] The reputation value of each agent is calculated to determine the network security status. The reputation value is defined as follows:
[0027]
[0028] RV ij,t is the reputation value of agent j monitored by agent i at time t.
[0029] The communication weights between agents are adjusted by reputation value to achieve attack isolation:
[0030]
[0031] As a preference, the FDI attack judgment threshold η FDI =0.3, and the initial reputation value is set to 100.
[0032] Step 4: To achieve convergence of learning results, a single agent makes independent decisions based on the greedy algorithm, randomly selects output power under probability ∈, and selects the output power with the largest Q value under probability 1-∈. The probability ∈ will decrease with the number of training times, so that the algorithm converges to the optimal strategy.
[0033] Step 5: Multiple agents collaborate to solve the output power combination that meets the power demand and calculate the deviation between the output power and the average power demand. Use average consensus to get the average deviation between multiple agents According to the average deviation e i,t Adjust the output power:
[0034]
[0035] Step 6: Perform action a according to the output power adjusted in step 5 i,t , and observe the environment to obtain the reward r of environmental feedback i,t+1 , the electricity demand at the next time D i,t+1 And whether the training is finished t The state-action value is evaluated through the Q table to determine how to perform the output power to obtain a larger cumulative reward.
[0036] The current electricity demand D i,t and reward r i,t+1 Input R into the estimation network, fit the reward, and get r′ i,t+1 Using average consistency The obtained evaluation reward is used as the joint reward of multiple agents, denoted as
[0037] Step 7: In order to eliminate the correlation between training data, the training tuple of agent i is i,t ,a i,t ,r i,t+1 ,s i,t+1 >Store in the experience pool step by step. Repeat steps 2 to 6 multiple times, randomly draw samples from the experience pool, and update the Q table, Q estimation network, and R estimation network;
[0038] The Q estimation network is used to fit the Q table. A neural network is used to fit the Q table to realize reinforcement learning in a continuous state space. The training loss function of the Q estimation network is:
[0039]
[0040] in, Estimate the network fitting parameters for Q, s i,t For electricity demand D i,t The corresponding environmental state, y i For training labels:
[0041]
[0042] Use joint rewards Update Q table:
[0043]
[0044] Among them, β is the learning rate, γ is the decay coefficient, and max a Q(.,.) is the maximum value based on a.
[0045] The R estimation network is the core of the wide reinforcement learning, which is used to give the immediate reward r for the uncertainty term in the cost function. i,t The uncertainty brought by the reward distribution is eliminated by using a neural network to fit the reward distribution. The training loss function of the R estimation network is:
[0046]
[0047] in, Estimate network fitting parameters for R.
[0048] Step 8. Update the probability ∈ in the greedy algorithm:
[0049]
[0050] Step 9: Observe the power demand in the environment. When the power demand changes, update the optimal output plan and return to step 2; when the power demand does not change, go to step 3; when there is no power demand in the environment, end.
[0051] The present invention has the following beneficial effects:
[0052] 1. Compared with the existing economic dispatch algorithm, this method solves the total power generation demand and joint rewards through multi-agent reinforcement learning and collaboration, improving flexibility and generalization ability.
[0053] 2. Combining lenient reinforcement learning with a security isolation scheme based on reputation value, the problem of safe and economic dispatch of power systems in the event of network attacks or uncertain costs caused by interference is solved, making up for the shortcomings of existing methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 This is the overall architecture diagram of the safe and economic scheduling method based on lenient reinforcement learning;
[0055] Figure 2 It is a flowchart of a method for safe and economic dispatch of electric power based on multi-agent reinforcement learning;
[0056] Figure 3 is a multi-agent network topology diagram and unit parameters in the embodiment;
[0057] Figure 4It is the result of the power generation cost changing with the number of training times in Example 1;
[0058] Figure 5 It is the result of the power generation cost changing with the number of training times in Example 2;
[0059] Figure 6 This is the result of the No. 5 unit in Example 2 changing with the number of training times. DETAILED DESCRIPTION
[0060] The present invention will be further explained below with reference to the accompanying drawings;
[0061] Figure 1 This is the overall architecture diagram of the safe and economic scheduling method based on large-scale reinforcement learning, which specifically includes the environment, multi-agent network, and multiple collaborative agents.
[0062] The environment includes all parts except the agent and exists naturally. This method constructs the distributed economic dispatch problem into a cooperative decision-making problem that can be solved by multi-agent reinforcement learning by integrating the variables of the environment. The distributed economic dispatch problem exists in the environment, the action of reinforcement learning is the output power of the generator set, the state is the electricity demand in the environment, and the immediate reward is related to the power generation cost that can be calculated by the environment.
[0063] The agent is in the environment and can observe and obtain its status, make decisions and perform corresponding actions based on it, optimize its strategy through rewards fed back by the environment, and find the optimal output power.
[0064] The agent deploys a safe economic dispatch method based on lenient reinforcement learning. When in the environment, it can observe and obtain the state of the environment, make decisions and perform corresponding actions based on the information obtained, and evaluate the value of its state-action through the Q table to determine which action can obtain a greater cumulative reward. The agent improves its decision-making ability through the Q estimation network, R estimation network and experience pool to find the optimal output power.
[0065] The Q estimation network is used to fit the Q table. Using a neural network to fit the Q table can realize reinforcement learning in a continuous state space, which is also the basis for the generalization ability of the present invention. The R estimation network is the core of the wide reinforcement learning, which is used to give an immediate reward r for the uncertainty term in the cost function. i To eliminate the uncertainty caused by the training data, a neural network is used to fit the reward distribution. The experience pool is used to eliminate the correlation between training data and stores the single-step training tuples of the agent. Each Q-table update is a random batch training from the experience pool.
[0066] The communication of the multi-agent network is realized through the multi-agent communication module. By receiving and sending messages to its neighboring agents, the entire multi-agent system can reach consistency on the required variables for solving the total power generation demand and joint rewards.
[0067] The network security detection module is used to solve the network security problems of multi-agent systems, and detects and isolates DoS attacks and FDI attacks based on the reputation method.
[0068] The multi-agent network is a network composed of multiple agents configured with the present method, and the initial communication topology is given.
[0069] like Figure 2 As shown in FIG, the power security economic dispatch method based on multi-agent wide reinforcement learning specifically includes the following steps:
[0070] Step (1): Observe the environment and obtain observation tuples, and multiple agents collaborate to solve the total power demand;
[0071] Step (2): Detect network attacks and perform security isolation;
[0072] Step (3): Make independent decisions to obtain power generation output;
[0073] Step (4): Multiple agents collaborate to solve the output combination that meets the electricity demand;
[0074] Step (5): Execute the action and obtain the reward, and evaluate the state-action value;
[0075] Step (6): When a certain number of training times is reached, samples are extracted from the experience pool and the Q estimation network and the R estimation network are updated;
[0076] Step (7): Update the greedy algorithm exploration and development balance;
[0077] Step (8): Determine whether the power demand has changed. If so, update the optimal output plan and go to step (1). If not, return to step (2).
[0078] Step (9): Output the result.
[0079] According to the above steps, intelligent agents are deployed to carry out safe and economical power dispatch.
[0080] Example 1
[0081] like Figure 3 As shown, this embodiment is a 4-unit system, which is set to have no unit attacked by the network. According to this method, the power security and economic dispatch is carried out. The results of the power generation cost changes with the training when the total power demand is 800MW are as follows Figure 4,According to the training results, it can be seen that this method can effectively solve the ,distributed economic scheduling problem.
[0082] Example 2
[0083] This example is a 5-unit system, where the parameters of units 1 to 4 are the same as those of Example 1, and unit 5 is set to be randomly attacked by the network. Under the condition that the total power demand is 800MW, this method and the prior art are used to perform safe and economic power dispatch, and the results of power generation cost changes with training are shown in Figure 1. Figure 5 As shown in the figure, the credibility of Unit 5 changes with training. Figure 6 As shown in the figure. The training results show that this method can effectively deal with cyber attacks and can effectively reduce costs when solving distributed economic scheduling problems. When Unit 5 is attacked, this method can reduce its credibility and achieve attack isolation, thereby dealing with cyber attacks.
Claims
1. A method for safe and economic dispatch of electric power based on multi-agent reinforcement learning, characterized by: Considering a generator set as an agent, a multi-agent system is constructed according to the power consumption environment. The power demand in the environment is taken as the state and the output power of the generator set is taken as the decision variable. The distributed economic dispatch problem is constructed as a cooperative decision-making problem solved by multi-agent reinforcement learning. The agent observes the environment at each time step t and uses the average consensus algorithm to calculate the power demand D of the environment through the multi-agent network. i,t As state i,t ; Detect network attacks based on the information sent by neighboring agents, calculate the reputation value of each agent, and adjust the communication weight a according to the reputation value ij , isolate the attacked agent; Then each agent according to the state s i,t , make a decision under the action of the greedy algorithm and execute action a i,t Output power P i,t , get the reward r of environmental feedback i,t+1 , evaluate the value of state-action through Q table; use R estimation network to fit and get r′ i,t+1 ; Then use the average consistency algorithm to find the joint reward of multiple agents The single-step training primitives are stored in the experience pool. After multiple agents are trained multiple times, samples are randomly drawn from the training pool, and the Q estimation network, R estimation network and Q table are trained and updated to output the optimal scheduling plan.
2. The method for safe and economic dispatch of electric power based on multi-agent wide reinforcement learning as claimed in claim 1, characterized in that: For a group G of N generating units, the distributed economic dispatch problem is described as: Among them, C is the total power generation cost, C i is the power generation cost of unit i, P i is the power generation capacity of unit i, D is the total power demand in the environment, P i , are the lower and upper limits of power generation of unit i respectively; the power generation cost C of unit i i The cost function is usually described as a quadratic function as follows: where a i 、b i 、c i is the cost coefficient of unit i; when considering renewable energy generation equipment and network interference, it is necessary to introduce uncertain terms into the cost function, so the cost function should be rewritten as: Where N is the uncertainty term that follows Gaussian distribution and σ is the distribution parameter.
3. The method for safe and economic dispatch of electric power based on multi-agent wide reinforcement learning as claimed in claim 1 or 2, characterized in that: The specific steps include: Step 1: Initialize the number of iterations of multi-agent reinforcement learning and the parameters of the Q estimation network and the R estimation network, and set the probability of the greedy algorithm ∈ = 1; Step 2: At the current time t, observe the power demand D in the environment i,t , using average consistency, the agent obtains information about the total power demand of the network: Where k is the number of iterations, ε is the step size, and D i [k] is the electricity demand of agent i in the kth iteration, a ij,t is the communication weight between agent i and agent j; G i is the set of all agents that send information to agent i; The average power demand is Step 3: Perform attack detection and then calculate the reputation value of each agent: RV ij,t is the reputation value of agent i monitoring agent j at time t; Adjust the communication weights between agents to achieve attack isolation: Step 4: The agent randomly selects the output power with probability ∈ according to the greedy algorithm, and selects the output power with the maximum Q value with probability 1-∈; Step 5: Multiple agents collaborate to solve the output power combination that meets the power demand and calculate the deviation between the output power and the average power demand. Use average consensus to get the average deviation between multiple agents According to the average deviation e i,t Adjust the output power: Step 6: Perform action a according to the output power adjusted in step 5 i,t , get the reward r of environmental feedback i,t+1 , the electricity demand at the next time D i,t+1 ; Evaluate the state-action price through the Q table; Fit the reward through the R estimation network to get r′ i,t+1 ; Use average consistency Calculating the joint reward of multiple agents Step 7: Train the agent i tuple i,t , a i,t , r i,t+1 ,s i,t+1 >Store in the experience pool step by step; repeat steps 2 to 6 multiple times, randomly extract samples from the experience pool, and update the Q table, Q estimation network and R estimation network; Step 8. Update the probability ∈ in the greedy algorithm: Step 9, observe the power demand in the environment; when the power demand changes, update the optimal output plan and return to step 2; when the power demand does not change, go to step 3; when there is no power demand in the environment, end.
4. The method for safe and economic dispatch of electric power based on multi-agent wide reinforcement learning as claimed in claim 3, characterized in that: Set the initial reputation value of the agent to 100.
5. The method for safe and economic dispatch of electric power based on multi-agent wide reinforcement learning as claimed in claim 3, characterized in that: Step 3: Detect DoS attacks and FDI attacks. The DoS attack model is: l i =φ Among them, λ i represents the data sent by agent i; the detection criterion of DoS attack is set to d = φ, where d is the linear distance and φ represents the empty set; The FDI attack model is: l i =x i +d i Among them, x i represents the real data, δ i Indicates false data; Set the detection criteria for FDI attacks to Where ΔC i =C i (P i,t )-C i (P i,t-1 ), η FDI is the judgment threshold of FDI attack.
6. The method for safe and economic dispatch of electric power based on multi-agent wide reinforcement learning as claimed in claim 5, characterized in that: Set the judgment threshold η of FDI attack FDI =0.
3.
7. The method for safe and economic dispatch of electric power based on multi-agent wide reinforcement learning as claimed in claim 1 or 2, characterized in that: The Q estimation network is used to fit the Q table to achieve reinforcement learning in continuous state space, and the training loss function is: in, Estimate the network fitting parameters for Q, s i,t For electricity demand D i,t The corresponding environmental state, y i For training labels: Use joint rewards Update Q table: Among them, β is the learning rate and γ is the decay coefficient; The R estimation network is used to fit the reward distribution, and the training loss function is: in, Estimate network fitting parameters for R.
Citation Information
Patent Citations
Power grid N-1 safety economic dispatching and optimizing method taking transmission operation flexible space into consideration
CN109327025A
Microgrid energy scheduling method based on double-Q-value network deep reinforcement learning
CN112117760A
Multi-agent-based renewable energy island-containing microgrid coordination control method
CN110474319A
Power grid multi-section power automatic control method based on distributed multi-agent reinforcement learning
CN112615379A
Autonomous Voltage Control for Power System Using Deep Reinforcement Learning Considering N-1 Contingency
US20200119556A1
