A power carbon emission right joint transaction method based on a blockchain technology
The joint trading platform for power distribution network electricity and carbon emission rights, built using blockchain technology, solves the problem of the independence of electricity trading and carbon emission rights, realizes a safe, fair, and efficient trading process, and promotes the development of renewable energy and the protection of user information privacy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 国网江苏省电力有限公司新沂市供电分公司
- Filing Date
- 2022-07-12
- Publication Date
- 2026-07-07
AI Technical Summary
Existing electricity trading methods fail to effectively integrate the trading of electricity and carbon emission rights, resulting in unfair and inefficient trading prices and failing to fully utilize the carbon emission rights of new energy sources, thus hindering the development of renewable energy.
By building a market platform using blockchain technology, an optimized model for joint trading of power distribution network electricity and carbon emission rights can be established to optimize transaction costs and benefits. Flexible trading of carbon emission rights can be carried out under the system's total carbon emission limit. Combined with carbon tax penalty functions and time-of-use electricity prices from power retailers, a safe, fair, private, and efficient trading process can be achieved.
It enables joint trading of electricity and carbon emission rights in the power distribution network, improves the fairness and efficiency of the trading, promotes the use of renewable energy, reduces social energy costs, and protects user information privacy.
Smart Images

Figure CN115330433B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for joint trading of electricity and carbon emissions in a power distribution network based on blockchain technology, and is particularly applicable to a distributed market clearing method that considers joint trading of electricity and carbon emissions in a power distribution network and protects the privacy of key user information during the trading process. Background Technology
[0002] Electricity trading: Electricity trading refers to the trading of electricity. This trading typically involves power generators that supply electricity using coal, oil, or natural gas within the distribution network, and electricity users who purchase and consume the electricity. These market participants use generation-side and demand-side equipment scheduling and price forecasting to optimize revenue generated from energy production. However, existing electricity trading methods are crude, relying on electricity retailers to purchase electricity from power generators through electricity trading platforms on both the source and consumption sides, and then sell it to electricity users through uniform time-of-use pricing or electricity contracts. This makes it difficult to establish an effective price negotiation mechanism between power generators and users. Consequently, this trading method struggles to guarantee fairness in transaction prices, transaction efficiency, and the minimization of overall societal energy costs.
[0003] Carbon emissions trading: Article 17 of the Kyoto Protocol stipulates that carbon dioxide emissions trading allows countries with emission units to sell their surplus capacity—emissions permitted but not "used"—to countries exceeding their targets. Trading carbon dioxide (CO2) and other greenhouse gas (GHG) emissions is called cap-and-trade (CAT) or carbon pricing. This is a method of limiting climate change by creating a market with limited emission limits. Emissions trading operates by setting caps on emissions from all participating emitters. Entities with lower emissions sell their carbon emission rights to other entities. Therefore, the most cost-effective carbon reduction methods will be developed first. However, traditional electricity trading, while fully considering distributed generation of renewable energy, neglects its carbon reduction benefits, failing to fully utilize idle carbon emission credits from renewable energy sources to promote the trading and redistribution of carbon emission rights, thus hindering the further development of renewable energy at the electricity market level.
[0004] Blockchain technology: Blockchain is a shared, anonymous, and immutable ledger designed to facilitate transaction recording and asset tracking processes within business networks. Assets can be tangible (such as houses, cars, cash, and land) or intangible (such as intellectual property, patents, copyrights, and brands). Almost anything of value can be tracked and traded on a blockchain network, thereby reducing the risk of critical privacy information leaks and lowering market operating and transaction costs. Compared to traditional electricity trading methods, where price quotes, generator parameters, and user loads between different electricity users are private information that each user is unwilling to publicly share, blockchain technology's sharing, anonymity, and privacy protection features allow blockchain-supported decentralized market platforms to allow all members of the electricity network to directly access the market and exchange energy with any other member without central authority oversight. By trading locally generated energy from distributed renewable energy generators among producers, consumers, storage, and electric vehicles, renewable energy utilization can be maximized, and energy exchange with adjacent grids can be minimized. Blockchain applications in the energy market also contribute to increased transparency, provide payment platforms for energy trading, and offer crucial technical support for the security and privacy of encrypted transaction information. Summary of the Invention
[0005] Purpose of the invention: This method enables the integration of electricity and carbon emission rights trading markets at the distribution network level, facilitating joint trading of electricity transactions within the system and carbon emission rights under carbon emission quota constraints. By building a market platform using blockchain technology, the method ensures that the trading process is secure, fair, private, and efficient.
[0006] Technical Solution: The technical problem this invention aims to solve is to address the current situation where the power market and carbon emission trading market at the distribution network level are independent and lack a joint trading market model. This invention proposes a joint trading method for power and carbon emission rights in the distribution network based on blockchain technology. By establishing an optimized joint trading model for power and carbon emission rights in the distribution network, the method optimizes transaction costs and revenues for market participants under different specific energy consumption scenarios. It calculates carbon emissions generated by different energy consumption behaviors, such as demand-driven electricity production, and allows for flexible trading of carbon emission rights within the system's total carbon emission limit. Furthermore, a market platform is built using blockchain technology to ensure the trading process is secure, fair, private, and efficient.
[0007] To achieve the above-mentioned technical objectives and effects, the present invention is implemented through the following technical solution:
[0008] 1) Input the carbon emission curve parameters of different generating units, distribution network topology parameters, carbon emission limits on the generation side and user side, and time-of-use electricity prices from power retailers to form a basic dataset; this data includes carbon emission factors for coal, diesel, and natural gas power generation, carbon emission factors for external power generation, carbon emission factors for renewable energy power generation, distribution network topology parameters, operating parameters for ground source heat pumps, water source heat pumps, and air source heat pumps, user-side load forecast data, carbon emission limits for each entity on the generation side and user side, and time-of-use electricity price parameters provided by power retailers;
[0009] 2) Construct carbon emission constraints and carbon tax penalty functions, where the carbon emission models for market participants are derived from... Time period The total carbon emissions from the domestic power generation side consist of carbon emissions from local power generation and carbon emission trading volume, specifically expressed as follows:
[0010]
[0011] in, , Indicates the first in the market , One participant, , , ; This represents the carbon emission result of the i-th participant after the transaction at time t; This indicates the carbon emissions and unit output of combined heat and power (CHP) units and gas turbine units. , The function; , These are the coefficients of the quadratic and linear terms of the carbon emission curve; Indicates in Time by participants To the participants Carbon emission rights sold; Indicates in Time by participants To the participants Purchased carbon emission rights;
[0012] The total regional carbon emission limit constraint of the power distribution network caused by electricity consumption is expressed as follows:
[0013]
[0014] In the formula, The total carbon emission limit within the distribution network area;
[0015] For the first For an individual user, the carbon tax penalty function can be expressed as:
[0016]
[0017] In the formula, For the first The total amount of carbon tax paid by a user in one day. The carbon tax price per ton of carbon emissions;
[0018] 3) Establish an optimization model for the joint trading market of electricity and carbon emissions under the distribution network, for the first... For each market participant, the objective function is:
[0019]
[0020]
[0021] In the formula, For the first The objective function of each market participant; The power generation cost of combined heat and power units and gas turbine units; , and These are the quadratic coefficient, linear coefficient, and constant parameter of the unit's power generation cost curve, respectively. Let be the carbon tax penalty function for the i-th market participant. Maintenance cost per unit power of combined heat and power units and gas turbines; The time-of-use electricity price for electricity retailers on the power grid; The time-of-use electricity price for electricity retailers; For the first Individual market participants The amount of electricity purchased from the power grid and retailers at all times; For the first Individual market participants The amount of electricity sold to the power grid and retailers at all times; For the first Individual market participants From the moment Electricity purchase prices for each market participant; For the first Individual market participants At all times towards the first Electricity prices for individual market participants; For the first Individual market participants From the moment Electricity purchase capacity of each market participant; For the first Individual market participants At all times towards the first Electricity sales capacity of each market participant; For the first Individual market participants From the moment The purchase price of carbon emission rights for each market participant; For the first Individual market participants At all times towards the first The purchase price of carbon emission rights for each market participant; For the first Individual market participants From the moment Carbon emission allowances purchased by each market participant; For the first Market participants At all times towards the first Carbon emission allowances purchased by each market participant;
[0022] The node injection power constraints are as follows:
[0023]
[0024] In the formula, , users respectively At the node The active and reactive power injected at the point; , users respectively Electricity purchased and sold from grid electricity retailers; For users From other users The sum of power purchased and sold at the point; , , and users respectively The active or reactive power generated by cogeneration and gas turbines; , , and users respectively The active or reactive power of adjustable loads and fixed loads;
[0025] The power flow constraints of the power grid are as follows:
[0026]
[0027] In the formula, , They are nodes upstream branch node With nodes The voltage amplitude; , , and These are the line resistance, line reactance, active power, and reactive power, respectively, with node n as the terminal node. , They are nodes Upper and lower limits of voltage amplitude; , These represent the active power and reactive power of the line downstream of node n, respectively.
[0028] 4) Each participant initializes the solution and provides an initial solution:
[0029] For each market participant i, the optimization problem of minimizing its local transaction costs can be expressed as:
[0030]
[0031]
[0032] In the formula, For the first The objective function of each market participant; For the first A vector set of decision variables for each market participant. ; Let z be the reference value from the previous iteration; The iteration step size constant for the ADMM algorithm is taken as 1e-3; for initialization, the objective function at this time... And the electricity trading price in the first iteration The initial solution is obtained by optimizing the time-of-use electricity prices of the grid's electricity retailers using the local solver. ;
[0033] 5) Data is uploaded to the blockchain:
[0034] The Ethereum Virtual Machine code is launched via the Geth client, creating a private blockchain at each participant's location, setting up the launch node and other nodes, and using locally optimized data to obtain the initial solution from the local solver through a data transformation protocol written in Python. Uploaded to the blockchain via the Ethereum Virtual Machine and stored encrypted;
[0035] 6) The smart contract determines whether the transaction results have converged:
[0036] The smart contract determines whether the data uploaded by each market participant to the blockchain meets the requirements. If the conditions are met, the transaction result is considered converged, and the process jumps to step (8) to determine whether the grid voltage meets the safety constraints; if not, the process continues. Then, proceed to step (7) to perform the broadcast update and iterative solution of the optimization variables;
[0037] 7) Market participants update transaction information from smart contracts and solve the problem iteratively locally:
[0038] Market participants obtain iterative update information for decision variables through smart contracts. For the k-th iteration, the following is executed:
[0039]
[0040]
[0041]
[0042] Latest transaction variable results after execution Upload to the blockchain in step (5), and verify again in step (6) whether iterative convergence is satisfied;
[0043] 8) Determine whether the grid voltage meets safety constraints:
[0044] By reading node voltage information from the blockchain through smart contracts, it is determined whether the grid node voltage meets the constraints under the transaction results of each market participant. And each participant calculated the voltage of all nodes. Are they consistent? If the voltages satisfy the constraints and each participant calculates all node voltages. If consensus is reached, a transaction is reached, and the final transaction information is broadcast to every user node on the Ethereum Virtual Machine via a smart contract, and the transaction is executed; if the constraints are not met or the node voltages calculated by each participant are not met, a transaction is executed. If there is a discrepancy, proceed to step (7) to perform the next iterative calculation until the transaction result finally meets the execution conditions and the transaction is completed. Under the premise of ensuring the privacy protection of users' key information, the joint transaction of power distribution network electricity and carbon emission rights is realized.
[0045] Beneficial effects:
[0046] Compared with existing technologies, the beneficial effects of this invention are as follows: Existing power trading and carbon emission metering and trading elements in power distribution networks are independent and lack integrated joint trading market models. To help achieve dual carbon targets, this invention establishes a scientific and precise joint trading method for power and carbon emission rights in power distribution networks. This is a crucial foundation for achieving regional power distribution network carbon reduction through market incentives. Furthermore, the use of blockchain technology to build a distributed market trading platform ensures the security, fairness, privacy, and efficiency of the trading process. Therefore, this invention proposes a blockchain-based joint trading method for power and carbon emission rights in power distribution networks. The essence of this invention is to establish a joint market for power and carbon emissions in power distribution networks that considers carbon emission metering from power production, regional carbon emission limits, carbon tax penalties, and carbon emission rights trading. It optimizes transaction costs and revenues for market participants in different specific energy consumption scenarios, calculates carbon emissions generated by different energy consumption behaviors such as demand-driven power production, and allows for flexible trading of carbon emission rights under the premise of total system carbon emission limits. The market platform built using blockchain technology ensures the security, fairness, privacy, and efficiency of the trading process. This invention addresses the problem that existing electricity trading does not consider carbon emissions and does not integrate regional electricity carbon emission trading from a market perspective. At the same time, it leverages the role of blockchain technology in improving transparency in distributed energy trading and enhances the potential of blockchain technology to provide a secure, fair, private, and efficient platform for energy trading. Attached Figure Description
[0047] Figure 1 This is a graph showing the photovoltaic output of the power distribution network in the present invention.
[0048] Figure 2 This is a diagram showing the operation of a blockchain platform node in the present invention.
[0049] Figure 3 This is a diagram showing the electricity trading results between market participants and grid retailers in this invention's case.
[0050] Figure 4 This is a diagram showing the results of electricity transactions between market participants in this invention.
[0051] Figure 5 This invention provides a diagram illustrating the carbon emissions from the joint trading of electricity and carbon emission rights within the industrial park.
[0052] Figure 6 This is a flowchart illustrating the principle of this invention. Detailed Implementation
[0053] Referring to the accompanying drawings, the present invention is implemented through the following specific embodiments:
[0054] 1) Input the carbon emission curve parameters of different generating units, distribution network topology parameters, carbon emission limits on the generation side and user side, and time-of-use electricity prices from power retailers to form a basic dataset; this data includes carbon emission factors for coal, diesel, and natural gas power generation, carbon emission factors for external power generation, carbon emission factors for renewable energy power generation, distribution network topology parameters, operating parameters for ground source heat pumps, water source heat pumps, and air source heat pumps, user-side load forecast data, carbon emission limits for each entity on the generation side and user side, and time-of-use electricity price parameters provided by power retailers;
[0055] 2) Construct carbon emission constraints and carbon tax penalty functions, where the carbon emission models for market participants are derived from... Time period ( The total carbon emissions from the domestic power generation side consist of carbon emissions from local power generation and carbon emission trading volume, specifically expressed as follows:
[0056]
[0057] in, , Indicates the first in the market , One participant, , , ; This represents the carbon emission result of the i-th participant after the transaction at time t; This indicates the carbon emissions and unit output of combined heat and power (CHP) units and gas turbine units. , The function; , These are the coefficients of the quadratic and linear terms of the carbon emission curve; Indicates in Time by participants To the participants Carbon emission rights sold; Indicates in Time by participants To the participants Purchased carbon emission rights;
[0058] The total regional carbon emission limit constraint of the power distribution network caused by electricity consumption is expressed as follows:
[0059]
[0060] In the formula, The total carbon emission limit within the distribution network area;
[0061] For the first For an individual user, the carbon tax penalty function can be expressed as:
[0062]
[0063] In the formula, For the first The total amount of carbon tax paid by a user in one day. The carbon tax price per ton of carbon emissions;
[0064] 3) Establish an optimization model for the joint trading market of electricity and carbon emissions under the distribution network, for the first... For each market participant, the objective function is:
[0065]
[0066]
[0067] In the formula, For the first The objective function of each market participant; The power generation cost of combined heat and power units and gas turbine units; , and These are the quadratic coefficient, linear coefficient, and constant parameter of the unit's power generation cost curve, respectively. Let be the carbon tax penalty function for the i-th market participant. Maintenance cost per unit power of combined heat and power units and gas turbines; The time-of-use electricity price for electricity retailers on the power grid; The time-of-use electricity price for electricity retailers; For the first Individual market participants The amount of electricity purchased from the power grid and retailers at all times; For the first Individual market participants The amount of electricity sold to the power grid and retailers at all times; For the first Individual market participants From the moment Electricity purchase prices for each market participant; For the first Individual market participants At all times towards the first Electricity prices for individual market participants; For the first Individual market participants From the moment Electricity purchase capacity of each market participant; For the first Individual market participants At all times towards the first Electricity sales capacity of each market participant; For the first Individual market participants From the moment The purchase price of carbon emission rights for each market participant; For the first Individual market participants At all times towards the first The purchase price of carbon emission rights for each market participant; For the first Individual market participants From the moment Carbon emission allowances purchased by each market participant; For the first Market participants At all times towards the first Carbon emission allowances purchased by each market participant;
[0068] The node injection power constraints are as follows:
[0069]
[0070] In the formula, , users respectively At the node The active and reactive power injected at the point; , users respectively Electricity purchased and sold from grid electricity retailers; For users From other users The sum of power purchased and sold at the point; , , and users respectively The active or reactive power generated by cogeneration and gas turbines; , , and users respectively The active or reactive power of adjustable loads and fixed loads;
[0071] The power flow constraints of the power grid are as follows:
[0072]
[0073] In the formula, , They are nodes upstream branch node With nodes The voltage amplitude; , , and These are the line resistance, line reactance, active power, and reactive power, respectively, with node n as the terminal node. , They are nodes Upper and lower limits of voltage amplitude; , These represent the active power and reactive power of the line downstream of node n, respectively.
[0074] 4) Each participant initializes the solution and provides an initial solution:
[0075] For each market participant i, the optimization problem of minimizing its local transaction costs can be expressed as:
[0076]
[0077]
[0078] In the formula, For the first The objective function of each market participant; For the first A vector set of decision variables for each market participant. ; Let z be the reference value from the previous iteration; The iteration step size constant for the ADMM algorithm is taken as 1e-3; for initialization, the objective function at this time... And the electricity trading price in the first iteration The initial solution is obtained by optimizing the time-of-use electricity prices of the grid's electricity retailers using the local solver. ;
[0079] 5) Data is uploaded to the blockchain:
[0080] The Ethereum Virtual Machine code is launched via the Geth client, creating a private blockchain at each participant's location, setting up the launch node and other nodes, and using locally optimized data to obtain the initial solution from the local solver through a data transformation protocol written in Python. Uploaded to the blockchain via the Ethereum Virtual Machine and stored encrypted;
[0081] 6) The smart contract determines whether the transaction results have converged:
[0082] The smart contract determines whether the data uploaded by each market participant to the blockchain meets the requirements. If the conditions are met, the transaction result is considered converged, and the process jumps to step (8) to determine whether the grid voltage meets the safety constraints; if not, the process continues. Then, proceed to step (7) to perform the broadcast update and iterative solution of the optimization variables;
[0083] 7) Market participants update transaction information from smart contracts and solve the problem iteratively locally:
[0084] Market participants obtain iterative update information for decision variables through smart contracts. For the k-th iteration, the following is executed:
[0085]
[0086]
[0087]
[0088] Latest transaction variable results after execution Upload to the blockchain in step (5), and verify again in step (6) whether iterative convergence is satisfied;
[0089] 8) Determine whether the grid voltage meets safety constraints:
[0090] By reading node voltage information from the blockchain through smart contracts, it is determined whether the grid node voltage meets the constraints under the transaction results of each market participant. And each participant calculated the voltage of all nodes. Are they consistent? If the voltages satisfy the constraints and each participant calculates all node voltages. If consensus is reached, a transaction is reached, and the final transaction information is broadcast to every user node on the Ethereum Virtual Machine via a smart contract, and the transaction is executed; if the constraints are not met or the node voltages calculated by each participant are not met, a transaction is executed. If there is a discrepancy, proceed to step (7) to perform the next iterative calculation until the transaction result finally meets the execution conditions and the transaction is completed. Under the premise of ensuring the privacy protection of users' key information, the joint transaction of power distribution network electricity and carbon emission rights is realized.
[0091] Simulation verification:
[0092] To verify the effectiveness and practicality of this invention, a mathematical model of a joint trading market for power distribution networks and carbon emission rights was established in MATLAB. The IEEE-33 bus test system and actual photovoltaic output data were selected, and three market participants and electricity retailers were identified as all market participants. Based on the actual photovoltaic output dataset, such as... Figure 1 Input the photovoltaic power output forecast data. For example... Figure 2As shown, a private blockchain is created using the Ethereum platform virtual machine, running a blockchain with four nodes, ensuring the security, fairness, privacy, and efficiency of transactions. Figure 3 As shown, the transaction results demonstrate that through market trading methods, different participants can optimize their electricity purchase costs and sales revenue by buying electricity from power operators during periods of low electricity prices and selling it back to them during periods of high prices. Figure 4 As shown, the transaction results indicate that, in addition to trading with electricity retailers, different market participants can optimize their electricity purchase costs and sales revenue through market transactions. This is achieved by purchasing electricity from electricity operators during periods of low electricity prices and selling it to them during periods of high prices, and by adjusting their bidding strategies based on their own trading activities. Figure 5 As shown, each market participant, under carbon emission constraints, sells their carbon emissions to electricity retailers that primarily utilize renewable energy sources, thereby reducing their own carbon emissions to meet these constraints. Simultaneously, this ensures that the overall carbon emissions of the distribution network remain below the regional total emission limit.
[0093] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. A joint trading method for electricity carbon emission rights based on blockchain technology, characterized in that, The method includes the following steps: Step 1: Input the carbon emission curve parameters of different generating units, distribution network topology parameters, carbon emission limits on the generation side and user side, and time-of-use electricity prices from grid electricity retailers to form a basic dataset. This data includes carbon emission factors for coal, diesel, and natural gas power generation, carbon emission factors for external power generation, carbon emission factors for renewable energy power generation, distribution network topology parameters, operating parameters for ground source heat pumps, water source heat pumps, and air source heat pumps, user-side load forecast data, carbon emission limits for each entity on the generation side and user side, and time-of-use electricity price parameters provided by grid electricity retailers. Step Two: Construct carbon emission constraints and carbon tax penalty functions, where the carbon emission models for market participants are derived from... Time period The total carbon emissions from the domestic power generation side consist of carbon emissions from local power generation and carbon emission trading volume, specifically expressed as follows: in, , Indicates the first in the market , One participant, , , ; This represents the carbon emission result of the i-th participant after the transaction at time t; This indicates the carbon emissions and unit output of combined heat and power (CHP) units and gas turbine units. , The function; , These are the coefficients of the quadratic and linear terms of the carbon emission curve; Indicates in Time by participants To the participants Carbon emission rights sold; Indicates in Time by participants To the participants Purchased carbon emission rights; The total regional carbon emission limit constraint of the power distribution network caused by electricity consumption is expressed as follows: In the formula, The total carbon emission limit within the distribution network area; For the For an individual user, the carbon tax penalty function can be expressed as: In the formula, For the first The total amount of carbon tax paid by a user in one day. The carbon tax price per ton of carbon emissions; Step 3: Establish an optimization model for the joint trading market of electricity and carbon emissions under the distribution network. For each market participant, the objective function is: In the formula, For the first The objective function of each market participant; The power generation cost of combined heat and power units and gas turbine units; , and These are the quadratic coefficient, linear coefficient, and constant parameter of the unit's power generation cost curve, respectively. Let be the carbon tax penalty function for the i-th market participant. Maintenance cost per unit power of combined heat and power units and gas turbines; The time-of-use electricity price for electricity retailers on the power grid; The time-of-use electricity price for electricity retailers; For the first Individual market participants The amount of electricity purchased from the power grid and retailers at all times; For the first Individual market participants The amount of electricity sold to the power grid and retailers at all times; For the first Individual market participants From the moment Electricity purchase prices for each market participant; For the first Individual market participants At all times towards the first Electricity prices for individual market participants; For the first Individual market participants From the moment Electricity purchase capacity of each market participant; For the first Individual market participants At all times towards the first Electricity sales capacity of each market participant; For the first Individual market participants From the moment The purchase price of carbon emission rights for each market participant; For the first Individual market participants At all times towards the first The purchase price of carbon emission rights for each market participant; For the first Individual market participants From the moment Carbon emission allowances purchased by each market participant; For the first Market participants At all times towards the first Carbon emission allowances purchased by each market participant; The node injection power constraints are as follows: In the formula, , users respectively At the node The active and reactive power injected at the point; , users respectively Electricity purchased and sold from grid electricity retailers; For users From other users The sum of power purchased and sold at the point; , , and users respectively The active or reactive power generated by cogeneration and gas turbines; , , and users respectively The active or reactive power of adjustable loads and fixed loads; The power flow constraints of the power grid are as follows: In the formula, , They are nodes upstream branch node With nodes The voltage amplitude; , , and These are the line resistance, line reactance, active power, and reactive power, respectively, with node n as the terminal node. , They are nodes Upper and lower limits of voltage amplitude; , These represent the active power and reactive power of the line downstream of node n, respectively. Step 4: Each participant initializes the solution and provides an initial solution: For each market participant i, the optimization problem of minimizing its local transaction costs can be expressed as: In the formula, For the first The objective function of each market participant; For the first A vector set of decision variables for each market participant. ; Let z be the reference value from the previous iteration; The iteration step size constant for the ADMM algorithm is taken as 1e-3; for initial solution, the objective function at this time... And the electricity trading price in the first iteration The initial solution is obtained by optimizing the time-of-use electricity prices of the electricity retailers on the power grid through a local solver. ; Step 5: Upload data to the blockchain: The Ethereum Virtual Machine code is launched via the Geth client, creating a private blockchain at each participant's location, setting up the launch node and other nodes, and using locally optimized data to obtain the initial solution from the local solver through a data transformation protocol written in Python. Uploaded to the blockchain via the Ethereum Virtual Machine and stored encrypted; Step Six: The smart contract determines whether the transaction results have converged. The smart contract determines whether the data uploaded by each market participant to the blockchain meets the requirements. If the conditions are met, the transaction result is considered converged, and the process proceeds to step eight to determine whether the grid voltage meets the safety constraints; otherwise, it is considered not converged. Then proceed to step seven to perform the broadcast update and iterative solution of the optimization variables; Step 7: Market participants update transaction information from the smart contract and iterate locally to solve the problem. Market participants obtain iterative update information for decision variables through smart contracts. For the k-th iteration, the following is executed: Latest transaction variable results after execution The data is uploaded to the blockchain in step five, and then verified again in step six to ensure iterative convergence. Step 8: Determine if the mains voltage meets safety constraints. By reading node voltage information from the blockchain through smart contracts, it is determined whether the grid node voltage meets the constraints under the transaction results of each market participant. And each participant calculated the voltage of all nodes. Are they consistent? If the voltages satisfy the constraints and each participant calculates all node voltages. If consensus is reached, a transaction is reached, and the final transaction information is broadcast to every user node on the Ethereum Virtual Machine via a smart contract, and the transaction is executed; if the constraints are not met or the node voltages calculated by each participant are not met, a transaction is executed. If there is a discrepancy, proceed to step seven to perform the next iterative calculation until the transaction result finally meets the execution conditions and the transaction is completed. Under the premise of ensuring the privacy protection of users' key information, the joint trading of power distribution network electricity and carbon emission rights is realized.