## 3 Mathematical Model for the Proposed Framework
### Mathematical Model for the Upper Layer  
1. VPP aggregator model The scheduling of the VPP throughout the day is divided into \(T\) slots, where the VPP aggregator receives grid load peaking commands, and the price of electricity sold to household users is subject to constraints: \[\lambda_{GR,t}^{buy}<\lambda_{AG,t}^{sell}<\lambda_{GR,t}^{sell}\] (1) where \(\lambda_{GR,t}^{buy}\) and \(\lambda_{GR,t}^{sell}\) are the price of electricity purchased and sold from the grid at time \(t\), respectively; \(\lambda_{AG,t}^{sell}\) is the price of electricity sold by the VPP aggregator at the time slot \(t\) in a day. The VPP aggregator is equipped with CHP and PV, and CHP consumes natural gas to generate electricity, modeling the operating cost of its unit as follows: \[E_{CHP,t}=\frac{g_{na}}{Q_{na}\eta_{CHP}}P_{CHP,t}\] (2) where \(P_{CHP,t}\) is the electrical power output from CHP at time \(t\) in a day; \(g_{na}\) and \(Q_{na}\) are the unit price and calorific value of natural gas, respectively; \(\eta_{CHP}\) is the generation efficiency of CHP. The profit of the VPP aggregator in a day can be expressed as follows: \[E_{Ag}=E_{Ag}^{s}+E_{Gr}^{DR}-E_{EST}^{DR}-E_{Hh}^{DR}-E_{CHP}\] (3) where \(E_{Ag}^{s}\) is the benefit received by the VPP aggregator from the sale of electricity to the household users; \(E_{Gr}^{DR}\) is the DR subsidy from the grid to the VPP aggregator; \(E_{EST}^{DR}\) is the DR subsidy paid by the VPP aggregator to the EST; \(E_{Hh}^{DR}\) is the DR subsidy paid by the VPP aggregator to household users; \(E_{CHP}\) is the operating cost of CHP. The calculations of the DR subsidy can be found in Equations (11) and (12). (2) EST model The EST is internally configured with PVs and WPs to provide electric energy supplemental services primarily to household users and can be considered for participation in DR missions. For a user collection containing \(n\) household users, the capacity of EST at time slot \(t+1\) in a day can be expressed as follows: \[C_{EST}^{t+1}=C_{EST}^{t}+(\eta_{EST}^{c}P_{EST,t}^{c}-\frac{P_{EST,t}^{d}}{ \eta_{EST}^{d}})\Delta t\] (4) where \(C_{EST}^{t}\) is the energy storage capacity of the EST at time slot \(t\). \(P_{EST,t}^{c}\), \(P_{EST,t}^{d}\) are the charging and discharging power of EST at time slot \(t\); \(\eta_{EST}^{c}\), \(\eta_{EST}^{d}\) are the transfer efficiencies during EST charging and discharging processes. To guarantee that the EST can continue to provide service, the total power used by all customers at any one time is restricted to not exceed the capacity of the EST: \[P_{EST}^{\text{min}}\leq P_{EST}^{t}\leq P_{EST}^{\text{max}}\] (5) where \(P_{EST}^{\text{max}}\) and \(P_{EST}^{\text{min}}\) are the maximum and minimum values allowed for EST capacity. Consider that the user's charging and discharging power is limited by EST in any given time slot: \[\left|\frac{P_{EST}^{t+1}-P_{EST}^{t}}{\Delta t}\right|\leq P_{EST,t}^{d}\] (6)The benefits of the EST consist of both DR incentives and customer payments for electricity consumption, as well as the cost of charging and discharging. Therefore, the benefit function of EST in a day is as follows:  
\[E_{EST}=E_{EST}^{DR}+\sum_{t=1}^{T}\left(\lambda_{ESS,t}P_{EST,t}^{d}\Delta t- \lambda_{c}P_{EST,t}^{c}\Delta t-\lambda_{d}P_{EST,t}^{d}\Delta t\right) \tag{7}\]  
where \(\lambda_{ESS,t}\), is the fee that the users need to pay per unit of discharge power; \(\lambda_{c}\) and \(\lambda_{d}\) are fees that the EST unit charges and discharging cost coefficients, respectively. (3) Household collection model  
Electric loads of household users are categorized into three types: fixed loads, curtailable loads, and shiftable loads. Fixed loads are inherently inflexible and can only consume power at fixed times, curtailable loads receive a certain degree of load curtailment, and shiftable loads can transfer part of their loads to other times.