Distributed power supply scheduling method, device, equipment and medium based on reinforcement learning

Through the distributed power dispatching method based on reinforcement learning, DQN and DDPN networks are used to regulate power nodes, which solves the challenges of distributed energy operation to the stability of the distribution network and achieves the supply and demand balance and stability of the power grid system.

CN118281958BActive Publication Date: 2024-09-24NINGBO YONGYAO POWER INVESTMENT CORP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410669339.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-09-24
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

The randomness and volatility of the operation of distributed energy resources have caused great pressure and risks in the operation control of the distribution network. How to ensure the stability of the distribution network while meeting the power needs of users is a difficult problem.

Method used

A distributed power supply dispatching method based on reinforcement learning is adopted to collect status information of power grid system nodes and use the upper-layer DQN network and lower-layer DDPN network to output scheduling decisions respectively to achieve precise adjustment of the power supply nodes to be adjusted and ensure the balance and stability of supply and demand.

Benefits of technology

It realizes real-time dispatching of distributed power sources, reduces the amount of calculation, ensures the supply and demand balance and stability of the power grid system, avoids the adjustment of the output power of all power nodes, and reduces the computational complexity of distributed power dispatch.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118281958B
    Figure CN118281958B
Patent Text Reader

Abstract

The present invention relates to the technical field of power scheduling, and in particular to a distributed power scheduling method, device, equipment and medium based on reinforcement learning. The method includes: taking the state information of all nodes as the global state; subtracting the global state of the previous adjacent moment from the global state of the current moment to obtain the global state change at the current moment, and inputting the upper-level reinforcement learning model to output the upper-level decision result, thereby locating the power node to be adjusted; for the power node to be adjusted, taking the state information of all nodes connected to the power node to be adjusted as the local state; calculating the local state change at the current moment, and inputting the lower-level reinforcement learning model to output the lower-level decision result, and adjusting the output power of the power node to be adjusted based on the lower-level decision result. The technical solution of the present application can ensure the stability of the distribution network while achieving supply and demand balance, and realize the precise scheduling of distributed power sources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention is applicable to the technical field of power supply scheduling, and in particular relates to a distributed power supply scheduling method, device, equipment and medium based on reinforcement learning. Background Art

[0002] With the continuous development of new energy technologies, distributed energy distribution represented by wind power and photovoltaics has developed rapidly, and its proportion in the distribution system has gradually increased. Distributed energy integrates the output power into the power grid system through the corresponding grid-connected nodes to meet the electricity demand of users; however, in the process of integrating the output power into the power grid system, the randomness and volatility of distributed energy operation have brought tremendous pressure and risks to the operation and control of the distribution network, making the scheduling of distributed energy a difficult problem.

[0003] Therefore, in the process of dispatching distributed energy, how to ensure the stability of the distribution network while meeting the electricity demand of users is an urgent problem to be solved. Summary of the invention

[0004] In view of this, the embodiments of the present invention provide a distributed power supply scheduling method, device, equipment and medium based on reinforcement learning, which can realize accurate scheduling of distributed power supplies to ensure the stability of the distribution network while achieving supply and demand balance.

[0005] In a first aspect, a distributed power scheduling method based on reinforcement learning is provided, which includes: collecting state information of all nodes of a power grid system as a global state of the power grid system, the state information including node type and node parameters, the node type including load node and power node, the node parameters including load value of load node and output power of power node; subtracting the global state at the previous adjacent moment from the global state at the current moment to obtain the global state change at the current moment; inputting the global state change into an upper-layer reinforcement learning model to output an upper-layer decision result, the upper-layer decision result including a power node to be adjusted that needs to be scheduled; for a power node to be adjusted, all nodes connected to the power node to be adjusted are taken as target nodes, and the state information of the target node is taken as the local state of the power node to be adjusted; calculating the local state change at the current moment, and inputting it into a lower-layer reinforcement learning model to output a lower-layer decision result, adjusting the output power of the power node to be adjusted based on the lower-layer decision result, and realizing the scheduling of distributed power; wherein the upper-layer reinforcement learning model is a DQN network, and the lower-layer reinforcement learning model is a DDPN network.

[0006] In a second aspect, a distributed power dispatching device based on reinforcement learning is provided, and the distributed power dispatching device includes: a global state acquisition module, which is used to collect state information of all nodes of the power grid system as the global state of the power grid system, the state information includes node type and node parameters, the node type includes load node and power node, and the node parameters include load value of load node and output power of power node; a difference module, which is used to subtract the global state of the previous adjacent moment from the global state of the current moment to obtain the global state change at the current moment; an upper-level reinforcement learning module, which is used to input the global state change into the upper-level reinforcement learning model to output the upper-level decision result. The upper-layer decision result includes the power nodes to be adjusted that need to be scheduled among all the power nodes; the local state acquisition module is used for taking all nodes connected to the power node to be adjusted as target nodes for a power node to be adjusted, and taking the state information of the target node as the local state of the power node to be adjusted; the lower-layer reinforcement learning module calculates the local state change at the current moment, and inputs it into the lower-layer reinforcement learning model to output the lower-layer decision result, and adjusts the output power of the power node to be adjusted based on the lower-layer decision result to realize the scheduling of distributed power sources; wherein the upper-layer reinforcement learning model is a DQN network, and the lower-layer reinforcement learning model is a DDPN network.

[0007] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the first aspect is implemented when the processor executes the computer program.

[0008] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, a distributed power supply scheduling method based on reinforcement learning as in the first aspect is implemented.

[0009] In a fifth aspect, an embodiment of the present invention provides a computer program product. When the computer program product is run on a computer device, the computer device executes a distributed power supply scheduling method based on reinforcement learning according to the first aspect.

[0010] Compared with the prior art, the present invention has the following beneficial effects:

[0011] According to the global state change of the global state of the power grid system at the current moment; the upper reinforcement learning model outputs the upper decision result in the discrete action space according to the global state change, and the power node to be adjusted can be determined among all power nodes; the lower reinforcement learning model outputs the lower decision result in the continuous action space according to the local state change of the power node to be adjusted at the current moment, so as to accurately determine the output power of the power node to be adjusted after adjustment; avoiding adjusting the output power of all power nodes, reducing the amount of calculation, and realizing real-time scheduling of distributed power sources.

[0012] Furthermore, the upper-level reinforcement learning model can accurately locate the power supply node to be adjusted according to the global state change at the current moment; and the upper-level reinforcement learning model will be updated in real time during the distributed power supply scheduling process. The actual upper-level reward value in the updating process can represent the degree of supply and demand balance in the power grid system after executing the upper-level decision results. The actual upper-level reward value is involved in the updating of the upper-level reinforcement learning model to ensure that the upper-level decision results output by the upper-level reinforcement learning model can achieve supply and demand balance in the power grid system.

[0013] Furthermore, the lower-layer reinforcement learning model can accurately output the adjusted output power of any power node to be adjusted based on the local state change of the power node to be adjusted at the current moment; and the lower-layer reinforcement learning model will be updated in real time during the distributed power scheduling process. The actual lower-layer reward value in the updating process can characterize the stability of the power node to be adjusted after the lower-layer decision result is executed on the power node to be adjusted. The actual lower-layer reward value is involved in the updating of the lower-layer reinforcement learning model to ensure that the upper-layer reinforcement learning model can accurately output the adjusted output power of each power node to be adjusted, thereby ensuring the stability of the power grid system. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the prior art description are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative labor.

[0015] Figure 1 This is a schematic diagram of an application environment of a distributed power scheduling method based on reinforcement learning provided in Embodiment 1 of the present invention;

[0016] Figure 2 It is a flow chart of a distributed power scheduling method based on reinforcement learning provided in the first embodiment of the present invention;

[0017] Figure 3It is a flowchart of a method for updating an upper layer reinforcement learning model provided in the second embodiment of the present invention;

[0018] Figure 4 It is a flowchart of a method for updating a lower layer reinforcement learning model provided in Embodiment 6 of the present invention;

[0019] Figure 5 It is a structural block diagram of a distributed power dispatching device based on reinforcement learning provided in Embodiment 8 of the present invention;

[0020] Figure 6 It is a structural diagram of a computer device provided in Embodiment 9 of the present invention. DETAILED DESCRIPTION

[0021] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0022] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0023] It should also be understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0024] As used in the present specification and the appended claims, the term "if" can be interpreted as "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0025] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0026] References to "one embodiment" or "some embodiments" etc. described in the present specification mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0027] The embodiments of the present invention can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0028] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0029] It should be understood that the order of execution of the steps in the following embodiments does not imply a precedence of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0030] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.

[0031] A distributed power scheduling method based on reinforcement learning provided in the first embodiment of the present invention can be applied in the following aspects: Figure 1 In the application environment, the distribution network system contains multiple nodes, which can be divided into load nodes and power nodes. The power nodes include distributed photovoltaic power, distributed wind power, distributed thermal power and other distributed power sources. The output power of the distributed power source is incorporated into the power grid system through the corresponding power node. Due to the different number of users and electricity usage habits in the distribution network system, the load value of the load node will change continuously. In order to meet the user's demand for power resources, the output power of all power nodes needs to be scheduled and adjusted.

[0032] See also Figure 2, is a flow chart of a distributed power scheduling method based on reinforcement learning provided in Embodiment 1 of the present invention. The distributed power scheduling method may include the following steps:

[0033] S101, collecting status information of all nodes in the power grid system as the global status of the power grid system, the status information includes node type and node parameters, the node type includes load node and power node, the node parameters include load value of load node and output power of power node.

[0034] Among them, the power grid system can be regarded as a topological structure composed of multiple nodes and transmission lines between nodes. According to the role of the nodes in the power grid system, the nodes are divided into two types: load nodes and power nodes. The load nodes correspond to the power demand in the power grid system, and the power nodes correspond to the distributed power sources in the power grid system. The global state of the power grid system can be constructed based on the status information of all nodes in the power grid system.

[0035] Specifically, for a node, the node type and the node parameters of the node are obtained as the status information of the node, wherein, in response to the node type of the node being a load node, the node parameter is the load value of the node, which is used to characterize the demand of the load node for power resources; in response to the node type of the node being a power node, the node parameter is the output power of the node, which is used to characterize the ability of the power node to provide power resources for the power grid system; the status information of all nodes in the power grid system is obtained according to the same method, and the status information of all nodes is spliced ​​together to obtain the global status of the power grid system.

[0036] S102, subtract the global state at the previous adjacent moment from the global state at the current moment to obtain the global state change at the current moment.

[0037] Among them, the global state of the power grid system at the current moment and the global state of the power grid system at the previous adjacent moment are collected; the global state at the current moment is subtracted from the global state at the previous adjacent moment to obtain the global state change at the current moment. The global state change can reflect the change in the demand for power resources of each load node in the power grid system and the change in the ability of each power node to provide power resources.

[0038] S103, inputting the global state change amount into the upper-layer reinforcement learning model to output an upper-layer decision result, where the upper-layer decision result includes the power supply nodes to be adjusted that need to be scheduled among all the power supply nodes.

[0039] Among them, the upper-level reinforcement learning model is a DQN network, and the upper-level decision result U output by it is a 01 vector in the discrete action space, which is used to determine which power nodes need to have their output power scheduled, and the power nodes that need to be scheduled are used as the power nodes to be adjusted.

[0040] Specifically, for load nodes with changing load values, it is necessary to schedule the power supply nodes connected to the load nodes so that the output power of the power supply nodes can meet the load node's demand for power resources. Let the number of all power supply nodes in the power grid system be M, then the upper-level decision result is a vector of 1 row and M columns; wherein the value of the first column corresponds to the first power supply node; in response to the value of the first column being 0, the first power supply node does not need to be scheduled, and in response to the value of the first column being 1, the first power supply node is the power supply node to be adjusted. All power supply nodes corresponding to the value 1 in the upper-level decision result are regarded as the power supply nodes to be adjusted.

[0041] S104: for a power source node to be adjusted, all nodes connected to the power source node to be adjusted are taken as target nodes, and state information of the target nodes is taken as a local state of the power source node to be adjusted.

[0042] Among them, due to the large number of power supply nodes, in order to reduce the amount of calculation and realize the real-time scheduling of distributed power sources, only the power supply nodes to be adjusted need to be scheduled. For a power supply node to be adjusted, its corresponding target nodes include load nodes and power supply nodes. By splicing the status information of all target nodes together, the local status of the power supply node to be adjusted can be obtained.

[0043] S105, calculate the local state change at the current moment, and input it into the lower-level reinforcement learning model to output the lower-level decision result, adjust the output power of the power supply node to be adjusted based on the lower-level decision result, and realize the scheduling of distributed power supply.

[0044] Among them, the local state of the power supply node to be adjusted at the current moment is subtracted from the local state of the power supply node to be adjusted at the previous adjacent moment to obtain the local state change at the current moment; the local state change can reflect the change in the demand for power resources of each load node in the target node, and the change in the ability of each power supply node to provide power resources.

[0045] Among them, the lower-level reinforcement learning model is the DDPN network, and its output upper-level decision results It is the specific value of the output power in the continuous action space, which is used to control the actual output power of the power node to be adjusted to the output power in the upper decision result. The output power of each power node to be adjusted is adjusted in the same way to realize the scheduling of distributed power sources.

[0046] In this embodiment, the distributed power scheduling method can be based on the global state change of the global state of the power grid system at the current moment; the upper reinforcement learning model outputs the upper decision result in the discrete action space based on the global state change to determine the power node to be adjusted among all power nodes; the lower reinforcement learning model outputs the lower decision result in the continuous action space based on the local state change of the power node to be adjusted at the current moment to accurately determine the output power of the power node to be adjusted after adjustment; avoid adjusting the output power of all power nodes, reduce the amount of calculation, and realize real-time scheduling of distributed power.

[0047] On the basis of the first embodiment of the present invention, the second embodiment of the present invention further provides a distributed power supply scheduling method based on reinforcement learning, which may include steps S101 to S105 in the first embodiment; wherein, the input of the upper-layer reinforcement learning model is the global state change at the current moment, and the output is the current upper-layer reward value of each upper-layer action under the global state change, and the upper-layer action corresponding to the maximum value of the current upper-layer reward value corresponds to the upper-layer decision result, wherein the upper-layer action is a 01 vector, and one upper-layer action corresponds to a regulation mode of a power node.

[0048] In the second embodiment of the present invention, the global state change reflects the supply and demand changes of power resources in the power grid system. In order to ensure that the upper-level decision-making results can achieve the supply and demand balance of power resources in the power system, it is necessary to update the upper-level reinforcement learning model during the distributed power generation scheduling process. Figure 3 , is a flow chart of a method for updating an upper-layer reinforcement learning model provided in Embodiment 2 of the present invention.

[0049] Specifically, the update method of the upper reinforcement learning model includes:

[0050] S201, after adjusting the output power of all power supply nodes to be adjusted based on the lower-level decision result, collect the status information of all nodes in the power grid system to obtain the global state change at the next adjacent moment, and calculate the actual upper-level reward value of the upper-level decision result.

[0051] Among them, in the process of distributed power dispatch, the upper decision results Including multiple power supply nodes to be adjusted, after adjusting the output power of all power supply nodes to be adjusted according to the lower-level decision result D of each power supply node to be adjusted, the distributed power supply scheduling at the current moment is completed. At this time, the real state information of all nodes in the power grid system is collected to obtain the global state of the next adjacent moment of the current moment; the global state of the next adjacent moment is subtracted from the global state of the current moment to obtain the global state change of the next adjacent moment.

[0052] At the same time, based on the real data collected in the power grid system, the global state change at the current moment is calculated to execute the upper-level decision results. The actual upper-level reward value is used to characterize the upper-level decision results of the global state change at the current moment in the process of distributed power dispatch. The balance between supply and demand of power resources in the post-grid system; the better the balance between supply and demand, the better the upper-level decision-making results. The better the effect, the higher the decision-making results. The actual upper-level reward value is greater.

[0053] S202, determine the upper-level reinforcement learning target model, input the global state change at the next adjacent moment into the upper-level reinforcement learning target model, output the predicted upper-level reward value of each upper-level action at the next adjacent moment, and use the maximum predicted upper-level reward value as the future upper-level reward value of the upper-level decision result.

[0054] Wherein, determining the upper reinforcement learning target model includes: after each preset number of updates, copying the network parameters of the upper reinforcement learning model to the upper reinforcement learning target model to determine the upper reinforcement learning target model. In other words, the upper reinforcement learning target model and the upper reinforcement learning model have the same model structure, but different model parameters.

[0055] S203, calculating an upper-layer loss value based on the current upper-layer reward value, the future upper-layer reward value, and the actual upper-layer reward value of the upper-layer decision result, and the upper-layer loss value satisfies the relationship:

[0056] ;

[0057] in, The result of upper-level decision The current upper layer reward value, The result of upper-level decision The actual upper-level reward value, is the upper layer gain coefficient, The result of upper-level decision The future upper layer reward value, is the upper layer loss value.

[0058] Specifically, the upper-level decision results The current upper-level reward value is the output of the upper-level reinforcement learning model, and the future upper-level reward value is the output of the upper-level reinforcement learning target model when executing the upper-level decision. The maximum upper-level reward value after the execution of the upper-level decision is actually the upper-level reward value. The actual upper layer reward value collected later. Upper layer gain coefficient The value of is 0.5. The upper-layer loss value is used to constrain the upper-layer reinforcement learning model to output the accurate current upper-layer reward value for each upper-layer action.

[0059] S204, back propagation is performed based on the upper layer loss value to update the upper layer reinforcement learning model to complete an update.

[0060] In this embodiment, the upper-layer reinforcement learning model can accurately locate the power supply node to be adjusted according to the global state change at the current moment, and subsequently only the power supply node to be adjusted needs to be adjusted, thereby reducing the computational complexity of distributed power supply scheduling; and in the process of distributed power supply scheduling, the upper-layer reinforcement learning model will be updated in real time to ensure that the upper-layer reinforcement learning model accurately locates the power supply node to be adjusted, so as to ensure the supply and demand balance in the power grid system.

[0061] On the basis of the second embodiment of the present invention, the third embodiment of the present invention further provides a distributed power scheduling method based on reinforcement learning, and the distributed power scheduling method may include steps S201 to S204 in the second embodiment; wherein, in step S201, the upper layer decision result is executed under the global state change amount at the current moment. The actual upper-level reward values ​​include:

[0062] For a load node, a power node connected to the load node is used as a target power node;

[0063] After adjusting the output power of all power supply nodes to be adjusted based on the lower-level decision result, the actual upper-level reward value of the upper-level decision result is calculated according to each load node and its target power supply node, and the actual upper-level reward value satisfies the relationship: ;

[0064] Where N is the number of load nodes in the power grid system, is the load value of the i-th load node, is the number of target power nodes for the i-th load node, The jth target power node of the i-th load node provides The actual power of the load node, exp() represents the natural exponential function, The result of upper-level decision The actual upper-level reward value.

[0065] Among them, the actual power provided by the jth target power node of the i-th load node to the i-th load node is It can be collected and obtained in real time with the help of power measurement equipment (such as electric energy meter). It can reflect whether the i-th load node has reached a balance between supply and demand. When its value is 0, it means that the i-th load node has reached a balance between supply and demand. When all load nodes reach a balance between supply and demand, the actual upper-level reward value is Reach the maximum value, the actual upper reward value The maximum value of is 1.

[0066] In this embodiment, the upper-level reward value can actually represent the result of executing the upper-level decision. The degree of supply and demand balance in the power grid system is determined by the following equations: When all load nodes reach supply and demand balance, the actual upper-level reward value reaches the maximum. Involving the actual upper-level reward value in updating the upper-level reinforcement learning model can ensure that the upper-level decision-making results output by the upper-level reinforcement learning model can achieve supply and demand balance in the power grid system.

[0067] On the basis of the first embodiment of the present invention, the fourth embodiment of the present invention further provides a distributed power supply scheduling method based on reinforcement learning, which may include steps S101 to S105 in the first embodiment; wherein, in step S104, taking the state information of the target node as the local state of the power supply node to be adjusted includes: obtaining the position code of any target node, and splicing the position code and state information of the target node into the state feature of the target node, the position code being the unique identifier of the target node; splicing the state features of all target nodes to obtain the local state of the power supply node to be adjusted.

[0068] Specifically, the unique identifier of the target node may be a digital number such as 1, 2, 3, etc., and the digital number is used as the position code of the corresponding target node.

[0069] In this embodiment, the local state of a power node to be adjusted not only includes the state information of all target nodes, but also includes the location information of all target nodes. Since the number of nodes connected to target nodes at different locations in the power grid system and the degree of influence on the stability of the power grid system are different, the local state of the power node to be adjusted is obtained by comprehensively combining the state information and location information of the target nodes. This can accurately quantify the local states of different power nodes to be adjusted, so that the subsequent lower-level decision results can ensure the stability of the power grid system.

[0070] On the basis of the first embodiment of the present invention, the fifth embodiment of the present invention further provides a distributed power supply scheduling method based on reinforcement learning, which distributed power supply scheduling method may include steps S101 to S105 in the first embodiment; wherein, the lower-layer reinforcement learning model includes a lower-layer decision model and a lower-layer reward model; the input of the lower-layer decision model is the local state change of any power supply node to be adjusted at the current moment, and the output is the output power of the power supply node to be adjusted corresponding to the local state change, and the output power of the power supply node to be adjusted corresponds to the lower-layer decision result; the lower-layer reward model is used to assist in updating the lower-layer decision model, and the input of the lower-layer reward model is the local state change at the current moment and the lower-layer decision result output by the lower-layer decision model, and the output is the current lower-layer reward value of the lower-layer decision result.

[0071] Specifically, in the process of distributed power generation scheduling, the lower-level reward model is an auxiliary model for updating the lower-level decision model, which is used to ensure that the lower-level decision model can output accurate lower-level decision results.

[0072] In this embodiment, the lower-level decision result output by the lower-level decision model can adjust the output power of the power supply node to be adjusted, thereby realizing distributed power supply scheduling; and the adjustment processes of different power supply nodes to be adjusted are independent of each other.

[0073] On the basis of the fifth embodiment of the present invention, the sixth embodiment of the present invention further provides a distributed power scheduling method based on reinforcement learning, and the distributed power scheduling method includes an updating method of the lower layer reinforcement learning model. Figure 4 , is a flow chart of a method for updating a lower layer reinforcement learning model provided in Embodiment 6 of the present invention. Specifically, the method for updating the lower layer reinforcement learning model includes:

[0074] S301, after adjusting the output power of any power node to be adjusted based on the lower-level decision result, collect the local state of the power node to be adjusted to obtain the local state change at the next adjacent moment, and calculate the actual lower-level reward value of the lower-level decision result.

[0075] Among them, after adjusting the output power of any power supply node to be adjusted according to the lower-level decision result, the real state information of the target node corresponding to the power supply node to be adjusted is collected to obtain the local state of the power supply node to be adjusted at the next adjacent moment of the current moment; the local state of the power supply node to be adjusted at the next adjacent moment is subtracted from the local state of the power supply node to be adjusted at the current moment to obtain the local state of the power supply node to be adjusted at the next adjacent moment.

[0076] At the same time, based on the collected real data flowing through the power supply node to be regulated in the power grid system, the actual lower-level reward value of executing the lower-level decision result under the local state change at the current moment is calculated. The actual lower-level reward value is used to characterize the stability of the power supply node to be regulated in the power grid system after the lower-level decision result is executed under the local state change at the current moment in the process of distributed power supply scheduling; the better the stability of the power supply node to be regulated, the better the effect of the lower-level decision result, and the greater the actual lower-level reward value of the lower-level decision result.

[0077] S302, determine the lower-level decision target model and the lower-level reward target model, and input the local state change at the next adjacent moment into the lower-level decision target model, output the lower-level decision result at the next adjacent moment, and input the local state change and the lower-level decision result at the next adjacent moment into the lower-level reward target model to output the future lower-level reward value.

[0078] Among them, determining the lower-level decision target model and the lower-level reward target model includes: after each preset number of updates, the network parameters of the lower-level decision model are copied to the lower-level decision target model to determine the lower-level decision target model, and the network parameters of the lower-level reward model are copied to the lower-level reward target model to determine the lower-level reward target model.

[0079] In other words, the model structure of the lower-level decision target model and the lower-level decision model is the same, but the model parameters are different; similarly, the model structure of the lower-level reward target model and the lower-level reward model is also the same, but the model parameters are different.

[0080] S303, calculating the lower layer reward loss value based on the current lower layer reward value, the actual lower layer reward value and the future lower layer reward value, and performing back propagation according to the lower layer reward loss value to update the lower layer reward model.

[0081] The lower layer reward loss value satisfies the relationship: ;

[0082] in, The decision result of the lower level The current lower-level reward value, The decision result of the lower level The actual lower-level reward value, is the lower layer gain coefficient, is the future lower-level reward value, is the reward loss value of the lower layer.

[0083] Specifically, the lower layer gain coefficient The value of is 0.5. The lower-level reward loss value is used to constrain the lower-level reward model to accurately output the current lower-level reward value of the lower-level decision result. When updating the lower-level reward model, freeze the model parameters in the lower-level decision model.

[0084] S304, taking the opposite of the current lower-layer reward value as the lower-layer decision loss value, and performing back propagation based on the lower-layer decision loss value to update the lower-layer decision model, thereby completing an update.

[0085] The lower-level decision loss value satisfies the relationship: ;

[0086] in, The decision result of the lower level The current lower-level reward value, is the lower layer decision loss value.

[0087] The lower-level decision loss value is used to constrain the lower-level decision model to output the lower-level decision result corresponding to the current lower-level reward value maximum. When updating the lower-level decision model, the model parameters in the lower-level reward model are frozen. It can be understood that the larger the current lower-level reward value, the better the stability of the power node to be adjusted can be achieved by the corresponding lower-level decision result.

[0088] In this embodiment, the lower-layer reinforcement learning model can accurately output the adjusted output power of any power node to be adjusted based on the local state change of any power node to be adjusted at the current moment; and the lower-layer reinforcement learning model will be updated in real time during the distributed power supply scheduling process to ensure that the upper-layer reinforcement learning model can accurately output the adjusted output power of each power node to be adjusted, thereby ensuring the stability of the power grid system.

[0089] On the basis of the sixth embodiment of the present invention, the seventh embodiment of the present invention further provides a distributed power scheduling method based on reinforcement learning, and the distributed power scheduling method may include steps S301 to S304 in the sixth embodiment; wherein, in step S301, calculating the actual lower-layer reward value of the lower-layer decision result includes: collecting the frequency sequence f and the voltage sequence V of the target node corresponding to the power node to be adjusted;

[0090] The actual lower-level reward value of the lower-level decision result satisfies the relationship: ;

[0091] Wherein, m is the number of target nodes corresponding to the power supply node to be adjusted, is the variance of the frequency sequence f of the kth target node, is the variance of the kth target node voltage sequence V, exp() represents the natural exponential function, The decision result of the lower level The actual lower-level reward value.

[0092] in, Can reflect the lower-level decision results of the power node to be regulated The frequency stability of the kth target node after that, f represents the frequency sequence, Can reflect the lower-level decision results of the power node to be regulated The voltage stability of the kth target node after that, V represents the voltage sequence; the lower-level decision result is executed on the power node to be regulated Finally, the mean of the frequency stability and voltage stability of all target nodes is taken as the lower-level decision result. The actual lower-level reward value, that is, the lower-level decision result of the power node to be regulated After that, the better the stability of the target node corresponding to the power node to be adjusted, the better the lower-level decision result The actual lower-level reward value The larger the value, the actual lower-level reward value The maximum value of is 1.

[0093] In this embodiment, the actual lower-level reward value can represent the result of executing the lower-level decision-making of the power node to be adjusted. The stability of the power node to be adjusted later.

[0094] When the implementer dispatches the distributed power sources in the power grid system through the method of the above embodiment, the actual average value of the upper-level reward value reaches 0.96, and the actual average value of the lower-level reward value reaches 0.94; the actual upper-level reward value can represent the degree of supply and demand balance in the power grid system, and its maximum value is 1; the actual lower-level reward value can represent the stability of the power supply node in the power grid system, and its maximum value is 1.

[0095] Corresponding to the method of the above embodiment, Figure 5 The structural block diagram of a distributed power dispatching device based on reinforcement learning provided by the eighth embodiment of the present invention is shown. The above-mentioned droop control device is applied to a computer device, and the computer device is connected to the target database through a preset application program interface. When the target database is driven to run to perform the corresponding task, a corresponding task log will be generated, and the above-mentioned task log can be collected through the API. For the convenience of explanation, only the part related to the embodiment of the present invention is shown.

[0096] See also Figure 5 , the distributed power dispatching device comprises:

[0097] A global state acquisition module 61 is used to collect state information of all nodes of the power grid system as the global state of the power grid system, wherein the state information includes node type and node parameters, wherein the node type includes load node and power node, and the node parameters include load value of load node and output power of power node;

[0098] A difference module 62, used to subtract the global state at the last adjacent moment from the global state at the current moment to obtain the global state change at the current moment;

[0099] An upper layer reinforcement learning module 63, used for inputting the global state change amount into an upper layer reinforcement learning model to output an upper layer decision result, wherein the upper layer decision result includes the power supply nodes to be adjusted that need to be scheduled among all power supply nodes;

[0100] The local state acquisition module 64 is used for, for a power source node to be adjusted, taking all nodes connected to the power source node to be adjusted as target nodes, and taking the state information of the target nodes as the local state of the power source node to be adjusted;

[0101] The lower layer reinforcement learning module 65 calculates the local state change at the current moment, and inputs it into the lower layer reinforcement learning model to output the lower layer decision result, and adjusts the output power of the power node to be adjusted based on the lower layer decision result to realize the scheduling of distributed power sources;

[0102] Among them, the upper reinforcement learning model is the DQN network, and the lower reinforcement learning model is the DDPN network.

[0103] It should be noted that the information interaction, execution process and other contents between the above modules are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0104] Figure 6 This is a schematic diagram of the structure of a computer device provided in Embodiment 9 of the present invention. Figure 6 As shown, the computer device of this embodiment includes: at least one processor ( Figure 6 Only one is shown in the figure), a memory, and a computer program stored in the memory and executable on at least one processor, wherein when the processor executes the computer program, the steps in any of the above-mentioned health prediction method embodiments are implemented.

[0105] The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that Figure 6 This is merely an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, it may also include a network interface, a display screen, and an input device.

[0106] The processor may be a CPU, or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0107] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory may be the memory of a computer device, and the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be a hard disk of a computer device, and in other embodiments, it may also be an external storage device of the computer device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Further, the memory may also include both an internal storage unit of the computer device and an external storage device. The memory is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of a computer program, etc. The memory may also be used to temporarily store data that has been output or is to be output.

[0108] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the above-mentioned method embodiment, which will not be repeated here. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiment can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying computer program code, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0109] The present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by a computer program product. When the computer program product runs on a computer device, the computer device can implement the steps in the above-mentioned method embodiment when executing.

[0110] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0111] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0112] In the embodiments provided by the present invention, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0113] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0114] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A distributed power generation scheduling method based on reinforcement learning, wherein the output power of the distributed power generation is incorporated into the power grid system through the power node, characterized in that: The distributed power supply scheduling method comprises: Collecting status information of all nodes of the power grid system as the global status of the power grid system, the status information includes node type and node parameters, the node type includes load node and power node, the node parameters include load value of the load node and output power of the power node; Subtract the global state of the previous adjacent moment from the global state of the current moment to obtain the global state change at the current moment; Inputting the global state change amount into an upper-layer reinforcement learning model to output an upper-layer decision result, wherein the upper-layer decision result includes a power supply node to be adjusted that needs to be scheduled; For a power supply node to be adjusted, all nodes connected to the power supply node to be adjusted are taken as target nodes, and the state information of the target nodes is taken as the local state of the power supply node to be adjusted; Calculate the local state change at the current moment, and input the local state change into the lower-layer reinforcement learning model to output the lower-layer decision result, and adjust the output power of the power supply node to be adjusted based on the lower-layer decision result to realize the scheduling of distributed power supply; Wherein, the upper layer reinforcement learning model is a DQN network, and the lower layer reinforcement learning model is a DDPN network; The input of the upper-layer reinforcement learning model is the global state change at the current moment, and the output is the current upper-layer reward value of each upper-layer action. The upper-layer action corresponding to the maximum value of the current upper-layer reward value corresponds to the upper-layer decision result, wherein the upper-layer action is a 01 vector, and one upper-layer action corresponds to a regulation mode of a power node; The updating method of the upper layer reinforcement learning model includes: After adjusting the output power of all power supply nodes to be adjusted based on the lower-level decision result, collecting the state information of all nodes in the power grid system to obtain the global state change at the next adjacent moment, and calculating the actual upper-level reward value of the upper-level decision result; Determine an upper-layer reinforcement learning target model, input the global state change at the next adjacent moment into the upper-layer reinforcement learning target model, output the predicted upper-layer reward value of each upper-layer action at the next adjacent moment, and use the maximum predicted upper-layer reward value as the future upper-layer reward value of the upper-layer decision result; The upper-layer loss value is calculated based on the current upper-layer reward value, the future upper-layer reward value and the actual upper-layer reward value of the upper-layer decision result, and the upper-layer loss value satisfies the relationship: ; in, The result of upper-level decision The current upper layer reward value, The result of upper-level decision The actual upper-level reward value, is the upper layer gain coefficient, The result of upper-level decision The future upper layer reward value, is the upper layer loss value; Performing back propagation according to the upper layer loss value to update the upper layer reinforcement learning model to complete an update; Wherein, determining the upper-layer reinforcement learning target model includes: after each preset number of updates, copying the network parameters of the upper-layer reinforcement learning model to the upper-layer reinforcement learning target model to determine the upper-layer reinforcement learning target model.

2. According to a distributed power supply scheduling method based on reinforcement learning according to claim 1, it is characterized in that: Calculating the actual upper-level reward value of the upper-level decision result includes: For a load node, a power node connected to the load node is used as a target power node; After adjusting the output power of all power supply nodes to be adjusted based on the lower-level decision result, the actual upper-level reward value of the upper-level decision result is calculated according to each load node and its target power supply node, and the actual upper-level reward value satisfies the relationship: ; Where N is the number of load nodes in the power grid system, is the load value of the i-th load node, is the number of target power nodes for the i-th load node, The jth target power node of the i-th load node provides The actual power of the load node, exp() represents the natural exponential function, Decision results for upper level The actual upper-level reward value.

3. According to a distributed power supply scheduling method based on reinforcement learning according to claim 1, it is characterized in that: Using the state information of the target node as the local state of the power supply node to be adjusted includes: Obtaining a position code of any target node, and splicing the position code and state information of the target node into a state feature of the target node, wherein the position code is a unique identifier of the target node; The state characteristics of all target nodes are spliced ​​together to obtain the local state of the power supply node to be adjusted.

4. According to a distributed power scheduling method based on reinforcement learning according to claim 1, it is characterized in that: The lower layer reinforcement learning model includes a lower layer decision model and a lower layer reward model; The input of the lower-level decision model is the local state change of any power node to be adjusted at the current moment, and the output is the output power of the power node to be adjusted, and the output power of the power node to be adjusted corresponds to the lower-level decision result; The lower-layer reward model is used to assist in updating the lower-layer decision model. The input of the lower-layer reward model is the local state change at the current moment and the lower-layer decision result, and the output is the current lower-layer reward value of the lower-layer decision result.

5. The distributed power scheduling method based on reinforcement learning according to claim 4 is characterized in that: The updating method of the lower layer reinforcement learning model includes: After adjusting the output power of any power node to be adjusted based on the lower-level decision result, collecting the local state of the power node to be adjusted to obtain the local state change at the next adjacent moment, and calculating the actual lower-level reward value of the lower-level decision result; Determine a lower-level decision target model and a lower-level reward target model, input the local state change amount at the next adjacent moment into the lower-level decision target model, output the lower-level decision result at the next adjacent moment, and input the local state change amount and the lower-level decision result at the next adjacent moment into the lower-level reward target model to output the future lower-level reward value; Calculating a lower-layer reward loss value based on the current lower-layer reward value, the actual lower-layer reward value, and the future lower-layer reward value, and performing backpropagation according to the lower-layer reward loss value to update the lower-layer reward model; The opposite of the current lower-layer reward value is used as the lower-layer decision loss value, and back-propagation is performed according to the lower-layer decision loss value to update the lower-layer decision model, thereby completing an update; The determining of the lower-level decision target model and the lower-level reward target model comprises: after each preset number of updates, copying the network parameters of the lower-level decision model to the lower-level decision target model to determine the lower-level decision target model, and copying the network parameters of the lower-level reward model to the lower-level reward target model to determine the lower-level reward target model; The lower layer reward loss value satisfies the relationship: ; in, The decision result of the lower level The current lower-level reward value, The decision result of the lower level The actual lower-level reward value, is the lower layer gain coefficient, is the future lower-level reward value, is the reward loss value of the lower layer; The lower-level decision loss value satisfies the relationship: ; in, The decision result of the lower level The current lower-level reward value, is the lower layer decision loss value.

6. The distributed power scheduling method based on reinforcement learning according to claim 5 is characterized in that: Calculating the actual lower-level reward value of the lower-level decision result includes: Collecting the frequency sequence f and voltage sequence V of the target node corresponding to the power node to be adjusted; The actual lower-level reward value of the lower-level decision result satisfies the relationship: ; Wherein, m is the number of target nodes corresponding to the power supply node to be adjusted, is the variance of the frequency sequence f of the kth target node, is the variance of the kth target node voltage sequence V, exp() represents the natural exponential function, The decision result of the lower level The actual lower-level reward value.

7. A distributed power dispatching device based on reinforcement learning, characterized in that: The distributed power dispatching device is used to execute the distributed power dispatching method according to any one of claims 1 to 6, and the distributed power dispatching device includes: A global status acquisition module, used to collect status information of all nodes of the power grid system as the global status of the power grid system, wherein the status information includes node type and node parameters, wherein the node type includes load node and power node, and the node parameters include load value of the load node and output power of the power node; A difference module is used to subtract the global state at the current moment from the global state at the previous adjacent moment to obtain the global state change at the current moment; An upper-layer reinforcement learning module, used for inputting the global state change amount into an upper-layer reinforcement learning model to output an upper-layer decision result, wherein the upper-layer decision result includes the power supply nodes to be adjusted that need to be scheduled among all power supply nodes; A local state acquisition module is used for, for a power supply node to be adjusted, taking all nodes connected to the power supply node to be adjusted as target nodes, and taking the state information of the target nodes as the local state of the power supply node to be adjusted; A lower-layer reinforcement learning module is used to calculate the local state change at the current moment, and input it into the lower-layer reinforcement learning model to output a lower-layer decision result, and adjust the output power of the power supply node to be adjusted based on the lower-layer decision result to realize the scheduling of distributed power supply; Among them, the upper layer reinforcement learning model is a DQN network, and the lower layer reinforcement learning model is a DDPN network.

8. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a distributed power scheduling method based on reinforcement learning as described in any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the distributed power supply scheduling method based on reinforcement learning as described in any one of claims 1 to 6 is implemented.