In recent years, with the development of the electricity market, electricity users have also been able to participate in electricity trading. The energy storage capacity configuration of microgrids with renewable energy considering demand response is of great significance for reducing microgrid costs, improving renewable energy consumption levels, and enhancing microgrid performance. This study first establishes a microgrid model considering demand response. Constraints and economic models of the microgrid are then provided to obtain the cost of the microgrid. To identify the energy storage capacity and the energy scheduling strategy that minimizes the operation cost of the microgrid, this study proposes a two-layer optimization model. The inner layer uses solvers to optimize the transferable loads, interruptible loads, and the energy storage power under the demand response mechanism to minimize the short-term cost. The outer layer uses the particle swarm optimization (PSO) algorithm to optimize the energy storage capacity and minimize the long-term cost. A case analysis shows that the demand response mechanism and reasonable energy storage configuration have a significant effect on reducing the operation cost of the microgrid. In addition, energy storage can reduce power fluctuations in connecting lines and improve the stability of the microgrid.
Accurate load forecasting for community-level heating, ventilation, and air conditioning (HVAC) plays an important role in determining an efficient strategy for demand response (DR) and the operation of the power grid. However, community-level HVAC includes various building-level HVACs, whose usage patterns and standard parameters vary, causing the challenge of load forecasting. To this end, a novel deep learning model, multiscale and cross-variable transformer (MSCVFormer), is proposed to achieve accurate community-level HVAC probabilistic load forecasting by capturing the various influences of multivariables on the load pattern, providing effective information for the grid operators to develop DR and operation strategies. This approach is combined with the multiscale attention (MSA) and cross-variable attention (CVA) mechanism, capturing the complex temporal patterns of the aggregated load. Specifically, by embedding the time series decomposition into the self-attention mechanism, MSA enables the model to capture the critical features of time series while considering the correlation between multiscale time series. Then, CVA calculates the correlations between the exogenous variable and aggregated load, explicitly utilizing the exogenous variables to enhance the model’s understanding of the temporal pattern. This differs from the usual methods, which do not fully consider the relationship between the exogenous variable and aggregated load. To test the effectiveness of the proposed method, two datasets from Germany and China are used to conduct the experiment. Compared to the benchmarks, the proposed method achieves outperforming probabilistic load forecasting results, where the prediction interval coverage probability (PICP) deviation with the nominal coverage and prediction interval normalized averaged width (PINAW) are reduced by 46.7% and 5.25%, respectively.