*2.2. Intraday Markets*

After the day-ahead market, intraday markets accounted for 14% of the energy traded in 2020 [13]. Since intraday spot markets had six times more energy than continuous intraday markets, this work only considers the former. In Table 1, the closing times and delivery hours of the market sessions are shown.

**Table 1.** Intraday market sessions in 2018.


The closing times in Table 1 are the deadlines for submitting offers to the market operator. Decisions must be made before this time. The delivery hours in the table are the hours during which the energy negotiated in each intraday market session will be delivered on day D.

Since Sessions 1 and 2 cover the same hours, Session 1 is neglected as Session 2 has a closer opening time to the delivery. Intraday markets allow agents to correct their schedules in the day-ahead market. This can be performed by purchasing energy during hours when a deviation from the day-ahead program is expected. Arbitrage can also be performed to gain additional liquidity. Both options are considered in the simulation cases.

#### *2.3. Adjustment Mechanism*

Four different deviation costs need to be considered in the Iberian market:


A deviation during an hourly period *h* is calculated as follows:

$$\lambda(h) = |E\_d(h) - E\_c(h)|,\tag{1}$$

where the following apply:


If the deviation is upwards and in favor of the system, the additional energy is remunerated at the day-ahead price during hour h; therefore, the bonus is calculated as:

$$\mathcal{S}(h) = \lambda(h) \* \Pi\_{dM}(h)\_\prime \tag{2}$$

where the following apply:


If the deviation is upwards and against the system, the energy excess is remunerated at less than the day-ahead price during hour h. This bonus is calculated as:

$$\mathcal{B}(h) = \lambda(h) \* \Pi\_{dM}(h) \* (1 - \lambda\_{\text{conf}}(h)),\tag{3}$$

where the following applies:

• *λcoef*(*h*): Coefficient for deviations against the system during hour h.

If the deviation is downwards and in favor of the system, the energy deficit is charged at the same price as the day-ahead price during hour h; therefore, the penalty is calculated as:

$$
\rho(h) = \lambda(h) \* \Pi\_{dM}(h),
\tag{4}
$$

where the following applies:

• *ρ*(*h*): Penalty during hour h (EUR).

If the deviation is downwards and against the system, the energy deficit is charged at a rate surpassing the day-ahead price during hour h; therefore, the penalty is calculated as:

$$
\rho(h) = \lambda(h) \* \Pi\_{dM}(h) \* \left(1 + \lambda\_{\text{conf}}(h)\right). \tag{5}
$$

The total deviation cost is formulated as follows. As can be seen, it can be negative when more energy is available than committed:

$$
\lambda\_{cost}(h) = \rho(h) - \beta(h) \tag{6}
$$

where the following applies:

• *λcost*(*h*) : Deviation costs during hour h (EUR).

The coefficient *λcoef*(*h*) represents the system's vulnerability to deviations against it. A higher coefficient means that a higher penalty will be paid. As seen in (3), if the coefficient is greater than 1, the bonus for upward deviations can be negative, which implies a penalty. During the same hourly period, if downward deviations are against the system, upward deviations are in favor of the system, and vice versa. The deviation coefficient is determined by the system operator and is the same for both types of deviations.

#### **3. Hybrid Plant Model Overview**

The model consists of the physical systems and their control architecture. In this section, the model inputs' generation is described for both wind speed and market prices. Afterwards, the plant model and its control architecture are introduced. Lastly, the daily earning calculation is formulated.

#### *3.1. Model Inputs*

#### 3.1.1. Wind Power

Wind power is obtained through a two-stage approach, as in [15]. First, hourly wind speed is forecasted using a SARIMA; then, forecasted data are fed into a function that expresses a Gamesa G128 wind turbine power curve. The optimization and energy management system (EMS) models directly receive the forecasted and real wind power hourly values.

Wind speed historical data are obtained from Sotavento experimental park in Galicia, Spain [12]. This source was chosen due to its publicly available data and its location within the Iberian market region. The data have a resolution of one hour, and the measured wind speed for the year 2018 is presented in Figure 1.

**Figure 1.** Hourly wind speed historical data for the year 2018.

Hourly wind speed forecasts are required during the opening hours of market sessions. The first forecast is at 12:00 h, when the day-ahead market commences, and subsequent forecasts are generated during the opening hours of intraday market sessions. For real-time operations, actual measured wind speed data are utilized. The SARIMA model utilized in this work has an order of (2, 0, 3)(2, 1, 3)12, obtained from [16]. The configuration process for the model is not covered in this work. Figure 2 illustrates the 2018 average mean absolute percentage error (MAPE) of the wind speed forecasts generated during different market sessions. It is observed that the prediction error tends to decrease.

**Figure 2.** Average MAPE of each wind speed forecast for 2018.

#### 3.1.2. Electricity Price Forecasts

The 24-hourly prices for the next day are predicted at 12:00 h on the previous day. A SARIMA model of order (2, 1, 3)(1, 0, 1)<sup>24</sup> was obtained from [16]. In Figure 3, the predicted and real day-ahead prices for April the 16th are shown. Intraday prices are considered as known beforehand for simplicity.

**Figure 3.** Day-ahead market price forecast for April the 16th.

### 3.1.3. Deviation Prices

The hourly deviation coefficients derived from 2018 historical data are used to calculate the final deviation costs. However, a deviation coefficient is required for the optimization model of intraday market offerings. Since deviation coefficients are only known after the delivery period has ended, a forecasting technique for predicting the direction (favorable or unfavorable) of deviation is required, but it is outside the scope of this paper. Therefore, a deviation coefficient of 21%, the average of 2017, is considered when participating in the intraday market.

#### *3.2. Plant Model Components*

The HF model consists of a wind turbine generator and a BESS.

#### 3.2.1. Wind Turbine Generator

The generation system is a single Gamesa G128 WTG with a nominal power of 4.5 MW. The power curve is taken from [17]. Only a WTG is considered for convenience. Generator converter efficiency is considered part of the power curve characteristic.
