The Development of Wind Farm Businesses and the Central Control of the Smart Grid in Spain: Making a Virtue of Necessity

: This paper lays out the role of the first centre in the world for the integration into the electrical grid of electricity coming from renewable energy (the Spanish acronym for which is CECRE (Centro de Control de Energías Renovables; Control Centre for Renewable Energies)) and the industrial development of large energy suppliers and wind turbine manufacturers in Spain. These two initiatives enabled the development of one of the first integrated markets for this type of energy source. The key contributions were the development of two software programs (wind management and management of solar light incidence), their visual implementation, and centralized digital control. An economic and business history approach is used to show the rise and relative failure of the Spanish wind industry during the period 2004–2015, when Spain became the fourth country after China, the US, and Germany in terms of installed capacity of renewable energy and, in relative terms, the second country after Denmark. This study is unique in that it provides an integrated vision of the reasons for the relative fall of Spain in the world ranking of wind energy producers. The methodology of the economic analysis of industrial policies makes it possible to explain the fall in the relative importance of Spain in the international panorama of wind farms


Introduction
The significance of this article lies in the fact that it offers a detailed explanation of Spain's rise to the top of the world's installed wind power capacity during the first decade of the 21st century and its subsequent decline over the second decade.
Spain became a global power in the production of wind energy, in both absolute and relative terms, from the end of the 1990s to the Great Recession (Figures 1 and 2, and Table  1). Three reasons for this have been advanced:   From the above, point one (feed-in tariffs) is usually cited as the main reason behind the country's strong achievements in matters of wind energy from 2004 to 2013. Spain's success is easy to confirm by reviewing the Renewable Energy Country Attractiveness Index (RECAI). The RECAI has been compiled by the firm Ernst & Young since 2003. It is an index that allows the measurement of the profitability of investments in renewable energies in 40 countries around the world. In RECAI, variables directly related to the economic return on investments-the "bankability of renewables"-weigh strongly on the position of the countries included. In 2004, RECAI situated Spain in the first place. In 2007, Spain held second place, started to plummet from there in 2011 and achieved its worst result in 2014, when it was located at position 24. Currently, in 2020, Spain has recovered somewhat in the index, gaining several places to rank eleventh [3]. This evolution in the RECAI ranking allows us for the moment to argue that feed-in tariffs played an important role in the development of renewables in Spain. This is a matter that will be addressed again in Section 4.
Point two-the interest of citizens in renewable energies-may be measured using the Special Eurobarometer on Climate Change for the period 2008-2018. Relative to European citizens, Spaniards have always been unconcerned about renewable energies, particularly when measuring their individual actions in favour of using renewable energy sources [4]. The social commitment to the advancement of renewable energy can be ruled out. The Spanish population has not had a commitment to renewable energies like that of the societies of Denmark or Germany. However, the Spanish population does present strong commitments: first, avoiding dependence on oil imports; second, avoiding the growth of nuclear energy; and third, being able to have a cheap and large-scale storage system for energy. As will be seen in the second section, these social commitments played an important role in the achievement of intelligent management of the electricity grid, the development of the natural gas industry and, to a lesser extent, the construction of pumped-storage hydroelectric power stations.
As regards point three, it bears noting that the regime and intensity of winds in the Iberian Peninsula is not particularly good. Only a small part of the North-West coast offers a high wind-speed regime, similar to that of the whole of Ireland or central and northern UK [5]. Furthermore, the continental shelf is very narrow and offshore wind farms have not been installed. However, there has been a relative advantage to this, namely the low population density rates in inland regions, especially in Aragon and Castile-Leon. This has allowed the installation of many wind farms without causing social rejection. In any case, Spain did not present particularly suitable orographic conditions for the huge growth of wind farms.
The higher levels of penetration of renewable energy (more that 13% of total primary energy supply (Figure 1) supplying 35% of annual consumption in the year 2010) were achieved mainly in wind-power capacity (Table 1, lines 3 and 4), making it one the leading technologies in the Spanish system (it accounted for 21% of total installed electrical capacity). Total installed wind capacity in Spain as of May 2010 was 20,243 MW [2] (p. 49). However, this growth did not continue. Spain stopped in comparison with the rest of the world economies that continued to invest in the development of wind energy ( Figure 2).
After this review of these three points, it seems that Spain could really only count on premiums as a suitable explanation for its accomplishments. Until 2013, feed-in tariffs for wind power held steady, and at the same time wind farm installations continued to grow. With the arrival of the Energy Reform in 2013 (Real Decreto Ley (Royal Legislative Decree/Act) RLD-Act 24/2013), this evolution was cut short, since power began to be encouraged instead of production. In addition, the new premiums considered the age of the wind farms and the maximum profit that they could obtain (the so-called reasonable profit that is set annually). The effect of the Reform was appreciated for the first time in 2014: Incentives fell from one year to the next by no less than 41%. The coverage of electricity demand by wind energy, which had reached 21.2% in 2013, fell two points by 2017. Several companies had to sell their wind farms.
Until 2017, the state administration did not carry out auctions again. From 2017 and with the new feed-in tariffs, new wind farms were created. In 2019, wind energy recovered a coverage rate of 21%, and Spain achieved second place in Europe, after the United Kingdom, in the installation of wind farms (onshore and offshore) and was the first in onshore wind farms. In 2019, auctions for offshore wind were already being held in Germany and The Netherlands without the need for feed-in tariffs. With the current premium regime, the trends for 2021 are promising [6] (p. 22).
Consequently, everything seems to indicate that feed-in tariffs were the only cause of the increase in renewable energy in Spain. However, the real story is somewhat more complex. In order to understand why Spain facilitated investments in wind and solar farms, we must go back to the mid-1980s.
Spain had managed to financially recover and grow after the 1970s oil crisis and the nuclear moratorium in 1983. However, its energy production still relied extensively on imported petrol. The effort to use available energy more efficiently had never been put aside, especially regarding to the management of LNG (liquefied natural gas) terminals and transport pipelines of natural gas. Nevertheless, the problem was truly of such magnitude that, at the time, one had to work on finding a substitute for fuel oil regarding electrical energy production. It became obvious, then, that Spain required the large-scale production of electrical energy from renewable energy sources. The development of the necessary technological knowledge, making a virtue of necessity, became a priority.
Therefore, no matter how many premiums the government would have given, if there had not been a technological innovations regarding the management of the integration of renewable energies on a large scale as well as the manufacture of new models of wind turbines, Spain would never have become the second country in terms of the contribution of renewable energies to energy supply in 2010 ( Figure 1) and the fourth country in the world with respect to the installed capacity of wind power in 2012 ( Figure 2). The need to replace fuel oil was the driving force for innovations.
The relation of knowledge to the concept of making a virtue of necessity is found in The Canterbury Tales, written by Geoffrey Chaucer at the end of the 14th century. Chaucer writes: "Then is it wisdom, as it seems to me, to make a virtue of necessity." However, in our current post-industrial society, we would likely do well to substitute "technological knowledge" for the term "wisdom." Our hypothesis is that two windows of opportunity for catching up in matters of renewable energies were opened thanks to two different types of technological knowledge which had accumulated in Spanish industry. These windows of opportunity were those which allowed the country to make a virtue of necessity and overcome two obstacles, namely a low social demand for the utilisation of renewable energies for private use and a relatively low primary (potential) wind energy. It was the two different types of specific technological knowledge which we will mention that made it so attractive to invest in renewable energies in Spain. Scientific rigor and its excellent implementation ensured the solvency of the investment.
This article describes, in Sections 2 and 3, these two types of technological knowledge. Before that, however, we ought to clarify what we mean by "windows of opportunity for catching up." The concept of "window of opportunity" was defined by Perez and Soete in 1988 [7]. According to them, in the very early stages of a new technology, relatively backward countries may enter in or bring about a new industry given enough human capital or a lack of barriers to entry. Barriers to entry exist when a technology is already patented or when a new technology substitutes for some previous activity with a solid presence of firms with strong market power (monopolies or oligopolies). Section 4 discusses whether the technological advancements described were indeed those which originated the high production of wind energy in Spain or, alternatively, whether it was the government's economic incentives that fostered the massive set-up of wind farms. In Section 5, we stress the importance of technological advancements in explaining why Spain became one of the main producers of wind energy before the Great Recession. On the other hand, we ponder the relative weight given to the impact of institutional economic incentives for the construction of wind turbines and wind farms.
The theoretical foundations of our work lie in economic literature that highlights the importance of the scientific and technological aspects in the electric industry, which were already underlined by Hughes [8]. There is also much scientific literature on technological change which focuses on the importance of technological advancements. We will find good theoretical support, on the more orthodox side, in the economic models of both Solow and Romer [9,10], and, from a different angle, on the side of the evolutionary or neo-Schumpeterian school with Nelson and Winter at its head [11].
The two possibilities that countries have of reducing their technological and wealth gap with more advanced countries are (a) to import technology and combine it with cheap but increasingly better educated labour, or (b) to take advantage of the birth of a new technology (window of opportunity) to develop it, adapt it to the conditions of their country, and export it afterwards. The catching-up phenomenon is achieved because one of the leaders eventually "plateaus," choosing to continue to redeem a prior technology and thus opening up the possibility for another country to take its place [12].
For relatively poorer countries, such as Spain, the second option always comes handin-hand with the necessity of solving an urgent technological problem. In the Spanish case, and in the case of wind energy, the problem was that the degree of efficiency in management needed to be very high, since there was no back-up energy, nor enough linkage with European grids, and Spain is not a particularly windy country. The development of a central control for the integration in the electrical grid of electricity coming from renewable energy and the adaptation of wind turbines to these requirements synthesised all this effort and generation of new knowledge, hence making a virtue of necessity. The first of the countries acquiring the knowledge required for an efficient management of thousands of wind farms would take the place of one of the traditional leaders in the field.

First Window of Opportunity: Manage Rapid and Massive Incorporation of Wind Farms (the Digital Control Centre for the Electricity Grid)
The idea behind this section is the following: the Spanish population has always been very reluctant to implement individual solutions (private use) based on renewable energy. This apparent disadvantage or obstacle opened a window of opportunity: Spaniards easily accepted the state and the electricity companies developing a management system capable of solving the problem of energy dependence through the management of all the production of renewable energies through the national electricity grid. This position of the Spaniards derives from their high concern for having a national source of energy supply.
As has been noted in the introduction, Spaniards are not strongly disposed towards the use of renewables. However, along with Portuguese citizens, they worry the most, in the European Union, about a lack of energy sources and, particularly, about being unable to meet their increasing prices. The first case, energy reliability,concerns more than 20% of the Spanish population, while the second, energy affordability, more than 70% [13]. In both items, Spain's score doubles the average for the whole of the European Union.
Such a negative perception comes from a generalised understanding on the part of the population of the Iberian Peninsula of one of their greatest needs: that they have no energy reservoirs of their own. Coal sources are depleted or very low-quality, and their hydroelectric yield is already one of the highest in the world. The building of nuclear reactors was also paralysed in Spain in 1984, and in Portugal it never really took off. In the absence of these options, natural gas was the first alternative. The commitment in favour of gas pipelines and LNG terminals began in the 1980s [14,15]. This has been very powerful, but feelings of vulnerability are heightened by the fact that the peninsula's main energy reservoir is outside of it and depends on the diplomatic management.
Algeria's dependence on gas is remarkable. Half of the gas that enters Spain comes from that country. Of this half, only one sixth enters via LNG terminals. Therefore, most of the gas enters through two maritime pipelines that connect Spain with Africa. One started operating in 2011 and is direct to Algeria (MEZGAS) but the other is older (1996) and crosses Morocco. At this point it must be remembered that Morocco and Algeria are enemy regional powers. The connection to the European network is low. The three pipelines with France have small capacity. A fourth line with France, the MidCat pipeline, is under construction. The rest of the gas enters through seven LNG terminals [16]. In total, there are 22 LNG terminals in Europe. In 2017, the entry through LNG terminals in Spain accounted for half of the entering natural gas. The demand for natural gas comes from thermoelectric plants (25% on average for the period 2002-2017) and from primary consumption for heating and industrial uses (75%). Re-exports do not exceed 5% (2020) [17]. Direct consumption and thermoelectric plants have given Spain the largest LNG import capacity in the EU, 50.6 mtpa (68.6 bcma) (mtpa = million tonnes per annum; bcma = billions of cubic meters per annum), followed by the UK with 35.3 mtpa (52.1 bcma) [6,18,19]. However, it was not until the end of 2015 when Spain created a wholesale reference market (MIB-GAS) [20]. In conclusion, it can be said that being an energetic island without its own production in relation to natural gas leaves Spain with a great economic dependence on imported natural gas for any energy development [21].
Energy sovereignty is precarious on the side of the peninsula's own supply. The Spanish population is very conscious of this, as well as of the fact that overcoming this difficulty is Spain's greatest technological challenge. In 2010, the Spanish Foundation for Science and Technology (whose Spanish acronym is FECYT) conducted the Citizens' Agenda for Science and Innovation [22]. This large-scale poll was aimed at uncovering the thirteen most important technological challenges for the Spanish society in the mid-and long-term. More than 100,000 people took part in this survey. The most-voted option, with 14% of the votes, was "acquiring more efficient energy storage".
Along the whole period of installation of wind and solar farms, and up until now, the Spanish population has been conscious that when there is no light nor wind, electrical demand relies on combined cycle gas turbine plants. Figure 3 shows the growth of combined cycles. According to the ASE group, which includes the largest electrical engineering companies in Spain, for every MW installed in wind or solar energy, another combined cycle would be needed to be built to cover situations of high electrical demand in conditions of lack of sun and wind [23]. However, the growth of combined cycles is not only due to their role in supporting renewable energies. The increase in the use of natural gas for electricity production has its own dynamics. It depends on the rapid replacement of gas-thermal power plants, stagnation of other sources (coal, nuclear, and hydroelectricity), and, of course, on the very competitive development of the natural gas market in Spain, as noted above.
The close relationship between natural gas and the growth possibilities of wind energy is not the case for any other European leader in the construction of wind farms, who have always benefited from their own or geographically close backup energy sources given the high integration of their medium-and high-voltage electrical grids. In contrast, the linkage of the Iberian Peninsula with the European grid, which happens through France, amounts only to 3% of the installed energy production in Spain. It is certainly very difficult to explain how Spain became one of the leading countries in the production of renewable energy without the support of its population. At the beginning of the century there were very few individual initiatives to install small wind turbines or solar water heating or photovoltaic systems. People did not have an extraordinary fondness for renewable energy [4]. However, there was a wide social perception about the lack of sovereign sources of energy. Paradoxically, this lack of social drive and the social awareness that the problem could only be solved at the macro level left the hands of power companies and the state free, through the public-private partnership REE (Red Eléctrica Española; Spanish Electrical Grid), to install and manage all wind turbines [24].
It was not the Spanish population which pushed, as was the case in Denmark or Germany, towards renewable energy, but the oligopoly of the producer firms of electrical energy.
Between 2008 and 2017, the percentage of private (at-home) solar panel installations in Spain always was small or null. By contrast, at the beginning of 2018, there were more than 1,000,000 small-scale installations for the private production of electrical energy in Germany. In Spain, this number barely reached 1000. What this situation evidences is that, in Spain, renewable energies had only been developed in the form of large installations (farms). Against the reality of many European countries, it is difficult to find small wind Fuel/gas Combined cycle generators, solar installations, or photovoltaic panels in Spanish homes, firms, and farms. This situation also is due to a lack of economic incentives for their installation for private use, the presence of many administrative obstacles, and the opposition of the oligopoly made up of the large energy firms, as well as the difficulties in incorporating the resulting surplus energy from individual producers to the medium-and high-voltage grid. Power companies could easily impose their conditions from the start through to 2018. The number of obstacles peaked in 2015, when the Spanish government became one of the few in the world to adopt a double tax on energy. Consumer-producers had to pay for using the grid to consume as well as to put out energy. These obstacles were lifted in 2018 and were immediately and positively reflected in the growth of photovoltaic energy sources for self-consumption. Of 263 MW of photovoltaic energy sources installed, 236 came from small individual and community installations [25].
However, even this solution for homes did not solve the macroeconomic problem present since the installation of the first wind farms, that is, the lack of large-scale electricity storage for energy from renewable sources. The main form of storage is pumped-storage hydroelectric power stations. In 2015, Spain had a 3.3 GW pumped hydro storage capacity, which represented 3.1% of the total installed electricity production capacity [26] (p. 240). Since then, no new pumping stations have been built, so that in 2020 the generation of electricity by this type of facility was only 1.1% [27] (p. 24). It is planned to reach 9.5 GW by 2030 [26] (p. 12). Furthermore, as the installed capacity of renewable energies grows, the Spanish linkage with the European grid diminishes in percentage.
Following Chaucer ("Then is it wisdom, as it seems to me, to make a virtue of necessity"), in the face of an excessive energy dependence and a necessity for electricity storage, the second-best option in Spain for solving the problem at hand appeared to be the technological development of a digital centre for the national control of wind and solar farms, the CECRE (Centro de Control de Energías Renovables; Control Centre for Renewable Energies). The solution was to opt for efficiency in the integrated management of renewable energies in the national electricity grid. This option involved the creation of a large installation and its corresponding hardware, but it is the innovations in the software that best explain the solutions adopted.

Software Development for the Management of Wind Energy: GEMAS and SIPREOLICO
The need to create the CECRE became manifest at the beginning of the 21st century, when REE detected a difficulty in integrating the amount of energy coming from wind turbines without assuming the high costs for the operation of the grid (see Figure 4) [28]. REE did not know about the wind power that might be entering the system and predicting the potential wind power input on the spot had become imperative. Both problems (maximum tolerable quantity and input prediction) can be solved with two pieces of software, GEMA (Generación Eólica Máxima Admisible en el Sistema; Maximum Wind Energy Generated Tolerable by the System) and SIPREOLICO (a wind power prediction tool), that enabled the prediction of worst-case scenarios for the state of the electrical grid. They were developed and made operational between the years 2000 and 2006, born from the teamwork of the firm REE and the Universities Carlos III and ICAI School of Engineering (Escuela Técnica Superior de Ingeniería; ICAI). To this day, current versions of both programs are still used and have become an international standard for managing centralized operations for the electrical grid.
These programs were developed as a way of confirming whether the total of generated wind energy could be integrated up-to-the-minute into the electrical grid without negatively affecting the reliability of the supply. The control screens at CECRE were able, from 2004 onwards, to conduct simulations on the environmental conditions of wind and light in Spain. Since this made data on wind predictions and the state of generators for different locations available, the commissioning of wind farms could be foreseen. Thus, the CECRE could write instructions that could solve eventual problems in the grid, such as an eventual increase or lack of wind, voltage drops, overproduction, overloads, and congestion. It should be noted that the CECRE was already capable of evaluating the availability of backup energies which could be used at any time (and that mostly consisted of cogeneration plans) and supply the secondary market with information to make the best use of the available plants. This was the first large-scale solution to the problem of variability in renewable energies.

GEMAS
The Spanish acronym GEMAS [29], as has been previously noted, indicates that this is a piece of software that analyses the maximum generated wind energy generated that the system may withstand. GEMAS is able to calculate in real time the maximum energy capacity that the system is safely able to absorb. It uses various functions to indicate what is or may be affected by the input or output of energy from renewable sources, particularly from wind and solar farms. This tool thus optimizes energy generation by maximising energy from renewable sources and preventing eventual problems in the system. GEMAS is based on the constant calculation of the minimum reduction in energy production, Renewable thermal which is used to solve, among other things, voltage dips, the overproduction of energy with respect to demand, congestions, and grid overload. The calculation is done at the level of each independent farm and each aggregation per node (of the transport network) and is sent to the generation control centres to be then transmitted to individual generators. All of these procedures are automatically executed without needing the intervention of an operator at a minimum timeframe of up to one minute.
An example of the problems that GEMAS solved is voltage dips. Until 2008, it was common for wind turbines to have circuit breakers. In these cases, the wind turbine would automatically disconnect and produce a chain reaction. This produced so-called voltage dips in the network. This sudden loss of generation put the security of the general supply at risk. GEMAS calculates the capacity of the system every twenty minutes to withstand voltage dips and anticipate their extension within a park or if they would appear simultaneously in several parks. Once the parameters and forecasts were known, CECRE executes the orders to increase the supply of electricity from the European system or to start combined cycles [30].

SIPREOLICO
The SIPREOLICO [31] software began its development in the year 2001. Its first version was launched in 2002 and presented at various conferences as well as to the IEA (International Energy Agency). SIPREOLICO's first version was trialled in the Canary Islands in 2005 and it was already in full operation the following year [32]. This is a software that updated, in real time, the data used for the prediction of wind energy generated hourly within a 24-48 h timeframe, using data relative to the forecast of wind speeds, the characteristics of individual energy farms, power curves and other historical data. The strength of its predictive abilities made it possible to match its previsions with estimates of energy demands [33].
An example of the function of SIPREOLICO is its use in the cases of transmission grid works and line disconnection scheduling: "When a line disconnection takes place in a zone with many wind farms, problems may arise for the evacuation of the total power generated in the area (this could be the case when both the generation groups and the wind farms are working at full power). This situation took place in the northwest of Spain during the disconnection of a 220 kV line. Since wind generation forecasts were available 48 h in advance, the system operator imposed a limitation on the technical minimum to several conventional groups in the area, when necessary" [32] (p. 8).

The Effect of the CECRE
The initiation of the CECRE in 2006 allowed the growth rate in renewable energy sources for the next four years to spike ( Figure 5). There was no parallel increase in government incentives for the installation of wind power, nor did technology have unprecedented efficiency increments (with subsequent reductions in fabrication and installation costs). If anything, the opposite was true, given that wind turbines had to be adapted to the norms of the REE in order to be controlled and subsequently supply their energy production to the network. Furthermore, as an investment, wind power installations had to compete with photovoltaic ones, which, conversely, were being supported by state investments, as well as being much more subsidized ( Figure 5). The maintenance of an annual growth rate of around 18% in installed capacity and 11% in relation to the total installed capacity for the period between 2006-2009 is unrivalled globally as a function of the energy demands in the Spanish market. There was a rise from 11,000 MW to 19,000 MW in installed wind power, and, within four years, 15% of the demand was covered, a sharp contrast to the previous 9%. Not only had the CECRE managed to maximise the integration costs of wind power in a strong and constant manner, but, in the process, it had moved on to dismantle all installations based on different sources of energy which, although still profitable, were not as much so in relation to the dynamics of wind power (Figure 3, see fuel/gas). Quite literally, wind power had paralysed any option that was not complementary to its growth. From the time that the CECRE was set up, its objective of maximising the integration of wind power without affecting the security of the system was accomplished, which led to the maintenance of growth rates in the installation of wind turbines ( Figure 5, see effect of the CECRE). This was how the installed capacity in wind power rose from 15% in 2006 to 17.5% in 2007 and sustained its growth rate until 2009. Investment in wind power started to decrease in 2010 as the Great Recession made these investments expendable ( Figure 5). The sector's problems were heightened in 2013, when the government refused to continue paying the mid-and long-term premiums which had been agreed on in 2008. An avalanche of complaints in the international courts ensued, leading to unfavourable judgements that, at the beginning of 2020, already amounted to around 800 M EUR, and which could reach the sum of 10,000 M EUR, according to the incumbent for the Ministerio para la Transición Ecológica (Spanish Ministry for the Ecological Transition).

Second Window of Opportunity: Wind Turbine Technology
The CECRE's improvements were spectacular. In the year 2009, Nobuo Tanaka, Executive Director of the International Energy Agency, pointed out that "The CECRE is, globally, the most important experiment in its field." In the same year, John Podesta, former Assistant to President Bill Clinton and president of the Center for American Progress, asserted that "Visiting the CECRE is seeing the future." Effect of the CECRE Without the CECRE, Spain would not have become, in 2013, the fourth country after China, the US and Germany in installed capacity of renewable energies, and, in relative terms, the second country after Denmark (Figure 2). In 2007, Spain surpassed Japan and the US, which ranked second and third, respectively, in terms of photovoltaic energy installed. However, the combined existence of the CECRE and government premiums are not sufficient to explain the growth in the installation of wind farms. The answer rather lies in the Spanish electrical companies and the technological problem of voltage dips that turbine manufacturing companies solved.
At the beginning of Section 1 we indicated that the second obstacle that opened the second window of opportunity was the relatively low primary (potential) wind energy that Spain has. This characteristic is determined by the variety and fragmentation of the geographical environments of Spain. Spain, unlike Denmark, is not a large land plain with a wide continental marine platform. With precarious orographic conditions, the problems of voltage dips were common and very pernicious. The GEMAS software had addressed this problem [30]. However, the strong increase in the installation of wind farms made it necessary to solve the problem in each new wind turbine. REE pushed for wind turbines not to be installed if this problem was not solved. The problem of significant wind generation tripping had been solved in 2008 by Spanish firms. Production curtailments for this reason have not been required since [2] (p. 50).
Three firms, Iberdrola, Endesa, and Naturgy (Gas Natural Fenosa), have controlled the segments of production, distribution, and commercialization since the mid-20th century until today to different degrees, but always with majority holdings [18,22]. Without their endorsement, participation, and impetus in the business of renewable energy, the growth of the latter would have been impossible.
Iberdrola is probably the firm with the greatest market power, given that it is strategically well situated in its relationships with central and regional governments, to which is added its good standing in the UK and US markets. Above all, however, Iberdrola participates in industrial firms and technological incentives associated to the regional government of the Basque Country (Spain). It was in this region of northern Spain at the end of the 1980s when a great window of opportunity for the aerospace industry opened.
Metallurgy, a traditional industry in the Basque Country, was in crisis, and the Basque government spearheaded many incentives for the industrialization of the region. One of the possibilities was entering into the production of parts and components for the aerospace industry, which was a completely new sector to Basque firms [34]. However, its industry was already knowledgeable in matters of special alloys and new compound materials. In little time, many firms appeared capable of creating parts and components for planes, particularly plane wings. The most representative firm in this new industry was Aernnova, which currently owns factories in the US, Mexico, Brazil, and Romania.
In 1993, Aernnova entered into participation with a small metallurgic firm named Gamesa (Grupo Auxiliar MEtalúrgico S.A.), founded in the 1970s. In 1990, Iberdrola had also entered its capital. In 1994, Gamesa entered the business of wind turbines and established Gamesa Eólica.
The idea was simple: manufacturing the blades of the wind turbines was very similar to manufacturing plane wings. Gamesa Eólica signed several contracts for the transfer of technology with the number one firm in wind turbines, the Danish Vestas. Vestas entered Gamesa in 1996 with a capital participation of 40% but abandoned it in 2001 after conflicts precisely around the ownership of technological developments of the wind turbine. Gamsa Eólica thus had complete technological knowledge of all parts of the wind turbine. From that moment on, both firms would compete in the market.
In the following years, Gamesa Eólica became the fourth or fifth world manufacturer of wind turbines and had no difficulties in complying with the very strict conditions established by the Spanish regulator to avoid voltage dips. Vestas would still hold first place in the business, but Gamesa continued to open new factories around the world until it had almost reached the level of the German firm Siemens, the North American General Electric and the Chinese GoldWind. In 2011, Gamesa came into popular consciousness when President Obama visited their factory in Pennsylvania and deemed it an example of a "firm of the future." Gamesa Eólica represents Spain's success in wind energy production, and this success cannot be explained without understanding the importance of the tandem Gamesa Eólica-Iberdrola. This tandem worked as a single firm at the time of acquiring the greater part of the best installation contracts for wind farms around the world. Whereas Gamesa Eólica attended to the technological aspects, Iberdrola used the whole of its commercial and financial power to win contracts.
Endesa attempted to create a similar structure to the Gamesa-Iberdrola tandem, creating the wind turbine firm MADE, which was taken over in 2003 by Gamesa Eólica. Meanwhile, Naturgy, which specialized in combined gas cycles, saw its business grow until 2013, especially by supporting the growing wind farm installations. In any case, the investment in combined cycles was also due to good expectations of the gas market, the replacement of obsolete gas-thermal plants, and the need to increase the production of electricity due to the stagnation of electric energy production by nuclear power plants, carbon power plants, and hydroelectric power plants.

Discussion: Squandering vs. Technological Advancement
In 2012, Spanish politicians and many economic analysts thought that renewable energy premiums had created a speculative bubble that ought to be eliminated. In this section, firstly, we will look at the reasons that led to this somewhat false idea. We will state that it was technological advancements which generated a high initial investment and the subsequent increase in production capacities, which means that feed-in tariffs, at least in the case of wind farms, were justified [35]. Secondly, we discuss the association of the idea of the speculative bubble with renewable energies.

The Association of the Idea of the Speculative Bubble with Renewable Energies
At the beginning of the Great Recession in 2008, the Spanish economic press accused the government of creating a financial investment bubble around photovoltaic energy. This bubble was supposed to have been produced by the facilities given for the installation of solar farms since 2004 and the high premiums on the production of photovoltaic farms since 2007 (Real Decreto (Royal Legislative Decree) RLD-661/2007). The regulated feed-in tariff established by that Decree was 440 EUR per MWh, a price that was ten times the market price [36] [38] (see the exponential growth of photovoltaic power installed capacity in Figure 5). This amount was close to the installed capacity in Germany in 2007 (3811 MW) [39] (p. 56). In 2008, Spain was one of the countries with the most installed photovoltaic power in the world. This trend was partly reached between 2009 and 2010 ( Figure 5). The photovoltaic capacity was 4047 MW and 1049 MW for thermo-solar energy by the end of 2011 [35] (p. 51). When the installations were inspected, one in four presented administrative irregularities, although cases of fraud were very few. However, many investors and citizens outside of the energy sector had decided to enter it, often falling into debt in the process. This situation coincided with the beginning of the Great Recession.
Throughout 2008, as the Great Recession advanced, the notion that a financial bubble had been created around photovoltaic energy invaded both the field of polity and academic analysis. Articles based on the study of premiums, rates, and prices in renewable energies reached the conclusion that there was economic inefficiency, small in size, but notable in degree. In mid-2008, the government, which had played a leading role in supporting renewable energies, accepted these ideas. The RLD-1578/2008 inaugurated the actions of the government against renewable energies. The effect of the new regulation was immediate. Consequently, investment rates in photovoltaic power fell dramatically that year, only to recover very moderately in the following years ( Figure 5).
At the time, it was only a matter of dismantling premiums on photovoltaic power stations. To that end, feed-in tariffs were reduced, the type of installations to which they could apply decreased, and the country's total installed power was limited. There was no need to worry, as the amount of photovoltaic power and installed photovoltaic energy was small, but the criticism of governmental aid spread to the remaining renewable energy sources. These accusations were, however, difficult to sustain. The premiums for the production of photovoltaic energy per MW/h were more than nine times higher than for wind energy. Furthermore, in 2009, the cost of the production of wind energy began to be able to compete against hydroelectric energy, Spain's cheapest. Feed-in tariffs had stopped being essential to new wind installations. Analysts indicated that the so-called learning curve for technology with respect to wind energy was peaking [40](The learning curve is the relationship existing between the quantity of installed capacity and the reduction in the cost of installing a new unit. For terrestrial wind energy in this period, a reduction of 12% was applicable each time that the installed capacity doubled.) The effects of crisis continued, electricity consumption fell, and its production decreased by 5.1% in 2009. However, the growth in wind power capacity continued, although the photovoltaic power installation disappeared that year (see Figure 5). Therefore, the percentage share of renewable energies increased, as did the so-called "tariff deficit" (The electricity tariff deficit started in 2000. It is a state cumulative debt that derives from the financing of the difference between costs and revenues from electricity regulated activities (distribution and transportation costs, capacity payments, incentives for renewable energy and domestic coal, the cost of non-mainland generation, and repayment of previous deficits)) and the cost of the electric bill. This resulted in a simple analysis. After years of solid growth in the production of wind energy, the price of energy in Spain had continued to increase, and consequently, the "tariff deficit" paid by the state increased as a result of the premiums recompensed to wind farms.
Wind farms were also accused of creating the bubble of "tariff deficit." The argument was the following: if a country with a per capita income half that of Germany or Denmark had jointly spearheaded the growth of wind energy and, in turn, consumers had not seen their electricity bill decrease, then there had doubtlessly been a social cost or opportunity cost overrun. In holding this view, it was therefore assumed that Spaniards should have only invested in cost-efficient energy sources (e.g., natural gas) because, being half as rich as the Germans or Danish, they were making double the effort. From this perspective, Spain had made an excessive contribution (its opportunity cost) to the reduction of the learning curve of wind energies. It was concluded that the installation of wind farms should have started from 2010 and all that had come before had merely been a case of squandered money.
In a situation of non-payment of premiums to solar farms, it was only a matter of time and depending on the intensity of the Great Recession that the government would extend the idea of a bubble or "splurge" to the rest of the renewable energies. Large investors were already anticipating this by way of not building any new combined cycle plants whose sole objective would be to back wind farms or photovoltaic power stations.
Even though in 2010 almost half of the electrical consumption lost in the year 2009 was recovered, at the end of the year the RLD-Act 14/2020 established that renewable energy, particularly photovoltaic energy, had caused the increase in electricity production costs. In order to mitigate this increase, the use of photovoltaic farms was further limited and, for the first time, producers of wind, solar-thermal, and CHP (combined heat and power) energy were forced to participate, like other conventional forms of energy, in the maintenance costs of the grid and the management of the CECRE.
The measure did not seem very forceful, but confidence in Spain's environmental politics could not be recovered. New investments in wind farms also fell and Spain lost its standing in the RECAI. In any case, during the whole of 2011, with the declining electricity demand, wind farms, whose investment and premiums corresponded to agreements prior to RLD-Act 14/2010, continued to come into operation (see Figure 5).
After little over a year, on January 27th, 2012, the RLD-Act 1/2012 was enacted, suspending "the procedures for the pre-allocation of remuneration and abolishing the economic incentives for the installation of electric energy plants using cogeneration, renewable energy sources and waste."(Original text in Spanish: La suspensión de los procedimientos de preasignación de retribución y a la supresión de los incentivos económicos para las instalaciones de producción de energía eléctrica a partir de cogeneración, fuentes de energía renovables y residuos.) This decree was retroactive, entailing a 40% reduction in already agreed-on premiums for the installation of farms which had just finished construction or barely started operating. In a short period of time, Spain became one of the countries with the greatest number of complaints in the International Economic Courts, and it crashed in the RECAI. Of course, investors stopped any new investment in renewable power plants.
Between 2007 and 2012, the lack of convergence among revenues and costs of regulated activities (cogeneration plants, renewable energies and waste processing) generated a debt of the system (the "tariff deficit") that amounts to 21,812 M EUR€, around 2% of the GDP [41] (p. 7). However, the premiums to wind farms were not to blame for this. In 2013, when premiums were cut, they were practically in line with the extra cost which comes from optimizing the performance of a wind turbine in Spain in comparison to Ireland, the UK or Denmark, countries with better and more constant wind endowments. However, thanks to the integral management strategy developed by REE in the CECRE and to the continuous process of innovation in wind turbines by part of Gamesa and the rest of producers, that differential was small and diminishing.
However, on 1st February 2013, the government published the RLD-Act 2/2013 with urgent measures for the electrical system. This RLD-Act suspended the system of that had been established in 2007. It justified this measure because of the premiums that the state had to be paid for renewable energy (the "tariff deficit"). The negative consequences for the sector were immediate. Acciona, Spain's most vulnerable operator, lost more than 14% of its stock market value and thought of selling the business. The sector lost 3641 workers that year, accounting for almost 15% of all employment in the sector, and nine wind component factories closed [42,43].
The real reason for eliminating premiums was stated in the preamble to the RLD-Act 2/2013: "New deviations in the cost and income estimates driven by different factors, both at the closing of 2012 and for 2013, in the current economic climate, make breaking even practically unfeasible in light of electric tolls and expected funds as allocated in the National Budget."(Original text in Spanish: "Las nuevas desviaciones en las estimaciones de costes e ingresos motivadas por distintos factores, tanto para el cierre de 2012 como para 2013, en el contexto econó mico actual, hacen casi inviable la cobertura de los mismos con cargo a los peajes elé ctricos y a las partidas previstas provenientes de los Presupuestos Generales del Estado.") Nevertheless, the so-called "tariff deficit" was not only due to the premiums destined for renewable energies. The "tariff deficit" had arisen even before the growth of renewables. It was a consequence of keeping the electricity bill low for consumers. In addition, the cost of feed-in tariffs for renewable energy must be analysed based on the savings that renewable energy represented in electricity production costs. The system of remuneration to producer firms was, and still is, based on keeping nuclear and hydroelectric power plants constantly in operation because they are the cheapest. Once the development of renewables had begun, priority was given to the use of renewable energy. With this array of available energy sources, the Spanish electricity bill is very cheap, as long as no other power plants have to be turned on: "Investment in renewable capacity has increased supply at the wholesale market thus decreasing the system marginal price. It has been argued that renewable energy "pays for itself" in the sense that by bidding at the pool at zero prices these units have substantially decreased the system marginal price and therefore the cost of all energy produced for the electricity system." [35] (p. 51).
However, when there is no wind nor enough turbines, then combined cycle power plants and small-scale thermal power plants need to be set in motion. These plants are technically much easier to turn on and off than larger ones. However, the cost per KW/h produced is very high. Finally, the last plant entering the system sets the price at which the KW will be switched off for all producers and fixes the price per KW to the rest of producers (the system marginal price). Therefore, in a situation of growing demand, energy supplier firms have the incentive, in the short term, to push the entry of renewable sources to the limit and then put combined cycle plants and thermal power plants with high production costs into operation. At the same time, if the expansionary cycle of demand continues, the opposite incentive of wanting to maintain market share applies, and the firms will invest in expanding the installed capacity of renewable energy.
However, in a situation of recession (since 2008), renewable energies took an increasing share of the production, but with a decreasing demand. The need to turn on thermal energy remained relatively low and, for a long time, did not budge, but when winds were scarce, they were set in motion, circumstantially increasing the electrical bill. As long as the price of petrol was low, i.e., until 2012, the situation was bearable.
The government needed to reduce the "tariff deficit" and to make large producers stop relying on premiums to set their wind farms in motion and, conversely, convince them to turn on large, efficient thermal plants, to take advantage of the low prices of oil and natural gas. Besides this, the installed capacity of wind energy was enough to keep the price low in the marginal price market. Paradoxically, the government's objective transformed into increasing the time of operation of large-scale thermal and combined cycle plants.
The government's strategy worked. The "tariff deficit" in the electrical sector decreased in 2013, and it achieved a surplus of 550 M EUR in 2014. In return, the CO2 production, which had been decreasing since 2007, was increased, and the consumption of oil and natural gas increased in the following years. Even the burning of coal increased again, after 25 years in a row of reduced consumption. The "tariff deficit" had been reverted but at the cost of damaging investment, especially in technological development, in wind energy.

The Importance of the Entrepreneurial Trajectory
The situation of investments in solar farms did meet the requirements to be considered as a financial bubble in which novice and even some experienced investors got caught. However, this is far from the case with wind farms. In our mind, what happened with wind farms had more to do with the dynamics of Spanish multinationals in their attempts to grow and occupy exterior markets. This model was inaugurated by the company Telefónica-Movistar [44] and has been replicated by firms such as Repsol and Iberdrola. It originates from the firm holding a monopoly or oligopoly domestically, which allows for a great accumulation of capital. In addition, this capitalization was increased in the case of wind energy by feed-in tariffs. From there, the firm developed a solid group of small to medium technological firms in which it participates as a shareholder or through the establishment of trust-based relationships. These firms, again, are ensured a central position in their domestic markets through their technology, once they open up and become liberalized. In turn, they receive aid to compete with their cheap and efficient technologies in the international and domestic market. This phenomenon was christened "the Spanish technological mini-multinationals." Once these "mini-multinationals" have taken up positions in foreign markets, the large companies also enter into market liberalisation processes in other countries or through tenders, leaning on some of these technological mini-multinationals which are already established.
In the case of wind farms, the first main Spanish firms which entered the market, i.e., Iberdrola, Endesa, and Acciona, followed this model. Iberdrola, as has been mentioned in Section 3, created and partnered with GAMESA and ultimately turned GAMESA into the world's third-largest wind turbine manufacturer and into one of the main wind farm management companies. Endesa tried to follow suit with the firm Team, but GAMESA finally absorbed it. Acciona developed Acciona Windpower, whose technological strength was in wind-farm construction and management, and in 2015 it merged with the German wind turbine manufacturer Nortex, creating the world's sixth-largest wind turbine group. Of course, the fourth Spanish operator, Naturgy, simply reaped the benefits derived from the installation of combined cycle plants which served as backup to the growth of wind farms. At last, in 2016, Siemens and GAMESA announced their plan to merge their wind businesses.
In support of this strategy, the state itself made available the knowledge developed in the CECRE. All firms had collaborated in its development, in particular Iberdrola and Acciona, which meant that when these firms began to compete in the exterior market, these not only provided the technology of their technological mini-multinationals, but also their knowledge in the management of smart grids.

Conclusions
The final and general conclusion of this article is that no country can reach a leading position in investing in the installation of a new technology if there is not a strong component of its own technological development. Feed-in tariffs cannot explain everything. In addition, in the case of the development of wind energy, Spain was driven by the need to overcome several obstacles, e.g., a relatively poor orographic endowment for installing wind farms, a not particularly favourable social perception of renewable energies, and its real status as an "energy island" because it has very few connections to the European electricity grid.
The key to development was in the design and implementation of the CECRE. In a way, through the CECRE, the state acted as an entrepreneurial state, managing to mobilize private industries in a large common project but at the same time competing. From the beginnings of the CECRE, its teams have made possible the maximum integration of renewable energies in the coverage of electrical demand in Spain, making it possible for these energy sources to supply as much as possible to the system. The software programs GEMAS and SIPREOLICO increased the effectiveness of the electrical infrastructure, so that energy production from wind farms has been optimized and increased, increasing, in turn, the profitability of such installations. The CECRE has allowed energy producers to know in advance that there will be no technical problems for the integration of their energy production into the system. At times, in the economic analysis that is made of the regulatory framework, too much emphasis is put on tariffs, premiums, and the law. However, technological and organizational innovations on a large scale such as the CECRE, wind-turbine technology, and the entrepreneurial trajectory are also fundamental. Besides this, without the endorsement, participation, and impetus of the electrical power companies in the business of renewable energy, the growth of the latter would have been impossible. The investment generated was a function of the business strategies of electrical firms. REE did not invest in the CECRE for speculative purposes. Its action generated a new and growing field of investment. Gamesa, Iberdrola, Endesa, and Acciona did not develop their technologies to artificially increase their stock market listing.
The Great Recession ended the dream of continuing to increase the capacity of renewable energy. The shattering of this dream was clear in 2008, with the fall in the growth rate of the installations. Subsequently, Spain lost positions in international rankings related to renewable energy. A great amount of debt with foreign investors has been generated, industrial firms have been absorbed or have moved abroad, and the large electricity management companies have installed themselves in other markets.
Today, despite the problems generated by the Great Recession in the state's public debt, Spain is the fifth-largest exporter of wind technologies, almost tied with the US. However, if management were considered part of the hardware side of the equation, Spain would probably rise some places higher in the ranking [45][46][47]. We might thus conclude that it was ultimately the technological knowledge and not the premiums which kept Spain reasonably well situated throughout and contributed to its return to being an attractive market for the investment in renewable energy, as its current position in the RECAI index predicts.

Data Availability Statement:
The data used in this research are accessible through the specific links that have been indicated in the text and especially in the REE statistics section https://www.ree.es/es/datos/publicaciones/series-estadisticas-nacionales (accessed on 11 October 2021). Much of the information in this article comes from interviewing those directly responsible for managing renewable energy in the firms REE, Iberdrola and Acciona, and the Asociación Empresarial Eólica (Association of Wind Power Firms) of Spain.