## 3 Mathematical Formulation
### Individual Bidding Strategies for a WPP  
For a WPP, the objective of the optimal bidding strategy is to maximize the expected revenue resulting from the energy and regulation markets, as stated in Equations (3)-(5). Equation (4) expresses the revenue obtained from the energy market, which includes the payoff for bidding in the day-ahead and real-time energy markets. Equation (5) shows the revenue coming from the regulation market. In the proposed model, the performance-based regulation scheme is developed, which is referenced from the PJM market [15]. The market participant receives a two-part revenue that includes the capacity (the first term in Equation (5)) and performance payment (the second term in Equation (5)). The third term denotes the loss of revenue from spilled wind power, which occurs when the wind generator has to reduce its output to provide upward regulation. Note that the operation cost of wind generators is very small compared to the total profit, and thus ignored in the optimization model. \[PF_{w}^{s}=PF_{w}^{E,s}+PF_{w}^{R,s} \tag{3}\]  
\[PF_{w}^{E,s}=\sum_{s\in N_{s}}\pi_{s}\sum_{t}^{T}\lambda_{t}^{DA}P_{w,t}^{DA,s} +\lambda_{t}^{RT}\Delta_{w,t}^{P+s}-\lambda_{t}^{RT}\Delta_{w,t}^{P-s} \tag{4}\]  
\[PF_{w}^{R,s}=\sum_{s\in N_{s}}\pi_{s}\sum_{t}^{T}\lambda_{reg,t}^{cap}C_{w,t}^ {reg,s}S_{t}+\lambda_{reg,t}^{perf}C_{w,t}^{reg,s}R_{t}^{mil}S_{t}-C_{w,t}^{ up,s}\lambda_{t}^{w,s} \tag{5}\]  
The total profit of a wind generator is denoted by \(PF_{w}^{s}\), which comprises the energy profit \(PF_{w}^{E,s}\) and the regulation profit \(PF_{w}^{R,s}\); the clearing prices for the regulation market capacity and performance are denoted by \(\lambda_{reg,t}^{cap}\) and \(\lambda_{reg,t}^{perf}\), respectively. \(\Delta_{w,t}^{P+s}\) and \(\Delta_{W,t}^{P-s}\) represent the positive and negative imbalances, respectively. \(C_{w,t}^{reg,s}\) and \(C_{w,t}^{up,s}\) denote the regulation capacity bid and the up-regulation bid; \(P_{w,t}^{DA,s}\) refers to the energy bid from the day-ahead market; \(\lambda_{t}^{w,s}\) is the wind power price. The regulation performance score is represented by \(S_{t}\), and \(R_{t}^{mil}\) signifies the mileage ratio. \(\lambda_{t}^{DA}\) and \(\lambda_{t}^{RT}\) represent the market price for the day-ahead and real-time markets. For a bidding horizon, the optimal bidding model for a WPP is given as (6)-(16). The purpose of the proposed model is to maximize the expected benefit function shown in (3) and the CVaR risk calculated in (2) multiplied by a weighting factor \(\beta\). The weighting factor ranges from 0 to 1, which represents the decision maker's risk preference. The power limits of the wind are described in (7)-(10). Equation (7) states the electricity balance of the wind. \(P_{w,t}^{s}\) represents the total bid of the wind generator in the market. Equation (8) indicates the regulation bid, including both up- and down-regulation (\(C_{w,t}^{up,s}\) and \(C_{w,t}^{dn,s}\)). Equations (9) and (10) enforce that the power of the wind for energy plus the regulation capacity cannot exceed available output or fall below zero. Due to the ramping limits of the wind generator, Equation (11) shows up- and down-capacity constraints for the regulation bidding. \(\kappa\) denotes the maximum ratio of the qualified wind power capacity for regulation to the rated capacity \(W\). Equations (12) and (13) express the imbalance \(\Delta P_{w,t}^{s}\) caused by forecasted errors. \(P_{w,t}^{cs}\) represents the actual wind output. Equation (14) enforces that the positive imbalances should not exceed the actual wind power output while Equation (15) limits the negative imbalances within the maximum capacity of wind energy. Equation (16) shows the restriction on the CVaR of profit for the WPP.