Abstract:To address the challenges of insufficient utilization of flexible resources, the difficulty of coordinating carbon reduction with economic operation objectives, and the heavy reliance on predictive models in conventional optimization methods under high-penetration distributed renewable energy in microgrids, this paper proposes a source-load collaborative optimal dispatch model integrating stepped carbon trading and demand response, solved using an enhanced deep reinforcement learning algorithm. First, a source-load collaborative dispatch framework is constructed by incorporating stepped carbon trading and price-based demand response, wherein carbon trading costs are converted into real-time price signals to guide user electricity consumption, achieving dynamic coupling between carbon constraints and demand-side response. Subsequently, a proximal policy optimization (PPO) algorithm improved with a self-attention mechanism is applied to solve the model in real time. Finally, multi-mechanism and multi-algorithm simulations are conducted based on field-measured data from a microgrid in a remote area of Western China. Results demonstrate that the proposed model and methodology effectively enhance microgrid operational flexibility, economic and low-carbon performance, and resilience against dynamic disturbances.