Participation of Aggregated DERs to the Ancillary Services Market: A Monte Carlo Simulation-Based Heuristic Greedy-Indexing Model

: In an effort to improve the stability and secure operation of the grid, regulatory bodies are opening Ancillary Services Markets participation to Distributed Energy Resources (DERs), energy storage systems, and demand response. Within this framework, this study proposes a model that simulates the coordinated operation of an aggregate of power plants, including non-dispatchable DERs and, as regulating units, Combined Heat and Power (CHP) generation and electrochemical energy storage systems. A Monte Carlo procedure is adopted to realistically create a population of aggregation scenarios. The real-time operation of the DER portfolio is managed through a Heuristic Greedy-Indexing logic, which allows the Aggregator to select the optimal control action to implement according to the technical and economic quantities characterizing the market and the grid. The techno-economic performance of the proposed algorithm is evaluated by simulating its interaction with the electricity markets. Finally, a sensitivity analysis is performed to analyze the profitability in different scenarios. The novel mathematical model proposed showed to be effective in managing a complex problem like the one at hand with an acceptable computational effort. The numerical results obtained confirmed that the aggregated participation in the market could provide interesting economic returns, especially if a CHP unit is involved as regulating unit, while the feasibility of the batteries adoption is still limited by the actual cost of the technology.


Introduction
The formidable growth of Distributed Energy Resources (DERs) in the last decades was both a boon and a major challenge for the safe and economical dispatch of electric power systems. Larger adoption of DER raises concerns regarding the reliability of transmission and distribution systems, which must improve their flexibility to face the issues introduced by the variability and unpredictability of renewable energy sources [1]. Designs aimed to improve the fitness of the electricity markets for a high DER penetration have been thoroughly researched in recent years, with a focus on two matters: 1. Counteracting the problem of number and small size of involved power plants, which causes DERs to be often unmanageable and "invisible" to the Transmission System Operator (TSO), by aggregating them into bigger market entities, able to deliver electricity with dispatchable and controllable production schedules. 2. Reducing the costs arising on the Ancillary Services Market (ASM) for the collection of the regulation services required to ensure to the power system an adequate degree of reliability (operation performed, for example, by relaxing the restrictions on technical requirements to get access to the market, with the purpose to involve new subjects, e.g., DERs) [2].
In this framework, in Italy, Resolution 300/2017/R/eel [3] started a pilot regulation, consisting of a reformation of the dispatching discipline in place, aimed to enable the participation of DERs in the ASM, in an aggregated form and on a voluntary basis, for the provision of balancing services to the power system. This new entity, named Enabled Virtual Unit (EVU), can include small power plants, storage systems, controllable loads, and electric vehicles, managed and coordinated by an Aggregator (commonly known also as Balance Service Provider).
DER aggregation has been proven to yield several improvements to grid operation and market performance: not only does it help to hedge against the risks of imbalance fees within the Day-Ahead Market (DAM) by the sheer effect of technological diversification (initially the first driver for market aggregates), but it also provides better controllability of small scale generators [4], increased visibility [5], and allows the participation in the ASM by increasing their flexibility when coupled to controllable units (e.g., combined heat and power, storage systems and demand response) [6]. As far as previous studies addressing the operation and optimization of DERs aggregates are concerned, the use of Stochastic Linear Programming to model the uncertainties associated with power output and market prices is very common [7]. These studies focus on bidding decisions [8,9], as well as on power control [7,10] and minimization of imbalances [11]. Non-Linear Programming strategies are employed to determine bidding strategies for dispersed generation, storage, and demand response participating in an aggregated form in energy and secondary reserve markets in [12], while the optimal sizing of DER for minimization of operational costs is studied in [13,14].
However, these methods require large computational effort to reach an optimal solution, with high modeling complexity; heuristic or meta-heuristic methods, on the other hand, are easier to implement and can give more feasible results for real-time operation. An example of these techniques is seen in [15], where hill-climbing algorithms are used to evaluate the optimal dispatch of a virtual power plant, or in [16], where a large fleet of electric vehicles is aggregated and managed by a centralized heuristic scheduler to provide Ancillary Services (ASs) to the power system.
According to the issues at hand, the problem of DER aggregation for ASM participation is tackled in this work through a Heuristic Greedy-Indexing model (similar to the one proposed in [17] to evaluate the e-vehicles charging dispatch), which defines, by means of a centralized architecture, the optimal control actions to be performed by a Combined Heat and Power (CHP) unit and an Energy Storage System (ESS) to make programmable an aggregate of Non-Dispatchable Renewable Energy Sources (NDRES) and provide ASs (secondary and replacement reserve services) to the power system. In the literature, greedy algorithms are widely used when computation time is crucial, but the solutions do not have to be optimal [18]. In the study, uncertainties related to NDRES production are reproduced through a Monte Carlo procedure, generating stochastically a suitable number of aggregation scenarios in which the performance of the Heuristic Greedy-Indexing model is assessed. Technical and economic analyses are developed in compliance with the features of the Italian power system and electricity market. The purposes of this work are: (i) to evaluate the effectiveness of the coordination strategy proposed based on the Heuristic Greedy-Indexing; (ii) to evaluate the business opportunities and technical challenges that arise from the participation of a DER portfolio in the ASM; (iii) to determine the most profitable and effective configuration for the aggregate and the best regulating units size.
In the following of the present work, in Section 2, the framework of the model is set up and the algorithms and approaches developed are presented. In Section 3, the case study taken as reference is described. Results are then assessed and commented in Section 4, and a sensitivity analysis is performed in Section 5. Finally, some conclusions are drawn in Section 6.

The Proposed Approach
The proposed architecture, based on a Heuristic Greedy-Indexing approach [19], controls the real-time EVU operation, making the aggregate of units dispatchable and enabling the provision of Secondary Reserve and Replacement Reserve services (hereinafter SR and RR). Different EVU scenarios are created through a Monte Carlo procedure, which defines the number, technology, and size of the NDRES plants involved. The configuration of choice for the aggregate comprises PhotoVoltaic (PV) plants, Wind Turbines (WTs), and run-of-river Hydro Power (HP) generators. Then, CHP generators and ESS are introduced in the EVU as regulating units, providing the system with imbalance correction, as well as with reserve capabilities that can be offered on the ASM. The model runs through the simulation period (up to one year), determining in advance, with the information available, the market commitments, based on historical market data and the operational constraints of the power plant. Real-time decisions enacted by the Heuristic Greedy-Indexing algorithm are based both on the technical characteristics of the generation (such as their production unpredictability, available flexibility, and ramp limits) and on economic figures (fuel cost and market prices). The overarching logic that governs the model is presented in Figure 1.

Enabled Virtual Unit Portfolio Definition
The EVU configuration, for each Monte Carlo run, is chosen through a sequence of random selections that define the technology and size of each NDRES unit within the aggregate: first, the technology ( ∈ , , ) is picked from a stepwise distribution with weights ℎ, , then a power class is selected from , and the nominal power , of the considered unit is randomly drawn within that class. This process is repeated until the cumulative power of the current EVU scenario (∑ , ) reaches a fixed total nominal power ( ). As already mentioned, once having defined each EVU configuration (Monte Carlo scenario) as a set of NDRES power plants, a regulating unit is introduced in the aggregate. In the study, ESSs and CHP plants are considered for this purpose. ESSs are assumed to be totally devoted to respecting the market commitments (imbalance correction, secondary and replacement reserve regulations). This assumption is made by taking as reference the scenario in which an Aggregator, managing an NDRES portfolio, decides to adopt an ESS to make the portfolio programmable enough to enable its market participation. The ESS size, in terms of both rated power and energy capacity, respectively and , is set as a parameter of the simulation. To avoid economic penalties, the ESS must guarantee the provision of the service requested on the market, which in the worst situation could last even several hours (for example, according to the prescriptions in place in Italy for the secondary frequency control, a power equal to the full band offered could be required for 2 h). Therefore, to allow the exchange of power for the time needed, ESSs with an energy/power ratio of some hours must be adopted for this application. For this reason, electrochemical ESSs are considered in this study.
Concerning the CHP unit, on the other hand, it is assumed aimed to follow the electricity demand (hereinafter ) of the industry it serves. Therefore, the Aggregator, to supply ASs to the system, can only exploit the remaining CHP flexibility ( ): i.e., the available up/downward power production margins determined with respect to the working point of the generator (i.e., power production required to cover at a given instant the industrial load). In particular, starting from the production profile of the considered CHP plant, the remaining up/downward flexibility is calculated considering the number of engines in operation ( ), and their technical limits (max/minimum power).
Each EVU scenario generated by the Monte Carlo procedure is then processed on a given time frame (e.g., one year) through the model described in the following of the work; timesteps of Δ = 15 are adopted, coherently with the time resolution used in the Italian ASM. In order to arrest the generation of new scenarios, a converge criterion is applied based on the error evaluated on the estimates of the quantities of interest (e.g., revenues, costs, imbalances, etc.): when the uncertainty relevant to the selected quantities becomes lower than a given threshold ( ), the algorithm is stopped, and the results are deemed satisfactory.

DAM Commitments and Schedule Forecasts
Due to the heuristic nature of the model, all decisions regarding the control actions to be performed on the EVU by the Heuristic Greedy-Indexing logic must be taken with the knowledge and information available at the time of closure of the relevant market session. This is assumed, for the DAM, 12:00 of day D-1 (where D is the day of dispatch). Regarding the ASM, the market structures in the EU are very different, even if a general trend is ongoing to reduce the distance to the delivery time of market gate closure [2]. For example, in Italy, it has been recently set for some services one hour in advance. Despite this, in the present study, for the sake of simplicity and to keep the approach as far as possible general, a gate closure 4 h before the delivery time has been considered. For the same reasons and the minor impact on the Aggregator operation, the commitments arising from the intra-day market are neglected.
During the participation in the DAM, the EVU defines the binding schedule of the commitments for the sale of the energy produced by the NDRES power plants. Indeed, the CHP and the ESS will not participate in the DAM, since they are assumed just devoted to, respectively, supply the relevant industrial load and provide flexibility on the ASM to the Aggregator.
To forecast the NDRES production, a persistence model is adopted. This prediction technique is based on the assumption that meteorological phenomena vary slowly enough that the most likely outcome for the weather in day D + 1 is to be the same as D. A simplistic forecasting approach has been purposefully used, being the development of ad-hoc designed forecasting methods beyond the scope of the study. In real-life, the Aggregator will be free to choose the preferred forecasting method and utilize, for instance, data collected from weather forecast providers. In this case, the forecasting error committed will be lower, thus it will be easier for the EVU to follow the power schedule agreed on the market. According to the persistence model technique, the NDRES production profile used in the DAM ( ) is computed considering the actual power profile measured ( ) the day before: Therefore, the schedule of commitments for the electricity offered on the DAM ( ) is obtained by time-shifting the available production data forward by 1 day or 2 days ( ), for hours respectively before and after noon time. On the other hand, the updated prediction used in the ASM bidding process ( ) is entirely based on the previous day's data, as described in the next subsection.

Reserve Bidding
Bids for the ASM are defined through the available flexibility of CHP and ESS, in both up/downward directions, suitably adjusted to take into account the imbalance correction with respect to the forecast (updated at the time of ASM sessions) and the deviation of the ESS State of Charge (SoC). Indeed, the formulation of bids on the ASM exploits the EVU flexibility, taking into account also the requirements of: • minimizing the imbalances with respect to the DAM schedule, defined in Equation (1); • maintaining at a predetermined reference value the battery SoC ( ), assumed equal to 50% of ESS rated capacity.
In the Italian market framework, both the bids for SR and RR must include a quantityprice pair, and-if accepted-they are remunerated on a pay-as-bid basis. To compute the most adequate bidding price to be used by the Aggregator on the ASM, in this work, a point estimate based on historical price data is implemented. The same approach is also used to determine, in advance, the most convenient service to bid (RR or SR).
The bidding price for service ( ∈ { ; }), calculated for both for upward and downward reserve (respectively, , and , ), is determined considering the mean value of the -day historical price data from the same market session: In Equation (2), and are parametric coefficients that modulate the aggressiveness of bid prices as a compromise between earnings and likelihood of acceptance (the greater the value of coefficients, the greater the aggressiveness of bid prices), whilst , , / , , are the historical price data from the market session of day for up/downward reserve.
Once price estimations are calculated, the capacity available for the reserve should be assessed considering: (i) the energy required to bring storage to the set level, (ii) the CHP flexibility, and (iii) the requirement to reduce the imbalance (i.e., the gap between the actual power profile and the power schedule offered on the DAM).
Firstly, the SoC of the ESS is verified, to determine the amount of energy in excess or deficit to reach the set level ( ) in the next 4 h. The power required to bring the ESS to the set level ( ) can be calculated as: Where: ) is the charge/discharge technical limitation on power, calculated from the ESS characteristic curve presented in Figure 2 [20]; • is the ESS set level, assumed equal to half of its capacity to consider symmetric up/downward regulating bands; • Finally, the ESS round trip efficiency is defined as: Please note that, according to Equation (3), to allow the battery to charge or discharge to a given power , it is necessary that both the conditions about the technical limitation on power and the current SoC are satisfied. Therefore, in practice, when the ESS is almost fully charged or discharged, it will be able to absorb/release an amount of energy lower than the one reported in the chart in Figure 2. Secondly, the CHP flexibility ( ) in both directions is assessed. To this purpose, a real CHP power plant, having two internal combustion engines, is taken as a reference. As already introduced, the power plant operates at the power needed to cover the industrial load it serves ( ). At time , the number of combustion engines in operation is defined as the lowest integer quantity (0 ÷ 2), making true the inequality ( ) ≤ ∑ ( ⋅ ) . Consequently, the up/down flexibilities are defined, respectively, as is the maximum (nominal) and minimum admissible power of each combustion engine.
Finally, the expected error ( ) between the DAM schedule ( = ) and updated forecasts available at the time of ASM bidding ( ) is evaluated as: Therefore, is an estimate of the expected imbalance, which the EVU will attempt to fix later through the bid in the ASM.
From these quantities, the available band for up/downward regulation ( / ) for each period (15 min) of the session can be calculated as: In Equation (6), is the DAM clearing price, while , / and , / are defined according to Equation (2).
is multiplied by a logic operator, in square brackets, which models the economic profitability of the ESS employment for the ASM bid. In particular, the logic operator is defined as inequality between the quantities: Where ] is the investment cost of the ESS, and , is the number of expected cycles with a Depth of Discharge (DoD) equal to 80%.
Therefore, the logic condition is introduced in Equation (6) to enable the ESS regulation only when the ASM estimated revenues at least cover the battery wear costs.
Note that has been included in Equation (6) because if an imbalance is predicted when the production forecast is updated, the best option is to take advantage of the expected imbalance by offering the excess or deficit of production on the ASM as SR/RR reserve.
Given the available regulation bands ( , ( ) and , ( )), in each time interval, the most profitable service (i.e., RR or SR) shall be identified. If ( , > , ) ∨ ( , < , ), the supply of RR is more convenient than the SR one. Therefore, the quantity quantities bid on the ASM are computed as: Where , / is the average amount of RR service acquired by the TSO in the previous ASM sessions. The minimum value between the available regulating band and the historically requested service is offered on the market. With the purpose to maximize the revenues from the ASM participation, the remaining regulating band is offered for the SR service: In Equation (9), / is a parameter that modulates the quantities committed to SR, based on the accepted level of risk, since the SR control signal delivered by the TSO ( , ), which will modulate in real-time the amount of secondary frequency control requested to the EVU, often does not command the whole of the auctioned band (i.e., typically , < 1, so / can be > 1). In the opposite case, when SR is deemed more profitable than RR ( , > , ) ∨ ( , < , ), the opposite approach is adopted: most of the available flexibility is offered for the SR regulation and the remaining one for the RR service.

Market Commitment
After the definition of the flexibility offered on the market and the relevant bidding prices, it is determined whether bids for reserve services are actually accepted, checking if the price presented by the Aggregator for the -th service (with ∈ { ; }) is more profitable than the other market players' offers (i.e., , > , and , < , ). Accordingly, the accepted quantities ( ) are defined as: In Equation (10), , and , are the quantities that, according to the historical data available, have been accepted by the TSO in the ASM for the service . Then, the amount of AS offered by the EVU that can be accepted on the market has to be lower than, or equal to, the quantity required in real-life by the system operator at that time. The regulation needed by the TSO (energy measured in the quarter-hour , , / ) is calculated using Equation (11) for SR and Equation (12) for RR.
Where, as already mentioned, , is the SR control signal (1 min. resolution) sent by the TSO to the EVU to modulate the real-time regulation. This quantity has been determined by using the actual control signal delivered by the Italian TSO to power plants on the European continental power system [21]. Whereas for RR regulation, following the Italian market rules, the quantity of service that the EVU is requested to provide is considered equal to the accepted one.
Therefore, the final commitment toward the market, resulting from the combination of DAM and ASM, is calculated as: and the real-time regulation ( ( )) required to the EVU to fulfill the market obligation is: In Equations (13) and (14), is the energy exchanged on the DAM resulting from the power forecast performed the day-ahead ( ), is the sum of the energy produced in the current timestep by all RES power plants of the EVU, is the sign of , and , and , is the energy required respectively for upward and downward regulation.
Once the commitments to the market for SR and RR services are defined, the control actions requested in real-time to regulating units have to be defined. To this purpose, as explained in the following section, the scheduling logic evaluates, by means of the proposed Heuristic Greedy-Indexing, the costs and benefits of each corrective action that could be taken to supply the ASs and to extinguish imbalances. To quantify the contribution to the AS provision admissible for each regulating unit, the relevant operative limits must also be considered.

Real-Time Operation
The final step in the logic is the decision on the regulation to be performed in realtime, which is performed as shown in Figure 3. At time , the algorithm receives in input the current state of the EVU and performs proper evaluations on the costs and earnings related to the regulating options considered admissible. Then, a list of feasible options is defined, sorted in order of increasing cost, among which the most cost-efficient one is selected. In particular, four possible actions are considered, aiming, when possible, to eliminate the imbalance and respecting the power schedule offered in the DAM and ASM: 1. exploiting the CHP flexibility; 2. activating the ESS; 3. reducing the energy generated by the RES (i.e., energy curtailment); 4. maintaining the residual imbalance. It is relevant pointing out that, as is obvious, the EVU will earn from the provisions of the AS to the power system but, since all the possible regulations performed by the Aggregator are feasible to provide the services sold, all control actions are expected to bring the same profit. Therefore, to carry out the selection of the optimal action to be implemented, the algorithm evaluates the costs relevant to each one rather than the net earnings. In the following, the procedure adopted for the evaluation of costs and availability of each action is reported.

Cost and Availability of ESS Regulation
In order to evaluate the cost of intervention of the ESS ( ), different aspects need to be taken into account. First of all, due to the large investment cost associated with the ESS, and the comparatively low number of cycles that batteries can withstand [22], the batteries wearing has to be considered. To this purpose, the penalty factor is used, as defined in Equation (7), evaluated as investment cost for a unit of ESS capacity spread out on the ESS lifetime (expected number of charge/discharge cycles).
Moreover, the decision on the regulation of the ESS at the present time depends also on the price of the services expected in the following hours, because a control action performed at time determines a deviation of the battery's SoC from the reference value, which needs to be adjusted in the future (otherwise, the ESS would tend to saturate to the max/minimum SoC).
Therefore, the cost assigned by the real-time logic to the ESS regulation ( ) is evaluated as: Where is the average cost associated with the requirement of restoring the battery SoC during the next ASM sessions, evaluated by a point estimate method similar to the one in Equation (2), are the ESS wearing costs, and is the efficiency of the storage depending on the direction of the power flow. In particular, = ℎ if > 0 and = 1/ if < 0 (i.e., the regulation requires the battery to discharge). After the evaluation of the cost of ESS regulation ( ), it is necessary to quantify the availability of down/upward regulation ( ). To this purpose, both the amount of energy stored in the batteries and their charge/discharge power limits ( , ℎ/ ) must be taken into account. In particular, at time step , the energy available for the regulation is: Where , ℎ and , are, respectively, the charge and discharge power limits of the ESS, shown in Figure 2.

Cost and Availability of CHP Regulation
The cost of the regulation performed through the CHP power plant is mostly dependent on the savings/losses related to the reduction/increase of fuel required to power the internal combustion engines. As a consequence, it can be calculated as = ⋅ , where = ( ) and is the fuel cost, meaning that if an upward control action is required ( > 0), this will entail burning more fuel; vice versa, in case of a downward regulation, the fuel saving will allow for a reduction in the working costs of the generator. The availability of CHP regulation is evaluated according to its flexibility, defined in Section 2.3. Therefore, in a quarter-hour, the energy that can be exchanged for the regulation is , / ( ) = , / ( )/4.

Cost and Availability of NDRES Curtailment
A further option to consider for providing downward regulation is the possibility to curtail NDRES production. The cost of the curtailment ( ) is set equal to 0 €/kWh, assuming that NDRES power plants can reduce the power injected into the grid without additional costs with respect to the investment costs covered for the power plant realization and without an increase of the expenses compared to the standard operation. At time slot , the energy available to be curtailed can not exceed the total energy produced by the NDRES units ( ). Please consider that, usually, this option is less convenient than performing the same regulation by the ESS or CHP, since in both cases a downward regulation usually brings to savings: in the former case (ESS), earnings are given by the energy stored in the battery that can be used to supply ASs in the next timesteps; in the latter one (CHP), they are given instead by a reduction in the fuel costs.

Cost of Residual Imbalance
If the EVU flexibility is not enough to fulfill the system operator's dispatching orders, an energy imbalance occurs. To evaluate the costs that the Aggregator must cover in this case, a dual pricing mechanism is applied [23]: therefore, the imbalance cost depends on the sign and amplitude of the error (respectively and ), but also on the zonal imbalance sign , that is the direction of the overall imbalance in the market zone where the EVU is located. If is opposite to the imbalance registered by the EVU ( ⋅ < 0), the energy gap is not penalized, since such an error actually helps the system stability; thus, the unitary imbalance cost is set equal to the DAM price ( = ⋅ ). In case of concordant signs, the imbalance caused by the EVU is detrimental for the grid, hence it shall be penalized: Where , and , are the max/minimum prices for the up/downward regulation, estimated considering the data of the previous market sessions. Since the sign of the zonal imbalance is not known in real-time by the Aggregator (only the TSO has all the information to evaluate it), a conservative approach is assumed to estimate for the real-time decisions performed by the Heuristic Greedy-Indexing, in particular by taking the worst-case scenario (i.e., concordant signs ⋅ > 0).

Selection of the Best Control Action
Once technical and economic quantities associated with each control action are known, a list of options, sorted in order of increasing cost, is produced by the Heuristic Greedy-Indexing algorithm. The logic runs through all options in order, calculating After each regulation action, the residual regulation required In Equation (19), a pay-as-bid approach has been adopted to calculate the revenues from the AS provision (i.e., ⋅ , ) and cash flows related to imbalance are evaluated as = | || |.

Case Study
The proposed method runs through each timestep in the simulated period (one year), defining the best control action to perform through the Heuristic Greedy-Indexing algorithm. To achieve statistically significant outcomes, the proposed method has been tested through the Monte Carlo procedure described in Section 2.1, which randomly generates a population of different EVUs. In each scenario, the production of NDRES power plants is modeled through weather data (solar radiation and wind speed, respectively for PV and WT generation) from 135 stations scattered around Northern Italy. These profiles are suitably transformed to per-unit power and then fed to the Monte Carlo algorithm. The technology and size of each power plant involved in the EVU are defined according to the real distribution of NDRES in Italy (see Table 1) [24,25]. Rated power of DER units ranges from = 100 to = 6 , assuming the latter as maximum rated power of dispersed generation units that can be connected to medium voltage networks according to the Italian regulation framework [26]. Regarding the CHP power plant usage, it has been derived from the real power profile measured in 2016 on an industrial user in Northern Italy, equipped with 2 × 1605 kW natural gas-powered generators. The real prices and quantities registered on the Italian market in 2016 [27] are used to determine the accepted average, maximum, and minimum prices and quantities for each session of DAM and ASM. An example of the price trend in a given day is shown in Figure 4, where maximum (Max), average (avg), minimum (min) prices for upward (Up) and downward (Dn) Secondary (SR) and Replacement Reserve (RR) are shown. Zonal sign (required to determine imbalance settlements in the ex-post economic analysis) and secondary regulation control signal-which modulates the regulation over the bands accepted in the ASM-have been downloaded from the website of the Italian TSO (Terna) [21].
The performance of the strategy proposed in optimizing the Aggregator's revenue is evaluated by simulating the EVU operation during the entire year, for a = 10 sized configuration. Table 2 shows the technical characteristics adopted for the ESS, such as the number of expected cycles ( , ), charge/discharge efficiency ( ℎ/ ) and relevant investment costs ( ), and the parameters that modulate the aggressiveness of bid prices ( , ). For what concerns the ESS and CHP sizing, their power is defined as a percentage of the EVU total rated power. A detailed sensitivity analysis on these parameters is provided in Section 5. For the batteries, an energy/power ratio equal to 4 is assumed. About capital and operating expenditures, proper assumptions are needed, defined in compliance with the scenario under investigation. Since the CHP plant is in charge of supplying the relevant industrial load, and the Aggregator only uses its residual flexibility for market participation, the investment cost for the power plant realization and the fuel expenditure needed to cover the local consumption are considered in charge to the industrial user. Hence, they are excluded from the economic analysis of the present work (developed from the Aggregator's perspective). However, the fuel costs/savings caused by the AS provision are included in the economic evaluation. Concerning the ESS, it is assumed entirely devoted to supplying AS to the power system (e.g., it is installed and managed by the Aggregator), then the investment costs are included in the economic analysis.

Numerical Results
To assess the validity of the mathematical model developed, it is crucial to verify its performance in providing the regulation required by the power system and the economic viability of the investment made by the Aggregator. To this purpose, the Heuristic Greedy-Indexing control logic is tested in the case study described in Section 3.

EVUs Generation
As a first step, a suitable number of EVU scenarios is generated to test the proposed method. To this purpose, the Monte Carlo procedure is used to randomly create an adequate number of EVU scenarios able to represent the typical NDRES distribution in Italy. The random generation procedure is stopped when the uncertainty measured on the quantities of interest ( ) compared to the expected value becomes lower than a predefined threshold ( ).
The following quantities (Q) are taken into account: total revenues in the considered period = ∑ ( ); • total revenues in the ideal scenario , i.e., assuming a perfect day-ahead forecasting of EVU production.
According to the convergence criterion identified, the Monte Carlo procedure has been stopped after the generation of 15 EVU scenarios, reaching an adequate trade-off between the uncertainty of results and computational effort. In particular, for what concerns the former aspect, Table 3 presents the results in terms of expected values ( [ ]) and uncertainty ( ) for each quantity of interest. It is worth noting that 15 EVU scenarios allow keeping, for almost all the quantities, ≤ 3%. The distribution of the NDRES power plants as a function of the relevant rated power units, resulting from the Monte Carlo simulations, is shown in Figure 5, where continuous lines represent the mean value evaluated over the whole simulated scenarios and bars the max/minimum values. It is possible to observe that, despite the low probability of occurrence, also some large power plants are selected in the EVU scenarios generation process (the largest one is a PV plant of 4.9 MW). Even if the limited number of EVU scenarios did not allow getting samples over the whole admissible range (since, as mentioned before, the maximum NDRES rated power according to the probability distributions in Table 1 was equal to 6 MW), the NDRES plants actually selected are quite near to its limits. Therefore, the numerical simulations performed are considered able to provide a satisfactory representation of the situation in place in Italy. Figure 6 shows an example of EVU production profile obtained in output to the Monte Carlo procedure.

Discussion on Test Results
To validate the model and compare the techno-economic results obtained in the different possible EVU configurations, several setups of the aggregate under analysis are considered: • No Reg scenario: in this configuration, no regulation is performed by the Heuristic Greedy-Indexing; this scenario is used as a benchmark to compare results. • C scenario: only the CHP power plant (sized = 1605 × 2) is considered as regulating unit in the EVU, providing imbalance relief, secondary and replacement frequency reserve.
• C(RR) scenario: CHP regulation is limited to imbalance relief and replacement reserve. • S scenario: ESS (sized 20% of EVU total rated power: 2 MW/8 MWh) is used to adjust the EVU power profile and to supply ancillary services to the power system. ). • C+S(RR) scenario: ESS regulation is limited to imbalance correction and replacement reserve, while CHP also supplies secondary reserve. Figure 7 shows, for the different EVU configurations listed before, the average value of revenues and costs , categorized by source. The net average profit is plotted in red with the relative Monte Carlo uncertainty, which is always ≤ 3% (maximum admitted value, adopted as the threshold to arrest the Monte Carlo procedure for the scenario generation). As a reference, the average revenue obtained in the No Reg configuration is shown in dashed green. The bar diagram reports as positive values the average yearly revenues from the energy sold on the DAM ( ) and from the supply of SR and RR services on ASM (respectively and ), as well as the imbalance costs avoided thanks to the CHP/ESS regulation ( , ), and as negative ones the costs incurred by the Aggregator due to energy imbalance ( ) and ESS wearing ( ). On the other hand, ASM participation and imbalance correction seem to provide economic yields insufficient to justify investments in large electrochemical storages (S configuration). This is mainly due to the current cost of the technology, despite its high potential in terms of technical capability. In particular, the ESS wearing costs, compared to the prices rewarded on the market for the AS provision, cause limited employment of storage capacity. Regarding the scarce affordability of the ESS, it is worth noticing that in perspective other remunerated services may be implemented through the batteries, such that Uninterruptible Power Supply and Fast Reserve [28], which have been neglected in this study. Their coordinated provision (service stacking) could further justify from an economic point of view the adoption of electrochemical storage technologies for behindthe-meter and front-of-the-meter services. The configuration with both CHP and batteries undersized compared to the benchmark case (C+S-half scenario) shows promising results, but it achieves marginally better results than the No Reg case. Figure 8 displays the energy exchanges resulting from market commitments: positive values represent an increase in the energy injected into the network (or a decrease in the power absorption), vice versa for negative values. As a consequence of the modulating effect of SR control signal ( , ), the configurations in which only RR is considered (e.g., C(RR) and C+S(RR) scenarios) show much larger energy quantities. In general, CHP regulation is biased toward the downward direction, due to the available flexibility of the power plant resulting from the working point to cover the local load.  = 0) and the number of hours at which the storage is full ( = 1), drawn respectively in orange solid and dotted lines. The corresponding Monte Carlo uncertainty is also displayed with the two horizontal lines. The trends of these quantities provide a useful figure to assess the proper sizing of ESS: high and a few hours of saturation are index of a correct sizing of the storage system for the required operation. This is far from being the case when only Replacement Reserve is offered (S(RR) scenario), since, for the small average profit margins, the ESS usage is rarely justified.  Table 4 reports more in detail the EVU market exchanges (Figure 7) and ESS usage (Figure 8) with the statistical uncertainties over the different Monte Carlo scenarios related to each quantity, assessed through the Equation (20). According to the approach explained in Section 4.1., the Monte Carlo procedure adopted to define the EVU scenarios is designed to keep the uncertainty affecting the quantities of interest (reported in Table 3) below a predefined threshold (3%). Other quantities involved in the analysis could also be affected by greater uncertainty, but this only happens for those having little impact on the outcomes of interest of the simulation, i.e., very small compared to the others (as one can observe in Table 4).

Sensitivity Analysis
In this section, a sensitivity analysis is performed by parametrically changing the CHP and ESS size, and the costs in charge to the Aggregator for their use. In particular, the relationship between revenues of the EVU and size of the regulating unit is evaluated by iteratively changing the CHP/ESS size (respectively, and ) from 500 kW up to 4 MW (from 5 to 40% of the total rated power of the aggregate of NDRES units considered in the study, equal to 10 MW).
The effect of different values of on yearly revenues are reported in Figure 10. An increase in CHP rated power results in an almost linear proportional improvement of revenues (linear correlation coefficient equal to = 0.99). This fact occurs because the investment costs of the CHP plant are assumed totally in charge to the industrial user where the power plant is deployed. As already introduced, this hypothesis corresponds to a scenario in which the power unit is installed by the user to supply the local load; therefore, no investment cost is required to the Aggregator. However, to develop an economic analysis sticking to reality, it should also be considered that, to exploit the CHP regulation in the EVU, the Aggregator should acknowledge to the CHP owner a proper wage. The amount of this remuneration is very hard to estimate, since it depends on both the Aggregator and user's business plans and strategies. Therefore, in this work, a parametric analysis is provided to highlight its effects on the economic viability of the EVU. To this purpose, assuming as a raw estimation of investment costs required for the realization of the CHP unit 1,000 k€/MW and a lifespan of the power plant of 20 years, a yearly depreciation expense is evaluated (for example, for a CHP unit with rated power 2 MW, the yearly depreciation is equal to 1,000 € • 2 /20 = 100 €/ ). Then, a percentage of that amount (from 0 to 50%) is assumed in charge to the Aggregator. With the increase of the share of investment costs applied to the Aggregator, as expected, the revenues of the EVU reduce. As one can observe in Figure 10, the Aggregator can easily cover expenses up to 30 ÷ 40% of the overall CHP investment costs. Over that threshold, revenues rapidly decline with the increase of the CHP size. This fact is somewhat related to the hypotheses adopted in the study: with the increasing of CHP size, investment costs are assumed to increase proportionally (even if, in real-life, economies of scale cause the cost per unit of power to decrease with the increasing of the power plant size), whilst revenues from ASM participation growth less than proportionally. Concerning the ESS, a similar approach has been adopted to set up the parametric analysis, iteratively changing the system rated power ( ) as a percentage of the EVU nominal power ( ). In all cases, for the sake of simplicity, the energy/power ratio has been kept equal to 4 h. Moreover, since with a cost of the technology of 500 €/kWh batteries have shown not to be yet competitive compared to other more consolidated solutions, the revenues of the Aggregator have been reported for different costs per unit of energy capacity (from 100 to 500 €/kWh) [29].
As shown in Figure 11, increasing the ESS size results in a general reduction of yearly revenues of the Aggregator, because the investment costs tend to outweigh the benefits of the regulation. In this regard, it is important to recall that the cost for the adoption of the ESS has been supposed in this study totally in charge to the Aggregator, because batteries are only used to supply ASs to be sold on the market and provide imbalance correction. Therefore, with the increasing of ESS size, the expenses related to the wearing and depreciation of batteries (supposed to be replaced in any case after 15 years) also grow, making the investment rapidly unprofitable. In particular, in Figure 11, it is possible to observe that, even if a cost of the technology ≤ 400 €/kWh yields a positive net result over the case with no regulation, a significant reduction of the price of batteries (for example, up to 100 €/kWh) is still required to make the adoption of large ESSs (e.g., 100 ÷ 200 kW) interesting from the Aggregator's perspective. Finally, even if the results of numerical analyses seem to suggest that a very small ESS is the best opinion for the Aggregator, it should be recalled again that in practice, as for the CHP power plant, the price of the ESS per unit of power usually increases with the reduction of its size (for the effect, for example, of fixed costs, such as of installation and connection to the network). Thus, even if the price of electrochemical storage technologies is expected to drop significantly in the near future, the lowest prices reported in the chart (100 ÷ 200 €/kWh) will be most probably a target feasible only for large ESSs (hundreds or thousands kW/kWh).

Conclusions
In this work, an approach based on a Heuristic Greedy-Indexing logic has been proposed to make controllable a portfolio of DER power plants including, as regulating unit, a CHP generator and an ESS. The purpose of the numerical methods developed is twofold. On the one hand, the logic and approaches designed will enable in perspective an Aggregator to participate in the Ancillary Service Market, opening to the possibility of making profits by selling regulation services to the network and limiting possible penalties related to power imbalances. On the other hand, the value of this work stands in the simulation framework proposed, having modeled with a Monte Carlo procedure an aggregated of NDRES power plants, coupled with a controllable unit, and the economic variables affecting its operation. This allowed to simulate, in a comprehensive and realistic way, the behavior of the portfolio of power plants managed by the Aggregator and to evaluate under which conditions the participation in the ASM market can be economically viable.