Abstract:Distributed smart grids enable local consumption of new energy sources while allowing their internal flexible resources to participate in electricity market transactions. However, the transaction mechanisms for distributed smart grid participation in the market remain unclear. To address this issue, an optimization method for peak shaving transactions in distributed smart grids that incorporates flexibility assessment is proposed. First, an optimization model for peak shaving transactions in distributed smart grids is established, considering flexibility evaluation. The model aims to maximize the revenue from peak shaving services for the operating entity, user satisfaction benefits, and the peak shaving effectiveness benefits for the upper-level main grid, while constraining the flexibility supply of the distributed smart grid. This simulates the participation of distributed smart grids in peak shaving services. Next, a flexibility assessment model for distributed smart grids considering ancillary service peak shaving revenues is developed. This model aims to minimize operational costs while accounting for market revenues, constrained by flexibility load operation models. It simulates internal grid operations to calculate external flexibility supply, feeding this result into the market transaction optimization model. Finally, the methodology is validated using the IEEE 33-node system. Results demonstrate that after the distributed smart grid participates in peak shaving for ancillary services, the external grid's peak-to-valley difference rate decreases from 53.3% to 36.6%, and the peak-to-valley difference reduces from 0.99 MW to 0.68 MW, effectively suppressing load fluctuations.