## 2 Problem Description  
### The VPP's Trading Strategy in the Day-Ahead and Balancing Market  
In power systems worldwide, balance management plays an essential role. Accordingly, the transmission system operator (TSO) must maintain the real-time balance between total production and consumption to maintain frequency and stabilize power system operation. Therefore, the customers' consumption, as well as the available power output of traditional power plants and RESs, need to be forecasted and planned in advance via the DA market. Unfortunately, imbalances still occur due to unexpected events such as unplanned generator outages or load and RES forecasting inaccuracies. Then, TSO is responsible for correcting the imbalances via the balancing market, which includes two phases: BC market and BE market [43; 44; 45]. Normally, RPs should predetermine and submit their reserve capacity bids to TSO, and then the BC market is cleared several months to at least one day before the operating day. Closer to real-time, TSO activates balancing energy automatically or manually in the BE market if an imbalance occurs. Interestingly, reports [25; 43; 44; 45; 46; 47] show that the BC markets in most countries only consider upward reserve capacity. By contrast, in the BE markets, the RPs can not only be called to provide upward reserve but also offer their downward reserve energy. This allows the RPs to obtain more profit from the balancing market. This paper focuses on the optimal scheduling of a CVPP consisting of RESs, ESSs, and demand in the DA and BE markets, as shown in Figure 1. According to [9; 28; 48; 49], a large-scale CVPP integrating multiple RES, ESSs, and flexible loads can afford to participate in the balancing market, especially when ESS has a high share in the CVPP's power structure. Due to ESS's ability to quickly change power, CVPP can flexibly provide both upward and downward reserves. Our previous study focused on the CVPP's optimal upward reserve trading in the BC market [50]. Based on the BC market's requirements and the RES and demand's long-term forecasting data, the CVPP operator determined the reserve provisioning periods and the corresponding reserve capacity. Following the previous study, this paper pays attention to the CVPP's trading strategy in the DA market while ensuring sufficient upward reserve capacity during the contract periods signed in the BC market. Assuming that the CVPP has a contract to provide upward reserve over some time intervals, as shown in Figure 2, the CVPP must maintain the contracted upward volume  
Figure 1: The CVPP’s operation in the DA and BE markets. in each quarter of an hour over contract periods. However, suppose the CVPP's power output is redundant or the upward reserve energy price is forecast to be high. In that case, the CVPP may add another upward reserve energy trading called a non-contracted reserve. This can be implemented anytime, regardless of whether a contract exists for upward capacity. Similarly, CVPP can offer a downward reserve energy bid as a non-contracted reserve. As a result, CVPP can expect to increase its total profit by actively trading in the BE market, even though the probability of being selected for activation is very small. The CVPP's upward/downward reserve energy can be provided by RESs and ESSs (Figure 1). Among these sources, ESS is an effective reserve provision source because it can flexibly increase or decrease charging/discharging level, switch from charging to discharging status, and vice versa. However, unlike other resources, activating the ESS's reserve provisioning ability not only increases/decreases its charging/discharging power but also changes its stored energy level. Note that in the CVPP's structure, ESS is also involved in taking advantage of RES's available power output and leveraging energy arbitrage opportunities in the DA market. For this reason, the ESS reserve provision may be limited to not affecting the operating plan submitted in advance in the DA market.