Abstract:Stackelberg game model is employed to optimize the demand response of the building microgrid in the power market. According to different types of demand response, a Stackelberg game-based optimization mechanism for carbon trading is designed for different building microgrids. Considering the actual carbon emissions of building microgrids with a high penetration of renewable energy under carbon emission constraints, a low-carbon optimal operation model for the building microgrid is established, aiming to minimize electricity costs and environmental carbon emissions. Experiments are conducted for different demand response scenarios, and analysis and verification were performed. The results show that maximizing the proportion of renewable energy through demand response can effectively improve the overall economic performance of the building and achieve a synergistic low-carbon economic effect. The proposed Stackelberg game model can maximize the benefits of agents and microgrid users in the carbon trading market, effectively enhance the accuracy of electricity consumption decisions for building users and the economic benefits for operators, and plays a vital role in building active distribution networks and a dual-carbon system. It is of great significance for developing a robust energy grid.