Power distribution network-microgrid group master-slave game optimization scheduling method based on multi-agent reinforcement learning algorithm

The multi-agent reinforcement learning algorithm is used to establish a master-slave game model of the distribution network-microgrid group, which solves the problem of inconsistent optimal dispatching directions between the distribution network and the microgrid group, realizes coordinated dispatching of the distribution network and the microgrid group, and improves It improves the consumption rate of new energy and the utilization efficiency of distributed resources.

CN118611067APending Publication Date: 2024-09-06HEFEI UNIV OF TECH
View PDF 0 Cites 15 Cited by

Patent Information

Application Number
CN202410582332.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-11
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Distribution networks face volatility and uncertainty when dealing with massive amounts of distributed new energy, resulting in unstable operation and inconsistency with the optimal dispatching direction of the microgrid group, resulting in low microgrid participation and inability to effectively coordinate, affecting new energy sources. consumption rate.

Method used

The distribution network-microgrid group master-slave game optimization scheduling method based on multi-agent reinforcement learning algorithm is adopted. By collecting historical data, a Markov decision-making process is established, the state space, action space and reward function are defined, and multi-agent reinforcement is trained. Learn neural networks to achieve coordinated dispatching of distribution networks and microgrid groups.

Benefits of technology

It improves the depth of energy coupling between the distribution network and the microgrid group, maximizes the utilization of distributed energy, suppresses the net load fluctuation of the distribution network, reduces the power loss of the microgrid group, and improves the consumption rate of new energy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118611067A
    Figure CN118611067A
Patent Text Reader

Abstract

The invention discloses a power distribution network-microgrid group master-slave game optimization scheduling method based on a multi-agent reinforcement learning algorithm, and the method comprises the steps: 1, collecting new energy and load historical output data in a region, and drawing a new energy and load output prediction curve; 2, establishing a power distribution network and micro-grid group master-slave game model; 3, converting the master-slave game model into a Markov decision process, and defining a state space, an action space and a reward function of multiple agents; 4, according to the Markov decision process, adopting multiple agents to simulate the scheduling process of the power distribution network and the micro-grid group; 5, training the multi-agent neural network, and updating network parameters; and 6, based on the trained multi-agent reinforcement learning neural network, obtaining a master-slave game optimization scheduling scheme. According to the method, the energy coupling depth of the power distribution network and the micro-grid group can be improved, mass distributed energy in the area can be dispatched in a dispersed mode, the utilization rate of the distributed energy is improved to the maximum degree, and therefore the new energy consumption rate can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed resource optimization and scheduling, and in particular to an optimization and scheduling method for promoting the coordinated consumption of new energy by a distribution network and a microgrid group. Background Art

[0002] With the rapid development and popularization of renewable energy generation technology in recent years, traditional distribution networks are facing the challenge of network structure being difficult to effectively aggregate and absorb a large number of distributed renewable energy sources, and its volatility and uncertainty seriously affect the safe and stable operation of distribution networks. Therefore, microgrid aggregation technology has received widespread attention. It has distributed renewable energy and energy storage and other regulating units inside. On the one hand, it solves the problem of local renewable energy consumption, and on the other hand, it can solve the uncertainty caused by renewable energy generation in distribution networks through access to the Internet. Different from traditional distribution network dispatching technology, microgrids, as independent entities, have the ability to uniformly dispatch distributed resources within the region, reducing the dispatching pressure of distribution networks. Compared with traditional intelligent optimization algorithms, in multi-agent reinforcement learning algorithms, agents can achieve efficient energy interaction by sharing limited information. Each agent can select actions with excellent rewards by continuously interacting with the environment, and improve strategy solutions in different environments to formulate the optimal strategy.

[0003] Since most microgrids are built and operated by social investment entities, the optimization directions of the distribution network and the microgrid group in the optimization scheduling model are usually inconsistent, so there is a certain optimization conflict between the two. Due to the above reasons, the participation of microgrids as independent entities in the distribution network scheduling process is not high, and the flexible operation of the distribution network cannot be guaranteed. Therefore, how to guide microgrids to participate in distribution network scheduling, effectively manage microgrid groups, and formulate reasonable coordination plans between distribution networks and microgrid groups has become a research focus. Summary of the invention

[0004] In order to avoid the shortcomings of the above-mentioned prior art, the present invention provides a distribution network-microgrid group master-slave game optimization scheduling method based on a multi-agent reinforcement learning algorithm, in order to improve the energy coupling depth of the distribution network and the microgrid group, and to decentralizedly schedule the massive distributed energy in the region, thereby maximizing the utilization rate of distributed energy and thus improving the new energy consumption rate.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is:

[0006] The master-slave game optimization scheduling method of a distribution network-microgrid group based on a multi-agent reinforcement learning algorithm of the present invention is characterized in that it is carried out according to the following steps;

[0007] Step 1: Collect historical output data and load data of new energy sources in the region, and draw forecast curves of new energy and load output;

[0008] Step 2: Based on the new energy and load output forecast curve, a master-slave game model of the distribution network ADN and the microgrid group MMGs is established;

[0009] Step 3: Convert the master-slave game model of the distribution network ADN and the microgrid group MMGs into a Markov decision process. Based on the Markov decision process, define the state space, action space and reward function of the distribution network ADN agent and the microgrid group MMGs agent respectively for multi-agent reinforcement learning neural network training;

[0010] Step 4: According to the Markov decision process, the multi-agent reinforcement learning neural network is trained to obtain the trained multi-agent reinforcement learning neural network, which is used to simulate the dispatching process of the distribution network ADN and the microgrid group MMGs;

[0011] Step 5: Based on the trained multi-agent reinforcement learning neural network, the master-slave game optimization dispatching scheme of the distribution network-microgrid group in period T is obtained;

[0012] The master-slave game optimization scheduling method for the distribution network-microgrid group based on the multi-agent reinforcement learning algorithm described in the present invention is also characterized in that the step one comprises:

[0013] Step 1.1, collect the historical output data of wind power WT, photovoltaic PV and load Load in a distribution network ADN and N microgrids, and draw the predicted output curves of wind power WT, photovoltaic PV and load Load in the T period respectively;

[0014] Step 1.2: Use formula (1) to establish a distribution network dispatching model with the minimum net load fluctuation rate as the optimization goal:

[0015]

[0016] In formula (1), is the net load fluctuation rate of the distribution network ADN at time t, and are the net loads of the distribution network ADN at time t and time t-1 respectively;

[0017] Step 1.3: Calculate the net load of the distribution network ADN at time t using formula (2):

[0018]

[0019] In formula (2), is the load of the distribution network ADN at time t, and are the wind power WT output and photovoltaic PV output of the distribution network ADN at time t, is the interaction power between the distribution network ADN and the transmission network grid at time t, is the distribution network ADN and the i-th microgrid MG i The interactive power at time t, N represents the number of microgrids in the microgrid group MMGs;

[0020] Step 1.4, construct branch flow constraints and node voltage constraints of the distribution network ADN;

[0021] Step 1.5: Use formula (3) to establish a microgrid group MMGs dispatching model with the minimum total loss of microgrid grid-connected operation as the optimization goal:

[0022]

[0023]

[0024]

[0025] In formula (3), is the i-th microgrid MG i The operating loss, is the tie line PCC connected to the i-th microgrid i The transmission power loss at time t is obtained by equation (4): is the internal energy storage ESS of the i-th microgrid i The charge and discharge energy loss at time t is obtained by formula (5);

[0026] In formula (4), is the tie line PCC connected to the i-th microgrid i The loss factor of the transmitted power;

[0027] In formula (5), α ESS is the loss coefficient of the energy storage ESS charging and discharging power, is the internal energy storage ESS of the i-th microgrid i The charge and discharge power at time t is season when season in, Represents the internal energy storage ESS of the i-th microgrid i The discharge power at time t is Represents the internal energy storage ESS of the i-th microgrid i The charging power at time t is

[0028] Step 1.6: Use formula (6) to calculate the PCC of the i-th microgrid via the tie line i Interaction power with the distribution network ADN at time t

[0029]

[0030] In formula (6), and are the i-th microgrid MG i The emitted power and absorbed power at time t are: and are the i-th microgrid MG i At time t, the identification bit of the emitted power and the identification bit of the injected power, when season when season

[0031] Step 1.7: Use formula (7) to establish the tie line PCC connected to the i-th microgrid i Transmission power constraint:

[0032]

[0033] In formula (7), is the tie line PCC connected to the i-th microgrid i Maximum transmission power.

[0034] The second step comprises:

[0035] Step 2.1: Use formula (8) to formulate the master-slave game model for the distribution network ADN and the i-th microgrid MG i Optimization strategy:

[0036]

[0037] In formula (8), is the strategy of the distribution network ADN at time t, including: the distribution network ADN and the i-th microgrid MG i The power output at time t and absorbed power is the i-th microgrid MG i The strategy at time t includes: the internal gas turbine MT of the i-th microgrid i Output power at time t And energy storage ESS i Charging power at time t and discharge power φ MMGsis the collection of microgrid group MMGs;

[0038] Step 2.2: Use formula (8) to calculate the distribution network ADN and the i-th microgrid MG in the master-slave game model respectively: i The utility function at time t is and

[0039]

[0040] In formula (9), r ADN and They are the distribution network ADN and the i-th microgrid MG i Unit target reward coefficient;

[0041] Step 2.3: Use equation (10) to establish the distribution network ADN and the i-th microgrid MG i The master-slave game model solution strategy:

[0042]

[0043] In formula (10), and They are the distribution network ADN and the i-th microgrid MG at time t respectively. i The optimal absorption power and the optimal output power between is the gas turbine MT in the i-th microgrid i The optimal output at time t is and are the energy storage ESS in the i-th microgrid respectively. i The optimal charging power and optimal discharging power at time t.

[0044] The step three comprises:

[0045] Step 3.1: Define the state space set of multiple agents at time t in, and They are the distribution network ADN agent and the i-th microgrid MG i The state value observed by the agent at time t when interacting with the environment, and in, and are the wind power WT in the i-th microgrid respectively. i and photovoltaic PV i The predicted amount of output power at time t, is the load inside the i-th microgrid i The predicted amount at time t;

[0046] Step 3.2: Define the action space set of multiple agents at time t in, and They are the distribution network ADN agent and the i-th microgrid MG i The action taken by the agent at time t, and Using equations (11) to (13), we set the distribution network ADN agent and the i-th microgrid MG i The range of actions taken by the agent at time t:

[0047]

[0048]

[0049]

[0050] In formula (11), is the maximum value of the power exchanged between any microgrid MG and the distribution network ADN;

[0051] In formula (12), and are the maximum and minimum output power of any gas turbine MT respectively;

[0052] In formula (13), and are the maximum and minimum charging and discharging power of any energy storage ESS respectively;

[0053] Step 3.3: Use equations (14) and (15) to set the reward function of the distribution network ADN agent at time t: and the i-th microgrid MG i The agent’s reward function at time t

[0054]

[0055]

[0056] In formula (14), and are the penalties for the ADN agent violating the voltage constraint, branch flow constraint, and interactive power constraint at time t, respectively. V , and are the penalty coefficients for the ADN agent violating the voltage constraint, the branch flow constraint, and the interactive power constraint, respectively. The additional reward obtained by the distribution network ADN agent when it satisfies all operating constraints at time t;

[0057] In formula (15), is the i-th microgrid MG i The penalty for the agent violating the upper and lower limit constraints of the ESS state of charge during training, β SOC is the i-th microgrid MG i The penalty coefficient for the agent violating the upper and lower limit constraints of the energy storage ESS charge state during training, is the i-th microgrid MG i The additional reward that the agent receives when satisfying all operational constraints during training;

[0058] Step 3.4: The average reward of each agent changes within the set range for σ consecutive rounds as the agent reward convergence condition.

[0059] The fourth step comprises:

[0060] Step 4.1: Construct a multi-agent reinforcement learning neural network for each agent, including: a policy network and a value network as well as a target policy network and a target value network;

[0061] Randomly initialize the parameters θ of the policy network Q μ and the parameter θ of the value network μ Q , and θ μ ,θ Q Assign values ​​to the target strategy network and target value network as initial parameters respectively;

[0062] Step 4.2, set up experience recycling pool D;

[0063] Step 4.3: Set the current number of training rounds to episode and the maximum number of training rounds to E. max , the current iteration number in each training round is k, the maximum iteration step is K, and the initialization episode is 1;

[0064] Step 4.4, initialize k=1;

[0065] Step 4.5: Initialize the state of the distribution network ADN agent and the microgrid group MMGs agent in the first episode training and

[0066] Step 4.6, the distribution network ADN agent and the microgrid group MMGs agent perform the k-th step interaction under the episode training, and select the k-th step action in a timely manner based on the distribution network-microgrid group master-slave game model, so as to obtain the tuple information of the distribution network ADN agent and the microgrid group MMGs agent under the k-th step iteration of the episode training and store it in the experience recovery pool D;

[0067] Step 4.7, after assigning k+1 to k, return to step 4.4 and execute sequentially until the capacity of the experience recycling pool D is reached;

[0068] Step 4.8, sample M tuple samples of the episode training from the recycling pool D, and according to the evaluation function of the value network of the distribution network ADN agent at the k-th iteration of the episode training and the evaluation function of the value network in the microgrid group MMGs agent at the k-th iteration of the episode training, perform the episode training update on the network parameters of the multi-agent neural network to obtain the multi-agent neural network trained in the episode;

[0069] Step 4.9: After assigning episode+1 to episode, return to step 4.4 and execute sequentially until episode=E max Or when all agents meet the reward convergence conditions, the training is stopped to obtain the trained multi-agent reinforcement learning neural network.

[0070] The step 4.6 comprises:

[0071] Step 4.6.1: Use formula (16) to construct the evaluation function Q of the value network in the k-th iteration of the training of the episode episode,k :

[0072] Q episode,k =r episode,k +γmaxQ(s episode,k+1 ,a episode,k ) (16)

[0073] In formula (16), r episode,k represents the reward value of the kth iteration of the training episode, s episode,k+1 represents the state value of the kth iteration of the training episode, a episode,k represents the action value of the k-th iteration of the training episode; Q(s episode,k+1 ,a episode,k ) represents the value network evaluation function;

[0074] Step 4.6.2: The distribution network ADN agent receives the initial state of the environment at the kth iteration of the training episode. And according to the policy network, select the action in the kth iteration of the episode training And the action Output to the value network,

[0075] Step 4.6.3: Calculate the reward function of the distribution network ADN agent in the k-th iteration of the episode training by using formula (14): And get the state of the k+1th iteration of the training episode Thus, the evaluation function of the value network of the distribution network ADN agent in the k-th iteration of the episode training is calculated by formula (16);

[0076] Step 4.6.4: The MMGs agent in the microgrid group receives the action of the ADN agent in the kth iteration step of the training in the episode And select the action in the kth iteration of the training in the episode through the policy network

[0077] Step 4.6.5: Calculate the reward function of the microgrid group MMGs agent in the k-th iteration of the training of the episode through formula (15): And get the state at the k+1th iteration of the training in the episode Thus, the evaluation function of the value network in the microgrid group MMGs agent at the k-th iteration of the episode training is calculated by formula (16);

[0078] Step 4.6.6: The tuple information of the microgrid group MMGs agent at the kth iteration of the training in the episode And the tuple information of the ADN agent in the kth iteration of the training of the first episode All are stored in the experience recovery pool D.

[0079] The step five comprises:

[0080] Step 5.1, initialize t=1;

[0081] Step 5.2, define and initialize the current number of iterations iteration = 1;

[0082] Step 5.3: Obtain the predicted output power of wind power WT, photovoltaic PV and load Load in the distribution network ADN at time t and the predicted output power of wind power WT, photovoltaic PV and load Load in the microgrid group MMGs at time t, and input them into the trained multi-agent reinforcement learning neural network to obtain the decision actions of the distribution network ADN and the microgrid group MMGs at the iteration at time t, and use formula (9) to calculate the utility function of the distribution network ADN and the microgrid group MMGs at the iteration at time t and

[0083] Step 5.4, assign iteration+1 to iteration, return to step 6.3 and execute sequentially until equation (17) is satisfied, thereby obtaining the optimal dispatching strategy of the distribution network ADN and the microgrid group MMGs at time t;

[0084]

[0085] In formula (17), ξ is a constant; and It represents the utility function of the distribution network ADN and the microgrid group MMGs at the iteration t-1;

[0086] Step 5.5, assign t+1 to t, return to step 5.2 and execute sequentially until t=T, and obtain the operation and scheduling results of the distribution network ADN and the microgrid group MMGs during the T period.

[0087] An electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the distribution network-microgrid group master-slave game optimization scheduling method, and the processor is configured to execute the program stored in the memory.

[0088] The present invention provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the master-slave game optimization scheduling method for the distribution network-microgrid group are executed.

[0089] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0090] 1. The present invention effectively alleviates the pressure of the distribution network to directly dispatch massive distributed resources through microgrid aggregation technology, and solves the problem that some distributed resources cannot be effectively utilized;

[0091] 2. The present invention coordinates the dispatching of the distribution network and the microgrid group, and the microgrid realizes the electric energy interaction with the distribution network through the interconnection line, thus solving the problem of insufficient energy supply caused by the uncertainty of new energy generation in the dispatching process;

[0092] 3. The present invention establishes a two-layer optimization dispatching model of distribution network-microgrid group, which can minimize the fluctuation of net load of distribution network, thereby improving the operation stability of distribution network and reducing the power loss of microgrid group in grid-connected operation;

[0093] 4. According to the hierarchical relationship between the distribution network and the microgrid in actual dispatching, the present invention establishes an electric energy mutual assistance model based on the master-slave game model, realizes the complementary energy production and consumption of the distribution network and the microgrid group, and improves the energy utilization rate of distributed resources in the region;

[0094] 5. The present invention solves the multi-agent scheduling decision-making problem by adopting a multi-agent reinforcement learning algorithm. Multiple agents share power supply and demand information in real time, thereby improving the solution accuracy of the scheduling optimization model to the greatest extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0095] Figure 1 It is a flow chart of the master-slave game optimization dispatching method of distribution network-microgrid group based on multi-agent reinforcement learning algorithm;

[0096] Figure 2 This is a flowchart of the specific steps of the MADDPG multi-agent reinforcement learning algorithm based on the master-slave framework. DETAILED DESCRIPTION

[0097] In this embodiment, a distribution network-microgrid group master-slave game optimization scheduling method based on a multi-agent reinforcement learning algorithm is to study the master-slave game model of the distribution network and the microgrid group, and use a multi-agent reinforcement learning algorithm to simulate the collaborative scheduling process, so as to obtain the optimal optimization scheduling strategy of the distribution network and the microgrid group. Specifically, Figure 1 As shown, the steps are as follows:

[0098] Step 1: Collect historical output data and load data of new energy sources in the region, and draw forecast curves of new energy and load output;

[0099] Step 1.1, collect the historical output data of wind power WT, photovoltaic PV and load Load in a distribution network ADN and N microgrids, and draw the predicted output curves of wind power WT, photovoltaic PV and load Load in the T period respectively;

[0100] Step 1.2: Use formula (1) to establish a distribution network dispatching model with the minimum net load fluctuation rate as the optimization goal. The distribution network ADN smoothes the net load fluctuation by interacting with the microgrid group MMGs and the upper power grid. When the microgrid power supply is insufficient, the distribution network needs to obtain power from the upper power grid to meet the demand:

[0101]

[0102] In formula (1), is the net load fluctuation rate of the distribution network ADN at time t, and are the net loads of the distribution network ADN at time t and time t-1 respectively.

[0103] Step 1.3: Calculate the net load of the distribution network ADN at time t using formula (2):

[0104]

[0105] In formula (2), is the load of the distribution network ADN at time t, and are the wind power WT output and photovoltaic PV output of the distribution network ADN at time t, is the interaction power between the distribution network ADN and the transmission network grid at time t, is the distribution network ADN and the i-th microgrid MG i The interactive power at time t, N represents the number of microgrids in the microgrid group MMGs.

[0106] Step 1.4: Construct branch flow constraints and node voltage constraints of the distribution network ADN to ensure safe and stable operation of the distribution network;

[0107] Step 1.5: Use formula (3) to establish a microgrid group MMGs scheduling model with the optimization goal of minimizing the total loss of microgrid grid-connected operation. Microgrids participate in the ADN scheduling of distribution networks as aggregates of flexible resources, effectively alleviating the pressure of direct scheduling of massive distributed resources by distribution networks:

[0108]

[0109]

[0110]

[0111] In formula (3), is the i-th microgrid MG i The operating loss, is the tie line PCC connected to the i-th microgrid i The transmission power loss at time t is obtained by equation (4): is the internal energy storage ESS of the i-th microgrid i The charge and discharge energy loss at time t is obtained by formula (5);

[0112] In formula (4), is the tie line PCC connected to the i-th microgrid i The loss factor of the transmitted power;

[0113] In formula (5), α ESS is the loss coefficient of the energy storage ESS charging and discharging power, is the internal energy storage ESS of the i-th microgridi The charge and discharge power at time t is season when season Represents the internal energy storage ESS of the i-th microgrid i The discharge power at time t is Represents the internal energy storage ESS of the i-th microgrid i Charging power at time t.

[0114] Step 1.6: Use formula (6) to calculate the PCC of the i-th microgrid via the tie line i Interaction power with the distribution network ADN at time t The participation of microgrids in the coordinated dispatching of distribution networks solves the problem of insufficient energy supply caused by the uncertainty of renewable energy generation during the dispatching process:

[0115]

[0116] In formula (6), and are the i-th microgrid MG i The emitted power and absorbed power at time t are: and are the i-th microgrid MG i At time t, the identification bit of the emitted power and the identification bit of the injected power, when season when season

[0117] Step 1.7: Use formula (7) to establish the tie line PCC connected to the i-th microgrid i Transmission power constraint:

[0118]

[0119] In formula (7), is the tie line PCC connected to the i-th microgrid i Maximum transmission power.

[0120] Step 2: Based on the new energy and load output forecast curve, a master-slave game model of the distribution network ADN and the microgrid group MMGs is established to achieve the complementary energy production and consumption of the distribution network and the microgrid group, and improve the energy utilization rate of distributed resources in the region;

[0121] Step 2.1: Use formula (8) to formulate the master-slave game model for the distribution network ADN and the i-th microgrid MG i Optimization strategy:

[0122]

[0123] In formula (8), The strategy of the distribution network ADN at time t includes: formulating the distribution network ADN and the i-th microgrid MG i The power output at time t and absorbed power is the i-th microgrid MG i The strategy at time t includes: the internal gas turbine MT of the i-th microgrid i Output power at time t And energy storage ESS i Charging power at time t and discharge power φ MMGs It is a collection of microgrid groups MMGs.

[0124] Step 2.2: Use formula (8) to calculate the distribution network ADN and the i-th microgrid MG in the master-slave game model respectively. i The utility function at time t is and

[0125]

[0126] In formula (9), r ADN and They are the distribution network ADN and the i-th microgrid MG i Unit target reward coefficient.

[0127] Step 2.3: According to the iterative update of the strategies of the distribution network ADN and the i-th microgrid MGi in the master-slave game model, the distribution network ADN and the i-th microgrid MGi are established using formula (10): i The master-slave game model solution strategy:

[0128]

[0129] In formula (10), and They are the distribution network ADN and the i-th microgrid MG at time t respectively. i The optimal absorption power and the optimal output power between is the gas turbine MT in the i-th microgrid i The optimal output at time t is and are the energy storage ESS in the i-th microgrid respectively. i The optimal charging power and optimal discharging power at time t.

[0130] Step 3: Convert the master-slave game model of the distribution network ADN and the microgrid group MMGs into a Markov decision process. Based on the Markov decision process, define the state space, action space and reward function of the distribution network ADN agent and the microgrid group MMGs agent respectively for multi-agent reinforcement learning neural network training;

[0131] Step 3.1: Define the state space set of multiple agents at time t in, and They are the distribution network ADN agent and the i-th microgrid MG i The state value observed by the agent at time t when interacting with the environment, and in, and are the i-th microgrid MG i Internal Wind Power WT i and photovoltaic PV i The predicted amount of output power at time t, is the i-th microgrid MG i Medium Load i The predicted amount at time t.

[0132] Step 3.2: Define the action space set of multiple agents at time t in, and They are the distribution network ADN agent and the i-th microgrid MG i The action taken by the agent at time t, and Using equations (11) to (13), we set the distribution network ADN agent and the i-th microgrid MG i The range of actions taken by the agent at time t:

[0133]

[0134]

[0135]

[0136] In formula (11), is the maximum value of the power exchanged between any microgrid MG and the distribution network ADN;

[0137] In formula (12), and are the maximum and minimum output power of any gas turbine MT respectively;

[0138] In formula (13), and are the maximum and minimum charging and discharging power of any energy storage ESS respectively.

[0139] Step 3.3: Use equations (14) and (15) to set the reward function of the distribution network ADN agent at time t: and the i-th microgrid MG i The agent’s reward function at time t

[0140]

[0141]

[0142] In formula (14), and are the penalties for the ADN agent in the distribution network violating the voltage constraint, branch flow constraint and interactive power constraint at time t, α V , and are the penalty coefficients for the ADN agent in the distribution network violating the voltage constraint, branch flow constraint and interactive power constraint, respectively. The additional reward obtained by the distribution network ADN agent when it satisfies all operating constraints at time t;

[0143] In formula (15), is the i-th microgrid MG i The penalty for the agent violating the upper and lower limit constraints of the ESS state of charge during training, β SOC is the i-th microgrid MG i The penalty coefficient for the agent violating the upper and lower limit constraints of the energy storage ESS charge state during training, is the i-th microgrid MG i The additional reward that the agent receives for satisfying all operational constraints during training.

[0144] Step 3.4: Set the average reward of each agent to change within the set range for σ consecutive rounds as the agent reward convergence condition.

[0145] Step 4: Figure 2 As shown in the figure, according to the Markov decision process, the multi-agent reinforcement learning neural network is trained to obtain the trained multi-agent reinforcement learning neural network, which is used to simulate the dispatching process of the distribution network ADN and the microgrid group MMGs. The multi-agents share the power supply and demand information in real time, which maximizes the solution accuracy of the double-layer optimization dispatching model of the distribution network and the microgrid group.

[0146] Step 4.1: Construct a multi-agent reinforcement learning neural network for each agent, including: a policy network and a value network as well as a target policy network and a target value network;

[0147] Randomly initialize the parameters θ of the policy network Q μ and the parameters θ of the value network μ Q , and θ μ ,θ Q Assign values ​​to the target strategy network and target value network as initial parameters respectively;

[0148] Step 4.2, set up experience recycling pool D;

[0149] Step 4.3: Set the current number of training rounds to episode and the maximum number of training rounds to E. max , the current iteration number in each training round is k, the maximum iteration step is K, and the initialization episode is 1;

[0150] Step 4.4, initialize k=1;

[0151] Step 4.5: Initialize the state of the distribution network ADN agent and the microgrid group MMGs agent in the first episode training and

[0152] Step 4.6: The distribution network ADN agent and the microgrid group MMGs agent perform the k-th step interaction under the episode training, and select the k-th step action in a timely manner based on the distribution network-microgrid group master-slave game model, so as to obtain the tuple information of the distribution network ADN agent and the microgrid group MMGs agent under the k-th step iteration of the episode training and store it in the experience recovery pool D.

[0153] Step 4.6.1: The value network receives the initial state of the environment at the kth iteration of the episode back training. and actions Use formula (16) to construct the evaluation function Q of the value network in the k-th iteration of the training episode episode,k , which is used to evaluate the quality of the actions selected by the distribution network ADN agent and the microgrid group MMGs agent:

[0154] Q episode,k =r episode,k +γmaxQ(s episode,k+1 ,a episode,k ) (16)

[0155] In formula (16), r episode,k represents the reward value of the kth iteration of the training episode, s episode,k+1 represents the state value of the kth iteration of the training episode, a episode,k represents the action value of the k-th iteration of the training episode; Q(sepisode,k+1 ,a episode,k ) represents the value network evaluation function;

[0156] Step 4.6.2: The distribution network ADN agent receives the initial state of the environment at the kth iteration of the training episode. And according to the policy network, select the action in the kth iteration of the episode training And the action Output to the value network;

[0157] Step 4.6.3: Calculate the reward function of the distribution network ADN agent in the k-th iteration of the episode training by using formula (14): And get the state of the k+1th iteration of the training episode Thus, the evaluation function of the value network of the distribution network ADN agent in the k-th iteration of the episode training is calculated by formula (16);

[0158] Step 4.6.4: The MMGs agent in the microgrid group receives the action of the ADN agent in the kth iteration step of the training in the episode And select the action in the kth iteration of the training in the episode through the policy network

[0159] Step 4.6.5: Calculate the reward function of the microgrid group MMGs agent in the k-th iteration of the training of the episode through formula (15): And get the state at the k+1th iteration of the training in the episode Thus, the evaluation function of the value network in the microgrid group MMGs agent at the k-th iteration of the episode training is calculated by formula (16);

[0160] Step 4.6.6: The tuple information of the microgrid group MMGs agent at the kth iteration of the training in the episode And the tuple information of the distribution network ADN agent at the kth iteration of the training episode All are stored in the experience recovery pool D.

[0161] Step 4.7: After assigning k+1 to k, return to step 4.4 and execute sequentially until the capacity of the experience recycling pool D is reached.

[0162] Step 4.8, sample M tuple samples of the episode training from the recycling pool D as raw data for training the network parameters of each agent, and according to the evaluation function of the value network of the distribution network ADN agent under the k-th iteration of the episode training and the evaluation function of the value network in the microgrid group MMGs agent under the k-th iteration of the episode training, perform the episode training update on the network parameters of the multi-agent neural network to obtain the multi-agent neural network trained in the episode;

[0163] Step 4.9: After assigning episode+1 to episode, return to step 4.4 and execute sequentially until episode=E max Or when all agents meet the reward convergence conditions, the training is stopped to obtain the trained multi-agent reinforcement learning neural network.

[0164] Step 5: Based on the trained multi-agent reinforcement learning neural network, the master-slave game optimization dispatching scheme of the distribution network-microgrid group in period T is obtained;

[0165] Step 5.1, initialize t=1;

[0166] Step 5.2, define and initialize the current number of iterations iteration = 1;

[0167] Step 5.3: Obtain the predicted output power of wind power WT, photovoltaic PV and load Load in the distribution network ADN at time t and the predicted output power of wind power WT, photovoltaic PV and load Load in the microgrid group MMGs at time t, and input them into the trained multi-agent reinforcement learning neural network. Randomly initialize the interactive power information of the distribution network ADN at time t, iteratively solve the upper and lower layer models, and obtain the decision actions of the distribution network ADN and the microgrid group MMGs at the iteration at time t. Use formula (9) to calculate the utility function of the distribution network ADN and the microgrid group MMGs at the iteration at time t: and

[0168] Step 5.4, assign iteration+1 to iteration, return to step 6.3 and execute sequentially until equation (17) is satisfied. The game process at time t ends, and the optimal dispatching strategy of the distribution network ADN and the microgrid group MMGs at time t is obtained;

[0169]

[0170] In formula (17), ξ is a constant; and It represents the utility function of the distribution network ADN and the microgrid group MMGs at the iteration t-1;

[0171] Step 5.5, assign t+1 to t, return to step 5.2 and execute sequentially until t=T, and obtain the operation and scheduling results of the distribution network ADN and the microgrid group MMGs during the T period.

[0172] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.

[0173] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.

Claims

1. A master-slave game optimization scheduling method for distribution network-microgrid group based on multi-agent reinforcement learning algorithm, characterized in that: It is carried out in the following steps; Step 1: Collect historical output data and load data of new energy sources in the region, and draw forecast curves of new energy and load output; Step 2: Based on the new energy and load output forecast curve, a master-slave game model of the distribution network ADN and the microgrid group MMGs is established; Step 3: Convert the master-slave game model of the distribution network ADN and the microgrid group MMGs into a Markov decision process. Based on the Markov decision process, define the state space, action space and reward function of the distribution network ADN agent and the microgrid group MMGs agent respectively for multi-agent reinforcement learning neural network training; Step 4: According to the Markov decision process, the multi-agent reinforcement learning neural network is trained to obtain the trained multi-agent reinforcement learning neural network, which is used to simulate the dispatching process of the distribution network ADN and the microgrid group MMGs; Step 5: Based on the trained multi-agent reinforcement learning neural network, the master-slave game optimization scheduling scheme of the distribution network-microgrid group in period T is obtained.

2. The master-slave game optimization scheduling method for distribution network-microgrid group based on multi-agent reinforcement learning algorithm according to claim 1 is characterized in that: The step one comprises: Step 1.1, collect the historical output data of wind power WT, photovoltaic PV and load Load in a distribution network ADN and N microgrids, and draw the predicted output curves of wind power WT, photovoltaic PV and load Load in the T period respectively; Step 1.2: Use formula (1) to establish a distribution network dispatching model with the minimum net load fluctuation rate as the optimization goal: In formula (1), is the net load fluctuation rate of the distribution network ADN at time t, and are the net loads of the distribution network ADN at time t and time t-1 respectively; Step 1.3: Calculate the net load of the distribution network ADN at time t using formula (2): In formula (2), is the load of the distribution network ADN at time t, and are the wind power WT output and photovoltaic PV output of the distribution network ADN at time t, is the interaction power between the distribution network ADN and the transmission network grid at time t, is the distribution network ADN and the i-th microgrid MG i The interactive power at time t, N represents the number of microgrids in the microgrid group MMGs; Step 1.4, construct branch flow constraints and node voltage constraints of the distribution network ADN; Step 1.5: Use formula (3) to establish a microgrid group MMGs dispatching model with the minimum total loss of microgrid grid-connected operation as the optimization goal: In formula (3), is the i-th microgrid MG i The operating loss, is the tie line PCC connected to the i-th microgrid i The transmission power loss at time t is obtained by equation (4): is the internal energy storage ESS of the i-th microgrid i The charge and discharge energy loss at time t is obtained by formula (5); In formula (4), is the tie line PCC connected to the i-th microgrid i The loss factor of the transmitted power; In formula (5), α ESS is the loss coefficient of the energy storage ESS charging and discharging power, is the internal energy storage ESS of the i-th microgrid i The charge and discharge power at time t is season when season in, Represents the internal energy storage ESS of the i-th microgrid i The discharge power at time t is Represents the internal energy storage ESS of the i-th microgrid i The charging power at time t is Step 1.6: Use formula (6) to calculate the PCC of the i-th microgrid via the tie line i Interaction power with the distribution network ADN at time t In formula (6), and are the i-th microgrid MG i The power emitted and absorbed at time t, and are the i-th microgrid MG i At time t, the identification bit of the emitted power and the identification bit of the injected power, when season when season Step 1.7: Use formula (7) to establish the tie line PCC connected to the i-th microgrid i Transmission power constraint: In formula (7), is the tie line PCC connected to the i-th microgrid i Maximum transmission power.

3. The master-slave game optimization scheduling method for distribution network-microgrid group based on multi-agent reinforcement learning algorithm according to claim 2 is characterized in that: The second step comprises: Step 2.1: Use formula (8) to formulate the master-slave game model for the distribution network ADN and the i-th microgrid MG i Optimization strategy: In formula (8), is the strategy of the distribution network ADN at time t, including: the distribution network ADN and the i-th microgrid MG i The power output at time t and absorbed power is the i-th microgrid MG i The strategy at time t includes: the internal gas turbine MT of the i-th microgrid i Output power at time t And energy storage ESS i Charging power at time t and discharge power φ MMGs is the collection of microgrid group MMGs; Step 2.2: Use formula (8) to calculate the distribution network ADN and the i-th microgrid MG in the master-slave game model respectively: i The utility function at time t is and In formula (9), r ADN and are the distribution network ADN and the i-th microgrid MG respectively i Unit target reward coefficient; Step 2.3: Use equation (10) to establish the distribution network ADN and the i-th microgrid MG i The master-slave game model solution strategy: In formula (10), and They are the distribution network ADN and the i-th microgrid MG at time t respectively. i The optimal absorption power and the optimal output power between is the gas turbine MT in the i-th microgrid i The optimal output at time t is and are the energy storage ESS in the i-th microgrid respectively. i The optimal charging power and optimal discharging power at time t.

4. The master-slave game optimization scheduling method for distribution network-microgrid group based on multi-agent reinforcement learning algorithm according to claim 3 is characterized in that: The step three comprises: Step 3.1: Define the state space set of multiple agents at time t in, and They are the distribution network ADN agent and the i-th microgrid MG i The state value observed by the agent at time t when interacting with the environment, and in, and are the wind power WT in the i-th microgrid respectively. i and photovoltaic PV i The predicted amount of output power at time t, is the load inside the i-th microgrid i The predicted amount at time t; Step 3.2: Define the action space set of multiple agents at time t in, and They are the distribution network ADN agent and the i-th microgrid MG i The action taken by the agent at time t, and Using equations (11) to (13), we set the distribution network ADN agent and the i-th microgrid MG i The range of actions taken by the agent at time t: In formula (11), is the maximum value of the power exchanged between any microgrid MG and the distribution network ADN; In formula (12), and are the maximum and minimum output power of any gas turbine MT respectively; In formula (13), and are the maximum and minimum charging and discharging power of any energy storage ESS respectively; Step 3.3: Use equations (14) and (15) to set the reward function r of the distribution network ADN agent at time t: t ADN and the i-th microgrid MG i The agent’s reward function at time t In formula (14), and are the penalties for the ADN agent violating the voltage constraint, branch flow constraint, and interactive power constraint at time t, respectively. V , and are the penalty coefficients for the ADN agent violating the voltage constraint, the branch flow constraint, and the interactive power constraint, respectively. The additional reward obtained by the distribution network ADN agent when it satisfies all operating constraints at time t; In formula (15), is the i-th microgrid MG i The penalty for the agent violating the upper and lower limit constraints of the ESS state of charge during training, β SOC is the i-th microgrid MG i The penalty coefficient for the agent violating the upper and lower limit constraints of the energy storage ESS charge state during training, is the i-th microgrid MG i The additional reward that the agent receives when satisfying all operational constraints during training; Step 3.4: The average reward of each agent changes within the set range for σ consecutive rounds as the agent reward convergence condition.

5. The master-slave game optimization scheduling method for distribution network-microgrid group based on multi-agent reinforcement learning algorithm according to claim 4 is characterized in that: The fourth step comprises: Step 4.1: Construct a multi-agent reinforcement learning neural network for each agent, including: a policy network and a value network as well as a target policy network and a target value network; Randomly initialize the parameters θ of the policy network Q μ and the parameters θ of the value network μ Q , and θ μ ,θ Q Assign values ​​to the target strategy network and target value network as initial parameters respectively; Step 4.2, set up experience recycling pool D; Step 4.3: Set the current number of training rounds to episode and the maximum number of training rounds to E. max , the current iteration number in each training round is k, the maximum iteration step is K, and the initialization episode is 1; Step 4.4, initialize k=1; Step 4.5: Initialize the state of the distribution network ADN agent and the microgrid group MMGs agent in the first episode training and Step 4.6, the distribution network ADN agent and the microgrid group MMGs agent perform the k-th step interaction under the episode training, and select the k-th step action in a timely manner based on the distribution network-microgrid group master-slave game model, so as to obtain the tuple information of the distribution network ADN agent and the microgrid group MMGs agent under the k-th step iteration of the episode training and store it in the experience recovery pool D; Step 4.7, after assigning k+1 to k, return to step 4.4 and execute sequentially until the capacity of the experience recycling pool D is reached; Step 4.8, sample M tuple samples of the episode training from the recycling pool D, and according to the evaluation function of the value network of the distribution network ADN agent at the k-th iteration of the episode training and the evaluation function of the value network in the microgrid group MMGs agent at the k-th iteration of the episode training, perform the episode training update on the network parameters of the multi-agent neural network to obtain the multi-agent neural network trained in the episode; Step 4.9: After assigning episode+1 to episode, return to step 4.4 and execute sequentially until episode=E max Or when all agents meet the reward convergence conditions, the training is stopped to obtain the trained multi-agent reinforcement learning neural network.

6. The master-slave game optimization scheduling method for distribution network-microgrid group based on multi-agent reinforcement learning algorithm according to claim 5 is characterized in that: The step 4.6 comprises: Step 4.6.1: Use formula (16) to construct the evaluation function Q of the value network in the k-th iteration of the training of the episode episode,k : Q episode,k =r episode,k +γmaxQ(s episode,k+1 ,a episode,k ) (16) In formula (16), r episode,k represents the reward value of the kth iteration of the training episode, s episode,k+1 represents the state value of the kth iteration of the training episode, a episode,k represents the action value of the k-th iteration of the training episode; Q(s episode,k+1 ,a episode,k ) represents the value network evaluation function; Step 4.6.2: The distribution network ADN agent receives the initial state of the environment at the kth iteration of the training episode. And according to the policy network, select the action in the kth iteration of the episode training And the action Output to the value network, Step 4.6.3: Calculate the reward function of the distribution network ADN agent in the k-th iteration of the episode training by using formula (14): And get the state of the k+1th iteration of the training episode Thus, the evaluation function of the value network of the distribution network ADN agent in the k-th iteration of the episode training is calculated by formula (16); Step 4.6.4: The MMGs agent in the microgrid group receives the action of the ADN agent in the kth iteration step of the training in the episode And select the action in the kth iteration of the training in the episode through the policy network Step 4.6.5: Calculate the reward function of the microgrid group MMGs agent in the k-th iteration of the training of the episode through formula (15): And get the state at the k+1th iteration of the training in the episode Thus, the evaluation function of the value network in the microgrid group MMGs agent at the k-th iteration of the episode training is calculated by formula (16); Step 4.6.6: The tuple information of the microgrid group MMGs agent at the kth iteration of the training in the episode And the tuple information of the ADN agent in the kth iteration of the training of the first episode All are stored in the experience recovery pool D.

7. The master-slave game optimization scheduling method for distribution network-microgrid group based on multi-agent reinforcement learning algorithm according to claim 6 is characterized in that: The step five comprises: Step 5.1, initialize t=1; Step 5.2, define and initialize the current number of iterations iteration = 1; Step 5.3: Obtain the predicted output power of wind power WT, photovoltaic PV and load Load in the distribution network ADN at time t and the predicted output power of wind power WT, photovoltaic PV and load Load in the microgrid group MMGs at time t, and input them into the trained multi-agent reinforcement learning neural network to obtain the decision actions of the distribution network ADN and the microgrid group MMGs at the iteration at time t, and use formula (9) to calculate the utility function of the distribution network ADN and the microgrid group MMGs at the iteration at time t and Step 5.4, assign iteration+1 to iteration, return to step 6.3 and execute sequentially until equation (17) is satisfied, thereby obtaining the optimal dispatching strategy of the distribution network ADN and the microgrid group MMGs at time t; In formula (17), ξ is a constant; and It represents the utility function of the distribution network ADN and the microgrid group MMGs at the iteration t-1; Step 5.5, assign t+1 to t, return to step 5.2 and execute sequentially until t=T, and obtain the operation and scheduling results of the distribution network ADN and the microgrid group MMGs during the T period.

8. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the distribution network-microgrid group master-slave game optimization scheduling method described in any one of claims 1-7, and the processor is configured to execute the program stored in the memory.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the master-slave game optimization scheduling method for the distribution network-microgrid group described in any one of claims 1-7 are executed.

Citation Information

Cited By

  • Collaborative optimization scheduling method for power distribution and micro-grid and related device

    CN119787370A

  • Micro-grid collaborative optimization scheduling method and related device

    CN119787370B

  • Multi-charging-station electric vehicle charging and discharging scheduling method based on reinforcement learning

    CN119831240A

  • Double-layer non-cooperative demand response method based on asynchronous multi-agent reinforcement learning

    CN120563276A

  • Two-layer non-cooperative demand response method based on asynchronous multi-agent reinforcement learning

    CN120563276B