Power distribution and micro-grid collaborative optimization scheduling method and device considering P2P transaction and network reconstruction, and readable storage medium
By considering P2P transactions and network reconstruction in the coordinated optimization of distribution microgrids, combining virtual current and Davidan impedance method with the network pass fee accounting mechanism, and adopting a fully distributed solution method, the problem of adapting to P2P transactions and network reconstruction in the coordinated optimization of distribution microgrids is solved, and efficient network pass fee accounting and rapid optimization solution are achieved.
Patent Information
- Application Number
- CN202510276657.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-27
AI Technical Summary
The prior art is difficult to adapt to P2P transactions and network reconstruction in the collaborative optimization of distribution microgrids, resulting in the difficulty of the network fee accounting mechanism to adapt to flexible topology, and the solution time and convergence times of distributed optimization methods are increased.
A microgrid collaborative optimization scheduling method considering P2P transactions and network reconstruction is proposed, and a microgrid collaborative optimization model is established. A network cross-blocking fee accounting mechanism combining virtual current and Davidan impedance method is proposed. A fully distributed solution method is adopted, including elite genetic algorithm and DQA-ADMM algorithm to solve the master-slave game and generalized Nash game model.
This method can adapt to network reconstruction and topological privacy protection, improve the operating efficiency and economy of coordinated optimization of distribution microgrids, reduce the dependence of distribution network on the superior power grid, and accelerate the solution speed of multi-subject complex game models, and enhance convergence performance.
Smart Images

Figure CN120218495A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distribution microgrid scheduling, and specifically to a collaborative optimal scheduling method, device, and readable storage medium for a distribution microgrid considering P2P trading and network reconfiguration. Background Art
[0002] With the wide access of elements such as renewable energy and energy storage, microgrids have achieved large-scale development, and the interaction between the distribution network and the microgrid has become increasingly frequent and complex. How to rely on the collaborative optimization of the distribution-microgrid (distribution network - microgrid) to carry out inter-regional energy cooperation and mutual assistance, and improve the overall operation efficiency and economy of the system, is one of the major challenges faced by the development of the power system.
[0003] In recent years, many literatures have studied the collaborative optimization methods of distribution networks and microgrids. However, with the development of the P2P market, the P2P trading between multiple microgrids has made the distribution-microgrid collaboration more complex. Some scholars have studied the prosumer P2P trading method considering the security constraints of the distribution network from the perspectives of game theory, clearing mechanism, and constrained optimization, but the economic benefits of the distribution network operator have not been comprehensively considered. The transmission fee is an important part of the economy of the distribution network and the microgrid. By reasonably charging the transmission fee, the distribution network can not only recover the exogenous costs brought by P2P trading, but also non-compulsively regulate the P2P trading behavior of the microgrid to meet the network security constraints. The existing transmission fee accounting mechanisms are mainly based on the stamp method, contract path method, and electrical distance method. The electrical distance method is the currently more commonly used method, which can better quantify the exogenous costs brought by P2P trading to the distribution network. However, the existing methods based on electrical distance need to be carried out under a fixed network structure and are difficult to adapt to flexible topologies. Network reconfiguration, as an important means of distribution network optimal scheduling, plays an important role in the collaborative optimization of the distribution-microgrid and will also change the electrical distance of P2P trading.
[0004] In addition, since the centralized optimization method is difficult to meet the privacy protection requirements of multiple subjects, and its generated large-scale single-layer optimization model is also difficult to solve quickly, many studies use distributed optimization methods to solve the collaborative optimization problems of multiple subjects. The distribution-microgrid collaborative optimization problem contains two levels of game relationships, the master-slave game between the distribution network and the microgrid and the generalized Nash game between multiple microgrids. This will lead to a significant increase in the solution time and convergence times of the distributed optimization method.
[0005] Therefore, it is necessary to study a collaborative optimization method for the distribution-microgrid considering P2P trading, which can adapt to the impact of network reconfiguration and has good solution speed and convergence performance. Summary of the Invention
[0006] To solve the disadvantages and deficiencies existing in the prior art, the present invention proposes a collaborative optimal scheduling method, device, and readable storage medium for a distribution and microgrid considering P2P transactions and network reconfiguration, establishes a distribution-microgrid collaborative optimization model, proposes a transmission fee accounting mechanism adapted to network reconfiguration and topological privacy protection, and solves the collaborative optimization model using a distributed optimization method.
[0007] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0008] A collaborative optimal scheduling method for a distribution and microgrid considering P2P transactions and network reconfiguration, comprising the following steps:
[0009] Step 1: Take the collaborative scheduling stage of the distribution network and the microgrid alliance as the first stage, and the interest distribution stage within the microgrid alliance as the second stage;
[0010] For the first stage, establish a master-slave game model of the distribution network and the microgrid alliance with the operation decision layer of the distribution network as the upper layer and the operation decision layer of the microgrid alliance as the lower layer; in the upper layer of the master-slave game model, take the minimum operation cost of the distribution network as the goal of the operation decision layer of the distribution network, and establish the objective function and constraint conditions of the operation decision layer of the distribution network; in the lower layer of the master-slave game model, take the minimum operation cost of each microgrid without considering the P2P transaction cost in the microgrid alliance as the goal of the operation decision layer of the microgrid alliance, and establish the objective function and constraint conditions of the operation decision layer of the microgrid alliance; the game strategy of the distribution network operator is the transmission fee and the peak-valley period of the electricity price. Considering the impact of network reconfiguration on the electrical distance of P2P transactions, the transmission fee is essentially adjusted through network reconfiguration; the game strategy of the microgrid alliance is the multi-microgrid P2P transaction strategy and the strategy of trading with the distribution network;
[0011] For the second stage, establish the P2P transaction pricing problem in the microgrid alliance as a generalized Nash game model among multiple microgrids. In the generalized Nash game model, establish the objective function and constraint conditions with the minimum purchase cost of P2P transactions in the microgrid alliance as the goal;
[0012] Step 2: Use a fully distributed solution method to solve the master-slave game model established for the first stage and the generalized Nash game model established for the second stage in Step 1. The process is as follows:
[0013] For the master-slave game model in the first stage, the genetic elite algorithm is used to solve the objective function of the distribution network operation decision-making layer to obtain the strategy of the distribution network operation decision-making layer; based on the strategy of the distribution network operation decision-making layer obtained by solving, the DQA-ADMM algorithm is used by the microgrid consortium operation decision-making layer to solve the objective function of the microgrid consortium operation decision-making layer to obtain the distributed optimization result of the microgrid consortium and feedback it to the distribution network operation decision-making layer; the distribution network operation decision-making layer performs multiple iterations in the genetic elite algorithm according to the distributed optimization result feedback by the microgrid consortium operation decision-making layer until the iteration termination condition is met, thereby obtaining the optimal strategy and outputting it to the microgrid consortium operation decision-making layer.
[0014] For the generalized Nash game model in the second stage, based on the optimal strategy determined by the distribution network operation decision-making layer in the first stage, the microgrid consortium operation decision-making layer uses the regularized Nikaido-Isoda function to transform the generalized Nash game model established in the second stage into a global optimization problem to solve the objective function, thereby obtaining the scheduling results of each microgrid in the microgrid consortium.
[0015] Furthermore, in the objective function of the distribution network operation decision-making layer in the first stage of step 1, the distribution network operation cost includes the transaction costs between the distribution network and the superior power grid and the microgrid, and the transmission fees charged by the distribution network.
[0016] The constraint conditions of the objective function of the distribution network operation decision-making layer in the first stage of step 1 include Distflow power flow constraints, node voltage constraints, transaction constraints with the main grid, renewable energy curtailment constraints, network reconfiguration constraints, and time-of-use electricity price constraints.
[0017] Furthermore, in the objective function of the microgrid consortium operation decision-making layer in the first stage of step 1, the operation cost of each microgrid includes the transaction costs between each microgrid and the distribution network and other microgrids, the operation costs of electrical equipment including micro gas turbines, renewable energy, and energy storage in each microgrid, and the transmission fees paid by each microgrid to the distribution network, that is, the transmission fees charged by the distribution network.
[0018] The constraint conditions of the objective function of the microgrid consortium operation decision-making layer in the first stage of step 1 include power balance constraints, energy storage constraints, micro gas turbine output constraints, transaction constraints, and transaction consistency constraints.
[0019] Furthermore, in step 1, by using the virtual power flow method, the distribution network operator can calculate the transmission charges under dynamic topology while optimizing the network reconfiguration strategy. Then, the improved Floyd algorithm is used to solve the electrical distance between the microgrid nodes after network reconfiguration and transmit it to the microgrid. On the premise of protecting the topology privacy, the microgrid can directly calculate the transmission charges collected by the distribution network using the Thevenin impedance method based on the electrical distance from other microgrid nodes.
[0020] Furthermore, the constraint conditions of the objective function of the generalized Nash game model in the second stage of step 1 include the upper and lower limits of the pricing of P2P transactions, the consistency constraint of the transaction prices of the seller and the buyer, and the operating cost constraint of each microgrid.
[0021] Furthermore, in step 2, the elite genetic algorithm and the DQA-ADMM algorithm are used to solve the master-slave game problem of distribution-microgrid coordination. The elite genetic algorithm not only adopts an elite strategy library to improve the convergence performance of the algorithm, but also combines with the mixed integer linear programming method to solve the network reconfiguration strategy, avoiding the problem that the network reconfiguration strategy does not meet the constraints caused by directly using the genetic algorithm. The DQA-ADMM algorithm is nested in the elite genetic algorithm to transform the generalized Nash game model into a global optimization problem and then perform distributed solution on the objective function, thereby obtaining the distributed scheduling results of each microgrid in the microgrid alliance. Among them, DQA makes a parallel improvement to the ADMM algorithm, improving the calculation speed.
[0022] An electronic device includes a memory and a processor. Program instructions that can be read and run by the processor are stored in the memory. When the program instructions are read and run, steps 1 and 2 of the above-mentioned distribution-microgrid collaborative optimization scheduling method considering P2P transactions and network reconfiguration are executed.
[0023] A readable storage medium stores program instructions. When the program instructions in the readable storage medium are read and run, steps 1 and 2 of the above-mentioned distribution-microgrid collaborative optimization scheduling method considering P2P transactions and network reconfiguration are executed.
[0024] First, based on the master-slave game and generalized Nash game theories, the present invention establishes a two-stage distribution-microgrid collaborative hybrid game model considering P2P transactions among multiple microgrids. And considering that the transmission charge mechanism based on electrical distance is difficult to adapt to the flexible topology of the distribution network, a transmission charge accounting mechanism combining virtual power flow and Thevenin impedance method is proposed. This mechanism can not only adapt to the impact of network reconfiguration but also protect the privacy information of the distribution network topology. Then, the present invention proposes a fully distributed solution process, uses the improved elite genetic algorithm and DQA-ADMM algorithm to solve the master-slave game, and uses the regularized NI function to solve the non-cooperative game.
[0025] Compared with the prior art, the advantages of the present invention are as follows:
[0026] (1) The collaborative optimal scheduling framework and model of the distribution and microgrid considering P2P transactions and network reconstruction designed by the present invention can fully consider the impacts of P2P transactions among multiple microgrids and network reconstruction of the distribution network on the coordination of the distribution and microgrid, promote local energy sharing, reduce the dependence of the distribution network on the superior grid, and improve the overall operation efficiency of the system.
[0027] (2) The cross-network fee accounting mechanism proposed by the present invention that adapts to network reconstruction and topology privacy protection can fully consider the impact of network reconstruction on the electrical distance between multiple microgrids. On the one hand, it enables the distribution network to optimize the network reconstruction strategy while considering the cross-network fee, and on the other hand, it can guide the adjustment of P2P transactions among multiple microgrids in a direction beneficial to the operation of the distribution network.
[0028] (3) The fully distributed solution method designed by the present invention can, on the one hand, protect the privacy information of each subject, and on the other hand, can also accelerate the solution speed of the proposed multi-agent complex game model and enhance the convergence performance. Description of the Drawings
[0029] Figure 1 It is the collaborative optimal framework diagram of the distribution and microgrid considering P2P transactions proposed in this embodiment.
[0030] Figure 2 It is the schematic diagram of the cross-network fee accounting mechanism proposed in this embodiment.
[0031] Figure 3 It is the schematic diagram of the fully distributed solution method for the collaborative optimization of the distribution and microgrid considering P2P transactions proposed in this embodiment.
[0032] Figure 4 It is the improved IEEE33-node topology diagram.
[0033] Figure 5 It is the trading strategy diagram of MG1 after considering P2P transactions.
[0034] Figure 6 It is the algorithm convergence diagram for solving the master-slave game. Detailed Embodiment
[0035] The present invention will be further described below in conjunction with the drawings and embodiments.
[0036] This embodiment discloses a collaborative optimal scheduling method for the distribution and microgrid considering P2P transactions and network reconstruction, including the following steps:
[0037] Step 1. The collaborative optimal scheduling framework of the distribution and microgrid considering P2P transactions and network reconstruction in this embodiment is as Figure 1As shown in the figure, the collaborative optimal scheduling framework of the distribution microgrid is divided into two stages. The first stage is the collaborative scheduling stage of the distribution network and the microgrid alliance, and the second stage is the interest distribution stage within the microgrid alliance. The specific content of each stage is as follows:
[0038] In the first stage, the distribution network operator changes the trading willingness of the microgrid by adjusting the transmission fee and the peak-valley periods of the electricity price, so that its trading strategy changes in the direction conducive to the operation of the distribution network. Considering the impact of network reconfiguration on the electrical distance of P2P transactions, the distribution network essentially adjusts the transmission fee through network reconfiguration. Multiple microgrids operate in cooperation in the form of an alliance. Each microgrid within the alliance conducts distributed optimization and transmits its trading strategy to the distribution network. In the second stage, multiple microgrids within the alliance conduct P2P trading pricing to distribute the additional benefits obtained from the alliance cooperation.
[0039] In the first stage, according to the principal-agent game theory, the distribution network operator is the leader of the game, and its game strategy is the transmission fee and the peak-valley periods of the electricity price. The microgrid alliance is the follower of the game, and its game strategy is the P2P trading strategy of multiple microgrids and the strategy of trading with the distribution network. The distribution network operator adjusts the peak-valley periods of the electricity price and the transmission fee to make the operation strategy of the microgrid alliance change in the direction conducive to the operation of the distribution network, forming a Stackelberg game.
[0040] In the second stage, due to self-interest, multiple microgrids conduct P2P pricing based on non-cooperative games, and the game strategy is the expected P2P trading price. Each microgrid needs to make independent decisions and seek to maximize its own interests while considering the P2P pricing willingness of other microgrids. The final P2P pricing strategy needs to reach an equilibrium state, that is, the prices of the buyer and the seller are equal, forming a generalized Nash game.
[0041] Therefore, in this embodiment, for the first stage, taking the operation decision-making layer of the distribution network as the upper layer and the operation decision-making layer of the microgrid alliance as the lower layer, a principal-agent game model of the distribution network and the microgrid alliance is established; in the upper layer of the principal-agent game model, with the minimum operation cost of the distribution network as the goal of the operation decision-making layer of the distribution network, the objective function and constraint conditions of the operation decision-making layer of the distribution network are established; in the lower layer of the principal-agent game model, with the minimum operation cost of each microgrid when not considering the P2P transaction cost in the microgrid alliance as the goal of the operation decision-making layer of the microgrid alliance, the objective function and constraint conditions of the operation decision-making layer of the microgrid alliance are established. For the second stage, in this embodiment, the P2P trading pricing problem in the microgrid alliance is established as a generalized Nash game model among multiple microgrids, and in the generalized Nash game model, the objective function and constraint conditions are established with the minimum P2P trading power purchase cost in the microgrid alliance as the goal. The specific description is as follows:
[0042] (1) The principal-agent game model based on the collaborative optimal scheduling framework of the distribution microgrid in the first stage
[0043] In this embodiment, a master-slave game model of the distribution network operator and the microgrid alliance is established. The upper layer of the master-slave game model is the distribution network operation decision-making layer, which aims to minimize the cost and transmits the transmission fee and the network reconstruction strategy to the lower layer. The lower layer is the microgrid alliance operation decision-making layer. The microgrid alliance operation decision-making layer will obtain its own operation and trading plan with the lowest cost according to the strategy of the upper layer, and then feedback it to the upper layer. This process is continuously iterated until an equilibrium solution is obtained.
[0044] The mathematical expression form of the master-slave game model is as follows:
[0045] (1.1) Upper layer: Distribution network operation decision-making layer
[0046] 1.1a) Objective function of the distribution network operation decision-making layer:
[0047] The upper layer aims to minimize the operation cost of the distribution network, including the transaction costs C trade with the superior power grid and the microgrid, and the collected transmission fee C net . Its mathematical expression is:
[0048] minC DNO =C trade -C net
[0049]
[0050] In the formula, γ respectively represent the prices of purchasing and selling electricity from the main grid, the prices of purchasing and selling electricity from the microgrid, and the unit price of the transmission fee; respectively represent the purchased and sold electricity quantities of the microgrid from the main grid at node i at time t, the purchased and sold electricity quantities from the microgrid, and the P2P selling electric power of the microgrid at node i to the microgrid at node j; d ij,t represents the electrical distance between the microgrids at nodes i and j; N node represents the number of nodes; Ψ MG is the set of microgrid nodes.
[0051] 1.1b) Constraint conditions of the objective function of the distribution network operation decision-making layer, including Distflow power flow constraint, node voltage constraint, transaction constraint with the main grid, renewable energy curtailment constraint, network reconstruction constraint, and electricity price peak-valley period constraint, are as follows:
[0052] i) Distflow power flow constraint, as shown in the following formula:
[0053]
[0054]
[0055]
[0056]
[0057] Wherein, P ij,t and Q ij,t are the active power and reactive power on branch ij at time t, respectively. P ki,t and Q ki,t are the active power and reactive power on branch ki at time t, respectively; P load,i,t represents the electricity sales volume to power users; is the square of the current on branch ij at time t; r ki and x ki represent the resistance and reactance of branch ki, respectively; is the square of the voltage at node i at time t; and are the injected active power and reactive power at node i at time t; P RE,i,t represents the renewable energy power generation at node i at time t; end(i) and head(i) represent the set of child nodes and the set of parent nodes of node i, respectively; Ψ N and Ψ line represent the set of nodes and the set of branches, respectively. ii) Node voltage constraint, as shown in the following formula:
[0058]
[0059] Wherein, and are the minimum and maximum values of the square of the voltage at node i, respectively.
[0060] iii) Transaction constraint with the main grid, as shown in the following formula:
[0061]
[0062] Wherein, P TN,max is the maximum transaction electricity volume between the distribution network and the main grid.
[0063] iv) Renewable energy curtailment constraint, as shown in the following formula:
[0064]
[0065]
[0066] Wherein, k RE is the maximum curtailment ratio of renewable energy, is the output of renewable energy before curtailment, and ΔP RE,i,t is the curtailed renewable energy power generation.
[0067] v) Network reconfiguration constraint, including the following constraints:
[0068] v.a) Voltage drop constraint
[0069] Network reconfiguration may cause the voltage of the disconnected branch not to satisfy the general voltage drop constraint. The big M method is used for relaxation to generate the following linear voltage drop constraint:
[0070]
[0071] In the formula, δ ij,t represents the connection status of branch ij at time t, 0 means the branch is disconnected, and 1 means it is connected; M is an infinitely large number; is the square of the voltage of node j at time t.
[0072] v.b) Radial topology constraint
[0073] To protect setting and reduce short-circuit current, it is required that the distribution network operates in a radial connection, that is, there is no loop topology structure in the network. Therefore, the following radial topology constraint is established:
[0074] W ij,t +W ji,t =δ ij,t
[0075]
[0076] In the formula, W ij,t represents the power flow direction variable of branch ij at time t, equal to 1 means node j is the parent node of node i, and W ji,t represents the power flow direction variable of branch ji at time t; Ψ TN represents the set of nodes connected to the main power grid.
[0077]
[0078] In the formula, N TN represents the number of substation nodes.
[0079] v.c) To ensure that the active power, reactive power, and current on the disconnected branch are all 0, and the line capacity is not exceeded, the following constraints are introduced:
[0080] -δ ij,t S max ≤P ij,t ≤δ ij,t S max
[0081] -δ ij,t S max ≤Q ij,t ≤δ ij,t S max
[0082]
[0083] Wherein, Smax, are respectively the maximum line capacity and the maximum value of the square of the current of branch ij.
[0084] vi) Peak-valley period constraint of electricity price, as shown in the following formula:
[0085]
[0086] Wherein, respectively represent the price of the distribution network purchasing electricity from the microgrid and selling electricity to the microgrid during the peak period, normal period and valley period; Ψ p , Ψ f and Ψ v respectively represent the set of time moments during the peak period, normal period and valley period.
[0087] (1.2) Lower layer: Microgrid alliance operation decision-making layer
[0088] 1.2a) Objective function of the microgrid alliance operation decision-making layer:
[0089] The operation cost of a single microgrid includes three parts, namely the transaction cost with the distribution network and other microgrids the operation cost of electrical equipment including micro gas turbines, renewable energy, and energy storage and the transmission fee paid to the distribution network as shown in the following formula:
[0090]
[0091] Wherein, is the price of P2P transaction between each microgrid and other microgrids; c MT , c RE , c ESS are respectively the power generation price of the micro gas turbine, the penalty unit price for light curtailment, and the operation and maintenance unit price of the energy storage; P MT,i,t , ΔP RE,i,t , P ESS,i,t are respectively the power generation power of the micro gas turbine, the renewable energy curtailment amount, and the energy storage charging power (less than 0 indicates discharging) of the microgrid at node i at time t.
[0092] To pursue the overall interests, multiple microgrids conduct transactions with the distribution network operator in the form of an alliance. Therefore, the cost of P2P transactions does not need to be considered in the alliance interests. The objective function of the microgrid alliance operation decision-making layer is as shown below:
[0093]
[0094] 1.2b) Constraints of the objective function for the operation decision-making layer of the microgrid alliance, including power balance constraint, energy storage constraint, output constraint of micro gas turbines, trading constraint, and trading consistency constraint, are as follows:
[0095] i) Power balance constraint, as shown in the following formula:
[0096]
[0097] In the formula, P load,i,t is the load carried by the microgrid at node i.
[0098] ii) Energy storage constraint, as shown in the following formula:
[0099] -P ESS,max ≤P ESS,i,t ≤P ESS,max
[0100]
[0101] In the formula, P ESS,max is the maximum charge and discharge power of the energy storage; is the stored energy of the energy storage of the i-th microgrid at time t, is the stored energy of the energy storage of the i-th microgrid at time t+1; is the self-discharge loss rate of the energy storage; SOC min and SOC max represent the lower and upper limits of the SOC of the energy storage, which vary according to the physical properties of the energy storage device; represents the maximum stored energy of the energy storage.
[0102] iii) Output constraint of micro gas turbines, as shown in the following formula:
[0103]
[0104] In the formula, and represent the minimum and maximum power generation of the micro gas turbine, respectively.
[0105] iv) Trading constraint, as shown in the following formula:
[0106]
[0107]
[0108] In the formula, represents the maximum trading volume of P2P trading; represents the maximum trading volume of trading with the distribution network; represents the power limit allowed to flow through the PCC coupling point.
[0109] v) Transaction consistency constraints, as shown in the following formula:
[0110] Excluding the operation constraints of a single microgrid, the P2P transactions within the alliance also need to satisfy the consistency constraints, that is, the electricity purchase quantity of one party in the P2P transaction is equal to the electricity sales quantity of the other party:
[0111]
[0112] In the formula, represents the P2P electricity sales power from the microgrid at node j to the microgrid at node i.
[0113] (2) Generalized Nash game model among multiple microgrids in the second stage
[0114] After determining the transaction and operation strategies of the distribution network and microgrids in the master-slave game stage, it is necessary to further formulate the P2P transaction price. When the microgrid alliance cooperates, some microgrids conduct P2P transactions for the welfare of the alliance and sacrifice their own interests, while some microgrids obtain better benefits through cooperative operation than independent operation. Therefore, it is necessary to achieve the distribution of benefits in cooperative operation during the pricing stage and balance the interests sacrificed by each microgrid for the alliance.
[0115] In this embodiment, considering the self-interest of each microgrid, the P2P transaction pricing problem is established as a generalized Nash game model among multiple microgrids. The objective function in the generalized Nash game model is to minimize the P2P transaction power purchase cost f MGi , as shown in the following formula:
[0116]
[0117] In the formula, represents the P2P electricity sales price from the microgrid at node i to the microgrid at node j at time t.
[0118] The constraint conditions of the objective function in the generalized Nash game model include the upper and lower limits of P2P transaction pricing, the consistency constraints of the transaction prices of the seller and the buyer, and the operation cost constraints of each microgrid, which are specifically as follows:
[0119] a) To avoid malicious competition among microgrids, this embodiment formulates the upper and lower limits of P2P transaction pricing as constraint conditions, as shown in the following formula:
[0120]
[0121] In the formula, and represent the lower limit and upper limit of the P2P transaction price respectively.
[0122] b) In P2P transactions, the transaction prices of the seller and the buyer need to satisfy the consistency constraint, as shown in the following formula:
[0123]
[0124] In the formula, represents the P2P power selling price from the microgrid at node j to the microgrid at node i at time t.
[0125] c) After the cooperative operation and benefit distribution of the microgrid alliance, the operating costs of each microgrid within the alliance need to be less than its individual operating costs. Thus, the operating cost constraint for each microgrid is established as shown in the following formula:
[0126]
[0127] In the formula, represents the operating cost of the microgrid after cooperative operation of the alliance, represents the operating cost of the microgrid operating independently.
[0128] (3) In this embodiment, the virtual power flow method is used in combination with the Floyd algorithm to solve the electrical distance between the microgrid nodes after network reconstruction. According to the electrical distance between the microgrid nodes, the transmission access fee charged by the distribution network is calculated using the Thevenin impedance method, so that the transmission access fee accounting mechanism can adapt to network reconstruction and topology privacy protection, as Figure 2 shown. The specific description is as follows:
[0129] The formula for calculating the electrical distance based on the Thevenin impedance method in the prior art is as shown in the following formula:
[0130]
[0131] Z l(a,b) =|Z aa +Z bb -Z ab -Z ba |
[0132] In the formula, represents the set of distribution network branches between microgrids i and j, l(a,b) represents the line segment between nodes a and b, and Z l(a,b) represents the electrical distance between nodes a and b, and Z ab =1 / Y ab is the reciprocal of the element of the node admittance matrix, and Z aa 、Z bb 、Z ba are the same.
[0133] Since the network reconstruction of the distribution network will change its topological structure, and thus change the line set from microgrid i to j, resulting in dij,t It is difficult to solve. Therefore, the Thevenin impedance method is not applicable to variable topologies. To address this issue, this embodiment proposes a method for calculating the transmission access fee based on virtual power flow, and the calculation formula is as follows:
[0134]
[0135] In the formula, represents the virtual power flow between node i and node j of the distribution network at time t, represents the virtual power flow between node k and node i of the distribution network at time t; Z ij is the impedance of branch ij; represents the P2P electricity sales volume from the microgrid at node i to the microgrid at node j at time t; end(i) and head(i) represent the set of child nodes and parent nodes of node i; Ψ N represents the set of nodes. Although this method can adapt to flexible topologies, it involves the topological information of the distribution network, and the microgrid cannot use this method to calculate the transmission access fee it needs to pay.
[0136] Research has found that the virtual power flow method and the Thevenin impedance method are equivalent at the distribution network level, that is:
[0137]
[0138] Therefore, this embodiment proposes a method for calculating the transmission access fee using virtual power flow - Thevenin impedance, and the process is as follows:
[0139] First, use virtual power flow to improve the distribution network operation model, enabling the distribution network operator to calculate the transmission access fee under dynamic topologies and simultaneously optimize the network reconfiguration strategy. Then, use the improved Floyd algorithm to solve the electrical distance after the topology change and transmit the electrical distance to the corresponding microgrid.
[0140] Then, the microgrid calculates the transmission access fee using the Thevenin impedance method based on the electrical distance informed by the distribution network and optimizes its own operation strategy.
[0141] The above - mentioned method for calculating the transmission access fee can adapt to the network reconfiguration of the distribution network and has a protective effect on the topological privacy information of the distribution network.
[0142] Step 2: Use a fully distributed solution method to solve the master - slave game model established for the first stage and the generalized Nash game model established for the second stage in Step 1.
[0143] In this embodiment, to protect the privacy of each entity, a fully distributed solution method is proposed. As Figure 3As shown in the figure, in the first stage, the elite genetic algorithm and the DQA-ADMM algorithm are used to solve the master-slave game model. The elite genetic algorithm is used to determine the optimal strategy of the distribution network operator, and the DQA-ADMM algorithm is used to perform internal parallel optimal scheduling for multiple microgrids. In the second stage, based on the transaction and scheduling results obtained in the previous stage, the regularized Nikaido-Isoda function is used to transform and distribute the solution of the generalized Nash game model. The specific description is as follows:
[0144] (A) For the master-slave game model in the first stage, the genetic elite algorithm is used to solve the objective function of the distribution network operation decision-making layer to obtain the strategy of the distribution network operation decision-making layer. Then, based on the strategy of the distribution network operation decision-making layer obtained by the solution, the DQA-ADMM algorithm is used by the microgrid coalition operation decision-making layer to solve the objective function of the microgrid coalition operation decision-making layer to obtain the distributed optimization result of the microgrid coalition and feedback it to the distribution network operation decision-making layer. According to the distributed optimization result feedback by the microgrid coalition operation decision-making layer, the distribution network operation decision-making layer performs multiple iterations in the genetic elite algorithm until the iteration termination condition is met, thereby obtaining the optimal strategy and outputting it to the microgrid coalition operation decision-making layer.
[0145] In this embodiment, the specific steps of using the genetic algorithm to solve the master-slave game are as follows:
[0146] S1) Chromosome encoding and decoding. The peak-valley period of electricity price and the network reconfiguration strategy are regarded as a chromosome, defined as X = [U, D]. Among them, U represents the peak-valley state of electricity price at 24 moments in a day, and D represents the network reconfiguration strategy at each moment. Since the peak-valley state and the network reconfiguration strategy are discrete variables of different natures, this study uses the symbolic encoding method and the binary encoding method to encode U and D respectively. Among them, U contains 24 genes, and 1, 2, and 3 are used to represent the peak, flat, and valley period states respectively. The symbolic encoding and decoding methods are as follows:
[0147]
[0148] The network reconfiguration strategy D contains N * 24 genes, where N represents the number of tie switches and sectional switches. The binary encoding method is used to encode and decode D, and 0 and 1 represent the switch off and on states respectively.
[0149] S2) Generation of the initial chromosome. Since the number of genes in the chromosome is large, the initial chromosome will have a great impact on the convergence performance of the algorithm. Therefore, the initial chromosome should be reasonably set according to the historical power sales curve of the distribution network.
[0150] S3) Selection. The selection mechanism aims to select the parental chromosomes with higher fitness from the current population so that excellent offspring can be produced through crossover and mutation. The random competition selection strategy is adopted. Each time, two chromosomes are randomly selected from the population for comparison, and the chromosome with higher fitness is selected for mutation operation. This process is repeated until the population size is reached.
[0151] S4) Crossover. A chromosome contains two segments. Since the network reconstruction constraints of the D segment are relatively complex and crossover is likely to violate the constraints, only the U segment is crossed here: Select a pair of chromosomes, randomly generate two numbers between 1 and 24 to determine the positions, and exchange the middle segments.
[0152] S5) Mutation. The U and D segments in the chromosome are mutated separately. For the U segment, first randomly generate an integer to determine the mutation position, and then randomly generate an integer between 1 and 3 to mutate this position. For the D segment, to avoid the problem of violating the constraints after mutation, a mathematical optimization method is used for mutation, that is, according to the microgrid power purchase and sale strategy received in the previous iteration, optimize with the lowest cost (including the transmission fee) as the goal, and the obtained network reconstruction strategy is used as the mutated D segment.
[0153] S6) Strategy correction. To avoid the malicious price increase of the distribution network, it is necessary to limit the number of peak and valley periods and perform strategy correction. When the limit is not met, random mutation is performed to meet the constraints.
[0154] S7) Calculate fitness. Here, the revenue of the distribution network operator is used as the chromosome fitness. The higher the fitness, the better the strategy represented by the chromosome. The strategy represented by the chromosome obtained above is passed to the multi - microgrid, and the fitness of the chromosome is calculated according to the results reflected.
[0155] S8) Elite retention strategy. The long - term elite strategy is adopted, that is, an elite strategy library is established, and the elite strategy library is continuously updated according to the fitness level during the whole process of population evolution. Each time of evolution, a chromosome is randomly selected from the elite strategy library to replace the chromosome with the worst fitness in the population.
[0156] S9) Convergence / termination iteration rule. If the number of population evolution reaches the maximum, or the fitness of the best chromosome remains unchanged for several consecutive generations, the iteration is terminated, and the best one in the elite strategy library is selected as the final strategy.
[0157] The topology of the improved IEEE33 - node system is as Figure 4 shown. There are 3 microgrids in this system, namely MG1, MG2, and MG3. Each microgrid is equipped with devices such as micro - gas turbines, energy storage, and renewable energy.
[0158] The optimal trading strategy of MG1 obtained is as Figure 5As shown, the convergence graphs of the elite genetic algorithm and the conventional genetic algorithm are as Figure 6 shown. In Figure 4 the improved IEEE 33-node system shown, compared with the distribution-microgrid coordination without considering P2P transactions, the method proposed in this embodiment reduces the power purchase amount of the microgrid from the distribution grid and reduces the dependence of the distribution grid on the superior grid. Also in this system, compared with the conventional genetic algorithm, the convergence speed of the elite genetic algorithm adopted in this embodiment is reduced and the convergence performance is improved. It can be seen that the method proposed in this embodiment can not only optimize the coordinated operation and transactions between the distribution grid and the microgrid, reduce the dependence on the superior grid, improve the overall operation efficiency of the system, but also improve the convergence speed and performance of the algorithm.
[0159] In this embodiment, the process of using the DQA-ADMM algorithm to solve the objective function of the operation decision layer of the microgrid alliance for distributed optimization is as follows:
[0160] Q1) Using the augmented Lagrangian method to relax the consistency constraint condition of P2P transactions, the model becomes the following form:
[0161]
[0162] In the formula, C MGs is the cost of the microgrid alliance; λ ij,t is the Lagrange multiplier, and ρ ij,t is the penalty factor; X i represents the feasible region formed by the operation constraints of the microgrid at node i.
[0163] Q2) Using DQA to parallelize the ADMM algorithm. First, expand the penalty term in the augmented Lagrangian function, and then use the first-order Taylor expansion to linearize the coupling term at .
[0164]
[0165] In the formula, and respectively represent the optimal strategies obtained in the (k - 1)-th iteration. Combining the above formulas, the Lagrange penalty term can be rewritten as the following form:
[0166]
[0167] In the formula, Constant represents a constant that can be ignored in the optimization.
[0168] Furthermore, the augmented Lagrangian model can be rewritten as:
[0169]
[0170] Q3) The DQA improvement is completed, and the parallel and decentralized optimization of each microgrid can be achieved by using the ADMM algorithm. In the k-th iteration of the algorithm, the update formulas for the decision variables, Lagrange multipliers, and penalty factors are as follows:
[0171]
[0172] where τ mg and β mg represent the update step size of the optimal solution and the update step size of the penalty factor, respectively; the remaining parameters have been defined in the previous text. Note that the superscript k represents the value in the k-th iteration, and the superscript k + 1 represents the updated value in the (k + 1)-th iteration. The termination condition of the algorithm is:
[0173]
[0174] where and represent the allowed maximum errors, respectively.
[0175] (C) For the generalized Nash game model in the second stage, based on the optimal strategy determined by the distribution network operation decision layer in the first stage, the microgrid coalition operation decision layer uses the regularized Nikaido-Isoda function to transform the generalized Nash game model established in the second stage into a global optimization problem to solve the objective function, and thus obtains the scheduling results of each microgrid in the microgrid coalition.
[0176] The generalized Nash game problem generally cannot be directly solved. In this embodiment, the Nash game problem with multiple participants is transformed into a global optimization problem through the Nikaido-Isoda function, and then the Nash equilibrium is solved. The definition of the regularized Nikaido-Isoda function is as follows:
[0177]
[0178] where x i represents the strategy of the i-th participant, x -i represents the strategies of other participants, represents the strategy feasible for the i-th participant according to the strategies of other participants; ω is a positive constant coefficient. The Nikaido-Isoda function reflects the change in the total cost caused by the change in the strategy of participant i when the strategies of other participants remain unchanged. Further, define the following function:
[0179]
[0180] This function has the following properties: 1) For all x i ∈S i (x-i ) all have 2) if and only if and V(x * ) = 0, x * is the generalized Nash equilibrium. Therefore, the generalized Nash equilibrium solution can be equivalently solved through the following model:
[0181] minV(x)
[0182] s.t. x i ∈S i (x -i )
[0183] Substitute the generalized Nash game model of the P2P trading pricing of the multi - microgrid into the above model and organize it to get:
[0184]
[0185] In the formula, is equivalent to the previous represents the possible price set by the microgrid at node i, represents the P2P trading price set by other microgrids, represents when the P2P trading price set by other microgrids is , the set of feasible prices of the microgrid at node i.
[0186] Regarding the convex - optimization separability of the generalized Nash game model of the P2P trading pricing of the multi - microgrid and considering the privacy - protection requirements of each subject, this embodiment adopts a distributed solution method to solve the objective function distributively, thereby obtaining the distributed scheduling results of each microgrid in the microgrid coalition. The specific process is as follows:
[0187] M1) Initialize the data, set the iteration number l to 1, initialize the strategy error ε, positive constant ω;
[0188] M2) Take the strategy at the l - th time as the boundary condition, and use the DQA - ADMM method to solve the inner - layer min problem in the model to obtain the strategy at the l - th time. When using the DQA - ADMM method, the augmented Lagrangian formula of each subject is:
[0189]
[0190] M3) According to the obtained in step 2, update the strategy at the (l + 1) - th time as:
[0191]
[0192] M4) Iterate steps M2)-M3), and when the convergence criterion is met, the iteration stops and the final result is obtained. The convergence criterion is:
[0193]
[0194] where ε represents the tolerable error and is set by the calculator itself.
[0195] This embodiment also discloses a readable storage medium that stores program instructions. When the program instructions in the readable storage medium are read and run, steps 1 and 2 of the above-mentioned cooperative optimal scheduling method for a distribution microgrid considering P2P transactions and network reconstruction are executed.
[0196] This embodiment also discloses an electronic device, including a memory and a processor. The memory stores program instructions that can be read and run by the processor. When the program instructions are read and run, steps 1 and 2 of the above-mentioned cooperative optimal scheduling method for a distribution microgrid considering P2P transactions and network reconstruction are executed.
[0197] The preferred embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings. The embodiments described in the present invention are only descriptions of the preferred embodiments of the present invention, and do not limit the concept and scope of the present invention. Among the various specific technical features described in the above specific embodiments, they can be combined in any suitable manner without contradiction. As long as such a combination does not violate the idea of the present invention, it should also be regarded as the content disclosed in this disclosure. To avoid unnecessary repetition, the present invention does not separately describe various possible combination methods.
[0198] The present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention and without departing from the design idea of the present invention, various variations and improvements made by those skilled in the art to the technical solutions of the present invention should fall within the protection scope of the present invention. The technical content claimed by the present invention has been fully recorded in the claims.
Claims
1. A coordinated optimization dispatching method for distribution microgrids considering P2P transactions and network reconstruction, characterized in that: The following steps are involved: Step 1: The coordinated dispatching phase of the distribution network and the microgrid alliance is the first phase, and the benefit distribution phase within the microgrid alliance is the second phase; For the first stage, a master-slave game model of the distribution network and the microgrid alliance is established with the distribution network operation decision layer as the upper layer and the microgrid alliance operation decision layer as the lower layer; in the upper layer of the master-slave game model, the distribution network operation cost is minimized as the goal of the distribution network operation decision layer, and the objective function and constraint conditions of the distribution network operation decision layer are established; In the lower layer of the master-slave game model, the operation cost of each microgrid is minimized when the P2P transaction cost in the microgrid alliance is not considered as the goal of the microgrid alliance operation decision layer, and the objective function and constraint conditions of the microgrid alliance operation decision layer are established; The game strategies of distribution network operators are access fees and peak and valley periods of electricity prices. Considering the impact of network reconstruction on the electrical distance of P2P transactions, access fees are essentially adjusted through network reconstruction. The game strategies of microgrid alliances are multi-microgrid P2P transaction strategies and strategies for transactions with distribution networks. For the second stage, the P2P transaction pricing problem in the microgrid alliance is established as a generalized Nash game model among multiple microgrids. In the generalized Nash game model, the objective function and constraints are established with the goal of minimizing the P2P transaction power purchase cost in the microgrid alliance. Step 2: Use a fully distributed solution method to solve the master-slave game model established in the first stage and the generalized Nash game model established in the second stage in step 1. The process is as follows: For the master-slave game model in the first stage, the genetic elite algorithm is used to solve the objective function of the distribution network operation decision-making layer to obtain the strategy of the distribution network operation decision-making layer; the microgrid alliance operation decision-making layer is based on the strategy of the distribution network operation decision-making layer obtained by solving the DQA-ADMM algorithm to solve the objective function of the microgrid alliance operation decision-making layer to obtain the distributed optimization results of the microgrid alliance and feed them back to the distribution network operation decision-making layer; The distribution network operation decision layer performs multiple iterations in the genetic elite algorithm according to the distributed optimization results fed back by the microgrid alliance operation decision layer until the iteration termination condition is met, thereby obtaining the optimal strategy and outputting it to the microgrid alliance operation decision layer; For the generalized Nash game model in the second stage, the microgrid alliance operation decision-making layer uses the regularized Nikaido-Isoda function to transform the generalized Nash game model established in the second stage into a global optimization problem based on the optimal strategy determined by the distribution network operation decision-making layer in the first stage to solve the objective function, thereby obtaining the dispatch results of each microgrid in the microgrid alliance.
2. The method for coordinated optimization and dispatching of distribution and microgrids considering P2P transactions and network reconstruction according to claim 1 is characterized in that: In the objective function of the distribution network operation decision layer in the first stage of step 1, the distribution network operation cost includes the transaction cost between the distribution network and the upper-level power grid and microgrid, and the access fee collected by the distribution network; The constraints of the objective function of the distribution network operation decision layer in the first stage of step 1 include Distflow power flow constraints, node voltage constraints, transaction constraints with the main grid, renewable energy reduction constraints, network reconstruction constraints, and electricity price peak and valley time constraints.
3. The coordinated optimization scheduling method for distribution microgrids considering P2P transactions and network reconstruction according to claim 1 is characterized in that: In the objective function of the microgrid alliance operation decision layer in the first stage of step 1, the operation cost of each microgrid includes the transaction cost between each microgrid and the distribution network and other microgrids, the operation cost of electrical equipment including micro gas turbines, renewable energy, and energy storage in each microgrid, and the access fee paid by each microgrid to the distribution network, that is, the access fee charged by the distribution network; The constraints of the objective function of the microgrid alliance operation decision layer in the first stage of step 1 include power balance constraints, energy storage constraints, micro gas turbine output constraints, transaction constraints, and transaction consistency constraints.
4. The network fee calculation mechanism considering network reconstruction according to claim 1 is characterized in that: In step 1, the virtual power flow method is used to enable the distribution network operator to calculate the access fee under the dynamic topology and optimize the network reconstruction strategy. Then, the improved Floyd algorithm is used to solve the electrical distance between the microgrid nodes after the network reconstruction, and it is passed to the microgrid. Under the premise of protecting the topological privacy, the microgrid can directly use the Thevenin impedance method to calculate the access fee charged by the distribution network based on the electrical distance between the microgrid and other microgrids.
5. The coordinated optimization scheduling method for distribution microgrids considering P2P transactions and network reconstruction according to claim 1 is characterized in that: The constraints of the objective function of the generalized Nash game model described in the second stage of step 1 include the upper and lower limits of P2P transaction pricing, the consistency constraints of seller and buyer transaction prices, and the operating cost constraints of each microgrid.
6. The coordinated optimization scheduling method for distribution microgrids considering P2P transactions and network reconstruction according to claim 1 is characterized in that: In step 2, the elite genetic algorithm and DQA-ADMM algorithm are used to solve the master-slave game problem of micro-cooperation. The elite genetic algorithm adopts an elite strategy library to improve the convergence performance of the algorithm. It is also combined with a mixed integer linear programming method to solve the network reconstruction strategy, avoiding the problem that the network reconstruction strategy does not meet the constraints due to the direct use of the genetic algorithm. The DQA-ADMM algorithm is nested in the elite genetic algorithm, and the generalized Nash game model is converted into a global optimization problem. After that, the objective function is solved in a distributed manner, thereby obtaining the distributed scheduling results of each microgrid in the microgrid alliance. Among them, DQA improves the ADMM algorithm in parallel and improves the calculation speed.
7. An electronic device, comprising a memory and a processor, wherein the memory stores program instructions that can be read and executed by the processor, wherein: When the program instructions are read and executed, steps 1 and 2 of the method for coordinated optimization and dispatching of distribution microgrids considering P2P transactions and network reconstruction as described in any one of claims 1 to 6 are executed.
8. A readable storage medium storing program instructions, characterized in that: When the program instructions in the readable storage medium are read and executed, steps 1 and 2 of the distribution microgrid collaborative optimization scheduling method considering P2P transactions and network reconstruction as described in any one of claims 1 to 6 are executed.