## Inner Layer Modeling and Optimization
### Modeling of Energy Hub
The types of electricity storage mainly include battery storage, flywheel storage, pumped storage, super capacitors, and compressed air energy storage. In this paper, only the battery model is given. The heat storage and gas storage models are similar to each other [3; 4; 7] and not discussed in detail. The battery storage model is represented by:  
\[\left\{ \begin{array}{ll}W_{bat}(t+1)=W_{bat}(t)(1-\sigma_{bat})+(P_{bat}^{cha}(t )\eta_{bat}^{chu}-P_{bat}^{dis}(t)/\eta_{bat}^{dis})\Delta t\\ W_{bat}(t)=W_{bat}(t+T)\\ 0=P_{bat}^{cha}(t)P_{bat}^{dis}(t)\end{array} \right. \tag{3}\]  
where \(P_{bat}^{cha}(t)\) and \(P_{bat}^{dis}(t)\) represent the charging and discharging power of the battery energy storage at time \(t\), respectively; \(\eta_{bat}^{cha}\) and \(\eta_{bat}^{dis}\) are charging and discharging efficiencies of battery, respectively; \(W_{bat}(t)\) stands for battery storage energy level at time \(t\); \(\sigma_{bat}\) presents the self-discharge lose rate of the battery energy storages; \(\Delta t\) is the simulation step, and the value in this paper is 1 h; \(T\) denotes optimal operation period. The coupling relationship between the output power and the external heating power of _CHP_ unit is called the \"heat-to-power characteristic\" of the _CHP_ unit [14; 24; 25]. The relationship between the power output \(P_{CHP}^{cn}\) and the heat output \(H_{CHP}^{cn}\) of \(c_{m}\) (a constant heat-to-power ratio) is shown in Equation (4). The alterable heat-to-power ratio, \(c_{z}\), is considered as a variable and can be expressed by Equation (5) under a certain operating mode [5; 22; 25; 26; 27]:  
\[c_{m}=H_{CHP}^{cn}/P_{CHP}^{cn} \tag{4}\]  
Figure 2: Example of energy hub (EH) in an integrated energy system (IES). \[c_{z}=H_{CHP}^{c_{z}}/(\eta_{e}F_{in}-P_{CHP}^{c_{z}}) \tag{5}\]  
where \(\eta_{e}\) is the power efficiency of the extraction unit in a full condensing mode; and \(F_{in}\) is the fuel input rate that is taken as a constant. In addition, \(P2G\) technology provides a new idea for absorbing the renewable and peak-cutting and valley filling of the power grid, realizing the bidirectional flow of energy between the grid and the natural gas network [15; 16; 28; 29]. \(P2G\) input is the power \(P_{P2G}\) and output is the gas flow \(f_{P2G}\), their relationship can be expressed as:  
\[f_{P2G}=\frac{P_{P2G}\eta_{P2G}}{S_{HHV}} \tag{6}\]  
where \(\eta_{P2G}\) represents conversion efficiency of \(P2G\); and \(S_{HHV}\) denotes the high calorific value of synthetic natural gas. Similarly, \(P2H\) technology can transform the PV output that is difficult to be consumed by the power grid into thermal energy for the heat network, which provides a new opportunity for the absorption of distributed renewable PV power and also the coordinates operation of the power-heat interconnection of the IES [6; 24; 30]. \(P2H\) refers to a ground source heat pump in this paper. The relationship between the electric power \(P_{P2H}\) consumed by \(P2H\) and the corresponding thermal output \(H_{P2H}\) can be expressed as:  
\[\left\{ \begin{array}{c}H_{P2H}=P_{P2H}\eta_{P2H}\\ \eta_{P2H}=\phi(H_{P2H})\end{array} \right. \tag{7}\]  
where \(\eta_{P2H}\) represents electrothermal conversion efficiency of \(P2H\); the functional relationship between \(\eta_{P2H}\) and \(H_{P2H}\) can be described in terms of \(\phi(\cdot)\). The other mathematical models of the heat recovery device, heat exchanger, and furnace/boiler unit are similar to \(P2H\), which are omitted here due to the limited length of the paper.