## 3 Multi-Agent Stage Feedback Carbon Trading Mode
### Calculation of Actual Carbon Emissions  
Because of the differences in the type, conversion efficiency, and fuel quality of different types of energy equipment, there will be deviations between the measured data and the theoretical data. In order to weaken this effect, the carbon emission intensity of energy equipment is modeled. The proposed carbon trading model calculates the carbon emissions according to different energy consumption patterns. The actual carbon emissions of the CIES include the CFU \(E_{\text{e}}^{\text{r}}\), CCHP system \(E_{\text{cchp}}^{\text{r}}\), carbon emissions of P2G \(E_{\text{P2g}}^{\text{r}}\), and PCU \(E_{\text{pcu}}^{\text{r}}\).  
\[\left\{\begin{array}{l}E_{\text{e}}^{\text{r}}=\sum\limits_{t}^{T}\mu_{\text{ e,r}}P_{\text{e,g}}^{\text{t}}\\ E_{\text{cchp}}^{\text{r}}=\sum\limits_{t}^{T}\mu_{\text{g,r}}(\varepsilon_{ \text{g,gb}}H_{\text{gb}}^{\text{t}}+\varepsilon_{\text{e,cchp}}P_{\text{e, cchp}}^{\text{t}}+\varepsilon_{\text{g,cchp}}H_{\text{g,cchp}}^{\text{t}})\\ E_{\text{p2g}}^{\text{r}}=\sum\limits_{t}^{T}\mu_{\text{p2g}}P_{\text{p2g}}^{ \text{t}}\\ E_{\text{pcu}}^{\text{r}}=\sum\limits_{t}^{T}\mu_{\text{pcu}}\eta_{\text{pcu}}P_ {\text{e,g}}^{\text{t}}\end{array}\right. \tag{3}\]  
where \(P_{\text{e,g}}^{\text{t}}\), \(P_{\text{e,cchp}}^{\text{t}}\), and \(P_{\text{p2g}}^{\text{t}}\) represent the output power values of the CFU, CCHP systems, and P2G equipment at time \(t\), respectively. \(H_{\text{gb}}^{\text{t}}\) and \(H_{\text{g,cchp}}^{\text{t}}\) represent the output thermalpower value of the GB and CCHP system at time \(t\), respectively. \(\varepsilon_{\text{g,gb}}\) represents the gas/heat conversion coefficient of the GB and \(\varepsilon_{\text{e,cchp}}\) and \(\varepsilon_{\text{g,cchp}}\) represent the gas/power and gas/heat conversion coefficients of the CCHP system, respectively. \(\eta_{\text{pcu}}\) represents the carbon capture rate of the PCU. \(\mu_{\text{e},r}\), \(\mu_{\text{g,r}}\), \(\mu_{\text{p2g}}\), and \(\mu_{\text{pcu}}\) represent the actual carbon emission coefficients of the CFU, CCHP systems, P2G equipment, and PCU devices, respectively, which can be expressed by the following formula:  
\[\left\{\begin{array}{l}\mu_{\text{ue}}=K_{\text{ue}}L_{\text{ue}}\\ \mu_{\text{ug}}=(1+\alpha_{\text{he}})L_{\text{cchp}}+L_{\text{gb}}\end{array}\right. \tag{4}\]  
\[\begin{cases}\mu_{\text{e}}=\mu_{\text{ue}}+\mu_{\text{ce}}\\ \mu_{\text{g}}=\mu_{\text{ug}}+\mu_{\text{cg}}\end{cases} \tag{5}\]  
In the energy cycle process, \(\mu_{\text{ue}}\) represents the carbon emission intensity of the power generation of the CFU, \(K_{\text{ue}}\) represents the unit coal consumption value of generators, \(L_{\text{ue}}\) represents the carbon emission intensity of greenhouse gases of the CFU, \(\mu_{\text{ug}}\) represents the carbon emission intensity per unit of power generation of the gas-fired units, \(L_{\text{cchp}}\) represents the carbon emission intensity per unit of power generation of the GT and GB, \(L_{\text{gb}}\) represents the carbon emission intensity per unit of heat production of the GB, and \(\alpha_{\text{he}}\) represents the conversion coefficient value between heat energy and power energy. During the power plant cycle, \(\mu_{\text{ce}}\) and \(\mu_{\text{cg}}\) represent the carbon emission coefficient per unit power generation of the CFU and gas-fired units, respectively. \(\mu_{\text{e}}\) and \(\mu_{\text{g}}\) represent the total carbon emission coefficient of the unit power generation of the CFU and gas-fired units, respectively.  
Using Formulas (3)-(6), the actual carbon emission \(E_{\text{co}_{2}}\) of IES can be obtained as:  
\[E_{\text{co}_{2}}=E_{\text{e}}^{\text{r}}+E_{\text{g}}^{\text{r}}+E_{\text{p2g }}^{\text{r}}-E_{\text{pcu}}^{\text{r}} \tag{6}\]