*3.1. Day-Ahead Bidding Optimization Problem*

Load aggregators taking part in DR usually have different optimization targets, such as energy cost or load factor [30]. In the proposed scenario, the main purpose of residential community participating in DR is to obtain extra economic profit. Considering energy consumption scheduling affects residents' satisfaction, the dispatching center will give corresponding economic compensation to communities in group *N*. Based on the bidding price Equation (5), economic compensation of community *n* in all time slots *T* can be calculated as:

$$\epsilon\_n^h = \sum\_{t=1}^T \nu\_h^t L\_n^{h,t} = \sum\_{t=1}^T \left( a\_h^t L\_h^t + b\_h^t \right) L\_n^{h,t} \tag{8}$$

Since a community's utility will be reduced in DR participation, each community will take the maximization of the comprehensive income as the target to compete with other communities in the bidding market. That is:

$$\begin{array}{l}\text{maximize} \boldsymbol{\nu}\_{n}^{h} \left(\boldsymbol{L}\_{n}^{h,t}\right) - \boldsymbol{\nu}\_{n}^{h} \left(\boldsymbol{L}\_{n}^{h,t}\right) \\ \text{s.t. } \boldsymbol{L}\_{n}^{h,\text{min}} \leq \boldsymbol{L}\_{n}^{h,t} \leq \boldsymbol{L}\_{n}^{h,\text{max}} \end{array} \tag{9}$$

Each community will obtain the optimal bidding strategy in each time slot *t* ∈ *T* by solving the optimization Equation (9).
