Joint optimization of task offloading and energy trading in edge-enabled smart grids using deep reinforcement learning

R Rui Xue B Bin Li W Wenyue He Y Yihang Wang (Department of Chemistry, Chicago Center for Theoretical Chemistry, Institute for Biophysical Dynamics, and James Franck Institute, The University of Chicago)

Abstract

The proliferation of distributed energy resources (DERs) and the ubiquity of Internet of Things (IoT) devices are driving the integration of mobile edge computing (MEC) into smart grids. This convergence enables real-time data processing for prosumers but introduces a complex cyber-physical coupling: computational offloading decisions directly impact local energy consumption, thereby altering the prosumer’s status in the peer-to-peer (P2P) energy market. Conversely, dynamic market prices influence the economic viability of offloading. This paper addresses the joint optimization of computational task offloading and P2P energy trading in an edge-assisted smart grid ecosystem. We formulate the problem as a mixed-integer nonlinear programming (MINLP) model aimed at maximizing long-term system utility, balancing throughput, latency, and economic incentives under strict edge server capacity and community energy neutrality constraints. To tackle the curse of dimensionality and system stochasticity, we propose a hybrid framework combining Deep Q-Networks (DQN) with a constraint-aware heuristic mechanism. The DQN agent learns adaptive offloading policies from high-dimensional states, while a deterministic rule-based layer ensures strict adherence to community energy balance. Simulation results based on real-world solar generation and market data demonstrate that our proposed method outperforms baseline strategies—including local-only execution and greedy heuristics—improving average utility by 12.3% and reducing task delay by 16.5%, while maintaining robust operational feasibility.

Article Details

Journal PLoS ONE
Volume / Issue Vol. 21, Issue 6
Published June 12, 2026
Pages e0342888
ISSN 1932-6203
Publisher Public Library of Science

Journal Info

PLoS ONE

Public Library of Science

ISSN: 1932-6203 Open Access Health Sciences

Authors (4)

R

Rui Xue

B

Bin Li

W

Wenyue He

Y

Yihang Wang

Department of Chemistry, Chicago Center for Theoretical Chemistry, Institute for Biophysical Dynamics, and James Franck Institute, The University of Chicago