Next Article in Journal
Navigating the Intersection of Microgrids and Hydrogen: Evolutionary Trends, Challenges, and Future Strategies
Previous Article in Journal
Assessing Geothermal Energy Production Potential of Devonian Geothermal Complexes in Lithuania
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Real-Time Power Management of Plug-In Electric Vehicles and Renewable Energy Sources in Virtual Prosumer Networks with Integrated Physical and Network Security Using Blockchain

by
Nikolaos Sifakis
1,*,
Konstantinos Armyras
2 and
Fotis Kanellos
3
1
Department of Production Engineering and Management, Technical University of Crete, 73100 Chania, Greece
2
Business Informatics Lab, Department of Business Administration, Athens University of Economics and Business, 10434 Athens, Greece
3
Department of Electrical and Computer Engineering, Technical University of Crete, 73100 Chania, Greece
*
Author to whom correspondence should be addressed.
Energies 2025, 18(3), 613; https://doi.org/10.3390/en18030613
Submission received: 27 December 2024 / Revised: 22 January 2025 / Accepted: 23 January 2025 / Published: 28 January 2025
(This article belongs to the Section E: Electric Vehicles)

Abstract

:
This paper presents a blockchain-enabled Multi-Agent System (MAS) for real-time power management in Virtual Prosumer (VP) Networks, integrating Plug-in Electric Vehicles (PEVs) and Renewable Energy Sources (RESs). The proposed framework addresses critical challenges related to scalability, security, and operational efficiency by developing a hierarchical MAS architecture that optimizes the scheduling and coordination of geographically distributed PEVs and RESs. Unlike conventional business management systems, this study integrates a blockchain-based security mechanism within the MAS framework, leveraging Proof of Authority (PoA) consensus to enhance transaction security while addressing scalability and energy consumption concerns. The system further employs advanced Particle Swarm Optimization (PSO) to dynamically compute optimal power set-points, enabling adaptive and efficient energy distribution. Additionally, hierarchical aggregation of transactions at lower MAS layers enhances computational efficiency and system resilience under high-traffic and partial network failure conditions. The proposed framework is validated through large-scale simulations spanning four major cities in Greece, demonstrating its scalability, reliability, and efficiency under diverse operational scenarios. Results confirm that the system effectively balances energy supply and demand while maintaining secure and transparent transactions. Despite these advancements, practical deployment challenges remain, including synchronization delays in geographically distributed agents, legacy system integration, and blockchain energy consumption. Future research directions include investigating more advanced consensus mechanisms (e.g., Proof of Task), machine learning-driven predictive optimization, real-world large-scale testing, and federated learning models for decentralized decision-making. The proposed framework offers a scalable, secure, and efficient solution for decentralized real-time energy management in Virtual Prosumer Networks.

1. Introduction

The increasing penetration of Plug-in Electric Vehicles (PEVs) and Renewable Energy Sources (RESs) into modern power grids has introduced both opportunities and challenges in energy management. Efficient integration of these technologies requires sophisticated control and scheduling systems to optimize energy consumption, ensure grid stability, and reduce operational costs. Despite advancements, current energy management systems face significant challenges in coordinating geographically distributed energy resources, ensuring the security and transparency of transactions, and adapting to dynamic energy demands and price fluctuations. Addressing these issues is critical for developing scalable and efficient energy solutions.
The Virtual Prosumer (VP) concept offers a scalable solution by treating clusters of electric vehicles (CEVs) as prosumers—simultaneously consumers and producers of energy—thereby contributing to load balancing and energy market participation. A key enabler of this concept is the Virtual Prosumer Agent (VP/A), which oversees the coordinated operation of geographically distributed CEVs and RES, ensuring efficient integration into the energy grid.
This paper presents a Virtual Prosumer Multi-Agent System (VP MAS) architecture integrated with a blockchain-based security mechanism to address these challenges. The hierarchical MAS architecture consists of multiple agent layers—EV Agents (EV/As), Cluster EV Agents (CEV/As), Distribution Feeder Agents (DF/As), and the VP/As—each responsible for specific tasks such as power scheduling, optimal load distribution, and grid interaction. By leveraging the flexibility of PEVs, the system dynamically adjusts to changing energy demands and price signals, promoting both economic efficiency and grid reliability. For a detailed description of these agents and their roles, refer to Supplementary Section S00—Overview of Virtual Prosumer Multi-Agent System Components, which provides definitions and explanations of each agent type and its function within the VP MAS framework. Further details can also be found in [1].
While blockchain technology enhances security and transparency, its scalability and energy consumption remain critical challenges. Traditional blockchain systems employing Proof of Work (PoW) consensus mechanisms are known for their high computational requirements, leading to significant energy usage. To address these concerns, the proposed system adopts the Proof of Authority (PoA) consensus mechanism, which eliminates the need for energy-intensive computations by relying on pre-approved validators. Additionally, transaction aggregation and a hierarchical MAS design mitigate scalability limitations by reducing the volume of individual transactions processed on the blockchain. These measures ensure that the system remains energy-efficient and capable of handling large-scale, geographically distributed operations.
A central challenge in managing distributed energy systems is ensuring the security and immutability of energy transactions. Common threats in MAS include Man-In-The-Middle (MITM) attacks, data modification, replay attacks, breaking cryptosystems, and denial-of-service attacks [2,3]. A detailed explanation of these attack types, along with their defining characteristics and potential impact on energy systems, is provided in Supplementary Section S5—Security Threats in Multi-Agent Systems. Cybercriminals exploit technological advancements to intrude on energy systems, as noted in various studies addressing security risks in Virtual Power Plants and proposing security architectures [4]. To address these risks, a Blockchain Model is integrated to securely record all energy exchanges between agents. Each transaction, whether related to PEV charging or RES energy generation, is aggregated, validated, and immutably recorded on the blockchain by dedicated Blockchain Agents (B/As). The PoA consensus mechanism ensures fast and reliable validation of transactions across the network, enhancing transparency and security.
Additionally, the integration of MAS, along with various optimization methods such as Particle Swarm Optimization (PSO), into the Real-Time Model enables the VP/A to compute optimal power set-points while adhering to grid constraints and responding to real-time changes in the system.
Contributions
The key contributions of this study include the following:
  • Development of a hierarchical MAS architecture for real-time energy management that optimizes the scheduling and coordination of geographically distributed PEVs and RES;
  • Integration of a blockchain-based security mechanism with PoA consensus to enhance transaction security and address scalability and energy consumption concerns;
  • Application of advanced optimization techniques, such as PSO, to compute optimal power set-points dynamically;
  • Comprehensive simulations in a geographically distributed network spanning four major cities in Greece to evaluate the scalability, reliability, and efficiency of the proposed system.
To evaluate the effectiveness of the proposed framework, case studies and simulations were conducted in a distributed network spanning four major cities in Greece. The simulations demonstrate the scalability of the system and its ability to manage high volumes of PEVs and RESs, while ensuring optimal power management and security through blockchain technology. Real-world considerations such as network delays, agent communication, and transaction validation are incorporated into the analysis to ensure that the system performs efficiently under realistic conditions.

Literature Review

The integration of Renewable Energy Sources (RESs) and Plug-in Electric Vehicles (PEVs) into modern energy systems has introduced significant opportunities for grid stability, reduced emissions, and enhanced economic efficiency. However, these advancements also bring challenges related to the real-time management of geographically dispersed resources, variability in RES availability, and the complexities of decentralized energy systems. Emerging frameworks, such as Virtual Prosumer (VP) models, including Virtual Power Plants (VPPs), prosumer societies, and energy coalitions, aim to address these challenges by aggregating and optimizing distributed energy resources.
Recent studies have explored various optimization techniques to manage these systems. For example, ref. [5] provides a comprehensive survey on Multi-Agent Systems (MASs) in Peer-to-Peer (P2P) energy trading, showcasing their scalability and adaptability in decentralized energy markets. However, this study primarily focuses on small-scale P2P energy exchanges and does not propose a real-time hierarchical MAS coordination framework. Similarly, ref. [6] investigates blockchain-driven energy community formation, demonstrating its potential for enhancing transparency and trust in energy transactions. Nevertheless, this study lacks a structured agent-based control system and does not incorporate advanced optimization techniques for real-time energy scheduling.
Blockchain technology has emerged as a transformative solution for securing energy transactions and enabling decentralized P2P energy trading. Ref. [7] surveys cybersecurity in EV ecosystems, identifying vulnerabilities and defensive mechanisms critical for secure operations in Vehicle-to-Grid (V2G) programs. While this study highlights security threats, it does not propose a practical blockchain implementation for large-scale energy management.
Additionally, refs. [8,9] introduce Ethereum-based and IPFS-integrated blockchain systems, providing dynamic pricing mechanisms for energy exchanges. However, these works are limited to small-scale implementations, where the computational overhead of blockchain transactions is not a critical issue. In contrast, our framework integrates a hierarchical MAS with a lightweight Proof of Authority (PoA) consensus, reducing computational load while ensuring security and scalability.
To address these gaps, recent works have explored novel blockchain-based solutions. Ref. [10] examines the dynamic role of EVs as prosumers in local electricity markets, emphasizing their potential to balance grid loads efficiently. However, this work does not incorporate a dedicated MAS control system, nor does it address the challenge of optimizing charging schedules dynamically. Expanding on these findings, Ref. [11] introduces a prosumer-centric smart contract framework for energy scheduling, addressing the limitations of traditional centralized optimization. Nonetheless, it does not employ hierarchical control, making it less scalable for real-time PEV coordination across multiple locations.
Emerging blockchain consensus mechanisms have been explored to improve real-time performance and security. For example, Ref. [12] proposes Proof of Task (PoT) to fortify security and computational efficiency in renewable energy systems. Although PoT enhances security, it introduces additional computational overhead, making it unsuitable for real-time multi-agent coordination. Similarly, Ref. [13] leverages blockchain and smart contracts for microgrid resilience, showcasing its applicability in addressing energy disruptions. However, it does not incorporate a MAS-based structure for optimizing large-scale PEV energy exchanges.
Several optimization techniques have been used to address uncertainties in RES availability, electricity pricing, and power management. For instance, Refs. [6,8,11] explore multi-objective optimization, federated deep reinforcement learning, and stochastic models. While these methods improve grid reliability and operational costs, they lack a hierarchical real-time approach for managing geographically dispersed PEV clusters while addressing MAS communication complexities.
Unlike prior works such as [11,12,13], which either lack real-time agent coordination, rely on high-latency Blockchain Models, or focus on limited-scale implementations, our framework integrates MAS, advanced optimization, and blockchain security into a unified system capable of handling large-scale, multi-location PEV energy transactions. By integrating blockchain for immutable and secure transaction records, the proposed system addresses concerns of scalability, energy efficiency, and cybersecurity, as highlighted in [11,12,13]. Table 1 provides a comparative analysis of recent literature and the contributions of the proposed framework, emphasizing its novelty and relevance.
The paper is structured as follows: Section 2 outlines the Virtual Prosumer Multi-Agent System (VP MAS) Architecture, Section 3 details the Scheduling System Model, and Section 4 discusses the Real-Time Model. Section 5 presents the Blockchain Real-Time Model, while Section 6 introduces the Integrated Power Management using Blockchain Algorithms. Section 7 provides simulations and results, followed by conclusions in Section 8.

2. Virtual Prosumer Multi-Agent System Architecture

2.1. Virtual Prosumer Multi-Agent Hierarchy Architecture

The proposed system employs a hierarchical Multi-Agent System (MAS) architecture to manage large-scale PEVs and RESs distributed across various geographic locations. This structured approach facilitates real-time decision-making, dynamic power management, and secure energy transactions, ensuring system scalability and stability. The architecture consists of five layers of agents, each playing a crucial role in optimizing power scheduling, enhancing grid reliability, and securing transactions:
  • Electric Vehicle Agents (EV/As): EV/As operate at the lowest level, directly managing individual Plug-in Electric Vehicles. Their primary function is to compute optimal charging schedules, considering user preferences, battery constraints, and electricity prices to minimize charging costs. Additionally, EV/As provide real-time updates on the State of Charge (SOC) and flexibility to Cluster Electric Vehicle Agents (CEV/As). By dynamically adjusting charging setpoints based on real-time electricity pricing and grid constraints, EV/As contribute to efficient load balancing and cost reduction for users;
  • Cluster Electric Vehicle Agents (CEV/As): CEV/As aggregate power demands from multiple EV/As within their designated region, ensuring that local energy distribution is efficiently balanced. They monitor transformer loads and prevent overloading by regulating charging rates dynamically. Additionally, CEV/As interact with Blockchain Agents (B/As) to validate and submit secure energy transactions, ensuring that all energy exchanges between PEVs and the grid are immutably recorded. By coordinating with DF/As and B/As, CEV/As play a critical role in maintaining grid stability while ensuring transparent, tamper-proof energy transactions;
  • Blockchain Agents (B/As): B/As provide a secure, decentralized mechanism for verifying and recording energy transactions. These agents validate transactions, aggregate them into blocks, and store them immutably on the blockchain using the PoA consensus mechanism. This process prevents data tampering and ensures transparent, traceable, and secure transactions. The recorded blockchain data are accessible to the VP/A and other agents for auditing, decision-making, and regulatory compliance, thereby enhancing trust and accountability in the energy exchange process;
  • Distribution Feeder Agents (DF/As): DF/As act as intermediaries between the CEV/As and the VP/A, ensuring that the aggregated power demands comply with grid constraints such as voltage limits, power limits, and system losses. DF/As perform real-time validation of power schedules, ensuring that the power drawn from the grid remains within safe operating limits. If grid constraints are violated, DF/As request rescheduling from the VP/A to prevent system overload. This layer is critical in ensuring grid reliability and safe energy distribution across multiple locations;
  • Virtual Prosumer Agent (VP/As): The VP/A is the highest-ranking agent in the MAS hierarchy and is responsible for the overall optimization of the VP network. The VP/A minimizes operational costs while ensuring contractual obligations with the Electric System Operator (ESO) are met. By utilizing advanced optimization techniques such as PSO and nonlinear programming, the VP/A computes the most efficient power setpoints for distributed PEVs and RESs. It also adapts dynamically to real-time changes in energy demand and supply, ensuring seamless integration of Renewable Energy Sources into the grid. Through its interaction with DF/As and B/As, the VP/A optimally balances grid load, prevents congestion, and enhances overall energy efficiency.

2.2. Information Flow, Agent Interactions and System Coordination

The hierarchical structure of the VP MAS uniquely integrates blockchain technology for secure energy transactions while leveraging advanced optimization methods for real-time energy management. This layered framework ensures that PEVs operate not only as consumers but also as energy producers, enabling flexible participation in the energy market and contributing to grid stability. The interactions between these agents, illustrated in Figure 1 and Table 2 demonstrate the system’s ability to maintain scalability, reliability, and grid stability while addressing key challenges in decentralized energy management. Furthermore, it demonstrates the structured flow of information within the MAS architecture. The following pathways are defined:
Dotted circles represent the different operational layers in which agents function. These layers include the EV/A layer, CEV/A layer, DF/A layer, B/A layer, and the VP/A layer, each contributing to scalability, distributed coordination, and real-time decision-making.
The double circle surrounding the Blockchain Agents (B/As) highlights blockchain replication, ensuring that all validated transactions are synchronized across the decentralized network. This mechanism maintains a secure, tamper-resistant ledger, facilitating transparent energy exchanges among distributed agents;
Solid black lines depict direct power control signals, where the VP/A sends optimized setpoints to DF/As and CEV/As, enabling efficient energy allocation;
Dotted blue lines illustrate real-time data exchange and monitoring, such as EV/As reporting SOC updates to CEV/As and DF/As relaying grid constraint updates to VP/A;
Dashed lines signify blockchain-based energy transaction validation, representing how CEV/As interact with B/As to securely validate and store power exchange data.
A comprehensive description of the Multi-Agent Social Interactions, detailing the communication dynamics and coordination mechanisms among agents, is provided in Supplementary Section S0—Multi-Agent Social Interactions. Further technical details of the Virtual Prosumer Scheduling System Model, including the mathematical formulation, are provided in Supplementary Section S1 for an in-depth understanding of the framework’s operational mechanisms.

2.3. Communication and Technology Implementation

Efficient communication and smart metering are essential for the seamless operation of the VP/A system, enabling real-time interaction across the MAS hierarchy and ensuring dynamic management of PEVs and RESs. The proposed framework leverages a diverse range of communication technologies, each tailored to specific operational needs:
xDSL and Power Line Communication (PLC): provide cost-effective solutions by utilizing existing infrastructure in urban and suburban areas, facilitating data exchange without significant additional investment;
Mobile Wireless Technologies (3G, 4G, 5G): offer flexibility and scalability for remote or rural deployments, with 5G excelling in high-speed, low-latency applications critical for real-time energy management;
Wi-Fi and RFID: enable efficient, localized communication in high-density environments, such as parking lots or residential clusters, with RFID supporting automated PEV identification and routing;
Ethernet: ensures secure, high-speed communication for critical operations in fixed, high-demand locations.
The choice of technology is guided by deployment-specific factors, including cost, location, and operational requirements [17,18,19]. The VP/A system integrates these technologies into a cohesive communication framework, allowing for the following:
  • Scalability: adapting to diverse environments and infrastructure constraints;
  • Reliability: ensuring uninterrupted operation through redundancy and tailored technology selection;
  • Real-time interaction: supporting low-latency, high-throughput data exchange critical for MAS decision-making.
By combining these technologies, the VP/A system ensures robust and efficient communication, meeting the dynamic requirements of PEVs and RESs while maintaining grid stability. For further technical details regarding the communication network, hardware, and software infrastructure, readers are directed to Supplementary Section S2—VP Data Network Communications, Hardware, and Software Infrastructure.

2.4. Multi-Agents Social Interactions

The social interactions among agents in the developed MAS are structured to ensure efficient communication, decision-making, and power optimization across the system. Using the FIPA-ACL communication language and message exchange protocols implemented via the JADE platform within the ECLIPSE IDE, agents exchange information to achieve coordinated operations. Detailed communication timing and definitions are provided in Supplementary Section S0 and Supplementary Table S1.
At each time slot, EV/As initiate the process by proposing power adjustments to their supervising CEV/As, including maximum and minimum active power, current power, and flexibility parameters. The CEV/As aggregate and sort these proposals, forwarding summarized data to DF/As. DF/As ensure compliance with grid constraints by solving the Optimal Power Flow (OPF) problem and relaying adjusted setpoints to the VP/A.
The VP/A serves as the central decision-making entity, solving an optimization problem using PSO to ensure system-wide power balance. Adjusted setpoints are communicated back to the CEV/As, which disseminate the updates to the EV/As. Blockchain Agents (B/As) record all accepted transactions to provide a secure and transparent log of operations.
The iterative nature of this communication process enables dynamic adjustments and ensures that the VP/A system adapts to real-time conditions. By incorporating blockchain, the framework guarantees the immutability and security of all accepted proposals. The structured interactions optimize power distribution while maintaining transparency and grid stability.
Further technical details, including Java class implementations and data structures, are provided in Supplementary Section S0 for readers requiring a deeper understanding of the communication workflow.

2.5. Blockchain Transaction Processing and Validation in a MAS

The Blockchain Agent (B/A) facilitates secure and transparent transaction processing within the MAS by leveraging blockchain technology and the PoA consensus mechanism. After receiving an accepted proposal from the CEV/A, the B/A verifies the message for integrity, legitimacy, and compliance with expected parameters, such as power setpoints and time slots.
Once verified, the B/A creates a transaction record containing the proposal’s details, including EV/A identification, accepted power setpoints, flexibility, and timestamps. Transactions are aggregated across all B/As during each time slot to optimize blockchain resource utilization. When enough transactions are collected, a new block is created containing the transaction list, a reference to the previous block’s hash, and a timestamp.
As depicted in Figure 2, the blockchain structure includes sequential blocks created by aggregating transactions from multiple B/A agents during different time slots. Each block links to the previous block through its hash, ensuring continuity and immutability in the blockchain. The figure also illustrates the details of transactions handled by various B/As, with only the last four digits of the block’s hash shown for simplicity.
The PoA consensus mechanism is then employed to validate the block. Pre-authorized validators (other B/As) verify its integrity and compliance with blockchain rules. Upon approval by the majority of validators, the block is appended to the blockchain, linking it cryptographically to the previous block. This ensures immutability and continuity within the blockchain ledger.
To maintain consistency, the new block is broadcast to all B/As, which update their local copies of the blockchain. Other MAS components, such as the VP/A, can request transaction data from B/As for analysis or decision-making. However, CEV/As and DF/As do not maintain blockchain copies, ensuring lightweight operation across the MAS.
After appending the block, the B/A sends an acknowledgment to the originating CEV/A, confirming the secure recording of the transaction. This acknowledgment includes a reference to the block number or hash, enabling future verification. The B/A also monitors the blockchain for anomalies, ensuring the system’s long-term security and integrity. This structured blockchain integration enhances the MAS by ensuring trust, transparency, and robustness in transaction recording [20].

3. Virtual Prosumer Scheduling System Model

3.1. Overview of the VP Scheduling System Model

The proposed Virtual Prosumer Scheduling System Model introduces a hierarchical multi-agent architecture for the optimal scheduling of PEVs and RESs across geographically dispersed networks. The system is designed to manage energy distribution efficiently while adhering to contractual agreements, grid constraints, and dynamic energy demands.
Key Features
  • Hierarchical multi-agent architecture: The system is structured into four layers:
    EV/A layer: minimizes PEV charging costs and optimizes individual charging profiles based on user preferences and real-time electricity prices;
    CEV/A layer: aggregates power profiles from multiple PEVs, monitors transformer loads, and prevents overloading by dynamically adjusting PEV power demands;
    DF/A layer: supervises clusters of CEVs, aggregates power consumption profiles, and ensures compliance with grid-level technical constraints;
    VP/A layer: oversees the entire scheduling process, optimizing power flows, fulfilling contractual obligations, and ensuring adherence to system-wide constraints.
  • Optimization techniques: optimization methods, such as linear (LP) and nonlinear programming (NLP), are employed to minimize operational costs and optimize power allocation at every layer. These techniques ensure real-time adaptability to dynamic grid conditions and variable energy demands;
  • Demand response strategies: the model incorporates demand response mechanisms to enhance grid stability and economic efficiency. By leveraging the flexibility of PEVs and RES, the system dynamically adjusts power consumption patterns in response to real-time price signals and grid conditions;
  • Redundancy mechanisms: to ensure reliability, the system includes backup communication channels and failover protocols that maintain real-time coordination even in the event of network failures. This feature is particularly critical in scenarios involving high penetration of intermittent Renewable Energy Sources;
Mathematical formulation and operations: the scheduling process involves solving optimization problems at each layer to minimize costs, balance power supply and demand, and ensure grid stability. The VP/A layer coordinates system-wide operations by allocating optimal power setpoints to CEVs while satisfying constraints such as guaranteed power during peak periods and grid capacity limits. Further details on the mathematical models and optimization algorithms are provided in Supplementary Section S1.

3.2. Assumptions and Limitations of VP Scheduling System Model

The mathematical models presented in this study aim to provide scalable and computationally efficient solutions for real-time energy optimization in VP Networks (VPs). However, certain assumptions and limitations should be acknowledged to contextualize the scope of the proposed model.
Optimization constraints and complexity: The optimization problems tackled in the VP/A and CEV/A layers often involve nonlinear constraints and objectives. While these approaches are effective for many scenarios, they require advanced solvers and significant computational resources to achieve accurate solutions. These challenges become increasingly pronounced as the system scales to larger networks or incorporates more complex configurations, potentially affecting the efficiency of real-time operations [21];
Battery degradation: The proposed model does not explicitly account for the degradation of PEV batteries caused by repeated charging and discharging cycles. Battery health plays a pivotal role in determining the long-term feasibility of V2G interactions and energy optimization strategies. Omitting this factor reduces the practical applicability of the optimization framework. Incorporating battery degradation models in future iterations would enhance the model’s realism and provide more accurate assessments of scheduling and energy management strategies [22].
To address these limitations, future enhancements to the model could integrate stochastic modeling techniques to better capture the dynamic and unpredictable nature of real-world energy systems. Additionally, adopting hybrid optimization methods, such as combining PSO with genetic algorithms, could offer a balanced approach to scalability and accuracy. These advancements would enable the Virtual Prosumer Scheduling System Model to more effectively handle the complexities of large-scale decentralized energy systems while maintaining computational efficiency. Further elaboration on these points is provided in Supplementary Section S1.2.5.

4. Virtual Prosumer Real-Time Model

4.1. Overview of VP Real-Time Model

The Virtual Prosumer Real-Time System Model presented in this study offers an advanced framework for the real-time energy management of geographically distributed CEV/As, coordinated by a VP/A. Designed to address the dynamic and distributed nature of PEVs and RES, the model integrates the following key features:
  • State-based PEV operation: the framework dynamically adapts to the charging and discharging states of PEVs, ensuring seamless transitions based on grid conditions and user requirements [23,24,25];
  • Real-time optimization: using PSO and MATPOWER [26], the model efficiently computes active and reactive power setpoints to balance supply and demand while minimizing operational costs;
  • Grid constraint management: ensures compliance with voltage stability, power limits, and current capacity requirements, preventing overloading and maintaining grid stability under fluctuating PEV and RES inputs;
  • Scalability and geographic distribution: the hierarchical structure allows the system to scale across multiple geographic regions, maintaining performance even under high PEV penetration levels.
This model is designed to accommodate the dynamic energy demands of PEVs and RESs while addressing real-time grid challenges. By integrating advanced optimization techniques with hierarchical coordination, the framework ensures optimal energy distribution, improved grid reliability, and enhanced economic efficiency. Further technical details, including mathematical formulations and case study results, are available in Supplementary Section S2.

4.2. Assumptions and Limitations of VP Real-Time Model

The mathematical models presented in this section rely on several assumptions to simplify computational complexity and ensure tractability. However, these models also have notable limitations that may affect their applicability to real-world scenarios. While the inclusion of real-time optimization enhances system adaptability, the computational demands of solving nonlinear programming problems can pose significant challenges, particularly in environments with high PEV density and extensive integration of RESs. The hierarchical structure of the model, although effective for managing medium-sized systems, may face scalability issues as the number of agents—such as PEVs and CEVs—increases. Aggregating data and processing information at higher hierarchical levels, such as DF/As and the VP/A, could result in bottlenecks, limiting the system’s efficiency.
Additionally, the model does not explicitly account for the impact of battery degradation on PEV schedules. This omission limits the practicality of the proposed optimization strategies, as battery health plays a crucial role in determining the long-term feasibility of energy management systems, particularly for V2G applications.
These assumptions and limitations are further elaborated in Supplementary Section S2.2. To address these challenges and limitations, future research could incorporate nonlinear and stochastic modeling approaches to better capture the dynamic and variable nature of real-world energy systems. Distributed optimization techniques may also be developed to alleviate computational burdens at higher hierarchical levels, ensuring smoother operation in large-scale deployments. Furthermore, integrating battery health and degradation dynamics into the optimization framework would provide more realistic and sustainable scheduling strategies for PEVs, improving the overall robustness of the model.

5. Blockchain Real-Time Model

5.1. Mathematic Model of the Blockchain Agents

Analyzing the mathematical model of B/As involves understanding how transactions are processed, aggregated into blocks, and linked together to form a secure and immutable blockchain. Below is a breakdown of the mathematical concepts and models that underpin the operations of Blockchain Agents (B/A1, B/A2, etc.):

5.1.1. Transaction Model

Each B/A receives a series of transactions T i from its corresponding CEV/As. These transactions can be represented as a set:
T =   T 1 ,   T 2 ,   ,   T n
where each transaction T i contains details of the i th EV/A such as the following:
  • I D E V : identification of EV;
  • P m a x : maximum active power;
  • P m i n : minimum active power;
  • P c u r r e n t : current power being used;
  • F l e x : flexibility in power adjustment;
  • E n e w : new energy stored;
  • T i m e : timestamp of the transaction.
Thus, a transaction T i can be defined as follows:
T i = I D E V i , P m a x i , P m i n i   , P c u r r e n t i , F l e x i , E n e w i , T i m e i

5.1.2. Aggregation of Transactions

During each time slot t k , each B/A aggregates transactions received during that period. This can be modeled as follows:
B A j t k =   T 1 , j t k ,   T 2 , j t k ,   ,   T m , j t k
where
  • B A j t k represents the set of transactions aggregated by B/Aj during the time slot t k , m is the last block of the transactions made by Β / A j at the timeslot t k ;
  • T i , j t k represents the i th transaction that was processed by B/Aj during that timeslot tk;
  • m is the total number of transactions included in the block B A j t k for the timeslot t k .
Each B/A aggregates transactions from various EV/As within its jurisdiction. The transactions Τ i represent the charging or discharging activities, power exchanges, or other energy-related events. The rate at which transactions are received by a B/A can be modeled using a Poisson process [27], which is commonly used to represent the occurrence of events over time in real-world systems. If λ is the average rate of transactions per time unit, the probability of receiving k transactions in a given time period t is as follows:
P T = k = λ t k e λ t k !

5.1.3. Block Formation

Once all B/A agents have aggregated their transactions for a specific time slot, a block B t k is formed. The block B t k includes all transactions from all B/As:
B t k = j = 1 N B A j t k
where
  • N is the total number of Blockchain Agents (B/A1, B/A2, …, B/AN);
  • denotes the union of transactions from all B/A agents during the same time slot.

5.1.4. Hashing and Block Linking

Each block B t k is linked to the previous block B t k 1 via a cryptographic hash function H :
H B t k = H a s h B t k = S H A 256 B t k
The block also stores the hash of the previous block:
B t k = H B t k 1 , T 1 t k , T 2 t k , , T m t k , T i m e s t a m p , V a l i d a t o r   I D
where
  • H B t k 1 : is the hash of the previous block;
  • T 1 t k , T 2 t k , , T m t k : are the transactions included in the block;
  • Timestamp: records the time of block creation;
  • Validator ID: identifies the B/A responsible for the block.
In the proposed method, SHA-256 is utilized as the cryptographic hash function for linking blocks. This choice ensures robust security, data integrity, and wide compatibility with existing blockchain systems. While alternatives like Blake2 may offer slightly faster performance, SHA-256 was selected due to its established reliability and adoption in blockchain applications, making it a strong candidate for systems prioritizing interoperability and proven cryptographic strength. By employing SHA-256, the proposed method achieves the necessary balance of performance and security to support efficient transaction recording while maintaining the immutability and integrity of the blockchain [28].

5.1.5. Validation and Consensus

The implementation of a consensus mechanism is crucial for ensuring the security, efficiency, and scalability of the VP Blockchain-based MAS. Given that B/As operate without financial incentives, PoA emerges as an ideal solution. PoA relies on a trusted set of pre-authorized validators—B/As—who are selected based on their authorization or reputation to create and validate blocks, ensuring deterministic, low-latency, and secure energy transactions [29].
Operation of PoA in B/As: In the proposed system, each B/A functions as a validator, responsible for aggregating transactions from connected EV/As and CEV/As and recording them into blocks. Unlike PoW, where block creation is probabilistic and dependent on mining difficulty, PoA ensures that validators are pre-selected based on reputation or assigned cyclically, eliminating computational overhead and reducing energy consumption. The block creation process follows a structured approach, where each B/A collects, verifies, and processes transactions before adding them to the blockchain. Transactions from CEV/As are first validated for authenticity and compliance with system constraints. Once a predefined threshold of transactions is reached, the designated validator B/A creates a new block, which is then reviewed by other B/As. If the block meets consensus requirements, it is appended to the blockchain in a deterministic and efficient manner. By eliminating the randomness associated with traditional consensus mechanisms, this approach ensures that each block is generated within a predictable time window, enabling fast, scalable, and secure real-time energy transactions within the VP Blockchain-based MAS.
Validator selection: Assuming there are N B/As, the validator B/Ai is selected based on a set of trust criteria or in a round-robin fashion [30]. The validator selection process in PoA ensures that the system can rapidly validate transactions while preventing malicious nodes from influencing the consensus mechanism. Unlike PoW-based mining, where block creation is probabilistic and time-consuming, PoA ensures that at every timeslot tk, a single validator is deterministically selected from a predefined set of trusted agents. The probability of a specific B/A being selected as the validator at timeslot tk, if the selection is conducted cyclically is as follows:
P B / A i   a t   t k = 1 N
This ensures a uniform distribution of validation responsibilities, eliminating the computational race associated with PoW.
In a PoA reputation-based setup [31], validators with higher trustworthiness scores are given preference, ensuring that the most trustworthy agents process transactions. This probability of specific B/A being selected as the validator at timeslot tk is:
P B / A i   a t   t k = W i j = 1 N W j
where Wj is the reputation weight of B/Ai, assigned based on past transaction accuracy, node uptime, and system participation. Validators with a strong track record of correct validations are prioritized to maintain system security and reliability.
Impact on performance: Since only one B/A is responsible for block creation per cycle, and PoA eliminates redundant validation, the total block finalization time is significantly reduced compared to PoW and PoS-based systems [26].
Block validation and fraud prevention (local criteria): Before a block B t k is added to the blockchain, it undergoes a multi-step verification process to prevent double-spending, unauthorized transactions, and data inconsistencies. Each transaction T i within the block B t k is subject to validation. If B t k contains n transactions, the validation function V T i can be expressed as follows:
V T i = 1 i f   T i   i s   v a l i d 0     o t h e r w i s e
For the block to be considered valid, all transactions within it must be validated:
V a l i d a t i o n   o f   B t k = i = 1 n V T i
If any V T i = 0 , the block is deemed invalid and rejected, preventing malicious transactions from being recorded in the system.
Consensus mechanism (global agreement): While each B/A makes its own local determination, the blockchain’s state is updated only when a sufficient portion of B/As reach consensus. Consider a set of B/As agents Β / A 1 ,   Β / A 2 , , Β / A Μ where M is the total number of B / A agents. Each B/A agent j computes a validation result for the block B t k :
V j B t k = 1 i f   H B t k   i s   v a l i d   a n d   V a l i d a t i o n   o f   B t k = 1 0   o t h e r w i s e
Unlike PoW-based consensus, where block validation is competitive, PoA requires validation only from a predefined set of trusted B/A agents, ensuring rapid decision-making. The consensus is then achieved if a majority or a predetermined threshold a of agents agree on the validity of the block. Mathematically, this can be expressed as follows:
C o n s e n s u s B t k =   V a l i d       ,     i f   j = 1 M V j B t k a M I n v a l i d ,     i f j = 1 M V j B t k < a M
Here, α represents the consensus threshold, typically a 0.5 , for a majority consensus. Since PoA pre-assigns validator roles, block finalization occurs within a predictable time, eliminating latency spikes that occur in PoW or PoS networks.

5.1.6. Finalization of the Block

Once consensus is reached (i.e, C o n s e n s u s B t k = V a l i d ), the block B t k is appended to the blockchain. The blockchain is updated as follows:
B l o c k c h a i n n e w = B l o c k c h a i n o l d B t k

5.1.7. Blockchain Update

Once a block is validated, each B/A agent j updates its local copy of the blockchain:
B l o c k c h a i n j t k = { B t 1 , B t 2 , , B t k }
This ensures that all B/A agents maintain an up-to-date and consistent version of the blockchain.

5.1.8. VP/A Update

The VP/A can request specific blockchain data from any B/A agent if needed for analysis or decision-making. This interaction is modeled as follows:
R e q u e s t Data VP / A Q u e r y B / A j R e s p o n s e D a t a B l o c k c h a i n P r o c e s s i n g U p d a t e S t a t e V P / A
where the VP/A queries a B/A agent for blockchain data, and the B/A responds with the relevant information.
The mathematical model governing B/As encompasses the aggregation of transactions, block formation, cryptographic linking of blocks, and the processes of validation and consensus. Each B/A agent plays a crucial role in contributing to the blockchain by securely recording transactions and ensuring consistency across the network. This model also incorporates the role of the VP/A, which accesses blockchain data as necessary to maintain the overall integrity and functionality of the system. The validation and consensus process involves several mathematical checks and balances to verify the validity of each block, ensure the legitimacy of all transactions, and secure agreement among the majority of agents for the block’s inclusion in the blockchain. The mathematical framework outlined here effectively captures the core processes, providing a foundation for a robust and secure blockchain network.

5.1.9. Impact of PoA on Scalability, Performance, Security and Energy Efficiency

The PoA consensus mechanism significantly improves the scalability, efficiency, and security of the proposed blockchain-based VP system. Unlike PoW or PoS mechanisms, PoA enables low-latency, high-throughput validation by leveraging a pre-approved set of trusted Blockchain Agents instead of competitive mining or stake-based selection.
Scalability benefits: PoA enhances scalability by ensuring transaction validation occurs within a fixed time window, as validators are deterministically assigned rather than randomly selected, eliminating the need for resource-intensive computations. The hierarchical structure of the VP MAS, in combination with PoA, further optimizes scalability by reducing the number of transactions requiring validation at each step, thereby minimizing network congestion. Additionally, PoA’s high transaction throughput (TPS) capability is essential for real-time PEV charging, discharging, and energy trading, ensuring seamless and efficient energy management across large-scale distributed networks.
Performance advantages: PoA offers significant performance advantages by enabling faster block finalization, as each block cycle is assigned a single validator (B/A), ensuring deterministic processing and eliminating the unpredictable latency spikes commonly found in PoW and PoS-based systems. The average block validation time remains bounded by the number of B/As, allowing transactions to be processed within a predictable timeframe, which is crucial for real-time applications. Additionally, the PoA framework supports parallel transaction processing across multiple B/As, significantly improving throughput and minimizing delays in energy transaction recording. This high-performance structure ensures the efficiency and responsiveness required for large-scale PEV charging, discharging, and energy trading operations.
Impact on security: PoA enhances the security of the VP Blockchain-based MAS by implementing robust measures to prevent malicious activities and ensure transaction integrity. Double-spending is effectively mitigated as transactions are cryptographically linked and cross-validated, preventing duplication or fraudulent modifications. Additionally, accountability is reinforced through the use of pre-approved validators, ensuring that all transactions are traceable and securely recorded. The PoA mechanism also provides resilience against Sybil attacks by restricting participation in the consensus process to authorized nodes, eliminating the risk of malicious entities manipulating the network. These security enhancements make PoA a highly reliable and tamper-resistant consensus mechanism for decentralized energy transactions.
Energy efficiency: PoA significantly enhances energy efficiency by eliminating the need for continuous computational work, unlike PoW, which relies on resource-intensive hash-based mining. By selecting validators deterministically, PoA minimizes energy consumption while maintaining security and reliability. This feature ensures the sustainability of blockchain operations, making PoA particularly well suited for energy-sensitive applications such as real-time decentralized PEV charging, grid balancing, and V2G optimization. The low-energy overhead of PoA enables large-scale deployment in smart energy networks without imposing excessive computational burdens, thereby supporting environmentally friendly and cost-effective transaction validation.
By integrating PoA, the VP Blockchain-based MAS achieves a balance of scalability, security, and efficiency, ensuring seamless and reliable energy management in decentralized networks.

5.1.10. Mathematical Analysis of PoA Scalability and Performance

To quantify the impact of the PoA consensus mechanism on scalability and performance, we analyze the following key metrics:
  • Transaction throughput ( T P S );
  • Block finalization time ( T f i n a l );
  • Consensus latency ( D c o n s );
  • Energy consumption ( E P o A ).

Transaction Throughput ( TPS )

Transaction throughput ( TPS ) is the number of transactions that can be validated per second in a PoA-based system [32]. Since PoA assigns a single validator per block deterministically, the throughput depends on the following:
The block size ( B s i z e ) in bytes;
The average transaction size ( T s i z e ) in bytes;
The block generation time ( T b l o c k ) in seconds.
T P S = B s i z e T s i z e × T b l o c k
A higher block size ( B s i z e ) enhances throughput by accommodating more transactions per block, while a lower block generation time ( T b l o c k ) improves real-time processing. The PoA mechanism further optimizes performance by eliminating overhead, ensuring consistent block generation.

Block Finalization Time ( T f i n a l )

Block finalization time is the delay before a new block is permanently added to the blockchain. In PoA, finalization is dictated by the pre-selected validators and network propagation delay.
T f i n a l = T b l o c k + D c o n s
where
T b l o c k = block generation time (PoA ensures this remains constant);
D c o n s = consensus delay (time taken for validator approval).

Consensus Latency ( D c o n s )

Consensus latency ( D c o n s ) is the time required for all B/As to validate and agree on a block. It depends on the following:
The number of B/As ( M );
The average communication delay ( D c o m m ) per agent;
The validation time ( D v a l i d a t i o n ) for verifying transactions.
D c o n s = M D c o m m + D v a l i d a t i o n
Unlike PoW, where consensus relies on computing power, PoA scales efficiently with the number of validators (B/As) as only pre-authorized agents validate blocks, keeping D c o n s bounded and preventing network congestion.

Energy Consumption ( E P o A )

PoA reduces energy consumption by eliminating computationally intensive mining. The energy required to validate a block is as follows:
E P o A = M P c o m m D c o m m + P v a l i d a t i o n D v a l i d a t i o n
where
P c o m m : power consumption per validation message;
P v a l i d a t i o n : power needed to validate transactions.
Since PoA does eliminates cryptographic mining, its energy consumption is significantly lower than PoW-based blockchains. The low E P o A ensures sustainable operation for real-time PEV charging, grid balancing, and V2G transactions.

PoA Scalability Model

Combining the above, we derive the overall scalability equation for PoA in the VP system:
S P o A = T P S D c o n s E P o A
Higher transactions per second (TPS) and lower consensus delay D c o n s enhance the scalability of the system, allowing it to efficiently handle large transaction volumes. Additionally, the minimized energy consumption of PoA ( E P o A ) ensures sustainability, making it suitable for large-scale energy trading applications [33].

5.1.11. Measures to Prevent Errors and Manage Attacks

Ensuring the security and reliability of the VP Blockchain-based MAS necessitates the implementation of robust measures to prevent errors and manage potential attacks. The system incorporates several key strategies to address these concerns:
  • Regular security audits: To ensure the ongoing security and reliability of the blockchain network, periodic audits are conducted to identify and rectify potential vulnerabilities. These audits involve reviewing transaction logs, validating system performance, and assessing compliance with security protocols to detect anomalies or weaknesses. Additionally, implementing best practices and adhering to established security standards help maintain system integrity. This includes enforcing cryptographic safeguards, access control mechanisms, and real-time monitoring to prevent unauthorized access or fraudulent activities. By proactively addressing security risks, the system remains resilient against evolving cyber threats while ensuring reliable and transparent energy transactions [34,35];
  • Robust consensus mechanisms: The PoA consensus model ensures that only authorized validators participate in the network, significantly reducing the risk of malicious activities. By assigning validation rights exclusively to pre-approved and trusted entities, PoA eliminates the vulnerabilities associated with anonymous mining and Sybil attacks. Furthermore, the deterministic validation process maintains accountability and traceability of transactions, ensuring that all recorded activities are securely linked to identifiable validators. This structured approach enhances both the security and operational integrity of the blockchain network, making it well suited for real-time decentralized energy management applications [36];
  • Anomaly detection systems: To strengthen the security of the blockchain network, real-time monitoring tools are implemented to continuously analyze transaction flows and detect unusual patterns or suspicious behaviors. This proactive approach enables immediate threat identification and response, minimizing the risk of potential security breaches. Additionally, machine learning algorithms are employed to enhance the accuracy of anomaly detection, allowing the system to distinguish between normal fluctuations and potentially fraudulent activities. By leveraging advanced data-driven techniques, the framework ensures a dynamic and adaptive security model capable of mitigating emerging threats in decentralized energy transactions [37,38];
  • Error correction mechanisms: To enhance data integrity and system resilience, error-correcting codes are incorporated into the blockchain framework, ensuring that transmitted data remains accurate and resistant to corruption caused by component failures or network disruptions. These mechanisms detect and correct errors in real time, minimizing the risk of data inconsistencies. Additionally, data availability and consistency are maintained across the distributed network by implementing robust synchronization protocols, preventing data loss and ensuring that all blockchain agents (B/As) operate with an up-to-date and uniform ledger. This approach reinforces the reliability of the system, even under high transaction loads or adverse network conditions [39];
  • Preventive controls: To safeguard data and transactions from unauthorized access, cryptographic security measures are implemented within the blockchain framework. These include advanced encryption techniques, such as Elliptic Curve Cryptography (ECC) and AES-256, to ensure data confidentiality and integrity. Digital signatures further authenticate transactions, preventing unauthorized modifications or fraudulent activities. Additionally, strict security protocols are enforced across all participating nodes, ensuring compliance with predefined authentication and authorization standards. By integrating identity verification mechanisms and access control policies, the system minimizes potential security breaches, reinforcing the overall resilience of the VP Blockchain-based MAS [40,41].
By integrating these measures, the VP Blockchain-based MAS is fortified against common security threats, ensuring a secure and reliable environment for decentralized energy transactions.

5.2. Mathematic Model of the Total Delay in Blockchain Transactions

To model the total delay of a blockchain transaction in a single timeslot, various components contributing to the overall delay are considered. The delay can be broken down into the following stages:

5.2.1. Transmission Delay ( D t r a n s )

This is the time required for the transaction data to be transmitted from the CEV/A to the B/A. It depends on the size of the transaction S (in bits) and the transmission rate R (in bits per second):
D t r a n s = S R

5.2.2. Processing Delay ( D p r o c )

This is the time the B/A takes to process the received transaction, including validation and formatting it for inclusion in the block. This delay can be considered as a fixed time D p r o c based on the computational power of the B/A:
D p r o c = c
where c : c o n s t a n t .
The constant D p r o c , is typically measured in (ms—moderate system) or (μs—high-performance system), depending on the computational capabilities of the system. The specific value and unit depend on the hardware and software environment of the Blockchain Agent.

5.2.3. Aggregation Delay ( D a g g )

This delay represents the time taken by the B/A to aggregate all transactions in a timeslot. If there are N transactions received by the B/A in the timeslot, the aggregation delay can be modeled as follows:
D a g g = N × D p r o c  
where D p r o c is the processing time per transaction.

5.2.4. Block Creation Delay ( D b l o c k )

After all transactions are aggregated, the B/A creates a block. This includes computing the hash of the block and linking it to the previous block. The block creation delay depends on the complexity of the hashing algorithm and the size of the block B s i z e :
D b l o c k = f B s i z e  

5.2.5. Consensus and Validation Delay ( D c o n s )

Once the block is created, it must be validated and consensus must be reached among all B/A agents. This involves communication overhead and additional processing. The consensus delay depends on the number of B/A agents M and the communication overhead per agent D c o m m :
D c o n s = M × D c o m m + D v a l i d a t i o n  
where D v a l i d a t i o n represents the time for block validation.

5.2.6. Broadcast Delay ( D b r o a d c a s t )

After validation, the block is broadcast to all other B/A agents. The broadcasting delay depends on the number of agents and the network latency:
D b r o a d c a s t = M × L  
where L is the network latency per agent.

5.2.7. Transaction Queueing Model

To manage transactions during periods of high load, a structured queuing mechanism is introduced at each B/A:
First-In-First-Out (FIFO) queueing mechanism: To efficiently manage transaction overflow, each B/A employs a FIFO queueing mechanism, temporarily storing transactions when the influx exceeds processing capacity. This approach ensures that transactions are buffered and processed sequentially, preserving their original order and preventing arbitrary drops. By systematically handling transactions as resources become available, the FIFO mechanism enhances fairness, maintains data integrity, and prevents blockchain congestion, ensuring smooth and reliable validation even during peak transaction loads [42].
Poisson arrival process for transaction influx: To realistically simulate transaction influx, the system adopts a Poisson arrival process, which accurately models the stochastic variations in PEV charging and discharging transactions. Unlike uniform distributions, this approach reflects real-world transaction behavior, where energy demands fluctuate dynamically. By accounting for transaction bursts and irregular arrivals, the Poisson process enhances the adaptability of the blockchain system, ensuring efficient transaction handling and improving scalability under varying load conditions.
Dynamic load handling and processing constraints: The system implements dynamic load handling and processing constraints to manage transaction surges effectively. Each B/A has a predefined processing capacity per time step, ensuring that transaction validation remains efficient. If the number of incoming transactions exceeds this limit, the excess transactions are queued and processed in subsequent slots, preventing network congestion and maintaining system stability. The queuing behavior follows an M/M/c queue model, where transactions arrive according to a Poisson process and are processed by multiple B/As in parallel. This structured approach guarantees fairness, minimizes transaction rejection rates, and ensures predictable validation times under varying load conditions.
The average waiting time in the queue before validation can be expressed as follows:
W q = λ μ μ λ
where
λ is the transaction arrival rate (transactions per second);
μ is the processing rate (transactions processed per second).
This model ensures that unprocessed transactions are queued rather than discarded, allowing for deferred validation when processing resources are available.

5.2.8. Total Delay ( D t o t a l )

The total delay for a blockchain transaction within a single timeslot is the sum of all these delays:
D t o t a l = W q + D t r a n s + D p r o c + D a g g + D b l o c k + D c o n s + D b r o a d c a s t
Substituting the individual delays results in the following:
D t o t a l = λ μ μ λ + S R + c × 1 + N + f B s i z e + D v a l i d a t i o n + M × D c o m m + L
The total delay D t o t a l of a blockchain transaction within one timeslot is influenced by several factors, including the transmission delay, processing time, aggregation of transactions, block creation, consensus, and broadcasting to other B/As. This formulation integrates both transaction queuing dynamics and processing constraints into the overall delay model, ensuring that the system can effectively manage transaction overload scenarios while maintaining scalability, reliability, and fairness.

5.3. Reliability of the Blockchain MAS Network

The reliability of a blockchain MAS can be measured based on the probability of successful transactions under various conditions, such as high network load, network failures, or increased transaction volumes [43]. The following mathematical models are used to analyze system reliability:

5.3.1. Transaction Success Probability

PoA ensures high reliability even under increased transaction volumes, as validation times remain independent of computational power constraints. The probability of a successful transaction is defined as the likelihood that a transaction will be validated and securely recorded on the blockchain. This probability depends on factors such as network load, system capacity, and the resilience of the consensus mechanism to failures.
P s u c c e s s t k = N v a l i d N t o t a l
R b a s e t k     P s u c c e s s t k
R b a s e represents the system’s reliability under normal operating conditions, without additional stress like high load or network failures. It is a foundational reliability measure, often derived from P s u c c e s s under normal conditions.
  • where
P s u c c e s s is the probability of a successful transaction;
Nvalid is the number of successfully validated blocks in timeslot tk;
Ntotal is the total number of transactions in timeslot tk.
A high R(tk) value indicates that the system is reliably validating and adding blocks to the blockchain without errors or failures.

5.3.2. System Reliability Under High Load

When the system is under high load, its reliability may decrease due to increased response time or transaction failures. The reliability under high load can be expressed as follows:
R h i g h l o a d = R 0 · e λ L
where
R h i g h l o a d is the reliability of the system under high load;
R 0 is the baseline reliability of the system under normal conditions;
λ is the load constant, determining how quickly reliability decreases as load increases;
L is the system’s load level.
However, PoA’s deterministic block finalization time ensures that even under high transaction loads, the probability of successful transactions remains relatively stable. Compared to traditional consensus mechanisms, where reliability degrades exponentially with transaction volume, PoA mitigates reliability loss by enforcing fixed validation times.

5.3.3. System Reliability Under Network Failures

The reliability of the system in the event of network component failures can be analyzed by the probability that the system remains operational:
R n e t w o r k f a i l u r e = i = 1 n P n o d e i
where
R n e t w o r k f a i l u r e is the reliability of the system when some network nodes fail;
P n o d e i is the probability that the i th node is operational;
n is the total number of nodes.

5.3.4. System Reliability Under Increased Transaction Volume

The reliability under increased transaction volume, R i n c r e a s e d t r a n s a c t i o n s , measures the system’s ability to maintain its operational integrity when the number of transactions is high. This reliability can be influenced by factors such as the system’s processing capacity, network bandwidth, and the efficiency of the consensus mechanism. With c defined maximum capacity C m a x in terms of transactions per timeslot, R i n c r e a s e d t r a n s a c t i o n s could be modeled as follows:
R i n c r e a s e d t r a n s a c t i o n s = 1 ,                                                   i f   N C m a x e α Ν C m a x 1 ,           i f N > C m a x
where
C m a x is the maximum number of transactions the system can handle without degradation;
a is a constant that determines the rate at which reliability decreases once N exceeds C m a x .

5.3.5. Overall System Reliability

The overall system reliability R t o t a l can be expressed as the product of the reliabilities under different conditions:
R t o t a l = R b a s e · R h i g h l o a d · R n e t w o r k f a i l u r e · R i n c r e a s e d t r a n s a c t i o n s  

5.3.6. System Survival Probability

The system’s survival probability under specific conditions P s u r v i v a l can be expressed as follows:
P s u r v i v a l = 1 i = 1 n 1 R i
where R i is the reliability of the system under the i th condition.

5.3.7. Probability Density Function (PDF) of Transaction Distributions for Blockchain Agents

The mathematical model describing the PDF of transaction distributions for each B/A follows the normal distribution. The normal distribution is characterized by two parameters: the mean (μ) and the standard deviation (σ). The PDF of the normal distribution is given by the following formula:
f x = 1 σ 2 π e x p x μ 2 2 σ 2
where
f x is the value of the probability density function at point x;
μ is the mean of the distribution, which represents the average number of transactions handled by a Blockchain Agent;
σ is the standard deviation, which measures the spread or variability of the transactions.
This formula describes how the transaction data for each B/A is distributed over the 288 time slots. The mean (μ) represents the central value around which the number of transactions fluctuates, while the standard deviation (σ) indicates how much the number of transactions varies from the mean. A smaller σ indicates that the transactions are concentrated closer to the mean, while a larger σ shows a wider spread of transaction values.

5.4. Assumptions and Limitations of Blockchain Model

The Blockchain Model presented in this study is built on a set of assumptions designed to simplify computational complexity and ensure scalability for real-time energy management in VP Networks. However, these assumptions introduce limitations that must be acknowledged to assess the model’s practical applicability.
  • Assumptions
Independence of B/As: It is assumed that B/As operate independently and process transactions without significant coordination overhead. In practice, synchronization among agents, particularly in geographically distributed setups, can introduce dependencies that affect system performance;
Deterministic transaction distribution: Transaction loads across B/As are assumed to follow predictable patterns, which facilitates resource allocation and performance evaluation. However, this overlooks stochastic variations caused by external factors, such as user behavior or unexpected surges in activity.
  • Limitations
Interdependencies among variables: The independence of B/As and transaction processing does not reflect the complex interdependencies that often exist in real-world blockchain systems, where changes in one variable, such as network latency, can cascade across the system;
Stochastic variability in transactions: The model’s reliance on deterministic transaction patterns does not accommodate the stochastic nature of real-world energy markets, where transaction loads can vary unpredictably due to external influences.

5.5. Comparative Analysis of Consensus Mechanisms

Different blockchain consensus mechanisms handle transaction congestion in distinct ways. This section evaluates three major consensus mechanisms—PoW, PoS, and PoA in the context of VP Blockchain-based MAS. The focus is on how each mechanism impacts transaction validation delay, block confirmation time, and overall system performance under high transaction loads.

5.5.1. Proof-of-Work (PoW) Delay Model

PoW networks require miners to solve computational puzzles before transactions are confirmed [39]. The validation delay T v depends on the mining difficulty and can be approximated as follows:
T v P o W D H
where
D is the network difficulty;
H is the total hash rate of miners.
Block confirmation time T c P o W follows an exponential distribution with mean:
T c P o W = 1 B
where B is the block generation rate.

5.5.2. Proof-of-Stake (PoS) Delay Model

In PoS, transactions are validated by stakers based on their stake weight. The selection probability of a validator affects the validation delay:
T v P o S 1 P s
where P s is the probability of selecting a validator based on their stake proportion.
PoS typically has lower confirmation delays compared to PoW:
T c P o S = 1 B s
where B s is the block generation rate in PoS.

5.5.3. Proof-of-Authority (PoA) Delay Model

PoA relies on a fixed set of authorized validators, reducing network congestion and improving transaction finality. Since block validation is deterministic, transaction delays are minimized:
T v P o A 1 N v
where N v is the number of authorized validators.
The confirmation delay is deterministic:
T c P o A = 1 B a
where B a is the block production rate in PoA.

5.5.4. Comparative Performance Analysis

To summarize the impact of consensus mechanisms on transaction latency, first, PoW exhibits the highest latency due to computational difficulty and probabilistic mining. Second, PoS reduces latency by eliminating mining overhead, though selection randomness introduces some delay. Finally, PoA offers the lowest latency due to its predefined validator set and deterministic validation process.

6. Proposed Virtual Prosumer Integrated Power Management Using Blockchain Algorithms

The proposed VP framework integrates three interconnected models—Scheduling Model, Real-Time Model, and Blockchain Model—to optimize energy management across a geographically distributed network of PEVs and RESs. The methodology builds on a hierarchical multi-agent architecture to ensure scalability, efficiency, and grid stability while leveraging blockchain technology for transparency and security. This integrated approach is illustrated in Figure 3, which outlines the key processes involved.

6.1. Scheduling Model

The Scheduling Model serves as the foundation of the VP framework by optimizing energy scheduling across multiple layers of the system:
At the EV/A layer, the model minimizes charging costs by considering user preferences, time-varying electricity prices, and PEV constraints (Step 1);
At the CEV/A layer, aggregated power profiles represent renewable energy pools while addressing transformer limitations and maintaining grid stability (Step 2);
The VP/A layer employs nonlinear programming techniques to minimize system-wide operational costs (Step 3) and allocate optimal power to CEVs (Step 4).
This hierarchical structure ensures that each layer contributes to balancing energy demand and supply effectively, while respecting grid and contractual constraints.

6.2. Real-Time Model

Building upon the VP Scheduling Model, the VP Real-Time Model enables dynamic coordination and optimization of the system:
At the EV/A layer, power profiles and flexibility are calculated in real time (Step 5);
The CEV/A layer aggregates power demands and monitors grid conditions to ensure transformer loads are within safe limits (Step 6);
The DF/A layer and VP/A layer perform real-time optimizations using tools such as PSO to adjust power setpoints dynamically (Step 7).
If discrepancies arise between planned and actual operations, the system reschedules power setpoints to maintain efficiency and stability (Steps 8–9). This iterative approach ensures the framework adapts to the variable nature of RESs and the dynamic charging demands of PEVs.

6.3. Blockchain Model

To enhance transparency and security, the Blockchain Model records all power exchange adjustments as immutable transactions:
B/As aggregate individual transactions from EV/As within their assigned clusters (Step 11);
Transactions are grouped into blocks, which include metadata linking them to the previous block, ensuring continuity and immutability (Step 12);
The blocks are validated using the PoA consensus mechanism, where pre-authorized validators B/As ensure compliance with network rules before finalizing the block (Steps 13–14).
Once validated, the finalized blocks are broadcast across all B/As (Step 15), ensuring consistency across the network. The VP/A can access blockchain data for auditing or decision-making purposes (Step 17), further enhancing system reliability.

6.4. Innovative Contributions

This VP framework introduces several novel contributions that distinguish it from existing approaches:
  • Hierarchical coordination: the integration of scheduling, real-time optimization, and blockchain processing ensures scalability and adaptability to dynamic grid conditions;
  • Blockchain-enabled transparency: by incorporating blockchain, the framework provides an immutable, transparent, and secure record of energy transactions;
  • Advanced optimization techniques: tools like PSO and nonlinear programming enable cost minimization and rapid adaptability to changes in grid conditions;
  • Grid stability: the system dynamically adjusts energy allocation to maintain voltage stability, address transformer limitations, and handle the variability of RESs.
Detailed steps and algorithms for the Scheduling, Real-Time, and Blockchain Models are provided in Supplementary Algorithms S1 and S2, along with descriptions in Appendix A—VP Blockchain Algorithms.

6.5. Computational Complexity and Execution Time Analysis

The execution time of the proposed VP MAS framework depends on multiple factors, including optimization calculations, transaction validation, blockchain consensus, and inter-agent communication. This section evaluates the total delay introduced by these components, with a particular focus on the impact of blockchain integration.

6.5.1. Total Delay in the Blockchain-Integrated System

The total delay per execution consists of the following:
  • Optimization delay: this includes power scheduling and set-point calculations using PSO and GAMS 48.1.0 software [44]—the maximum calculation time for PSO is 51 s—GAMS software requires 3.1 s for the first scenario and 6.1 s for the second scenario.
  • Agents communication delay: the delay associated with inter-agent communication (e.g., CEV/A to VP/A) is determined based on the messages exchanged between agents, with six messages requiring approximately 0.15 s each (Supplementary Figure S0).
  • Blockchain Processing Delay: the blockchain mechanism introduces additional latency due to transaction validation, block creation, consensus, and broadcasting.
    a.
    Transaction validation: A speed of 10 ms per transaction, depending on computational resources and network conditions;
    b.
    Transaction aggregation: if a block contains N transactions, and each transaction takes 10ms for validation, the total aggregation time is approximately: D a g g = N × 10   m s ;
    c.
    Block creation and signing: the process of hashing and signing a block is relatively fast in PoA and takes around 50 ms to 150 ms.
Total Approximate Delay: For a block containing 100 transactions, the total validation and aggregation delay can be estimated as D t o t a l = 1000 × 10   ms + 100   ms = 1.1   s . Thus, transaction validation and aggregation in PoA-based systems generally require between 0.5 s to 2 s, depending on network congestion and validator efficiency.
The following factors are considered:
The total average execution time per one hundred transactions is T ¯ = 6 × 0.15   s + 3   s + 6   s + 50   s + 1.5   s = 61.4   s ;
Similarly, the maximum expected delay per one hundred transactions is T = 6 × 0.15   s + 3.1   s + 6.1   s + 51   s + 2   s = 63.1   s .
  • which remains within the 5 min interval required for real-time updates.

6.5.2. Analysis of Execution Delay with Blockchain

Figure 4 illustrates the total delay per execution when blockchain is integrated into the VP MAS framework. The delay exhibits minor fluctuations, attributed to variations in transaction load and consensus time. However, the system remains stable across multiple executions, demonstrating that blockchain-based validation does not introduce significant overhead.
Key observations are as follows:
Stable delay distribution: the total execution delay remains within the range of 61.4–63.1 s, confirming the feasibility of real-time operations despite blockchain processing overhead;
Increased variability: compared to the non-blockchain-based scenario, the execution time shows higher fluctuations due to consensus processing and transaction propagation across agents [4];
Limited computational overhead: the integration of blockchain introduces an additional delay of approximately 2–4 s, which remains within acceptable limits for real-time energy management in decentralized VP networks.

6.5.3. Conclusion

The findings confirm that the proposed framework remains computationally efficient even when integrated with blockchain. The hierarchical MAS structure optimally distributes computation, while PoA consensus minimizes blockchain overhead. The observed delay remains within the acceptable range, ensuring that the VP MAS system can operate effectively in real-world, large-scale decentralized energy networks.

7. Case Studies—Simulations—Results

This section presents the results of the proposed method through a case study focusing on the management of PEVs and RESs distributed across multiple locations in Greece. The study demonstrates the effectiveness of integrating blockchain technology and network security measures within the Virtual Prosumer Network to ensure secure, transparent, and efficient energy management.

7.1. Virtual Prosumer Data Network Communications, Hardware and Software Infrastructure

To simulate real-world conditions, the network infrastructure, hardware, and software configurations were designed to mirror the operational complexity of geographically distributed systems. The setup included the following:
Geographically distributed data centers: facilitating the secure storage and processing of energy transaction data;
Blockchain-based validation mechanism: implemented using the PoA consensus algorithm, ensuring efficient and tamper-resistant transaction validation;
Specialized agents: including B/As, DF/As, and VP/As, interconnected through a P2P network to enable seamless communication and coordination.
The simulations demonstrated the system’s ability to handle dynamic energy demands while maintaining high transaction throughput and minimal latency, showcasing its scalability for large-scale deployments across multiple cities. The integration of blockchain technology ensured the immutability of transaction records, enhanced transparency, and effectively addressed both physical and network security challenges. Additionally, the system dynamically balanced grid loads, mitigating transformer overloading and voltage instability, thereby maintaining grid stability. Further details on the communication protocols, data network architecture, and specific configurations used in the simulations are provided in Supplementary Section S3.

7.2. Description and Simulation Setup

The simulation setup was designed to replicate real-world scenarios, incorporating DF/As operating across multiple Greek cities and interconnected with a VP/A and CEV/As. The setup includes key elements such as renewable energy integration, PEV battery specifications, dynamic pricing profiles, and load management strategies, addressing the complexities of modern energy systems.
Figure 5 illustrates a case study featuring four DF/As located in Thessaloniki, Athens, Chania, and Heraklion, representing a geographically distributed energy network. The VP/A, based in Heraklion, Crete, coordinates operations and energy transactions. The CEV/As manage Electric Vehicle Agents (EV/As) across diverse locations, including public and private sector parking, commercial centers, residential areas, and urban environments. As a result, CEV/As exhibit varying peak power demands, influenced by their respective charging station characteristics. Additionally, the distribution networks overseen by DF/As possess distinct operational features. The VP/A communicates with the Electricity System Operator (ESO) to obtain electricity prices for the optimization period and establish contractual agreements for peak demand reduction and guaranteed power generation.
To ensure grid stability, CEV/As monitor PEV loads within their regions using smart metering infrastructures. When bus voltages or power losses exceed technical thresholds, they dynamically adjust power demand to maintain system reliability. MATLAB [45] and GAMS were utilized for scheduling simulations, while the JADE platform facilitated real-time modeling. The case study considers ten CEV clusters, distributed across four power grids, each modeled using IEEE 33-bus and 40-bus medium-voltage (MV) networks [46]. Athens and Thessaloniki utilize a 40-bus MV system, while Heraklion and Chania operate on a 33-bus MV configuration. The system integrates ten CEVs and multiple Renewable Energy Sources (RESs), including photovoltaic (PV) and wind power (WP) nodes, with their normalized power time series analyzed over a seven-day period.
The proposed framework optimizes operational scheduling and real-time control of spatially dispersed PEV clusters within realistic distribution networks. CEV1 primarily supports public sector employees, while CEV3, CEV5, and CEV8 serve private sector users. CEV6 and CEV10 accommodate PEVs used for social, recreational, and shopping activities, whereas CEV2, CEV4, CEV7, and CEV9 consist of home charging stations. PEV plug-in times fluctuate based on user activities and time of day, influencing overall energy demand patterns across the grid.
This simulation framework demonstrates the system’s capability to effectively manage distributed energy resources while ensuring grid stability, cost efficiency, and secure energy transactions. The methodologies and algorithms underlying these simulations are detailed in Supplementary Algorithms S1 and S2.
The estimation of PEV plug-in times is based on Probability Density Functions derived from real-world data analysis, as illustrated in Supplementary Figure S7. This study considers three types of PEV batteries, with their technical specifications summarized in Supplementary Table S4.

7.2.1. Operational Scenarios

Two scenarios were examined to evaluate the performance of the proposed VP framework:
  • Scenario 1 (SC1)—optimized charging and V2G operations: the proposed method is applied to optimize both distribution networks and PEV clusters, considering electricity price fluctuations, network constraints, PEV charging preferences, renewable energy uncertainties, CEV power limits, and VP obligations;
  • Scenario 2 (SC2)—uncoordinated charging: in this case, PEVs charge continuously at an average power level required to reach their SoC target without considering external factors such as electricity prices or grid conditions.

7.2.2. Key Findings and Insights

Energy consumption and pricing trends: As shown in Figure 6, electricity consumption in Athens and Thessaloniki is significantly higher than in Chania and Heraklion. The electricity price curve exhibits a low-price period followed by two peak periods, allowing the VP algorithm to optimize charging and Vehicle-to-Grid (V2G) services;
Optimal scheduling and real-time control: The VP calculates optimal set-points for CEVs every 5 min, based on electricity prices, within a 23 h simulation period (276 time intervals). As depicted in Figure 7, the guaranteed power is maintained at 2000 kW between 15:30 and 18:30, while the peak power limit is capped at 3000 kW. The system ensures real-time active power remains within these limits;
V2G services and cost optimization: V2G discharging occurs during high-price periods (7:30–9:00 AM and 18:30–19:00 PM), while charging is optimized during low-price periods. In SC2, where V2G services are absent, PEVs charge continuously, leading to higher costs due to peak demand during high-price periods. Figure 8 compares total active power consumption across both scenarios, demonstrating how SC1 effectively reduces peak demand and cost;
State-of-Charge (SoC) management: As shown in Figure 9, PEVs in SC1 reach their preferred SoC (SoC_pref) more efficiently, aligning with owner preferences. Morning hours see higher vehicle density in public/private parking facilities, while residential and entertainment zones experience increased activity in the afternoon and evening. The initial SoC ( SoC init   ) is set at 30%, with a target SoC of ~90%, though some vehicles disconnect before reaching full charge;
Voltage stability and grid impact: Figure 10 and Figure 11 present node voltage time series for SC1 and SC2, respectively, with voltage limits set at 1.05 and 0.95 p.u. While SC1 exhibits greater active power variations, voltage deviations remain within acceptable limits, ensuring grid stability;
Charging cost savings and economic feasibility: The total charging cost in SC1 is 3,808 monetary units (m.u.), compared to 4279 m.u. in SC2, reflecting an 11% cost reduction. The savings could be higher with greater electricity price fluctuations. Additionally, the ICT infrastructure cost for smart distribution networks (e.g., PMUs priced between $500–$1000) [47] is justified by the daily charging cost reduction of $471, leading to annual savings of $171,915 making the investment cost-effective.

7.3. Blockchain Results

7.3.1. Total Delay in Blockchain System Under Varying Parameters

This section examines how system parameters, such as the number of transactions (N), blockchain agents (M), and transaction complexity (C), affect the total delay (D_total) in the blockchain system, as shown in Figure 12. The total delay represents the cumulative time required to process and validate transactions before they are added to the blockchain during a single time slot.
The graph demonstrates a proportional relationship between the number of transactions (N) and the total delay (D_total). Higher transaction volumes increase the processing load, resulting in longer delays. For each value of M (2, 4, 6), three curves are plotted to represent different complexity levels (C = 1, 1.5, 2). Increased complexity leads to greater delays due to the additional computational resources required. While increasing the number of blockchain agents (M) can reduce delays by distributing workloads at lower complexity levels, it introduces coordination overhead at higher complexity levels, which may offset these benefits. This highlights the need to balance workload distribution and communication overhead for optimal system performance.
Scalability and energy efficiency: Blockchain technology ensures robust security and transparency but poses challenges in scalability and energy consumption. Traditional PoW mechanisms, known for their high computational demands, are energy-intensive. This study mitigates these issues by adopting the energy-efficient PoA consensus mechanism, which relies on pre-approved validators instead of computational power. Additionally, the hierarchical multi-agent architecture optimizes workload distribution, enhancing scalability in large-scale, geographically distributed networks.
By analyzing Figure 12, system designers can identify the key factors influencing delays and fine-tune system parameters to achieve optimal performance. This analysis underscores the importance of balancing security, scalability, and energy efficiency for real-world energy management applications.

7.3.2. Comparison of Theoretical and Experimental Total Delay

Figure 13 compares the theoretical and experimental results for total delay in the blockchain system as a function of the number of transactions (N) across varying numbers of B/As (M). The theoretical predictions, represented by solid lines, are derived from the proposed delay model, while scatter points depict experimental data obtained from real-world simulations. This comparison evaluates the model’s accuracy under diverse conditions.
Key trends observed in the analysis include the following:
Impact of transactions (N): both theoretical and experimental results show a proportional increase in total delay as the number of transactions grows, consistent with the expected behavior of blockchain systems;
Effect of B/As (M): while a higher number of B/As (M) theoretically improves workload distribution, the practical implications of communication overhead and synchronization in geographically distributed networks result in increased delays. This is particularly evident at higher agent counts (M = 8–10), where coordination challenges outweigh the benefits of parallelization.
Comparison Between Theoretical and Experimental Data: Theoretical predictions closely align with experimental results, confirming the validity of the delay model. However, as transaction volumes increase, minor deviations emerge due to real-world factors like network load, communication delays, and computational overhead. Notably, for lower agent counts (M = 2–3), both theoretical and experimental delays remain smaller due to reduced coordination requirements, although such configurations may struggle under heavy transaction loads. In contrast, systems with higher agent counts perform closer to the theoretical model, despite increased delays from coordination overhead. This alignment suggests that the model remains robust even in complex, geographically distributed setups.

7.3.3. Scalability Analysis of the Proposed System

The scalability of the proposed VP Blockchain framework was evaluated by analyzing its performance under increasing transaction volumes, agent participation, and network expansion. Simulation results confirm the system’s ability to process up to 10,000 transactions within a 5 min window, demonstrating its suitability for large-scale, real-time energy management applications.
The hierarchical MAS architecture plays a critical role in achieving scalability. By aggregating transactions at the CEV/A level, the system reduces computational load at higher layers, ensuring efficient resource utilization and transaction management. This design prevents computational bottlenecks at the DF/A and VP/A levels, allowing seamless scalability as more PEVs and RES units are integrated into the network.
Furthermore, the adoption of the PoA consensus mechanism ensures low-latency, high-throughput validation, even under high transaction loads. Unlike PoW, which suffers from increasing mining complexity, PoA maintains deterministic block finalization times by leveraging a pre-approved set of B/As. This structure prevents network congestion and supports high-frequency transaction processing, which is crucial for real-time decentralized PEV charging, discharging, and V2G energy transactions.
To further evaluate scalability, we simulated a geographically distributed energy network across four major cities in Greece, each with varying levels of PEV penetration and energy demand. The results confirmed that transaction delays remain stable as the network size grows, validating that the hierarchical MAS structure and PoA consensus mechanism effectively support large-scale decentralized energy networks.
While increasing the number of B/As (M) improves workload distribution, the benefits gradually diminish in geographically distributed setups due to rising communication and coordination overhead. Figure 12 confirms that the proposed blockchain framework sustains reasonable transaction delay levels even under high transaction loads. Although adding more B/As enhances throughput, the diminishing returns beyond M > 8 indicate an optimal balance between network decentralization and processing efficiency. These findings emphasize the need to carefully balance agent participation and transaction complexity to ensure optimal system performance
Overall, these results confirm the scalability and robustness of the proposed blockchain framework, making it an ideal solution for supporting the growing demands of large-scale decentralized energy systems. Further scalability tests under higher penetration levels of PEVs and RESs will be explored in future research to validate the framework’s potential for real-world deployment.

7.3.4. Transaction Distribution Across Blockchain Agents

Figure 14 illustrates the distribution of transactions processed by four Blockchain Agents (B/As) over 288 time slots, visualizing how the system balances transaction loads. Each agent’s workload is represented by a distinct color, highlighting variations over time, including periodic peaks and troughs.
The graph reveals that B/A1 consistently handles a significant portion of transactions during low-transaction periods, serving a foundational role in baseline operations. During peak times, workloads are redistributed dynamically, with B/A2, B/A3, and B/A4 handling larger shares. This adaptive distribution demonstrates the system’s ability to adjust to fluctuating demands and maintain efficient operations.
Insights and Implications
Workload distribution: imbalances, such as consistently high loads on a single B/A like B/A1, could indicate potential bottlenecks that may affect system performance;
Load-balancing efficiency: dynamic transaction aggregation and load balancing are critical for preventing delays and ensuring smooth operations across all agents;
Scalability and resilience: the system’s ability to redistribute workloads dynamically supports scalability and resilience, particularly in real-time energy management applications.

7.3.5. Probability Density Functions of Transaction Distributions and Consensus Performance

Figure 15 illustrates the Probability Density Functions (PDFs) and histograms of transaction distributions across four B/As over 288 time slots. Table 3 summarizes the key metrics, including the mean and standard deviation of transactions handled by each agent.
The analysis reveals variability in transaction loads across agents:
B/A2 and B/A4 handle larger transaction volumes, as reflected in their higher means;
B/A1 exhibits the most consistent workload, while B/A2 and B/A3 show greater variability, indicated by their higher standard deviations.
This variability highlights potential inefficiencies in transaction balancing, where agents with disproportionately high loads may experience congestion or delays. These findings underscore the need for robust load-balancing mechanisms to ensure efficient and reliable blockchain performance, particularly in real-time energy management applications.
Consensus Performance Validation
Figure 16 compares the theoretical and experimental performance of the PoA consensus mechanism. The blue line represents theoretical consensus times, while red crosses indicate experimental data points. The results demonstrate a strong alignment between theory and practice, validating the proposed consensus model.
Key observations include the following:
Impact of agent participation: consensus time increases significantly with the number of B/As due to the added complexity of coordinating agents in a geographically distributed network;
Model accuracy: the close agreement between theoretical and experimental results confirms the model’s applicability in real-world blockchain systems.
This validation reinforces the effectiveness of the PoA mechanism in managing scalability and efficiency, even in scenarios with high agent participation.

7.3.6. Blockchain Performance Analysis

Figure 17 presents a detailed analysis of key blockchain performance metrics—throughput, validation time, and block size—over time, offering critical insights into the scalability and efficiency of blockchain systems in energy-related applications.
Throughput: Represented by the blue line, throughput reflects the number of transactions processed per second. The graph shows a steady increase, rising from approximately 75 transactions per second in the initial time slots to 225 transactions per second. This trend demonstrates the system’s ability to scale and process higher transaction volumes, essential for real-time applications like power trading and grid balancing;
Validation time: The red line indicates validation time, starting at 2.5 s and gradually increasing to over 4.5 s. This rise corresponds to the growing transaction volume and larger block sizes, which require more computational resources for validation. While the system maintains efficiency at higher transaction rates, the increasing validation time highlights a scalability challenge that must be addressed for real-time operations;
Block size: The green line represents block size, which grows from 200 KB to 1,400 KB over time. Larger block sizes accommodate more transactions but contribute to longer validation times, as more data must be processed and stored. This trade-off underscores the need to optimize data storage solutions to maintain efficiency.
Interconnected performance dynamics: The interplay between throughput, validation time, and block size illustrates the scalability challenges inherent in blockchain systems. As throughput increases, larger blocks are required, leading to greater computational loads and longer validation times. These dynamics highlight the importance of balancing system parameters to ensure efficient operation as transaction volumes grow.
Implications for Blockchain in Energy Applications
This analysis underscores the need for optimization strategies to address the rising computational demands of blockchain systems. For energy-sector applications, where real-time processing of transactions is critical, potential solutions include the following:
Consensus mechanism enhancements: exploring lightweight or adaptive consensus mechanisms to reduce validation times;
Efficient data storage: implementing advanced data storage techniques to manage larger block sizes without compromising performance;
Load-balancing strategies: distributing transaction processing across agents to mitigate bottlenecks and maintain high throughput.
These insights provide a foundation for developing scalable blockchain systems capable of supporting the growing demands of decentralized energy networks while ensuring efficient and reliable operations.

7.3.7. Reliability Analysis

Figure 18 illustrates the reliability of successful transactions in the VP MAS Blockchain-based under various operational scenarios, highlighting the system’s performance under changing loads and network conditions.
Normal load (green region): During normal load conditions, the system achieves near-perfect reliability, with transaction success rates fluctuating between 98% and 100%. This indicates optimal system performance due to low transaction volumes, stable network conditions, and minimal resource stress;
High load (orange region): In high-load scenarios, reliability decreases slightly to around 90%, reflecting the system’s increased workload as more transactions are processed. While performance remains relatively high, this decline signals the need for better resource allocation to handle peak demand periods efficiently;
Partial network failure (red region): Reliability drops further to 85% during partial network failures, as disruptions in connectivity hinder transaction validation and increase delays. This highlights the vulnerability of the system to network reliability issues;
Increased transactions (purple region): When handling a high transaction volume, the reliability stabilizes at approximately 85%, even in the absence of network issues. This suggests bottlenecks in transaction processing and validation as the system’s workload grows;
High load and failures (brown region): In the most challenging conditions, combining high transaction volumes with network failures, reliability declines significantly to below 75%. The compounding effect of these stressors results in a sharp rise in transaction failures, indicating the system’s limited capacity to maintain performance under extreme conditions.
Overall Analysis
The reliability analysis demonstrates that the system performs robustly under normal conditions but experiences significant performance degradation during high load and network disruption scenarios. These findings emphasize the need for improvements in blockchain infrastructure, such as the following:
Network redundancy: to reduce the impact of partial failures;
Transaction batching: to streamline validation and reduce processing overhead;
Consensus optimization: to improve validation efficiency under high loads.
By addressing these challenges, the blockchain system can better support the dynamic demands of energy management in Virtual Prosumer Networks, ensuring efficient and reliable operations even under stress.

7.3.8. Interoperability and System Integration

The proposed VP Blockchain-Based MAS framework demonstrates a high degree of interoperability with existing energy management systems and blockchain platforms. This is achieved through the following:
Standardized communication protocols: The system utilizes TCP/IP and HTTPS for secure data transmission, ensuring compatibility with modern network infrastructures. The integration with JADE-based MAS facilitates seamless agent communication within the network;
Blockchain and energy platform integration: By adopting a modular design, the framework enables interaction with established blockchain networks like Ethereum and Hyperledger. The hierarchical MAS structure allows the VP/A to interface with energy management systems, such as Distributed Energy Resource Management Systems (DERMSs) and Energy Management Systems (EMSs);
Cross-platform compatibility: Blockchain Agents (B/As) have been designed to operate across diverse operating systems (Windows, Linux, macOS), ensuring that the system can be implemented in heterogeneous environments;
Interoperability in smart contracts: the proposed framework incorporates extensible smart contracts that can be tailored to various market conditions, such as dynamic pricing and P2P trading.
This interoperability ensures the system can be deployed alongside existing energy and blockchain infrastructures, facilitating scalability and adaptability in diverse operational contexts.

7.3.9. Computational Complexity Analysis

This section evaluates the computational overhead of the PoA consensus mechanism, as well as the optimization and storage components of the proposed system, to highlight their scalability and feasibility for real-time applications
The PoA consensus mechanism features linear time complexity with respect to the number of validators N and transactions T. Each transaction undergoes communication between validators followed by a consensus step. The overall complexity is O T   N , making the system highly scalable. Since the number of validators is relatively small and fixed compared to the volume of transactions, PoA ensures efficiency and low latency even for large-scale implementations. This linear relationship ensures predictable growth in computational demand, aligning well with the needs of decentralized energy systems that require fast and reliable transaction processing.
The PSO algorithm, employed for scheduling and optimization, exhibits a time complexity of O P   I   D , where P is the number of particles in the swarm, I is the number of iterations required for convergence, and D is the dimensionality of the solution space. Increasing P or I improves convergence accuracy but increases computational demand. In real-time energy optimization, trade-offs between convergence reliability and computational overhead must be carefully managed. Techniques such as adaptive particle populations or dynamic stopping criteria are recommended to maintain efficiency while ensuring high-quality optimization for large-scale systems.
For space complexity, the Blockchain Model’s data storage requirements grow with the number of transactions T and blocks B. The cumulative storage requirement, represented as O T + B , includes transaction data and metadata such as block headers and cryptographic proofs. To mitigate memory overhead, the framework incorporates transaction aggregation, which reduces the number of individual entries stored on the blockchain by grouping multiple transactions into a single block. This approach enhances both computational and storage efficiency during block validation and retrieval. Furthermore, lightweight storage solutions, such as off-chain data management and state compression techniques, can further alleviate space demands, ensuring scalability for large-scale, real-time systems.
Figure 19 provides a detailed visual analysis of the computational complexity and transaction distribution in the proposed blockchain-enabled system:
  • Time complexity of PoA consensus: The graph illustrates the consensus time as a function of the number of B/As in the system. The results indicate a linear relationship with minor stochastic. This analysis demonstrates the scalability of the PoA consensus mechanism for large-scale systems;
  • Time complexity of PSO algorithm: The time required for the PSO algorithm to converge is plotted against the number of iterations. The linear growth highlights the algorithm’s predictable scaling behavior, making it suitable for real-time applications in dynamic energy systems;
  • Space complexity of blockchain system: The storage requirement (in MB) increases with the number of transactions processed, emphasizing the system’s scalability. Transaction aggregation techniques are suggested to mitigate excessive memory overhead.
  • Transaction distribution across agents: This graph demonstrates the distribution of transactions handled by four B/As over multiple time slots. The near-uniform distribution of workload across agents ensures balanced performance and prevents bottlenecks in the system.

7.3.10. PoA Scalability and Performance Analysis in the VP Blockchain-Based MAS

Figure 20 provides a comparative analysis of PoA, PoW, and PoS in the context of the VVP MAS. This evaluation focuses on key performance metrics: scalability, energy consumption, consensus latency, and transaction throughput, which are critical for real-time energy management in decentralized PEV networks and RES coordination.
Scalability vs. number of validators: The top-left graph demonstrates how the system scales with an increasing number of B/As acting as validators. PoA maintains a consistently high scalability index, as transactions are validated deterministically without requiring computationally intensive mining. This enables seamless transaction validation across geographically distributed PEV clusters. In contrast, PoW exhibits severe scalability degradation, as mining competition introduces bottlenecks, while PoS shows moderate scalability but suffers from increased synchronization overhead across multiple VP agents. For the VP MAS, maintaining a high scalability index is crucial, as the system must process thousands of PEV charging, discharging, and energy trading transactions per second without compromising response time.
Energy consumption vs. number of validators: The top-right graph highlights the energy consumption trends of each consensus mechanism. PoW experiences exponential growth in energy consumption due to intensive mining operations, making it impractical for large-scale PEV and RES coordination. PoS shows moderate energy efficiency but still requires computational resources for stake validation. Conversely, PoA remains highly energy-efficient, with minimal power consumption as it eliminates cryptographic mining. This characteristic ensures sustainable blockchain operations for real-time PEV scheduling, load balancing, and V2G transactions, where energy efficiency is paramount.
Consensus latency vs. number of validators: The bottom-left graph illustrates the consensus latency, which directly impacts real-time energy transactions in the VP MAS. PoA maintains a stable and low latency, as its deterministic validator selection prevents bottlenecks. This is critical for fast verification of energy trades and ensuring seamless charging coordination in large-scale PEV networks. In contrast, PoS experiences fluctuating delays, as stake-weighted validator selection adds unpredictability. PoW performs the worst, with increasing latency as validators grow, making it unsuitable for real-time decentralized energy trading. For the VP MAS, the low-latency consensus is essential to prevent transaction backlogs, minimize grid imbalances, and optimize dynamic energy distribution in prosumer networks.
Transaction throughput vs. number of validators: The bottom-right graph compares the number of transactions processed per second (TPS) across consensus mechanisms. PoA achieves the highest throughput, maintaining a stable rate above 400 TPS, which is essential for handling the high volume of PEV energy trades, real-time charging requests, and grid-balancing transactions. PoS throughput declines gradually as more validators participate in consensus, while PoW throughput drops significantly due to increased block validation times. This confirms that PoW is unsuitable for large-scale Virtual Prosumer energy markets, where high-speed transactions are required to match real-time energy supply and demand.
The analysis demonstrates that PoA effectively supports the scalability, energy efficiency, and performance requirements of the VP Blockchain-Based MAS. As the number of B/As increases, PoA ensures that energy transactions across geographically distributed PEV clusters remain efficient without introducing computational overhead. Unlike PoW, which demands high energy consumption, PoA significantly reduces blockchain energy overhead, making it a viable solution for decentralized energy networks driven by PEVs and RESs. Its deterministic consensus mechanism guarantees low-latency validation, enabling real-time synchronization between VP agents, EV agents, and the grid. Furthermore, PoA achieves high transaction throughput, preventing network congestion and ensuring seamless PEV energy exchanges and V2G interactions. These results confirm that PoA is the optimal consensus mechanism for the VP MAS, providing the necessary scalability, low latency, and high performance for real-time decentralized energy management.

7.3.11. Transaction Latency and Performance

Figure 21 analyzes the impact of transaction load and network congestion on the performance of different blockchain consensus mechanisms (PoW, PoS, and PoA) in the proposed system.
The left graph (latency vs. number of transactions) illustrates how transaction latency scales as the number of transactions increases. The following points are evident:
PoW (dashed blue line) exhibits the highest latency, increasing steeply as the transaction load rises. This is attributed to its computationally intensive mining process, which delays transaction validation;
PoS (dotted orange line) reduces latency by eliminating the need for mining, but validator selection randomness still introduces some delay;
PoA (solid green line) maintains consistently low latency across all transaction volumes, as validation is handled deterministically by a predefined set of trusted validators.
The right graph (Real-World TPS vs. Network Load) shows how transaction throughput (measured in Transactions Per Second, TPS) responds to increasing network congestion:
PoW (dashed blue line) experiences a sharp decline in TPS as network load increases, highlighting its inefficiency under high transaction demands;
PoS (dotted orange line) performs better than PoW but still degrades under network congestion;
PoA (solid green line) demonstrates superior scalability, sustaining a significantly higher TPS even as the network load approaches 100%. This is due to its deterministic block validation, which eliminates mining overhead and reduces network congestion.
These results confirm that PoA is the most suitable consensus mechanism for real-time decentralized energy management in the Virtual Prosumer MAS, as it provides low-latency transaction validation, high throughput, and resilience to network congestion.

7.3.12. Active Power Management and Transaction Processing in the VP MAS Blockchain-Based System

Active power scheduling and real-time power management: The left side of Figure 22 presents the scheduling and real-time management of active power within the Virtual Prosumer (VP) system. The scheduling process is divided into 276 time intervals, each lasting 5 min, covering 23 examined periods. The VP system considers Plug-in Electric Vehicles (PEVs), obligations, and operational constraints, ensuring optimal power scheduling, as detailed in the Supplementary Materials—Supplementary Algorithms S1 and S2.
Key observations include the following:
Guaranteed power (2000 kW) and peak power (3000 kW) constraints are enforced between 15:30 and 18:30 (time intervals 175–210);
Real-time active power closely follows the optimal scheduling, demonstrating the VP system’s efficiency in maintaining grid stability;
Active power injection (V2G) occurs during high electricity price periods, such as 7:30–9:00 A.M. and 18:30–19:00 P.M., while active power absorption takes place during lower price periods to optimize operational objectives.
Transaction processing and queue dynamics in the VP system: the right side of Figure 16 illustrates the transaction processing behavior within the VP system, capturing the interplay between incoming transactions, processing capacity, queue length, and processed transactions from EV charging and discharging activities (negative active power).
Key observations include the following:
Incoming transactions fluctuate significantly, influenced by EV activity, power scheduling, and network conditions;
The system’s total processing capacity remains constant, as indicated by the horizontal reference line;
Transaction queue length varies, highlighting periods of congestion where incoming transactions exceed processing capacity;
Peak incoming transactions coincide with the peak power period (15:30–18:30), demonstrating the correlation between transaction surges and high energy demand.
This analysis highlights the effectiveness of the VP system in managing active power and transaction processing under high-load conditions, ensuring secure and efficient grid operations while maintaining real-time scheduling reliability.

7.3.13. Comparative Analysis of the Proposed VP MAS Blockchain-Based System

Evaluation Metrics

To assess the effectiveness of the proposed Blockchain-Integrated VP MAS Framework, the following key performance metrics were used:
Charging cost reduction: evaluating economic benefits compared to conventional charging strategies;
Real-time optimization efficiency: ensuring that the system meets strict real-time constraints;
Scalability and adaptability: assessing performance under increasing transaction loads and diverse network topologies;
Voltage deviations: measuring the impact of energy transactions on grid stability;
Computational time: analyzing execution times for optimization, blockchain processing, and system coordination;
Blockchain overhead: assessing additional delays introduced by PoA-based validation and transaction propagation.

Charging Cost Reduction

The proposed method achieves an 11% reduction in charging costs compared to non-blockchain-based scheduling. The integration of blockchain ensures secure and tamper-resistant energy transactions, which is particularly beneficial in decentralized energy trading environments.
Figure 7 illustrates the optimal scheduling of active power and real-time energy transactions under blockchain governance. The system dynamically adjusts power consumption based on contractual agreements, maintaining guaranteed power at 2000 kW and peak power at 3000 kW.

Real-Time Optimization Efficiency

The total execution time, including optimization, blockchain validation, and consensus, remains well within the required 5 min update window for real-time decision-making.
Blockchain-based execution:
Total delay: in total, 61.4–63.1 s, including transaction validation, PoA consensus, and agent communications.
Optimization time: in total, 51s for PSO, while GAMS finds the solution in a range of 3.1–6.1s.
Non-blockchain execution:
Total delay: 59.8–60.7 s, lacking blockchain validation but without security guarantees.

Scalability and Adaptability

The PoA Consensus Mechanism ensures high transaction throughput even under large-scale energy trading conditions.
Up to 10,000 transactions processed per 5 min interval with low-latency validation;
Hierarchical MAS structure offloads transaction processing to local CEV/As, reducing congestion at the VP/A level;
PoA-based validation ensures deterministic execution times, maintaining stable operation as the network scales.

Voltage Deviations and Grid Stability

The proposed system minimizes voltage deviations across geographically distributed power grids by optimizing transaction-based energy flows.
Smart Contracts enable automated energy reallocation to prevent grid overload;
Real-Time Blockchain Coordination allows CEV/As to dynamically adjust charging based on local voltage conditions;
Figure 10 and Figure 11 confirm that the blockchain-based framework maintains voltage levels within 0.95–1.05 p.u., even during peak demand periods.

Comparative Analysis of Blockchain-Based VP MAS Vs. Existing Methods

To quantify the benefits of the proposed system, Table 4 compares its performance against existing decentralized energy management solutions.
The blockchain-integrated solution outperforms existing methods in real-time scalability, security, and economic optimization, making it a superior alternative for decentralized energy management.

Comparative Analysis of Optimization Methods

A comparison of various optimization techniques is presented in Table 5, highlighting their effectiveness in decentralized power systems.
Figure 23 and Table 5, provide a comprehensive evaluation of various optimization algorithms, including PM (proposed method), Whale Optimization (WO), Cuckoo Optimization (CO), Ant Colony Optimization (ACO), Genetic Algorithm (GA), Bayesian Optimization (BO), nonlinear programming (NLP), and Simulated Annealing (SA). The chart compares these algorithms based on multiple performance metrics:
Convergence speed: how quickly the algorithm converges to a solution;
Constraint handling: The algorithm’s ability to handle and satisfy constraints during optimization;
Robustness: The consistency of the algorithm’s performance under varying conditions;
Computational complexity: The amount of computational resources required by the algorithm;
Real-time applicability: The suitability of the algorithm for real-time applications.
In the radar chart, the numbers 1 to 5 represent a relative performance scale for each metric, where 1 indicates the lowest performance and 5 represents the highest. A higher score means better performance in that specific criterion, while a lower score indicates a weakness. From the chart, PM performs excellently in terms of real-time applicability, making it a preferred choice in time-critical applications, despite its lower robustness compared to some other methods. NLP and SA are computationally expensive but excel in handling constraints and robustness, making them suitable for complex problems with strict constraints. On the other hand, WO, CO, and ACO offer balanced performance across all metrics but fall behind in convergence speed and computational complexity compared to PM.

7.4. Security Mechanism Performance Analysis in VP MAS Blockchain-Based System

This case study evaluates the proposed security mechanism in a multi-agent VP system, focusing on the registration process, encryption protocols, and communication delays. Users register at the CEVA site via the VP application, providing personal credentials such as ID, Tax Identification Number (TIN), and payment information. Upon registration, sensitive data are encrypted and stored securely, and a unique personal code is generated. The system allows users to set preferences (e.g., charging percentage, departure time) through a mobile app (illustrated in Figure 24) or an encrypted QR-based ticket issued on-site. To enhance security, each user is assigned a unique daily encryption key that synchronizes with the CEVA server upon each entry.
The study highlights the importance of selecting encryption protocols that provide robust security without compromising performance. For large-scale, real-time energy systems, AES 256-bit encryption proves to be a practical solution, enabling efficient communication and reliable operation even under high-load conditions. Detailed results and visualizations are presented in Figure 25, Figure 26 and Figure 27 and Table 6, Table 7, Table 8 and Table 9.
Message encryption and communication delays: The system employs ACL messages encrypted with symmetric AES 256-bit and asymmetric RSA protocols to ensure secure communication. The impact of encryption on communication delays was studied, with results summarized in Table 6, Table 7, Table 8 and Table 9 and visualized in Figure 25, Figure 26 and Figure 27.
Key observations include the following:
  • Impact of message size (Table 6 and Table 7, Figure 25 and Figure 26):
    For message sizes between 0.1 and 0.8 kilobytes, all encryption types (plain-text, AES 256-bit, and RSA) performed efficiently, introducing minimal delays;
    For sizes exceeding 0.8 kilobytes, RSA encryption exhibited significant performance degradation, making it unsuitable for real-time applications;
    Symmetric AES 256-bit encryption maintained efficiency up to 6000 kilobytes, demonstrating its suitability for high-volume transactions in MAS.
  • Effect of agent participation (Table 8 and Table 9, Figure 27):
    As the number of agents (e.g., EV/As) increased, communication delays grew, particularly for RSA encryption and AES 256-bit encrypted objects;
    Delays were minimal for smaller agent counts but became pronounced in scenarios involving simultaneous interactions among a large number of agents.
Key Findings and Implications
  • Efficiency vs. security:
    AES 256-bit encryption balances security and performance, making it the optimal choice for real-time MAS applications with high transaction volumes;
    RSA encryption, though secure, is unsuitable for scenarios requiring high-speed communication due to its significant delay under larger message sizes or higher agent counts.
  • Scalability challenges:
    Increased agent participation introduces delays, particularly for RSA encryption. For large-scale MAS implementations, careful selection of encryption protocols is crucial to maintain system efficiency.
  • General applicability:
    The findings are not restricted to the CEVA system but provide insights applicable to any MAS framework requiring secure and scalable communication.

7.5. Results Validation and Contribution Analysis

This section discusses how the obtained results confirm the key contributions of this study. The simulation results, comparative performance evaluations, and blockchain analysis provide strong validation for the proposed framework’s effectiveness in real-time energy management for Virtual Prosumer (VP) Networks.

7.5.1. Validation of the Hierarchical MAS Architecture for Real-Time Energy Management

The proposed hierarchical VP MAS Blockchain-based Architecture was designed to optimize the scheduling and coordination of geographically distributed PEVs and RESs. The results from Section 7.3.3 (Scalability of the Proposed System) and Section 7.3.7 (Reliability Analysis) confirm the following:
The hierarchical coordination between EV Agents (EV/As), Cluster EV Agents (CEV/As), Distribution Feeder Agents (DF/As), and the Virtual Prosumer Agent (VP/A) ensures efficient energy distribution;
The system dynamically adjusts charging setpoints and power allocations in real time, successfully balancing demand and supply while maintaining grid stability;
The latency and transaction throughput evaluations validate that the hierarchical communication model minimizes bottlenecks, supporting real-time decision-making.
These findings confirm the first contribution by demonstrating that the MAS architecture enables effective real-time energy management in a geographically dispersed setting.

7.5.2. Validation of Blockchain-Based Security and PoA Consensus Integration

The integration of a blockchain security mechanism with PoA consensus aimed to enhance transaction security while addressing scalability and energy consumption concerns. The findings from Section 7.3.13 (Comparative Analysis of the Proposed VP MAS Blockchain-Based System), Section 7.3.6 (Blockchain Performance Analysis), and Section 7.3.11 (Transaction Latency and Performance) show the following:
PoA significantly reduces energy consumption compared to PoW and PoS while maintaining high transaction throughput (as shown in Figure 20);
The blockchain-based security layer prevents unauthorized modifications, as validated by the successful execution of secure energy transactions;
Scalability analysis confirms that PoA handles large volumes of transactions efficiently without incurring excessive computational overhead.
These results validate the second contribution by proving that the PoA-based blockchain enhances both security and scalability, making it a suitable choice for decentralized energy transaction management.

7.5.3. Validation of PSO for Dynamic Power Set-Points

The application of PSO for computing optimal power set-points was intended to enhance the system’s adaptability to real-time energy fluctuations. The results from Section 7.3.4 (Transaction Distribution Across Blockchain Agents) and Section 7.3.5 (Probability Density Functions of Transaction Distributions and Consensus Performance) confirm the following:
The PSO-based optimization significantly improves power allocation efficiency, minimizing energy costs and maximizing grid stability;
The system rapidly converges to optimal power set-points, even under varying grid conditions, as demonstrated in dynamic scenario testing;
Comparative analyses against traditional optimization methods show that PSO provides better adaptability and convergence speed for real-time energy transactions.
These findings validate the third contribution, proving that PSO-driven optimization effectively enhances the dynamic scheduling of energy resources in a decentralized system.

7.5.4. Validation of Scalability, Reliability, and Efficiency Through Large-Scale Simulations

To evaluate the scalability, reliability, and efficiency of the proposed system, simulations were conducted across a geographically distributed network spanning four major cities in Greece. The results in Section 7.3.3 (Scalability of the Proposed System), Section 7.3.7 (Reliability Analysis), and Section 7.3.10 (PoA Scalability and Performance Analysis in the VP Blockchain-Based MAS) demonstrate the following:
The system effectively manages high transaction volumes and adapts to different grid conditions without performance degradation;
The proposed framework maintains a high reliability index (>98%), even under stress conditions, confirming its robustness for real-world deployment;
The integration of decentralized control mechanisms (MAS and blockchain) ensures consistent energy transaction processing across geographically distributed nodes.
These results confirm the fourth contribution, proving that the proposed framework is scalable, reliable, and efficient for real-time decentralized energy management in Virtual Prosumer Networks.

8. Conclusions

This study introduced a blockchain-enabled Multi-Agent System (MAS) for real-time power management in Virtual Prosumer Networks (VPs) integrating Plug-in Electric Vehicles (PEVs) and Renewable Energy Sources (RES). The proposed framework enhances security, scalability, and operational efficiency through a combination of hierarchical MAS architecture, advanced optimization methods, and lightweight blockchain mechanisms.

8.1. Blockchain-Based Security Mechanisms

The primary contribution of this work lies in the development of object-based security techniques—Object-based Plain-text, Object-based Symmetric 256-bit encryption, and Object-based Asymmetric RSA encryption—to enhance the security of inter-agent communications within the JADE framework. These techniques ensure secure and efficient communication among agents while mitigating risks such as data tampering and unauthorized access. The analysis demonstrated that object-based encryption mechanisms significantly improve transaction integrity and system robustness, making them ideal for real-time MAS applications. Future implementations could extend these mechanisms to IoT-enabled energy management systems for enhanced security in P2P energy trading scenarios.

8.2. Blockchain Performance and Scalability

A comprehensive performance analysis of the blockchain system highlighted the relationship between throughput, validation time, and block size under various conditions. Key findings include the following:
Throughput increased with block size, while validation time exhibited a moderate correlation with transaction density;
Consensus time rose nonlinearly with the number of Blockchain Agents (B/As), emphasizing the need for lightweight consensus mechanisms;
Experimental results validated the scalability of the system, confirming that Proof of Authority (PoA) consensus mechanisms effectively support real-time operations with minimal delays.
To address future scalability challenges, the hierarchical MAS architecture aggregates transactions at lower levels (e.g., EV/A and CEV/A layers), reducing the computational load on upper layers. Additionally, integrating advanced consensus mechanisms like Proof of Task could further optimize performance in high-traffic scenarios.

8.3. Optimization and Real-Time Scheduling

The inclusion of Particle Swarm Optimization (PSO) and comparative analysis of various algorithms demonstrated the superiority of PSO in convergence speed and real-time adaptability. Key insights include the following:
PSO’s efficiency in optimizing PEV scheduling and V2G interactions under dynamic conditions;
The limitations of traditional algorithms like Genetic Algorithm (GA) and Simulated Annealing (SA), which, while robust, are computationally intensive.
Future studies could explore hybrid optimization techniques combining the strengths of PSO with other algorithms for improved scalability and efficiency.

8.4. Transaction Distribution and Reliability Analysis

The study revealed that transaction distribution across Blockchain Agents (B/As) remained well balanced, reducing bottlenecks and ensuring consistent system performance. Reliability analysis confirmed the system’s robustness under various conditions, including high transaction volumes and partial network failures. These findings emphasize the importance of transaction aggregation and load balancing in blockchain-enabled energy systems, ensuring smooth operations even during peak loads.

8.5. Scalability of the Proposed System

The hierarchical MAS architecture and PoA consensus mechanism ensure that the proposed system scales effectively with increasing numbers of PEVs and RESs. Key scalability features include the following:
Aggregation of transactions at lower layers to minimize blockchain workload;
Adoption of lightweight consensus mechanisms to maintain low-latency and energy-efficient operations.
Future scalability tests under higher penetration levels of PEVs and RESs will further validate the framework’s potential for widespread adoption.

8.6. Practical Implementation Challenges and Solutions

While the proposed framework offers significant advancements in real-time energy management and blockchain integration, practical implementation presents several challenges:
Scalability of communication: The distributed nature of the MAS can lead to increased communication overhead as the number of agents grows. To address this, the framework utilizes a hierarchical agent structure, which reduces the number of direct inter-agent communications by routing data through higher-level agents (e.g., CEV/As, DF/As);
Computational demands: Real-time optimization and blockchain validation require significant computational resources. The adoption of lightweight consensus mechanisms like Proof of Authority (PoA) mitigates this issue, ensuring energy-efficient transaction validation;
Synchronization delays: Geographically distributed agents may experience synchronization delays due to network latencies. The framework incorporates timestamped messages and asynchronous communication models to minimize the impact of such delays;
Integration with legacy systems: Deploying the framework in existing infrastructures may require additional middleware or adaptors. To streamline this process, the MAS is designed with modular components that can interact with legacy systems using standard APIs;
Energy consumption of blockchain: While blockchain introduces transparency and security, its energy consumption is a critical concern. By utilizing PoA and transaction aggregation, the framework minimizes unnecessary computational effort, making it suitable for large-scale deployments.

8.7. Application in Real-Time Energy IoT Systems

The framework’s adaptability for real-time energy IoT systems positions it as a pivotal solution for P2P energy trading and grid management. By enabling secure, transparent, and efficient transactions, the system fosters a decentralized energy market that supports grid stability and economic efficiency.
Future research could integrate additional IoT devices and explore decentralized applications (DApps) to enhance system capabilities further.

8.8. Limitations of the Study

Despite its significant contributions, this study acknowledges the following limitations, which highlight areas for further research and development:
Optimization constraints and complexity: The optimization problems addressed in the VP/A and CEV/A layers involve nonlinear constraints and objectives. While these methods are effective for many scenarios, they require advanced solvers and higher computational resources to achieve accurate solutions. This becomes particularly challenging as the system scales to larger networks or incorporates more complex configurations;
Battery degradation: The study does not account for the degradation of Plug-in Electric Vehicle (PEV) batteries due to repeated charging and discharging cycles. Battery health plays a crucial role in determining the economic and operational feasibility of Vehicle-to-Grid (V2G) interactions and long-term energy optimization. Future work could incorporate battery degradation models to provide a more realistic assessment of energy management strategies and their impact on battery lifespan.

8.9. Implications and Future Directions

This work underscores the transformative potential of blockchain in MAS for energy management. However, future studies should explore the following directions:
Advanced blockchain consensus mechanisms: investigate mechanisms like Proof of Intelligence and Proof of Task to further enhance scalability and energy efficiency;
Machine learning integration: explore the integration of machine learning techniques for predictive optimization in dynamic energy environments;
Real-world implementation: validate the framework’s effectiveness through real-world implementation in large-scale distributed networks;
Federated learning models: investigate the integration of federated learning models to improve decentralized decision-making and system adaptability;
IoT devices and decentralized applications (DApps): integrate additional IoT devices and explore decentralized applications DApps to enhance system capabilities further;
Nonlinear and stochastic modeling: incorporate nonlinear and stochastic modeling approaches to better capture real-world dynamics and variability in energy systems;
Adaptive resource allocation and communication protocols: develop adaptive resource allocation and communication strategies to address challenges related to network constraints and ensure resilience in real-time operations.
In conclusion, the proposed blockchain-based MAS architecture effectively addresses the challenges of real-time energy management, particularly in integrating PEVs and RESs. By ensuring security, scalability, and efficiency, this study provides a strong foundation for the development of resilient and sustainable decentralized energy systems.

Supplementary Materials

The following supporting information can be downloaded at https://www.mdpi.com/article/10.3390/en18030613/s1, Table S1: Performative messages description—JADE FIPA-ACL; Section S00: Overview of Virtual Prosumer Multi-Agent System Components; Section S0: Multi-Agents Social Interactions; Figure S0: Agents’ communication messages—data flow diagram; Section S1: Virtual Prosumer Scheduling System Model; Section S2: Virtual Prosumer Real-Time Model; Figure S1: PEV’s Operation States; Algorithm S1: VP Scheduling Algorithms; Algorithms S2: VP Real-Time Algorithm; Section S2: VP Data Network Communications, Hardware, and Software Infrastructure; Figure S2: VPA Data Networks, Virtual Machines and Communication Infrastructure; Figure S3: Operation Systems, Number of Agents Hardware and Software Specifications. Client/Server TCP/IP Connections between CEV/As and VP/A and their specific port number; Figure S4: Single-line diagrams of the examined distribution networks; Table S2: CEV, PV, WP node connections in power grids; Table S3: Characteristics of the CEVs; Table S4: PEV Parameters; Figure S6: Normalized WP and PV Power for a seven-day duration; Figure S7: Probability Density of Various CEVs; Section S5: Security Threats in Multi-Agent Systems (MASs); Supplementary Section S6 A: Parameters, Constants and Variables. References [23,24,25,26,45,48,49,50,51,52,53,54] are cited in the Supplementary Materials.

Author Contributions

Conceptualization, N.S. and F.K.; methodology, N.S. and F.K.; software, N.S. and K.A.; validation, N.S. and F.K.; formal analysis, N.S.; investigation, N.S.; resources, N.S.; data curation, N.S. and K.A.; writing—original draft preparation, N.S.; writing—review and editing, N.S. and F.K.; visualization, N.S.; supervision, N.S. and F.K.; project administration, N.S. and F.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in this study are included in the article/Supplementary Materials. Further inquiries can be directed to the corresponding author(s).

Conflicts of Interest

The authors declare no conflicts of interest.

Correction Statement

This article has been republished with a minor correction on some typographical errors. This change does not affect the scientific content of the article.

Abbreviations

ACOAnt Colony Optimization
BABees Algorithm
CEV/AsClusters of Electric Vehicle Agents
CEVsCluster Electric Vehicles
CSCuckoo Search
DFDistribution Feeder
DF/AsDistribution Feeder Agents
DSODistribution System Operator
ESOElectric System Operator
EVAsElectric Vehicle Agents
EVsElectric Vehicles
FIPA-ACLFIPA Agent Communication Language
GAGenetic Algorithm
ICTInformation and Communication technology
IMTPInternet Message Access Protocol
MASMulti-Agent Systems
NLPNonlinear Programming
P2PPeer-to-Peer
PEVsPlug-in Electric Vehicles
PSOParticle Swarm Optimization
PVPhotovoltaics
RERsRenewable Energy Resources
RESRenewable Energy Sources
RFIDRadio Frequency Identification
RTReal-time
V2GVehicle-to-Grid
VPVirtual Prosumer
VP/AVirtual Prosumer Agent
VPPVirtual Power Plant
WOWolf Optimization
WTWind Turbine
xDSLVariations in Digital Subscriber Line

Appendix A

Appendix A.1. Virtual Prosumer Scheduling Algorithms

The Virtual Prosumer Scheduling Algorithms are fully described in Supplementary Materials (Supplementary Algorithms S1), encompassing all algorithms used in the scheduling process of the Virtual Prosumer (VP). These algorithms are pivotal for the effective operation and optimization of the VP/A (Supplementary Algorithms S1–S4), illustrating the systematic approach to managing power at different layers, ensuring cost minimization and adherence to grid constraints.

Appendix A.2. Virtual Prosumer Real-Time Algorithms

The Virtual Prosumer Real-Time Algorithms (Supplementary Algorithms S5–S9) are critical for the real-time operation of the VP/A system, facilitating optimization and efficient energy management across multiple layers. Supplementary Algorithm S5 calculates EV/A power profiles and flexibility, while Supplementary Algorithm S6 aggregates these at the CEV/A level for further optimization. Supplementary Algorithm S7 applies PSO to perform Optimal Power Flow (OPF) analysis, ensuring compliance with grid constraints. Subsequently, Supplementary Algorithm S8 determines the necessary power adjustments for EV/As, and Supplementary Algorithm S9 implements these set-points in real time. The detailed implementation and functionality of these algorithms are depicted in Supplementary Materials (Supplementary Algorithm S2).

Appendix A.3. Virtual Prosumer Blockchain Algorithms

Algorithm A1: Blockchain Transaction Processing. Transaction Model
Input: EV/As power adjustment data from CEV/As
Output: Formatted transactions ready for aggregation
 1:for each EV/A in CEV/A
 2:      get power adjustment data (charging/discharging)
 3: create transaction T i  with
 4:      EV/A ID
Power adjustment (kw)
 5: Time of transaction
State of Charge (SoC)
 6: Store T i in the transaction pool
 7:end
 8:execute Algorithm A2
Algorithm A2: Blockchain Transaction Processing. Aggregation of Transactions
Input: Transaction pool
Output: Aggregated transactions for each B/A
 1:for each   B / A j
 2:     initialize transaction list L B A j
 3: for each   C E V / A associated with B / A j
 4:          aggregate transactions T i  from transaction pool
 5: add  T i  to  L B A j
 6: end
 7: prepare aggregated transaction set B A j t k
 8:end
 9:execute Algorithm A3
Algorithm A3: Blockchain Transaction Processing. Block Formation
Input: Aggregated transactions from B/A
Output: New block B t k
 1:for each B/A
 2:      create new block B t k with
 3: aggregated transactions B A j t k
 4:      reference to previous block’s hash H B t k 1
 5: timestamp of block creation
 6: validator ID
 7:end
 8:execute Algorithm A4
Algorithm A4: Blockchain Transaction Processing. Hashing and Block Linking
Input: New block B t k
Output: Linked block in the blockchain
 1:for each B/A
 2:     compute hash H Β t k for block B t k
 3: link  B t k to blockchain by adding H B t k to previous block’s hash
 4:end
 5:execute Algorithm A5
Algorithm A5: Blockchain Transaction Processing. Validation and Consensus—PoA Mechanism
Input: Hashed block H B t k
Output: Validated block
 1:for each B/A
 2:  validate transactions in block B t k
 3: for each transaction in block B t k
 4:if  T i is valid
 5: set  V T i = 1
 6: else
 7: set V T i = 0
 8: end
 9: if all V T i = 1  for all T i in B t k
 10: mark block B t k as valid
 11: else
 12: mark block B t k as invalid
 13: end
 14: achieve consensus among B/As
 15: if majority of B/As agree on block validity
 16: c o n s e n s u s B t k = v a l i d
 17: else
 18: c o n s e n s u s B t k = i n v a l i d
 19: end
 20:end
 21:execute Algorithm A6
Algorithm A6: Blockchain Transaction Processing. Finalization of the Block
Input: Validated block B t k
Output: Finalized block in the blockchain
 1:If c o n s e n s u s B t k = v a l i d
 2: add block B t k to blockchain
 3:end
 4:execute Algorithm A7
Algorithm A7: Blockchain Transaction Processing. Blockchain Update
Input: Finalized block B t k
Output: Updated local blockchain for each B/A
 1:for each B/A
 2:   updatelocal copy of blockchain with B t k
 3:end
 4:execute Algorithm A8
Algorithm A8: Blockchain Transaction Processing. VP/A Update
Input: Request from VP/A
Output: Blockchain data provided to VP/A
 1:if VP/A requests blockchain data
 2:      for each B/A
 3: provide blockchain data to VP/A as requested
 4:            execute Algorithm S8
 5: end
 6:end
 7:execute Algorithm A1

References

  1. Sifakis, N.K.; Kanellos, F.D. Real Time Multi-Agent based Power Management of Virtually Integrated Microgrids comprising Prosumers of Plugin Electric Vehicles and Renewable Energy Sources. IEEE Access 2024, 12, 161842–161865. [Google Scholar] [CrossRef]
  2. Nagaraj, S.V. Securing Multi-agent Systems: A Survey. In Advances in Computing and Information Technology; Springer: Berlin/Heidelberg, Germany, 2012; pp. 23–30. [Google Scholar]
  3. Jung, Y.; Kim, M.; Masoumzadeh, A.; Joshi, J.B. A survey of security issue in multi-agent systems. Artif. Intell. Rev. 2012, 37, 239–260. [Google Scholar] [CrossRef]
  4. Eltamaly, A.M.; Ahmed, M.A. Performance Evaluation of Communication Infrastructure for Peer-to-Peer Energy Trading in Community Microgrids. Energies 2023, 16, 5116. [Google Scholar] [CrossRef]
  5. Shah, M.I.A.; Wahid, A.; Barrett, E.; Mason, K. Multi-agent systems in Peer-to-Peer energy trading: A comprehensive survey. Eng. Appl. Artif. Intell. 2023, 132, 107847. [Google Scholar] [CrossRef]
  6. Petri, I.; Barati, M.; Rezgui, Y.; Rana, O.F. Blockchain for energy sharing and trading in distributed prosumer communities. Comput. Ind. 2020, 123, 103282. [Google Scholar] [CrossRef]
  7. Aljohani, T.; Almutairi, A. A comprehensive survey of cyberattacks on EVs: Research domains, attacks, defensive mechanisms, and verification methods. Def. Technol. 2024, 42, 31–58. [Google Scholar] [CrossRef]
  8. Ali, F.S.; Aloqaily, M.; Ozkasap, O.; Bouachir, O. Blockchain-assisted Decentralized Virtual Prosumer Grouping for P2P Energy Trading. In Proceedings of the 2020 IEEE 21st International Symposium on “A World of Wireless, Mobile and Multimedia Networks” (WoWMoM), Virtual, 31 August–3 September 2020; pp. 385–390. [Google Scholar] [CrossRef]
  9. Kumari, A.; Sukharamwala, U.C.; Tanwar, S.; Raboaca, M.S.; Alqahtani, F.; Tolba, A.; Sharma, R.; Aschilean, I.; Mihaltan, T.C. Blockchain-Based Peer-to-Peer Transactive Energy Management Scheme for Smart Grid System. Sensors 2022, 22, 4826. [Google Scholar] [CrossRef] [PubMed]
  10. Hashemipour, N.; del Granado, P.C.; Aghaei, J. Dynamic allocation of peer-to-peer clusters in virtual local electricity markets: A marketplace for EV flexibility. Energy 2021, 236, 121428. [Google Scholar] [CrossRef]
  11. Hussain, I.; Hussain, H.A.; Ullah, N.; Misak, S. A novel prosumer-centric smart contract based approach for blockchain-enabled energy scheduling using electric vehicles. IEEE Access 2024, 12, 120747–120760. [Google Scholar] [CrossRef]
  12. Yu, Y.; Liu, G.P.; Huang, Y.; Chung, C.Y.; Li, Y.Z. A blockchain consensus mechanism for real-time regulation of renewable energy power systems. Nat. Commun. 2024, 15, 10620. [Google Scholar] [CrossRef]
  13. Shibu, N.B.S.; Devidas, A.R.; Balamurugan, S.; Ponnekanti, S.; Ramesh, M.V. Optimizing Microgrid Resilience: Integrating IoT, Blockchain, and Smart Contracts for Power Outage Management. IEEE Access 2024, 12, 18782–18803. [Google Scholar] [CrossRef]
  14. Maine, P.K.; Leke, C.A.; Longe, O.M. Blockchain application in energy trading for grid-connected prosumers. E Prime Adv. Electr. Eng. Electron. Energy 2024, 8, 100586. [Google Scholar] [CrossRef]
  15. Park, L.W.; Lee, S.; Chang, H. A sustainable home energy prosumer-chain methodology with energy tags over the blockchain. Sustainability 2018, 10, 658. [Google Scholar] [CrossRef]
  16. Umar, A.; Kumar, D.; Ghose, T.; Alghamdi, T.A.H.; Abdelaziz, A.Y. Decentralized Community Energy Management: Enhancing Demand Response Through Smart Contracts in a Blockchain Network. IEEE Access 2024, 12, 80781–80798. [Google Scholar] [CrossRef]
  17. Supriya, S.; Magheshwari, M.; Udhyalakshmi, S.S.; Subhashini, R. Musthafa Smart grid technologies: Communication technologies and standards. Int. J. Appl. Eng. Res. 2015, 10, 16932–16941. [Google Scholar]
  18. Gupta, T.; Bhatia, R. Advanced Communication Technologies and Intelligent Systems Communication Technologies in Smart Grid at Different Network Layers: An Overview. In Proceedings of the 2020 International Conference on Intelligent Engineering and Management (ICIEM), London, UK, 17–19 June 2020; pp. 177–182. [Google Scholar] [CrossRef]
  19. Amendola, S.; Occhiuzzi, C.; Marrocco, G. RFID sensing networks for critical infrastructure security: A real testbed in an energy smart grid. In Proceedings of the 2017 IEEE International Conference on RFID Technology & Application (RFID-TA), Warsaw, Poland, 20–22 September 2017; pp. 106–110. [Google Scholar] [CrossRef]
  20. Kim, S.; Kim, D. Data-Tracking in Blockchain Utilizing Hash Chain: A Study of Structured and Adaptive Process. Symmetry 2024, 16, 62. [Google Scholar] [CrossRef]
  21. Carissimo, C.; Korecki, M. Limits of Optimization. Minds Mach. 2024, 34 (Suppl. S1), 117–137. [Google Scholar] [CrossRef] [PubMed]
  22. Zhao, M.; Zhang, Y.; Wang, H. Battery degradation stage detection and life prediction without accessing historical operating data. Energy Storage Mater. 2024, 69, 103441. [Google Scholar] [CrossRef]
  23. Al-Ogaili, A.S.; Hashim, T.J.T.; Rahmat, N.A.; Ramasamy, A.K.; Marsadek, M.B.; Faisal, M.; Hannan, M.A. Review on scheduling, clustering, and forecasting strategies for controlling electric vehicle charging: Challenges and recommendations. IEEE Access 2019, 7, 128353–128371. [Google Scholar] [CrossRef]
  24. Amin, A.; Tareen, W.U.K.; Usman, M.; Ali, H.; Bari, I.; Horan, B.; Mekhilef, S.; Asif, M.; Ahmed, S.; Mahmood, A. A review of optimal charging strategy for electric vehicles under dynamic pricing schemes in the distribution charging network. Sustainability 2020, 12, 10160. [Google Scholar] [CrossRef]
  25. Nimalsiri, N.I.; Mediwaththe, C.P.; Ratnam, E.L.; Shaw, M.; Smith, D.B.; Halgamuge, S.K. A Survey of Algorithms for Distributed Charging Control of Electric Vehicles in Smart Grid. IEEE Trans. Intell. Transp. Syst. 2019, 21, 4497–4515. [Google Scholar] [CrossRef]
  26. Zimmerman, R.D.; Murillo-Sánchez, C.E.; Thomas, R.J. MATPOWER: Steady-state operations, planning, and analysis tools for power systems research and education. IEEE Trans. Power Syst. 2011, 26, 12–19. [Google Scholar] [CrossRef]
  27. Bowden, R.; Keeler, H.P.; Krzesinski, A.E.; Taylor, P.G. Modeling and analysis of block arrival times in the Bitcoin blockchain. Stoch. Model. 2020, 36, 602–637. [Google Scholar] [CrossRef]
  28. Jahan, F.; Mostafa, M.; Chowdhury, S. SHA-256 in Parallel Blockchain Technology: Storing Land Related Documents. Int. J. Comput. Appl. 2020, 175, 33–38. [Google Scholar] [CrossRef]
  29. Fahim, S.; Rahman, S.K.; Mahmood, S. Blockchain: A Comparative Study of Consensus Algorithms PoW, PoS, PoA, PoV. Int. J. Math. Sci. Comput. 2023, 9, 46–57. [Google Scholar] [CrossRef]
  30. Hanggoro, D.; Windiatmaja, J.H.; Muis, A.; Sari, R.F.; Pournaras, E. Energy-aware Proof-of-Authority: Blockchain Consensus for Clustered Wireless Sensor Network. Blockchain Res. Appl. 2024, 5, 100211. [Google Scholar] [CrossRef]
  31. Zhang, T.; Huang, Z. FPoR: Fair proof-of-reputation consensus for blockchain. ICT Express 2023, 9, 45–50. [Google Scholar] [CrossRef]
  32. Vora, S.; Gor, R. Queueing Model for PoA based Blockchain system. IOSR J. Math. 2022, 18, 31–38. [Google Scholar] [CrossRef]
  33. Bulgakov, A.L.; Aleshina, A.V.; Smirnov, S.D.; Demidov, A.D.; Milyutin, M.A.; Xin, Y. Scalability and Security in Blockchain Networks: Evaluation of Sharding Algorithms and Prospects for Decentralized Data Storage. Mathematics 2024, 12, 3860. [Google Scholar] [CrossRef]
  34. Zhou, S.; Li, K.; Xiao, L.; Cai, J.; Liang, W.; Castiglione, A. A Systematic Review of Consensus Mechanisms in Blockchain. Mathematics 2023, 11, 2248. [Google Scholar] [CrossRef]
  35. Regueiro, C.; Seco, I.; Gutiérrez-Agüero, I.; Urquizu, B.; Mansell, J. A Blockchain-Based Audit Trail Mechanism: Design and Implementation. Algorithms 2021, 14, 341. [Google Scholar] [CrossRef]
  36. Bakumenko, A.; Elragal, A. Detecting Anomalies in Financial Data Using Machine Learning Algorithms. Systems 2022, 10, 130. [Google Scholar] [CrossRef]
  37. Mohammed, M.A.; Boujelben, M.; Abid, M. A Novel Approach for Fraud Detection in Blockchain-Based Healthcare Networks Using Machine Learning. Future Internet 2023, 15, 250. [Google Scholar] [CrossRef]
  38. Yang, C.; Chin, K.W.; Wang, J.; Wang, X.; Liu, Y.; Zheng, Z. Scaling Blockchains with Error Correction Codes: A Survey on Coded Blockchains. ACM Comput. Surv. 2024, 56, 1–33. [Google Scholar] [CrossRef]
  39. Lahraoui, Y.; Lazaar, S.; Amal, Y.; Nitaj, A. Securing Data Exchange with Elliptic Curve Cryptography: A Novel Hash-Based Method for Message Mapping and Integrity Assurance. Cryptography 2024, 8, 23. [Google Scholar] [CrossRef]
  40. Xia, Z.; Yang, X.; Li, A.; Liu, Y.; He, S. Research on Information Security Transmission of Port Multi-Thread Equipment Based on Advanced Encryption Standard and Preprocessing Optimization. Appl. Sci. 2024, 14, 11887. [Google Scholar] [CrossRef]
  41. Kawase, Y.; Kasahara, S. Transaction-Confirmation Time for Bitcoin: A Queueing Analytical Approach to Blockchain Mechanism. In Queueing Theory and Network Applications. QTNA 2017; Yue, W., Li, Q.L., Jin, S., Ma, Z., Eds.; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2017; Volume 10591. [Google Scholar] [CrossRef]
  42. Lo, S.K.; Xu, X.; Staples, M.; Yao, L. Reliability analysis for blockchain oracles. Comput. Electr. Eng. 2020, 83, 1–10. [Google Scholar] [CrossRef]
  43. Liu, B.; Qiu, F.; Cao, Y.; Chang, B.; Cui, Y.; Xue, Y. Maximizing Resilient Throughput in Peer-to-Peer Network. Commun. Netw. 2011, 3, 168–183. [Google Scholar] [CrossRef]
  44. GAMS Development Corporation. General Algebraic Modeling System (GAMS), Release 48.1.0; GAMS Development Corporation: Fairfax, VA, USA, 2024. [Google Scholar]
  45. The MathWorks, Inc. MATLAB Version: 9.13.0 (R2022b). 2022. Available online: https://www.mathworks.com (accessed on 1 January 2023).
  46. Lazarou, S.; Vita, V.; Ekonomou, L. An open data repository for steady state analysis of a 100-node electricity distribution network with moderate connection of renewable energy sources. Data Br. 2018, 16, 1095–1101. [Google Scholar] [CrossRef] [PubMed]
  47. Romano, P.; Paolone, M.; Chau, T.; Jeppesen, B.; Ahmed, E. A High-Performance, Low-Cost PMU Prototype for Distribution Networks Based on FPGA; IEEE Manchester PowerTech: Manchester, UK, 2017; pp. 1–6. [Google Scholar]
  48. European Parliament. Directive 2019/944 of the European Parliament and of the Council of 5 June 2019 on Common Rules for the Internal Market for Electricity. Off. J. Eur. Union 2019, L158, 143. [Google Scholar]
  49. European Parliament. Regulation (EU) 2019/941 of the European Parliament and of the Council of 5 June 2019 on risk-preparedness in the electricity sector. Off. J. Eur. Union 2019, L158/1, 1–21. [Google Scholar]
  50. The European Parliament and the Council of the European Union. Regulation (EU) 2019/943 of the European Parliament and of the Council of 5 June 2019 on the internal market for electricity. Off. J. Eur. Union 2019, 62, 54–191. [Google Scholar]
  51. Kong, P.Y.; Karagiannidis, G.K. Charging Schemes for Plug-In Hybrid Electric Vehicles in Smart Grid: A Survey. IEEE Access 2016, 4, 6846–6875. [Google Scholar] [CrossRef]
  52. Metz, M.; Doetsch, C. Electric vehicles as flexible loads—A simulation approach using empirical mobility data. Energy 2012, 48, 369–374. [Google Scholar] [CrossRef]
  53. Kanellos, F.D. Real-Time Control Based on Multi-Agent Systems for the Operation of Large Ports as Prosumer Microgrids. IEEE Access 2017, 5, 9439–9452. [Google Scholar] [CrossRef]
  54. NTA. National Household Travel Survey 2017 Final Report. No. December, pp. 1–129, 2018. Available online: https://www.nationaltransport.ie/wp-content/uploads/2020/09/National_Household_Travel_Survey_2017_Report_-_December_2018.pdf (accessed on 19 December 2019).
Figure 1. Proposed MAS architecture.
Figure 1. Proposed MAS architecture.
Energies 18 00613 g001
Figure 2. Blockchain structure across multiple B/A agents in sequential timeslots.
Figure 2. Blockchain structure across multiple B/A agents in sequential timeslots.
Energies 18 00613 g002
Figure 3. Flow chart of the proposed method.
Figure 3. Flow chart of the proposed method.
Energies 18 00613 g003
Figure 4. Total execution delay per run with blockchain-based processing.
Figure 4. Total execution delay per run with blockchain-based processing.
Energies 18 00613 g004
Figure 5. Blockchain-based multi-agent system for power grid management across Greece.
Figure 5. Blockchain-based multi-agent system for power grid management across Greece.
Energies 18 00613 g005
Figure 6. Distribution network loads in the four cities and electric price.
Figure 6. Distribution network loads in the four cities and electric price.
Energies 18 00613 g006
Figure 7. VP real-time active power, optimal scheduled power, and guaranteed (2000 kW) and peak (3000 kW) power limits from 15:30 P.M. to 18:30 P.M.
Figure 7. VP real-time active power, optimal scheduled power, and guaranteed (2000 kW) and peak (3000 kW) power limits from 15:30 P.M. to 18:30 P.M.
Energies 18 00613 g007
Figure 8. Total active power of all CEVs for SC1 and SC2.
Figure 8. Total active power of all CEVs for SC1 and SC2.
Energies 18 00613 g008
Figure 9. Representative SoC trajectories of PEV batteries across different CEVs.
Figure 9. Representative SoC trajectories of PEV batteries across different CEVs.
Energies 18 00613 g009
Figure 10. CEV Node Voltages for Optimal Charging in SC1. The figure shows the voltage profiles of different CEVs over time, highlighting voltage drops due to charging demand fluctuations.
Figure 10. CEV Node Voltages for Optimal Charging in SC1. The figure shows the voltage profiles of different CEVs over time, highlighting voltage drops due to charging demand fluctuations.
Energies 18 00613 g010
Figure 11. Voltage drop across CEVs under conventional charging (SC2). Greater fluctuations indicate a higher impact on grid stability compared to the proposed method.
Figure 11. Voltage drop across CEVs under conventional charging (SC2). Greater fluctuations indicate a higher impact on grid stability compared to the proposed method.
Energies 18 00613 g011
Figure 12. Total delay in blockchain system vs. number of transactions (N) under varying agent participation and complexity levels.
Figure 12. Total delay in blockchain system vs. number of transactions (N) under varying agent participation and complexity levels.
Energies 18 00613 g012
Figure 13. Comparison of theoretical and experimental total delay in blockchain system vs. number of transactions (N) across varying numbers of blockchain agents (M).
Figure 13. Comparison of theoretical and experimental total delay in blockchain system vs. number of transactions (N) across varying numbers of blockchain agents (M).
Energies 18 00613 g013
Figure 14. Transaction distribution across blockchain agents over 288 time slots.
Figure 14. Transaction distribution across blockchain agents over 288 time slots.
Energies 18 00613 g014
Figure 15. Probability Density Functions of transaction distributions across blockchain agents.
Figure 15. Probability Density Functions of transaction distributions across blockchain agents.
Energies 18 00613 g015
Figure 16. Consensus performance graph (PoA Mechanism)—theoretical vs. experimental data.
Figure 16. Consensus performance graph (PoA Mechanism)—theoretical vs. experimental data.
Energies 18 00613 g016
Figure 17. Blockchain performance analysis chart.
Figure 17. Blockchain performance analysis chart.
Energies 18 00613 g017
Figure 18. Reliability analysis diagram.
Figure 18. Reliability analysis diagram.
Energies 18 00613 g018
Figure 19. Computational complexity, transaction distribution analysis for blockchain and optimization systems.
Figure 19. Computational complexity, transaction distribution analysis for blockchain and optimization systems.
Energies 18 00613 g019
Figure 20. Comparison of PoA, PoW, and PoS: scalability, energy consumption, consensus latency, and transaction throughput across validators.
Figure 20. Comparison of PoA, PoW, and PoS: scalability, energy consumption, consensus latency, and transaction throughput across validators.
Energies 18 00613 g020
Figure 21. Comparison of transaction latency and throughput for PoW, PoS, and PoA in the Virtual Prosumer Blockchain-based MAS.
Figure 21. Comparison of transaction latency and throughput for PoW, PoS, and PoA in the Virtual Prosumer Blockchain-based MAS.
Energies 18 00613 g021
Figure 22. Active power scheduling and transaction processing dynamics in the Virtual Prosumer System.
Figure 22. Active power scheduling and transaction processing dynamics in the Virtual Prosumer System.
Energies 18 00613 g022
Figure 23. Comparative analysis of Blockchain-Based VP MAS vs. existing methods.
Figure 23. Comparative analysis of Blockchain-Based VP MAS vs. existing methods.
Energies 18 00613 g023
Figure 24. Virtual Prosumer Mobile Application.
Figure 24. Virtual Prosumer Mobile Application.
Energies 18 00613 g024
Figure 25. Delay (ms) vs. size of content (kbytes).
Figure 25. Delay (ms) vs. size of content (kbytes).
Energies 18 00613 g025
Figure 26. Delay(ms) vs. size of content (kbytes).
Figure 26. Delay(ms) vs. size of content (kbytes).
Energies 18 00613 g026
Figure 27. Delay (ms) vs. number of agents.
Figure 27. Delay (ms) vs. number of agents.
Energies 18 00613 g027
Table 1. Comparison between the proposed method and prior research works.
Table 1. Comparison between the proposed method and prior research works.
RefFocus AreaEnergy SourceOptimization MethodBlockchain IntegrationScalabilitySecurity MechanismReal-Time CapabilityKey Contributions
[6]Formation of decentralized energy communitiesVarious RESs in prosumer networksNo explicit optimizationBlockchain for secure transactionsCommunity-levelBasic authenticationModeratePeer-to-peer energy exchange with monitoring
[8]Prosumer grouping for decentralized tradingSurplus energy from prosumersNo specific optimizationBlockchain for privacy and securityLarge-scale P2P tradingEncryption-based securityModerateScalability and privacy protection in P2P trading
[9]Blockchain-enabled Transactive Energy Market (TEM)Solar and wind energyRecommender-based groupingEthereum + IPFS for tradingLocalized micro-marketsBasic trust mechanismModerateSmart contract execution for automated energy trading
[11]Prosumer-centric energy schedulingRESs + PEVsSmart contract-based optimizationBlockchain with PoI for securityMulti-city scalable networksIdentity-based securityHighEfficient P2P energy scheduling using blockchain
[12]Real-time blockchain for energy regulationRESs in large power gridsProof of Task for optimizationBlockchain with consensus-based trustLarge-scale RES systemsTrusted computingHighTask-driven real-time security for renewable energy
[13]IoT-integrated microgrid resilienceRESs + isolated generatorsCost-optimization modelingBlockchain-enabled resilience frameworkSmall-scale microgridsBasic data securityModerateDecentralized power restoration using blockchain
[14]Optimized power generation for railway systemsSolar energy + battery storageAIMMS-based optimizationBlockchain for P2P tradingSingle-site PV systemNot specifiedModerateCost reduction for railway energy
[15]Smart home energy managementResidential energy sourcesSimulation-based cost analysisBlockchain for energy tagging and verificationSmart home levelHash-based securityLimitedSecure and transparent household energy transactions
[16]Blockchain for community microgrid transactionsRESs in microgridsIncentive-driven demand responseBlockchain with USDT for pricingCommunity-scale microgridsCryptographic integrityHighDynamic pricing and demand response for local grids
[PM]Real-time management of PEVs in VP networksRESs + PEVs for energy exchangeMAS-based scheduling with PSOBlockchain for secure PEV energy transactionsLarge-scale multi-city networkDual-layer encryption + PoAHighSecure, decentralized, and real-time PEV scheduling
Table 2. Information flow and agent interactions in the VP MAS Blockchain-Based System.
Table 2. Information flow and agent interactions in the VP MAS Blockchain-Based System.
Agent InteractionDescription
E V / A s     C E V / A s : Send charging requests and SOC updates, and receive optimized charging setpoints.
C E V / A s     D F / A s : Aggregate power demands, regulate transformer loads, and forward setpoints.
C E V / A s   B / A s : Exchange validated energy transactions for blockchain recording.
D F / A s     V P / A : Aggregate feeder data, verify grid constraints, and relay VP/A decisions to CEV/As.
V P / A     C E V / A s : Issues finalized power setpoints and optimizations across all agent layers.
Table 3. Transaction distribution metrics for each blockchain agent.
Table 3. Transaction distribution metrics for each blockchain agent.
Agent Mean   ( μ ) Std Deviation (σ)Information
B/A1898.34149.27The PDF curve for B/A1 is slightly narrower compared to others, indicating less variability in the number of transactions
B/A21095.55172.70B/A2 handles a higher number of transactions on average, with more spread in the distribution.
B/A3957.12167.37B/A3 processes a moderate number of transactions, with its PDF showing a more distributed range of transactions.
B/A41073.85156.23Similar to B/A2, B/A4 processes a relatively high number of transactions, with variability in the distribution.
Table 4. Comparative Analysis of Blockchain-Based VP MAS Vs. Existing Methods.
Table 4. Comparative Analysis of Blockchain-Based VP MAS Vs. Existing Methods.
MetricExisting ApproachesProposed Blockchain-Based VP MAS
Real-Time CoordinationLimitedYes (Smart Contracts and PoA)
ScalabilityModerateHigh (Hierarchical MAS + PoA)
Economic BenefitsModerateHigh (11% Cost Reduction)
Market IntegrationLimitedYes (Decentralized P2P Trading)
Voltage ManagementBasicAdvanced (Smart Metering and Blockchain)
Table 5. Comparative analysis of VP MAS Blockchain-based Optimization Methods.
Table 5. Comparative analysis of VP MAS Blockchain-based Optimization Methods.
MethodConvergence SpeedConstraint HandlingRobustnessComputational ComplexityReal-Time Applicability
PMHighHighMod-HighLowExcellent
WOModModHighModMod
COModModHighModMod
ACOModModModModMod
GAModModMod-HighHighMod
BOLow-ModModModHighPoor-Mod
NLPModHighHighHighPoor
SALow-ModLowModHighPoor
Table 6. VP MAS delay vs. content size.
Table 6. VP MAS delay vs. content size.
Content Size (kB)No Encryption (ms)AES-256 Encryption (ms)RSA Encryption (ms)
0.155963.0
1.0563387.0
10.05731718.0
100.014167NaN
1000.03182999NaN
10,000.03370154,457NaN
Table 7. VP MAS delay vs. content size (object-based content).
Table 7. VP MAS delay vs. content size (object-based content).
Content Size (kB)No Encryption (ms)AES-256 Encryption (ms)RSA Encryption (ms)
0.2541564138.0
2.7761972438.0
7.37920931773.0
100.00058304NaN
1000.0003646359NaN
10,457.0002112392,006NaN
Table 8. VP MAS delay vs. number of agents.
Table 8. VP MAS delay vs. number of agents.
Agents NumberNo Encryption (ms)AES-256 Encryption (ms)RSA Encryption (ms)
155963
101886112
100114182345
100087913362667
5000571958848998
10,0008952961914,693
Table 9. VP MAS delay vs. number of agents (object-based content).
Table 9. VP MAS delay vs. number of agents (object-based content).
Agents NumberNo Encryption (ms)AES-256 Encryption (ms)RSA Encryption (ms)
11564138
1037106183
100165260494
1000175122943053
5000684585319516
10,00012,06520,42715,906
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Sifakis, N.; Armyras, K.; Kanellos, F. Real-Time Power Management of Plug-In Electric Vehicles and Renewable Energy Sources in Virtual Prosumer Networks with Integrated Physical and Network Security Using Blockchain. Energies 2025, 18, 613. https://doi.org/10.3390/en18030613

AMA Style

Sifakis N, Armyras K, Kanellos F. Real-Time Power Management of Plug-In Electric Vehicles and Renewable Energy Sources in Virtual Prosumer Networks with Integrated Physical and Network Security Using Blockchain. Energies. 2025; 18(3):613. https://doi.org/10.3390/en18030613

Chicago/Turabian Style

Sifakis, Nikolaos, Konstantinos Armyras, and Fotis Kanellos. 2025. "Real-Time Power Management of Plug-In Electric Vehicles and Renewable Energy Sources in Virtual Prosumer Networks with Integrated Physical and Network Security Using Blockchain" Energies 18, no. 3: 613. https://doi.org/10.3390/en18030613

APA Style

Sifakis, N., Armyras, K., & Kanellos, F. (2025). Real-Time Power Management of Plug-In Electric Vehicles and Renewable Energy Sources in Virtual Prosumer Networks with Integrated Physical and Network Security Using Blockchain. Energies, 18(3), 613. https://doi.org/10.3390/en18030613

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop