Control method, device and computer equipment of power grid dispatching system
Through the method of combining deep reinforcement learning and imitation learning, the expected reward value under the power grid state is calculated and the optimal strategy is selected, which solves the accuracy and real-time problems of power grid dispatch control and improves the response capability of the power system.
Patent Information
- Application Number
- CN202111253157.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-27
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-10-27
AI Technical Summary
Existing power grid dispatching control technology is difficult to ensure the accuracy of power grid dispatching, especially the lack of effective methods in system-level optimization control on the power generation side and load side, resulting in low real-time and low efficiency of power grid dispatching control, making it difficult to efficiently respond to dangerous situations.
A method combining deep reinforcement learning and imitation learning is used to calculate the expected reward values of different dispatching actions based on the observed power grid status, select the optimal strategy and execute corresponding dispatching actions, including disconnecting or reconnecting power lines and modifying the power grid topology. , to improve the accuracy and real-time performance of power grid dispatching.
It significantly improves the dispatching efficiency and real-time performance of the power grid dispatching system, ensures that the dispatching actions in each cycle are optimal, enhances the power system's ability to handle dangerous situations, and avoids electrical accidents caused by local optimality.
Smart Images

Figure CN114386650B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power grid dispatching, and in particular to a control method, device, computer equipment, storage medium and computer program product for a power grid dispatching system. Background Art
[0002] With the emergence and increasing penetration of renewable energy such as wind energy, solar energy, tidal energy, and geothermal energy, the power grid will have to solve more and more difficult problems. Most of the current power grid dispatching and control technologies and means are concentrated on the power generation side and the load side. However, for the power grid as a transmission path and carrier of electric energy, its system-level optimization control is rarely explored and applied in real life. The existing power grid dispatching and control methods are difficult to ensure the accuracy of power grid dispatching and control. Summary of the invention
[0003] Based on this, it is necessary to provide a control method, device, computer equipment, computer-readable storage medium and computer program product for a power grid dispatching system that can improve the accuracy of power grid dispatching control in order to address the above technical problems.
[0004] In a first aspect, the present application provides a control method for a power grid dispatching system. The method comprises:
[0005] Determine the state of the power grid in the current cycle according to the power grid observation data; the state is generated by the power grid dispatching system executing the dispatching action determined in the previous cycle, and at least includes the operating state of each power line in the power grid in the current cycle, the connection state between each power line, and the power flow state of each power line;
[0006] Determine the expected reward value of the current cycle according to the state of the power grid in the current cycle;
[0007] Calling one of the strategies in the strategy set according to the expected reward value of the current cycle; the strategy set includes at least one of a no-operation strategy, a random line disconnection strategy, a random node splitting strategy, and a greedy line disconnection strategy;
[0008] Execute a dispatching action corresponding to the called strategy; the dispatching action includes at least one of disconnecting a power line in the power grid, reconnecting a power line disconnected in the previous cycle, and modifying the power grid topology.
[0009] In one embodiment, the power grid observation data is the power grid operation status data detected by the power grid dispatching system, including at least the active power, reactive power and voltage values of the power equipment, the active power, reactive power and voltage values of the load, and the active power, reactive power and voltage values of the power lines.
[0010] In one embodiment, determining the expected reward value of the current cycle according to the state of the power grid in the current cycle includes:
[0011] Constructing a value function, wherein the value function is the product of a state value function and an action value function;
[0012] Based on the optimal value function, according to the state of the current cycle, determining a maximum expected reward value;
[0013] The maximum expected reward value is used as the expected reward value of the current cycle.
[0014] In one embodiment, determining the maximum expected reward value according to the state of the current cycle includes:
[0015] Each scheduling action in the action set and the state of the current cycle form a set of state-action pairs;
[0016] Input each group of state-action pairs into the optimal value function for solution, and obtain multiple expected reward values corresponding to each group of state-action pairs;
[0017] The maximum value among the multiple expected reward values is taken as the maximum expected reward value.
[0018] In one of the embodiments, the method further comprises: obtaining a state of a next cycle corresponding to the scheduling action according to the executed scheduling action;
[0019] Based on the scheduling action and the state corresponding to the next cycle, the action parameters in the value function are updated; the action parameters represent the reward value weights corresponding to different strategies.
[0020] In one embodiment, the method further comprises:
[0021] According to the state of the power grid in the previous cycle, a first state of the power grid is updated to obtain a first updated state;
[0022] Based on the injection amount input into the power grid and the first updated state, the power grid is updated to a second state to obtain a second updated state; the injection amount includes at least the active power, reactive power, and voltage value of the generator, and the active power, reactive power, and voltage value of the load;
[0023] According to the second updated state and the observation function, the power grid observation data of the current period is determined; wherein the observation function is used to indicate the correlation between the state of the power grid and the power grid observation data.
[0024] In a second aspect, the present application also provides a control device for a power grid dispatching system. The device comprises:
[0025] A determination module is used to determine the state of the power grid in the current cycle according to the power grid observation data; the state is generated by the power grid dispatching system executing the dispatching action determined in the previous cycle, and at least includes the operating state of each power line in the power grid in the current cycle, the connection state between each power line, and the power flow state of each power line;
[0026] A calculation module, used to determine the expected reward value of the current cycle according to the state of the power grid in the current cycle;
[0027] A calling module, used for calling one of the strategies in the strategy set according to the expected reward value of the current cycle; the strategy set includes at least one of a no-operation strategy, a random line disconnection strategy, a random node splitting strategy, and a greedy line disconnection strategy;
[0028] An execution module is used to execute a scheduling action corresponding to the called strategy; the scheduling action includes at least one of disconnecting a power line in the power grid, reconnecting a power line disconnected in the previous cycle, and modifying the power grid topology.
[0029] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0030] Determine the state of the power grid in the current cycle according to the power grid observation data; the state is generated by the power grid dispatching system executing the dispatching action determined in the previous cycle, and at least includes the operating state of each power line in the power grid in the current cycle, the connection state between each power line, and the power flow state of each power line;
[0031] Determine the expected reward value of the current cycle according to the state of the power grid in the current cycle;
[0032] Calling one of the strategies in the strategy set according to the expected reward value of the current cycle; the strategy set includes at least one of a no-operation strategy, a random line disconnection strategy, a random node splitting strategy, and a greedy line disconnection strategy;
[0033] Execute a dispatching action corresponding to the called strategy; the dispatching action includes at least one of disconnecting a power line in the power grid, reconnecting a power line disconnected in the previous cycle, and modifying the power grid topology.
[0034] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0035] Determine the state of the power grid in the current cycle according to the power grid observation data; the state is generated by the power grid dispatching system executing the dispatching action determined in the previous cycle, and at least includes the operating state of each power line in the power grid in the current cycle, the connection state between each power line, and the power flow state of each power line;
[0036] Determine the expected reward value of the current cycle according to the state of the power grid in the current cycle;
[0037] Calling one of the strategies in the strategy set according to the expected reward value of the current cycle; the strategy set includes at least one of a no-operation strategy, a random line disconnection strategy, a random node splitting strategy, and a greedy line disconnection strategy;
[0038] Execute a dispatching action corresponding to the called strategy; the dispatching action includes at least one of disconnecting a power line in the power grid, reconnecting a power line disconnected in the previous cycle, and modifying the power grid topology.
[0039] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0040] Determine the state of the power grid in the current cycle according to the power grid observation data; the state is generated by the power grid dispatching system executing the dispatching action determined in the previous cycle, and at least includes the operating state of each power line in the power grid in the current cycle, the connection state between each power line, and the power flow state of each power line;
[0041] Determine the expected reward value of the current cycle according to the state of the power grid in the current cycle;
[0042] Calling one of the strategies in the strategy set according to the expected reward value of the current cycle; the strategy set includes at least one of a no-operation strategy, a random line disconnection strategy, a random node splitting strategy, and a greedy line disconnection strategy;
[0043] Execute a dispatching action corresponding to the called strategy; the dispatching action includes at least one of disconnecting a power line in the power grid, reconnecting a power line disconnected in the previous cycle, and modifying the power grid topology.
[0044] The control method, device, computer equipment, storage medium and computer program product of the above-mentioned power grid dispatching system determine the state of the power grid through the observed power grid observation data, and calculate the expected reward values of different possible actions based on the state, and select a strategy and execute the corresponding dispatching action accordingly to maximize the reward value brought by the executed dispatching action, thereby ensuring that the dispatching action of the dispatching system in each cycle is optimal, and compared with the traditional reinforcement learning cumulative iteration method, it significantly improves the efficiency and real-time dispatching of the dispatching system, thereby enhancing the power system's ability to deal with dangerous situations. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A schematic diagram of the interaction principle between the dispatching system and the power grid in one embodiment;
[0046] Figure 2 A schematic diagram of a flow chart of a control method of a power grid dispatching system in one embodiment;
[0047] Figure 3 A flowchart of the steps of determining the expected reward value of the current cycle by the scheduling system in one embodiment;
[0048] Figure 4 A flowchart of the steps of determining the maximum expected reward value by a scheduling system in one embodiment;
[0049] Figure 5 A flowchart of the steps of updating the action parameters in the value function of the scheduling system in one embodiment;
[0050] Figure 6 A flowchart of steps for a dispatching system to determine power grid observation data in one embodiment;
[0051] Fig. 7A is a schematic diagram of a power grid topology structure in one embodiment;
[0052] Figure 7B is a schematic diagram of a power grid topology structure in another embodiment;
[0053] Figure 8 is a structural block diagram of a control device of a power grid dispatching system in one embodiment;
[0054] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] At present, most of the technologies and means of dispatching and controlling the power grid are concentrated on the power generation side and the load side, but there is very little research and application of the system-level optimization control of the power grid topology structure as the transmission path and carrier of electric energy. In the past, the traditional optimization calculation method was extremely difficult to solve the real-time performance of the program and it was also difficult to ensure the accuracy of the program.
[0057] In view of this, the embodiments of the present application provide a control method, device, computer equipment, storage medium and computer program product for a power grid dispatching system, which combine deep reinforcement learning and imitation learning to implement dispatching control of the dispatching system in the power grid and enhance the power system's ability to deal with dangerous situations.
[0058] In recent years, deep learning (DL) has been widely used in power system problems. Deep learning is a branch of machine learning, which can be simply understood as a neural network with multiple hidden layers. It approximates any complex function by learning a deep nonlinear network structure and represents the distributed representation of data. Compared with traditional machine learning methods, deep learning focuses on the automatic learning of the deep structure and features of the network. It usually has 5, 10, or even hundreds of layers. The deeper layers enable it to have a stronger ability to automatically extract data features from a large number of samples. With the deepening of research and the drive of various practical application needs, more complex hybrid network structure models are constantly being proposed, such as deep reinforcement learning (DRL) formed by combining deep learning with traditional reinforcement learning.
[0059] Reinforcement Learning (RL) is between supervised learning and unsupervised learning, because after the learner takes an action, he will not be told which action is the best. Instead, the environment gives the action a feedback information, which can be used to guide the next action. When applied in the power grid scenario, the dispatching system interacts with the power grid environment repeatedly and eventually learns a better strategy. By executing the strategy, it performs the corresponding dispatching actions to obtain the maximum return (reward value). Figure 1 As shown, after the dispatching system takes action A, the power grid feeds back a reward R and a state S to the dispatching system. The reward R and the state S are used to guide the action A of the next cycle, and the process is repeated.
[0060] Among them, reinforcement learning can usually be described by a Markov decision process. The Markov decision process can be described by a tuple <S, A, P, R, γ>, where S is a finite state set, A is a finite action set, P is a state transition probability matrix, S` is an iterated finite state set, R is a reward function, and γ is a discount factor, usually 0≤γ≤1.
[0061] Among them, the state transition probability matrix is used to represent the probability from state s to state s', which can be expressed by the following formula:
[0062]
[0063] Wherein, t represents a period, and the unit is, for example, seconds, minutes, or hours. t Represents the state at cycle t.
[0064] Among them, the reward function can be expressed by the following formula:
[0065]
[0066] Among them, α t is the action parameter at period t.
[0067] Therefore, the corresponding strategy Π(α|s) at a given state s can be expressed by the following formula:
[0068] Π(α|s)=P[α t =α|s t =s]
[0069] Considering that in the actual power grid, the dispatching system cannot obtain the actual state data of the entire power grid, a partially observable Markov decision process is used to describe the reinforcement learning used. Formally, the partially observable Markov decision process can be represented by an array <S, A, O, P, R, Z, γ>, where O is a set of continuous observation data, Z is the observation function, and the remaining array elements are similar to the above, which will not be repeated here.
[0070] Among them, the observation function is used to indicate the state of the power grid s t With power grid observation data t For example, the state s at period t and the observed data of state s (i.e., o t ) can be expressed by the following formula:
[0071] o t = Z(s t )
[0072] The main bottleneck of reinforcement learning is that the rewards provided by the power grid environment are delayed, making it difficult for the power grid dispatching system to infer the optimal decision at each step. Therefore, in many cases, the power grid dispatching system cannot efficiently learn the optimal strategy. At the same time, the dispatching system is easy to fall into the local optimal situation when applied, which is likely to cause electrical accidents for the power grid.
[0073] Therefore, in order to improve efficiency and accuracy, the traditional Markov decision process is improved in the embodiment of the present application, and imitation learning can provide a direct reference for the decision-making of each step, thereby alleviating the problem of reward delay. Specifically, by combining reinforcement learning with simulation learning, the strategy corresponding to the maximum reward value is selected and the corresponding action is executed in each cycle t, thereby improving efficiency and ensuring that the scheduling action of the scheduling system in each cycle t is optimal.
[0074] Among them, the state value function v Π (s) and action value function q Π (s,α) can be expressed by the following formula:
[0075] v Π (s)=E[G t |s t =s]
[0076] q Π (s,α)=E[G t |s t =s,α t =α]
[0077] Among them, G t represents the cumulative reward value starting from cycle t, G after iteration k t It can be expressed by the following formula:
[0078]
[0079] Based on the above improvements, in one embodiment, Figure 2 As shown, a control method for a power grid dispatching system is provided. This embodiment uses the method applied to the power grid dispatching system as an example for illustration. It can be understood that the method can also be applied to other control devices / systems in the power grid, such as a power generation control system. In this embodiment, the method includes the following steps:
[0080] Step S202, based on the grid observation data, determine the state of the grid in the current cycle; the state is generated by the grid dispatching system executing the dispatching action determined in the previous cycle, and at least includes the operating state of each power line in the grid in the current cycle, the connection state between each power line, and the flow state of each power line.
[0081] Among them, the power grid observation data is the power grid operation status data detected by the power grid dispatching system. In one embodiment, the power grid observation data includes, but is not limited to, one or more of the active power, reactive power and voltage value of the power equipment, the active power, reactive power and voltage value of the load, and the active power, reactive power and voltage value of the power line. Correspondingly, the state of the power grid refers to the power grid operation state. In one embodiment, the state of the power grid includes, but is not limited to, one or more of the operation state of each power line in the power grid, the connection state between each power line, and the flow state of each power line. The state of the power grid in the current cycle is generated by the power grid dispatching system executing the dispatching action determined in the previous cycle.
[0082] The dispatching action refers to the change operation performed by the dispatching system on the power grid topology, including but not limited to one or more of disconnecting the power lines in the power grid, reconnecting the power lines disconnected in the previous cycle, and modifying the power grid topology.
[0083] For example, in the power grid, the line service status at period t is It can be expressed by the following formula:
[0084]
[0085] Among them, the previously observed line service status The relationship with the line service status is as follows:
[0086]
[0087] Specifically, the power grid dispatching system detects the operating state of the power grid and obtains power grid observation data. The power grid observation data describes part of the operating state of the power grid in the current cycle. Based on the obtained power grid observation data, the power grid dispatching system can estimate the state of the power grid in the current cycle.
[0088] Step S204, determining the expected reward value of the current cycle according to the state of the power grid in the current cycle.
[0089] The power grid dispatching system uses the value function to evaluate the possible reward value of each option, so as to execute a certain option to obtain as much reward as possible. In other words, the power grid dispatching system expects the size of the reward value to measure whether to perform a certain action.
[0090] The expected reward value is the sum of four sub-rewards, including a line usage sub-reward, a load reduction sub-reward, an action cost sub-reward, and a reference grid distance sub-reward.
[0091] Among them, the line usage sub-reward is used to constrain the dispatching actions performed by the power grid dispatching system to avoid line overflow. A major aspect of power grid operation is to deliver electricity so that each consumption has the expected active and reactive values. If a load is cut, it means that some people cannot use electricity for a certain period of time. This involves the load reduction sub-reward, which is used to constrain the dispatching actions performed by the power grid dispatching system not to cause the load to be cut. The action cost sub-reward is used to constrain the dispatching actions performed by the power grid dispatching system to be the cost of deactivating the line or changing the topology (line interconnection mode). Generally, the value of this sub-reward is equal to the cost of a dispatching action multiplied by the number of disconnections plus the number of reconnections and the number of topology changes. In order to avoid potential electrical accidents and make the actual power grid topology close to the reference power grid topology in the ideal state, the reference grid distance sub-reward calculates the distance from the power grid to the reference grid by summing the number of local topology changes.
[0092] Specifically, the power grid dispatching system determines the reward values of all possible next actions based on the state of the current cycle obtained, and determines the expected reward value of the current cycle from them, so as to determine the dispatching action to be performed next.
[0093] In some embodiments, Figure 3 As shown, the steps of the power grid dispatching system determining the expected reward value of the current cycle according to the state of the power grid in the current cycle include:
[0094] Step S302, constructing an optimal value function; wherein the optimal value function is the product of the optimal state value function and the optimal action value function.
[0095] Step S304: Based on the optimal value function and the state of the current cycle, determine the maximum expected reward value.
[0096] Specifically, the power grid dispatching system determines a value function to determine the possible reward value under a certain state. Based on the improved partially observable Markov decision model, the application proposes an action parameter to measure the corresponding reward value weights when different strategies (corresponding to different actions) are adopted. Initially, the action parameter is used to represent the initial reward value corresponding to each strategy.
[0097] At the same time, due to the combination of simulation learning, in each cycle, the power grid dispatching system will tend to select the strategy corresponding to the maximum reward value and perform the corresponding action. Therefore, further, the dispatching system can calculate the maximum expected reward value with the optimal value function. The optimal state value function v*(s) and the optimal action value function q*(s, a) are defined as the maximum values of the state value function and the action value function on the strategy, that is:
[0098]
[0099] Among them, the larger the action value function q*(s, a), the better, and the value is 1 when it is optimal.
[0100] The power grid dispatching system uses the optimal value function to calculate the maximum expected reward value based on the current cycle state. The maximum expected reward value is the expected reward value of the current cycle. The power grid dispatching system can determine the corresponding strategy based on the expected reward value of the current cycle.
[0101] In the above embodiment, the maximum expected reward value is determined by the optimal value function, and the corresponding strategy and the corresponding scheduling action are determined accordingly. Reinforcement learning is combined with simulation learning, so that the scheduling actions of the scheduling system in each cycle are optimal. Compared with the slow iterative process of traditional reinforcement learning, the scheduling efficiency is improved, and the real-time decision-making of the scheduling system for sudden accidents is improved.
[0102] In some embodiments, Figure 4 As shown, the steps of determining the maximum expected reward value according to the state of the current cycle by the power grid dispatching system include:
[0103] Step S402: Each scheduled action in the action set and the state of the current cycle are combined into a state-action pair.
[0104] Step S404: input each group of state-action pairs into the optimal value function for solution to obtain a plurality of expected reward values corresponding to each group of state-action pairs.
[0105] Step S406: taking the maximum value among the multiple expected reward values as the maximum expected reward value.
[0106] Specifically, under the state of the current cycle, the power grid dispatching system can determine multiple dispatching actions that can be taken, and the multiple dispatching actions constitute an action set. For example, for state s, the power grid dispatching system can execute dispatching action a1: disconnect the line, dispatching action a2: reconnect the disconnected line, and dispatching action a3: add a new line, etc., and the action set is {a1, a2, a3}. The power grid dispatching system forms a set of state-action pairs with each dispatching action in the action set and the state of the current cycle, namely {s, a1}, {s, a2}, {s, a3}. The power grid dispatching system inputs each group of state-action pairs into the optimal value function for solution, and obtains multiple expected reward values r1, r2, and r3 corresponding to each group of state-action pairs. Among the multiple expected reward values, the maximum value is selected as the maximum expected reward value.
[0107] In the above embodiment, the maximum expected reward value is determined by the optimal value function, and the corresponding strategy and the corresponding scheduling action are determined accordingly. Reinforcement learning is combined with simulation learning, so that the scheduling actions of the scheduling system in each cycle are optimal. Compared with the slow iterative process of traditional reinforcement learning, the scheduling efficiency is improved, and the real-time decision-making of the scheduling system for sudden accidents is improved.
[0108] Step S206, calling one of the strategies in the strategy set according to the expected reward value of the current cycle; the strategy set includes at least one of the no-operation strategy, the random line disconnection strategy, the random node splitting strategy, and the greedy line disconnection strategy.
[0109] Among them, each strategy constitutes a strategy set, and the strategy set includes at least one of the no-operation strategy, random line disconnection strategy, random node splitting strategy, and greedy line disconnection strategy. Among them, the no-operation strategy means that the power grid dispatching system does not take any action. The random line disconnection strategy means that the power grid dispatching system randomly selects a branch to disconnect and reconnect the previously disconnected line. The random node splitting strategy means that the power grid dispatching system selects a substation in each cycle and randomly changes its local topology. The greedy line disconnection strategy (also known as the ε-greedy line disconnection strategy) means that in each cycle, the power grid dispatching system simulates the disconnection of each single line and executes the dispatching action corresponding to the maximum expected reward value.
[0110] The power grid dispatching system performs different dispatching actions by adopting different strategies. After the maximum expected reward value is determined, the power grid dispatching system adopts the corresponding strategy to perform the corresponding dispatching action to obtain the maximum expected reward value. Specifically, the power grid dispatching system selects the strategy corresponding to the expected reward value from the strategy set according to the expected reward value of the current cycle and calls it.
[0111] Step S208, executing a scheduling action corresponding to the called strategy; the scheduling action includes at least one of disconnecting a power line in the power grid, reconnecting a power line disconnected in the previous cycle, and modifying the power grid topology.
[0112] Specifically, after determining the called strategy, the power grid dispatching system implements the strategy, thereby executing the dispatching action corresponding to the strategy to obtain the maximum expected reward value.
[0113] In the control method of the above-mentioned power grid dispatching system, the state of the power grid is determined by observing the power grid observation data, and the expected reward values of different possible actions are calculated based on the state. A strategy is selected and the corresponding dispatching action is executed accordingly to maximize the reward value brought by the executed dispatching action, thereby ensuring that the dispatching action of the dispatching system in each cycle is optimal. Compared with the traditional reinforcement learning cumulative iteration method, the efficiency and real-time dispatching of the dispatching system are significantly improved, thereby enhancing the power system's ability to deal with dangerous situations.
[0114] In some embodiments, Figure 5 As shown, the method also includes:
[0115] Step S502, according to the executed scheduling action, obtaining the state of the next cycle corresponding to the scheduling action;
[0116] Step S504, based on the scheduling action and the state corresponding to the next cycle, the action parameters in the value function are updated; the action parameters represent the reward value weights corresponding to different strategies.
[0117] After the power grid dispatch system executes the dispatch action corresponding to the called strategy, the power grid also changes its state accordingly, and the dispatch system obtains the corresponding state of the next cycle. In each cycle, after the power grid dispatch system executes a dispatch action, the corresponding state and subsequent optional actions also change immediately. At this time, the value function needs to be updated in order to accurately calculate the expected reward value of each cycle.
[0118] Specifically, the dispatching action executed by the dispatching system and the state of the power grid in the next cycle after executing the dispatching action update the action parameters in the value function to change the weight of the reward value corresponding to each strategy (corresponding to each new action).
[0119] In the above embodiment, by updating the action parameters in the value function, after the power grid dispatching system executes the dispatching action in each cycle, the reward value of the subsequent new action of the updated state of the power grid changes accordingly, making the dispatching of the power grid dispatching system more accurate.
[0120] In an actual power grid, the status of each power device and power line may change at any time. For example, a power line may be added in the middle of a cycle. The change in the state of the power grid is called the injection of the power grid. Accordingly, in the calculation of the dispatching system, the injection amount in the power grid includes but is not limited to one or more of the active power, reactive power, and voltage value of the generator, the active power, reactive power, and voltage value of the load, etc. When the power grid inputs the injection amount, in some embodiments, such as Figure 5 As shown, the method also includes:
[0121] Step S602: performing a first state update on the power grid according to the state of the power grid in the previous cycle to obtain a first updated state.
[0122] Step S604, based on the injection amount input into the power grid and the first updated state, the power grid is updated to a second state to obtain a second updated state; the injection amount includes at least the active power, reactive power, and voltage value of the generator, and the active power, reactive power, and voltage value of the load.
[0123] Step S606, determining the power grid observation data of the current period according to the second updated state and the observation function; wherein the observation function is used to indicate the correlation between the state of the power grid and the power grid observation data.
[0124] Specifically, taking the period from the previous cycle t to the current cycle t+1 as an example, the power grid dispatching system updates the first state of the power grid according to the state of the power grid in the previous cycle by adopting corresponding strategies and executing corresponding dispatching actions, and obtains the first updated state of the power grid. Then, when the power grid is currently in the first updated state, the power grid is updated to the second state based on the injection amount input into the power grid, and the second updated state of the power grid is obtained. According to the second updated state and the observation function, the dispatching system can determine the power grid observation data of the current cycle. As mentioned above, the observation function is used to indicate the correlation between the state of the power grid and the power grid observation data. Its specific formula can refer to the aforementioned embodiment and will not be repeated here.
[0125] For example, the calculation is decomposed by taking the half-time period t+0.5 and two state transfer functions P1 and P2 as an example. First, the power grid dispatching system obtains new power grid observation data o t , and execute the corresponding scheduling action α by adopting a strategy t =Π(o t ). Then, the power grid performs a first state update to obtain a first updated state s of the power grid. t+0.5 =P1(s t ,α t ). At the period t+0.5, the grid inputs an injection amount x t+1 , thus, the power grid performs a second state update and obtains the second updated state s t+1 =P2(s t+0.5 ,x t+1 ). Then, according to the observation function, the dispatching system can obtain the power grid observation data of the current cycle t+1. t+1 .
[0126] In the above embodiment, by performing status updates twice, the real-time volatility of the power grid is fully considered, so that the power grid dispatching system can perform corresponding dispatching actions in real time with higher accuracy and real-time performance.
[0127] In a specific example, Fig. 7A The power grid shown in the figure has 5 generators, 11 loads, and 20 lines for a 14-node system. The thermal limit threshold of each branch is set to 100MW. Because there are also node splitting and merging operations, one action corresponds to a 76-bit binary number. That is: 5 generators + 11 loads + 20 line start ends + 20 line ends + 20 lines = 76 bits.
[0128] Between time t0 and time t1, consumption 9 increases by 60 MW. Generator G1 increases by the same amount to produce sufficient electrical energy. Fig. 7A The initial state is shown in , which is the first state of the power grid observed by the dispatch system when doing nothing.
[0129] For step A, the “do nothing” strategy will not output any action in time period 0. At this time, there is no power overflow, so there is no cascading failure simulation, so the load reduction sub-reward, r load cut = 0. Assuming that the initial grid is the reference grid, then the sub-reward r of the distance to the reference grid is distance to ref = 0. No operation is performed, so the operation cost is equal to 0. Finally, the line usage sub-reward r is calculated line usage for:
[0130]
[0131] After the dispatch system does not perform any operation, the power grid updates the state s from s0 0.5 ; The generated power flow state and Fig. 7A The initial state is the same as in . Given s 0.5 The associated reward with a0, r0 is -1.107.
[0132] Observe the grid o1, inject x1, and then calculate the load flow. At this time, since o1 contains an overflowed row, the dispatch system should find an operation that should be used to fix the overflow, otherwise this situation may cause a global outage. The reward calculated in period t is:
[0133] r0=r load cut +r distance to ref +r action cost +r line usage
[0134] r0=-3.795
[0135] The grid returns the previous reward to the dispatch system and then calculates the state s1 of the environment.
[0136] When the power grid encounters a cascading failure, such as Figure 7B As shown, in order to calculate the hidden state s 1.5 , the grid will perform a cascading fault simulation, which consists of the continuous and repeated closing of overflow lines (dashed lines in the figure), and the calculation of new load flows. The first line cascade simulation is initialized; the second line top line is deactivated, resulting in 3 more overflow lines after the power flow calculation; the third line new overflow line is deactivated, resulting in a global outage. In this case, the reward r1 returned by the grid is equal to the value of the sub-reward associated with the load shedding.
[0137] Due to the existence of various circuit breakers and switches, the network topology of the power system is very dynamic and real-time. When the basic network original topology is generated, the state of the network may change at any time. If the topology is regenerated every time it changes, it will cause a great burden on the system, making the system structure bloated and with poor real-time performance. By using deep reinforcement learning combined with simulation learning methods, network topology optimization is used as an effective measure to eliminate thermal limit and voltage over-limit problems in the power system. That is, by disconnecting a specific transmission line or a group of specific transmission lines, the system can reach a new stable operating point, the power flow of the overloaded line is partially transferred to the adjacent transmission line, and the voltage of each bus can also be improved.
[0138] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0139] Based on the same inventive concept, the embodiment of the present application also provides a control device of a power grid dispatching system for implementing the control method of the power grid dispatching system involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the control device of one or more power grid dispatching systems provided below can refer to the limitations of the control method of the power grid dispatching system above, and will not be repeated here.
[0140] In one embodiment, Figure 8 As shown, a control device 800 of a power grid dispatching system is provided, comprising: a determination module 801, a calculation module 802, a calling module 803, and an execution module 804, wherein:
[0141] Determination module 801 is used to determine the state of the power grid in the current cycle based on the power grid observation data; the state is generated by the power grid dispatching system executing the dispatching action determined in the previous cycle, and at least includes the operating state of each power line in the power grid in the current cycle, the connection state between each power line, and the flow state of each power line.
[0142] The calculation module 802 is used to determine the expected reward value of the current cycle according to the state of the power grid in the current cycle.
[0143] The calling module 803 is used to call one of the strategies in the strategy set according to the expected reward value of the current cycle; the strategy set includes at least one of the no-operation strategy, the random line disconnection strategy, the random node segmentation strategy, and the greedy line disconnection strategy.
[0144] The execution module 804 is used to determine the scheduling action that the power grid scheduling system is expected to execute in the next cycle; the scheduling action includes at least one of disconnecting the power lines in the power grid, reconnecting the power lines disconnected in the previous cycle, and modifying the power grid topology.
[0145] In one embodiment, the power grid observation data is the power grid operation status data detected by the power grid dispatching system, including at least the active power, reactive power and voltage values of the power equipment, the active power, reactive power and voltage values of the load, and the active power, reactive power and voltage values of the power lines.
[0146] In one embodiment, the calculation module is also used to construct an optimal value function; wherein the optimal value function is the product of an optimal state value function and an optimal action value function; based on the optimal value function, according to the state of the current cycle, the maximum expected reward value is determined; and the maximum expected reward value is used as the expected reward value of the current cycle.
[0147] In one of the embodiments, the calculation module is also used to form a state-action pair with each scheduled action in the action set and the state of the current cycle; each group of state-action pairs is input into the optimal value function for solution to obtain multiple expected reward values corresponding to each group of state-action pairs; and the maximum value of the multiple expected reward values is used as the maximum expected reward value.
[0148] In one embodiment, the above-mentioned device also includes an update module, which is used to obtain the state of the next cycle corresponding to the scheduling action according to the executed scheduling action; based on the scheduling action and the state corresponding to the next cycle, update the action parameters in the value function; the action parameters represent the reward value weights corresponding to different strategies.
[0149] In one embodiment, the above-mentioned device also includes an acquisition module, which is used to update the first state of the power grid according to the state of the power grid in the previous cycle to obtain a first updated state; based on the injection amount input into the power grid and the first updated state, update the second state of the power grid to obtain a second updated state; the injection amount at least includes the active power, reactive power, and voltage value of the generator, and the active power, reactive power, and voltage value of the load; according to the second updated state and the observation function, determine the power grid observation data of the current cycle; wherein the observation function is used to indicate the correlation between the state of the power grid and the power grid observation data.
[0150] Each module in the control device of the above-mentioned power grid dispatching system can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0151] In one embodiment, a computer device is provided. The computer device may be the power grid dispatching system in the aforementioned embodiment. Its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a control method for a power grid dispatching system is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0152] Those skilled in the art will understand that Fig. 9The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0153] In one embodiment, a computer device is provided, such as the power grid dispatching system in the aforementioned embodiment. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program: determining the state of the power grid in the current cycle according to the power grid observation data; the state is generated by the power grid dispatching system executing the dispatching action determined in the previous cycle, and at least includes the operating state of each power line in the power grid in the current cycle, the connection state between each power line, and the flow state of each power line; determining the expected reward value of the current cycle according to the state of the power grid in the current cycle; calling one of the strategies in the strategy set according to the expected reward value of the current cycle; the strategy set includes at least one of the no-operation strategy, the random line disconnection strategy, the random node splitting strategy, and the greedy line disconnection strategy; executing the dispatching action corresponding to the called strategy; the dispatching action includes at least one of disconnecting the power line in the power grid, reconnecting the power line disconnected in the previous cycle, and modifying the power grid topology.
[0154] In one embodiment, when the processor executes the computer program, the following steps are also implemented: constructing an optimal value function; wherein the optimal value function is the product of an optimal state value function and an optimal action value function; based on the optimal value function, determining a maximum expected reward value according to the state of the current cycle; and using the maximum expected reward value as the expected reward value of the current cycle.
[0155] In one embodiment, when the processor executes the computer program, the following steps are also implemented: each scheduled action in the action set is combined with the state of the current cycle to form a state-action pair; each group of state-action pairs is input into the optimal value function for solution to obtain multiple expected reward values corresponding to each group of state-action pairs; the maximum value of the multiple expected reward values is used as the maximum expected reward value.
[0156] In one embodiment, when the processor executes the computer program, the following steps are also implemented: according to the executed scheduling action, the state of the next cycle corresponding to the scheduling action is obtained; based on the scheduling action and the state corresponding to the next cycle, the action parameters in the value function are updated; the action parameters represent the reward value weights corresponding to different strategies.
[0157] In one embodiment, when the processor executes the computer program, it also implements the following steps: based on the state of the power grid in the previous cycle, updating the first state of the power grid to obtain a first updated state; based on the injection amount input into the power grid and the first updated state, updating the second state of the power grid to obtain a second updated state; the injection amount includes at least the active power, reactive power, and voltage value of the generator, and the active power, reactive power, and voltage value of the load; based on the second updated state and the observation function, determining the power grid observation data of the current cycle; wherein the observation function is used to indicate the correlation between the state of the power grid and the power grid observation data.
[0158] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: determining the state of the power grid in the current cycle based on power grid observation data; the state is generated by the power grid dispatching system executing the dispatching action determined in the previous cycle, and at least includes the operating state of each power line in the power grid in the current cycle, the connection state between each power line, and the flow state of each power line; determining the expected reward value of the current cycle based on the state of the power grid in the current cycle; calling one of the strategies in the strategy set based on the expected reward value of the current cycle; the strategy set includes at least one of a no-operation strategy, a random line disconnection strategy, a random node splitting strategy, and a greedy line disconnection strategy; executing the dispatching action corresponding to the called strategy; the dispatching action includes at least one of disconnecting the power lines in the power grid, reconnecting the power lines disconnected in the previous cycle, and modifying the power grid topology.
[0159] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: constructing an optimal value function; wherein the optimal value function is the product of an optimal state value function and an optimal action value function; based on the optimal value function, determining a maximum expected reward value according to the state of the current cycle; and using the maximum expected reward value as the expected reward value of the current cycle.
[0160] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: each scheduled action in the action set is combined with the state of the current cycle to form a state-action pair; each group of state-action pairs is input into the optimal value function for solution to obtain multiple expected reward values corresponding to each group of state-action pairs; the maximum value of the multiple expected reward values is used as the maximum expected reward value.
[0161] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the scheduling action executed, the state of the next cycle corresponding to the scheduling action is obtained; based on the scheduling action and the state corresponding to the next cycle, the action parameters in the value function are updated; the action parameters represent the reward value weights corresponding to different strategies.
[0162] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the state of the power grid in the previous cycle, a first state of the power grid is updated to obtain a first updated state; based on the injection amount input into the power grid and the first updated state, a second state of the power grid is updated to obtain a second updated state; the injection amount includes at least the active power, reactive power, and voltage value of the generator, and the active power, reactive power, and voltage value of the load; based on the second updated state and the observation function, the power grid observation data of the current cycle is determined; wherein the observation function is used to indicate the correlation between the state of the power grid and the power grid observation data.
[0163] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0164] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0165] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0166] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A control method for a power grid dispatching system, characterized in that: The method comprises: Determine the state of the power grid in the current cycle according to the power grid observation data; the state is generated by the power grid dispatching system executing the dispatching action determined in the previous cycle, and at least includes the operating state of each power line in the power grid in the current cycle, the connection state between each power line, and the power flow state of each power line; Determine the expected reward value of the current cycle according to the state of the power grid in the current cycle; Calling one of the strategies in the strategy set according to the expected reward value of the current cycle; the strategy set includes at least one of a no-operation strategy, a random line disconnection strategy, a random node splitting strategy, and a greedy line disconnection strategy; Executing a dispatching action corresponding to the called strategy; the dispatching action includes at least one of disconnecting a power line in the power grid, reconnecting a power line disconnected in the previous cycle, and modifying the power grid topology; Wherein, determining the expected reward value of the current cycle according to the state of the power grid in the current cycle includes: Constructing an optimal value function; wherein the optimal value function is the product of an optimal state value function and an optimal action value function; Based on the optimal value function, according to the state of the current cycle, determining a maximum expected reward value; Taking the maximum expected reward value as the expected reward value of the current cycle; Determining the maximum expected reward value according to the state of the current cycle includes: Each scheduling action in the action set and the state of the current cycle form a set of state-action pairs; Input each group of state-action pairs into the optimal value function for solution, and obtain multiple expected reward values corresponding to each group of state-action pairs; The maximum value among multiple expected reward values is taken as the maximum expected reward value; Among them, the optimal state value function is defined as the strategic maximum of the state value function, and the optimal action value function is defined as the strategic maximum of the action value function; State value function v ∏ (s) and action value function q ∏ (s, α) is expressed by the following formula: v Π (s)=E[G t |s t =s] q Π (s,α)=E[G t |s t =s,a t =a] Among them, G t represents the cumulative reward value starting from cycle t, G after iteration k t It can be expressed by the following formula: Among them, s t represents the state at cycle t, α t is the action parameter at cycle t, R is a reward function, γ is a discount factor, 0≤γ≤1.
2. The method according to claim 1, characterized in that The power grid observation data is the power grid operation status data detected by the power grid dispatching system, including at least the active power, reactive power and voltage values of the power equipment, the active power, reactive power and voltage values of the load, and the active power, reactive power and voltage values of the power lines.
3. The method according to claim 1, characterized in that The method further comprises: According to the executed scheduling action, a state of the next cycle corresponding to the scheduling action is obtained; Based on the scheduling action and the state corresponding to the next cycle, the action parameters in the value function are updated; the action parameters represent the reward value weights corresponding to different strategies.
4. The method according to claim 1, characterized in that: The method further comprises: According to the state of the power grid in the previous cycle, a first state of the power grid is updated to obtain a first updated state; Based on the injection amount input into the power grid and the first updated state, the power grid is updated to a second state to obtain a second updated state; the injection amount includes at least the active power, reactive power, and voltage value of the generator, and the active power, reactive power, and voltage value of the load; According to the second updated state and the observation function, the power grid observation data of the current period is determined; wherein the observation function is used to indicate the correlation between the state of the power grid and the power grid observation data.
5. A control device for a power grid dispatching system, characterized in that: The device comprises: A determination module is used to determine the state of the power grid in the current cycle according to the power grid observation data; the state is generated by the power grid dispatching system executing the dispatching action determined in the previous cycle, and at least includes the operating state of each power line in the power grid in the current cycle, the connection state between each power line, and the power flow state of each power line; A calculation module is used to determine the expected reward value of the current cycle according to the state of the power grid in the current cycle; the calculation module is also used to construct an optimal value function; wherein the optimal value function is the product of the optimal state value function and the optimal action value function; based on the optimal value function, according to the state of the current cycle, the maximum expected reward value is determined; the maximum expected reward value is used as the expected reward value of the current cycle; the calculation module is also used to form a group of state-action pairs with each scheduling action in the action set and the state of the current cycle; each group of state-action pairs is input into the optimal value function for solution, and a plurality of expected reward values corresponding to each group of state-action pairs are obtained; the maximum value of the multiple expected reward values is used as the maximum expected reward value; A calling module, used for calling one of the strategies in the strategy set according to the expected reward value of the current cycle; the strategy set includes at least one of a no-operation strategy, a random line disconnection strategy, a random node splitting strategy, and a greedy line disconnection strategy; An execution module, used to determine a dispatching action that the power grid dispatching system is expected to execute in the next cycle; the dispatching action includes at least one of disconnecting a power line in the power grid, reconnecting a power line disconnected in the previous cycle, and modifying the power grid topology; Among them, the optimal state value function is defined as the strategic maximum of the state value function, and the optimal action value function is defined as the strategic maximum of the action value function; State value function v ∏ (s) and action value function q Π (s, α) is expressed by the following formula: v Π (s)=E[G t |s t =s] q Π (s,α)=E[G t |s t =s,a t =a] Among them, G t represents the cumulative reward value starting from cycle t, G after iteration k t It can be expressed by the following formula: Among them, S t represents the state at cycle t, α t is the action parameter at cycle t, R is a reward function, γ is a discount factor, 0≤γ≤1.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Power grid topology optimization method for minimizing network loss
CN110854850A
Power grid emergency control method based on expert system and deep reverse reinforcement learning
CN111179121A
Power distribution network voltage regulation method based on deep reinforcement learning algorithm
CN111884213A
Power grid equipment power failure maintenance scheme making method, system, equipment and storage medium
CN113537646A
Power trading management system, management device, method of power trading, and computer program for power trading
JP2011022902A
