## 2 The TPUMSTSR Under RLV Model
### CA Model Establishment  
Since the primary purpose of PR is to mitigate power fluctuations from wind and PV units within CSs and to incentivize conventional thermal power units to undergo flexibility retrofitting, this chapter establishes a CA calculation method with CSs as the primary stakeholders. The PR revenue obtained by thermal power units is shared by IPPs connected to the same main grid, renewable energy units within the CS, and thermal power units not participating in PR [37]. This approach ensures a fairer and more precisely quantifiable distribution of overall benefits. The CAs are calculated based on three factors: the total PR compensation revenue of MCSs, the adjusted output of units not participating in PR, and the total adjusted output of all units not participating in PR. These factors are highly nonlinear and involve numerous integer variables, as they are associated with the decision variable \"output of individual units\". This significantly increases the complexity of the solution, making it difficult to solve directly using a distributed architecture. On the other hand, since CS operators and grid dispatch departments belong to different stakeholders, the dispatch department needs detailed models and data from each power source within different operators to schedule each power station in the grid. Traditional centralized optimization methods involve sensitive information such as installed capacity, technical characteristics, and operational status, which may lead to privacy concerns. Figure 3: Scheduling method for main grid with MCSs and multi-IPPs. To address these issues, this chapter decouples the large-scale mixed-integer nonlinear coordinated operation model of MCSs into two sub-models: the optimal power flow model of the main grid and the internal operation model of MCSs. The solution is divided into three stages, as illustrated in Figure 4.  
In Stage One (Main Grid Optimal Power Flow Model), the inputs include the active/reactive power requirements \(P^{\mathrm{LD}}_{j,t+1}\) and \(Q^{\mathrm{LD}}_{j,t+1}\) on the load side for the next time period, as well as the feasible power regions \(P^{\mathrm{up}}_{g,t+1}\), \(P^{\mathrm{down}}_{g,t+1}\), \(Q^{\mathrm{up}}_{g,t+1}\), and \(Q^{\mathrm{dw}}_{g,t+1}\) of the CSs and IPPs for the next time period. The output of Stage One comprises the active/reactive power that the CSs and IPPs must provide at the next time period, which is then used as input for the internal operation model of the MCS in Stages Two and Three. By establishing the mathematical expression for CA, it is observed that the CA for thermal power and renewable energy units not participating in PR is a highly nonlinear objective function. Taking the CA for thermal power as an example, the CA for units \(f^{\mathrm{TP,S}}_{i,u,t}\) not participating in PR is calculated as follows [3]:  
\[f^{\mathrm{US}}_{i,u,t}=C^{\mathrm{TN,D}}_{t}\frac{P^{\mathrm{TPU,C}}_{i,u,t}} {\sum\limits_{g\in G}P^{\mathrm{C}}_{g,t}} \tag{3}\]  
where \(g\) represents the index of power sources in the main grid; \(G\) represents the set of IPPs and MCSs in the main grid; \(u\) represents the index of thermal power units within a single CS; \(U\) represents the set of thermal power units within a single CS; \(i\) represents the index of CSs; \(I\) represents the set of CSs; \(C^{\mathrm{TN,D}}_{t}\) represents the total revenue for all power sources providing PR auxiliary services at time \(t\); \(P^{\mathrm{TPU,C}}_{i,u,t}\) denotes the corrected output of a single thermal power unit; \(P^{\mathrm{C}}_{g,t}\) denotes the corrected power output for IPPs and CSs not participating in PR; and \(P^{\mathrm{TPU,C}}_{i,u,t}\), \(C^{\mathrm{TN,D}}_{t}\) and \(P^{\mathrm{C}}_{g,t}\) are determined by the decision variables \(P^{\mathrm{TPU}}_{i,u,t}\), \(P^{\mathrm{PV}}_{i,t}\), \(P^{\mathrm{WT}}_{i,t}\), and \(P^{\mathrm{WT}}_{i,t}\).