Electricity Market in Brazil: A Critical Review on the Ongoing Reform

: With the current worsening of climate change-associated risks, the transition to low-car-bon energy sources has become a global priority. In this context, the advances in the implementation of smart grids, which, in addition to greater efficiency and resilience, also allow greater penetration of renewable distributed energy resources, are becoming increasingly important. However, the necessary investments will be colossal. Many specialists see the process of opening up the electric energy markets as essential to boosting these new technologies. Greater decentralization of the deci-sion-making process can potentially promote greater scalability. However, not all liberalization reforms have led to good results. Several researchers have been evaluating experiences in different countries. Brazil, a country with continental dimensions and peculiar characteristics, already counts with a mostly renewable electric energy generation mix. In recent decades, however, it has become increasingly dependent on fossil fuel sources. Brazil has been conducting a process of opening the electric energy market since the 1990s. This process has faced a series of barriers. This article presents a critical bibliographic review of the Brazilian Power System history and its ongoing opening process, its possible successes and errors, as well as its perspectives and challenges.


Introduction
With the growing concerns regarding the global environmental crises, the international pressure for greater energy efficiency, and the transition to energy sources with lower Greenhouse Gases (GHG) emissions are growing expressively. This transition, although already underway, will still require huge investments, and the resolution of technological, regulatory, and political barriers (Wallace-Wells 2019) [1][2][3][4][5][6][7].
By the year 2019, data from the International Energy Agency (IEA) show that global emissions have been growing. Although it has been reduced in developed countries, as shown in Figure 1, in developing countries, the growth in demand is still essential for improving the living conditions of low-income populations. As a result, it is estimated that there will be a large increase in the demand for Electric Energy in the coming decades, which naturally requires accelerating transitions to sources with low emissions [1,8,9].
The transition to renewable sources with low emissions is a major challenge, since, currently, fossil fuel sources still dominate the world electric energy mix. Brazil, despite its dimensions and its enormous electrical system, already has renewable sources in more than 80% of its electrical energy mix. The country still has great untapped potential in However, paradoxically, the Brazilian electric energy mix, since the 1990s, has shown strong growth in thermoelectric plants with fossil fuel sources, as can be seen in Figures 2 and 3. Hydro generation, which corresponded to 82.9% of the national electricity generation in the 1990s, fell to just over 60% in 2019, fortunately, compensated, in part, by the strong and surprising growth of wind generation since 2007. Furthermore, solar sources, although inexpressive, have been growing exponentially. Studies point to a series of political and regulatory barriers as a cause for this growth of fossil fuel sources. In the last decade, there were also periods when the Brazilian electric energy tariff was among the highest in the world, despite the low marginal costs of the Hydroelectric Plants (HPP), still prevalent in the Brazilian Power System (BPS) [10, 13,[22][23][24][25][26][27][28][29].
In the world electrical generation mix, as shown by Figure 4, fossil fuel sources still have a large predominance, making it essential to invest in new alternatives, such as solar and wind sources. In Brazil, with the increasing difficulties in building large HPPs, with reservoirs, investment in these new sources is also essential. However, in addition to the high installation costs (costs in rapid decline), the fact that they are intermittent sources, the generation of which depends on meteorological variables, makes the significant increase in the penetration of such sources a major technical, economic, and regulatory challenge. Challenges can only be overcome with the modernization of the electrical system, with the consolidation of the so-called Smart Grids (SG). In addition to the huge financial investments, SG consolidation also involves considerable technical and, above all, regulatory challenges [4,5,7,9,13,[30][31][32][33][34][35][36][37].
The energy market has spent almost the entire 20th century being considered a natural monopoly, or a set of verticalized natural monopolies, within the parameters established by Samuel Insull [4,38,39]. The great complexity of managing future SGs is increasingly demanding the design of new business models, especially seeking greater decentralization and flexibility. The first reforms of the electric energy market started in the last Developed Economies Rest of the world decades of the last century, highlighting the successful experiences of the Chilean and especially the British reform [13,22,[40][41][42][43].  In Brazil, the first liberalizing reforms began in the 1990s, at a time of great crisis in the BPS. With the state with no financial resources to invest and the system at serious risk of collapse, the privatization and the partial liberalization of the BPS proved to be important alternatives for attracting investments. However, several mistakes were made, with the reform being considered an unfinished reform, creating supply risks and culminating in 2001 rationing [13,41,[44][45][46][47].
In the following 20 years, some important adjustments were carried out. These adjustments, however, proved insufficient, and, in some cases, created additional complex distortions. There have also been some setbacks in the liberalization process, which have brought even more complexities. The liberalization process that started in the 1990s is still ongoing, with the implementation of the retail electric energy market scheduled for 2024 [13,22,24,[47][48][49].
According to the 10-Year Energy Expansion Plan (PDE) 2029 [10], a report authored by the Energy Planning Enterprise (EPE), an organization that provides research services to the Brazilian Ministry of Mines and Energy (MME) in order to subsidize the planning of the energy sector, the efficient insertion of Distributed Energy Resources (DERs) in the BPS, together with the digitalization of the sector, has revolutionary potential. Moreover, the opening of the free energy market is considered the centerpiece for making this revolution possible [10,50].
This article presents a brief history of the BPS, evaluating its diverse singularities and its evolution until the reforms underway, also discussing its perspectives, and making comparisons with international experiences. Section 2 briefly describes the history of the BPS, until the beginning of liberalizing reforms. In Section 3, the ongoing reforms in BPS are described and analyzed in more detail. The current challenges, weaknesses, and strengths of the ongoing reform are discussed in Section 4. The applicability of reform initiatives from other countries to the BPS is also assessed. Finally, Section 5 presents the final considerations. . World gross electricity production, by source, 2018 (Source: IEA (2020), World gross electricity production, by source, 2018, IEA, Paris https://www.iea.org/reports/electricity-information-overview as modified by the authors. All rights reserved) (adapted from [51]).

The Brazilian Electric Sector and Its Evolution
In contrast to the world electrical energy mix, as already mentioned, Brazil already has a predominance of renewable sources, although this predominance has weakened in the latest two decades. BPS is already almost all interconnected, forming the so-called National Interconnected System (NIS). Only about 2% of the BPS is not yet integrated into the NIS, especially in the Amazon rainforest region. Since its first decades, BPS has always had a predominance of hydroelectric power sources. Many HPPs built between the 1970s and 1990s have large associated reservoirs, providing BPS with good storage capacity. Several of these HPPs are cascaded. Sometimes, what would constitute the optimal for a single HPP could negatively impact the performance of others. Thus, the synergy considerations in the optimal use of water are essential. Some old studies estimate there can be an energy production surplus of up to 20% in the country as a whole, due to the coordinated operation of the generation plants, compared to individualized operations (although some specialists have recently questioned these figures) [13]. All large HPPs are already interconnected with each other and with consumer markets through one of the largest high voltage transmission networks in the world. The BPS is also known for its continental dimensions, with its large number of interdependent HPPs extending over different hydrographic basins, covering a great diversity of rainfall and river regimes. The Figure 5 shows the NIS map, with data from 2019 [10, 11,13,46,47]. To have an idea of the dimensions of the BPS, the total value of energy sales to consumers of all classes, by companies in the sector's productive chain in 2016, in regulated and free markets, without taxes, reached approximately R$ 190.00 billion (US$54.44 billion, using the 2016 average exchange rate). Including taxes, BPS's gross revenue would be R$ 250 billion (US$71.63 billion, again using the 2016 average exchange rate). This figure came to represent about 4% of the country's GDP. In November 2020, BPS had an installed capacity of approximately 174 GW, with a total of 9012 generation plants, of which 222 are HPPs with more than 30 MW, in addition to 1290 smaller HPPs with less than 30 MW [13,52].
The electricity sector, as we know it today, initially structured at the beginning of the 20th century, is still predominantly composed of large generating units, generally distant from the consumption locations, with energy transported through long transmission lines. The entire business chain was usually monopolized by energy companies or electric utilities. Such companies typically either belonged to national governments, or were public companies managed by private investors, or regulated public concessions, owned by pri-vate investors, being considered strategic assets of the country's infrastructure. This verticalized, monopolized, and strongly regulated market model promoted enormous growth in the world electrical system for decades, with generally satisfactory results, although with great variation between countries. Its performance was generally much better in developed countries [22,[42][43][44]53].
Brazil, like other developing countries, has been investing in the modernization of the power system, already counting on pilot projects for SGs. However, the development of these networks has been slower than in developed countries, and the challenges posed by the huge investments required depend largely on the restructuring of the electric energy market. To better understand the complexity and particularities of this challenge, the understanding of the historical context of the BPS is valuable, which will be briefly summarized below [13,54,55].
BPS was initially developed, until the 1930s, under private capital, especially foreign capital, in the phase known as the Good Old Years. The foreign presence started as early as 1879, with the first public experience of electric lamps in Rio de Janeiro promoted by scientist Thomas Edison. At that time, there was no national regulation for the activity [22,46,54].
Between the 1930s and 1980s, the State maintained an almost exclusive participation in the BPS. The nationalization process started in 1931, with the decree 20.395 of 15 September drafted, consolidated later with the entry into force of the so-called Water Code in 1934. The nationalization of energy supply ventures became a priority, including the nationalization of foreign companies. This period has been called the Developmentalist or Nationalist Period. In the period of the so-called Brazilian Miracle alone, between 1969 and 1973, the BPS grew by around 200%, with vertical monopolies and tariffs regulated by the cost of the service. The centralized coordination in this period allowed to take advantage of economies of scale. However, there was no competition, and the tariff policy did not encourage efficiency [22,46,47,54].
Despite problems related to inflationary corrections in some periods and the low quality and efficiency frequently observed, this model worked reasonably well for decades, self-financing and expanding, until 1979 when the crisis of the second oil shock occurred. In an attempt to mitigate its effects, the state chose to use the infrastructure segment as an instrument of economic policy. Measures were adopted, such as freezing tariffs to contain inflation. Although their costs rose dramatically, state-owned energy companies were not allowed to raise their tariffs. The situation worsened with the difficulty of attracting external resources. As a result, from 1985 on, there was a chain of cases of default in the BPS [13,22,46].
The consequences were not more severe only due to the great recession in which the country plunged, which significantly reduced the energy demand [22].
In the 1990s, with BPS's companies accumulating debts totaling 50 billion dollars, it was clear that they were no longer able to finance themselves, and neither would the state. With the new social and economic order established with the re-democratization of the country, the process of restructuring the BPS began with a liberal bias based on article one hundred and seventy of the then-new Federal Constitution, which was founded upon the "valorization of human work and free enterprise". The reforms started out guided by three basic principles: (1) Privatization; (2) unbundling; and (3) efficiency. This was intended to create a favorable environment for private investments in the sector, through the concession regime [22,44,46].
Thus, the objective was to reduce the economic weight of the State, allowing a greater focus on areas such as education, health, and security. In this way, the public administration would start to focus on inspection and regulation activities [22].
In 1995, the Brazilian government developed a plan to restructure the BPS through a reform guided by an international consultancy with experience in other countries, financed by the World Bank. The winning proposal was that of the British consultancy Coopers & Lybrand. Studies carried out by the consultancy together with Brazilian experts produced a whole diagnosis of the sector, identifying activities that admitted competition and those that, because they are natural monopolies, did not. The latest included transmission and distribution activities, which, because they consist of industries that depend on large networks, would require the duplication of a whole infrastructure to allow competition, a phenomenon Samuel Insull had identified a century before. The generation and commercialization activities did not present any impediments to competition. Although the reform followed many good practices from internationally successful models, several shortcomings were later identified. Above all, specialists usually point out the insufficient planning of the reform and the excessive confidence in the determinations of a foreign consultancy, accustomed to another reality of electrical system, to the detriment of the local technicians. That opinion is shared not only by Brazilian specialists [13,23,44], but also by scholars of other countries, like Joskow [41]. The models implemented have received criticism for not adequately considering the peculiarities of a predominantly hydroelectric system, with plants with large interconnected and cascading reservoirs. Instead, they seemed to have been based mainly on the British experience, a country with a large predominance of thermoelectric plants [13,22,41,46].
Electricity generation started to be regulated by a new body, the National Electric Energy Agency (ANEEL). Energy commercialization activities, on the other hand, could be carried out by the generators themselves or by commercialization agents, the traders, who act as intermediaries. They can resell energy to other generators, large consumers, or other traders [22].
Under the BPS's New Model, two types of consumers were admitted: Regulated or captive consumers, and free consumers. Free consumers now have the right to buy electricity directly from specific generators or through traders, through free negotiation of prices, terms, and quantity, and can choose their suppliers. Captive consumers, on the other hand, continued without any power to choose, being obliged to consume energy from the local distribution concessionaire, with a tariff regulated by ANEEL. The legislation established the minimum load limit of 3 MW and 69 kV, in 1995, for new consumers who could choose to become free consumers. The intention would be to start with larger consumers, to gradually improve the system, before admitting smaller consumers to the new free market, which is naturally more complicated and with more risks. The same legislation was provided for the revision of these minimum limits after five years, with the idea of gradually reducing these limits, admitting smaller and smaller consumers, until all consumers could be free [13,22,49].
In addition to ANEEL, the New Model established two other key new institutions: (1) The Wholesale Energy Market (MAE), responsible for managing contracts between the various agents and determining the value of the energy sold; (2) the National System Operator (ONS), solely responsible for the control and coordination of transmission and generation activities for the entire national system [13,22,47].
There were several errors in the reform process, such as not having been banned for companies of the same group to operate in different market segments, a ban implemented in other countries that had also gone through the unbundling process. It allowed the socalled self-dealing, when a private distributor breaks a contract with a cheaper, stateowned generator, opting for a private generator, much more expensive and owned by the same economic group as the buyer, generating real scandals. Despite these errors and some scandals, the reform did in fact allow the return of investments in the sector [13,22,40].
In 2001, however, an energy crisis caused by low affluence, which compromised the level of the hydroelectric reservoirs, a crisis aggravated by the precarious situation of the distribution system and the then low diversity of the national electrical generation mix, resulted in rationing that continued until 2002. The new institutional design came to be questioned as an "unfinished reform". As a result, the need for changes focusing on the security of supply became clear. The dissatisfaction generated contributed to the election of the opposition in 2002 [22,24,46].

New Model of the Brazilian Electric Energy Market
In 2003, the situation changed, in little less than a year, from a supply crisis to an excess of supply, both due to the beginning of a period with a favorable rainfall regime and due to the demand reduction, due to consumer education during rationing. As a result, there was an abrupt drop in prices in free market, resulting in the first migration boom to this new market. In 2006, the free market already comprised around 20% of the volume of financial transactions at the BPS [11,13,14,24].
The subsequent adjustment process was then consolidated in 2004, with Law No. 10848, then called "New Model for the Electric Sector". The law maintained the minimum limit of 3 MW for the migration to free market, but eliminated the minimum level of tension, also establishing new types of agents. Two negotiation and contracting environments were also established: The Regulated Contracting Environment (ACR), and the Free Contracting Environment (ACL). Besides, the old MAE was replaced by the Electric Energy Trading Chamber (CCEE). The definition of two contracting environments led to the need to establish specific regulations for each one. Free consumers operate in the ACL, with bilateral contracts subject to much less intense supervision by the regulator. Distribution concessionaires, in turn, responsible for supplying small consumers, could only contract within ACR [22,24,46].
Another important improvement was the adoption of the auction system from 2002, a process consolidated in 2004, eliminating the risks of self-dealing [13,40,56,57].
The agents authorized to operate in the ACR enter into long-term contracts based on the prices established in the auctions, based on the anticipated demands. To adjust the availability of long-term contracted energy to real demand, naturally always somewhat different from the forecast, these agents are accredited to negotiate on the ACL, in the short-term market, at variable prices (spot prices). The determination of the future spot price depends on the agents' expectations, involving high risks [13,24,56,57].
CCEE is responsible for managing the contract market at the ACL. All energy flow received or supplied, which has not been previously contracted, is settled by CCEE based on the Difference Settlement Price (PLD), calculated from the system's Marginal Operating Cost (CMO) in the latest week of the previous month. The PLD variation is used in other countries as a key parameter for the expansion planning. In Brazil, however, this parameter has not been considered in the planning [13].
Despite allowing free competition in the ACL, the BPS's operation is centralized by ONS. The centralized operation was considered a necessity due to the predominance of interdependent HPPs in the BPS's electrical generation mix. HPPs are limited to commercialize energy up to the limit called Physical Guarantee (GF), a limit that aims to ensure the maintenance of adequate reserves. The GF is mathematically determined with complex and controversial stochastic simulations, based on the energy production that each plant would be able to maintain over the years, to limit the risk of rationing to a maximum of 5% [13,22,47].
Furthermore, although Ordinance No. 303/2004, which instituted the GF system, provided for its periodic review, in practice the initial assumptions were no longer reviewed in the years that followed, and some legal barriers to their review may exist, with the GFs taking the form of a property right of generators. In practice, there has been frequent situations of hydroelectric power overproduction during hydrological crisis, reducing water reservoirs to critical levels [13,58,59].
An essential result provided by this chain of mathematical models is the CMO, which, as already mentioned, serves as the basis for calculating the PLD. The CMO would, in theory, represent the variable cost of the most expensive generation resource dispatched (that is, the most inefficient dispatched thermal plant), in case it is still available to supply the next load increase. In the Brazilian case, the CMO calculation is mathematically determined using Stochastic Dynamic Programming, considering the sum between the short-term cost of generation (most expensive thermoelectric in operation) and the estimated future cost of water in the hydroelectric reservoirs. While the short-term cost may be well known, the future cost is forecast using stochastic mathematical models of enormous complexity. Such models depend on climatic variables with high levels of uncertainty and relying on "synthetic series" with artificial assumptions of affluence, in addition to economic assumptions. Such estimates, calculated in a centralized manner, have not been able to adequately take into consideration the unpredictable effects of recent climate change. In recent years, errors have also been frequent due to inaccurate, duplicate, or inconsistent data, even generating the need to republish the PLD from previous weeks, creating a series of embarrassing situations. According to a survey by the Brazilian Association of Energy Traders (Abraceel), for example, in 58% of the weeks between 2010 and 2012, PLD had to be republished, generating a series of additional costs and market uncertainties [13,58,60,61].
The fact that ONS centralizes the economic dispatch also generates a complicated dichotomy, since it uses mathematical models disconnected from the commercial obligations assumed by the generators. To correct the inevitable distortions, the Energy Reallocation Mechanism (MRE) was created, a complicated and controversial mechanism that seeks to reconcile ONS maneuvers with the commercial contracts signed by the generators [13,24,58].
Another source of controversy is the source codes of the models used in these complex optimization processes. The codes are still closed, kept secret by technicians from the state-owned Eletrobrás, lacking transparency according to the perception of several BPS agents. In addition to opening these codes, developed by a public company, EDP Energias do Brasil has also suggested, in public consultation no. 13/2017, the opening of public competition for the choice of optimization models to be used [13,48,[62][63][64].
As a consequence of the inaccuracies of the current system, one can observe the parameter called Generating Scaling Factor (GSF). The GSF is the quotient between the total amount of energy generated by the plants and the sum of their GFs. When the GSF > 1, it means that the plants are generating a surplus above their GFs, in which case the surplus is reallocated through the MRE. In such a case, the CMO, and therefore also the PLD, tends to have pretty low values. The hydroelectric plants then have their surpluses liquidated by these lower prices, with the thermoelectric plants also receiving the liquidation by their ballasts, even without generating energy. On the other hand, when GSF < 1, a condition that would be expected to be much rarer, the CMO rapidly skyrockets to extremely high values, showing high asymmetry. In periods of water scarcity, with thermoelectric plants generating above their ballasts to cover the energy that hydroelectric plants would not be able to produce to reach their GFs, this production surplus is settled in favor of thermoelectric plants based on very high PLDs [13,24].
The rapid growth of wind farms in the BPS has also been identified as another factor that contributes to the decrease in the GSF. This is because ONS always tries to make the most of its energy, when available, as it is an intermittent source, often neglecting water generation [24]. Figure 6 shows the recent history of the GSF at the BPS, and its relationship with the Natural Affluent Energy (ENA) percentage, which is calculated based on the historical average affluence. Note the frequency with which the GSF has been below 1 (or 100% in percentage). According to studies conducted by CCEE working groups, the correlation between these two variables would indicate the strong impact of adverse hydrological events in the last decade [58].
Also, according to the CCEE, the average GSF in 2019 remained low, at 91.09%. The 2020 GSF is expected to close at about 82%, with a financial impact that can reach 15 billion reals [65,66].
These and other distortions and their impacts on planning have led the BPS in the past decade to possibly overestimate the storage capacity of existing reservoirs. The relative reserve capacity has fallen in the latest decades from four years to approximately six months of equivalent consumption. The distortions and difficulties in building new large HPPs with reservoirs ended up leading to excessive investment in thermoelectric plants, and in some moments of crisis, even to the reactivation of old and obsolete, inefficient, and polluting oil thermoelectric plants, to avoid rationing [13,24].
Between 2008 and 2009, there were new situations of stress for the BPS, with the delay of the rain periods and the drastic reduction of the level of the reservoirs, in a period when the national GDP grew at 5.2% per year, making the use of thermoelectric plants necessary at a cost of more than R$ 2 billion. The bill was charged to the consumer only in 2009, following ANEEL's one-year tariff cycle, in the midst of a global financial crisis. The complexity of the BPS price formation process has caused great controversy among customers [13,24].
The subsequent period, between 2009 and 2011, presented extremely favorable hydrology, reestablishing the reservoirs. However, 2012 started a new period of atypical and extremely unfavorable hydrology, which reached its peak in 2014. Throughout 2012, the reservoirs were emptied, with the super operation of the water system. However, thermoelectric generation only changed levels in December, when the reservoirs were already at critical levels. The reason for this delay is still a matter of controversy, with some experts pointing to political-electoral motivations of the government, and others for inaccuracies of ONS optimization models. There are those who consider that both factors existed [13,67].
On September 11, 2012, in the then government of President Dilma Rousseff, the controversial Provisional Measure (MP) 579 was published, which was later converted into Law No. 12,783 of January 2013. This MP, among other topics, sought to settle the large volume of 20-year concessions made in 1995 by the Fernando Henrique Cardoso government, which would expire in 2015, generating uncertainty in the market. Its text, which was not previously submitted to public consultation, dealt with the guidelines for early renewal of the concessions, with the supposedly commendable intention of the government to reduce the then high cost of electricity in the country by 20%. The measure represented a kind of attempt of "forced" tariff reduction by decree, without considering market conditions, with a series of requirements imposed on companies interested in anticipating renewals. As a result, Brazil began to present a hybrid price-tariff regime, with hydrological risks sometimes assumed by the generator, and sometimes by consumers, with the system becoming even more complex and unsatisfactory for all the stakeholders, regardless of political inclinations, more or less in favor of the presence of the market or the State [13,24,68]. To make matters worse, there was the unfortunate coincidence of the aforementioned water crisis in the period from 2012 to 2014. The scenario clearly demanded energy savings; however, the recently artificially reduced tariffs by 20%, in the middle of the electoral period, gave an economic signal in the opposite direction, stimulating consumption instead of energy saving. The government did not officially recognize the need to reduce demand [13,23,24].
In addition, as a consequence of the renewal process forced by the new MP and the cancellation of auctions, and with the refusal of many companies to renew under the new terms, several distributors ended up being out of contract, being subsequently obliged to purchase energy in the short-term market, at astronomical prices, amid a scarcity of supply. With several distributors taking serious risks of insolvency and needing to wait the next year to raise their tariffs, according to the cycle of tariff reviews by ANEEL, the government proposed as a solution, in 2014, the granting of loans of R$ 11.2 billion by banks to distributors [13,23,24].
Following the explosion of tariffs in the captive market in 2015, right after the elections, the second wave of mass migration to the free market took place, with the free market already accounting for 30% of total energy consumption in Brazil in 2017 [24].
In 2017, five years after the MP 579/2013, the total cost of the measure for the BPS, to be ultimately paid for by the consumer, was already estimated at more than R$ 100 billion. It also produced impacts that were difficult to quantify in terms of legal uncertainty, resulting in a major judicialization process. That is especially harmful in a capital-intensive industry, so dependent on heavy and long-term investments, both national and foreign ones, which usually demands reasonable investment predictability. Since the time of Samuel Insull, Electricity Utilities are known as good and predictable long-term investments. The role of stability to allow the necessary heavy investments in such a highly capitaldependent industry was considered as one of the four pillars of Samuel Insult's vision in the 19th century, which allowed the development of the power industry and electricity universalization [4,13,24,39].
Several measures were adopted in efforts to mitigate the distortions brought about by the MP 579, such as the controversial tariff flag mechanism [13,24].
After the impeachment of President Dilma Roussef in 2016, with her vice president Michel Temer in power, the government began to conduct studies for the resumption of liberalizing reforms, including the privatization of Eletrobrás. The government again be-gan to prioritize the reduction of state intervention in the BPS, and a regulatory environment more focused on the market. One challenge was to reduce the huge judicialization created by MP 579 [24].
In 2018, there was a new election, and the reform agenda did not advance much. In 2019, the new president Jair Bolsonaro took office, with a liberal economic agenda. In 2019, however, the government's focus was heavily concentrated on the complex and controversial reform of the pension system. Other reforms, such as the BPS's reform, have been postponed to 2020. In 2020, in addition to the natural difficulties of negotiation with Congress, there was the advent of the COVID-19 pandemic, which contributed to paralyzing more complex reforms, such as those of the BPS. In the meantime, some public consultations have been conducted, and some measures have been taken to renegotiate hydrological risks [69][70][71].
The solution for the renegotiation of hydrological risks stands out, with the approval, by the Federal Senate, of the Bill 3.975/2019, an issue that had been holding R$ 8.7 billion in judicial amounts since 2015 and impeding new reforms in the BPS. Under that agreement, the generators propose to pay their debts with the MRE, in exchange for a 2-or 3year extension of their concessions. The agreement solves the problem in the short-term but does not solve its structural causes. The revision of the MRE mechanism and the modernization of the old methodologies for calculating GSFs, considered outdated by several specialists, continue to generate heated debates [59,72-78].

Future Challenges for the Brazilian Power Sector
During the 20th century, the BPS supported the country's industrialization process, with its enormous expansion and competitive energy supply, based on its predominantly hydro generating sources, with its low marginal costs. For the 21st century, in addition to maintaining and expanding the predominance of renewable sources with low GHG emissions, fulfilling commitments assumed with the international community after the Paris Climate Conference COP 21, there are also the challenges of recovering tariff moderateness and expanding access to electric energy. The country has a commitment, made with the United Nations Sustainable Agenda, to universal access to electric energy by 2030. A recent survey by the Institute of Energy and Environment (IEMA), however, indicated the existence of 990,000 Brazilians still living without access to electricity in the Legal Amazon region [13,24,[79][80][81][82].
In order to continue expanding, maintaining the predominance of renewable sources, the modernization of the BPS will be increasingly important, with the adoption of new SG technologies. The investments required are enormous, and their sustainability will naturally depend to a large extent on the regulatory equation of the electric energy market [39,54,55].
Even with the reforms of the latest three decades, Brazil is still considered a conservative market in the international context, based on the ease of migration to the free market, as illustrated by Figure 7   Statistical analyses in international markets, considering the experiences of American and European markets, have shown that the decentralization and liberalization of the electricity markets, giving consumers the possibility to select their suppliers, when properly implemented, tend to provide greater efficiency to the system. It also provides price reductions for industrial customers [22,41,42].
The restructuring of any industry with the dimensions of a country's electricity sector, however, is a task of great complexity and risks, especially when this industry was, for a long time, widely considered and operated as a natural monopoly. Since the 1980s, researchers have been indicating the need for reforms and discussing their immense complexity and the risks involved, such as the work of Joskow and Schmalensee [84]. In addition to the technical complexities, the peculiarities of each location need to be taken into consideration, and it is a continuous learning process. It is not surprising that early reform attempts have often shown unsatisfactory results, requiring adjustments and further reforms [40][41][42]84].
In electrical systems, the generation of energy, at every instant of time, must perfectly match its consumption, with the generation instantly following any fluctuations in demand. Any failure in this balance of powers can generate a cascading chain reaction of failures, leading to serious blackouts. The need to maintain the power balance, in addition to other demands such as voltage and frequency stability, brings a series of complexities, requiring the consideration of services that provide additional capacities or reserve margins. In practice, these characteristics generate a strong interdependence between all the players in this market. Contrary to what happens in other markets, bilateral contracts between agents can involve risks to the entire system. This specific characteristic of the electric energy markets poses great challenges, also generating greater price volatility, when compared to other commodities. In addition, these challenges tend to increase with the greater penetration of intermittent renewable sources [4,6,36,37,[41][42][43]53,85].
These specificities make adequate regulation an essential factor for the success of competitive electric energy markets. According to Joskow [41], for this reason, the term deregulation, often used as a synonym for liberalization, can sometimes be misleading.
The author describes what he regards as the textbook, or gold standard, of successful reforms, based on international cases and studies. The basic elements of this gold standard are described in Table 1, with the analysis of the status of their implementation in the BPS reforms [41,86]. Table 1. Textbook measures of the electric sector reforms and their applications in the BPS [41].

Privatization
It was largely carried out at BPS, starting with the reforms of the 1990s. However, the nationalization of the giant Eletrobrás and several other stateowned companies remains on the agenda.

Vertical separation of potentially competing segments
This measure was initially poorly implemented in the 1990s, generating self-dealing scandals, already overcome.
Horizontal restructuring of the generation sector The measure was carried out with a good level of success, although a series of adjustments are still needed.
Creation of short-term wholesale volunteer markets (spot market) The spot market has been a reality in the country since 2004. The current methods used to determine the PLD are still questioned.

Active Demand Response Implementation
Implemented only in experimental projects. The new hourly rates, like the white rate, may prove to be an advance in this direction.
The study of international experience is of great importance so that lessons can be learned from past experiences, successes, and failures. On the other hand, it is important to note the many singularities between successful initiatives. Nordic countries, for example, with an exception to the golden rules, have succeeded in creating a competitive market without complete privatization. Furthermore, among successful reforms, a wide range of strategies can be identified, with some points in common. Virtually all involve different variations of auction techniques [13,40,41,48,86].
In very general terms, internationally, one can identify three basic models of regulation of competitive markets, in increasing order of liberalization: Single-buyer model, competitive wholesale, and competitive retailer [22,41,43,85].
The single-buyer models represented schematically in Figure 8 are seen as a quick strategy to attract capital to the generation, without major changes in the status quo. In it, an institution, generally state-owned, has practically exclusive responsibility to buy energy from generators, reselling it to distributors [85]. In competitive wholesale models, large consumers can buy energy directly from nonvertical generating companies, through two basic contracting mechanisms, usually involving auction techniques: Power pools or energy exchanges. In this model, small commercial or residential consumers continue to be served by traders, or in some cases by the distributor itself, who in turn buy in the wholesale market. In the power pool model, demand is all managed by a centralizing entity, the system operator, which indirectly represents consumers buying energy at auctions in which generators have mandatory participation. Auctions are conducted according to optimization algorithms, considering all the technical restrictions of the system. The results tend to be superior in terms of technical requirements. Countries with a strong reliance on hydroelectric sources often prefer this model. In the energy exchange model, negotiations and initial dispatch take place with bilateral contracts carried out on exchanges independent of the transmission system. After the negotiations are concluded, the contracts are informed to the system operator, who must provide services for power and energy balance, stability, and overcoming of any bottlenecks in the transmission. If bottlenecks or other imbalances are subsequently identified, additional fees may apply to transactions. In practice, there are many variations of these models, as well as several different combinations of them. Developed wholesale markets, given the need to mitigate technical and financial risks, tend to become a collection of sub-markets for different types of services, time horizons, protection, or insurance against unforeseen events (hedging), among others. Figure 9 exemplifies the basic structure of a typical wholesale market [41,42,85].
The most advanced stage of the liberalization process is the competitive energy retail market (retail wheeling), in which the monopoly of energy commercialization for small commercial and residential consumers ceases, leaving them finally able to freely choose their suppliers. Although some markets have been relatively successful in applying retail wheeling, as in England, this model still raises more controversies. Maintaining a retail market implies higher transaction costs. Small consumers must have access to all the information necessary to select the products and suppliers best suited to their needs. The complexities of the energy market, and all the asymmetries between large suppliers and small consumers, make many experts question the validity of this model. Consumer education becomes a challenge. According to Joskow [41], future investments in dynamic tariffs and demand response technologies can eventually make this model more viable. What typically occurs in retail markets is that consumers start to buy energy from retailers, who in turn buy from the wholesale market, offering products that are more suitable for small consumers. Figure 10 illustrates a competitive retail market [22,41,43,85].  The MME, through Ordinance No. 187 of 4 April 2019, instituted a working group that is responsible for studying proposals for the modernization of the electric sector [58,83].
The following are some of the challenges that the BPS reforms should address, considering the experiences of successes and failures in international markets and in the history of the BPS itself: •

Renegotiation of hydrological risks (Review of MRE and GSF mechanisms):
MRE currently mitigates the individual hydrological risks of HPPs, but not systemic ones. It also has not been designed for a high penetration of intermittent renewables [24,58]; updating of GF calculation methodologies [58], including their individualization by generation units [87], or even their possible elimination, as proposed by Oliveira and Salomão [13]; evaluate possible limitations to the allowance for the seasonality of generators' GSFs [58]; creation of hedge mechanisms against hydrological risks [58]. To this end, the process of public consultations and debates between all actors is essential [41]. • Legal and regulatory security: Detailed planning and broad prior debate can avoid the need for constant changes in the rules, which generate regulatory and legal insecurity, which is extremely harmful to an intensive capital market such as the electric energy market. However, international experience shows that the need for some adjustments, according to Joskow [41], is inevitable after implementation, due to its natural complexity. The challenge is to minimize this need [22]. • Resumption of the privatization agenda: The reform of the BPS in the 1990s started with a privatization agenda, following the textbook model of the liberalizing reforms of the international electric sector. This agenda, however, has been only partially implemented, having been resumed after the 2016 impeachment, and a succession of allegations of corruption and misappropriation of public resources of state-owned companies by political groups. The resumption of the privatization project of the giant Eletrobrás continues today in a water bath at the National Congress [13,22,23,47,71].

•
Organizational review: With the resumption of the privatization agenda, a thorough analysis of the appropriate division of roles between the state and the market will be necessary. The relations between the different bodies and actors within the BPS will also require detailed reevaluation [13]. • Review conflict between operation optimization and market relations: It is necessary to reevaluate the current dispatch model centralized by ONS, without considering the commercial contracts formed by the generators. Several other alternatives are in operation on the international market. In [83], some of them are briefly discussed, with their possible advantages and disadvantages [13]. In the current model, generators assume part of the systemic risks, the costs of which are later passed on to the consumer. One possibility under evaluation would be the dispatch-by-offer model, where the central operator would be solely responsible for the security of the system and supply, leaving financial risks, pricing, and dispatch decisions (within an established margin) in the charge of market agents. Although this model may appear to be a challenge in systems with a predominance of hydroelectric sources such as the BPS, there are international examples that demonstrate its viability, such as the Nord-Pool, the Colombian, and New Zealand markets, among others [13,40,42,83]. • Implementation of the retail energy market: In Brazil, the implementation of the retail energy market is scheduled for 2024, allowing small consumers, including the residential ones, to participate in the free market [13,22,49]. Although there are success stories, international experience shows that this ultimate stage of the liberalization process has high risks, and there is no consensus on its advantages. That is because, with small consumers entering en masse in the free market, there is an increase in transaction costs, which can be worth it if new consumers know how to optimize their acquisitions. However, education and the provision of information to small consumers, in complex markets such as electric energy, is still a challenge, and the effort is not always worth it [22,41,49]. Despite the difficulties, with the evolution of SGs, the increasing decentralization of the electric energy market is expected, with the creation of prosumers and the likely diffusion of peer-to-peer markets, using the blockchain technology. The future massification of SG may make it necessary to review at all even the need for natural monopolies in the electricity sector [9,13,30,31,37,88,89]. The diffusion of demand response technologies with hourly rates is expected in the future to make retail markets more viable [41,83]. Some Brazilian energy companies are already exploring the use of new digital platforms to help consumers better understanding the free market. Some of these new platforms make use of the new blockchain technology, and offer novel financial risk-sharing tools, according to the customer profile.
As some examples, we can mention the initiatives of EDP Energias do Brasil [90], AES Tietê [91], and OMEGA [92]. • Digitization and Implementation of SG: Brazil already has some pilot projects for SG, and several states are seeking to promote the adoption of smart meters, one of the most basic measures for making SG viable. However, the country, as a developing nation, is naturally still many steps behind most developed countries, as this simple first step will already require huge investments, in a country still full of financial challenges [54,55]. • Expansion of natural gas thermoelectric plants for operation at the base of the load curve: With the rapid growth in the penetration of intermittent renewable sources, it is essential to establish reserves to stabilize the system. In addition to the revision of the reserve margins of HPPs with reservoirs, the need to maintain thermoelectric plants with natural gas, perceived as having the least environmental impacts among fossil sources, is increasingly evident. The role of nuclear power plants for this purpose has also been considered [10,13]. The regulation of natural gas has been reviewed to stimulate new private ventures in the sector [24,93]. • Consolidation of transmission systems: According to Joskow [41], international experience demonstrates the importance of consolidating the transmission sector in independent regional operators, remunerated for their performance in wire availability services, and operating neutrally in other markets (network neutrality) [40,43]. In Brazil, the different regions are served by a profusion of different transmission systems, with different owners, which hinders possible synergies. The transmission companies only assume risks associated with the maintenance and construction of the lines. Any operation errors generate impacts whose costs are later passed on to customers [13,47]. Oliveira and Salomão [13] propose the creation of incentives for regional consolidation of the sector, creating monopolies in each region of the country, responsible not only for the construction and maintenance of the lines, but also for the planning of their expansions and operations in their regions, and assuming the associated risks. Net neutrality would also be guaranteed by the incentive price cap mechanisms. ONS would only be left to coordinate interregional operations. The British experience has recently shown that it is possible to conceive innovations in the regulatory mechanisms, even in the case of monopolized segments, which allow the establishment of prices through consensus among the actors [89]. • Unbundling energy and wire costs: Within the concept of network neutrality, it is also essential that distributors stop being remunerated for energy sold and start to obtain revenues based only on their performance in providing the wire service [13,41]. • Transition mechanisms and maintenance of contracts already established: Adequate planning of the transition process, regarding contracts already signed, is essential for legal stability, and to create a favorable environment for the sequence of reforms, once initiated [22,40,41]. In [22], some analyses are presented showing that, from a legal point of view, it can be feasible to make this transition in Brazil, even for the implementation of the retail wheeling energy market.

•
Political commitment: According to [41], another important lesson that international experience shows (and that is the case of the BPS) is the need for a strong political commitment to reforms before they start. As already mentioned, these are large-scale reforms with enormous risks. Thus, if they are left unfinished due to the lack of a political environment, or in case there are setbacks during their implementation, the result can be quite bad. Further, as a result, the reform initiative can end up representing a remedy that can easily become worse than the problems it was to solve [13].
Another issue that needs to be highlighted is the fact that the reforms take time, sometimes many years, to mature and give expected results. Thus, it is important not to go back with the first stumbles, without more accurate diagnoses. Problems attributed to reforms are quite often explained by pre-existing conditions [37,41,94,95].

•
Minimizing the risks of energy populism: The electricity sector, with all its complexity and dimension, is frequently used by governments for electoral political purposes, especially concerning the establishment of artificial tariffs, to contain inflation, or to please voters. That is called energy populism, and several experts point to the cases of MP 579 and the measures taken by the Brazilian military dictatorship during the 1980s as good examples of this type of distortion, which has also occurred in many other countries [13,24,68]. As Grub and Newbery point out [95], the electric energy market, with electricity reaching every voter's home, is an inevitably politicized issue. The point is not to eliminate the influence of political pressures, but to seek ways to minimize them. The liberalization of electric energy markets tends to make them less vulnerable to political influences. The establishment of economic dispatch mechanisms by supply also has the potential to minimize spurious political influences. Regulation transparency is also of great importance [13,41,43,83]. • Demand Response Systems Implementation: According to Joskow [41], it is important to invest in dynamic tariffs and demand response technologies to increase the viability of this more advanced model, so that the balance between supply and demand can better adjust prices, as observed in other more common product and service markets. In Brazil, there is already an hourly tariff option available to small consumers, the white tariff, and there are experimental demand response initiatives underway. However, for the country, the diffusion of smart meters, essential for this technology, is still a challenge. Not only is the process of replacing the old meters expensive, but the relatively fast technological obsolescence of some new meters and their communication protocols and interfaces, and the lack of greater universalization of data networks in the country still make their diffusion difficult. However, there are many ongoing initiatives [39,54,55,[96][97][98].

Final Considerations
The increase of the penetration of intermittent and distributed renewable sources in the electricity networks is an essential condition to allow for universal access to electric energy in developing countries while gradually eradicating fossil fuel sources. This expansion, however, is only feasible with the digitalization and automation of the electric networks, grounded on the new concept of SGs. These challenges are present in every electrical system, particularly in developing countries.
Brazil, however, already has an extremely privileged electrical system, both for its dimensions, its enormous possibilities for synergies, as well as for already counting on a predominantly renewable electrical energy generation mix, with low GHG emissions. However, much remains to be done to enable the necessary growth of the system, allowing its universalization, and ensuring reliability and availability, without increasing GHG emissions. The results already achieved are quite impressive, with more than 99% of Brazilians having access to electric energy through the NIS. The availability of electric energy to remote communities, however, is still a challenge, which the evolution of SGs and Microgrids may mitigate. Further improvement on the quality of life of the country's population, as usually happens in any developing nation, will require more energy consumption. Faced with the challenges of the climate change effects, Brazil needs to find ways to grow its generation capacity, keeping and possibly increasing its share of renewables. Given the difficulties to build new large HPPs with reservoirs, and the intermittence of wind and solar power, huge investments in the modernization of the power grid will be required. Both the complexity and the costs of such endeavor are so huge that it seems unlikely it could be addressed by the state alone, in the old verticalized and centralized model of the nationalist period. Private investments, both national and foreign, will be increasingly necessary, and that can only be satisfactorily achieved by advancing the current reform. However, the state will continue to have an essential role in regulation and market design. Huge private investments will happen and be correctly directed to the overall social benefit if they can find a stable and coherent set of rules, favoring meritocracy. Transparency in the government policy is essential, and the government must continue listening to all stakeholders and specialists since any reform of such dimensions is always a continuous learning process.
To develop the BPS's gigantic clean energy generation potential with tariff moderateness, thus sustaining the country's development, enormous barriers will still need to be overcome, which is natural in a system with these dimensions and complexities. The prospects look quite promising, but several complex risks seem to be lurking on the horizon. This paper has briefly presented and discussed some of the most relevant risks and opportunities of the ongoing reform, providing the reader with a broad overview of the whole process. However, the subject is so complex and vast that many large volumes would be needed to describe it in every relevant detail. Thus, we leave a more detailed analysis of each specific topic as a suggestion for future works.
Among many others, a topic that can be explored in future works is the so-called tariff realism, evaluating how the possible externalities of different generation alternatives can be effectively included in their prices, considering their true costs, their positive and negative effects on the power system, and the environment. The proper evaluation of externalities is essential in the current debate related to the end of subsidies for some distributed generation alternatives, like solar, as well as to correct the referred known distortions in the adequate remuneration of the hydroelectric plants. The impact of future electric mobility also needs to be further assessed.
Another relevant and interesting topic that needs further evaluation is the Brazilian consumers' willingness and ability to participate in a wheeling retail market. Brazilian people are usually very open to new technologies, with the rapid speed of cell phone adoption in the country often appointed as evidence of that trait. Formal education, and particularly financial and investment education, is still a great challenge for the nation. A successful retail market design will need to take these strengths and weaknesses, among others, into careful consideration.

Acknowledgments:
The authors would like to thank to the COPEL and ANEEL for financial supporting and facilities, Federal University of Latin American Integration (UNILA), Coordination for the Improvement of Higher Education Personnel (CAPES) and the Brazilian Council for Scientific and Technological Development (CNPq) for financial support.

Conflicts of Interest:
The authors declare no conflict of interest.