scieee AI-readable full text Open interactive document viewer

Intent Profile Strategy for Virtual Power Plant Participation in Simultaneous Energy Markets With Dynamic Storage Management

Aguilar Guisado, Juan; Bordons Alba, Carlos; Arce Rubio, Alicia; Galán, R.

Abstract

The emergence of distributed energy resources in the electricity system involves new scenarios in which domestic consumers can be aggregated in virtual power plants to participate in energy markets. In this paper, a reconfigurable hierarchical multi-time scale framework is developed by combining the concepts of dynamic storage virtualization and intent profiling with model predictive control. The combined implementation of these concepts allows the simultaneous weighted participation in different energy markets, not only according to some aggregators’ criteria, but also to several risk factors. In a first stage, the framework optimizes the strategy for bidding in day-ahead market whereas the second one consists of a control stage to mitigate deviations and potential penalties. The smart management of individual storage virtualization enables the participation in the demand-response program, which improves the forecasted economical profit related to the day-ahead participation. The changes in the schedule are performed considering new potential penalties. The framework is reconfigurable at every sample time at control stage. This enables to make dynamic participations depending on node availability or system peaks. The proposed case studies cover day-ahead and demand-response participations, but the framework is open to other multi-service configurations. The results have been assessed with satisfactory conclusions.

Full text

IEEE POWER & ENERGY SOCIETY SECTION Received December 22, 2021, accepted February 23, 2022, date of publication February 28, 2022, date of current version March 4, 2022. Digital Object Identifier 10.1109/ACCESS.2022.3155170 Intent Profile Strategy for Virtual Power Plant Participation in Simultaneous Energy Markets With Dynamic Storage Management JUAN AGUILAR 1, C. BORDONS 2, (Senior Member, IEEE), A. ARCE3, AND R. GALÁN4 1Department of Systems Engineering and Automatic Control, Universidad de Sevilla, 41004 Sevilla, Spain 2ENGREEN, Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, 41004 Sevilla, Spain 3Ayesa, 41092 Sevilla, Spain 4Fundación Ayesa, 41092 Sevilla, Spain Corresponding author: Juan Aguilar ([email protected]) This work was supported by the Ministerio de Ciencia e Innovación, Agencia Estatal de Investigación (AEI), through the project SAFEMPC, under Grant PID2019-104149RB-I00/10.13039/501100011033. ABSTRACT The emergence of distributed energy resources in the electricity system involves new scenarios in which domestic consumers can be aggregated in virtual power plants to participate in energy markets. In this paper, a reconfigurable hierarchical multi-time scale framework is developed by combining the concepts of dynamic storage virtualization and intent profiling with model predictive control. The combined implementation of these concepts allows the simultaneous weighted participation in different energy markets, not only according to some aggregators’ criteria, but also to several risk factors. In a first stage, the framework optimizes the strategy for bidding in day-ahead market whereas the second one consists of a control stage to mitigate deviations and potential penalties. The smart management of individual storage virtualization enables the participation in the demand-response program, which improves the forecasted economical profit related to the day-ahead participation. The changes in the schedule are performed considering new potential penalties. The framework is reconfigurable at every sample time at control stage. This enables to make dynamic participations depending on node availability or system peaks. The proposed case studies cover dayahead and demand-response participations, but the framework is open to other multi-service configurations. The results have been assessed with satisfactory conclusions. INDEX TERMS Energy, mathematical programming, optimization, predictive control, smart grid, virtual battery, virtual power plant. NOMENCLATURE DER Distributed Energy Resource. VPP Virtual Power Plant. DA Day-Ahead. RT Real Time. DR Demand Response. DRP Demand Response Program. MPC Model Predictive Control. EN Energy Node. P2P Peer to Peer. IP Intent Profile. DSV Dynamic Storage Virtualization. TSO Transmission System Operator. The associate editor coordinating the review of this manuscript and approving it for publication was Pierluigi Siano . SO System Operator. PV Photovoltaic. EMP Energy Management Platform. SOC State of Charge. PR Penalty Reduction. I. INTRODUCTION Nowadays, the emergence of Distributed Energy Resources (DERs) in the energy system is a fact. Affordable prices for clean energy technologies, external factors such as governmental incentives, new policies to enhance the participation in energy markets or the liberalization of the electricity [1] have enforced the concept of prosumage. Prosumages are domestic electricity consumers with Photovoltaic (PV) panels which also have energy storage [2]. They now have the VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ 22599 J. Aguilar et al.: Intent Profile Strategy for Virtual Power Plant Participation in Simultaneous Energy Markets possibility to participate individually in energy markets, but the participation could be restricted due to requirements of infrastructure or low bid volume limitations. In this context, the aggregators handle the difficult task of building Virtual Power Plants (VPPs) [3] with different prosumages, also known as Energy Nodes (ENs), to participate in several energy markets such as Day-Ahead (DA), Real Time (RT), Demand Response Program (DRP) or ancillary service, among others. In [4], a review of hierarchical control strategies for the operation of VPPs was presented. This type of strategies has also been developed for the optimization of the bidding in DA market by the use of a hierarchical Model Predictive Control (MPC) [5]–[7]. In this line, Kong et al. [8] described different two-layer models to handle the optimal bid in DA as well as a strategy to control the penalties. A bi-level model was also presented in [9], whose resolution results in a Nash equilibrium. The upper level deals also with the profit maximization whereas the lower level maximizes social welfare. Other strategies have also been explored such as the use of meta-heuristics [10], genetic algorithms [11], Stackelberg game models [12] or bi-level programming models [13]. Moreover, these control techniques can be used not only to optimize profits, but also to enable isolated power systems to operate in standalone mode [14]. Attractive tariffs and savings on energy bills are the key to getting the end-users involved in energy markets. In [15], Ferreira et al. highlighted that consumers are sensitive to cost savings and more than 80% of them have considered the possibility of using automatic controls for some domestic appliances schedule. Thus, it is necessary to explore new business models [16], [17] to find the equilibrium between a profitable operation for utilities as well as for individual prosumages. The virtual aggregation of spare storages which have been installed in private households could be profitable with the appropriate feed-in tariff according to [18]. The motivation for VPPs to participate in DRP can be due to the need to solve stability problems in power systems [19] or to market incentives. The strategies for the management of Demand Response (DR) actions have drammatically changed with the arrival of generalized demand-side resources [20]. In DR context, the action of modifying electricity usage due to market incentives was defined as Price Driven Demand Response [21]. The load shifting approach [22] has been the chosen one for the implementation of DR system in the scope of the current paper. Predictive control [23], stochastic approaches [24] or the use of internet data centers [25] defined new alternatives to classic implementations to interact with DRP. Multi-service approaches [26] encourage the allocation of the total capacity of a VPP in different markets simultaneously to improve the economic operation revenues. However, sharing the capacity allocation increases possible penalties, so the operational strategies should be both optimal in profit and resilient to possible deviations. It is also important to consider Peer to Peer (P2P) communication in the optimization of the bidding process and the later control strategy to share the excess energy among the ENs. Regarding this concept, [27] presented a hierarchical P2P model to reduce the total operation cost and [28] defined an auction mechanism for P2P local Energy Trading using Bayesian Game Theory, optimizing each prosumer bid. The strategy considered in the scope of this paper also handles the possibility of considering P2P cost as another variable to optimize the behaviour of the grid. The motivation of this paper is to provide a robust and flexible strategy which helps and improves the VPP System Operator (SO)’s performance when participating in multiple energy markets simultaneously. The main objective is to improve the operation of VPPs in these energy markets to obtain the benefits of not wasting clean energy by operating optimally with their excess energy. The proposed VPP considers different ENs with photovoltaic generation, nonregulable loads and an energy storage system composed of a battery which acts as a buffer. The innovation of the current paper resides in the introduction of strategies based on Intent Profiles (IPs) combined with Dynamic Storage Virtualization (DSV) to optimize the bids for simultaneous energy markets (in the scope of this paper: DA and DRP participation) not only according to economical indicators, but also according to some risk factors. This improves the flexibility of the powerful two-stage hierarchical formulation methodology present in the current state-of-art. To do so, a reconfigurable twostage hierarchical multi-time scale framework is developed by using MPC multi-service integrated participation. DR optimizations can be performed at any time during the control stage since the three algorithms are integrated but completely decoupled. Although DA and DRP services have been the ones selected for the purpose of this paper, the inclusion of other optimal participations, such as ancillary services, is absolutely possible. The decision to include any additional energy service depends on the SOs’ business models and the billing policy for their end-users. The main contribution of this paper is the integration of a multi-service energy market participation by introducing the flexible approach of combining IPs and DSV to optimize the participation at both bid and operation times and to improve the flexibility of the powerful two-stage hierarchical formulation methodology present in the current state-of-art. Although the combination of DA, ancillary services and DRP of VPP participation has been discussed in many works, no approach including similar concepts to IP and DSV has been presented yet, to the best of the authors’ knowledge. The final purpose of this framework is to provide end-users with the ability to allocate their excess energy in their preferred energy services, as well as to provide SOs with the ability of managing the energy efficiently and smartly. The work presented in this paper defines a flexible and customizable architecture, extensible by the use of software decorator patterns. A stochastic layer has been built on top of the deterministic problem to improve the robustness of forecasting services and reduce the uncertainties inherent to this type of agents, which has been published in [29]. This layer has been developed using a combination of 22600 VOLUME 10, 2022 J. Aguilar et al.: Intent Profile Strategy for Virtual Power Plant Participation in Simultaneous Energy Markets chance-constrained formulation and machine learning. The combination of IP, DSV and stochastic programming (to reduce uncertainties) has yielded satisfactory results. The structure of this paper is as follows. First, the framework is defined in Section II. Section III presents the problem formulation. Then, Section IV addresses some case studies. Finally, the conclusions of this paper are drawn in Section V. II. FRAMEWORK DEFINITION A. SYSTEM DEFINITION A proposal of ENs implementation is detailed in [30]. The only requirement for the ENs is to have all the necessary technical infrastructure to inject the excess energy. However, the lack of other optional devices, such as some metering or storage devices, may affect the final performance. In this paper, an implementation is proposed where every EN is composed of PV panels and a battery managed by an inverter and a homeLynk. The inverter and the homeLynk are integrated together for the implementation of offline and stand-alone modes, detailed in the subsection III-B. The homeLynk is a logic controller which allows home connection to different protocols for different purposes, such as home automation or energy metering. The VPP is managed by the SO using an Energy Management Platform (EMP), which was developed for this purpose. The EMP gathers the information from sensors, storage units and forecast services (if necessary) and it performs the algorithm calls. It also handles the communication with ENs and it also schedules algorithm calls during the control stage. B. MULTI-SERVICE AND INTENT PROFILES The optimal baseline is defined as the aggregated bid-profile per hour for a VPP participation in the DA market. SOs need to take the control of the VPP at execution time to follow this baseline in terms of aggregated energy injection and consumption. Given a baseline, positive values define the sample times when the VPP must inject power into the network whereas the negative ones do so when the VPP must consume. The concept of IP defines specific strategies to operate simultaneous energy markets, according to the relation between potential penalties and potential risks of having baseline deviations. For instance, the potential profit of the DA optimization implementing a Conservative IP when running the algorithms will not be as high as using a Risky one, but the overall system will be more resilient to forecast deviations, so penalties will be lower. There is not a discrete categorization of IPs since the number of possible states in the state space is infinite. Defining the optimal IPs configuration is out of the scope of this paper, but it is one of the most interesting research and innovation lines to be accomplished in the near future. Three different IPs have been defined according to the behavior patterns observed in the results presented in [30]: Risky IP, Conservative IP and Mixed IP. Mixed IP is developed by using the concept of DSV presented in subsection II-C. FIGURE 1. DSV with Mixed IP. Thus, SOs decide when to be risky or conservative by using different Mixed IPs depending on their know-how. C. DYNAMIC STORAGE VIRTUALIZATION DSV empowers the use of storage units as energy buffers when operating simultaneous energy markets. The objective function of the optimization problem is to get the best performance for the VPP when participating as a single agent, which could result in certain losses for individual ENs. Thus, the business model must compensate the affected ENs with incentives to set the economic equilibrium among each EN in the VPP. DSV enables the system not only to set different size storage allocations for each service, but also to set battery State of Charges (SOCs) at certain levels at some time checkpoints according to the behavior of the grid. The system under consideration is similar to the one defined in II-A, with a PV panel and a battery for energy storage. Let us consider the Mixed IP to be split into five different time regions as it is shown in figure 1: •Before 7 am. Grid behavior is very predictable because there is not any generation or load power. Real power setpoints must remain near to forecasted ones since there is less activity at homes during these night hours and only constant loads might be working (fridge, heating etc.). Risky IPs are recommended for these kind of time regions. •From 7 am to 10 pm there are three time regions when Conservative IPs are recommended. The first region, from 7 am to 9 am, presents a high risk of uncertainties due to the ordinary early home activity. This is the time when the end-users make their lives at home and may plug in some unexpected very energydemanding appliances. During the second one, from 9 am to 4 pm, the forecasts for PV generation are very high, so any problem in the forecast results would imply large differences between real and forecasted values at execution time. The last region, from 4 pm to 10 pm, is similar to the one from 7 am to 9 am because the endusers arrive home and the demand profile becomes less predictable again. VOLUME 10, 2022 22601 J. Aguilar et al.: Intent Profile Strategy for Virtual Power Plant Participation in Simultaneous Energy Markets FIGURE 2. SO types. On the left, an energy producer SO; on the right, a market participant-producer SO. •After 10 pm, the time region is similar to the one before 7 am, so Risky IPs are recommended again. The hours limiting the different time regions are considered as soft checkpoints. These guidelines are not fixed and their only purpose is illustrative. They are meaningful in depicting the strategy which SOs can consider to operate the VPP, and how they mix the different IPs from a full-day perspective. Soft checkpoints are not stored nor processed in any algorithm execution. Knowing the environmental factors of the VPP, if possible, makes easier to set more accurate IP. The previous Mixed IP is representative of a smart grid fully located in Borkum, Germany [30], but it will differ from other VPPs. The use of IPs makes the DSV independent of any algorithm execution and also is decoupled from any energy service. D. DA OPTIMIZATION SCENARIOS The framework considers four different scenarios for optimizing the VPP participation in DA market depending on network costs and the type of the system operator [31]. •Aggregated Billing, with P2P •Aggregated Billing, without P2P •Individual Billing, with P2P •Individual Billing, without P2P Individual billing is formulated for SOs playing the role of energy-producer, whereas aggregated billing is defined for those working as market participant-producer. Figure 2 shows a schematized version of the two types of SOs. At the operational level, the main difference between the two modes is that the former requires the forecasting of injection and consumption prices for every node, and the latter only requires the forecasting of the prices of the VPP. In fact, individual billing option makes more flexible business models possible with custom agreements for each client. The framework enables SOs to set a P2P cost to consider some network transmission costs in the optimization too. This cost will reduce transmission actions between nodes and reinforce the operations with the external network. P2P prices must also be provided individually, or for the grid, depending on the mode. In this paper, the most complete mode (Individual with P2P) is detailed. The other 3 options are relaxed versions of the complete formulation. TABLE 1. Variables of the DA algorithm. III. METHOD DEFINITION The multi-service proposed in this paper is composed of a DA individual bidding optimization with participation in DRP, formulated in two stages. The first stage optimizes the bidding process in DA. The second stage consists of a control strategy to mitigate deviations and potential penalties (Penalty Reduction (PR) layer). DRP integration takes place during the PR execution time interval and it modifies the proposed baseline in DA by using the piped baseline concept (see section III-C1). The following subsections show the three model definitions in detail. A. BIDDING OPTIMIZATION (DA) The first stage is defined by an optimization algorithm that generates the optimal baseline, presented in II-B. The optimization problem is formulated as a Mixed-Integer Linear Programming based on MPC. This procedure receives the following inputs: •24-hour injection and consumption market price forecast. These prices are provided from external forecast services for every EN or for the whole grid depending on the optimization mode. •24-hour P2P forecast, which is optional depending on the optimization mode. It can be constant, but also specified for every hour and every EN. •24-hour load and generation power forecast of every EN. •Grid topology in terms of physical limitations of every EN, such as storage capacity, charge / discharge efficiency, batteries maximum charge / discharge power and the limitation of the nodes and grid in terms of the maximum allowed power in the connection point to the network. The dynamic of the state variables is given by the equation 1: SOCk(t+1) =SOCk(t+1) +Pcharge,k(t)∗ηcharge,k∗Ts∗100 Capk +Pdischarge,k(t)∗Ts∗100 ηdischarge,k∗Capk (1) where SOCk(t) represents the state of charge in percentage; Pcharge,kand Pdischarge,kare the power charge and discharge respectively given a node k;Tsdefines the sample time; Capk the capacity of the battery; ηcharge,kand ηdischarge,kare the efficiencies given a node with values from 0 to 1, where 1 is ideal. The number of variables depend on the number of ENs and the length horizon, which is 24 for a complete day. The variables are in table 1. 22602 VOLUME 10, 2022 J. Aguilar et al.: Intent Profile Strategy for Virtual Power Plant Participation in Simultaneous Energy Markets There are more details about the linearization process involving the variables in L1 and L2 in [32]. This transformation is necessary due to the different possitive or negative nature of the prices for consumption and injection. The objective function is defined as: max i=tend X i=1 Profit(ti) (2) where tend is the last operation hour. This value can differ from 24, depending on daylight saving events. For the purpose of this paper, tend =24. Profit can be defined as: Profit(t)= K X k=1 Profitk(t) (3) where kis the node index; Kthe total number of nodes in the aggregation. The formulation also considers some network transmission costs (P2P) for a more accurate optimization since the transmission of energy always implies some penalties. Profitk(t)=         (Priceinj,k(t)−PP2Pk(t)) ∗Pex,k(t) for Pex,k(t)>=0 (−Pricecon,k(t)−PP2Pk(t)) ∗Pex,k(t) for Pex,k(t)<0 (4) where Priceinj,k(t) and Pricecon,k(t) are the prices of power consumption and injection of a node; Pex,k(t) the power exchange of a node; PP2Pk(t) is the price of peer to peer actions (the cost of using the network). The optimization problem is subject to the system constraints, defined as follows: 1) POWER BATTERY LIMITS The model considers not only the physical limitations of the batteries and their limits for charging and discharging, but also power node limits that can act as a bottleneck. Thus, Pbat,k(t)<Pbat-max-discharge,k(5) Pbat,k(t)>Pbat-max-charge,k(6) Pbat,k(t)<Conmax −Pgen,k(t)+Pload,k(t) (7) Pbat,k(t)>Conmin −Pgen,k(t)+Pload,k(t) (8) where Pbat-max-discharge,kand Pbat-max-charge,kare the physical limits of the battery; Conmax and Conmin represent the maximum and minimum connection power of a node; Pgen,k(t) and Pload,k(t) are the expected power generation and load of a node. 2) STATE OF CHARGE LIMITS SOCs can be set with a maximum and a minimum value to enhance the life of the battery. Limiting these values would also make the integration with other services easier, since the battery is reserved to perform other energy operations. Thus, Pbat,k(t)>Pk(SOCinit,k)−Pk(SOCmax,k)−Pbat,k(t−1) (9) Pbat,k(t)<Pk(SOCinit,k)−Pk(SOCmin,k)−Pbat,k(t−1) (10) where Pk(SOC) is the result of applying the following unit conversion function from percentage to kWh for a given EN: Pk(SOC)=SOC ∗Capk 100 ∗Ts(11) where Tsdefines the sample time; Capkthe capacity of the battery. 3) AGGREGATION LIMITS The aggregated power exchange of the grid can be defined as: PGRID(t)= K X k=1Pbat,k(t)+Pgen,k(t)−Pload,k(t)(12) B. PENALTY REDUCTION OPTIMIZATION (PR) This second stage is an operational control layer. The system generates all the optimal setpoints for every EN so that the aggregated profile meets as much as possible the contracted baseline to reduce operation penalties. A 10-minute sample time has been chosen for the case study presented in this paper, but this interval is configurable. The control strategy is formulated as a Mixed-Integer Quadratic Programming optimization problem based on MPC. The result defines a set with the following 18 setpoints of every EN, which is the default size of the configurable control horizon. The EMP sends the setpoints to the corresponding homeLynk and they are stored in the inverter, overwriting all the existing ones. The inverter will apply the first setpoint from the internal queue at every sample time until the queue is empty. With these 18 setpoints, the ENs can work correctly even with network failures until they enter standalone mode. In addition, the PR algorithm can deal with these offline nodes as if they were working as expected, so it is possible to keep them in the pool. ENs can present four different statuses: •Online: EN is available without any issue. •Offline: Although it is not possible to establish a connection with the EN, there is no reason why the EN could have some malfunction errors. Most of the time this is related to network connection issues or due to an insufficient data transmission speed. The EN operates with the stored setpoints so it can be maintained in the pool of working ENs of the PR algorithm. •Standalone: The EN has been pulled out manually from the pool, or more than 3 hours have passed (18 sample times) without any successful connection. As a result, this EN cannot be operated and it is not considered in the aggregation. •Read-Only: The EN is able to send the telemetry data, but it cannot be commanded. The node has a frozen setpoint and it cannot be changed. A model is developed in III-B4 to enhance the robustness and to be able to maintain these nodes in the pool. VOLUME 10, 2022 22603 J. Aguilar et al.: Intent Profile Strategy for Virtual Power Plant Participation in Simultaneous Energy Markets Most of the issues which may appear during the control stage are related to data, since the platform is executed remotely and any problem gathering every node SOC, setpoints and short-term forecasts will imply wrong results of a PR execution. The function to be optimized is the difference between the DA profile and the new schedule. Some deviations may occur due to the unavoidable uncertainties in this kind of problems, such as a low accuracy in forecasts for generation or load profiles or the appearance of unexpected malfunction errors. However, the platform is designed to mitigate most of these uncertainties by the use of DSV and IPs. Given this, the optimization function is as follows: min ti+18 X ti DA(t)−PR(t) (13) It is important to remark that deviation penalties when the VPP is supposed to inject energy into the power system are much higher than the ones in consumption [33]–[35]. For this reason, the PR algorithm may consider more deviations in consumption sample times to meet as much as possible the contract during injection sample times. This is possible because of the intrinsic receding horizon of the MPC formulation. All the setpoints of generation and load for EN correspond to a short-term forecast. These values will be more accurate than the ones obtained during bid time on the day before. These forecast values are received at every PR execution so that they could be refreshed to improve the control performance. The optimization problem is subject to the system constraints, defined as follows: 1) GRID CONSTRAINTS These constraints define the power flow equations, enabling the aggregated optimization of all EN participation at every sample time to reduce the deviations related to the current baseline in execution. PGRID(t)= K X k=1 Pex,k(t)+ K X k=1 Pgen,k(t) − K X k=1 Pload,k(t)−PBase(t) (14) The baseline can be modified by DR calls, as it is defined in III-C. In that case, the constraint is slightly changed since the baseline to meet is not the DA one, but the last DR baseline result. The constraint 14 is a generalization of 15. PGRID(t)= K X k=1 Pex,k(t)+ K X k=1 Pgen,k(t) − K X k=1 Pload,k(t)−PDRn(t) (15) 2) ENERGY NODE CONSTRAINTS The first two equations define the exchange limits for every node. The following two constraints establish the unavoidable physical limits related to the battery. Finally, the last two ones determine EN SOCs in different optimization sample times. Pex,k(t)≤Conmax,k−Pgen,k(t)+Pload,k(t) (16) Pex,k(t)≥Conmin,k−Pgen,k(t)+Pload,k(t) (17) Pex,k(t)≤Pbat-max-discharge,k(18) Pex,k(t)≥ −Pbat-max-charge,k(19) SOCk(t)≤SOCmax,k(t)−SOCk(t−1) (20) SOCk(t)≥SOCmin,k(t)−SOCk(t−1) (21) The strategies defined in the following subsections have been designed to enhance the robustness of the overall system. 3) INTRAHOUR EQUILIBRIUM Intrahour equilibrium strategy refers to a strategy to solve issues related to the multi-time intrinsic feature by interpolating deviations for intervals of time of less than one hour (which is the DA sample time unit) and, consequently, minimizing the impact in the following executions. There are two ways to perform the intrahour equilibrium: the average power mode and the energy mode. Regarding the average power mode, the PR algorithm calculates the accumulated average power which the VPP has operated during the current hour at every sample time. If the average power differs from the commitment in DA, all subsequent 10-minute sample times in the same hour must compensate for this deviation as much as possible. Due to the fact that the deviation penalties, when the VPP is supposed to inject energy into the power system, are much higher than the ones in consumption [33], the intrahour equilibrium is only activated for sample times when the commitment in DA is for injecting power. Pref (ti)=                  DA(t)−Pi−1 j=0PK k=1Preal,k(tj)∗Ts 1 Ts −i for DA(t)>0 DA(t) for DA(t)≤0 (22) where iis defined in the natural interval of 0-5 since Tsis defined every 10 minutes. The number of available sample time depends on the PR algorithm execution time. Figure 3shows a full-day simulation with deviations. The series shown in blue color represents the average power for the VPP to exchange during the same hour, but it can be observed in red color that the real setpoints, which were actually commanded to the ENs, are slightly different. The shape of the chart representing this second series is characteristic of a system which has lost its generation source. Consequently, the optimization algorithm will try to 22604 VOLUME 10, 2022 J. Aguilar et al.: Intent Profile Strategy for Virtual Power Plant Participation in Simultaneous Energy Markets FIGURE 3. Comparison between power mean and real setpoints. reduce the deviations without success since the errors do not converge. The PR algorithm can also be configured to work in energy mode instead of in average power mode. In this mode, the algorithm receives an additional parameter: the summatory of the operated energy for each EN during the current hour. This accumulated energy can be read from the smart meter, and it provides the PR algorithm with the necessary context to perform the intrahour equilibrium manually. 4) NON CONTROLLABLE NODES There are some occasions when the ENs are not controllable although they are able to send the telemetry (read-only status, see III-B). However, it would be profitable to maintain these nodes even without controlling them, but adapting the VPP to compensate for their behavior. Two clarifying scenarios could be: •The read-only EN is generating much energy and its load profile is not very demanding. The surplus energy can be saved by other EN. •There is a DR action and the VPP needs the inclusion of more ENs. The model to adapt the VPP to read-only nodes is defined as: Pbattotal ,k(t)=Pbatbat ,k(t)+Pbatnetwork ,k(t) (23) Pbattotal ,k=FSk−Pgen,k(t)+Pload,k(t) (24) where FSkis the observed fixed setpoint due to failures of the node. SOC(t)=                    (SOC(t−1) −Pbat )∗Ts for SOCmin <SOC(t)<SOCmax SOCmin for SOC(t)≤SOCmin SOCmax for SOC(t)≥SOCmin (25) As it is defined in III-B,Tsis fixed to 1/6 (10 minutes). Pbatbat ,k(t)=                                −(SOC(t−1) −SOC(t)) Ts for Pbat-max-charge,k <Pbatbat ,k(t) <Pbat-max-discharge,k Pbat-max-charge,k for Pbatbat ,k(t)≤Pbat-max-charge,k Pbat-max-discharge,k for Pbatbat ,k(t)≥Pbat-max-discharge,k (26) Considering that the real power exchange is the difference between the fixed reference and the power battery that applies to the network, it can be concluded: RSk(t)=FSk−Pbatnetwork ,k(t) (27) Substituting with 23: RSk(t)=FSk−(Pbat−total (t)−Pbatbat ,k(t)) (28) The value of RSk(t) is the real setpoint that the read-only EN is actually performing. PR algorithm considers this value and it adapts the setpoints of the other nodes so that the aggregation could adapt the operation. C. DEMAND RESPONSE PROGRAM INTEGRATION DR algorithm has been designed as an expansion of DA formulation, but absolutely decoupled and independent. SOs can run this algorithm every time that the market makes an offer for an increase or reduction of the consumption from the network. This optimization needs the updated forecast measures and the current VPP state (ENs availability, individual SOCs, etc.). The VPP will try to satisfy the new scenario by modifying the commands of the following hours which were not scheduled to inject, avoiding the impact on injection sample times so that high penalties would be reduced. If it is possible for the VPP to allocate the changes, the algorithm will generate and persist the new baseline in the database, or no solution otherwise. Only if the injection profile is not compromised, DR applies. 1) PIPED BASELINE The proposed DR algorithm modifies the baseline by using the shift-load approach [22] to optimize the new scenario with new prices, grid contraints and EN statuses. The Piped Baseline can be formulated as: PGRID(t)=(PBASE (t)t<tDR1 PDRn(t)tDRn<t<tDRn+1 (29) given t∈ {1. . . 24}. Since the DR request may occur at any time between two PR executions, it is necessary to track the executed profile until the hour of the DR call, and prepend it to the profile projection of this new optimization. At this time, any previous baseline becomes inactive and there is only one active baseline which is the one given by the last DR call. VOLUME 10, 2022 22605 J. Aguilar et al.: Intent Profile Strategy for Virtual Power Plant Participation in Simultaneous Energy Markets FIGURE 4. Piped Baseline with a DR call at 8 am (sample time 48). The yellow section defines the baseline followed until the DR call whereas the blue one represents the new baseline to be tracked for the following sample times. PR algorithm will always track the active baseline at every execution time. In figure 4it can be observed a simulation where a DR call happened at 8 am (48th sample time). PR algorithm tracked the default baseline until this hour. After this call, the active profile will remain the DR solution, which has slight and optimal changes from the original one. Given this, the objective function is defined as: max tend X tDRn Profit(t) (30) where Profit(t) definition is similar to the equation defined in (3), but only considering the sample times that are between the time of execution and the end of the day. The DR service can be called with different intervals depending on Transmission System Operator (TSO) needs. An interval is defined as: •Init hour. •End hour. •Incentive price. •Load offset (positive or negative) to reduce or increase the power during the interval time. 2) PROFILE LIMITS The aggregation must provide the same setpoint values for the won bids to ensure the optimal performance by reducing penalties and to limit conversions. A conversion is defined as the change from consumption mode to injection mode, given a sample time. The only allowed conversion is during the DR interval and only if feeding compensation is enabled, as it is explained in the next subsection. Thus, PDRn(t)=PGRID(t)∀t∈PGRID(t)≥0 (31) PDRn(t)≤0∀t∈PGRID(t)≤0 (32) 3) FEEDING COMPENSATION VS NO-FEEDING COMPENSATION Feeding compensation occurs when the DR optimization changes the value of the established command of one hour from negative to positive. This means a change from a consumption command to a injection one. This should be forbidden since the bid was not won for this sample time during the day before, so the VPP would not be allowed to inject. Nevertheless, this flexibility enables new economic operations and agreements between the TSO and the SO, as well as potential benefits for prosumers. Disabling feeding compensation constraints are given by: PDRn(t)=max(0,PGRID(t)) ∀t∈ {tDRn. . . 24}(33) Different examples of DR executions and how this strategy impacts on the overall profit can be found in section IV. IV. RESULTS In this section, several simulations have been performed to build a comparative study among different scenarios. The algorithms have been implemented by using sparse matrices. These matrices only store indexes with non-zero values, so building models for huge problems will not imply memory or size-dependent issues since the vast majority of the coefficients are zero, and the size of the matrices will not increase as the problem gets more complex. There is not any time leak related to the problem size on real experiments. In fact, the executions that have taken the longest were 8-second long and they did not depend on the number of ENs, but on the fact that the DA profile being tracked was full of 0s. Reaching 0 values can be computational and time demanding to solve the equation and it may depend on the solver implementation (CPLEX, in this case). The servers running the algorithm were medium instances in Amazon Web Service, with 2 CPUs and with a RAM of only 4GB and a 3,3 GHz Intel processor. A. INTENT PROFILE DEFINITIONS AND GENERAL EXECUTION OVERVIEW The simulations presented in this subsection and the following ones have been run with the same configuration. To reduce the complexity, all nodes have been defined with the same specifications: 5 kWh of capacity, 2.3 kW and 4.6 kW for maximum power charge and maximum power discharge respectively. SOCs between 15% and 100%. Consumption prices were obtained from an external price forecast service. To reduce energy transactions, injection energy prices have been set at 80% of consumption prices. Figure 5shows three different IPs: •Risky IP: Represented with a dotted and red curve. Capacity for DA optimization 70%, 30% for deviation mitigation and DRP participation. •Conservative IP: Represented with a green curve. Capacity for DA optimization 40%, 60% for deviation mitigation and DRP participation. •Mixed IP: Represented with a dashed and orange curve. Conservative between 7 am and 22 pm, and risky during other hours. It can be observed in figure 6that the Risky IP schedules the SOCs of the batteries closer to their limits, with more 22606 VOLUME 10, 2022 J. Aguilar et al.: Intent Profile Strategy for Virtual Power Plant Participation in Simultaneous Energy Markets FIGURE 5. Intent profile comparative. FIGURE 6. EN SOCs estimated for Risky IP. aggressive charge/discharge actions, which will result in a more profitable optimization (see subsection IV-B for more details). For the development of this case study, the IPs have been applied to all nodes (aggregated IPs), but it is also possible to apply individual IPs to single nodes with the developed model. B. INTENT PROFILE PROFITS The assessment of the results has been defined as the profit difference in relation to the best IP key performance indicator in every analysis. First, optimality in ideal scenarios is analyzed. Later, several non-ideal scenarios (with high deviations in forecasts) have been simulated to evaluate the resilience of the different IPs. All the executions have been run considering the same data, context and implementation to set a fair scenario. Although the static IPs have different configurations in the case study, they represent how the storage systems are usually configured to participate in multiple energy markets simultaneously. Considering the previous optimizations and the profit definition presented in 3, Risky IP is the highest ranked. Conservative IP performs a 3.97% worse than Risky IP, but Mixed only a 1.85%. Using more complex VPPs, with more nodes and a higher aggregated capacity, the differences will be more evident. Analyzing the estimated SOC values, Mixed IP has much more margin of the battery capacity to operate multi-service FIGURE 7. EN SOCs estimated for Conservative IP. FIGURE 8. EN SOCs estimated for Mixed IP. TABLE 2. Relative deviation compared with best execution. (working between 15% and 70% approximately) whereas the profit remains considerably acceptable, which implies more flexibility and resilience of the system. The margin is better compared to the limits for Risky (too narrow margin, SOCs between 15% and 100%) and Conservative (under use of the storage, SOCs between 30% and 70%). It can be analized more in detail in figures 6,7,8. Three complete-day executions have been run for every IP, defining different load and generation profiles from those predicted for ENs. The executions have been summarized in table 2. Conservative IP is more resilient to forecast deviations in all simulations, the best option to mitigate penalties. On average, Mixed IP is the second and Risky is clearly the worst. As it is explained in the subsection II-B: more potential profits but also more potential penalties. C. PENALTY REDUCTION ALGORITHM MEETING INJECTION Figure 9depicts a complete-day execution where the real values for generation have been submitted as 0 during VOLUME 10, 2022 22607