A Physics Informed Learning Augmented Framework for Grid-Aware P2P Energy Trading
Distribution networks are transitioning from passive to active systems, driven by the large-scale proliferation of distributed energy resources (DERs) at the grid edge. Peer-to-Peer (P2P) energy trading has emerged as a transformative paradigm that enables energy transactions among prosumers, aggregated here as microgrids (MG). Ensuring that these transactions remain physically feasible within the distribution network is a fundamental prerequisite for any credible P2P framework. This is typically handled by distribution system operators (DSO) through bilevel coordination in distributed P2P architectures, wherein MGs optimize trades independently of network constraints, and the DSO subsequently corrects the infeasible outcomes. However, such sequential coordination prevents MGs from anticipating network feasibility during P2P market clearing, potentially leading to substantial post market corrections, altered trading outcomes, and repeated MG DSO interactions. To this end, this paper proposes a physics informed learning augmented P2P DSO framework in which a transformer-based model is trained to predict the DSOs response to proposed P2P trades, with network feasibility embedded directly in the training objective. Embedding this model within P2P market clearing algorithm allows MGs to anticipate the DSOs response and refine their trading decisions during trading, before submission. The proposed framework is validated on the modified IEEE 69 bus distribution system with interconnected MGs. Relative to conventional bilevel DSO correction, case studies show that the proposed framework recovers 40.90% of P2P market utilization and 22.00% of economic transactions, while empirically eliminating network constraint violations over a full year of operation and substantially reducing computational and communication overhead.