1. Introduction
The smart grid will be the future standard at the distribution level, after generalization of active demand and distributed generation, mainly from renewable energy sources. The spread of automation and control is currently a major challenge for regulators and grid operators and it also opens a large field of opportunities to make a better use of all of the available resources in the grid, in order to achieve a safer, cheaper, and more sustainable electric supply [
1]. In this context and from the demand side, a new player emerges: the aggregator, which could encompass the role of a retailer, a flexibility manager, and a balanced responsible party or market agent [
2,
3,
4,
5]. The participation of the aggregator in the power markets is relatively new since it exploits the flexibility of customers, as well as the optimal management of distributed generation resources. The aggregator needs to solve optimal scheduling and bidding problems to manage their prosumers’ resources and participate in the power markets in an efficient way. However, the approach from the aggregator point of view is new and different from traditional producers and retailers regarding the supply-demand balance, the bounds of the possible imbalance incurred by the aggregator, and the uncertainties involved in the problem. Considering these differences, the optimal participation of an aggregator in sequential electricity spot markets (only day-ahead and intraday markets are considered), with the objective of minimizing the cost of the traded energy is addressed in this paper.
Optimal scheduling problem is addressed in the literature in different ways, for instance the objectives functions including maximization of profits, social welfare, utility for the demands and minimization of energy capacity, and cost of imbalances and operational costs are considered in References [
6,
7,
8,
9,
10]. The focus on the optimal bidding problem involves different objectives, some of which are the minimization of negative returns and the cost related to emissions in [
11], evaluation of different prosumer risk tolerance in [
12], as well as jointly minimizing the risk and maximizing profits in [
13,
14,
15]. The bids to submit to the electricity market depends on the energy market rules and many solutions of the bidding problem result in one optimal price-energy pair [
16] for a certain time period, but a more realistic bid consists of a curve composed of multiple price-energy pairs, as that presented in references [
17,
18]. There are few documents in the literature concerning both scheduling and bidding problems; for instance, in [
19], a two-stage stochastic mixed integer linear program where the bidding decision is made in the first stage and the scheduling in the second is solved for aggregators that sell electricity to prosumers and buy back surplus electricity in the spot market.
In practice, the aggregator must face some difficulties, mainly related to the uncertainties of the intermittent and non-dispatchable nature of renewable energy sources (RES) generation, but also because the demand and the energy prices cannot be accurately predicted in advance. Moreover, the forecast errors derive unpredictable imbalances between the real-time production/consumption and the energy previously scheduled in the electricity market. Imbalance penalties also depend on the energy market rules. Some works in the literature such as [
20] envisage the likely imbalances leading to unpredicted imbalance costs. In [
7], penalties for failure to supply the market and customers are considered. Penalties due to over-production or under-production status are penalized with different values of a weight coefficient introduced into the model [
12]. In [
19], since they penalize imbalances heavily, the case becomes not realistic because avoiding imbalance is forced. In this formulation, it is assumed that market prices, loads, and generation are known with certainty before the optimal schedule is decided, and they then run a deterministic optimization for the scheduling process, but only market results are revealed. In our work, realistic imbalance prices and day-ahead market results are considered. The penalties due to deviations of a wind power producer are formulated in references [
17,
21], but in our case we are considering an aggregator, and then the problem is different. In [
22], the formulation of deviations and its penalizations is like our proposal, but they assume that only unidirectional bids are allowed for the aggregator in the electricity market, i.e., it can only buy energy but cannot sell excessive energy back to the wholesale energy market.
Participating in intraday markets is a way for any market participant to reduce the forecast error costs, updating previous day-ahead scheduling as in [
23]. The cost of the purchased energy can also be reduced in this market as in [
24]. In addition, the flexibility offered by shiftable demand and battery storage also contributes to an increase of the expected benefit of the aggregator as shown in [
25]. This flexibility allows the aggregator to shift the consumption from peak hours to valley hours, buying energy at low-cost hours, selling it at high-cost hours, and reducing the energy imbalance caused by bid deviation.
The optimal bidding in the day-ahead market taking into account all subsequent markets as intraday or balancing markets is assessed commonly in the literature. However, profit comparisons of taking into account or not the intraday markets when preparing the bidding for the day-ahead market (coordinated or separate bidding) are questioned in previous works, such as [
26,
27]. Additionally, several optimization techniques are widely used to solve the optimal bidding problem under uncertainty, such as modified particle swarm, stochastic, robust, fuzzy, model predictive control in [
7,
9,
28,
29] and other metaheuristic techniques, whose effectiveness and efficiencies considering different initial solution algorithms are compared in [
30]. In [
31,
32], a comparison between the stochastic and robust optimization with the perfect information case is carried out and the results show that stochastic programming provides better solutions. However, new optimization techniques and improvements over the existent techniques are still under research.
The proposed approach solves separate probabilistic optimization problems, which considers the uncertainty of market prices (day-ahead and intraday), RES generation and fixed demand, and takes into account the possible imbalance costs the aggregator may incur. We assume a neutral risk aggregator, because reducing risk through changing operating decisions can be costly compared to financial operations [
33]. The imbalances are regulated by a dual pricing mechanism that implies penalizations for those incurring energy deviations against the system [
34]. The proposed probabilistic approach is based on the formulation presented in [
35] and the work presented in this paper extends the method presented in [
36] by considering the intraday market, and improves the mathematical formulation of the problem.
Our approach differs from other works in the literature and the main difference with related previous works is that we consider an independent bidding strategy in each electricity spot market, which allows taking advantage of both the gain in certainty of forecasts and the knowledge of previous market results. We also take into consideration time dependent constraints. The optimization problems proposed here are set for a whole day aggregator’s portfolio that includes shiftable demand, RES generation, and batteries. A simple modelling of shiftable demand is used with the purpose of testing the method. A thorough modelling of this demand is out of the scope of the paper. Furthermore, the method of aggregating and coordinating the flexibility of customers is out of the scope of this paper, since it requires much information on customers’ behavior and preferences that is not available. The intended contributions of this paper are listed as follows:
- (1)
To propose a simple and effective optimization model that provides hourly optimal bidding curves for an aggregator who manages fixed and shiftable demand, RES generation, and storage devices when participating in the electricity markets (daily and intraday markets), aiming to minimize the daily energy cost.
- (2)
To include in the optimization model in (1) the different uncertainties faced by the aggregator, namely fixed demand, RES generation and market prices, and the possible imbalance costs in which the aggregator may incur.
- (3)
To assess the benefits of the optimization model in (1) over a whole year comparing the yearly payments performed by the aggregator under different strategies using realistic data taken from publicly available sources; case studies based on a whole year with realistic data are not widely assessed in the literature.
The paper continues with some previous considerations regarding the market framework and the uncertainty of the random variables involved in
Section 2. Then, the main assumptions and constraints are described in
Section 3. The formulation of each decision-making problem follows in
Section 4. Next,
Section 5 describes the case study and in
Section 6, the participation of an aggregator in the Spanish electricity market is simulated over a year, considering different strategies in order to assess the benefits of the proposed approach. Conclusions and future work are given at the end of the paper.
3. Optimization Problem Assumptions and Modelling Details
This section presents an overview of the optimization process as well as the constraints that should be considered. The mathematical formulation of the problem is given in the next section.
The aggregator participates in the day-ahead market in order to purchase the net energy for his customers’ portfolio. With this purpose, the aggregator solves a probabilistic optimization problem resulting in the optimal quantity of energy to be purchased (or sold) in each period of time, depending on the market price. Once the day-ahead market is cleared, and the scheduled energy for each period of time is known, it may happen that the constraints related to the flexible demand (shiftable demand and batteries) are not fulfilled, and the aggregator performs an adjustment process of scheduling in order to ensure the fulfillment of constraints within the time horizon. For the intraday market, the aggregator can update his previous market position aimed at minimizing the total cost of the energy, using fresh and more accurate predictions and the knowledge on day-ahead market prices and flexible demand schedule. The complete process of the aggregator’s participation in sequential electricity markets is illustrated in
Figure 1. Note that the day-ahead (DA) and intraday (ID) market clearing processes are performed by the Market Operator (MO), and thus they are external to the aggregator.
In the problem formulation, it has been assumed that:
- (1)
The energy prices in the market are not affected by the aggregator bids, because the market is large enough.
- (2)
The aggregator buys and purchases energy at the same price, i.e., grid access tariffs have not been included. Losses are included, according to the Spanish regulation, as a fixed percentage of the demand, added to the forecasted consumption.
The aggregator must solve two different decision-making problems involving uncertainties, one for the day-ahead market and another for the intraday market. Furthermore, the aggregator must solve two additional optimization problems in order to schedule the flexible demand after the day-ahead market clearing. When solving those problems, the aggregator has to take into account several constraints related to shiftable demand, batteries, RES generation, and energy imbalances, as described next. In the following subsections, all the decision variables are denoted with a superscript s representing a generic scenario s.
3.1. Shiftable Demand
This demand can be shifted over a given period of time but the amount of the daily energy to be consumed is known and previously agreed upon between the aggregator and his consumers through a contract. It could correspond to electric vehicles, or noncritical devices such as washing machines, dishwashers, etc. The optimization process will tend to shift this demand to lower price hours. Regarding this type of demand, (4) defines the total energy consumed by the shiftable demand, for a certain scenario s over a planning horizon of
Nh periods of time. This equation could be reformulated if the periods of time for consumption are limited to a given set (e.g., tariff charging of electric vehicles during the night). Equation (5) models the bounds of the hourly shiftable demand for any period of time
t and scenario
s.
3.2. Batteries
Batteries are modelled in a simple way (rated power, maximum/minimum capacity) as in [
24], but in this paper losses are also included, which are considered as constant. The following constraints must be satisfied for any period of time
t and any scenario
s:
The constraint (6) set the bounds of the rated power. The binary variable
avoids battery charge and discharge at the same time step; it is equal to 1 if batteries are discharging in period
t and 0 otherwise. Constraint (7) set the limits of the storage energy, respectively. Here, the level of battery storage at the end of the scheduling horizon is equal to its initial energy level. It is assumed that
to exploit the flexibility of the batteries during the first periods of time of the horizon. Constraint (8) represents the energy balance in the batteries. Note that no battery degradation costs are considered in this work because we have compared the results from the participation of the aggregator in the power markets for the next day or few hours before the energy delivery time.
3.3. Energy Imbalances
The imbalance which the aggregator could incur is defined as the gap between the energy traded in the electricity market (day-ahead or intraday) and the actual consumption/production. If the actual energy of the aggregator is greater than the scheduled energy in the market, the aggregator’s imbalance is positive, otherwise it is negative. Note that this is different from the point of view of a producer.
As the aggregator’s imbalance makes the problem nonlinear, in order to keep the linearity, Equation (9) decomposes the energy imbalance into positive and negative imbalances, as in [
35,
44]. Constraint (10) set the limits of the imbalances, which could reach the sum of the contracted power (maximum buying bid) and the installed generating power (maximum selling offer) in both senses, for any period of time
t and scenario
s.
7. Conclusions and Future Work
A method for producing optimal bidding curves for an aggregator participating in day-ahead and intraday markets has been presented. The objective is minimizing the payment done by the aggregator for the energy purchase for his customers. The method consists of different optimization problems which considers flexible consumption through shiftable demand and the use of batteries, and takes into account the uncertainty of the forecasts (RES generation, market prices, and fixed demand) and the likely imbalance costs. The overall process is performed in three steps: First, the optimal bidding curves are produced and submitted to the day-ahead market; Second, after the day-ahead market clearing, intertemporal constraints related to the flexible consumption are fulfilled through a rescheduling process; and finally, new optimal bidding curves are produced and submitted to the intraday market, trying to take advantage of the lower lead time and the knowledge gained with the day-ahead market clearing about marginal prices. The payment done by an aggregator participating in the Iberian market, over a whole year, has been calculated and compared with the payments done using different strategies, yielding better results. A thorough analysis is performed comparing the probabilistic strategy proposed in this paper with a more conventional one. Results show that although the deviations in the proposed strategy are higher than in the deterministic one, the overall payments are lower because the probabilistic method tends to produce positive imbalances. This work demonstrates that simple and independent probabilistic optimization problems report meaningful benefits for aggregators participating in power markets.
In the future, we will extend the proposed method to obtain an optimal bidding and scheduling to real cases of urban and semirural grids of small size represented by the aggregator and including electric vehicles, and heating and cooling loads. Moreover, we will perform the assessment of likely scheduling for future scenarios of resources available in these grids.