Micro-grid electricity-carbon joint transaction method and system and medium

By constructing a regional interconnected microgrid system model and a local electricity-carbon joint market mechanism, combined with a multi-agent Markov decision process and reinforcement learning algorithm, the dynamic coupling problem of carbon emission factors in the microgrid is solved, the linkage between power flow and carbon emission flow is realized, and the system's adaptive optimization capability and low-carbon operation efficiency are improved.

CN120655328AActive Publication Date: 2025-09-16SHANDONG UNIV

Patent Information

Application Number
CN202511127141.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2025-09-16
Estimated Expiration
2045-08-13

AI Technical Summary

Technical Problem

The existing microgrid scheduling method lacks dynamic coupling of carbon emission factors, cannot reflect the real impact of carbon costs on resource allocation and operation strategies, makes it difficult to achieve low-carbon operation goals, and lacks a localized electricity-carbon joint trading mechanism, resulting in low efficiency in carbon quota resource allocation.

Method used

A regional interconnected microgrid system model is constructed, introducing energy storage and carbon sequestration devices, wind and solar power prediction mechanisms, and gas turbine carbon emission models. A multi-agent Markov decision process and multi-objective reward design are adopted, and electricity and carbon emission flows are matched through a multi-round bilateral auction mechanism. The trading strategy is optimized by combining reinforcement learning algorithms.

Benefits of technology

It realizes the linkage between electric energy flow and carbon emission flow, improves the adaptive optimization capability of microgrid in uncertain environment, builds a distributed energy-carbon coordinated control system with closed-loop optimization capability, and improves the system operation efficiency and low-carbon level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120655328A_ABST
    Figure CN120655328A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of power systems, and particularly discloses a micro-grid electricity-carbon joint transaction method and system and a medium, and the method comprises the steps: constructing a regional interconnection micro-grid system model; constructing a local electricity-carbon combined market mechanism, carrying out order matching by adopting a multi-round bilateral auction mode, determining a transaction result in combination with an electricity price and carbon price combined bidding rule, and carrying out trend constraint verification; the method comprises the following steps: constructing a multi-agent Markov decision process model based on a micro-grid model and a market mechanism, and setting a state space, an action space and a multi-target reward function; and a multi-agent near-end strategy optimization algorithm MAPPO-TDSA fusing task decomposition and an attention mechanism is adopted to train each agent strategy network, and settlement with an external power market and a carbon trading market is carried out according to a micro-grid trading execution result and a power carbon quota income and expenditure condition. According to the method, energy-carbon collaborative transaction and intelligent regulation and control between regional micro-grids are realized, and the method has remarkable low-carbon property, autonomy and strategy optimization capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power systems, and specifically relates to a microgrid electricity-carbon joint trading method, system and medium. Background Art

[0002] With the large-scale integration of renewable energy and the development of distributed power systems, regional interconnected microgrids, as a key component of these new power systems, have been widely adopted in scenarios involving multi-source coordination and flexible dispatch. Microgrids, with their strong autonomy, operational flexibility, and abundant controllable resources, provide an effective path for the local consumption and flexible utilization of distributed clean energy.

[0003] However, the microgrid scheduling methods in existing technologies are generally limited to a single power optimization dimension, lack dynamic coupling of carbon emission factors, cannot reflect the real impact of carbon costs on resource allocation and operation strategies, and are difficult to support the low-carbon operation goals of "source-load-carbon" coordination. Existing methods generally rely on centralized control or global information acquisition during market interaction, making it difficult to achieve local learning and strategy adaptive optimization at the agent level.

[0004] Traditional scheduling methods are generally based on static models or linear optimization, which are difficult to adapt to the complex characteristics of new energy volatility, carbon price uncertainty and the diversity of interactions between microgrids; on the other hand, there is currently a lack of localized electricity-carbon joint trading mechanisms suitable for microgrids within the region, which cannot support the efficient flow of energy and carbon elements between multiple microgrids, resulting in low efficiency in carbon quota resource allocation and a broken carbon emission reduction incentive chain. Summary of the Invention

[0005] In response to the problems in the prior art, the present invention provides a microgrid electricity-carbon joint trading method, system and medium to solve the problem of microgrid lack of carbon quota coupling and intelligent control capabilities raised in the above background technology.

[0006] The technical solution adopted in the present invention is as follows: In a first aspect, the present application provides a microgrid electricity-carbon joint trading method, the method comprising the following steps: Step S1: Construct a regional interconnected microgrid system model, model each microgrid as an intelligent entity with local loads, renewable energy power generation equipment, energy storage and carbon sequestration devices, and controllable gas turbines, and define the power output, carbon emissions, and operating cost models of each device; Step S2: Construct a local electricity-carbon joint market mechanism, bind electricity flow and carbon emission flow in the electricity-carbon joint market, use multiple rounds of bilateral auctions to match buy and sell orders, and determine transaction results based on the joint bidding rules of electricity price and carbon price. Transaction settlement is subject to distribution line power flow constraint verification; Step S3: Based on the microgrid model and the electricity-carbon market mechanism, a multi-agent Markov decision process model is constructed, and the state space, action space, and multi-objective reward function are set; Step S4: Using the multi-agent proximal strategy optimization algorithm MAPPO-TDSA that integrates value decomposition and attention mechanism, the strategy network of each microgrid agent is trained to output the optimal strategy for electricity-carbon joint market transactions and resource regulation; Step S5: Each microgrid generates expected transactions and scheduling actions based on the observed state using the trained strategy network. After passing the hard constraint test, it completes the matching and clearing of transaction orders based on a multi-round bilateral auction mechanism, determines the power transaction volume, carbon quota transfer and corresponding settlement price, and executes resource scheduling behavior. Step S6: Based on the microgrid transaction execution results and the electricity carbon quota income and expenditure, energy compensation and carbon quota settlement are carried out with the external electricity market and carbon trading market respectively, and the transaction feedback is used for the next round of strategy optimization.

[0007] Furthermore, step S1 includes the following steps: Step S1-1: define the local load, energy storage and carbon sequestration device, controllable gas turbine, and renewable energy power generation equipment included in each microgrid, and establish a power output model and carbon emission model for each device; Step S1-2: The energy storage and carbon fixation device adopts an integrated battery structure with dual functions of energy storage and carbon dioxide absorption, and sets the state of charge, charge and discharge efficiency, carbon fixation efficiency and maximum carbon fixation power constraints; Step S1-3: The output power and operating cost of the controllable gas turbine form a nonlinear quadratic function relationship. Its carbon emissions are calculated based on the fuel carbon content factor, thermal efficiency, and combustion oxidation rate, and are subject to maximum power, minimum power, and ramp rate constraints. Step S1-4, the renewable energy equipment includes a wind power generation module and a photovoltaic power generation module; The wind power generation module uses interval prediction modeling to construct upper and lower output prediction intervals based on historical wind speed data and meteorological factors; The photovoltaic power generation module adopts a point prediction method and uses the sunshine intensity and radiation model to calculate a single output value.

[0008] Furthermore, step S2 includes the following steps: Step S2-1: Establish a local electricity-carbon joint market platform, treat the microgrid as a market participant, and market transactions include green electricity and corresponding carbon quotas; Step S2-2: Set up joint bidding rules. Each microgrid acts as a buyer or seller and submits electricity bids and carbon quota bids. The bids are dynamically generated based on the predicted green electricity supply and load demand. Step S2-3: Use a multi-round bilateral auction mechanism to match orders. Arrange the orders in descending order based on the buyer's bid and ascending order based on the seller's bid. Compare the highest bid and the lowest ask price in turn. If the conditions are met, a match is reached. Step S2-4: In each round of trading, the settlement price is calculated using the weighted average method based on the matching volume and the market supply and demand ratio. The electricity price and carbon price jointly determine the final transaction settlement amount.

[0009] Furthermore, step S2-3 includes the following steps: Step S2-3-1: Build a buyer order pool and a seller order pool based on the expected order set, and sort them by quote level, with buyers sorted in descending order of quotes and sellers sorted in ascending order of quotes; Step S2-3-2: Perform order matching operations on the sorted order pool in rounds. In each round, compare the current highest buyer's bid with the lowest seller's bid. If the buy price is not lower than the sell price, it is determined to be a tradeable order pair. The matched transaction volume is the minimum remaining amount of the buyer and seller. Step S2-3-3: After each round of order matching, a power flow safety check is performed based on the physical topology of the microgrid interconnection and the line transmission capacity to calculate whether the actual power transmission of each distribution line meets the capacity limit; Step S2-3-4: If a matching transaction pair in a certain round causes line overload, the transaction settlement of the matching pair will be terminated, and the order pool will be updated before entering the next matching round.

[0010] Furthermore, step S3 includes the following steps: Step S3-1: Model the operation decision-making process of each microgrid intelligent agent as a Markov decision process. The state transition of the Markov decision process depends on the current observation state, action decision and environmental feedback results; Step S3-2: Define a triplet of state space, action space, and reward function for each microgrid agent, where the state space is composed of local observable variables, the action space is a set of continuous variables, and the reward function is designed based on economic, environmental, and constraint factors. Step S3-3: Using a discrete-time model with a time step length of 24, the daily operating cycle is divided into 24 time steps. The reinforcement learning strategy is updated at each time step to obtain the optimal control strategy based on the dynamic market and operating environment; Step S3-4: Based on the round experience sampling mechanism in reinforcement learning, the state-action-reward-next state sequence data of the microgrid in the complete scheduling cycle is collected as the sample basis for policy network training.

[0011] Furthermore, in step S3-2: The state space includes: the upper and lower limits of the predicted output range of wind power generation, the predicted point value of photovoltaic power generation, the predicted value of local user load, the charge state of the energy storage and carbon sequestration device, the market settlement price and carbon quota status of the previous time step; The action space is a set of continuous variables, including the expected output power of the controllable gas turbine, the expected charging and discharging power and carbon sequestration mode control parameters of the energy storage carbon sequestration device, and the expected quotes and expected transaction power in the local electricity-carbon joint market. The reward function includes economic reward items, environmental reward items, false transaction penalty items, and scheduling out-of-bounds penalty items; The economic incentive is calculated by deducting the operating costs from the transaction income, while the environmental incentive is based on the amount of carbon sequestered and negative penalties are based on the amount of carbon emissions. The reward function is used as the optimization target of the agent's policy network, and the state-action sequence generated by trajectory sampling is used to update the policy network through reverse gradient propagation.

[0012] Furthermore, in step S4, the policy network is trained using the multi-agent proximal policy optimization algorithm MAPPO-TDSA, where each agent maintains a local policy network and a critic network. The optimization algorithm includes a task decomposition mechanism, which decomposes the overall reward function into multiple subtask rewards and establishes subtask value functions for each; The optimization algorithm includes an attention mechanism to dynamically adjust the weight of each subtask on the joint strategy evaluation; The strategy update is based on the shared information of neighbor nodes in the communication topology, and the distributed training process is realized through consensus update rules.

[0013] Furthermore, in step S5, each microgrid generates an expected transaction action based on the current observation state and performs hard constraint verification. The constraints include the upper limit of gas turbine power, upper and lower limits of energy storage power, and feasibility of carbon sequestration power. After verification, the agent submits the transaction action to the electricity-carbon joint market and participates in multiple rounds of bilateral auctions to determine the actual transaction pair, transaction volume, settlement price and carbon quota transfer; The execution results serve as the input of the next round of state space and are used for training data expansion and model incremental optimization.

[0014] In a second aspect, the present application provides a microgrid electricity-carbon joint trading system, the system comprising: The system modeling module is used to build a regional interconnected microgrid system model. Each microgrid is modeled as an intelligent entity with local loads, renewable energy power generation equipment, energy storage and carbon sequestration devices, and controllable gas turbines. The power output, carbon emissions, and operating cost models of each device are defined. The market mechanism construction module is used to build a local electricity-carbon joint market mechanism, which binds the power flow and carbon emission flow in the market, sets joint bidding rules and adopts a multi-round bilateral auction method to match buy and sell orders. The transaction settlement is subject to the power flow constraint verification of the distribution line; The decision modeling module is used to build a multi-agent Markov decision process model based on the microgrid system model and the electricity-carbon market mechanism, and define the state space, action space and multi-objective reward function of each agent; The strategy training module uses the multi-agent proximal strategy optimization algorithm MAPPO-TDSA, which integrates task decomposition and attention mechanisms, to jointly train the strategy networks of each agent and output the optimal strategy for joint transactions and resource regulation; The strategy execution module is used to generate transaction and scheduling actions based on the current observation state using the strategy network. After performing hard constraint verification, it matches transactions through the electricity-carbon joint market to complete power trading volume, carbon quota transfer and resource regulation. The external interaction module is used to conduct energy compensation and carbon quota settlement with the external power market and carbon trading market based on the microgrid transaction execution results, and use the feedback information for strategy updates.

[0015] In a third aspect, the present application provides a computer-readable storage medium, which stores computer instructions. When a computer reads the computer instructions in the storage medium, the computer executes the microgrid electricity-carbon joint trading method as described in the first aspect.

[0016] It can be seen from the above technical solutions that the advantages of the present invention are: The present invention provides a microgrid electricity-carbon joint trading method. By constructing a regional interconnected heterogeneous microgrid system model and a local electricity-carbon joint market mechanism, it opens up a linkage channel between the electricity flow and the carbon emission flow in the distributed system, and solves the problem of energy-carbon separation in the existing microgrid scheduling; introduces energy storage and carbon fixation devices, wind and solar prediction mechanisms and gas turbine carbon emission models, and realizes collaborative modeling of multiple types of resources and multi-objective scheduling under carbon constraints; through a multi-agent modeling framework based on the Markov decision process, combined with multi-objective reward design and MAPPO-TDSA deep reinforcement learning algorithm, it effectively improves the adaptive optimization capability of the microgrid in an uncertain environment; deploys the trained strategy network on the local terminal of the microgrid, and combines the joint market trading mechanism to realize the online action generation, market bidding, control execution and external interactive feedback of the intelligent agent, thereby constructing a distributed energy-carbon collaborative control system with closed-loop optimization capabilities, improving the overall operating efficiency and low-carbon level of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for the description. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 Flowchart of the steps of the microgrid electricity-carbon joint trading method in the embodiment; Figure 2 A physical architecture diagram of a regional interconnected microgrid in an embodiment; Figure 3 This is a flowchart of the local electricity-carbon joint market transaction in the embodiment; Figure 4 This is a network architecture diagram of MAPPO-TDSA in the embodiment; Figure 5 Flowchart of the algorithm of MAPPO-TDSA in the embodiment. DETAILED DESCRIPTION

[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0020] See also Figures 1-4 As shown, the present invention provides a microgrid electricity-carbon joint trading method, comprising the following steps: Step S1: Construct a regional interconnected microgrid system model, model each microgrid as an intelligent entity with local loads, renewable energy power generation equipment, energy storage and carbon sequestration devices, and controllable gas turbines, and define the power output, carbon emissions, and operating cost models of each device; Step S1-1: define the local load, energy storage and carbon sequestration device, controllable gas turbine, and renewable energy power generation equipment included in each microgrid, and establish a power output model and carbon emission model for each device; Step S1-2: The energy storage and carbon fixation device adopts an integrated battery structure with dual functions of energy storage and carbon dioxide absorption, and sets the state of charge, charge and discharge efficiency, carbon fixation efficiency and maximum carbon fixation power constraints; Step S1-3: The output power and operating cost of the controllable gas turbine form a nonlinear quadratic function relationship. Its carbon emissions are calculated based on the fuel carbon content factor, thermal efficiency, and combustion oxidation rate, and are subject to maximum power, minimum power, and ramp rate constraints. Step S1-4, the renewable energy equipment includes a wind power generation module and a photovoltaic power generation module; The wind power generation module uses interval prediction modeling to construct upper and lower output prediction intervals based on historical wind speed data and meteorological factors; The photovoltaic power generation module uses a point prediction method to calculate a single output value using the sunshine intensity and radiation model; In some embodiments, the infrastructure of each microgrid includes user loads, carbon sequestration batteries, controllable distributed gas turbines, and renewable energy generators. Each device is equipped with corresponding power sensors and carbon flow detection and accounting devices. The integration of these components enables the microgrid to effectively manage power supply and carbon emissions, thereby achieving more efficient energy use and environmental benefits.

[0021] Local user load: Residents' electricity demand has strong periodicity in the time domain, and the peak and valley values ​​of electricity demand usually fluctuate on a daily basis. Therefore, by collecting and analyzing historical load data and related influencing factors, we can use machine learning algorithms such as deep forest and Bayesian optimization to obtain the power demand forecast value of microgrid i at time t. , and the actual demand value of microgrid i It will be observed after trading in the local electricity-carbon joint market.

[0022] Energy storage carbon fixation battery: The rapid development of carbon capture, utilization and storage technologies and research on lithium-carbon dioxide batteries have provided a theoretical basis for the development of integrated carbon fixation and energy storage devices. The latest research results have confirmed the feasibility of developing a new battery system with a dual working mode of energy storage and carbon fixation. This device can be used as both a battery energy storage and a carbon dioxide absorption device, using electricity to fix carbon dioxide, providing greater flexibility for the energy scheduling of microgrids.

[0023] The energy storage and carbon sequestration battery model constructed in this embodiment is:

[0024]

[0025] in, represents the state of charge of the energy storage carbon fixation battery at time t; the maximum capacity of the energy storage carbon fixation battery is , it is necessary to flexibly select battery capacity according to actual battery usage to reduce infrastructure costs; battery attenuation rate Indicates the degree of power loss of the battery during operation; and Represent the charging and discharging efficiency of the battery respectively; the power values ​​of the battery working in energy storage mode and carbon fixation mode are respectively expressed as and ; indicator function and Used to adjust the working state of carbon storage battery, for the indicator function , when the parameter When , the value is 1, otherwise the value is 0; for the indicator function , when the parameter , the value is 0, indicating that it is working in carbon fixation mode, otherwise the value is 1, indicating that it is working in energy storage mode; the carbon fixation amount of the energy storage carbon fixation battery at time t is , the carbon sequestration efficiency is .

[0026] In order to ensure the safe, stable and effective operation of energy storage carbon sequestration batteries, the following constraints need to be met: The state of charge must be operated within the design range to avoid overcharging or over-discharging.

[0027]

[0028] in, is the current state of charge; , are the lower and upper limits of the battery state of charge, respectively.

[0029] The charging and discharging power must be limited within the rated power range to protect battery life and system safety.

[0030]

[0031] in, is the current charge and discharge power (discharge is negative, charge is positive); and are the maximum discharge power and the maximum charge power respectively.

[0032] The carbon sequestration power needs to be limited within the design capacity of its carbon sequestration device to ensure carbon sequestration efficiency and safe operation.

[0033]

[0034] in, is the carbon sequestration power at the current moment; is the maximum carbon fixation power.

[0035] If the energy storage carbon sequestration battery works in the carbon sequestration mode, it can use electricity to absorb carbon dioxide gas and convert it into solid carbon. The carbon quota that can be obtained after approval for:

[0036] in, is the emission factor of the regional power grid where the regional interconnected microgrid cluster is located; is the amount of carbon sequestration by the energy storage carbon sequestration battery at time t.

[0037] Controllable distributed gas turbines: Renewable energy generation is highly random and volatile, and there are power generation windows, such as when there is no wind at night or when the sunlight is not strong and the wind speed is not high. Therefore, in this embodiment, the microgrid under study is equipped with a controllable conventional generator set consisting of multiple gas turbines to ensure the user's electricity demand under any conditions. Gas turbines use natural gas to boil water to produce steam, which in turn drives the generator to generate thermal power. The power generation process will produce a large amount of carbon dioxide emissions, which will be generated during the time. The carbon emissions generated are:

[0038]

[0039] Among them, the carbon dioxide emissions generated by the gas turbine unit at time t are ; represents the output power of the controllable gas turbine unit equipped in microgrid i at time t; the carbon emission coefficient of the unit is , which is calculated by the carbon content factor of the fuel (referring to the amount of carbon contained in a unit volume of gas), oxidation coefficient (Taking into account the impact of incomplete combustion and other conditions on carbon emissions during actual operation, this coefficient is used to correct the calculation to make the result closer to actual emissions), thermal efficiency of the gas turbine unit (the proportion of input gas energy that is actually effectively converted into heat energy) and the calorific value of the fuel (Refers to the heat released when a unit volume of gas is completely burned) The influence of four factors.

[0040] The operating cost of a gas turbine is usually quadratic with the output power, reflecting the nonlinear nature of operating efficiency as power varies. The cost function is:

[0041] in, is the operating cost of the controllable gas turbine unit equipped in microgrid i at time t; , , is the unit's operating cost coefficient, when hour, , which represents the fuel consumption cost of the unit to maintain standby status.

[0042] When gas turbines operate at low loads, combustion efficiency decreases significantly, potentially leading to unstable combustion or flameout. Incomplete fuel combustion also significantly increases carbon emissions, which is not environmentally friendly. Furthermore, due to design capacity and material strength, the unit is subject to a maximum operating power limit. Exceeding this maximum power limit can lead to equipment overheating, excessive mechanical stress, or damage, significantly reducing equipment life and increasing maintenance costs. The power output of a gas turbine cannot change instantaneously, limited by its mechanical and thermal inertia. Therefore, controllable gas turbine units must consider operational constraints, including maximum and minimum power constraints and ramping constraints.

[0043]

[0044]

[0045] Among them, the rated maximum output power and minimum stable output power of the controllable gas turbine unit equipped in microgrid i are expressed as and , the maximum climbing constraint is .

[0046] Renewable Energy Generators: In this example, the microgrid under consideration is equipped with small wind turbines or solar photovoltaic panels, generating green electricity from wind and solar power. This power generation system can also earn Chinese Certified Emission Reductions (CCERs), which can be traded in the carbon market and used to offset the repayment of carbon emission allowances. Since renewable energy generation requires no external energy input during operation and only minimal operation and maintenance costs, the cost of power generation is negligible.

[0047]

[0048]

[0049] in, It is the approved carbon quota that can be traded in the carbon market obtained by microgrid i generating green electricity; is the emission factor of the regional power grid where the regional interconnected microgrid cluster is located; is the total amount of green electricity generated by microgrid i at time t, and They represent the output of the small wind turbine and solar photovoltaic panel equipped in microgrid i at time t respectively.

[0050] To ensure the safe and stable operation of renewable energy equipment, the equipment output is constrained within the maximum output power:

[0051]

[0052] in, and They refer to the maximum output power of the small wind turbines and solar photovoltaic panels equipped in microgrid i respectively.

[0053] Taking into account the actual operation situation, consistent with the local load demand, at the beginning of each time t, the microgrid operation and management intelligent agent cannot observe the actual output of renewable energy. The actual output can only be observed after energy trading in the local electricity-carbon joint market. The intelligent agent can only rely on past data and use machine learning methods to predict the output of renewable energy equipment to obtain the predicted value.

[0054] Wind speed is affected by multiple factors such as terrain, temperature gradient, and air pressure system in a nonlinear manner, and has significant instantaneous variation characteristics (such as turbulence). Although solar radiation is affected by clouds, its daily variations follow relatively stable astronomical laws and are not affected by mechanical inertia. The volatility and complexity of wind speed are much higher than solar radiation, so wind power generation is more difficult to accurately predict than photovoltaic power generation. Therefore, wind power forecasting requires the use of interval forecasting (such as probability distribution or confidence interval) to quantify uncertainty and obtain the upper limit of the wind power forecast interval. and lower limit The output curve of photovoltaic power generation has a strong linear relationship with irradiance, and the daily fluctuations mostly show a predictable smooth transition, with a low probability of extreme jumps. Therefore, point prediction (single numerical prediction) is used to obtain the predicted value of photovoltaic power generation. .

[0055] Step S2: Construct a local electricity-carbon joint market mechanism, bind electricity flow and carbon emission flow in the electricity-carbon joint market, use multiple rounds of bilateral auctions to match buy and sell orders, and determine transaction results based on the joint bidding rules of electricity price and carbon price. Transaction settlement is subject to distribution line power flow constraint verification; Step S2-1: Establish a local electricity-carbon joint market platform, treat the microgrid as a market participant, and market transactions include green electricity and corresponding carbon quotas; Step S2-2: Set up joint bidding rules. Each microgrid acts as a buyer or seller and submits electricity bids and carbon quota bids. The bids are dynamically generated based on the predicted green electricity supply and load demand. Step S2-3: Use a multi-round bilateral auction mechanism to match orders. Arrange the orders in descending order based on the buyer's bid and ascending order based on the seller's bid. Compare the highest bid and the lowest ask price in turn. If the conditions are met, a match is reached. Step S2-3-1: Build a buyer order pool and a seller order pool based on the expected order set, and sort them by quote level, with buyers sorted in descending order of quotes and sellers sorted in ascending order of quotes; Step S2-3-2: Perform order matching operations on the sorted order pool in rounds. In each round, compare the current highest buyer's bid with the lowest seller's bid. If the buy price is not lower than the sell price, it is determined to be a tradeable order pair. The matched transaction volume is the minimum remaining amount of the buyer and seller. Step S2-3-3: After each round of order matching, a power flow safety check is performed based on the physical topology of the microgrid interconnection and the line transmission capacity to calculate whether the actual power transmission of each distribution line meets the capacity limit; Step S2-3-4: If a matching transaction pair in a certain round causes the line to be overloaded, the transaction settlement of the matching pair will be terminated, and the order pool will be updated before entering the next matching round; Step S2-4: In each round of trading, the settlement price is calculated using the weighted average method based on the matching volume and the market supply and demand ratio. The electricity price and carbon price jointly determine the final transaction settlement amount; At the beginning of each time t, the management and operation intelligence of microgrid i will be based on the current state of the microgrid, including the state of charge of the local energy storage system. , Forecasted power generation from renewable energy sources (the upper limit of the wind power generation forecast range and lower limit ; Predicted value of photovoltaic power generation ) and the predicted electricity demand of local users and other factors to determine the expected transaction volume of microgrid i participating in the local electricity-carbon joint market and expected transaction price .

[0056] These expected transaction volumes and prices are then uploaded to the local electricity-carbon joint market management platform, where a multi-round bilateral auction mechanism is used to determine the transaction settlement price, electricity transaction volume, and the number of sellers and buyers involved. A multi-round bilateral auction is a trading method whereby buyers and sellers determine prices through open competition. The specific process is as follows: Market Participants: The microgrids participating in the local electricity-carbon joint market will be divided into buyers and sellers according to specific rules. The expected transaction price of the buyers and sellers is expressed as and Specifically, at time t, Indicates that microgrid i wants to be the buyer, and the transaction price is expressed as , hope to buy from the local market of green electricity, ; Indicates that microgrid i wants to act as a seller, and the transaction price is expressed as , hoping to sell to other microgrids of green electricity, .

[0057] The order matching rules are as follows: Order Pool: To match orders, buy and sell orders must first be sorted by price according to the following rules: buy orders are sorted from high to low (buyers willing to pay more are prioritized), and sell orders are sorted from low to high (sellers willing to accept a lower price are prioritized).

[0058] use To refer to the buyer microgrid i, the buyer order set is expressed as , and press Arrange in descending order, assuming the number of buyers is m, the highest bid pair is represented by , the lowest bid pair is represented by ;use To refer to the seller microgrid, the seller order set is expressed as ,according to Arrange in ascending order, assuming the number of sellers is n, the lowest bid pair is expressed as , the highest bid pair is represented by Therefore, the sorted order sets of buyers and sellers can be further expressed as:

[0059]

[0060] Total purchases in the local electricity-carbon joint market at time t and total sales for:

[0061] Order matching: After sorting out the buy and sell orders, the system will conduct multiple rounds of matching, each time comparing the highest buy price and the lowest sell price. When the buyer's bid is higher than or equal to the seller's asking price, the order is met. After each round of matching, the remaining amount of buyers and sellers in the order pool is updated, and then matching continues until all eligible transactions are completed.

[0062] The highest buying price and the lowest selling price that achieve matching in the kth round are expressed as and , the corresponding expected trading volume is also expressed as and .in, , , , .

[0063] For satisfaction Order pair , the transaction volume will be confirmed by the available volume:

[0064] in, is the transaction volume that can be achieved in this round, It means taking the minimum value of a and b.

[0065] After the order is completed, the remaining amount and order pool of both the buyer and the seller are updated: Buyer surplus ; Seller surplus ; The update rule of the buyer's order pool is expressed as follows:

[0066] Among them, the symbol It is the relative difference operation of sets, which means that Remove elements ;symbol It is the operation of taking the union of sets. Add the updated element to , in the program, you only need to use the pointer to modify, add, delete or sort the first element of the list.

[0067] The update rule of the seller's order pool is expressed as follows:

[0068] Among them, the symbol It is the relative difference operation of sets, which means that Remove elements ;symbol It is the operation of taking the union of sets. Add the updated element to , in the program, you only need to use the pointer to modify, add, delete or sort the first element of the list.

[0069] The settlement price is determined by the weighted value of the quotes from buyers and sellers that meet the transaction conditions. Compared with the arithmetic average pricing method, weighted dynamic pricing can better reflect the elasticity of market supply and demand, reduce the risk of price manipulation, and improve market efficiency. Expressed as:

[0070] in, , They are respectively the highest bid by the buyer and the lowest bid by the seller in this round of matching orders. Determined by the market supply and demand ratio at time t:

[0071] The transaction volume and settlement price of each round of matching will be recorded in the local electricity-carbon joint market management platform for subsequent settlement and statistics, and the final transaction volume and transaction amount will be returned to the corresponding microgrids of the buyer and seller. The set of transaction records of the local electricity-carbon joint market at time t is , each transaction is recorded in the following format:

[0072] The kth transaction records the two parties of the transaction (i.e., the buyer microgrid i and the seller microgrid j), as well as the transaction volume between them. and settlement price .

[0073] Taking into account the line capacity constraints of the physical connection between microgrids, based on the DC power flow constraints, a power flow safety check is added in the order settlement stage to correct the transaction combination that violates the network constraints.

[0074]

[0075] in, represents a set of n microgrids connected by power lines, is a collection of l distribution lines. and are the specific operating point and current limit of the line respectively. Indicates the amount of electricity that microgrid i needs to participate in the transaction through the line. Here is the transaction volume reached between microgrid i and other microgrids . Indicates line The participation factor of microgrid i.

[0076] After considering the line constraints, the cumulative transaction volume between the buyer microgrid i and the seller microgrid j at time t is and for:

[0077] The expenditures of buyer microgrid i and seller microgrid j participating in the local electricity-carbon joint market at time t and benefits for:

[0078] The amount of electricity traded by microgrid i in the local electricity-carbon joint market at time t and transaction volume for:

[0079]

[0080] Among them, if , indicating that the agent acts as a buyer and spends Bought from local market of green electricity; if , which means that the agent, as a seller, sells of green electricity, with a profit of .

[0081] The average settlement price of electricity traded by microgrid i in the local electricity-carbon joint market at time t for:

[0082] The transaction in the electricity-carbon joint market includes a two-way binding of electricity and carbon flow. The carbon quota is transferred along with the electricity transaction. The carbon quota transferred by microgrid i when participating in the local electricity-carbon joint market transaction at time t is for:

[0083] in, is the emission factor of the regional power grid where the regional interconnected microgrid cluster is located, is the electricity transaction volume of microgrid i participating in the local electricity-carbon joint market at time t.

[0084] Due to the energy loss during the transmission process, the actual amount of electricity traded by microgrid i in the local electricity-carbon joint market for:

[0085] In summary, after the local electricity-carbon joint market transaction is completed, the data returned to each microgrid management and operation intelligent entity includes the average settlement price , actual electricity trading volume , transferred carbon quotas and transaction volume .

[0086] After the management and operation agent of the microgrid completes the local market energy transaction and energy management, the actual output value of renewable energy can be observed at the end of time t. and load demand value Based on this data, the agent evaluates the power supply and demand situation within the microgrid and decides whether to purchase or sell power from the external power market based on the power surplus or shortage to ensure the balance of power supply and demand in the microgrid. The power supply and demand balance is as follows:

[0087] The microgrid is connected to the external main grid through a common coupling point and trades with the external power market based on real-time shared electricity price information. Assume that the energy traded between microgrid i and the external power market at time t is ,like , which means that microgrid i needs to purchase electricity from the external power market to meet the needs of local users. On the contrary, if , it means there is a surplus of electricity and it is necessary to sell electricity to the external electricity market. The transaction amount between the two is:

[0088] in, The Feed-in Tariff is determined by the external power market. The microgrid operator sells electricity to the main grid through the external power market. It is the metered price at the point where the microgrid is connected to the main grid. Wholesale electricity prices are determined by the external electricity market. Microgrid management operators purchase electricity from the main grid through the external electricity market. The metered price is calculated at the point where the microgrid is connected to the main grid.

[0089] When microgrid When internal electricity supply exceeds demand and electricity needs to be purchased from the external electricity market, since the electricity source of the external electricity market is mainly thermal power generation, purchasing electricity will generate indirect carbon emissions:

[0090] in, represents the indirect carbon emissions from purchasing external electricity, is the emission factor of the regional power grid where the regional interconnected microgrid cluster is located, is the amount of electricity purchased by microgrid i from the external electricity market at time t.

[0091] Since microgrids use renewable energy as their main source of electricity and their carbon emission intensity is lower than the industry benchmark, they are not included in the carbon quota allocation range and their initial carbon quota is 0. However, they can obtain carbon quota rewards by approving their voluntary emission reductions (including green power generation and carbon sequestration), which can be used to offset carbon emissions from other emission sources or traded in the carbon trading market.

[0092] Within the microgrid, the management of carbon emissions and carbon quotas involves multiple entities: gas turbines generate direct carbon emissions due to the consumption of traditional fossil energy for power generation, which requires the consumption of corresponding carbon quotas; purchasing electricity from the external electricity market generates indirect carbon emissions, which also requires the consumption of carbon quotas. In contrast, energy storage carbon sequestration batteries absorb carbon dioxide and convert it into solid carbon by utilizing surplus electricity, and can obtain carbon quotas after approval; at the same time, renewable energy generators use clean energy such as wind and solar energy to produce green electricity, and can also obtain carbon quotas after approval. These entities together constitute the carbon quota flow system within the microgrid. The net carbon quota of microgrid i at time t for:

[0093] After each energy management scheduling cycle ends, At the same time, the management and operation intelligence of the microgrid will settle with the external carbon trading market based on the local balance carbon quota.

[0094]

[0095]

[0096] in, is the remaining carbon quota of microgrid i, and are the buying and selling prices of carbon quotas respectively.

[0097] It is assumed that the microgrid management and operation agent trades in the external electricity market and carbon trading market at an uneconomical price, which means that it will be more profitable for the agent to participate in the local electricity-carbon joint market.

[0098]

[0099] .

[0100] Step S3: Based on the microgrid model and the electricity-carbon market mechanism, a multi-agent Markov decision process model is constructed, and the state space, action space, and multi-objective reward function are set; Step S3-1: Model the operation decision-making process of each microgrid intelligent agent as a Markov decision process. The state transition of the Markov decision process depends on the current observation state, action decision and environmental feedback results; Step S3-2: Define a triplet of state space, action space, and reward function for each microgrid agent, where the state space is composed of local observable variables, the action space is a set of continuous variables, and the reward function is designed based on economic, environmental, and constraint factors. The state space includes: the upper and lower limits of the predicted output range of wind power generation, the predicted point value of photovoltaic power generation, the predicted value of local user load, the charge state of the energy storage and carbon sequestration device, the market settlement price and carbon quota status of the previous time step; The action space is a set of continuous variables, including the expected output power of the controllable gas turbine, the expected charging and discharging power and carbon sequestration mode control parameters of the energy storage carbon sequestration device, and the expected quotes and expected transaction power in the local electricity-carbon joint market. The state space includes the upper limit of the wind power generation forecast interval and lower limit , the predicted value of photovoltaic power generation , the predicted value of the resident load , the state of charge of the energy storage carbon fixation battery at the last moment and the average settlement price of the local electricity-carbon joint market .

[0101]

[0102] In the action space, the microgrid contains two types of energy trading and management actions during operation: the expected action of autonomous decision-making and the actual action of interacting with the environment, both of which are continuous action spaces.

[0103] Expected Action At the initial moment of each time t, the management and operation agent of microgrid i is based on the learned energy management and trading strategies and the observed current state To determine the expected power output of the controllable distributed gas turbine , the expected working power of energy storage carbon fixation battery , the expected transaction volume of microgrid i participating in the local electricity-carbon joint market and expected transaction price .

[0104]

[0105] Actual action It is generated by the output hard constraint test and the multi-round bilateral auction mechanism of the local electricity-carbon joint market, including the actual output power of the gas turbine , the actual working power of energy storage carbon fixation battery , actual electricity trading volume participating in the local electricity-carbon joint market and average settlement price .

[0106]

[0107] The specific verification method for output hard constraints is as follows: After the intelligent agent provides the expected energy management and transaction, it will first conduct a conditional constraint verification. First, it verifies whether the output power of the gas turbine meets the power constraint and whether the power value of the energy storage carbon sequestration battery is greater than or equal to zero when operating in carbon sequestration mode.

[0108]

[0109]

[0110] On the other hand, it is necessary to check whether the expected transaction volume is lower than the lower limit of the green power generation forecast to ensure as much as possible that the transaction subject is green electricity generated by renewable energy generators.

[0111]

[0112] Then, the expected trading volume after conditional constraint test correction and expected transaction price The actual transaction will be generated through the bilateral auction mechanism, and the transaction results will be returned to the intelligent agent, including the average settlement price. , actual electricity trading volume , transferred carbon quotas and transaction volume .

[0113] The reward function includes economic reward items, environmental reward items, false transaction penalty items, and scheduling out-of-bounds penalty items; The economic incentive is calculated by deducting the operating costs from the transaction income, while the environmental incentive is based on the amount of carbon sequestered and negative penalties are based on the amount of carbon emissions. The reward function is used as the optimization target of the agent's policy network, and the state-action sequence generated by trajectory sampling is used to update the policy network through reverse gradient propagation. The operation of a microgrid involves multiple objectives, such as maximizing economic benefits and minimizing carbon emissions while satisfying operational constraints and ensuring stable system operation. The reward function is the core mechanism that drives the intelligent agent to learn optimization strategies. By quantifying these objectives into computable indicators, it guides the intelligent agent to gradually achieve multi-objective optimization in a complex environment.

[0114] Specifically, it includes economic rewards, environmental rewards, penalties for false transactions and penalties for exceeding operating limits.

[0115] Financial Rewards: The operating income of the microgrid includes the income from selling green electricity to the local electricity-carbon joint market, the income from selling electricity to the external electricity market when there is a surplus of electricity, and the income from selling carbon quotas on the external carbon trading market after the dispatch cycle ends. The expenses include the cost of purchasing green electricity from the local electricity-carbon joint market, the cost of gas turbine output, the cost of purchasing electricity from the external electricity market when there is a shortage of electricity, and the cost of purchasing carbon quotas on the external carbon trading market after the dispatch cycle ends. The economic reward is the gross profit of the microgrid operation. :

[0116] Environmental Rewards: One of the goals of microgrid operation is to achieve low-carbon operation through green energy generation, carbon capture technology, and carbon quota trading, pursuing zero-carbon operation and striving for "negative carbon operation" whenever possible. While ensuring the electricity needs of local users, the use of redundant power to absorb and fix carbon dioxide is encouraged, and the acquisition of green electricity through the local electricity-carbon joint market is encouraged. The use of gas turbines for power supply is not supported. Environmental Rewards It is a reward and punishment for carbon emission reduction and carbon emission behaviors in microgrid operation.

[0117]

[0118] in, It is for carbon sequestration behavior The reward coefficient, It targets carbon emissions The penalty coefficient, is the total power flow behavior within the microgrid, .

[0119] Penalty for false transactions: The actual transaction volume is greater than the observed green electricity, which means that the electricity sold by the microgrid in the local electricity-carbon joint market is not all green electricity, and there will be a false transaction penalty. This punishment comes from the fact that the microgrid did not operate in good faith and falsely reported its green electricity trading volume, which is also in line with the reality that false data exists under market operations.

[0120]

[0121] in, It is the penalty coefficient for false operation.

[0122] Penalty for exceeding the limit: The hard constraint test of action output ensures the safe and stable operation of the microgrid. However, in the process of learning energy trading and management strategies, the decision-making actions output by the intelligent agent will inevitably exceed the operating limits. It is necessary to set the expected output power of the gas turbine. and expected working power of energy storage carbon fixation battery Over-limit penalty , converting the safety boundary constraints of the action space into learnable gradient signals, helping the intelligent agent understand and learn strategies that meet the operating constraints.

[0123]

[0124]

[0125]

[0126]

[0127] in, 、 and They are the over-limit penalty items for gas turbine, battery state of charge and operating power; 、 and They are the state of charge of the gas turbine, battery and the over-limit penalty coefficient of working power.

[0128] In summary, the overall reward function of microgrid i at time t is for:

[0129] Therefore, the multi-objective optimal scheduling problem of regional interconnected microgrids can be reformulated as:

[0130] in, represents the scheduling period, Represents the number of interconnected microgrids in the region, and the microgrids cooperate with each other to solve the above problems.

[0131] Step S3-3: Using a discrete-time model with a time step length of 24, the daily operating cycle is divided into 24 time steps. The reinforcement learning strategy is updated at each time step to obtain the optimal control strategy based on the dynamic market and operating environment; Step S3-4: Based on the round experience sampling mechanism in reinforcement learning, collect the state-action-reward-next-state sequence data of the microgrid within the complete scheduling cycle as the sample basis for policy network training; Step S4: Using the multi-agent proximal strategy optimization algorithm MAPPO-TDSA that integrates value decomposition and attention mechanism, the strategy network of each microgrid agent is trained to output the optimal strategy for electricity-carbon joint market transactions and resource regulation; The policy network is trained using the multi-agent proximal policy optimization algorithm MAPPO-TDSA, where each agent maintains a local policy network and a critic network. The optimization algorithm includes a task decomposition mechanism, which decomposes the overall reward function into multiple subtask rewards and establishes subtask value functions for each; The optimization algorithm includes an attention mechanism to dynamically adjust the weight of each subtask on the joint strategy evaluation; Strategy updates are based on information shared by neighboring nodes in the communication topology, and a distributed training process is implemented through consensus update rules; For a multi-agent reinforcement learning problem involving K tasks with no temporal relationship between the tasks, the optimization problem can be expressed as:

[0132] in, , represents the objective function of all agents in the d-th task, .

[0133] The overall reward function R can be decomposed into K sub-reward functions, namely ; state value function and Q value function (both follow the policy , Actor Network / Strategy Network The parameters of can also be decomposed into: ; ; Advantage function It can also be decomposed into: .

[0134] For a Markov decision process with multiple tasks, the optimal policy set is denoted as , is the optimal strategy set for subtask k, assuming that there is an intersection between the optimal strategy sets of subtasks.

[0135] The overall reward function of agent i is rewritten as: .

[0136] in: ; ; .

[0137] The energy transmission between microgrids in the region is interconnected, but the data transmission between agents depends on information flow. The communication topology between agents is an undirected graph, denoted as , where the node set is , the edge set is . Define the neighbor set is the neighbor set of node i, that is, node i can receive information from these neighbors. is the weight of the communication topology, if (including j=i), then ,otherwise .if , then the weight matrix For all nodes i, it is bidirectionally random.

[0138] To handle continuous states and actions, a two-step actor-critic framework is adopted, which can operate at different time scales.

[0139] During training, the actor network receives the state , and output local policy . The judge network then estimates To evaluate the value of the global strategy, and thus update the global state value function. By communicating with neighboring nodes, a consensus update method is used to estimate The state value function is passed To approximate, are features associated with state s.

[0140] The update rule of the critic network is as follows: For multi-agent reinforcement learning with N agents, its policy gradient can be expressed as:

[0141] in .

[0142] In order to avoid using global information, by introducing a scalar To estimate the d-th task , It represents the optimization goal in reinforcement learning, which is to "maximize the expected cumulative reward."

[0143]

[0144] in, represents the update step of the critic network, and the sub-reward function of agent i is Therefore, in the dth task, the parameters of agent i are Update via:

[0145] Among them, the local TD error for:

[0146] Agent i uses the following formula to adjust the parameters of its actor network (strategy network) To update:

[0147] in, is the update step size of the actor network.

[0148] like Figure 5 As shown, first initialize the hyperparameters and neural network parameters; Then, it is determined whether the number of training iterations has ended. When it is determined that the number of training iterations has ended, the training ends. When it is determined that the number of training iterations has not ended, an empty set is initialized to store experience; Determine whether all agents output actions; If there is an agent that does not output an action, according to the current state, agent i outputs the expected action , and re-judge whether all agents output actions; When all agents output actions, the actual action of agent i is obtained and executed through the output hard constraint test and the bilateral auction mechanism of the local electricity-carbon joint market. , observing the actual load demand, renewable energy generation and transaction prices in the external electricity and carbon markets; Determine whether the local training of all agents is completed. When the local training of all agents is completed, determine whether the consensus update of the critic network of all agents is completed. When the consensus update of the critic network of all agents is completed, the iteration counter is incremented by one and the process jumps to the step of determining whether the number of training iterations has ended; When the consensus update of the critic network of the agent is not completed, determine whether the training of the critic network of all subtasks is completed; When the training of all subtask judge networks is completed, the consensus parameters are calculated and updated. :

[0149]

[0150] Then re-evaluate whether the consensus update of the judge network of all agents is completed; When the local training of the agent is not completed, calculate and update:

[0151] Update the parameters of the actor network:

[0152] Through the communication network Send parameters Give the argument node and re-determine whether the local training of all agents is completed; When the training of the critic network for a subtask is not completed, calculate the reward value of the subtask ,calculate and update; Then update the TD error: ; Update the parameters of the critic network : ; Re-determine whether the training of the critic network for all subtasks is complete.

[0153] Step S5: Each microgrid generates expected transactions and scheduling actions based on the observed state using the trained strategy network. After passing the hard constraint test, it completes the matching and clearing of transaction orders based on a multi-round bilateral auction mechanism, determines the power transaction volume, carbon quota transfer and corresponding settlement price, and executes resource scheduling behavior. Each microgrid generates expected transaction actions based on the current observation status and performs hard constraint verification. The constraints include the upper and lower limits of gas turbine power, energy storage power, and carbon sequestration power feasibility. After verification, the agent submits the transaction action to the electricity-carbon joint market and participates in multiple rounds of bilateral auctions to determine the actual transaction pair, transaction volume, settlement price and carbon quota transfer; The execution results serve as the input for the next round of state space and are used for training data expansion and model incremental optimization; Step S6: Based on the microgrid transaction execution results and the electricity carbon quota income and expenditure, energy compensation and carbon quota settlement are carried out with the external electricity market and carbon trading market respectively, and the transaction feedback is used for the next round of strategy optimization.

[0154] This application aims to combine deep reinforcement learning algorithms to achieve joint optimization, trading, and management of power flows and carbon emission rights in regional interconnected heterogeneous microgrids. Through real-time learning and adaptation of intelligent agents to dynamic changes in different operating environments, each microgrid can independently formulate and adjust power and carbon trading strategies, and convert zero-carbon assets into carbon quota income through the electricity-carbon joint market. Under the premise of policy exemption from mandatory quota allocation, the dual goals of "negative carbon operation" and external market arbitrage can be achieved, thereby improving overall energy utilization efficiency, reducing operating costs, and actively promoting the development of a low-carbon economy. This model provides a standardized path for distributed energy to participate in the national carbon market under the new power system, effectively promoting the low-carbon transformation of the energy structure.

[0155] In some embodiments, the present application provides a microgrid electricity-carbon joint trading system, the system comprising: The system modeling module is used to establish the operational structure of regional interconnected microgrids. Specifically, each microgrid is modeled as an intelligent entity consisting of local loads, renewable energy generation units (including wind and photovoltaic power), energy storage and carbon sequestration devices, and controllable gas turbines. Within this model, each device type is defined with its power output capacity, carbon emissions calculation method, and operating cost function to support subsequent scheduling optimization and trading decisions.

[0156] The market mechanism building module is used to establish a local electricity-carbon joint market at the microgrid level. This market mechanism binds electricity flows with carbon emissions flows, allowing each microgrid to submit joint bids based on its own supply and demand and carbon quota status, including both electricity and carbon prices. The market uses a multi-round bilateral auction process to match orders. Transaction results, based on the matching conditions of the bid and ask bids, are further verified for power flow based on the distribution network's physical topology and line capacity to ensure that all transactions are executed within the power system's safety boundaries.

[0157] The decision modeling module is used to construct a multi-agent Markov decision process (Multi-Agent MDP) model based on the aforementioned system model and market mechanism. The system defines a triplet of state space, action space, and reward function for each microgrid agent. The state space includes renewable energy forecasts, load forecasts, energy storage status, and historical market settlement data; the action space includes device control parameters and market transaction intentions; and the reward function is modeled by combining multiple factors, including economic benefits, carbon emission control targets, and behavioral constraint penalties.

[0158] The strategy training module is used to train the optimal joint trading strategy for microgrid agents. In this embodiment, a MAPPO-TDSA framework is employed, based on the Multi-Agent Proximal Policy Optimization (MAPPO) algorithm and integrating a task decomposition mechanism with an attention mechanism. Each agent maintains its own local policy network and critic network. The algorithm updates and optimizes the joint strategy through trajectory sampling, reward decomposition, and neighbor information sharing.

[0159] During the system's actual operation, the policy execution module uses the trained policy network to output trading and scheduling actions based on currently observed state information. These actions are then constrained and verified, including against conditions such as equipment capacity, regulation rate, and carbon constraints. These verified actions are then submitted to the local electricity-carbon joint market for multiple rounds of bilateral auctions, ultimately determining the transaction targets, electricity consumption, carbon quota, and settlement price. This allows the system to achieve resource regulation and coordinated energy-carbon execution.

[0160] The external interaction module is used to interact with external electricity or carbon trading markets for energy or carbon asset compensation after local transactions are completed. Based on the microgrid's energy balance and carbon quota surplus or shortage, the system automatically generates orders to submit to the external market. The interaction results are fed into the reinforcement learning model as environmental feedback, enabling incremental updates and adaptive evolution of the strategy.

[0161] In some embodiments, the present application provides a terminal, including: A memory for storing a microgrid electricity-carbon joint trading program; A processor is used to implement the steps of the microgrid electricity-carbon joint trading method when executing the microgrid electricity-carbon joint trading system.

[0162] In some embodiments, the present application provides a computer-readable storage medium, which stores computer instructions. When a computer reads the computer instructions in the storage medium, the computer executes the microgrid electricity-carbon joint trading method.

[0163] It is understood that the systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or physical devices, or by products having certain functions. A typical implementation device is a computer, which may be a personal computer, a laptop computer, a personal digital assistant, a tablet computer, a wearable device, or a combination of any of these devices.

[0164] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0165] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0166] Computer-readable media include permanent and non-permanent, removable and non-removable media that can implement information storage by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this embodiment, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0167] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0168] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0169] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0170] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in this embodiment refers to and includes any or all possible combinations of one or more associated listed items.

[0171] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when..." or "when..." or "in response to determining."

[0172] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included in the scope of protection of one or more embodiments of this specification.

Claims

1. A microgrid electricity-carbon joint trading method, characterized in that: The following steps are involved: Step S1: Construct a regional interconnected microgrid system model, model each microgrid as an intelligent entity with local loads, renewable energy power generation equipment, energy storage and carbon sequestration devices, and controllable gas turbines, and define the power output, carbon emissions, and operating cost models of each device; Step S2: Construct a local electricity-carbon joint market mechanism, bind electricity flow and carbon emission flow in the electricity-carbon joint market, use multiple rounds of bilateral auctions to match buy and sell orders, and determine transaction results based on the joint bidding rules of electricity price and carbon price. Transaction settlement is subject to distribution line power flow constraint verification; Step S3: Based on the microgrid model and the electricity-carbon market mechanism, a multi-agent Markov decision process model is constructed, and the state space, action space, and multi-objective reward function are set; Step S4: Using the multi-agent proximal strategy optimization algorithm MAPPO-TDSA that integrates value decomposition and attention mechanism, the strategy network of each microgrid agent is trained to output the optimal strategy for electricity-carbon joint market transactions and resource regulation; Step S5: Each microgrid generates expected transactions and scheduling actions based on the observed state using the trained strategy network. After passing the hard constraint test, it completes the matching and clearing of transaction orders based on a multi-round bilateral auction mechanism, determines the power transaction volume, carbon quota transfer and corresponding settlement price, and executes resource scheduling behavior. Step S6: Based on the microgrid transaction execution results and the electricity carbon quota income and expenditure, energy compensation and carbon quota settlement are carried out with the external electricity market and carbon trading market respectively, and the transaction feedback is used for the next round of strategy optimization.

2. The microgrid electricity-carbon joint trading method according to claim 1 is characterized in that: Step S1 includes the following steps: Step S1-1: define the local load, energy storage and carbon sequestration device, controllable gas turbine, and renewable energy power generation equipment included in each microgrid, and establish a power output model and carbon emission model for each device; Step S1-2: The energy storage and carbon fixation device adopts an integrated battery structure with dual functions of energy storage and carbon dioxide absorption, and sets the state of charge, charge and discharge efficiency, carbon fixation efficiency and maximum carbon fixation power constraints; Step S1-3: The output power and operating cost of the controllable gas turbine form a nonlinear quadratic function relationship. Its carbon emissions are calculated based on the fuel carbon content factor, thermal efficiency, and combustion oxidation rate, and are subject to maximum power, minimum power, and ramp rate constraints. Step S1-4, the renewable energy equipment includes a wind power generation module and a photovoltaic power generation module; The wind power generation module uses interval prediction modeling to construct upper and lower output prediction intervals based on historical wind speed data and meteorological factors; The photovoltaic power generation module adopts a point prediction method and uses the sunshine intensity and radiation model to calculate a single output value.

3. The microgrid electricity-carbon joint trading method according to claim 1 is characterized in that: Step S2 includes the following steps: Step S2-1: Establish a local electricity-carbon joint market platform, treat the microgrid as a market participant, and market transactions include green electricity and corresponding carbon quotas; Step S2-2: Set up joint bidding rules. Each microgrid acts as a buyer or seller and submits electricity bids and carbon quota bids. The bids are dynamically generated based on the predicted green electricity supply and load demand. Step S2-3: Use a multi-round bilateral auction mechanism to match orders. Arrange the orders in descending order based on the buyer's bid and ascending order based on the seller's bid. Compare the highest bid and the lowest ask price in turn. If the conditions are met, a match is reached. Step S2-4: In each round of trading, the settlement price is calculated using the weighted average method based on the matching volume and the market supply and demand ratio. The electricity price and carbon price jointly determine the final transaction settlement amount.

4. The microgrid electricity-carbon joint trading method according to claim 3 is characterized in that: Step S2-3 includes the following steps: Step S2-3-1: Build a buyer order pool and a seller order pool based on the expected order set, and sort them by quote level, with buyers sorted in descending order of quotes and sellers sorted in ascending order of quotes; Step S2-3-2: Perform order matching operations on the sorted order pool in rounds. In each round, compare the current highest buyer's bid with the lowest seller's bid. If the buy price is not lower than the sell price, it is determined to be a tradeable order pair. The matched transaction volume is the minimum remaining amount of the buyer and seller. Step S2-3-3: After each round of order matching, a power flow safety check is performed based on the physical topology of the microgrid interconnection and the line transmission capacity to calculate whether the actual power transmission of each distribution line meets the capacity limit; Step S2-3-4: If a matching transaction pair in a certain round causes line overload, the transaction settlement of the matching pair will be terminated, and the order pool will be updated before entering the next matching round.

5. The microgrid electricity-carbon joint trading method according to claim 1 is characterized in that: Step S3 includes the following steps: Step S3-1: Model the operation decision-making process of each microgrid intelligent agent as a Markov decision process. The state transition of the Markov decision process depends on the current observation state, action decision and environmental feedback results; Step S3-2: Define a triplet of state space, action space, and reward function for each microgrid agent, where the state space is composed of local observable variables, the action space is a set of continuous variables, and the reward function is designed based on economic, environmental, and constraint factors. Step S3-3: Using a discrete-time model with a time step length of 24, the daily operating cycle is divided into 24 time steps. The reinforcement learning strategy is updated at each time step to obtain the optimal control strategy based on the dynamic market and operating environment; Step S3-4: Based on the round experience sampling mechanism in reinforcement learning, the state-action-reward-next state sequence data of the microgrid in the complete scheduling cycle is collected as the sample basis for policy network training.

6. The microgrid electricity-carbon joint trading method according to claim 5 is characterized in that: In step S3-2: The state space includes: the upper and lower limits of the predicted output range of wind power generation, the predicted point value of photovoltaic power generation, the predicted value of local user load, the charge state of the energy storage and carbon sequestration device, the market settlement price and carbon quota status of the previous time step; The action space is a set of continuous variables, including the expected output power of the controllable gas turbine, the expected charging and discharging power and carbon sequestration mode control parameters of the energy storage carbon sequestration device, and the expected quotes and expected transaction power in the local electricity-carbon joint market. The reward function includes economic reward items, environmental reward items, false transaction penalty items, and scheduling out-of-bounds penalty items; The economic incentive is calculated by deducting the operating costs from the transaction income, while the environmental incentive is based on the amount of carbon sequestered and negative penalties are based on the amount of carbon emissions. The reward function is used as the optimization target of the agent's policy network, and the state-action sequence generated by trajectory sampling is used to update the policy network through reverse gradient propagation.

7. The microgrid electricity-carbon joint trading method according to claim 1 is characterized in that: In step S4, the policy network is trained using the multi-agent proximal policy optimization algorithm MAPPO-TDSA, where each agent maintains a local policy network and a critic network. The optimization algorithm includes a task decomposition mechanism, which decomposes the overall reward function into multiple subtask rewards and establishes subtask value functions for each; The optimization algorithm includes an attention mechanism to dynamically adjust the weight of each subtask on the joint strategy evaluation; The strategy update is based on the shared information of neighbor nodes in the communication topology, and the distributed training process is realized through consensus update rules.

8. The microgrid electricity-carbon joint trading method according to claim 1 is characterized in that: In step S5, each microgrid generates an expected transaction action based on the current observation state and performs hard constraint verification. The constraints include the upper limit of gas turbine power, upper and lower limits of energy storage power, and feasibility of carbon sequestration power. After verification, the agent submits the transaction action to the electricity-carbon joint market and participates in multiple rounds of bilateral auctions to determine the actual transaction pair, transaction volume, settlement price and carbon quota transfer; The execution results serve as the input of the next round of state space and are used for training data expansion and model incremental optimization.

9. A microgrid electricity-carbon joint trading system, characterized in that: The system includes: The system modeling module is used to build a regional interconnected microgrid system model. Each microgrid is modeled as an intelligent entity with local loads, renewable energy power generation equipment, energy storage and carbon sequestration devices, and controllable gas turbines. The power output, carbon emissions, and operating cost models of each device are defined. The market mechanism construction module is used to build a local electricity-carbon joint market mechanism, which binds the power flow and carbon emission flow in the market, sets joint bidding rules and adopts a multi-round bilateral auction method to match buy and sell orders. The transaction settlement is subject to the power flow constraint verification of the distribution line; The decision modeling module is used to build a multi-agent Markov decision process model based on the microgrid system model and the electricity-carbon market mechanism, and define the state space, action space and multi-objective reward function of each agent; The strategy training module uses the multi-agent proximal strategy optimization algorithm MAPPO-TDSA, which integrates task decomposition and attention mechanisms, to jointly train the strategy networks of each agent and output the optimal strategy for joint transactions and resource regulation; The strategy execution module is used to generate transaction and scheduling actions based on the current observation state using the strategy network. After performing hard constraint verification, it matches transactions through the electricity-carbon joint market to complete power trading volume, carbon quota transfer and resource regulation. The external interaction module is used to conduct energy compensation and carbon quota settlement with the external power market and carbon trading market based on the microgrid transaction execution results, and use the feedback information for strategy updates.

10. A computer-readable storage medium, characterized in that The storage medium stores computer instructions. When the computer reads the computer instructions in the storage medium, the computer executes the microgrid electricity-carbon joint trading method as claimed in claim 1.

Citation Information

Patent Citations

  • Active power distribution network cooperative voltage regulation method and system based on multi-agent deep reinforcement learning

    CN114362187A

  • Data processing method and system based on intelligent station

    CN117649027A

  • Energy storage power station evaluation method and system oriented to source network load multivariate application

    CN118484666A

  • Electricity-carbon transaction method based on multi-agent reinforcement learning

    CN119273414A

  • Internet micro-grid group energy transaction method based on P2P and deep reinforcement learning

    CN120069979A

Cited By

  • Microgrid P2P electric energy transaction bidding and matching optimization method

    CN121660769A

  • A robust optimization scheduling method and system for active distribution network electricity-carbon joint operation

    CN122418697A