**1. Introduction**

Electricity market (EMs) are a complex and continuously evolving reality—new players are emerging and new strategic behaviors are gaining more active roles, meaning that researchers and practitioners did not ye<sup>t</sup> solve the problems associated with this new reality [1,2]. Chief among these problems are the ones related to the increase in non-dispatchable renewable generation, or variable renewable energy (VRE), such as solar and wind power. VRE is characterized by substantial investment costs, but near-zero marginal costs, and grea<sup>t</sup> variability, thus increasing the uncertainty of the net load. VRE is normally the marginal resource, since it is operated at maximum capacity (taking into account the weather conditions). These characteristics have a strong influence on the outcomes of energy markets, reducing market-clearing prices [3]. Accordingly, existing market designs should be analyzed to determine if they are still efficient to deal with high levels of VRE (see, e.g., [4–6]).

The question of a suitable day ahead market design for a better integration of VRE has been the subject of a grea<sup>t</sup> deal of research (see, e.g., [7–10]). For the particular case of an effective gate closure, the potential solution discussed by the research community involves its adjustment to a time closer to the first hour of delivery. The main reason behind this adjustment is related to the forecast of renewable generation, which typically presents large errors for long time horizons, due to the stochastic nature of the atmosphere. Since the day-ahead market (DAM) closes typically at 12:00 p.m. (CET), the bids of wind power producers need to be performed through power forecasts computed at least 12 to 36 h ahead. Consequently, the adjustment of the gate closure is very important to enable a fair participation of VRE in EMs, since all energy producers (dispatchable and non-dispatachable) participate in the day-ahead market under the same rules. In case the energy production differs from the commitments resulting from the DAM, the differences should be balanced in the intraday market and/or the balancing market.

In 2014, the International Agency of Energy (IEA) presented a report about energy markets and renewable generation [11], scoring key EM features according to eight dimensions: non-VRE dispatch, VRE dispatch, dispatch interval, last schedule update, grid representation, interconnector managemen<sup>t</sup> and system services definition and market. Half of these dimensions are directly related to the improvement of forecasts, namely dispatch interval, grid representation, interconnector managemen<sup>t</sup> and last schedule update. IEA considers that all physical transactions should be performed through implicit auctions in a centralized pool without feed-in-tariffs (FiTs) or other incentives to renewable energy sources (RES), with an interval up to 10 min using updates up to 30 min before real-time operation. In addition, the reserve requirements should be computed stochastically, taking into account different scenarios for the share of VRE, and be remunerated through marginal pricing. Furthermore, dispatch intervals should be reduced—that is, should be as short as possible—to enable VRE producers to perform high accurate forecasts. Such market modifications can contribute to a new paradigm—a paradigm of VRE integration without FiTs, where VRE investors do not have a guaranteed return, being remunerated by the market price, and subject to the paymen<sup>t</sup> of penalties for their deviations.

In 2016, the European Union (EU) presented the "Clean Energy for all Europeans", a package of measures to promote the integration of renewable generation and to harmonize the European markets. In 2017, the EU presented a new proposal for regulating the pan-European market [12]. Article 7 considers that market operators should trade as close as possible to real-time operation, and no later than the gate closure of the intraday cross-zonal market. In [13], we presented an overview of the potential effects of the new EU proposal on the integration of renewable generation. In [14–16], we analyzed the impact of both high levels of renewable generation and significant forecast errors on the outcomes of the DAM. As a preliminary result, we conclude that a gate-closure closer to real time operation is beneficial to wind power producers.

This article builds on our previous work on market design. It considers a specific market design element, namely the gate closure, and investigates how changes in this element can better accommodate the increasing levels of renewable generation. Specifically, this article analyzes the impact of both wind power forecast uncertainty and a change in the gate closure of the DAM, from 12:00 p.m. to 2:00 p.m. (CET), on the day-ahead market prices and also on the outcomes of the balancing market. The proposed gate closure encompasses two perspectives. The first is related to technical requirements. In a power system with a significant number of conventional power plants, there is a need of a certain lead-time to adjust generation levels in a cost efficient manner [17]. The second perspective is related to the most reliable meteorological information to feed the wind power forecast systems.

This article presents a simulation-based study conducted with the help of an agent-based tool. Multi-agent systems (MAS) are a somewhat new area of study (see, e.g., [2,18]). MAS are fundamentally coupled networks of computational agents that cooperate to resolve issues that are over their individual competence. Theoretically, MAS are an optimal fit for the distributed structure of liberalized energy markets. Accordingly, the work presented here makes use of a multi-agent simulator for competitive energy markets, called MATREM [19,20] (MATREM stands for Multi-agent Trading in Electricity Markets). The following aspects are examined in the paper, in order to assess the benefits of postponing the gate closure of the day-ahead market:


In addition, the following questions are addressed in the paper:


The remainder of the article is structured as follows. Section 2 discusses the role of wind power forecasts in energy markets. Section 3 presents an overview of the MATREM system, focusing on the

day-ahead and the balancing markets. Section 4 describes the method considered in the experimental work, highlighting the main tasks and the relationships between them. Section 5 presents the case study and discusses the simulation results. Lastly, in Section 6, some conclusions are drawn.

### **2. The Role of Wind Power Forecast in Day-Ahead and Balancing Markets**

In order to maintain high standards of service quality, in particular in what regards the security of supply and the system robustness, the system operator must be aware of the current and future values of wind power for each area and connection points of the grid [21]. Currently, an efficient and safe operation of power systems [21,22] requires that wind power production be well forecasted, and, when coupled with a load forecast system, both should enable the reduction of the need to balance the energy in the reserve markets, usually at high costs. During the past few years, numerous approaches have been developed for wind power forecast based on numerical weather prediction (NWP) models. Comprehensive reviews are presented in the literature (see, e.g., [23,24]). NWP models, as the Fifth-Generation Penn State/NCAR Mesoscale Model (MM5) [25], resolve the formulations that rule the state of the atmosphere using numerical methodologies.

Notwithstanding the advances on NWP, systematic errors still persist due to the inherent chaotic behaviour of the atmosphere, in which minor errors, at an early stage, will increase in the deterministic chaotic system. For a long time horizon, this situation could result in a large deviation of the forecast when compared with the observation [26,27]. This drawback can be partly explained by the physical formulation and parametrization of the atmosphere processes, the initial and boundary conditions (IC), among others. In fact, as indicated by several authors, one of the main sources of error and uncertainty, when numerical mesoscale models are applied, is derived from the ICs that feed the model, which are essentially atmospheric information provided by analysis/forecast products. Indeed, several authors have shown that these data have a crucial impact on the mesoscale model outcomes [28–30]. ICs are a three-dimensional set of meteorological data to force the boundary conditions of the model, and together with a terrain and roughness database, enable for conducting numerical physical simulations, for the region under analysis, in a time horizon comprising the day-ahead market. The ICs are obtained from global atmospheric models, such as the global forecast model system (GFS), with both a low time (6 h: at 12:00 a.m., 6:00 a.m., 12:00 p.m. and 6:00 p.m. UTC) and low spatial resolutions (e.g., 50 km) [31].

With the increasing levels of VRE generation in EMs, the underlying impact of wind power forecast into the power system has been explored by several authors. For instance, in [27], the authors studied the certainty gain effect of a wind power producer that participates in the day-ahead market, by delaying the forecasts according to NWP data availability. The results obtained demonstrate that NWP data availability determines the wind power forecast accuracy in the day-ahead market. In [6], by using a case study where wind parks are allowed to participate in the Portuguese tertiary reserve, the authors concluded that changing the market time unit from 1 h to 15 min reduces their imbalances about 10%. Thus, schedule updates as close as possible to real-time operation may strongly reduce the effect of forecast errors. However, the majority of the physical transactions of energy are performed in the day-ahead market (around 90% in Europe [32]), meaning that intraday markets (in Europe) and real-time markets (in the United States and Australia) have been less attractive, despite the fact that they allow schedule updates closer to real-time operation. Balancing markets operate essentially in real time and have attractive prices, when compared to spot markets, but have less liquidity (smaller trading quantities). A study conducted in Denmark [33] concluded that the participation of wind power producers in balancing markets increases the wind energy value [34] only 4.5%. However, some preliminary results (see, e.g., [35]) indicated that a suitable day-ahead market design can contribute to a large increase in the wind energy value, mainly by reducing the penalties paid with deviations.

This article explores the adjustment of the DAM gate-closure considering wind power forecasts according to the typical availability of the IC meteorological data. Currently, the Portuguese wind farm producers may participate in the Iberian day-ahead market by considering forecasts based on meteorological information obtained 18 h before the first trading hour (see Figure 1). To accomplish the technical requirements, such as the unit commitment and the time needed to perform all the steps necessary to obtain the wind power forecasts, the proposed new gate closure time is set to 2:00 p.m. (considering the 12:00 p.m. IC conditions). This adjustment can be favourable to deal with the variability of stochastic energy sources [36–38].

**Figure 1.** Global Forecast System (GFS) data availability and DAM design: (**top**)—actual; (**bottom**)— proposed in this work.

### **3. The MATREM Simulator**

The major components of the MATREM system include a day-ahead market, an intra-day market, a futures market, a balancing market, and a marketplace for negotiating the terms and conditions of "tailored" bilateral contracts [19,20]. The system supports seven types of market entities: generating companies (GenCos), retailers (RetailCos), aggregators of VRE, coalitions of consumers, traditional consumers, market operators and system operators. All entities are modeled as software agents.

GenCo agents may own one power plant or a set of power plants with different technologies. Typically, they sell energy in the day-ahead market and the intra-day market—that is, the centralized markets—as well as in the bilateral market—the futures market. RetailCo agents buy energy from GenCos in the centralized markets as well as in the futures market, and subsequently, re-sell that energy to private consumers (by signing bilateral contracts with them). Aggregators of VRE allow the participation of wind power produces and other types of VRE producers in the centralized markets. Coalitions of consumers are essentially alliances of end-use consumers with the goal of reducing their energy cost, typically by increasing their bargaining power. Large traditional consumers can trade energy in the centralized markets and the bilateral market, while small traditional consumers may ally into coalitions or establish private bilateral contracts with retailers.

The day-ahead market is cleared one day in advance—that is, in day D for each of the 24 h of the next day (D + 1), as illustrated in Figure 1. The intraday market is a short-run market involving several auction sessions. Typically, both markets operate according to the system marginal pricing algorithm, although MATREM also supports locational marginal pricing. Supply-side agents compete by submitting offers to sell energy while demand-side agents submit offers to buy energy. The system ranks the selling offers by increasing price and the buying offers by decreasing price, obtaining the supply and demand curves, respectively. Next, the market operator computes the market-clearing prices and sends the results to the system operator, who checks (in a preliminary way) the security constraints.

The stability of the power system is a task associated with the system operator. To this end, this agen<sup>t</sup> needs to take access to reserve capacity for the provision of system services. MATREM considers three different types of reserve capacity: primary reserve (or frequency control

reserve), secondary reserve (or fast active disturbance reserve), and tertiary reserve (or slow active disturbance reserve). Tertiary reserve has to be available within 15 min and its activation is carried out manually—this type of reserve is the most important for the work described here.

Tertiary reserve is traded by the system operator in a day-ahead tender. This agen<sup>t</sup> defines the needs for up and downregulation, receives the offers from the balance responsible parties, and computes the market-clearing prices by using a simplified version of the system marginal pricing algorithm. Two different simulations are performed, one for computing the upregulation price, and another for determining the downregulation price. Following the clearing process, the system operator can perform an imbalance settlement process.

The futures market is an organized market for trading standard bilateral contracts. Such contracts are agreements by which the parties take on the obligation to buy or to sell electricity, in a standardized quantity and quality, on a predefined date and place, at a price agreed in the present. The bilateral marketplace allows private parties to negotiate the terms and conditions of tailored (or customized) long-term contracts, specifically forward contracts [39] and contracts for difference [40]. To this end, market participants are equipped with a model that handles two-party and multi-issue negotiation [41,42].
