This section’s aim is to expose the developed strategy for solar plus battery-based VMG management within the Spanish framework as case of study. As mentioned before, the main goal of the project was to develop an EMS that benefits both system operators and end-users by providing frequency stabilization while reducing prosumers’ annual electricity costs.
Thus, first a contextualization of the strategy is provided. Second, a general overview and the scope of the strategy are discussed. Next, the study case is described in detail, enabling a later understanding of the VPP operation. In a further step, DM and CIM participation principles are discussed. Finally, a summary of the proposed technique is provided.
2.2. General Overview and Scope
The MG-management strategy comprises the first two management levels of the hierarchy (home and community). In the first level, the individual household self-consumption maximization is pursued by controlling BESS charge and discharge cycles depending on the relationship between solar production and consumption. In this level, power flows through the smart meter are controlled to avoid outages and maintain compatibility. Once all prosumers have been individually managed, community-level scheduling is developed. In this level, the main goal is the same, maximizing PV plusBESS energy consumption but under an EC vision, i.e., when prosumers’ deficits and surpluses exist within the same hour, these are matched and excess/lacking energy is bid in the DM. If not, the state of charge (SoC) of each prosumer is checked in order to take advantage of or cover any member’s excess or needed energy. If all SoCs are within the operating limits, no bids will be sent; or if, conversely, no exchanges can be scheduled, the excess or lacking energy will be sent as an offer to the operator the day ahead.
Nevertheless, the DM offers sent to the market operator are not definitive because FRR market participation modifies individual SoCs. Therefore, CIM intervention is usually required for two main reasons: to correct the DM bid sent the day before, maintain a secure SoC, and optimize expenses of all prosumers by trading and doing energy arbitrage. This second CIM intervention is part of the strategies developed by the VPP operator. For an optimized real-time operation, information flow between community manager and VPP operator is crucial; therefore, in
Section 2.4, the data exchange is detailed.
Regarding the scope of the methodology, it is divided into two main objectives:
To obtain extra monthly savings in the electricity bill by aggregating prosumers and offering aFRR services to the TSO. For that aim, as mentioned, optimized energy trading techniques have also been implemented for enhanced operation and revenue maximization;
To analyse future scenarios for energy consumers in economic terms within 15 years after evaluating the profitability of the EMS on a year basis. These scenarios are: (1) utility grid consumption or business as usual (BaU); (2) installing only PV panels and participating in the net billing scheme developed recently; (3) adding a BESS to the net billing scheme; and (4) joining an energy community based on the proposed EMS. The developed tool can study all these by switching on/off the community mode, the BESS and/or PV production.
2.3. Definition of the Case of Study’s Scenario
The energy-community object of study is composed of five prosumers who have different consumption profiles among them. Remarkably, all the input data was obtained from real data sources for the November 2021 to November 2022 period. Among these, solar irradiance information was obtained from the weather agency’s website [
23] and from the closest weather station to each prosumer, and energy consumption data were obtained from real metering data reported on their distribution-company application [
24].
After obtaining the consumption data for each user, the PV and BESSs were sized, and solar production was calculated following common criteria. Solar arrays’ configuration was designed following the solar peak hours (SPH) criterion aiming to obtain an annual solar coverage ratio (SCR) of 100%. Briefly, with this criterion the equivalent hours of maximum daily irradiance (SPH) were obtained with historical hourly irradiance (
Gmaxday) data by using Equation (1). Afterwards, the amount of required solar panels was calculated with Equation (2) using yearly mean SPH obtained in 2.1. Finally, monthly mean SCR was calculated using Equation (3):
with
Gmeanday being the mean hourly solar irradiance [W/m
2],
hday the 24 h per day [h],
Gmaxday which was considered 1000 [W/m
2],
nPV the number of PV panels [−],
PPV the power of the panel [kW] which was considered 0.3 kW each,
ηsyst the efficiency of all the systems [pu] which was considered 90% (i.e., 10% conduction and module losses),
SPHmean yearly mean SPHs [h],
SPHmonth monthly mean SPHs [h] and
Econ_meanday the mean daily consumption of a given household.
The annual PV production has been calculated using Equation (4):
with
Etotalyear being the total annual solar irradiance [kW·h/m
2],
ηpanel the efficiency of each PV panel which was considered 18.2% [pu],
Spanel the surface of each PV panel which was considered 1.6 [m
2] and
nPV the number of PV panels resulting from Equation (2).
For BESS capacity (
Ebat) sizing, taking into account self-consumption maximization and aFRR requirement premises, Equation (5) was applied:
with
Econ_meanday being the mean daily consumption of a given household,
aut the autonomy required for the battery [fraction of daily hours] (i.e., 0.25 for 6 h) and
DoD expected daily depth of discharge [pu].
All data comprising market values were extracted from the Spanish transmission system operator (TSO) database [
25], i.e., pool prices, regulated prices, aFRR bands and aFRR prices. Because the data are provided in hour periods, this information was directly included in the algorithm.
In addition, device costs were obtained from a local RES-facility installer for a higher accuracy considering workforce, additional components, the VAT and government grants for the given year.
Table 1 shows the resulting data for each facility once they were sized and each’s PV production was calculated. The given values refer to each location, weather station, contracted power, solar and storage capacities, annual consumption and resulting annual PV production.
2.4. Home, Community and VPP Operation
After scheduling each self-consumption facility on an hourly basis, an aggregated or community-level planning was carried out considering the results obtained in the lower level. Finally, once the whole community was managed the day before, an upper-level management was developed by the VPP operator. Apart from adjusting the deviations between the day-ahead planning (D-1) and real-time operation (D) derived from aFRR-market participation, some strategies were also set during operation in order to maintain SoC within secure values and maximize the revenue for grouping. Remarkably, home and community algorithms were not just performed in D-1 but also in D for re-scheduling 2 h before operating the aggregated plant. Regarding algorithm time horizon, it was run continuously for a whole year, hour by hour.
At the foundation level, a device-level EMS based on the hourly difference (
Edif) between PV production (
EPV) and consumption (
Econ) inputs was developed. The proposed algorithm will charge or discharge each battery (being
Ebat the capacity in kW·h), considering the efficiency (
eff_bat = 90% for both processes) and depending on the current SoC (home SoC) and the value of
Edif each hour. Therefore, a negative value means discharging the battery and a positive (PV > consumption) the charge. Equations (6) and (7) show how the battery is discharged or charged, respectively, for updating the SoC for the next time-step (
t + 1), i.e., the beginning of the next hour:
It is important to remark that the upper and lower SoC limits are set in 85% (maximum SoC,
SoCmax) and 15% (minimum SoC,
SoClim), respectively, in order to maintain the available frequency band (10% up and 10% down). SoC security limits, which aim to avoid severe cycling, are set in 95 and 5%. When SoC limits are reached or will be reached during that time-step, the algorithm generates a variable named
Eint that represents the interchangeable energy between community members and/or market. This variable stores the difference between the energy that needs to be discharged from (Equation (8)) or charged in (Equation (9)) the battery and the available energy or storage capacity for each time-step. When the lower limits are reached,
Eint has a negative value and, conversely, when no storage is available, excess energy is saved as positive. If the battery has already reached limits, all the energy (
Edif) will need to be imported/exported (Equation (10)). On the contrary, if batteries can stand the demand, that time-step,
Eint will be zero. The calculations are carried out as follows:
and
where
Eav represents the available energy in each BESS for each time-step. Its upper (
Eav_max) and lower (
Eav_min) limits are SoC limits in energy values. Through this, the interchangeable energy is calculated by using the presented equations. Hence, this level calculates the hourly SoCs and
Eint, which are the inputs at the community level. Reaching this point, no energy has been auctioned yet as a DM offer (
Emkt_DM), because it is still necessary to evaluate the system at the community level, i.e., to check if energy sharing is possible. In order to have a better understanding of the operation of the home-level algorithm, its flux diagram is shown in the
Figure 2.
Once individual scheduling has been carried out, collective planning starts. This management level takes some of the outputs from the level below as inputs. For instance,
SoChome, which becomes
SoCcommunity, and the interchangeable energy (
Eint:
Eexp[+] and
Eimp[−
]) of each prosumer for each time-step. Once it knows these parameters, the EMS aims to maximize the overall self-consumption ratio by adjusting the existing surpluses–deficits and/or by balancing individual SoCs through different techniques. The results of this community-EMS-level the day ahead are market bidding offers for each hour of the day and, as known, the forecast is considered successful because fixed historical data have been used (a more accurate strategy would need to consider these parameters under a level of uncertainty).
Figure 3 shows the simplified diagram flux of the community-level algorithm.
In this community-level algorithm, three alternatives for energy exchangre have been implemented, which are checked in sequential order:
First check If in a given time-step all prosumers have deficits or surpluses, then all that energy will be needed to be bought or sold. Therefore, the sum of
Eimp/
exp will be the bid offer that hour to the DM (Equations (11) and (12)). Typically, this may happen during night hours when the battery is fully discharged and energy demand exists or, conversely, during sunny hours with low consumption and fully charged BESS.
Second check If in a given time-step there are prosumers with energy deficit and surplus, then the excess (
Ecloud_surp) and deficit (
Ecloud_def) energy would be stored in the cloud, as shown in Equations (13) and (14), for a later proportional share (
Eshared). The shared energy would depend on the amount of energy stored in both clouds so, as shown in
Figure 3, if surpluses exceed deficits, all individual surpluses will be shared and, conversely, if deficits exceed surpluses, all these will be given to users with an energy deficit; i.e.,
Eshared will be
Eexp or
Eimp, respectively. In case surpluses and deficits do not match, an equitable share will be programmed as shown in Equations (15) and (16). By these, it is aimed to maximize the overall self-consumption ratio while promoting fair participation. This energy sharing is conducted through the existing utility grid and, therefore, the corresponding energy-access toll per each power unit will need to be paid. When the hourly surplus is higher or lower than the existing deficits, the difference between these is saved and individualized as
Esurp lor
Edef, respectively, as shown in Equations (17) and (18). These parameters are converted to
Esurp_comm (remaining surplus energy) and
Eneed_comm (remaining deficit energy), which are the ones that are checked for a third time before sending the definitive offer to the DM (
Emkt_DM). Typically, this may happen during mid-day hours when consumption patterns among prosumers differ a lot.
Third check. If in a defined time-step prosumers with energy deficit/surplus or high/low SoC exist, the battery will discharge to cover deficits or charge batteries. In the first case, if any prosumer’s SoC is between 70–85% and its demand is expected to be covered during the day (to avoid purchasing during expensive hours), then this will make available (Eav_comm) its battery to discharge up to 70% so as to cover totally or partially others’ deficits (Eneed_comm), as shown in Equations (19) and (20). Then, in the same manner as the second check, proportional sharing is programmed (Ecommunity) and remaining hourly deficits are bid to the DM as shown in Equations (21) and (22), respectively. Conversely, if any prosumer’s SoC is between 15 and 30% and others still have surpluses, as long as both are expected to cover their demand during that day, this will charge the battery until all hourly surpluses are harnessed (see Equation (23)). In this case, no market bid would be sent because all surpluses would have been utilized and there would be no energy deficit. Therefore, the only expense corresponds to the shared energy. In this case, the energy sharing is conducted through the existing grid, which requires that tolls be paid.
Once all of the community has been managed, the corresponding hourly DM offers would be sent to the market operator. At this point the energy purchase is programmed in order to minimize grid-intake expenses. Hence, the DM scheduling only seeks to offer uninterrupted supply by adjusting the community. In fact, this trading optimization, which can be regarded as energy arbitrage, is carried out by the VPP operator by means of different strategies that are presented in
Section 2.5. As to variable communication with the VPP operator, the ones transferred are the updated SoCs (
SOCcommunity) and hourly bids (
Emkt_DM) the day before and the global SoC of the operation day (
globalSOCreal), which is the weighted average of the individuals (
SOCcommunityactualizado) once re-scheduled in the community on a real-time basis (see
Figure 4).
The role of VPP operators is to balance the community operating in the target markets. Therefore, his two main tasks consist of dealing with the imbalances caused by FRR markets in the day-ahead scheduling and maximizing the economic revenue of his portfolio during operation.
Deviations occur because FRR participation hourly modifies the SoC of the batteries by increasing it when regulation is downwards (energy absorbed from the grid because production > demand) and decreasing it when regulation is upwards (energy poured into the grid because production < demand). In addition, energy arbitrage for SoC control and off-peak-hour purchase strategies have been implemented.
Figure 4 shows the simplified step-by-step methodology.
Hence, after describing the developed methodology, the following section focuses on explaining in detail the DM participation of the community. This comprises bidding proceedings and the followed sequence in order to contextualize CIM adjusting.
2.6. Continuous Intraday Market Participation
CIM intervention consists of sending a bid hourly to the market during the operation day with a margin of two hours. Several factors intervene in such offers in this case study. For instance, FRR SoC deviations, schedule adjustments derived from the aforementioned and optimization strategies implemented by the VPP operator.
FRR or secondary reserve services every hour modify global and, therefore, individual SoC curves; this is the reason why re-scheduling is necessary at the community level. A 10% up−10% down frequency band is reserved for such services so individual limits already consider this requirement. The requested percentage of the frequency band and the retribution perceived are fixed data but are entered as unknown in the algorithm, i.e., these parameters just affect during operation as in reality no anticipation is possible. Therefore, this level of the proposed algorithm is divided into two processes, the re-scheduling and the optimization:
The re-scheduling process is based on operation-day planning with real SoC values. At this point, the current SoC of all batteries is already known and, therefore, it is possible to schedule more accurately, at least for the oncoming two hours, having just as uncertainty frequency-service deviations of the next two. Through this process real deficit/surplus and exchanges are estimated and communicated to the VPP operator so that they correct DM offers in the CIM and the final plan complies with all requirements.
Optimization strategies aim to maximize the profitability. Two main strategies can be distinguished:
Hence, the developed EMS comprises a community scheduling into a VPP configuration whose timeline goes from the day-ahead planning (D-1) to a real-time operation (D) that can effectively work thanks to CIM anticipation (Dt + 2). DM offers added to CIM adjustments and strategies represent the final bids, which are later translated to a daily economic balance. Finally, a definitive hourly SoC value is obtained.
Figure 7 summarizes the variable communication between stages: