Real-time optimal dispatching method for ac-dc distribution network based on double-agent reinforcement learning
By constructing a dual-agent model based on BDQ and SAC, the real-time optimization scheduling problem of AC/DC distribution networks under renewable energy and load uncertainty was solved, realizing real-time decision-making and cost optimization.
Patent Information
- Application Number
- CN202211397055.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2042-11-09
AI Technical Summary
Existing technologies struggle to meet real-time requirements for AC/DC distribution network optimization and scheduling when dealing with renewable energy and load uncertainties. Furthermore, existing single intelligent agents are inefficient in controlling discrete or continuous actions and cannot effectively cope with multiple uncertainties in complex systems.
A dual-agent model is constructed using a deep reinforcement learning method based on Branching Dueling Q-Network (BDQ) and Soft Actor Critic (SAC). The BDQ agent controls discrete actions and the SAC agent controls continuous actions to establish an AC/DC distribution network scheduling model, and real-time decision-making is achieved through offline training.
It enables real-time scheduling decisions when load and electric vehicle charging power change, improves training speed and learning rate, meets the real-time optimization scheduling requirements of AC/DC distribution networks, and reduces operating costs.
Smart Images

Figure CN115663931B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of technology, and in particular to a real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning. Background Technology
[0002] With the development of power electronics technology, AC / DC distribution networks have shown certain advantages in some aspects and have therefore received increasing attention. Renewable energy and energy storage generally need to be rectified and inverted before they can be connected to the grid. If a DC distribution network is used, the use of converters can be reduced, thus reducing energy loss.
[0003] In environments with significant renewable energy output and uncertain load conditions, the optimal scheduling of AC / DC distribution networks faces challenges. Improper handling can not only increase operating costs but also affect the safe and stable operation of the AC / DC distribution network. How to manage the uncertainty of renewable energy while achieving real-time, precise scheduling is a key challenge in the optimal scheduling of AC / DC distribution networks.
[0004] Currently, there is a wealth of research on optimal dispatching of AC / DC distribution networks considering renewable energy and load uncertainties. The key to research on optimal dispatching for renewable energy uncertainties lies in estimating the renewable energy uncertainty model. Based on different mathematical programming methods, renewable energy uncertainty models can be mainly categorized into fuzzy membership functions, scenario set analysis, robust uncertainty sets, and partially robust uncertainty sets. However, refining the modeling of renewable energy often faces problems such as long solution times and low efficiency. Furthermore, it requires resolving the model after a scenario change, which cannot meet the needs of real-time dispatching.
[0005] Reinforcement learning methods can effectively address the challenges of multiple uncertainties, high data dimensionality, and complex coupling in complex systems. Furthermore, by employing pre-trained agents, real-time decision-making can be achieved, leading to its increasing application in real-time power system dispatching. However, a single agent can only control either discrete or continuous actions. Therefore, this invention proposes a real-time optimization dispatching strategy for AC / DC distribution networks based on dual-agent reinforcement learning. First, an AC / DC distribution network optimization dispatching model is established. Then, based on Branching Dueling Q-Network (BDQ) and Soft ActorCritic (SAC) deep reinforcement learning methods, a dual-agent model capable of simultaneously controlling discrete and continuous actions is constructed for model training and solving. This method can adapt to the uncertainties of renewable energy sources. Simultaneously, by applying offline-trained agents online, real-time decision-making can be achieved. Summary of the Invention
[0006] The purpose of this invention is to provide a real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning.
[0007] A real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning includes the following steps:
[0008] Step 1: Establish an AC / DC distribution network dispatch model with control actions as variables. The objective function of this dispatch model is the total dispatch cost of the AC / DC distribution network.
[0009]
[0010] in, For electricity purchase costs, The total daily operating cost of equipment in an AC / DC distribution network;
[0011] Step 2: Using a dual agent consisting of a BDQ agent that controls discrete actions and a SAC agent that controls continuous actions, the above AC / DC distribution network scheduling model is solved with the objective function value as the minimum and in combination with the constraints, to obtain the optimal control action of the model.
[0012] The cost of electricity purchase The calculation method is as follows:
[0013]
[0014] In the formula, For electricity purchase price, The power input from the main power grid;
[0015] The method for calculating action costs is as follows:
[0016]
[0017] In the formula, The total daily operating cost of equipment in an AC / DC distribution network; For OLTC action costs, For CB action cost, To control DG's output costs, Cost of energy storage output;
[0018] in,
[0019]
[0020]
[0021]
[0022]
[0023] In the formula, For OLTC unit shift cost, For CB unit shift cost, This is the energy storage charging and discharging cost coefficient. For DG power cost, and Let represent the gear positions of the OLTC at time t and time t-1. and Let CB be in gear at time t and time t-1. For energy storage power, For DG power, For time step.
[0024] Furthermore, the constraints of the AC / DC distribution network dispatch model mainly include power balance constraints, voltage amplitude constraints, line current carrying constraints, active and reactive power constraints of converter stations, controllable DG output constraints, energy storage power and SOC constraints, and CB and OLTC operation constraints.
[0025] The power balance constraint is:
[0026]
[0027]
[0028] in, In order to purchase power from the large power grid, Contribute to photovoltaic power For energy storage charging and discharging power, For the active power of the load, For controllable DG power, For the power loss of the converter, For the reactive power of the load, Reactive power obtained from the main power grid, For capacitors, reactive power VSC reactive power;
[0029] The voltage amplitude constraint is as follows:
[0030]
[0031] in, and These are the lower and upper voltage limits, respectively.
[0032] The line current carrying constraint is:
[0033]
[0034] in, Let i be the active power flowing through line i. Let i be the reactive power flowing through line i. The maximum capacity of the i-way;
[0035] The active and reactive power constraints of the converter station are as follows:
[0036]
[0037]
[0038] in, and These represent the active and reactive power of converter station i, respectively. This is the maximum capacity of the converter station. and These are the lower and upper limits of reactive power regulation for converter station i, respectively;
[0039] The controllable DG output constraint is:
[0040]
[0041] Among them, the and These are the lower and upper limits of controllable DG output, respectively.
[0042] The energy storage power and SOC constraints, as well as the CB and OLTC operation constraints, are as follows:
[0043]
[0044]
[0045]
[0046] in, and For maximum discharge and charge power of energy storage, The state of charge of energy storage. and These are the minimum and maximum values of the energy storage state of charge. For energy storage charging and discharging efficiency, For energy storage capacity.
[0047] Furthermore, the two agents share a reward function, but each has its own action space and state space; the reward function Includes negative action costs and penalty for exceeding constraints:
[0048]
[0049] in, For the cost of action, The penalty factor for exceeding the limit is set to 0 when all constraints are satisfied, and -100000 when there is a violation of the constraint.
[0050] Furthermore, the BDQ agent controls the discrete action devices CB and OLTC to perform actions by observing the load size and photovoltaic output, including state space, action space and Q network;
[0051] The state space of the BDQ agent includes the load power and photovoltaic output, and can be represented as:
[0052]
[0053] in, For the active power of the load, For the reactive power of the load, Contribute to photovoltaic power;
[0054] The action space of a BDQ agent includes CB and OLTC gears, which can be represented as:
[0055]
[0056] in, Let CB be in gear at time t. The gear position of the OLTC at time t;
[0057] Furthermore, the method for constructing the dual-agent system is as follows:
[0058] 1) Input basic AC / DC distribution network data, including load data, photovoltaic data, and network topology, and randomly initialize the Q network of BDQ. Randomly initialize the policy network of SAC State-value network Target State Value Network Q network Initialize the BDQ experience pool SAC Experience Pool Initialize the total number of training rounds ;
[0059] 2) Get the current state Actions are obtained from the Q network of BDQ. Get the current state Actions are obtained from the SAC policy network. ;
[0060] 3) Perform the action and Interact with the environment to earn reward points and the updated environment and Store round data To the experience pool Store round data To the experience pool ;
[0061] 4) Determine the experience pool and If the amount of data exceeds the set value, proceed to the next step; otherwise, repeat steps 2)-3).
[0062] 5) Update the Q network of BDQ, and at the same time update the policy network and Q network of SAC;
[0063] 6) Each Update the target state value network once per round: ,in For state-value network parameters, For update rate;
[0064] 7) Repeat steps 2)-6) until the number of rounds is reached. The trained BDQ agent and SAC agent are obtained.
[0065] Furthermore, the update method for the BDQ agent Q network is as follows:
[0066] 5-1) Calculate the loss function using the mean squared error. The loss function is:
[0067]
[0068] In the formula, for Network parameters;
[0069] 5-2) Calculation parameters Regarding the gradient of the loss function ;
[0070] 5-3) Update the parameters of the neural network using stochastic gradient descent. ,Right now
[0071]
[0072] In the formula, This is the learning rate.
[0073] Furthermore, the SAC intelligent agent observes the load and photovoltaics, including the state of charge of energy storage and the observation of actions taken by BDQ. Based on the observation values, it obtains scheduling actions for energy storage and controllable DG, mainly including state space, action space, policy network, state value network and Q network.
[0074] The SAC state space is represented as follows:
[0075]
[0076] The SAC action space is represented as follows:
[0077]
[0078] The policy network is represented as follows:
[0079]
[0080] Policy Network Let represent the probability of choosing action a in state s. As expected, In the state Next action The gains obtained; It is the entropy function. ; The weights of the entropy function;
[0081] value function
[0082] The representation method is as follows:
[0083]
[0084] In the formula, This is the discount factor, with a value range of [0,1].
[0085] Policy Network The update method is represented as:
[0086]
[0087] in,
[0088] State Value Network The update method is as follows:
[0089]
[0090]
[0091]
[0092] The SAC Q network update method is as follows:
[0093]
[0094]
[0095]
[0096] In the formula, , and These are the parameters of the policy network, the state-value network, and the Q-network, respectively. , and For learning rate, , and These are the policy network loss function, the state value network loss function, and the Q-network loss function, respectively. Let KL divergence be denoted as KL divergence.
[0097] This invention also provides a computer device, including...
[0098] Memory and processor;
[0099] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, wherein the processor executes the computer-executable instructions to implement the above-mentioned AC / DC distribution network real-time optimization scheduling method based on dual-agent reinforcement learning.
[0100] This invention also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the aforementioned method for real-time optimization scheduling of AC / DC power distribution networks based on dual-agent reinforcement learning.
[0101] Compared with existing technologies, this real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning can use the trained agents in real-time scheduling by training them offline. When the load and electric vehicle charging power change, the trained agents can make scheduling decisions in real time, which can meet the real-time scheduling requirements. At the same time, the training with human assistance in the early stage can greatly improve the training speed and the learning rate of the agents. Attached Figure Description
[0102] Figure 1 This is a schematic diagram of the dual-agent training process;
[0103] Figure 2 This is a schematic diagram of the SAC neural network structure.
[0104] Figure 3 This is a schematic diagram of the distribution network topology;
[0105] Figure 4 For load, photovoltaic output, and electricity price curves;
[0106] Figure 5 This is a schematic diagram illustrating the convergence of the algorithm;
[0107] Figure 6 This is a schematic diagram of the scheduling results. Detailed Implementation
[0108] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but the following embodiments are by no means intended to limit the present invention.
[0109] The terminology used in one or more embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this application. The singular forms “a,” “the,” and “the” used in one or more embodiments of this application and in the appended claims are also intended to include the plural forms, encompassing any or all possible combinations of one or more associated listed items.
[0110] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this application, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0111] This invention provides a real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning, comprising the following steps:
[0112] Step 1: Establish an AC / DC distribution network dispatch model with control actions as variables. The objective function of this dispatch model is the total dispatch cost of the AC / DC distribution network.
[0113]
[0114] in, For electricity purchase costs, The total daily operating cost of equipment in an AC / DC distribution network;
[0115]
[0116] In the formula, For electricity purchase price, The power input from the main power grid;
[0117] In the formula, The total daily operating cost of equipment in an AC / DC distribution network; For OLTC action costs, For CB action cost, To control DG's output costs, Cost of energy storage output;
[0118] in,
[0119]
[0120]
[0121]
[0122]
[0123] In the formula, For OLTC unit shift cost, For CB unit shift cost, This is the energy storage charging and discharging cost coefficient. For DG power cost, and Let represent the gear positions of the OLTC at time t and time t-1. and Let CB be in gear at time t and time t-1. For energy storage power, For DG power, For time step.
[0124] Step 2: Using a dual-agent system consisting of a BDQ agent controlling discrete actions and a SAC agent controlling continuous actions, the objective function value is minimized, and the above AC / DC distribution network scheduling model is solved in combination with constraints to obtain the optimal control action of the model.
[0125] It should be noted that the constraints of the AC / DC distribution network dispatch model mainly include power balance constraints, voltage amplitude constraints, line current carrying constraints, active and reactive power constraints of converter stations, controllable DG output constraints, energy storage power and SOC constraints, and CB and OLTC operation constraints.
[0126] The power balance constraint is:
[0127]
[0128]
[0129] in, In order to purchase power from the large power grid, Contribute to photovoltaic power For energy storage charging and discharging power, For the active power of the load, For controllable DG power, For the power loss of the converter, For the reactive power of the load, Reactive power obtained from the main power grid, For capacitors, reactive power VSC reactive power;
[0130] The voltage amplitude constraint is as follows:
[0131]
[0132] in, and These are the lower and upper voltage limits, respectively.
[0133] The line current carrying constraint is:
[0134]
[0135] in, Let i be the active power flowing through line i. Let i be the reactive power flowing through line i. The maximum capacity of the i-way;
[0136] The active and reactive power constraints of the converter station are as follows:
[0137]
[0138]
[0139] in, and These represent the active and reactive power of converter station i, respectively. This is the maximum capacity of the converter station. and These are the lower and upper limits of reactive power regulation for converter station i, respectively;
[0140] The controllable DG output constraint is:
[0141]
[0142] Among them, the and These are the lower and upper limits of controllable DG output, respectively.
[0143] The energy storage power and SOC constraints, as well as the CB and OLTC operation constraints, are as follows:
[0144]
[0145]
[0146]
[0147] in, and For maximum discharge and charge power of energy storage, The state of charge of energy storage. and These are the minimum and maximum values of the energy storage state of charge. For energy storage charging and discharging efficiency, For energy storage capacity.
[0148] It should be further explained that the two agents share a reward function, but each has its own action space and state space; the reward function Includes negative action costs and penalty for exceeding constraints:
[0149]
[0150] in, For the cost of action, The penalty factor for exceeding the limit is set to 0 when all constraints are satisfied, and -100000 when there is a violation of the constraint.
[0151] The method for constructing a dual-agent system provided by this invention is shown in Figure 1.
[0152] 1) Input basic AC / DC distribution network data, including load data, photovoltaic data, and network topology, and randomly initialize the Q network of BDQ. Randomly initialize the policy network of SAC State-value network Target State Value Network Q network Initialize the BDQ experience pool SAC Experience Pool Initialize the total number of training rounds ;
[0153] 2) Get the current state Actions are obtained from the Q network of BDQ. Get the current state Actions are obtained from the SAC policy network. ;
[0154] 3) Perform the action and Interact with the environment to earn reward points and the updated environment and Store round data To the experience pool Store round data To the experience pool ;
[0155] 4) Determine the experience pool and If the amount of data exceeds the set value, proceed to the next step; otherwise, repeat steps 2)-3).
[0156] 5) Update the Q network of BDQ, and at the same time update the policy network and Q network of SAC;
[0157] 6) Each Update the target state value network once per round: ,in For state-value network parameters, For update rate;
[0158] 7) Repeat steps 2)-6) until the number of rounds is reached. The trained BDQ agent and SAC agent are obtained.
[0159] The BDQ agent controls the discrete action devices CB and OLTC to perform actions by observing the load size and photovoltaic output, including state space, action space and Q network;
[0160] The state space of the BDQ agent includes the load power and photovoltaic output, and can be represented as:
[0161]
[0162] in, For the active power of the load, For the reactive power of the load, Contribute to photovoltaic power;
[0163] The action space of a BDQ agent includes CB and OLTC gears, which can be represented as:
[0164]
[0165] in, Let CB be in gear at time t. The gear position of the OLTC at time t;
[0166] The update method for the BDQ agent Q network is as follows:
[0167] 5-1) Calculate the loss function using the mean squared error. The loss function is:
[0168]
[0169] In the formula, for Network parameters;
[0170] 5-2) Calculation parameters Regarding the gradient of the loss function ;
[0171] 5-3) Update the parameters of the neural network using stochastic gradient descent. ,Right now
[0172]
[0173] In the formula, This is the learning rate.
[0174] Meanwhile, the SAC agent observes the load and photovoltaics, including the state of charge of energy storage and the observation of actions taken by the BDQ. These observations are input into the SAC's policy network, and the actions of energy storage and controllable distributed generation (DG) are output. The SAC agent mainly includes a state space, an action space, and a policy network. State-value network Target State Value Network And Q-networks, neural network structures such as Figure 2 As shown;
[0175] The SAC state space is represented as follows:
[0176]
[0177] The SAC action space is represented as follows:
[0178]
[0179] The policy network is represented as follows:
[0180]
[0181] Policy Network Let represent the probability of choosing action a in state s. As expected, In the state Next action The gains obtained; It is the entropy function. ; The weights of the entropy function;
[0182] value function
[0183] The representation method is as follows:
[0184]
[0185] In the formula, This is the discount factor, with a value range of [0,1].
[0186] Policy Network The update method is represented as:
[0187]
[0188] in,
[0189] State Value Network The update method is as follows:
[0190]
[0191]
[0192]
[0193] The SAC Q network update method is as follows:
[0194]
[0195]
[0196]
[0197] In the formula, , and These are the parameters of the policy network, the state-value network, and the Q-network, respectively. , and For learning rate, , and These are the policy network loss function, the state value network loss function, and the Q-network loss function, respectively. Let KL divergence be denoted as KL divergence.
[0198] Example:
[0199] Figure 3 A schematic diagram of a power distribution network topology is provided. Figure 4 The load and photovoltaic output curves and electricity price curves for this topology are provided;
[0200] The convergence of the algorithm during the training process of the dual-agent system provided by this invention is as follows: Figure 5 As shown, training the agent leads to convergence in rewards. The initial rewards fluctuate significantly because the actions taken by the agent incur high scheduling costs and may violate constraints.
[0201] The trained agent, when applied online, can make decisions for 24 time periods throughout the day in just 1.18 seconds, with an average decision time of 0.05 seconds per decision, meeting the requirements for real-time decision-making. The scheduling results are as follows: Figure 6 As shown, the total dispatch cost for one day is 2445.8 yuan. It can be seen that the energy storage initially operates in a discharging state, charging to a high level before the electricity price reaches its peak, and then discharging at the peak price, achieving low-level storage and high-level discharge, thus reducing operating costs. Controllable distributed generation (DG) generates less power during low electricity prices and reaches full capacity during high electricity prices, thereby reducing electricity purchase costs. From... Figure 6 As can be seen, the CB tripped 4 times and the OLTC tripped 3 times, none of which exceeded the limit. At 3 o'clock, because the load was relatively small and the reactive power demand was small, the voltage level was relatively high, so the CB lowered its setting. At 7 o'clock and 8 o'clock, both the OLTC and CB were raised to a higher setting because the load began to increase and the reactive power demand increased, while the voltage level was low. Raising the OLTC and CB settings increased the voltage and reduced network losses. At 16:00 and 17:00, both the CB and OLTC were lowered to prevent overvoltage problems caused by the load level starting to decrease and the controllable DG power increasing. At 22:00, the load level decreased, the reactive power demand was small, and the voltage level gradually increased, so the CB lowered its setting.
[0202] This invention also provides a computer device, including...
[0203] Memory and processor;
[0204] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, wherein the processor executes the computer-executable instructions to implement the above-mentioned AC / DC distribution network real-time optimization scheduling method based on dual-agent reinforcement learning.
[0205] The present invention also provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, provide the aforementioned method for real-time optimization scheduling of AC / DC power distribution networks based on dual-agent reinforcement learning.
[0206] This is an illustrative embodiment of a computer-readable storage medium. It should be noted that the technical solution of this storage medium and the technical solution of the data recovery method described above belong to the same concept. Details not described in detail in the technical solution of the storage medium can be found in the description of the technical solution of the data recovery method described above.
[0207] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0208] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0209] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this application.
[0210] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0211] The preferred embodiments disclosed above are merely illustrative of this application. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments of this application. These embodiments are selected and specifically described in this application to better explain the principles and practical applications of the embodiments of this application, thereby enabling those skilled in the art to better understand and utilize this application. This application is limited only by the claims and their full scope and equivalents.
Claims
1. A real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning, characterized in that, Includes the following steps: Step 1: Establish an AC / DC distribution network dispatch model with control actions as variables. The objective function of this dispatch model is the total dispatch cost of the AC / DC distribution network. in, For electricity purchase costs, The total daily operating cost of equipment in an AC / DC distribution network; Step 2: Using a dual agent consisting of a BDQ agent that controls discrete actions and a SAC agent that controls continuous actions, the above AC / DC distribution network scheduling model is solved with the objective function value as the minimum and in combination with the constraints, to obtain the optimal control action of the model. The method for constructing the dual-agent system is as follows: 1) Input basic AC / DC distribution network data, including load data, photovoltaic data, and network topology, and randomly initialize the Q network of BDQ. Randomly initialize the policy network of SAC State-value network Target State Value Network Q network Initialize the BDQ experience pool SAC Experience Pool Initialize the total number of training rounds ; 2) Get the current state Actions are obtained from the Q network of BDQ. Get the current state Actions are obtained from the SAC policy network. ; 3) Perform the action and Interact with the environment to earn reward points and the updated environment and Store round data To the experience pool Store round data To the experience pool ; 4) Determine the experience pool and If the amount of data exceeds the set value, proceed to the next step; otherwise, repeat steps 2)-3). 5) Update the Q network of BDQ, and at the same time update the policy network and Q network of SAC; 6) Each Update the target state value network once per round: ,in For state-value network parameters, For update rate; 7) Repeat steps 2)-6) until the number of rounds is reached. The trained BDQ agent and SAC agent are obtained.
2. The real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning according to claim 1, characterized in that, The cost of electricity purchase The calculation method is as follows: In the formula, For electricity purchase price, The power input from the main power grid; The method for calculating action costs is as follows: In the formula, The total daily operating cost of equipment in an AC / DC distribution network; For OLTC action costs, For CB action cost, To control DG's output costs, Cost of energy storage output; in, In the formula, For OLTC unit shift cost, For CB unit shift cost, This is the energy storage charging and discharging cost coefficient. For DG power cost, and Let represent the gear positions of the OLTC at time t and time t-1. and Let CB be in gear at time t and time t-1. For energy storage power, For DG power, For time step.
3. The real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning according to claim 2, characterized in that, The constraints of the AC / DC distribution network dispatch model mainly include power balance constraints, voltage amplitude constraints, line current carrying constraints, active and reactive power constraints of converter stations, controllable DG output constraints, energy storage power and SOC constraints, and CB and OLTC operation constraints. The power balance constraint is: in, In order to purchase power from the large power grid, Contribute to photovoltaic power For energy storage charging and discharging power, For the active power of the load, For controllable DG power, For the power loss of the converter, For the reactive power of the load, Reactive power obtained from the main power grid, For capacitors, reactive power VSC reactive power; The voltage amplitude constraint is as follows: in, and These are the lower and upper voltage limits, respectively. The line current carrying constraint is: in, Let i be the active power flowing through line i. Let i be the reactive power flowing through line i. The maximum capacity of the i-way; The active and reactive power constraints of the converter station are as follows: in, and These represent the active and reactive power of converter station i, respectively. This is the maximum capacity of the converter station. and These are the lower and upper limits of reactive power regulation for converter station i, respectively; The controllable DG output constraint is: Among them, the and These are the lower and upper limits of controllable DG output, respectively. The energy storage power and SOC constraints, as well as the CB and OLTC operation constraints, are as follows: in, and For maximum discharge and charge power of energy storage, The state of charge of energy storage. and These are the minimum and maximum values of the energy storage state of charge. For energy storage charging and discharging efficiency, For energy storage capacity.
4. The real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning according to claim 3, characterized in that, The two agents share a reward function, each with its own action space and state space; the reward function Includes negative action costs and penalty for exceeding constraints: in, For the cost of action, The penalty factor for exceeding the limit is set to 0 when all constraints are satisfied, and -100000 when there is a violation of the constraint.
5. The real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning according to claim 4, characterized in that, The BDQ agent controls the discrete action devices CB and OLTC to perform actions by observing the load size and photovoltaic output, including state space, action space and Q network; The state space of the BDQ agent includes the load power and photovoltaic output, and can be represented as: in, For the active power of the load, For the reactive power of the load, Contribute to photovoltaic power; The action space of a BDQ agent includes CB and OLTC gears, which can be represented as: in, Let CB be in gear at time t. This represents the gear position of the OLTC at time t.
6. The real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning according to claim 5, characterized in that, The update method for the BDQ agent Q network is as follows: 5-1) Calculate the loss function using the mean squared error. The loss function is: In the formula, for Network parameters; 5-2) Calculation parameters Regarding the gradient of the loss function ; 5-3) Update the parameters of the neural network using stochastic gradient descent. ,Right now In the formula, This is the learning rate.
7. The real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning according to claim 6, characterized in that, The SAC intelligent agent observes the load and photovoltaics, and also includes the state of charge of energy storage and the observation of actions taken by BDQ. Based on the observation values, it obtains the scheduling actions for energy storage and controllable DG, which mainly include state space, action space, policy network, state value network and Q network. The SAC state space is represented as follows: The SAC action space is represented as follows: The policy network is represented as follows: Policy Network Let represent the probability of choosing action a in state s. For the expectation, In the state Next action The gains obtained; It is the entropy function. ; The weights of the entropy function; value function The representation method is as follows: In the formula, This is the discount factor, with a value range of [0,1]. Policy Network The update method is represented as: in, State Value Network The update method is as follows: The SAC Q network update method is as follows: In the formula, , and These are the parameters of the policy network, the state-value network, and the Q-network, respectively. , and For learning rate, , and These are the policy network loss function, the state value network loss function, and the Q-network loss function, respectively. Let KL divergence be denoted as KL divergence.
8. A computer device, characterized in that, include Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, wherein when the processor executes the computer-executable instructions, it implements the real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the real-time optimization scheduling method for AC / DC distribution networks based on dual-agent reinforcement learning as described in any one of claims 1-7.
Citation Information
Patent Citations
A distributed energy hub scheduling method based on multiple agents
CN109784545A
Power grid multi-section power automatic control method based on distributed multi-agent reinforcement learning
CN112615379A
