Resilience optimization method for new energy power system based on deep reinforcement learning

Optimizing the active power dispatch of new energy power systems through deep reinforcement learning methods solves the problem that traditional methods cannot meet the intelligence and flexibility requirements of new energy grids, achieves automated decision-making and efficient dispatch, and reduces operational risks and costs.

CN114330113BActive Publication Date: 2024-09-06BEIJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111548873.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2024-09-06
Estimated Expiration
2041-12-17

AI Technical Summary

Technical Problem

The traditional power system active power dispatching method cannot meet the intelligence and flexibility requirements of the new energy grid, and there is manual communication delay, which increases the operational risk and cost of the system.

Method used

Adopt a new energy power system elastic optimization method based on deep reinforcement learning, abstract active power dispatching into a nonlinear planning problem, design states, actions and rewards, and use the DQN algorithm to design intelligent agents to achieve automated decision-making and reduce labor costs and communication delays. .

Benefits of technology

It improves the elastic optimization capability of the power system, reduces labor costs, enhances the intelligence and adaptability of the system, achieves more efficient dispatch of new energy power systems, and reduces frequency shock and environmental pollution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114330113B
    Figure CN114330113B
Patent Text Reader

Abstract

The present invention proposes a new energy power system elasticity optimization method based on deep reinforcement learning, which can greatly reduce the labor cost incurred in the scheduling process and avoid the impact of the delay of manual communication. The deep reinforcement learning of the neural network introduced in the present invention can learn in a highly dynamic random environment through trial and error and exploration. The interactive situation enables it to have strong learning and adaptability, and is more suitable for solving the active power scheduling problem of new energy power systems with complex nonlinearities and uncertainties. Deep reinforcement learning has both the decision-making ability of reinforcement learning and the computing power of deep learning. Its application in new energy power systems will definitely change the traditional energy utilization model and make the system more intelligent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power system elasticity technology, and specifically to a new energy power system elasticity optimization method based on deep reinforcement learning. Background Art

[0002] In recent years, with the increasing penetration rate of renewable energy in the power grid, by the end of 2020, my country's installed capacity and power generation of renewable energy ranked first in the world. The large-scale access of new energy to the power grid also brings many problems. Due to the characteristics of strong randomness, obvious intermittency, and large fluctuations, this increases the difficulty of active power dispatching, peak regulation, and frequency regulation of the system and the risk of stable operation. At the same time, as the world's largest and most complex man-made dynamic system, the power system is extremely vulnerable to various extreme events such as natural disasters and man-made attacks. Therefore, it is necessary to carry out research on the elastic optimization of new energy power systems.

[0003] The resilience of the power system refers to its ability to prevent, resist, and quickly restore loads for low-probability, high-loss extreme events. When studying the resilience of the power system, we mainly focus on the maximum power supply capacity of the power grid after a disaster, so we need to optimize its active power dispatching method. The traditional power system active power dispatching adopts the principle of hierarchical management and layered dispatching, and a large amount of manpower is required to supervise and manage the dispatching process. Due to the certain delay in manual communication, it cannot meet the intelligence and flexibility requirements of the new energy power grid. Summary of the invention

[0004] In view of this, the present invention proposes a new energy power system elasticity optimization method based on deep reinforcement learning, which can greatly reduce the manpower cost incurred in the scheduling process and avoid the impact of the delay of manual communication.

[0005] To achieve the above object, the technical solution of the present invention is:

[0006] A new energy power system elasticity optimization method based on deep reinforcement learning of the present invention comprises the following steps:

[0007] Step 1, under the goal of active power dispatch of the new energy power system, the active dispatch is abstracted into a nonlinear programming problem including an objective function and constraints, and the system is frequency-regulated once for the power imbalance phenomenon occurring during the dispatch process; wherein, the goal of active power dispatch of the new energy power system is to maximize the power supply capacity of the power system without considering the power generation cost; the primary frequency regulation is the process of adjusting the power generation of the generator set through the speed governor when the system has a frequency deviation;

[0008] Step 2, according to the characteristics of the new energy elastic power system and the goal of maximizing the power supply capacity to be achieved, the state, action and reward of the system are designed; wherein the state is the environmental feature observed by the agent, which is composed of the active power of each node and the frequency of the system; the action is the decision made by the agent based on the observed state, specifically the change in the active power of the generator node; the reward function of the reward is a feedback given to the agent by the environment according to the changes it has produced after executing a certain action, and this is used as the basis for the agent to make the next decision;

[0009] Step 3: Use the DQN algorithm to design the intelligent agent in the system.

[0010] Wherein, in step 1, the objective function is: Where G represents the power system containing new energy; F(G) is the power supply capacity of the new energy power system; N g is the set of generator nodes in the renewable energy power system; P i The active contribution of the node;

[0011] The constraints are:

[0012] New energy power system node constraints:

[0013]

[0014] New energy power system line constraints:

[0015]

[0016] Among them, P i and Q i Respectively represent the active power and reactive power injected into the grid through node i; V i and V j are the voltage amplitudes of nodes i and j respectively; N is the set of all nodes in the new energy power system; θ ij is the phase angle difference between node i and node j; G ij and B ij are the real and imaginary parts of the line ij admittance respectively; P ij and Q ij are the active power and reactive power of line ij respectively;

[0017]

[0018] Among them, V i,min and V i,max are the minimum voltage amplitude and the maximum voltage amplitude of node i respectively; P i,min and Q i,minare the minimum active power and reactive power of node i respectively; P i,max and Q i,max are the maximum active power and reactive power of node i respectively; P ij,min and P ij,max are the minimum active power and maximum active power of line ij respectively.

[0019] Among them, in the step 1, the specific process of the primary frequency modulation is:

[0020] When the active power generated by the system or consumed by the load changes, the power difference ΔP is calculated first:

[0021]

[0022] Among them, N g and N l are the collections of generator nodes and load nodes in the renewable energy power system respectively;

[0023] According to the power difference, the frequency deviation Δf is:

[0024]

[0025] Among them, K G and K L are the sum of the frequency regulation coefficients of the generator and the load respectively;

[0026] The obtained frequency deviation is used to perform primary frequency modulation of the power system. After frequency modulation, the actual active power of each node is obtained as follows:

[0027]

[0028] Among them, P i and P i ′ is the active power of generator node i before and after frequency modulation; K Gi The unit regulation power of generator node i; P j and P j ′ are the active power of load node j before and after frequency modulation; K Lj Unit regulated power of generator node j.

[0029] Among them, the specific method of system state design is:

[0030] s t = {P i t , P w t , P p t , P j t ,f}

[0031] Among them, s t is the state, P i t is the actual output of the traditional thermal power generator at time t; P w t and P p t are the actual outputs of wind power generation and photovoltaic power generation at time t; P j t is the actual power consumed by the load of the new energy power system at time t; f is the system frequency.

[0032] Among them, the specific method of system action design is:

[0033] a t = {ΔP i t , ΔP w t , ΔP p t}

[0034] Among them, a t For action, ΔP i t is the change in actual output of traditional thermal power generator; ΔP w t and ΔP p t They are the changes in the actual output of wind power generation and photovoltaic power generation respectively.

[0035] The reward function of the reward is:

[0036] r t =reward1+reward2+reward3+F(G)

[0037] in,

[0038]

[0039]

[0040] a1, a2, and a3 are control parameters set according to different frequency spaces.

[0041] The DQN algorithm uses the agent to establish a Q table to store the Q values ​​of different state-action pairs, updates the Q table through trial and error, and uses it as a reference to select the optimal action; the iteration rules of the Q value are as follows:

[0042] Q(s t , a t , wt )=Q(s t , a t ,ω t )+α(r t +γmaxQ(s t+1 , a t+1 ,ω - )-Q(s t , a t ,ω t ))

[0043] Where: Q(s t , a t ,ω t ) is the evaluation network in state s t Next select action a t Q value, ω t is the network parameter of the main neural network; ω - is the network parameter of the target neural network; α is the learning rate; γ is the decay coefficient; maxQ(s t+1 , a t+1 ,ω - ) is the maximum Q value in the next state.

[0044] Among them, the predicted Q value obtained by MainNet and the actual Q value obtained by TargetNet are subtracted to construct the Loss function:

[0045] Loss(ω t )=(r t -γmaxQ(s t+1 , a t+1 ,ω - )-Q(s t , a t ,ω t )) 2

[0046] The Loss function is used to update the parameters of the neural network.

[0047] Among them, all the transfer samples (s t , a t , r t ,s t+1 ) is stored in the experience replay library; during training, sample data is randomly taken out from the memory library.

[0048] Beneficial effects:

[0049] The deep reinforcement learning of the neural network introduced in the present invention can learn in a highly dynamic random environment through trial and error and exploration. The interactive situation enables it to have strong learning and adaptability, and is more suitable for solving the active power scheduling problem of new energy power systems with complex nonlinearity and uncertainty. Deep reinforcement learning has both the decision-making ability of reinforcement learning and the computing ability of deep learning. Its application in new energy power systems will definitely change the traditional energy utilization model and make the system more intelligent.

[0050] The deep reinforcement learning method adopted by the present invention combines the advantages of deep learning and reinforcement learning, is suitable for solving nonlinear problems, and is better than the traditional active power scheduling method. This method adjusts the power generation of the generator to match the fluctuation of new energy, so as to eliminate the frequency impact brought to the power grid after the new energy is connected to the power grid, and realize the traditional secondary frequency modulation effect. In addition, in addition to meeting the economic and reliability indicators, the proposed algorithm also improves the comprehensive efficiency of energy as much as possible and reduces environmental pollution, which is of great significance. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a structural schematic diagram of the method of the present invention.

[0052] Figure 2 This is a flow chart of primary frequency regulation of the new energy power system of the present invention.

[0053] Figure 3 This is a structural block diagram of the deep reinforcement learning method DQN of the present invention. DETAILED DESCRIPTION

[0054] The present invention is described in detail below with reference to the accompanying drawings and embodiments.

[0055] In view of the problems existing in the traditional power system's use of hierarchical management and layered scheduling for active power scheduling, the present invention proposes a new energy power system elasticity optimization method based on deep reinforcement learning, and adopts an active power scheduling method based on deep reinforcement learning. This method greatly reduces the manpower cost incurred in the scheduling process and avoids the impact of the delay in manual communication.

[0056] In order to solve the above technical problems, the present invention adopts a new energy power system elasticity optimization method based on deep reinforcement learning. Figure 1 The structural diagram of the system is shown. The present invention adopts a deep reinforcement learning method. According to the deep reinforcement learning theory, the deep reinforcement learning framework includes environment, state, action, reward and agent.

[0057] The environment is the new energy power system. The intelligent agent makes decisions on active power dispatch by observing the state of the environment (including generator output, load power consumption, and power system frequency, etc.), that is, the intelligent agent takes action. This action will cause the state of the environment to change, and the environment will give the intelligent agent feedback based on this change, that is, reward. The intelligent agent will modify the action strategy based on the reward obtained, and this process can be repeated to give the optimal strategy for active power dispatch of the system.

[0058] The present invention specifically comprises the following steps:

[0059] 1) Complete the modeling of the environment: abstract active power scheduling into a nonlinear programming problem including objective functions and constraints, and perform frequency modulation on the system to address the power imbalance that occurs during the scheduling process;

[0060] 2) Design the system’s status, actions, and rewards based on the characteristics of the new energy flexible power system and the goal of achieving maximum power supply capacity;

[0061] 3) Use the DQN (Deep Q Network) algorithm to design the intelligent agent in the system.

[0062] Further, preferably, the specific method of completing the environmental modeling is:

[0063] Active power dispatch is essentially a nonlinear programming problem that includes objective functions and constraints. The establishment of the environment is the process of concretizing the objective functions and constraints, and can also make adjustments to frequency fluctuations.

[0064] (1) The objective function is that the goal of active power dispatch of the new energy power system is to maximize the power supply capacity of the power system (minimize the power generation cost) without considering the power generation cost, which can be expressed as:

[0065]

[0066] Where G represents the power system containing new energy; F(G) is the power supply capacity of the new energy power system; N g is the set of generator nodes in the renewable energy power system; P i Make active contributions to the node.

[0067] (2) Constraints:

[0068] The node constraints of the new energy power system are shown in (2):

[0069]

[0070] The line constraints of the new energy power system are shown in (3):

[0071]

[0072] Among them, P i and Q i Respectively represent the active power and reactive power injected into the grid through node i; V i and V j are the voltage amplitudes of nodes i and j respectively; N is the set of all nodes in the new energy power system; θ ij is the phase angle difference between node i and node j; G ij and B ij are the real and imaginary parts of the line ij admittance respectively; P ij and Q ij are the active power and reactive power of line ij respectively.

[0073] Inequality constraints:

[0074]

[0075] Among them, V i,min and V i,max are the minimum voltage amplitude and the maximum voltage amplitude of node i respectively; P i,min and Q i,min are the minimum active power and reactive power of node i respectively; P i,max and Q i,max are the maximum active power and reactive power of node i respectively; P ij,min and P ij,max are the minimum active power and maximum active power of line ij respectively.

[0076] When the power system operates at rated frequency, the active power generated by the generator is equal to the active power consumed by the load, and the entire system reaches a power balance state. Due to the volatility of new energy, once the output of the generator changes, the power of the system will no longer be balanced, that is, there will be a power difference, and this power difference will cause the frequency of the system to change. Primary frequency regulation is the process of adjusting the power generation of the generator set through the speed governor when the system has a frequency deviation. Figure 2 The process of primary frequency regulation of the power system is shown. When the active power generated by the system or the active power consumed by the load changes, the power difference ΔP is first calculated, as shown in (5):

[0077]

[0078] Among them, N g and N l They are respectively the collection of generator nodes and load nodes in the renewable energy power system.

[0079] According to the power difference, the frequency deviation Δf is:

[0080]

[0081] Among them, K G and K L are the sum of the frequency regulation coefficients of the generator and the load respectively.

[0082] The obtained frequency deviation is used to perform primary frequency modulation of the power system. After frequency modulation, the actual active power of each node is obtained as follows:

[0083]

[0084] Among them, P i and P i ′ is the active power of generator node i before and after frequency modulation; K Gi The unit regulation power of generator node i; P j and P j ′ are the active power of load node j before and after frequency modulation; K Lj Unit regulated power of generator node j.

[0085] Further, preferably, the specific method of designing the state, action and reward of the system is:

[0086] (1) State s t : The state is the environmental characteristics observed by the agent, which consists of the active power of each node and the frequency of the system:

[0087] s t = {P i t , P w t , P p t , P j t ,f} (8)

[0088] Among them, P i t is the actual output of the traditional thermal power generator at time t; P w t and P p t are the actual outputs of wind power generation and photovoltaic power generation at time t; P j t is the actual power consumed by the load of the new energy power system at time t; f is the system frequency.

[0089] (2) Action a t : The action is the decision made by the agent based on the observed state, specifically the change in the active power of the generator node:

[0090] a t = {ΔP i t , ΔP w t , ΔP p t} (9)

[0091] Among them, ΔP i t is the change in actual output of traditional thermal power generator; ΔP w t and ΔP p t They are the changes in the actual output of wind power generation and photovoltaic power generation respectively.

[0092] (3) Reward r t :The reward function is a kind of feedback given by the environment to the agent based on the changes in itself after performing a certain action, and it is used as the basis for the agent's next decision. Usually, the reward value given by the environment has a delayed effect. At the same time, since the reward is generated by environmental changes, the reward value is different at different times, and there may even be a large difference. This requires us to consider not only the reward at the current moment in the process of training the agent, but also from a long-term perspective, taking into account future benefits, so that the total reward value obtained during the entire training process is maximized.

[0093] Many factors need to be considered when designing the reward function. For example, after executing the action of the agent, the actual output of each generator must meet the inequality constraints of the power system. If the actual active power of the generator exceeds the limit, it means that the strategy adopted by the agent is not good and a negative reward will be obtained. Therefore, the reward function of the present invention includes four parts. The first part is the judgment of the power overload of the generator node. If the power of the generator node is overloaded, the agent will receive a negative reward n1. Otherwise, the agent will receive a positive reward p1 as shown in (10); the second part is the judgment of the line power overload. If the line power is overloaded, the agent will receive a negative reward n2. Otherwise, the agent will receive a positive reward p2 as shown in (11); the third part is the frequency offset. If the actual operating frequency of the power system deviates too much from the rated frequency, it will cause great damage to the system. Therefore, the frequency offset needs to be limited as shown in (12); under the condition of satisfying the above inequality constraints, the maximum power supply capacity of the system must be achieved. This is the fourth part of the reward function. The final reward function is shown in (13).

[0094]

[0095]

[0096]

[0097] r t =reward1+reward2+reward3+F(G) (13)

[0098] Among them, a1, a2, and a3 are control parameters set according to different frequency spaces. For the part with a larger frequency offset, a larger control parameter can be given to produce a larger negative value; for the part with a smaller frequency offset, a smaller control parameter can be given to produce a smaller negative value. This is conducive to the intelligent agent to adjust the frequency back to the expected value in time.

[0099] Further, preferably, the specific method of the intelligent agent design is:

[0100] The design of the intelligent agent adopts the DQN algorithm. Similar to the Q-Learning algorithm, the DQN algorithm also uses the intelligent agent to establish a Q table to store the Q values ​​of different state-action pairs, and updates the Q table through continuous trial and error, and uses it as a reference to select the optimal action. However, the Q value of the state-action pair in the DQN algorithm is obtained by fitting the neural network, so deep reinforcement learning can handle situations where the dimensions of the system state and action space are too high. The Q value is obtained by fitting the neural network. Since the neural network has the ability to handle complex relationships, deep reinforcement learning is often used to solve the problem of too high dimensions of the state and action space.

[0101] The iteration rules of Q value are as follows:

[0102] Q(s t , a t , w t )=Q(s t , a t ,ω t )+α(r t +γmaxQ(s t+1 , a t+1 ,ω - )-Q(s t , a t ,ω t )) (14)

[0103] Where: Q(s t , a t ,ω t ) is the evaluation network in state s t Next select action a t Q value, ω t is the network parameter of the main neural network (MainNet); ω -is the network parameter of the target neural network (TargetNet); α is the learning rate; γ is the decay coefficient; maxQ(s t+1 , a t+1 ,ω - ) is the maximum Q value in the next state.

[0104] In addition to introducing two neural networks, the DQN algorithm also introduces an experience replay mechanism and a parameter freezing mechanism to reduce the correlation between samples and improve the stability of training. Figure 3 shown.

[0105] The experience replay mechanism is to replay all the transfer samples (s t , a t , r t ,s t+1 ) is saved in the experience replay library. During training, sample data is randomly taken from the memory library to break the correlation between training samples and prevent the algorithm from falling into the local minimum.

[0106] The parameter freezing mechanism refers to the different ways in which the parameters of the two neural networks MainNet and TargetNet in the agent are updated. MainNet is used to obtain the predicted Q value of the state-action pair, so the network parameters need to be updated in real time; while TargetNet is used to obtain the maximum Q value under a certain state, so the network parameters do not need to be updated in real time. The Loss function is constructed by subtracting the predicted Q value obtained by MainNet from the actual Q value obtained by TargetNet:

[0107] Loss(ω t )=(r t -γmaxQ(s t+1 , a t+1 ,ω - )-Q(s t , a t ,ω t )) 2 (15)

[0108] The Loss function is used to update the parameters of the neural network.

[0109] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A new energy power system elasticity optimization method based on deep reinforcement learning, characterized in that: The steps include: Step 1, under the goal of active power dispatch of the new energy power system, the active dispatch is abstracted into a nonlinear programming problem including an objective function and constraints, and the system is frequency-regulated once for the power imbalance phenomenon occurring during the dispatch process; wherein, the goal of active power dispatch of the new energy power system is to maximize the power supply capacity of the power system without considering the power generation cost; the primary frequency regulation is the process of adjusting the power generation of the generator set through the speed governor when the system has a frequency deviation; Step 2, according to the characteristics of the new energy elastic power system and the goal of maximizing the power supply capacity to be achieved, the state, action and reward of the system are designed; wherein the state is the environmental feature observed by the agent, which is composed of the active power of each node and the frequency of the system; the action is the decision made by the agent based on the observed state, specifically the change in the active power of the generator node; the reward function of the reward is a feedback given to the agent by the environment according to the changes it has produced after executing a certain action, and this is used as the basis for the agent to make the next decision; Step 3: Use the DQN algorithm to design the intelligent agent in the system; In step 1, the objective function is: Where G represents the power system containing new energy; F(G) is the power supply capacity of the new energy power system; N g is the set of generator nodes in the renewable energy power system; P i The active contribution of the node; The constraints are: New energy power system node constraints: New energy power system line constraints: Among them, P i and Q i Respectively represent the active power and reactive power injected into the grid through node i; V i and V j are the voltage amplitudes of nodes i and j respectively; N is the set of all nodes in the new energy power system; θ ij is the phase angle difference between node i and node j; G ij and B ij are the real and imaginary parts of the line ij admittance respectively; P ij and Q ij are the active power and reactive power of line ij respectively; Among them, V i,min and V i,max are the minimum voltage amplitude and the maximum voltage amplitude of node i respectively; P i,min and Q i,min are the minimum active power and reactive power of node i respectively; P i,max and Q i,max are the maximum active power and reactive power of node i respectively; P ij,min and P ij,max are the minimum active power and maximum active power of line ij respectively; In step 1, the specific process of the primary frequency modulation is: When the active power generated by the system or consumed by the load changes, the power difference ΔP is calculated first: Among them, N g and N l are the collections of generator nodes and load nodes in the renewable energy power system respectively; According to the power difference, the frequency deviation Δf is: Among them, K G and K L are the sum of the frequency regulation coefficients of the generator and the load respectively; The obtained frequency deviation is used to perform primary frequency modulation of the power system. After frequency modulation, the actual active power of each node is obtained as follows: Among them, P i and P i ′ is the active power of generator node i before and after frequency modulation; K Gi The unit regulation power of generator node i; P j and P j ′ are the active power of load node j before and after frequency modulation; K Lj Unit regulation power of generator node j; The specific method of system state design is: s t ={P i t ,P w t ,P p t ,P j t ,f} Among them, s t is the state, P i t is the actual output of the traditional thermal power generator at time t; P w t and P p t are the actual outputs of wind power generation and photovoltaic power generation at time t; P j t is the actual power consumed by the load of the new energy power system at time t; f is the system frequency; The specific method of system action design is: a t ={ΔP i t ,ΔP w t ,ΔP p t } Among them, a t For action, ΔP i t is the change in actual output of traditional thermal power generator; ΔP w t and ΔP p t are the changes in actual output of wind power generation and photovoltaic power generation respectively; The reward function of the reward is: rt=reward1+reward2+reward3+F(G) in, a1, a2, and a3 are control parameters set according to different frequency spaces; The DQN algorithm uses the agent to establish a Q table to store the Q values ​​of different state-action pairs, updates the Q table through trial and error, and uses it as a reference to select the optimal action; the iteration rules of the Q value are as follows: Q(s t ,a t ,w t )=Q(s t ,a t ,w t )+α(r t +γmaxQ(s t+1 ,a t+1 Oh, oh - )-Q(s t ,a t Oh, oh t )) Where: Q(s t , a t ,ω t ) is the evaluation network in state s t Next select action a t Q value, ω t is the network parameter of the main neural network; ω - is the network parameter of the target neural network; α is the learning rate; γ is the decay coefficient; maxQ(s t+1 , a t+1 ,ω - ) is the maximum Q value in the next state.

2. The method according to claim 1, characterized in that Difference between the predicted Q value obtained by MainNet and the actual Q value obtained by TargetNet to construct the Loss function: Loss(ω t )=(r t -γmaxQ(s t+1 ,a t+1 Oh, oh - )-Q(s t ,a t Oh, oh t )) 2 The Loss function is used to update the parameters of the neural network.

3. The method according to claim 2, characterized in that All transfer samples (s t , a t , r t ,s t+1 ) is stored in the experience replay library; during training, sample data is randomly taken out from the memory library.