Review of the Legislative Framework for the Remuneration of Photovoltaic Production in Spain: A Case Study

: Spain is among the European countries with the greatest photovoltaic potential. During the first decade of the 2000s, Spain was a European leader in installed photovoltaic power and job creation in the renewable energy sector, strongly influenced by a very favorable regulatory framework and public subsidies at a time of economic growth. That situation would be completely reversed with the regulatory changes introduced in 2012 to combat the tariff deficit and the instability in the electricity supply system, problems accentuated by the economic crisis. The main objective of this study is to present an exhaustive review of the legislative changes that have affected photovoltaic energy in Spain. Using real data on electricity production and the remuneration of a typical photovoltaic plant, we show that there was a very significant fall in the economic returns that investors had come to expect, within a system that prioritized, first and foremost, the initial investment rather than the levels of electricity production. The changes to the legislative framework affecting a typical 100 kW p photovoltaic (PV) facility that entered into service before 2007 provoked a significant decrease of 8.7% in expected revenues, calculated from real data of production and income. These economic losses can be even higher, with a drop in revenue of almost 25% if the entire period of the installation ʹ s useful life is analyzed. Public support for renewable energy is important for its introduction into the electricity market, but so is regulatory stability that offers investment security and predictability for maintaining investment and development in the renewable energy sector.


Introduction
Spain possesses greater photovoltaic (PV) potential than any other European Union member state due to its favorable climatological conditions [1,2]. In 2018, the Spanish power system had a total installed PV capacity of 4714 MW, representing 4.5% of its total capacity [3]. Installed PV power had stabilized over the past five years following a long period of continuous growth. PV power recorded its highest increases in 2007 and especially in 2008 when a record number of 2733 new MW were installed. This growth continued up until 2013, with an average of 250 MW installed each year, and has since then remained stable without variation. Rather than by the favorable natural conditions and abundant solar resources, the development of the renewable energy sector in general and PV solar energy in particular has been greatly influenced by the regulatory framework and public-sector subsidies [4]. Law 40/1994 [5] was the first attempt to regulate energy production through renewable energies, by introducing the concept of a "special regime of generation" for facilities based on renewable energies with installed capacities of less than 50 MW. The dual objectives were the encouragement of technological development and the reduction of both energy dependence on fossil fuels and greenhouse gas emissions. The 1999 National Plan for the Promotion of Renewable Energies stimulated the PV solar energy sector with the aim of meeting a target of 12% set for EU energy by 2010. Two Royal Decrees (RD 436/2004 [6] and RD 661/2007 [7]) established very attractive remuneration frameworks for photovoltaic generation. The apparent low risk level of investment [8] was widely accepted among investors, resulting in a number of installations that far exceeded expectations within that category [9]. The situation provoked significant deficits for the electrical system and forced the regulator to modify the retributive conditions (Royal Decree 1/2012 [10]). RD 413/2014 [11] broke completely with the previous over-subsidized PV regulatory framework, insofar as the facilities were classified by their technology, their installed power, the year of the concession, and the RD that was applicable in each case. In the current system, retribution has two contributions: Investment compensation (to cover investment costs) and operational compensation (to compensate for the difference between operating costs and incomes). Therefore, there are many variables to consider when calculating the economic return on an investment [4].
The economic consequences of the changes to the legislative framework in the Spanish PV market have been reviewed and analyzed from different points of view in various studies. Ciarreta et al. [12] analyzed the effects of renewable energy production in the Spanish electricity market over the period 2008-2012, concluding that although the introduction of renewable energies contributed to a significant reduction of the daily market price of electricity, the Spanish system of incentives was not sustainable, leading to a review of energy policy in 2013. De la Hoz et al. [13] provided a methodology for determining the cumulative cost to the Spanish electricity system caused by the excessive overestimation of the PV power targets under RD 661/2007 and the economic consequences for investors following the introduction of retroactive changes to the regulatory schemes. Guaita et al. [8] showed the economic profitability of a 20 kWp PV plant despite the high variations of incentive policies, due mainly to technological innovations and the maturity of the PV market. Guerrero-Lemus et al. [14] analyzed the benefits of Law 24/2013 of the Electrical Sector on insular systems where the new PV plants represented an opportunity to reduce electricity costs. Azofra et al. [15] monitored returns on investments in the system of promoting PV technology, based on the bonuses received and the savings generated for the Spanish electricity market. They showed that an acceptable temporary distribution of new PV facilities could have maintained the economic sustainability of the feed-in-tariff system. De la Hoz et al. [16] evaluated the 2014 retroactive regulatory framework for grid-connected PV systems, analyzing the economic impact on PV units installed before the introduction of the new law while identifying the most influential parameters of the new regulations. Girard et al. [1] analyzed the energetic and economic profitability of PV systems in Spain to conclude that PV electricity could achieve grid parity at a plant profitability rate of as much as 7.26%. Talavera et al. [17] showed, in a complete study, that the supporting measures for the PV sector in Spain lacked long-term vision and generated economic instability for the owners of those facilities and legal uncertainty for potential investors. Ibarloza et al. [4] analyzed the impact of regulatory cuts on the financial resources of Spanish solar power companies over the period 2006-2015, which weakened their economic performance, and discussed the international implications of the Spanish case for stakeholders worldwide. Lomas et al. [18] highlighted the influence of promotion policies on the profitability of Spanish PV plants and the differences between the economic and the financial performance of a PV investment by analyzing both the economic and the energetic data of a real PV facility. López Prol [19], in a comparison of the German and Spanish PV markets and their development, pointed to the need for long-term stability of both the legal and the economic frameworks for designing efficient innovation and diffusion policies. Mir-Artiguez et al. [20] described the impact of the changes to the regulatory scheme on the cash flows of PV plants. Arcos-Vargas et al. [9] proposed efficiency improvement measures, based on the implementation of best practices and market mechanisms, to mitigate the negative effects of the regulatory changes.
Bermúdez [21] claimed that lessons learned from the Spanish experience would be very useful for helping other countries to develop sustainable PV markets. She analyzed the development of the Japanese PV market and compared it with the Spanish case and with other European countries' cases. She revealed that the Spanish attempt to transform the electricity system failed largely to establish a credible mechanism to pay for it and that it forced the government to create dozens of retroactive changes in regulations to deal with the increasing deficit.
In the present work, the focus will be on the economic repercussions of the retroactive changes to the legislative framework in the case of a 100 kWp grid-connected PV facility in Spain. The changes to the electricity production remuneration schemes as a result of RD 436/2004, RD 661/2007, and RD 413/2014 will all be calculated. The main contribution of this work is the use of real data, on both energy production and income flows, from a PV facility that is representative of photovoltaic investments in Spain. A review of the legislative changes together with a complete description of the main features and repercussions of each norm that has been applied, since the very first attempts to incentivize the use of renewable energies in Spain up until today, will be presented in detail. The paper will be structured as follows: In Section 2, the full background of and details on the development of regulations for renewable incentivization, and particularly for PV in Spain, will be presented. In Section 3, the facility under study and its technical specifications will be described, and the real electricity production throughout its operation will be shown on a year-by-year basis. In Section 4, the economic retribution of the facility will be assessed, as will the repercussions of the legislative changes. The paper will end with some concluding remarks.

Evolution of the Spanish Legislative Framework for Renewable Energies
Spain has never been distanced from the effects of the different energy crises throughout history. The energetic transition to renewables began in the 1970s. The reduction of energy dependency, the environmental impact of fossil fuels, greater awareness within society of the fight against climate change, and alignment with the environmental policies promoted by the European Union all led to the development of legislation in support of renewable energies. Through a review of the legal framework, the evolution of the market and the regulatory system will be clearly examined, particularly the remunerative system for the production of electricity generation in PV plants.
The legal framework behind electricity production is a complex universe of study, due to the absence in Spain of a homogeneous, complete, and systematic regulatory system [22]. The objective of promoting renewable energies, included in the Art. 194.1 of the Treaty on the Functioning of the European Union [23], was preceded by a series of normative antecedents that were remarkably reinforced with the adoption of a new energy paradigm in which renewable energies are expected to play a leading role. The first real attempt to boost the use of renewable energy sources through economic incentives was Law 82/1980 [24] on Energy Conservation. Individual or collective owners of facilities of any type that simultaneously met certain conditions were considered self-producers of electrical energy and were supported by advantageous financial and fiscal measures. Those required conditions, established in Article 7 of Law 82/1980, were: a) The primary purpose of their activities is not to produce electrical energy, but they obtain or can obtain it by their own means, using surplus energy waste or by-products from their production process or, in general, by any means that represents an improvement in energy consumption; b) The production of electrical energy referred to in the previous section must be performed in a way that yields energy savings that are in line with the priorities of the general energy policy.
These self-producers will therefore be beneficiaries of the future "special regime of electricity production". Law 82/1980 recognized the right of the self-producers and the holders of nondistributing hydroelectric concessions "to transfer their surplus energy to the electricity supply company [...] and thereby receive the price determined by regulation" (Article 8.d Law 82/1980), and expressly prohibited transferring that energy to third parties (Article 9.1.c Law 82/1980). Throughout the 1990s, mini-hydraulics were promoted and became, at that time, the priority for the National Energy Plan. This phase culminated with the approval of Law 40/1994 of the National Electricity System (LOSEN) [5], which consolidated the concept of a "special regime". RD 2366/1994 [25] established the requirements for hydraulic, cogeneration, and other facilities supplied by renewable resources, in order for them to qualify both for the special regime and for the economic regime. The price at which the surplus was transferred had to take into account generation, transportation, and distribution costs that the electricity sector would not support, as well as costs arising from the "necessary diversification, use of renewable energies, and reduction of the environmental impact" (Article 12.3 RD 2366/1994). As a result, the previously stated price was significantly higher than the average remuneration for the electricity produced under the ordinary regime.
Simultaneously with the emergence of this new reality of renewable energies, the process of liberalization of the electricity market began, driven both by the need to increase efficiency and the competitiveness of the sector. The traditional concept of energy as a common resource for public access was converted into a concept of service provision in a regulated market. Law 54/1997 of the Electricity Sector (ESL) [26] was approved in that context. It defined generation, transportation, distribution, commercialization, and coordination activities. Generation and commercialization activities were liberalized in a competitive market. Regarding electricity generation, the modification introduced by the ESL, in the fourth paragraph of its Statement of Reasons, was focused on the express recognition of the freedom of establishment and the introduction of a competitive market for electricity producers through the establishment of a production market [27].
The most important novelty introduced by the ESL regarding the special regime refers to remuneration. It is clear that both the viability and the profitability of the electricity production business will depend directly on its remuneration. The ESL was an important milestone in the regulation of the electricity system that included the administrative recognition of standard costs set according to market criteria. The essential feature of the liberalization introduced through the ESL was confirmed by the special regime for production, as producers were guaranteed a price at which to sell their electricity, adding a premium to the average price of kWh in the pool, which would appear in the corresponding tariff regulation once decided by the government. Different aspects were considered for the determination of the premiums, such as the level of energy delivery to the grid, effective contributions to environmental improvements, savings of primary energy and energy efficiency, the production of economically justifiable useful heat, and the investment costs incurred. The proposal, included in the Art. 30.4 of ESL, sought to achieve reasonable rates of return with reference to the cost of money on the capital market. Regarding the period of validity of these economic incentives, the ESL only set a time limit for those corresponding to group a): Self-producers that use cogeneration or other forms of electricity production associated with non-electric activities with high-energy efficiency. The premiums for the rest were for an indefinite time (RD 2818/1998) [28]: "To achieve this goal, a system of temporary incentives is established for those facilities that require such incentives to position themselves in a competitive position in a free market. For facilities based on renewable energy and waste, the established incentive has no time limit, due to the need to internalize their environmental benefits and to their higher costs that do not permit them to compete in a free market because of their special characteristics and technological level. The incentives established for renewable energies are such that they will allow their contribution to Spainʹs energy demand to be at least 12% by 2010... [...]". The premiums to the facilities under RD 2818/1998 were thereby maintained through the classification established between the installations of groups a) and b). Although the premiums were indefinite, the premiums of some facilities (those within group "a" with a power equal to or less than 10 MW) had a limit ten years from the start-up of the installation. The premiums for those with a power output equal to or less than 25 MW, but exceeding 10 MW, were derived from a formula applicable during the transitional period [29].
RD 841/2002 [30] regulated the production of electrical energy under a special regime that incentivized participation in the production market and that classified PV solar technology in subgroup b.1.1. This new standard developed the ESL through the modifications introduced under Law 66/1997 [31], a favorable framework that avoided discriminatory situations and limited free competition, with differentiated cases for those energy systems that contributed most effectively to the aforementioned objectives. A transitional period was established for the facilities covered by the previous regulation, during which the previous regime of remuneration would be applied. Subsequently, RD 436/2004 [6] was approved in transposition of the European environmental regulations, systematizing both the legal and the economic regimes for the production of electrical energy under the special regime. Energy sales were restricted to two options, and the facilities included in the special regime were detailed in a very precise classification, by categories, groups, and subgroups. The aforementioned sales options constituted the foundation of the system, based on freedom of choice for the installation owner, who could decide to sell production or surplus electricity to the distributor, directly to the daily market, to the term market, or through a bilateral contract. In the last case, the retribution for the electricity would be the price negotiated on the market, plus an incentive to participate in it and a premium, when appropriate. This incentive and this complementary premium were also defined generically as percentages of the average or reference electricity tariff, although they were later specified on a case-by-case basis, taking into account the criteria listed in Article 30.4 of the ESL.
Therefore, regardless of the system chosen by the holder, RD 436/2004 [6] guaranteed reasonable remuneration for investment and a reasonable allocation of the costs attributable to consumers within the electricity distribution system. Nevertheless, participation in the market was encouraged, considering that administrative intervention in pricing was reduced. The economic regime detailed in RD 436/2004 revealed the interest in promoting investment in these types of facilities in order to contribute to the achievement, in 2011, of the installed power targets in the Plan for the Promotion of Renewable Energy [32].
Only three years later, a new regulation was introduced for regulating the production of electrical energy under a special regime: RD 661/2007 [7]. Its most important novelty was the modification of the economic regime established in RD 436/2004, disengaging from the Average or Reference Electric Rates which were used so far and including a variable premium depending on the market price. RD 661/2007 maintained the double remuneration option of the previous standard: The sale at a regulated rate and at a fixed price for the energy supplied to the grid, or directly to the market, at a negotiated price plus a premium. Its greatest innovation was to create the system of ʺfloor and ceilingʺ. In other words, the calculation of the price of electricity plus the premium was taken as a reference. In the event that the sum exceeded the ʺceilingʺ figure, only the support level at that threshold would be paid out. Otherwise, if the amount would not exceed the floor limit, the subsidies would be paid out to ensure a minimum return for the producers. This system was foreseen throughout the useful life of the installation, although the subsidies were lowered over the passage of time. It is important to remark that, according to RD 661/2007, the relevant Autonomous Community decided on the application of the special regime to each installation. The final registration of the facility on the Administrative Register of the Special Regime was dependent on not having met the installed power target set for each technology in the RD.
RD 1578/2008 [33] modified the economic regime of the production of electric energy by facilities with PV solar technology, following the deadline for maintaining the remuneration specified in RD 661/2007 for the aforementioned technology. The new installations were classified into two typologies according to whether they were located on roofs (type I) or on the ground (type II). The remuneration of the facilities was based on different annual calls with a capacity quota by type and was compliant with the technology learning curve (the price and the power quota were specified in each call), which implied a lower price of electricity in relation to the previous model. In addition, RD 1578/2008 limited the application of RD 661/2007.
All of these regulatory frameworks generated a structural problem relating to the economic sustainability of the Spanish electricity system: A growing tariff deficit that had to be reduced [12]. The electricity tariff deficit had been accumulating since 2000 and was particularly acute in 2005. The deficit was basically incurred because the cost of the electricity supply had been growing at a higher rate than the price offered to consumers, but also because there were no mechanisms to regulate the market price of electricity in accordance with competitive criteria [34]. RD 6/2009 [35] was a fresh attempt to guarantee the sustainability of the renewable energy remuneration system, both from a technical and an economic point of view. As a mechanism for controlling the implementation of new facilities under the special regime, the Pre-Assignment of Remuneration Registry was created. This Registry included numbers and calendars for the projects awaiting implementation, their power, and their impact on the costs of the electricity tariff. Registration on the Pre-Assignment Registry was converted into a necessary condition to obtain the economic regime established in RD 661/2007, as well as the registration in the Administrative Registry of production facilities under the special regime. This measure was completely inefficient, and the Decree-Law 14/2010 [36] imposed an access toll of 0.5 €/MWh on all producers of electrical energy. The characteristics of voltage levels and consumption by time and power, and the energy transferred to the network, were taken into account to stablish the tolls to be paid by producers of both the ordinary regime and the special regime. Royal Decree-Law 1/2012 [10] proceeded to suspend all procedures for the pre-assignment of remuneration and all economic incentives for new installations for the production of electrical energy from cogeneration, sources of renewable energy, and waste. However, Royal Decree-Law 1/2012 presented no changes for those facilities, about 2300 MW, that had previously applied and successfully registered on the Compensation Pre-Assignment Registry.
The new regulation implied an abrupt break with the policy of promotion and development of renewable energy in Spain. The economic crisis that had been brewing since 2012 and the relentless increase in the tariff deficit of the electricity sector meant that the new measures were reoriented towards reducing the cost caused by the introduction of renewables in the Spanish electricity system. Subsequent measures (RD-Law 13/2012 [37] and RD-Law 20/2012 [38]) transposed European directives onto internal electricity and gas markets to correct deviations due to mismatches between costs and revenues and to ensure budgetary stability and the promotion of competitive markets. Law 15/2012 [39] on fiscal measures for energy sustainability introduced a new tax of 7% on the remuneration of electric power production, applicable to all electricity generation facilities and to some other technologies, as well as the imposition of rates for consumption of coal and natural gas, water resources, and nuclear waste. The modification and/or substitution of elements in PV installations was expressly prohibited by RD-Law 29/2012 [40] (Chapter 3, Art. 8), until any such modification of the original project had been approved by the competent Administration. The definition of "substantial modification" in PV installations is understood to involve new equipment, when the installation technology is changed between fixed one-axis tracking or two-axis tracking, provided that the replacement equipment produces in excess of 5% peak power within one year. Once modified, the economic regime applicable to the facilities was corrected and the market price was paid for production. RD-Law 9/2013 [41] abolished the economic framework stablished with RD 661/2007 [7] and RD 1578/2008 [33], and prepared the new regulatory framework culminated with the Law 24/2013 [42], which was developed by RD 413/2014 [11] and described in detail in Ministerial Order IET 1045/2014 [43]. A temporary measure, Law 15/2013 [44], covered part of the costs via specific transfers from the national budget. The specific remuneration of a standard PV facility run by an efficient and wellmanaged company throughout its useful life was to be calculated on the basis of three contributions: 1) Standard revenue from the sale of energy that is generated and valued at market prices.

2) Standard operating costs. 3) Standard value of the initial investment.
Costs or investments caused by the adaptation to norms or administrative acts that were not applicable throughout the Spanish territory were not considered. In any case, costs and investments had to respond exclusively to the activity of electricity production to guarantee both the principle of reasonable economic returns and the financial sustainability of the system itself. At that time, RD 413/2014 [11] was therefore drafted to regulate the activity of electricity production from renewable energy sources, cogeneration, and waste. It repealed all previous regulations regarding renewable energy production, establishing the new regulatory framework that came into force following its approval.
Following this extensive review of the applicable regulations, it is clearly undeniable that the volume of legislation applicable to the electricity sector has been more than considerable since the entry into force of Law 54/1997 in Spain [26]. It can be justified as an attempt to combine the necessary response both to the emergence and to the development of renewable energy sources, as well as the necessary fulfilment of the different energy plans. An element of insecurity has been introduced, most likely due to a hurried attempt to find solutions to the unexpected increase in the number of installations and, above all, due to the increase in remuneration and the consequent deficit in the electricity system [45]. The main conclusion of this review is therefore that the choice of the public support system for the promotion of renewable energies is important, but it is equally important to ensure regulatory stability that will offer certainty and predictable market conditions to investors. These conclusions are drawn from the European case, where the premium system is clearly the most widespread, and from the North American case, where the installed power data reflects regulatory instability [46]. Policies for the promotion of renewable energies have been reflected in the level of compensation built into the premium systems, the procedural requirements for the authorization of facilities, the existence and the ability to influence a strong industrial sector, the establishment of direct subsidies, and even public information campaigns, among others.

Description of the Facility under Study
The geographical coordinates of the facility under study are 4201´28´´N latitude and 418´28´´ W longitude. It is located at the town of Torquemada, Palencia, Spain. It is situated at an altitude of 740 m above sea level, in a surface area of 3000 m 2 . Very favorable atmospheric are observed in the area: ambient temperature ranging between 4 and 20ºC a, very low number of cloudy days [46] and high values of solar radiation (1450 kWh/m 2 year [47]). Figure 1 presents an aerial photograph of the facility. The peak power (maximum power that can be produced by the facility) is 101.01 kWp with 546 PV panels (model BP-7185S). The technical specifications of the panels, given by the manufacturer in the product's datasheet (measured at Standard Test Conditions, STC) are 185 Wp, (peak Watt or maximum panel power), 5.1 A of IPM, and 36.5 V for VPM (current and voltage values measured at maximum power of the panel). The electrical efficiency is between 14% and 15%, and the tolerance value is ±2.5%. The panels integrate IntegraBus technology, which limits partial shading losses. They are arranged in 39 groups of 14 panels. Therefore, the current for each group is 5.1 A and the voltage is 511 V, within the voltage range of the inverter. In Figure 1, the arrangement of the 39 groups in rows can be observed: 12 rows with three groups in each one and a further two rows with two groups and one group, respectively. Details about the electrical layout of the of the facility and a complete description of the protection system can be found in a previous work [48]. A mobile structure manually operated, which adjust the position of the panels according to the time of the year, allows the variation of the angle of inclination of the panels between 5 and 50. This modification, done approximately every month, optimizes the electrical production. Figures 2a and 2b present the panel support system and their highest and lowest positions, respectively. An Ingecon Sun 100 inverter is used at the facility. Its technical specifications are 100 kW nominal power and 110 kW maximum power, with an input voltage range of 405-750 V and an input current of 286 A; the output voltage is 3  400 V and the output current 187 A; the harmonic distortion is less than 3%. The maximum energy efficiency of the inverter is 96%, as is indicated in the datasheet of the equipment. The working temperature range is -10 to 65 C. The power output of the inverter is 5 m away from the measuring and protection system of the facility. The counter system, current transformer, and switch circuits were in line with current regulations at the time that the installation was switched on (June 2006). The output of the measuring equipment is 4 m from the general connection that carries the energy directly to the 600 KVA transformer supplying the town of Torquemada, located at a distance of 200 m from the facility. Figure 3 shows the annual output of electricity from the date on which the facility was commissioned (July 2006) up until December 2018. The data on electrical production are directly related to the average solar irradiation in the area, as can be seen by comparing Figures 3 and 4, in which the annual average solar irradiation levels, computed from the experimental data from the Agroclimatic Information System for Irrigation (SIAR) network [49], are presented. Two discrepancies can be observed: In 2006, where the production data are only shown over six months (from June to December 2006), and in 2017, when maintenance tasks were needed to change several panels at the facility.

Legislative Framework Applied to the Facility under Study.
From its commissioning on July 3, 2006, the remuneration of the facility in this case study has been subject to different norms that have had important repercussions on the financial benefits of the initial investment. RD 436/2004 was the regulation in force at the time the installation was commissioned [6]. In 2007, that regulation changed to RD 661/2007 [7], which introduced significant changes to the remuneration of the production. The approval of the most recent legislation, RD 413/2014 of June 2014 [11], once again changed the remunerative framework for electrical production; the same framework is still in force. Our analysis extends across the thirty years of useful life estimated for the facility.

First Stage: Production under RD 436/2004
This regulation established groups and subgroups of facilities based on technology and power production as well as the ʺrates, premiums, and incentivesʺ for the generation of electricity from renewable resources. The installation under study was, due to its technological characteristics and installed power, classified under subtype b.1.1: "Installations based solely on photovoltaic solar energy". The remuneration for the electricity produced in this type of installation was established as a percentage of the average or reference electricity rate, of 575% for the first 25 years of the facility's operation and 460% thereafter. 3) Investment incentives for installations in non-peninsular electrical systems that imply a global reduction in generation costs (without affecting the installation under study).
The classification of the type of installation is determined by, among other specifications, the installed power, the age of the facility, and the sun-tracker technology that is used. Each facility is assigned an identification code.
Once the code of the facility is defined in accordance with the above-mentioned specifications, the annual remuneration corresponding to the investment and the operation is determined, as well as the regulatory useful life and both the maximum and the minimum thresholds relating to the number of hours of operation. There are other parameters that also influence the remuneration regime of each installation, such as: Daily and intraday electricity market prices, number of operating hours of the installation, upper and lower annual market price limits, estimation of operating income, estimation of future operating costs, and update rate based on fair value.
Art. 19.1 RD 413/2014 defined reasonable thresholds for economic returns on various types of facilities as the average of the ten-year State Obligations in the secondary market over the 24 months prior to the month of May of the year prior to the start of the regulatory period, increased by 300 basis points [42].
Art 21 RD 413/2014 calculated the number of equivalent hours of operation as the ratio between the energy sold (kWh) and the installed power (kW). This parameter forces an adjustment to the annual income. It can even cause the loss of the right to the annual remuneration if the installation fails to reach the assigned production threshold value.
The market price of the electricity is calculated for the first regulatory half-period of each year as the average of the quotes of the contracts negotiated by the Operator of the Iberian Market of Electricity (OMIP). As it is a highly uncertain parameter, the Art. 22.3 of the RD 413/2014 defines the upper and lower limit values of that estimate. When the price is outside those limits, a positive or negative balance is established, called the "adjustment value for derivations in the market price", which will be compensated over the life of the installation.
The The code assigned to the facility under study was IT00033 and its useful life was 30 years. The facility is located in area II, where the number of annual production hours is between 1261 and 2102, with a threshold value of 736 hours. The parameters assigned to this facility from the entry into force of RD 413/2014 until now are presented in Table 1.

Results
Two different periods of study were established in this work. The first one ran from the commissioning of the facility under study (July 3, 2006) until December 31, 2018. During this period, actual monthly data on electricity production and revenues were recorded and are presented as part of this study. The second period extended from January 1, 2019 to June 30, 2035 (the estimated useful life of the facility). For this period, the remuneration was estimated using the following assumptions: a) The average reference value of the electricity was calculated as a linear regression from the data published every year between 2004 and 2018 [51]. The extrapolation of the linear regression was done by taking into account that the annual value was never higher than 2% over that of the previous year; this was a condition established by RD 1432/2002 [52]. b) The annual electricity production was annually estimated as 2% lower than that of the previous year due to panel degradation. The degradation rate used is the maximum guaranteed by the manufacturer. Therefore, in terms of electrical production, it has been considered the worst possible scenario. c) Both Rinv and Ro were calculated from a linear regression of the values applied to the facility under study between 2014 and 2018.
Actual data on the remuneration of electrical production are presented in Figure 5. The entry into force of every new legislative norm was considered according to its publication data. In this figure, the calculated data on the remuneration that should have been obtained are shown according to the economic conditions set by the different RDs.     The results from the second period of study (from January 1, 2019, to June 30, 2036) are shown in Figure 6. The expected revenues calculated using the criteria established by RD 436/2004 are clearly higher than those calculated using the criteria in RD 661/2007 and RD 413/2014. The first modification of the norm implied a decrease in income from electricity sales estimated at 30%. The application of RD 413/2014 reduced the loss by up to 24.38%. Considering the profile of the Spanish PV investors between 2004 and 2008 (mainly small-and medium-sized companies, and even private investors [4]), the decrease in remuneration for reasons completely unrelated to these investors caused significant economic disruption and was completely unexpected, given the retroactive nature of the new regulations, which were never before seen in Spanish and European legislative frameworks [9].
This study was performed by considering the electrical production and the revenues for this facility under study, without considering other economic factors such as maintenance, management and personal expenses, credit costs, and even the cash flows of the revenues, which can have important repercussions for investment performance and the economic viability of the facility. The final issue has been especially important since the entry into force of RD413/2014, which fractioned the revenues and set payments for the sale of electricity as a percentage of the expected annual total on a non-determined date. In addition, the revenues received from the production of electricity since 2014 have incurred an additional taxation rate of 7%, which was not considered in our study.

Conclusions
In this work, the changes to the bonus policy for the installation and the exploitation of PV facilities in Spain between 2004 and 2014 and the economic consequences for the investors supporting this technology have been analyzed. The unilateral suppression of successful energy policies promoting the renewable energy plans of the Spanish government had considerable negative impacts on the profitability of solar PV plants. As has been highlighted in this review of recent legislation, the approval of RD 436/2004 established a very favorable scenario for investment in renewable energies in Spain, with very low-level risks and high economic returns. The governmentʹs determined commitment to renewable energy, to achieve the proposed environmental objectives and a surplus economic situation, permitted a system of premiums and incentives that eventually caused a bubble in the photovoltaic sector. However, the government was unable to assess the situation properly, as it had underestimated the costs of premiums for the public treasury and failed to contemplate the change in the macroeconomic scenario resulting from the economic recession that commenced around 2008. In this review, the considerable increase in the regulations applicable to the energy sector in Spain, which is justifiable, has been noted in order to combine both the development of renewable sources and the fulfilment of the various energy plans. Public support for renewable energy is important for encouraging its introduction in the electricity market, but so is the regulatory stability that offers investors certainty and predictable market conditions [53]. Other countries have made changes in their legislative frameworks [21,[54][55][56] including cuts in the support systems of renewable energies, but the differential element is the retroactive nature of changes in the Spanish case. This work has clearly quantified the economic damage that these changes in the regulations have caused, using real data from a grid-connected PV system that is representative of the sector in Spain.
As has been highlighted in this study, in a comparison of the conditions imposed by RD 436/2004 with those of RD 413/29014, the changes to the legislative framework affecting a typical 100 kWp PV facility that entered into service before 2007 provoked a significant decrease of 8.7% in expected revenues, calculated from real data of production and income. The analysis of the intermediate period between RD 661/2007 and RD 413/2014 revealed a further decrease of 10.5%, which led to the stoppage of almost all activity in the PV sector in Spain between 2008 and 2014 [4].
These economic losses are even higher, with a drop in revenue of almost 25% if the entire period of the installationʹs useful life is analyzed. It is important to note that under the current conditions marked by RD 413/2014, the remuneration of PV installations is practically independent of production (it is mainly an investment-based remuneration) if it remains within certain threshold values. This fact does nothing to favor energy efficiency or the improvement of facilities. The revenues are mainly fixed by initial investment, year of commissioning, and technology of the facility. A generation-based remuneration would lead to greater incentives for better functioning of the installations and provide better system integration. Taking into account the maturity of PV technology and the practical achievement of grid parity, the economic return on investment of the PV facilities is guaranteed even without measures for financial subsidies.