## 3 Hybrid Game Theory-Based Optimization for the Energy Trading Strategy of VPP
### Master-Slave Game Model Between SES and VPP
#### 3.1.2 Game Follower, VPP  
(1) Objective function  
VPP operators aim to maximize their own benefits, which are determined by the following factors: the revenue of buying and selling electricity from SES, revenue from selling heat with PVP alliances, gas costs, total operating costs of the combined heat and power system (CHP), curtailment penalty costs, carbon trading costs, and demand response costs. \[\max F_{VPP}=I^{opp1}+I^{opp2}+I^{opp3}-\left(C^{gas}+C^{CHP}+C^{cur}+C^{CO_{2} }+C^{DR}\right), \tag{8}\]where \(F_{VPP}\) is the comprehensive benefit of VPP; \(I^{VPP1}\) is the income from the purchase and sale of electricity between VPP and SES, \(I^{PP2}\) is the income from the purchase and sale of electricity between VPP and PVP alliance, \(I^{PP3}\) is the income from the purchase and sale of electricity between VPP and the outer power grid; \(C^{gs}\), \(C^{CHP}\), \(C^{cur}\), \(C^{CO2}\) and \(C^{DR}\) are, respectively, the gas consumption cost, the total operating cost of CHP, the penalty cost of wind and light abandonment, the carbon trading cost, and the demand response cost. Detailed calculation of these costs is shown in Equations (A12)-(A27) in Appendix A. (2) Constraint conditions  
(1) Consider uncertainty VPP electrical power balance constraints  
\[ \begin{array}{l}P_{t}^{CHP}+P_{t}^{PPp,buy}+P_{t}^{new}+P_{t,vpp}^{grid,buy}= P_{t}^{P2G}+P_{t}^{CCS}+\\ P_{t}^{PPp,sel}+P_{t}^{B}+P_{t,vpp}^{grid,sel}+P_{t}^{vppload}-P_{t}^{p,cut}+P_ {t}^{v,trans}\end{array} , \tag{9}\]  
where \(P_{t}^{v,cut}\), \(P_{t}^{v,trans}\) are respectively reduceable and transferable electrical loads. (2) Thermal power balance constraints  
\[H_{t}^{CHP}+H_{t}^{GB}=H_{t}^{B}+H_{t}^{pppload}-H_{t}^{v,cut} \tag{10}\]  
where \(H_{t}^{v,cut}\) represents the reduceable heat load. In Equation (9), the electric power balance includes the output power of the renewable energy in VPP and the interactive power between VPP and the outer power grid. Since the uncertainty of large-scale renewable energy has a significant impact on the optimal operation of VPP, the uncertainty of renewable energy output of VPP is constructed by  
\[\left\{ \begin{array}{l}P_{t}^{new}+P_{t}^{cur}=P_{t}^{new,fore}\\ P_{t}^{new}\sim W_{t}^{new}+N(0,\sigma_{t,new}^{2})\end{array} ,\right. \tag{11}\]  
where \(P_{t}^{new}\) is the real generation power of renewable energy; \(P_{t}^{cur}\) is the curtailment of renewable energy; \(P_{t}^{new,fore}\) is the predicted power generation of the renewable energy. Referring to the current typical equivalent method, the prediction output error \(\sigma_{t,new}\) of the renewable energy obeys a normal distribution with a variance of \(\sigma_{t,new}^{2}\) and average value \(W_{t}^{new}\). Hence, Equation (9) is converted into an electric power balance constraint under the uncertainties in the form of a chance constraint:  
\[ \begin{array}{l}\Pr\Big{\{}P_{t}^{CHP}+P_{t}^{ppp,buy}+P_{t}^{new}-P_{t}^{ P2G}-P_{t}^{CCS}-\\ P_{t}^{ppp,sel}-P_{t}^{B}-P_{t}^{ppp,load}+P_{t}^{cut}-P_{t}^{trans}\geq 0 \Big{\}}\geq\eta\end{array} , \tag{12}\]  
where \(\eta\) is the confidence probability level. According to probability theory, Equation (9) can be further converted into the following deterministic form  
\[ \begin{array}{l}P_{t}^{CHP}+P_{t}^{ppp,buy}+P_{t}^{new}-P_{t}^{P2G}-P_{t}^{ CCS}-P_{t}^{ppp,sel}-\\ P_{t}^{B}-P_{t}^{ppp,load}+P_{t}^{cut}-P_{t}^{trans}\geq\xi^{-1}(\eta)\sqrt{ \sigma_{t,new}^{2}}\end{array} , \tag{13}\]  
where \(\xi^{-1}(\eta)\) is the inverse function of the standard normal distribution of the renewable energy output. The power interacting between the VPP and the outer power grid is limited by the grid cross section constraints as follows:  
\[0\leq P_{t,vpp}^{grid,ell}\leq P_{vpp,\max}^{grid,sel} \tag{14}\]\[0\leq P_{t,opp}^{grid,buy}\leq P_{\text{\tiny PPP,max}}^{grid,buy} \tag{15}\]  
where \(P_{\text{\tiny PPP,max}}^{grid,sell}\) and \(P_{\text{\tiny PPP,max}}^{grid,buy}\) represent the maximum power of the sale and the purchase power from VPP to the outer grid at moment \(t\), respectively.