Battery size determination for photovoltaic capacity firming using deep learning irradiance forecasts

Large photovoltaic (PV) power plants benefit from the introduction of batteries to increase their dispatchability. Among other services, batteries enable PV plants to firm their hourly energy production and avoid in this way the economic penalties associated with deviations between the contracted commitment made by the renewable generator to the grid and the final energy delivered. Due to the increase in the cost of the plant derived from the storage integration, the size of these batteries must be minimized. This work analyses the minimum battery capacity required for such a service when using a new deep-learning irradiance forecasting methodology. The low prediction error of the developed forecasting tool supports the optimized operation of large PV plants under different European intraday electricity markets with no deviations and reduced battery sizes. Results obtained for a whole year analysis using actual data at three different locations with varying irradiance patterns prove that 1-hour capacity batteries grant PV capacity firming in most intraday continuous market structures regardless of their lead times.


Introduction
As penetration of renewable energy sources (RES) increases its share in the power production mix [1], certain capacity firming is going to be demanded by grid operators to renewable power generation plants to eliminate rapid voltage and power swings on the electrical grid [2].The maintained injection of power at a committed level for a period of time can be nowadays achieved in RES plants thanks to the introduction of energy storage systems (ESS) [3][4][5].Among the ESS technologies currently available, batteries highlight in this application mainly due to the price plummeting registered by some chemical varieties, specially those based on Lithium-ion (Li-ion) [6,7].Reports indicate that global energy storage installations for electric grid applications are to hit 15 GW by 2024 [8].Out of this storage power capacity, an important percentage will arise in the form of Li-ion battery energy storage systems (BESS) combined with RES, constituting hybrid power plants.In this sense, although some registered pilot projects combine wind farms with BESS [9], it is clear that PV is taking the lead since it is asserted as the cheapest technology in terms of LCOE nowadays.In fact, it is getting so economical that it starts being very competitive even when hybridized with batteries [10].Examples of such plants are already being installed all around the world, i.e: the Maktoum project in Emirates (with a 1.25 MW / 7.5 MWh Sodium Sulphur battery), the Diamant and the Barzhour projects in France (with 1.5 MW / 2 MWh and 4 MW / 9 MWh batteries, respectively), the Albadyia Power Generation Plant in Jordan (with a 3 MW / 12.6 MWh Li-ion battery), the National Wind and Solar ES and Transmission Demonstration projects in China (with up to 10 MW / 35 MWh in batteries), or the Port Blair project in India (with a 8 MW / 10 MWh Li-ion battery), among others [11].Nonetheless, the country where this industry is skyrocketing is the USA where some regions are getting mature enough to integrate significant amounts of PV installations with BESS [12].California (with the Eland and sPower projects), Nevada (with the Gemini, Southern Bighorn and Arrow Canyon projects), Florida (with the Next Era and Duke Energy projects), and Texas (with the huge Alamo project in San Antonio) can be highlighted.Therefore, BESS are already being implemented in large PV plants with multiple purposes such as: support frequency and voltage control, emulate inertia, peak shaving, and also allowing to smooth out the PV production output or control its ramp rate variations.
At the academic level, the scientific community has largely explored during the last years the sizing problem of the BESS integrated within PV installations aiming multiple targets [13].Proposals cover from the optimal sizing and placement of BESS within distribution networks [14][15][16] to market integration analysis that perform the sizing from a strategic investors perspective [17].Previous works also evaluate behind-the-meter applications [18,19] and off-grid solutions [20].In the same way, sizing proposals are introduced for microgrids like in [21], combining PV panels with diesel generators, in [22] for hybrid PV-Wind installations, or in [23] just for PV but focusing on second life BESS.Likewise, very stimulating works are presented in [24] and [25] that, respectively, analyse the BESS size influence on the cost of a load following application, and the probability of losing the load demand coverage as a function of the battery size.Lastly, an interesting sizing proposal is introduced in [26] to improve the RES generation predictability.
At the same time, references can be found around optimized control strategies for the operation of PV plants with BESS to provide secondary reserve operation [27], ramp-rate control [28] or peak net load management and demand charge minimization [24,29].In the same way, works are published defining how to co-optimize capacities of an ESS and a fast-ramping generator [30] or introducing a general cost analysis of the ESS [31,32].Also, some works deal with electricity market dependant optimizations to maximize the BESS profit while combining services to the grid [33,34], or to compare impacts of utilizing the different ESS models (centralized and distributed) on system operations and quantify operation benefits [35].Still, there are also some remarkable capacity firming proposals combining this service with other goals such as time shifting for PV plants [36]; granting the output power from PV plants is maintained to a fixed cap for every 5 min [37]; or analysing possibilities with dispersed ESS [38].
Finally, a large number of works on solar irradiance forecasting have been reported in the literature.Powerful models providing excellent results are introduced by authors in [39][40][41].However, these are not combined with BESS sizing problems.On the contrary, BESS sizing paper proposals which take into account some kind of RES uncertainty usually adopt very simple forecasting models [42,43].
Altogether, to participate in most of the electricity markets without yielding committed-energy deviations, accurate production commitments by periods should be granted [44,45].This implies using accurate irradiance forecasting techniques such as those based on deep-neural networks (DNN) [46].Then, although some of the works in the literature present titles engaging BESS and PV capacity firming [42,47,48] none of them nor any of the previously cited works proposes the use of any kind of DNN-based forecasting approach in order to profit the low prediction error achieved nowadays with such algorithms [49,50] to analyze the minimum energy requirements of the BESS introduced in a PV power plant to grant capacity firming while traded in different intraday electricity markets.This is the main proposal successfully developed in this work.
The paper is organized as follows: Section 2 summarizes the recent evolution of the European electricity markets to conclude with the intraday electricity structures considered for analysis in this work.In Section 3, the developed DNN-based irradiance forecasting approach is presented.Section 4 describes the optimization algorithm used to drive the constant by hourly periods operation of the PV plant with batteries.Finally, the sizing results are analyzed and discussed in detail in Section 5, followed by Section VI that points out some concluding remarks.

European intraday electricity markets
It is crucial for the correct sizing of the BESS to start by defining the market structure in which the hybrid PV plant is to be operated.European electricity markets have been experiencing important changes in the last 10-15 years.Up until then, electricity spot trading was characterized by different time horizons (lead times) and delivery intervals (settlement times) defined by national transmission system operators (TSOs).However, current market trends point towards a stronger and stronger interaction of countries in their electricity markets.This is being promoted by the European Union in its aim to develop an integrated electricity European market as an efficient instrument to achieve the energy policy targets of security, affordability, and sustainability [51].
In this context, from 2005 onwards there is a clear tendency headed for an increasing share of cross-border trading with other European countries, creating regional Market Areas (MA), and also for shorter lead time to increase trading flexibility [52].Note how the different regional MAs have experienced similar evolutions.For example, the European Power Exchange (EPEX) market was launched to manage the intraday markets for Germany (2006) and France (2007), and their later interconnection in 2010 (reducing at that moment the lead time of both markets by 15 minutes).After that, EPEX SPOT launched the intraday markets in Austria and Switzerland in 2012 and 2013, respectively, to finally integrate the APX Group in 2015 (United Kingdom, the Netherlands, Belgium, and Luxembourg) and settle lead times around 60 -75 minutes on all the participants.Moreover, the huge increase in the amount of power fed-in from fluctuating energy sources in the last years has forced EPEX SPOT to further reduce the intraday lead time in 2017 in all its markets (down to 30 -60 minutes) to enable the power trading agents to react at shorter notice [53].Similarly, NordPool, established as a power exchange for an integrated Nordic power market in 1996 initially comprehending Norway and Sweden, progressively incorporated all the Nordic markets.It successively integrated them with the Baltic markets in the period 2010 to 2013.Nowadays, it also trades electricity in many of the systems initially controlled by EPEX as a result of the European Union decision to allow several power exchanges to operate in the same markets, increasing competition.NordPool also adjusted the lead time in its markets from those required by its Elbas intraday bilateral market in the early years of the decade to the same EPEX SPOT time horizons currently traded through its Elbas 4 intraday trading system.Finally, note how the Iberian Peninsula has also been experiencing in this period a regional integration procedure that generated in 2007 the MA called Iberian Electricity market (MIBEL).This MA is operated by OMIE and OMIP in coordination with the Spanish and the Portuguese TSOs.Once consolidated, MIBEL considered in 2010 2011 the possibility of modifying its intraday market structure to increase the number of sessions (from six to eight) and to reduce lead times (fixed in 135 minutes at that time) to 75 minutes [54,55].The initiative was rejected due to the beginning of movements towards a European integrated internal electricity market.Since 2013, the daily MIBEL market is jointly matched with the rest of European markets using the common clearing algorithm among European power exchanges, EUPHEMIA (Pan-European Hybrid Electricity Market Integration Algorithm) [56].
The EU pushed the different MAs to go one step beyond when it passed the Commission Regulation (EU) 2015/1222 of 24 July 2015 establishing a guideline on capacity allocation and congestion management [57].This law enforced among other relevant points the operating model for the European intraday market, based on two main points: 1.A continuous intraday market that allows energy trading between agents located in the different price zones with implicit allocation of capacity. 2. The development of a methodology to set the price of capacity that reflects the existence of congestion in the interconnection and is based on the prices of the offers.
As a consequence, the ongoing market integration in its most current extension is the Cross-Border Intraday (XBID) market project which was finally deployed in July 2018 and comprises as partners the power exchanges of: EPEX SPOT, Nord Pool, OMIE and GME, together with the TSOs of the participating countries.This project aims to increase the efficiency and reaction times on the integrated intraday market by allowing market participants to gain the ability to balance their H.Beltran et al. generating groups across Europe, leading to lower balancing costs [52].According to its definition XBID is a 24/7 energy trading and capacity management solution designed to enable cross-border intraday trading.In this sense, it is essentially a common IT system consisting of a standard order book (SOB), a capacity management module (CMM), and a shipping module (SM).This system allows the continuous cross-border intraday European trading taking into account the lead times and settlement periods (also delivery intervals) indicated in Table 1.It is operated in parallel and in coordination with some still existing intraday local and periodical auctions.Therefore, the existence of multiple bidding windows that get opened throughout the day at the various interconnected intraday markets empower energy traders to renegotiate their electricity production/consumption compromises in case of need (or commercial opportunity).The European intraday market is in this sense very flexible and plenty of opportunities nowadays.
Among the multiple potential operation frameworks in XBID, the analysis introduced in this work is focused on a plant operated from the MIBEL point of view, i.e. subject to both a continuous intraday market (with 24 hourly sessions), run in coordination with the rest of MAs, and a parallel six-session discrete and very liquid intraday market, only operated within the MIBEL MA.Equally, not only 1 h lead times but also 30-minute and 5-minute time horizons are analyzed in order to cover a wider scenario of operational options.

Irradiance forecasting model
Once the operational framework is defined, it is very important to count on the help of the most accurate available irrandiance forecast to be able to adequately derive the potential hourly PV energy yield.This minimizes the production uncertainty and the associated potential power deviations with regard to the power committed in the electricity market.In this sense, day-ahead and intra-day irradiance forecasts are used to generate both the day-ahead and intraday market power bidding, respectively.Choosing a correct forecasting approach is essential, as different methods perform better for different granularities and forecasting horizons.Hence, the prevailing techniques for intra-day forecasting horizons use satellite data, sometimes combined with realtime measurements and machine learning methods.However, numerical weather predictions (NWP) and ensemble methods present better performances for day-ahead forecasting horizons [58].A varying combination of both approaches is implemented in this work as a function of the respective market structures under analysis.

European centre for medium-range weather forecasts (ECMWF)
The solution by ECMWF uses NWP methods to produce an ensemble of predictions that indicate the likelihood of a range of future weather scenarios [59].They predict the coming 10 days with 1-hour time steps and updated forecasts are available every 12 hours.Although a PV plant could already participate in the electricity market with certain degree of confidence thanks to these forecasts, its operation towards capacity firming can be further improved by using the appropriate forecasting methods for the intra-day operation horizon.

Deep learning approach
Given that machine learning techniques present better performance for intra-day forecasting [60,61], multiple deep neural networks (DNNs) have been designed, tested and compared.Among them, Fig. 1 shows the best performing and therefore selected architecture.It mainly consists of various convolutional layers followed by a few dense layers.The convolutional layers are disposed for extracting features from past estimated-irradiance datasets, which are treated as a series of images that report a value of irradiance for each time instant and at every pixel.The dense layers are used to perform a more general analysis of the inputs and infer the final irradiance forecast for each of the forecasted future time steps.
Note how the main input provided to the DNN, the irradiance estimates of the previous prediction times, is introduced to the initial convolutional layer as 10 image channels.Each of these is a 35 × 35 matrix centered at the target location that covers a squared area of 105 km 2 .These irradiance estimates are obtained by the Surface Insolation under Clear and Cloudy Skies (SICCS) algorithm [62].This is a physics-based empirically-adjusted algorithm developed for estimating the surface solar irradiance from satellite data.Its most important inputs are a cloud mask product and the cloud properties dataset derived from Meteosat/Spinning Enhanced Visible and Infrared Imager (SEVIRI) observations.The convolutional layers, which are able to detect shapes or objects, are used to extract features from the pattern of the clouds in the different images and predict their movement or evolution.
Subsequently, the output of the convolutional layers, together with the rest of inputs required by the DNN, i.e. the calculated top of atmosphere (TOA) irradiance curve for the forecasting horizon and the last 10 estimated irradiance values, are fed into parallel sequences of consecutive dense layers.The resulting forecasts cover time horizons ranging from 15 min to 6 h ahead, with a 15-minute temporal resolution.Accordingly, the forecast can be updated every 15 min, when new irradiance estimates become available.
As shown in Table 2 the developed DNN model outperforms the ECMWF forecasts when comparing forecasts generated simultaneously and for the same horizon.
Finally, it is important to point out two limitations associated to the performance of the DNN.In the first place, it experiences a significant accuracy reduction in the morning forecasts due to the lack of information in the irradiance estimates before dawn.Then, it works with just the TOA irradiance until estimates become significant.In the second place, the DNN only provides a 6-h forecasting horizon while some of the market operations require up to 36-h forecasts.Therefore, the forecasts provided by the DNN have to be somehow complemented when the operation of the plant requires power commitments beyond six hours.To solve both limitations, the forecasting tool implemented in this work combines the DNN results, whenever they are available with high accuracy, with the last update of ECMWF forecasts to cover the rest of hours (initial morning hours and those beyond the 6-h horizon of the DNN).The resulting outlook of the irradance model generated can be appreciated in Fig. 2.This figure shows the measured actual irradiance versus four irradiance models composed by the indicated combination of  The third (red) and fourth (violet) irradiance models introduced keep the same evolution as the second, using DNN accurate output values until ECMWF forecasts are required.This is why all the models present the same values during their last sun hours.Finally note how the more information on clouds becomes available throughout the day, the more accurate the DNN forecasts turn into.

Operation of the PV plant with batteries
The hybridization with BESS is an outstanding solution to grant PV plants with capacity firming and independence from the stochastic and intermittent nature of the solar resource.The power exchanged by these hybrid systems with the grid at any given time instant can be worked out as P grid (t) = P PV (t) + P ES (t). ( where, for every time instant t, P grid (t) is the power fed to the grid, P PV (t) is the power provided by the PV panels, and P ES (t) is the power to be exchanged by the ES to complement PV production.When combined with PV, the BESS is responsible for modifying its production so that the power exchanged with the grid can be shaped more conveniently.In particular, to firm the production and grant its trade in the XBID intraday electricity market, the power production would require a constant-by-hours profile.Therefore, up to 24 different power steps have to be defined for a given day.Ideally, these steps should fit as well as possible the PV production, so that the power exchanged by the BESS is minimal, resulting in lower requirements of BESS energy capacity and/or lower degradation.
If the PV production was known, a strategy such as the one introduced in [45] could be implemented using an optimization problem as the one in (2).This attempts to keep the state-of-charge (SOC) of the BESS as close as possible to a reference SOC (e.g.50%) while satisfying the constraints.
subject for t = 0…288 to: where SOC(t) = E ES (t)/C bat is the state-of-charge of the BESS at any instant; E ES (t) is the energy stored in the BESS in kWh; C bat is the energy capacity rating, also in kWh; SOC ref is the reference SOC; p 1 …p 24 are the 24 hourly power values to be committed to the market; P min and P max are the minimum and maximum values for the power exchanged by the BESS at any instant; and E min and E max are the minimum and maximum values for the energy stored in the BESS.Note that both the cost function and the constraints consider 288 samples because the sampling time is T = 5 mins.
Although the power steps returned by (2) would be those that minimize along the day the mean quadratic deviation of the SOC with regard to its reference value, these cannot be calculated in practice   because the exact P PV evolution is not known in advance.On the contrary, these power steps must be committed with some lead time that depends on the intraday market in which the trading of the hybrid system production is targeted.This implies the use of some kind of prediction model for P PV .
In this work, we propose to cast a new optimization problem for the different considered lead times, t 0 , which benefits from the use of continuously updated information.This is done in two ways.First, the battery SOC (or, equivalently, the amount of energy stored in it, E ES (t 0 )) is measured at t 0 .Second, the future PV production forecast is revised based on the irradiance forecasting model described in Section 3 generated with the most recent meteorological information.These successive optimization problems are formulated as (3).
subject for t = t 0 …288 to: where PPV (t)| t0 stands for the expected PV production at time t with the information available at time t 0 .Note in this case that P grid contains a first value, p k,prev , that represents the power already committed by the plant in a previous intraday market session for the range of time comprehending between the time instant that the optimization problem is cast (t 0 ) and the first time instant with re-scheduled power dispatch (t 1 ).Therefore, p k,prev is not a decision variable for the current optimization problem (as p k+1 to p 24 are) although it has to be considered because it obviously affects the SOC of the battery between t 0 and t 1 .
To illustrate how the proposed algorithm works, let us consider a single day with the actual PV production shown in blue in Fig. 3.The day before, when the daily market is closed, the only available production forecast is that given by the ECMWF model, shown by the dashed black line, which leads to the optimal production commitment shown in red.
However, as the actual PV production is different from the forecast, the plant will benefit from its participation in an intraday market, such as XBID.Consider now for instance the XBID market with a lead time of one hour and its market session closing at 10 a.m., shown in Fig. 4. The optimization problem to be cast would consider t 0 = 120 (corresponding to 10 a.m. with T = 5 mins); t 1 = 132 (11 a.m.); it would take p k,prev = p 11 from the solution of the optimization problem cast at 9 a.m.; and PPV (t)| 120 for t = 120…288 the PV production forecast from 10 a.m. until midnight, with the information available at 10 a.m.At this point, the production forecast for the next 6 hours comes from the DNN and is therefore much more precise (the dashed black line is closer to the blue line than in Fig. 3).Furthermore, from the previous optimization problem (cast at 9 a.m.) the power committed from 10:00 to 11:00 is higher than the expected PV production at the current moment.The algorithm realizes that the SOC of the battery is going to be lower than anticipated and, therefore, the optimal solution provides a power commitment from 11:00 to 12:00 considerably lower than the expected production, in order to bring the SOC closer to its reference value.The rest of the sequence is similarly calculated to remain as close as possible to SOC ref .Note finally how there is a significant change in the production forecast at 16 p.m., due to the explained return from the DNN model reference to the ECMWF one.
Figs. 5 and 6 represent the same intraday session (closing at 10 a.m.) if 30 and 5-minute lead times were considered instead of 1 h, i.e. if t 0 and t 1 are progressively closer to each other.The lower the lead time, the more accurate the available information is when the optimization is cast.This fact turns out in production commitment sequences closer to the actual production, and therefore lower SOC deviations, what will also imply lower energy requirements for the BESS.This can be observed in Fig. 7 which compares, for the considered day, the SOC evolution when different lead times are used.

Results on battery sizing
The performance of the proposed control methodology for the PV plant with BESS has been analyzed at three different locations of the Iberian Peninsula with the goal of performing a BESS sizing as general as possible.The selected locations correspond to three different climatic and irradiance-level regions out of the five defined in the Spanish Technical Code for Building [63].This document splits the Iberian peninsula into 5 zones, mainly classified as a function of the number of peak sun-hours (PSH) registered at them annually.The first location, L1, is on the eastern Mediterranean coast at sea level, belonging to the climatic zone number IV.It presents a total of 1759 equivalent PSH per year on the horizontal plane.The second location, L2, is on the northern Fig. 4. Production commitment on the 10 a.m.session of the XBID market with 1 h lead time.Fig. 3. Production commitment on the daily market.
H. Beltran et al. part of the peninsula at 1000 m above sea level.It belongs to the climatic zone II and presents 1489 PSH.Finally, location L3 is on the north-eastern Mediterranean coast and is again at sea level.It belongs to climatic zone III and presents 1609 PSH.Annual simulations, performed with Matlab® and using actual irradiance values, emulate the operation of the plant with batteries using a time step of five minutes and for different market structures.In this regard, the analysis comprehends four different intraday market configurations, i.e. the one currently run at MIBEL (with six sessions throughout the day, lead times of 2 h 15 min, and settlement periods of 1 h), and the continuous XBID intraday market (also with settlement periods of 1 h) but assuming that three different lead times are accepted: 1 h, 30 and 5 minutes.For each of these configurations, up to six different BESS sizes have been implemented.These comprehend batteries with energy capacities ranging from 4 Wh/W PV to 0.083 Wh/W PV (equating to 4 hours to 5 minutes in accumulation time).In this context, the goal of the analysis is to determine the percentage of time that the PV plant with BESS grants capacity firming throughout the year.Thus, to study the influence of the market structure (number of sessions and lead times) on the battery size requirements.

Simulation results
The annual simulations performed return the SOC evolution indicating when it saturates, what allows accounting for periods of time losing capacity firming.For instance, Fig. 8 represents the daily SOC evolution for each of the 365 days experienced by a 1 h capacity BESS operated at a PV plant in L3 with a XBID intraday market considering lead times of 5 minutes.Note how the SOC never achieves the full charge-discharge state what implies that capacity firming will always be granted, avoiding economic penalties.A smaller BESS would saturate more frequently with the corresponding increased economic penalties.Similar simulations have been carried out for the multiple operational combinations described before to extract some concluding sizing guidelines.Table 3 summarizes the corresponding results.Note how this table compiles, for each of the three locations analyzed, the resulting percentage of time in a year when the PV plant with the different sizes of BESS would not be able to grant capacity firming, incurring deviations with regard to the energy committed in the various intraday market structures (MIBEL discrete 6-session market, and XBID continuous 24session market with lead times of: 1 h, 30 minutes and 5 minutes).
Finally, Table 4 introduces a comparison on the reduction of operational costs that is achieved in terms of avoided energy production deviations thanks to the market structure and to the introduction of a BESS.This table summarizes the amount of annual energy (in MWh) that the PV plant would deviate (over-or underproduction) at L1.This is analysed considering the PV plant makes no use of any BESS and when traded both in the daily market and in the intraday market with 24 sessions.Also, the table compiles results for those two market configurations when a 1 h capacity BESS is introduced in the PV plant.

Discussion
According to the results shown in Table 3, it can be stated on the one hand that the saturation values obtained at L1, L2 and L3 do not significantly differ from each other.Differences among those locations rarely surpass the 10% for any of the analysed combinations.Therefore, although the three locations correspond to different climatic areas within the Iberian peninsula and present varying levels of irradiance (ranging from 1759 to 1489 PSH), their impact on the BESS size determination is somehow minor when compared to the other factors analyzed in this work.This is thanks to the use of the proposed optimization strategy, which makes the need of BESS capacity dependant on the error between real production and prediction rather than directly on the levels of irradiance.
On the other hand, note how the resulting saturation rates for the batteries operated in PV plants within the 6-session intraday market structure are clearly higher than those obtained for the 24-session continuous one.Check for instance how, regardless of the XBID structure considered, the PV plant with batteries will no longer lose control of the capacity firming if BESS presents energy capacities of 2 hours and above; saturation is almost negligible for BESS energy capacities of 1 h; and still very low, under 1.4%, for 30-minute capacities.Likewise, note for the case of allowing a lead time of 5 minutes how PV plants with BESS capacities of as low as 15 minutes would be equally adequate to grant capacity firming most of the year.Conversely, the 6-session intraday structure from the MIBEL MA presents loss of capacity firming even for the 2-hour BESS analyzed, being only negligible for the 4hour BESS case.Even like that, thanks to the DNN-based high performing forecast, results for the latter clearly outperform those published in [45].For instance, note how in the best case considered in that paper, a 0.25 p.u. battery which corresponds to slightly more than 1 h of capacity returned saturation times of around 6%, i.e. more than twice the obtained in this work.
Interesting conclusions can be also extracted from results in Table 4.Note the importance of the market configuration on the reduction of the deviations.With the same forecasting tool, one third of the production deviations are avoided by just accessing the intraday hourly market.
However, also note the great improvement achieved with the 1 h capacity BESS that limits all the annual deviations to 23.1 MWh (out of the 2911.9MWh in the reference case).These deviations would arise throughout the hours integrating that total annual saturation time of 0.18% indicated in Table 3 for L1.
In general, it can be concluded when combining the results in both tables that trading in one market or another is equivalent to increasing the storage capacity by a factor of 2 to 4 in terms of BESS saturation time.Therefore, the BESS energy capacity requirements for the capacity firming of the solar production coming from large PV plants largely vary as a function of the electricity market structure they participate in.In this sense, it would be preferable for a PV plant operated in the MIBEL MA to take part in the European XBID intraday market instead of participating in the regional discrete intraday market.This would imply an important reduction in the plant CAPEX and, consequently, the financial viability of this type of hybridization would be closer to the European scenario.

Conclusions
This paper aims at analyzing the minimal size of the BESS required to grant PV plants with capacity firming for trading at different intraday markets.In this context, the work points out the importance of counting with an as accurate as possible PV production forecast in order to minimize the storage size.Therefore, it proposes the use of a forecast model based on a combination of a deep learning approach, more accurate for the short-term, with ECMWF forecasts, for the longer term.The developed PV production forecast is then integrated within an optimization framework to generate the optimal production commitments to be traded and delivered by the PV plant for different intraday electricity market structures.Annual simulation results are obtained with real measurements of irradiance at three different locations and various market structures and storage capacity ratings.The resulting values indicate the percentage of time throughout the year when the control of the plant is lost because of the battery saturation (losing capacity firming).These confirm that trading in continuous intraday markets, as well as profiting market structures with shorter lead times, allows reducing greatly the size of BESS to be installed in the PV plant to grant capacity firming.In fact, the analysis proves that 1-hour capacity batteries would be large enough to grant PV capacity firming in most intraday continuous market structures regardless of their lead times.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
DNN forecasts performed at different times throughout the day and ECMWF values.Note, according to the previously described model how the first model (orange line) performs worse due to the lack of representative inputs.The second one (green line) already counts with certain information about the clouds, what results in a more accurate forecast provided by the DNN and some final values incorporated from ECMWF.

Fig. 1 .
Fig. 1.DNN structure with convolutional layers for cloud motion detection and feed-forward dense layers to generate forecasts every 15 minutes.

Fig. 2 .
Fig. 2. Measured irradiance (blue) and some of the forecasts performed at the marked hours.(For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Fig. 6 .
Fig. 6.Production commitment on the 10 a.m.session of the XBID market with 5 min.lead time.

Fig. 7 .Fig. 8 .
Fig. 7. Final production commitment and SOC evolution for continuous 24-session intraday market structures with three different lead times.Fig. 8. Annual SOC evolution for a 1-hour capacity BESS in L3.

Fig. 5 .
Fig. 5. Production commitment on the 10 a.m.session of the XBID market with 30 min.lead time.

Table 1
Closing times at the different MA and for cross-border contracts for the different products offered in the XBID.
Notes * Finland and Estonia with lead time of 30 min *Except Estlink and FR-DE link with closing times of 30 min H. Beltran et al.

Table 2
Average forecasting error for 1 h to 6 h horizons with forecats generated simultaneusly.

Table 3
Percentage of time in a year when the BESS saturates for different intraday market configurations.

Table 4
Annual energy deviations in the PV plant production at L1 under different markets scenarios for: no BESS operation and a 1-hour capacity BESS operation.