Close Menu
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    StockNews24StockNews24
    Subscribe
    • Shares
    • News
      • Featured Company
      • News Overview
        • Company news
        • Expert Columns
        • Germany
        • USA
        • Price movements
        • Default values
        • Small caps
        • Business
      • News Search
        • Stock News
        • CFD News
        • Foreign exchange news
        • ETF News
        • Money, Career & Lifestyle News
      • Index News
        • DAX News
        • MDAX News
        • TecDAX News
        • Dow Jones News
        • Eurostoxx News
        • NASDAQ News
        • ATX News
        • S&P 500 News
      • Other Topics
        • Private Finance News
        • Commodity News
        • Certificate News
        • Interest rate news
        • SMI News
        • Nikkei 225 News1
    • Carbon Markets
    • Raw materials
    • Funds
    • Bonds
    • Currency
    • Crypto
    • English
      • العربية
      • 简体中文
      • Nederlands
      • English
      • Français
      • Deutsch
      • Italiano
      • Português
      • Русский
      • Español
    StockNews24StockNews24
    Home » A unified FLC-blockchain framework for optimized carbon credit trading in multi-microgrid systems – Scientific Reports
    Carbon Credits

    A unified FLC-blockchain framework for optimized carbon credit trading in multi-microgrid systems – Scientific Reports

    userBy user2025-08-16No Comments15 Mins Read
    Facebook Twitter LinkedIn Telegram Pinterest Tumblr Reddit WhatsApp Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    This study adopts a code-driven simulation methodology to develop, test, and evaluate a decentralized framework for energy and carbon credit trading in multi-microgrid environments. The architecture integrates IT2-FLC for adaptive energy decision-making and blockchain-based smart contracts for secure, tamper-proof transaction execution. All data used in this framework is synthetically generated via a Python-based simulation environment that models realistic energy production and consumption using dynamic sine wave profiles.

    Compared to traditional Type-1 Fuzzy Logic Controllers (T1-FLC), the Interval Type-2 FLC (IT2-FLC) adopted in our framework offers significantly greater robustness in the presence of uncertainty. This enhancement arises from the additional degrees of freedom provided by the footprint of uncertainty (FOU), enabling the controller to handle dynamic variations, sensor noise, and modeling imprecision more effectively. Prior studies have consistently validated this advantage. For example, a comparative investigation by44 demonstrates that IT2-FLC outperforms T1-FLC across multiple benchmark nonlinear systems under various noise levels, exhibiting improved control stability and performance. Additionally,45 emphasizes that higher-order fuzzy systems, including interval and general Type-2 FLSs, are especially well suited for real-world applications where uncertainty is a dominant factor. These findings align with our application context, where the IT2-FLC manages fluctuations in load demand, intermittent generation, and volatile market conditions, challenges that would otherwise impair control fidelity with a Type-1 approach. Therefore, the adoption of IT2-FLC in our system directly contributes to more adaptive and resilient decision-making in peer-to-peer microgrid environments.

    The system comprises three islanded microgrids, each with unique energy capacities and demand patterns. A dedicated IT2-FLC governs each microgrid, analyzing real-time values for energy generation, load, battery status, and carbon credit balances to determine optimal operational actions. Based on these evaluations, the FLC autonomously generates buy/sell/hold decisions for energy and carbon credits. These decisions are passed to a decentralized auction mechanism, which iteratively matches bids and asks across the microgrids to identify a market-clearing price. If a valid match is found, the auction executes the transaction at the clearing price; otherwise, it is deferred. The outcome of each trade is enforced using Ethereum smart contracts, ensuring that transactions are executed only under predefined, tamper-proof conditions.

    Smart contracts also autonomously update participant balances and record the transaction on the blockchain ledger, providing immutable auditability and full transparency. The blockchain further serves as a feedback mechanism, feeding verified data back into the IT2-FLCs for future decisions. This closed-loop process enables dynamic, trustless coordination across distributed energy nodes. Figure 3 illustrates the end-to-end system architecture. The core steps in the carbon credit transaction workflow are as follows:

    1. 1.

      Credit Allocation–Initial carbon credits are distributed via the allocateInitialCredits() smart contract function.

    2. 2.

      Buy/Sell Decisions–FLCs analyze energy imbalances and generate auction bids or asks accordingly.

    3. 3.

      Auction Execution–Bids and asks are matched via an iterative auction engine; prices are dynamically adjusted.

    4. 4.

      Blockchain Settlement–Final transactions are executed through buyCarbonCredits() and sellCarbonCredits() functions, with all records stored on-chain.

    Fig. 3
    figure 3

    Microgrid management

    This section explains the proposed microgrid algorithm and fuzzy logic-based energy management control. In our proposed model, we have designed three islanded microgrids with different energy production capabilities and consumption needs. The specifications of microgrids are mentioned in Table 1.

    Table 1 Specifications of microgrids.

    Algorithm 1 explains the core functionalities of a single microgrid class written in Python language.

    Algorithm 1
    figure a

    MG energy management and blockchain interaction.

    Initially, the system establishes a connection with the blockchain using the Web 3 libraries. We have used the Ganache environment to facilitate communication between Remix IDE and Python. Energy production and consumption are managed by different functions of the microgrid class. Carbon credits and carbon transaction functions are introduced tracking and recording all transactions. The sine wave load profile is used to simulate energy usage patterns to provide a dynamic model for energy consumption and production. To reflect microgrid’s efficiency, cost saving, and renewable energy utilization, energy matric are regularly updated. A fuzzy controller optimizes cost savings and environmental impact by making decisions on energy management and carbon credit trading. The pseudocode of the fuzzy controller outlining the control of energy flow and battery dispatch in a microgrid is mentioned below.

    Generate Bid and Ask (Based on Fuzzy Controller Decision)

    Algorithm 2
    figure b

    Fuzzy energy management controller.

    To ensure optimal conditions, fuzzy controllers dynamically manage energy production, consumption, and storage. By defining system inputs and outputs, difficult decisions can be made by interpreting complex scenarios. Energy usage and market conditions are continuously monitored; moreover, by applying predefined rules and fuzzifying input data like battery charge levels and load power are adjusted by the controller to reduce cost, stabilize the grid, and enhance sustainability. A continuous optimization loop makes sure that the microgrid responds to changes according to gathered data. This loop makes decisions based on fuzzy logic rules to optimize battery power and make adjustments according to market conditions. The result is efficient and resilient as it adopts both internal demand and external market dynamics, consequently maximizing energy efficiency and minimizing environmental impact.

    Perform Transaction

    FLC implementation details

    The proposed IT2-FLC handles three fundamental microgrid uncertainties:

    1. 1.

      Renewable generation volatility (± 25% from forecast)

    2. 2.

      Load demand fluctuations (Gaussian noise, \(\sigma =15\%\) of nominal)

    3. 3.

      Market price variability (Ornstein–Uhlenbeck process, \(\theta =0.2\))

    The controller processes six core inputs through Gaussian membership functions (\(\sigma =0.25\)).Fuzzy controller input parameters and membership characteristics are mentioned in Table 2.

    Table 2 Fuzzy controller input parameters and membership characteristics.
    1. (1)

      Fuzzy inputs

    The FLC takes the following key inputs with fuzzy sets.

    • Carbon Credit Balance: Low, Medium, or High.

    • Energy Surplus/Deficit: Based on the difference between energy production and consumption, it is defined as Deficit or Surplus.

    • Market Demand and Supply: Low, Medium, or High based on market conditions.

    Each fuzzy input is modeled using an Interval Type-2 Triangular Membership Function.

    $${\upmu }_{{\overline{A}}} \left( x \right) = \left[ {\underline {{\upmu }}_{A} \left( x \right), {\overline{\mu }}_{A} \left( x \right) } \right]$$

    (21)

    \({\underset{\_}{\upmu }}_{A}\left(x\right), {\overline{\upmu } }_{A}(x)\) are the lower and upper membership functions (LMF and UMF), forming the footprint of uncertainty (FOU).

    1. (2)

      Fuzzy rules

    Table 3 defines the rules for microgrid and energy management in the controller. The fuzzy sets for these inputs use triangular membership functions, with variables NB, NS, ZE, PB, and PS representing different levels: Negative Big, Negative Small, Zero, Positive Big, and Positive Small. The control surface defined by the rules determines the battery power output based on the fuzzified values of load power and battery charge. Each rule’s strength is determined by the minimum degree of membership of the input variables (AND operation). Once the strength of a rule is determined, it is applied to the output set. Let’s say the rule is:

    $$\begin{aligned} If \, Load \, Power & \, = \,High \, and \, Battery \, Charge \\ & = \,Low, \, then \, Battery \, Power\, = \,High. \\ \end{aligned}$$

    For rule evaluation in an IT2-FLC, the degree of membership for each input is obtained using interval fuzzy sets. These sets contain both lower and upper membership values, which represent the uncertainty in the system’s inputs. The strength of each rule is determined by the minimum of the lower and upper bounds of the membership degrees for the involved input variables using the AND operation. In other words, the rule’s activation is based on the minimum membership value of both conditions, and this minimum value is used to determine how strongly the rule is activated. The battery power output is then updated according to the determined strength of the rule, using the interval membership values for the inputs. Lower and upper bounds are used to represent the intervals for the fuzzy sets. The rule strength can be mathematically expressed as:

    $$Rule Strength = {\text{min}}\left( {{\upmu }_{{load_{power} }} \left( {High} \right)_{lower} , {\upmu }_{{battery_{power} }} \left( {Low} \right)_{lower} } \right)$$

    (22)

    $$Rule Strength = {\text{min}}\left( {{\upmu }_{{load_{power} }} \left( {High} \right)_{upper} , {\upmu }_{{battery_{power} }} \left( {Low} \right)_{upper} } \right)$$

    (23)

    1. (3)

      Fuzzication process

    Each input value is fuzzified, meaning it is mapped to a fuzzy set where the input belongs to a degree of membership rather than a specific value. For instance, if the carbon credit balance is between Low and Medium, it may partially belong to both sets, depending on its position within the range. The Gaussian membership function is used for smooth transitions between fuzzy sets, which is essential for modeling uncertainties in the microgrid system. The Gaussian function is defined as:

    $${\upmu }\left( {\text{x}} \right) = {\text{exp}}\left( { – 0.5{*}\left( {\frac{x – c}{{\upsigma }}} \right)^{2} } \right)$$

    (24)

    where σ = 0.25(a manually optimized value based on empirical testing). The equation defines a bell-shaped curve where \(\upmu \left(\text{x}\right)\) measures how strongly input x belongs to a fuzzy set, centered at \(c\) with spread \(\upsigma\). The exponential term ensures smooth transitions between membership levels, crucial for handling microgrid uncertainties.

    1. (4)

      Inference mechanism

    The FLC evaluates all applicable rules based on the current input values. For each rule, it calculates the degree of truth. for example, if two rules recommend “Sell”, and their degrees of truth are 0.6 and 0.8, FLC collects these values to regulate the overall confidence in Sell action.

    The rule activation strength is determined by taking the minimum degree of membership for each input. This determines how strongly a particular rule should be applied in the decision-making process. In other words, the activation of a rule is constrained by the weakest (lowest) degree of membership among the input variables. In the Mamdani fuzzy inference system (FIS), the rule strength is calculated as

    $${\upalpha }_{i} = {\text{min}}\left( {{\upmu }_{load} \left( {x_{1} } \right),{\upmu }_{soc} \left( {x_{2} } \right),{\upmu }_{market} \left( {x_{3} } \right)} \right)$$

    (25)

    where \({\upmu }_{load}\), \({\upmu }_{soc}\),\({\upmu }_{market}\) represent the membership functions for load power, battery state of charge, and market conditions, respectively. \({x}_{1}\), \({x}_{2}\), and \({x}_{3}\) are the corresponding input values for load power, battery charge level, and market conditions. The equation ensures that the rule activation is based on the smallest membership degree, indicating that the most limiting factor (the smallest value) dictates the strength of the rule’s contribution to the decision-making process.

    1. (5)

      Defuzzification

    After the fuzzy logic system has evaluated the rules and generated fuzzy output, defuzzification is performed to convert the fuzzy results into a concrete decision. This step translates the fuzzy outputs, which are expressed in terms of membership degrees, into specific, actionable values. In the centroid method of defuzzification, the output is determined by calculating the center of the area under the membership function curve. For example, suppose the FLC decides to sell carbon credits. In that case, the defuzzification process determines not only the action (Sell) but also how many credits to sell or the appropriate price at which to sell, based on the calculated centroid of the output membership function.

    1. (6)

      Implementation

    The defuzzification and decision-making processes are implemented using a series of conditional statements that evaluate the degree of membership for each fuzzy rule and calculate the corresponding output. These conditional statements assess the fuzzified input values (such as load power, battery charge, and market conditions) and apply the predefined fuzzy rules to determine the output action. The system then uses the calculated fuzzy output (e.g., battery power, price for carbon credits, or energy transaction decisions) to make real-time adjustments to the microgrid. These decisions are based on the underlying membership functions, which represent the degree to which different actions should be taken in response to specific conditions.

    Auction mechanism design

    Market participation by each microgrid is governed by its respective fuzzy decision outputs. Specifically, microgrids evaluate their internal states, such as carbon credit balance, energy surplus or deficit, and market conditions, using IT2-FLC. A microgrid becomes eligible to participate in the auction if the fuzzy decision confidence exceeds a predefined threshold (e.g., 0.6). This threshold ensures that only microgrids with strong incentive signals engage in bidding or asking, thereby reducing unnecessary market noise and improving trading efficiency.

    The auction process follows a Continuous Double Auction (CDA) model, wherein microgrids dynamically submit bids (buy offers) or asks (sell offers) based on their real-time surplus or deficit conditions. The iterative nature of the auction allows microgrids to revise their offers across successive rounds, adapting their strategies in response to previous market outcomes and changes in their own energy metrics. If the FLC decision is “Buy” and the microgrid has a carbon credit deficit, the bid price is computed using:

    $$P_{bid}^{i} = P_{base} * (1 + {\uplambda } * {\Delta }_{{{\text{deficit}}}}^{i} )$$

    (26)

    where, \({P}_{base}\) is the baseline market price, \(\uplambda\) is a sensitivity coefficient and \({\Delta }_{\text{deficit}}^{i}\) represents the relative credit deficit of microgrid \(i.\)

    $$P_{ask}^{j} = P_{base} * (1 + {\upgamma } * {\Delta }_{{{\text{surplus}}}}^{j} )$$

    (27)

    where \(\upgamma\) is the selling aggressiveness factor, and \({\Delta }_{\text{surplus}}^{j}\) indicates the surplus condition of microgrid \(j\). Microgrids revise these offers iteratively based on feedback from unsuccessful transactions and clearing price trends. The auction mechanism continuously attempts to determine a market-clearing price by matching the highest bid price with the lowest ask price. The clearing price is computed when

    $$\begin{gathered} P_{bid}^{max} \ge P_{ask}^{min} \hfill \\ P_{clear} = \frac{{P_{bid}^{max} + P_{ask}^{min} }}{2} \hfill \\ \end{gathered}$$

    (28)

    If no matching pair is found after a pre-defined maximum number of iterations, the auction process for that cycle is terminated, indicating market illiquidity. The auction mechanism is embedded in a continuous feedback loop where the outcomes of each auction round influence subsequent fuzzy decision-making. Microgrids adjust their participation strategies and bidding behavior based on:

    • Past bid/ask acceptance rates

    • Fluctuations in market demand and supply

    • Accumulated carbon credit balance

    Following is the pseudocode for the iterative auction system of FLC.

    Algorithm 3
    figure c

    Fuzzy market strategy controller.

    The auction action is determined by a set of rules that are defined based on fuzzified inputs. The system transforms numerical inputs into fuzzified values based on the current condition of the microgrid and market. Microgrids transact energy according to real-time demands and market dynamics. Carbon credits are exchanged in response to energy generation and consumption. For instance, if a microgrid utilizes non-renewable energy, it may be required to purchase carbon credits to mitigate the emissions associated with that consumption. Conversely, if the microgrid produces excess energy from renewable sources, it may sell or collect carbon credits, benefiting from its minimal carbon footprint. By correlating energy transactions with carbon credit trading, the system guarantees the efficiency of both markets.

    Algorithm 4 delineates the structural methodology for implementing an auction system for microgrid agents. Integrating FLC-based decisions with the auction system enables the intelligent management of complexities and variabilities in energy demand and supply. This method not only improves microgrid responsiveness but also guarantees that transactions are conducted at optimal costs.

    Algorithm 4
    figure d

    Auction system for carbon credit trading.

    Following the implementation of auction rules, the system consolidates the proposed actions into a conclusive outcome and subsequently translates it back. This procedure is referred to as defuzzication. Finally, based on defuzzified auction action, the microgrid can execute the corresponding action. Once a clearing price is determined, the corresponding transaction is executed through the smart contract functions buyCarbonCredits and sellCarbonCredits. The smart contract verifies participant balances, updates credit ownership, and records the transaction on the blockchain ledger.

    Smart contract

    To ensure secure, transparent, and automated execution of carbon credit transactions in the decentralized multi-microgrid environment, the proposed framework incorporates a smart contract written in the Solidity language and deployed on the Ethereum blockchain. This smart contract encodes the trading logic, enforces market rules, and maintains an immutable record of all carbon credit transactions among participating microgrids. The smart contract architecture is structured around three key components: data structures, trading functions, and event logging mechanisms. Algorithm 5 outlines the pseudocode representation of the implemented contract.

    Algorithm 5
    figure e

    Smart contract for carbon credit trading.

    This smart contract is designed to manage carbon credit transactions on the blockchain platform. It enables the decentralized and transparent exchange of carbon credits between entities by facilitating the allocation, purchase, and sale of these credits. The “Carbon Transaction” is designed to summarize specific attributes of each transaction, such as the addresses of the buyer and seller, along with details of traded carbon credits. Then, transaction and balance mapping are defined to store transaction details and to track the balances of participants. To enforce fairness and prevent market manipulation, the contract includes several validation checks. For example, it verifies the balance of the buyer and seller before executing any transaction. If the necessary conditions are met (e.g., sufficient balance), the transaction proceeds and a NewTransaction event is emitted, which is stored on the blockchain as part of the immutable ledger.

    Once the FLC detects energy imbalance conditions, the system triggers corresponding buy or sell decisions. These decisions are forwarded to the blockchain layer, where the smart contract autonomously executes the transactions after verifying that all predefined conditions, such as adequate balance and valid trading amount, are satisfied.

    Generate Bid and Ask (Based on Fuzzy Controller Decision)

    Integration with fuzzy controller and market dynamics

    The smart contract operates seamlessly with the IT2-FLC and auction mechanism within the proposed system. The FLC dynamically evaluates real-time operational conditions, including load demand, battery status, and market parameters, to decide whether to buy, sell, or hold carbon credits. These decisions, along with auction-determined clearing prices, are passed to the smart contract for execution of the transaction.

    The decentralized ledger maintained by the blockchain provides continuous feedback to the FLC by updating carbon credit balances after each transaction. This creates a closed feedback loop that enables adaptive, autonomous, and sustainable management of both energy and carbon credits across the multi-microgrid network.



    Source link

    Share this:

    • Click to share on Facebook (Opens in new window) Facebook
    • Click to share on X (Opens in new window) X

    Like this:

    Like Loading...

    Related

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram Email
    Previous ArticleLucid gets more involved in the mineral supply chain
    Next Article Average rate on a 30-year mortgage drops to lowest level since October | News, Sports, Jobs
    user
    • Website

    Related Posts

    Tripura to pursue ‘Carbon Credit Pact’ via sustainable farming: Ratan Lal Nath

    2025-08-16

    Sadot Group’s Strategic Transformation: A High-Conviction Entry Point for Value Investors in the Agri-Sustainability Sector

    2025-08-16

    The carbon cost of real estate

    2025-08-16
    Add A Comment

    Leave a ReplyCancel reply

    © 2025 StockNews24. Designed by Sujon.

    Type above and press Enter to search. Press Esc to cancel.

    %d