# Day-Ahead Dispatch Model of Electro-Thermal Integrated Energy System with Power to Gas Function
## 3 Electro-Thermal Integrated Energy System with \"P2G Function\"
### Day-Ahead Dispatch Model of the Integrated System  
In order to verify the economic benefits of the interconnected system, we propose the day-ahead dispatch model of the system which is mentioned above. The parameters and functions involved in the model are shown in Table 1.  
1. Objective Function  
Starting from the perspective of energy conservation, the objective of the day-ahead dispatch model is to make the integrated system have minimum standard coal consumption.  
\[\min\sum_{t=1}^{T}[\sum C_{i,t}^{\text{UU}}\left(p_{i,t}^{\text{TU}}\right)+ \sum C_{i,t}^{\text{CHP}}\left(p_{i,t}^{\text{CHP}},h_{i,t}^{\text{CHP}}\right) +\sum C_{i,t}^{\text{GB}}\left(h_{i,t}^{\text{gas}}\right)] \tag{6}\]  
where \(t\) is time index (1 h resolution), \(T\) is the time horizon (24 h). Equations (7)-(9) give specific definitions respectively.  
\[C_{i,t}^{\text{TU}}\left(p_{i,t}^{\text{TU}}\right)=\lambda^{\text{TU}}\cdot p _{i,t}^{\text{TU}} \tag{7}\]  
\[C_{i,t}^{\text{CHP}}\left(p_{i,t}^{\text{CHP}},h_{i,t}^{\text{CHP}}\right)= \lambda_{p}^{\text{CHP}}\cdot p_{i,t}^{\text{CHP}}+\lambda_{h}^{\text{CHP}} \cdot h_{i,t}^{\text{CHP}} \tag{8}\]  
Figure 2: The architecture diagram of combined power-heat system with power to gas (P2G) function.  
\[C_{i,t}^{\text{GB}}\left(h_{i,t}^{\text{gas}}\right)=\lambda^{\text{GB}}\cdot h_{i,t}^{\text{gas}} \tag{9}\]
2. Constraint First of all, for an urban distribution network with \(I\) nodes, the optimization period is \(T\). Equation (10) defines the active power flow balance. \[\sum p_{i,t}^{\text{TU}}+\sum p_{i,t}^{\text{CHP}}+\sum p_{i,t}^{\text{WT,gc} }=\sum p_{i,t}^{\text{load}}\] (10) The power output of a wind farm is limited by its available wind power: \[0\leq p_{i,t}^{\text{WT,gc}}\leq p_{i,t}^{\text{WT,max}}\] (11)  
If the volume fraction of hydrogen is 20%, the ratio of hydrogen to natural gas should be satisfied with the inequality (12). Equation (13) defines the quantity of the hydrogen production made by the electrolyzers which is driven by the abandoned wind power.  
\[\frac{F_{i,t}^{\text{H}_{2}}\cdot\rho^{\text{gas}}}{F_{i,t}^{\text{gas}}\cdot \rho^{\text{H}_{2}}}\leq 20\% \tag{12}\]  
\[F_{i,t}^{\text{H}_{2}}\cdot t=\left(p_{i,t}^{\text{WT,true}}-p_{i,t}^{\text{ WT,gc}}\right)\cdot\eta_{F}\cdot g^{\text{H}_{2}} \tag{13}\]  
Actually \((p_{i,t}^{\text{WT,true}}-p_{i,t}^{\text{WT,gc}})\) is abandoned wind power, and it is also the share of the total power production used for H\({}_{2}\) production at period \(t\). The gas boilers are using HCNG to produce heat. Equations (14) and (15) define the thermal power output of the natural gas part and the hydrogen part respectively. And Equation (16) sets the thermal generation limits.  
\[h_{i,t}^{\text{gas}}=F_{i,t}^{\text{gas}}\cdot\eta^{\text{GB}} \tag{14}\]  
\[h_{i,t}^{\text{H}_{2}}=F_{i,t}^{\text{H}_{2}}\cdot\eta^{\text{GB}} \tag{15}\]  
\[h_{i}^{\text{GB,min}}\leq h_{i,t}^{\text{gas}}+h_{i,t}^{\text{H}_{2}}\leq h_{ i}^{\text{GB,max}} \tag{16}\]  
The amount of electricity delivered by the CHPs can be adjusted within operating limits. Equation (17) defines the electrical power output. Equation (18) defines the thermal power output.  
\[p_{i,t}^{\text{CHP}}=\frac{h_{i,t}^{\text{EX}}\cdot\eta_{e}^{\text{CHP}}}{ \left(1-\eta_{e}^{\text{CHP}}-\eta_{\text{L}}\right)} \tag{17}\]  
\[h_{i,t}^{\text{CHP}}=h_{i,t}^{\text{EX}}\cdot\eta_{\text{th}}^{\text{CHP}} \cdot{}_{\text{COPh}} \tag{18}\]  
Equation (19) sets the electrical generating limits. The incremental change in the generation of a CHP within a single period is restricted by its ramping capability as shown in Equation (20).  
\[p_{i}^{\text{CHP,min}}\leq p_{i,t}^{\text{CHP}}\leq p_{i}^{\text{CHP,max}} \tag{19}\]  
\[-R\Delta t\leq p_{i,t}^{\text{CHP}}-p_{i,t-1}^{\text{CHP}}\leq R\Delta t \tag{20}\]  
The district heating network needs to meet the balance of supply and demand of heat. Generation is allowed to be greater than demand to give more flexibility to the problem.  
\[\sum h_{i,t}^{\text{load}}=\sum\left(h_{i,t}^{\text{CHP}}+h_{i,t}^{\text{GB}}\right) \tag{21}\]