## 3 Problem Formulation  
### Objective Function  
The objective of this study is to optimize the size of ESS while satisfying constraints of train operation, with the aim of minimizing both the investment and operational costs of the high-speed rail power system and reducing carbon emissions. Specifically, the optimization problem involves 610 control variables, including 608 grid power output values at 10 min intervals, the installed capacity of the ESS (\(Eb\)), and the rated power of the ESS (\(Pb\)). The optimization simultaneously minimizes total system cost (f1) and carbon emissions (f2) through a Pareto-based framework, where both objective functions jointly constrain the solution space during the iterative evaluation of ESS configurations and grid-power dispatch sequences. The objective functions are defined as shown in Equations (20) and (21).  
\[\min_{-}f_{1}=Cost_{Grid}+Cost_{PV}\times CRF_{PV}+Cost_{ESS}\times CRF_{ESS} \tag{20}\]  
\[\min_{-}f_{2}=Cost_{\text{Carbon}}+Cost_{\text{CarbonT}}+Cost_{\text{CarbonI}} \tag{21}\]  
Specifically, the total cost is composed of the electricity charges from the grid as well as the installation and replacement costs of the PV and the ESS, designated to be converted into net present value. These costs are defined by the Equations (22)-(24).  
\[\text{Cost}_{\text{Grid}}=\text{Price}_{\text{Grid}}\times\text{E}_{\text{Grid }}+57,400 \tag{22}\]  
\[\text{Cost}_{\text{PV}}=\Big{(}C_{\text{Capital}}^{\text{PV}}+C_{\text{Replacement }}^{\text{PV}}\Big{)}P_{\text{PV}} \tag{23}\]  
\[\text{Cost}_{\text{ESS}}=\Big{(}C_{\text{Capital}}^{\text{ESS}}+C_{\text{Replacement }}^{\text{ESS}}\Big{)}E_{\text{ESS}} \tag{24}\]  
where \(Price_{\text{Grid}}\) represents the electricity price (USD/kWh), which varies by region and is also divided into peak (08:30-11:30, 18:00-23:00), off-peak (07:00-08:30, 11:30-18:00), and valley (23:00-07:00) electricity prices throughout the day. \(E_{\text{Grid}}\) represents the total energy consumed by the high-speed train from the grid during its entire operation. The term 57,400 represents the basic electricity fee, which is calculated using the reading of the demand meter (10,400 kW) multiplied by the basic electricity price (USD 5.52/kW). The terms \(C_{\text{Capital}}^{\text{PV}}\), \(C_{\text{Replacement}}^{\text{PV}}\), \(C_{\text{Capital}}^{\text{ESS}}\), and \(C_{\text{Replacement}}^{\text{ESS}}\) represent the installation and replacement costs for the PV and ESS, respectively; \(P_{\text{PV}}\) indicates the power capacity of the PV; \(E_{\text{ESS}}\) denotes the capacity of the ESS. In this study, the installed capacity of PV system is fixed at 1300 kW, with its investment cost treated as a constant parameter in the model. Despite being preset parameters rather than optimization variables, these parameters are included in the objective function for comprehensive evaluation, ensuring a full representation of the economic performance of system throughout its entire LCA.  
This study employs the Capital Recovery Factor (CRF) to uniformly convert initial investments and future replacement costs into annualized capital costs, as defined in Equation (25). The CRF is a standard method in power economic analysis, which converts capital costs into equivalent annualized values, enabling rational allocation of equipment replacement expenses across project lifecycles with time-value considerations.  
\[CRF=\frac{r(1+r)^{y}}{(1+r)^{y}-1} \tag{25}\]  
where \(r\) represents the interest rate, taken as 4.9% in the work, and \(y\) represents the lifespan of PV equipment or the ESS, \(y\) of PV is 20, and \(y\) of ESS is 5. Upon calculation, \(CRF\) of PV is 0.0784 and \(CRF\) of ESS is 0.2326.  
Sensitivity analyses examining \(\pm\)15% carbon price variations (NREL 2020-2023), \(\pm\)20% REC price fluctuations (China Green Certificate Platform), and \(\pm\)10% PV cost deviations confirmed less than 5% LCOE variability, demonstrating robust optimal configurations under economic uncertainty.