A Peer-to-Peer Energy Management and Exchange Framework in Energy Communities via Actor-Critic Learning
George A. Levis, Sotirios T. Spantideas, Anastasios E. Giannopoulos, Member, IEEE, and Panagiotis Trakadas
Abstract
The rapid growth of global energy consumption in buildings and the increasing adoption of renewable energy sources have created an urgent need for intelligent Home Energy Management Systems (HEMS). This work addresses the challenge of optimizing both individual home energy usage and community-wide energy distribution through peer-to-peer (P2P) trading. In the proposed framework, each smart home jointly optimizes the comfort maintenance, the energy cost and the community energy efficiency based on renewable generation, temperature dynamics, and grid prices. We propose a marketbased energy exchange mechanism with dynamic price setting and two complementary methods (threshold-based and rewardbased) to mitigate market manipulation in P2P energy trading. To enable decentralized coordination inside the energy community, the multi-agent Deep Reinforcement Learning (DRL) with actorcritic architecture is proposed to ensure the continuous and adaptive control of indoor temperature systems, battery storage, and price setting using real-world market prices and energy consumption data. The quantitative validation across multiple homes demonstrates a 39.3% reduction in grid dependency of the reward-based mechanism compared to unregulated trading. The framework maintains indoor temperatures consistently within comfort bounds while enabling intelligent battery management that adapts to price fluctuations, with state-of-charge levels peaking at 85% during low-price periods and decreasing to 40% during high-demand intervals. Overall, the approach establishes a self-sustaining energy ecosystem within residential communities, balancing market integrity and operational efficiency.