Proposals for Regulatory Framework Modifications for Microgrid Insertion–The Brazil Use Case

This work presents a detailed view on how the current policy scenario for the electricity sector in Brazil is prepared to absorb the concept of microgrids in both its technical and commercial scope. The main focus is on how we can move towards consistent and fair regulation in which all parties involved in the distributed generation sector are satisfied with their duties and rights. The current regulation framework does not explicitly tackle microgrids, but allows them to be connected into the distribution grid. However, the adoption of microgrids could be wider and fairer for their stakeholders through deeper technical understanding and consequent proposals for improvements to that regulation. Based on the assumption that the concept of microgrids has benefits for the environment and society, the intention of this work is to contribute to policy analysis that serve to leverage the insertion of microgrids in the context of the Brazilian energy sector. Thus, our main objective is that stakeholders are able to guide themselves and find proper implementation of their projects and realize the technical, societal and commercial benefits. The focus of the article is limited to microgrids inserted within the coverage area of distribution utilities. Therefore, the power grid is available to the connection, as long as it is operational. Nevertheless, the possibilities of islanded operation are explored. More than the availability of the grid under normal operation conditions, raising levels of interaction and cooperation for mutual gain and how the grid-microgrid relationship could be improved is the main focus. Finally, numerical simulations with the analysis of an actual deployment of a microgrid in a residential condominium in Brazil are used to illustrate the impacts of the proposals.


I. INTRODUCTION
New power sector technology and according regulations recently introduced in several countries due to widespread use of distributed generation are changing the structural design of power systems based on large power plants and long transmission lines that serve end consumers at various voltage levels. The integration of small scale distributed generation next to the consumer and its loads into a small power system that can operate in a smart fashion connected to low and medium voltage grids with the capacity to of operate either as an island or connected to the distribution grid is the definition The associate editor coordinating the review of this manuscript and approving it for publication was Junjie Hu . of microgrids used in this work, based on [1]. Microgrids are a reasonably recent advance and in order for this concept to be widely implemented and established, it is necessary to introduce technological, organizational and regulatory changes so that its implementation and integration with the traditional system are properly performed [2].
On another side, economic and financial issues are paramount to increase the number of microgrid project. In this sense, a proper balance between costs and benefits is needed so that business opportunities involving microgrids are attractive to investors, both, in Brazil and elsewhere.
The integration of microgrids with conventional electric power systems must be carried out in accordance with current regulations. As in any sector of society, regulation is a fundamental point and sets the standards for the development and adequacy of a given activity in the electricity supply chain. The insertion of distributed generation into distribution grids, for example. However, there are many barriers to more frequent and wider adoption of microgrids. Regulation, or its lack thereof, represents one of them [3]. The main contribution of this article is to present a coherent series of proposals for regulatory changes that enable the insertion of microgrids into the current Brazilian electricity markets, which can answer various questions that exist today regarding the current regulation.
The work starts discussing the most general aspects to be considered, which include the regulatory and legal framework advances that can foster this integration, and the analysis of the influence of these aspects in the Brazilian context. To complement this discussion, we address the tariff policy adopted in Brazil, as well as the existing tariff structure. Three main portions drive the economic aspects of microgrids, namely: tariff incentives, fuel costs for microgrids using fuel-dependent generators, and market environment in its wider context. Creating effective mechanisms through which microgrids can exchange energy and services with the grid, capturing a significant portion of the benefits they provide, must be a priority in the regulatory framework. However, this issue is seemingly more complex for the following reasons, mentioned in [4]: • The economics of microgrids are highly sensitive to tariff details and related agreements. Thus, an incorrect tariff policy can have a major negative influence on the economic performance of the microgrid; • The services that the microgrid can provide to the grid are new, such as voltage support, or are traditionally provided by sources with different characteristics, such as the provision of ancillary services, which have been provided by large power generation units; • Many of the benefits are local, and quantifying them is not only a technical challenge, but can also raise financial issues. Other aspects within the economic scope and the dynamics of the current market are also considered in here. The technical knowledge and regulatory reach complete the context in which this work proposes regulatory measures that aim on the insertion of the microgrid concept in the Brazilian electric system without penalizing the interested parties. Based on this, it is proposed that the current tariff structure is reviewed to ensure that prices reflect, accurately and in practice, the costs and benefits of the system integrating distributed generation resources and the utility.
In [5], the author recommends that the tariff structure be modeled to reflect the costs and benefits of distributed generation for the system, as well as site characteristics that may affect costs. It also underscores the need for the tariff model to reward, with smaller amounts charged for the availability cost, those customers who can provide physical assurance that the system load will not exceed a certain amount during peak periods. In addition, it discusses criteria for the unbundling of distribution tariffs so that distribution charges more accurately reflect the loads that microgrid customers impose on the grid and the services they use from the distribution grid. Some of the criteria include distribution charges differentiated by load and distance, peak load to average load on certain distribution circuits, and nodal usage costs that reflect marginal prices according to the location of the distribution system. All these measures aim to ensure the expansion of distributed generation efficiently, but bring major changes in relation to the longstanding preference for structuring average tariffs, not differentiated by location and with few adjustments based on time of use. Therefore, one may prefer to approach such changes with experimental tariffs and eventually with a series of incremental changes. If so, microgrid participants could be ideal volunteers for experimental tariffs, helping to demonstrate the value of differentiated tariffs for consumers and the system as a whole. Changes in regulatory practice are recommended in [6] to implement cost-effective measures and distributed resources. The most relevant are: • Allow incremental profits for distribution companies, resulting from efficiency gains from the efficient integration of distributed resources; • Implementation of differentiated system usage charges and payments based on service voltage level, time of use, and provision of ancillary services; • Review of planning criteria to include the potential benefit of delaying or reducing grid investments. In this sense, it is possible to realize that the second point above is the most viable to be implemented in the short term, since changes in the form of charging can be implemented together with the inclusion of the microgrid entity in the regulatory environment. This is the main suggestion made in the tariff context, and the idea is reinforced here by the fact that these types of tariffs, unlike the traditional hourly tariffs, allow a permanent mitigation of the system peak.
Microgrids enable strategic dispatch and can potentially reduce peak demand from distribution grids, even when customer and utility peaks are not coincident. Reliable, equalized demand profiles are of great potential value to utilities, allowing the expansion of substation infrastructure to be delayed or avoided.
With the incentive for efficient use of the grid, the focus is no longer on the shift of consumption to off-peak hours such as hourly rates, but rather on the reduction and even extinction of this point [7].
Knowing what are the main characteristics required in the tariff structure, it is necessary to choose the best model for a given region, according to the characteristics of the same. New tariffs will have to be developed for a microgrid that provides services to increase reliability and power quality. For example, tariffs should be modeled that allow utilities to shut down all or part of a customer's service for reasons of system reliability in exchange for lower tariffs. The design of these tariffs should consider a fair division of the value and costs created by the microgrid. However, it is concluded that this return should be defined by utilities wishing to implement a demand-side management program once the program is structured [8].
As for energy pricing, it is understood that improving tariff regulation is expensive, costly and risky. This task needs to be done with caution so as not to upset the balance that regulatory agencies seek to maintain between the interests of all involved stakeholders. Thus, a radical change in the tariff scenario could be detrimental to the system. For this reason, the option to follow the general lines of the tariff structure is justified, proposing appropriate modifications in order to allow and encourage the access of microgrids to the system. This work is structured as follows. Section II presents a chronological history of the evolution of energy policy in Brazil that affects the insertion of distributed generation and the questions and challenges for the insertion of microgrids in the Brazilian market. Section III presents proposals for regulatory changes that largely aim on improving current regulation for distributed generation and promoting microgrids including tariff and technical issues. A summary of proposals is provided in Section IV and the results of deployment in a residential condominium microgrid, proving the methodology, are shown in Section V. Finally, conclusions are drawn on Section VI.

II. MICROGRID RELATED REGULATIONS IN BRAZIL: HISTORY, QUESTIONS AND CHALLENGES
Current Brazilian regulation framework and its recent history are presented in the context of microgrids in this section. The latest regulatory revisions are analyzed and their links to technical and market questions and barriers are discussed. Emphasis is put on the details regarding access procedures to the distribution grid, technical challenges, such as intentional islanding, and tariff structures.

A. REGULATORY HISTORY IN BRAZIL
The restructuring process of the Brazilian electric power system began with the promulgation of the Concession Law in 1995 [9], which required the implementation of a new institutional and regulatory formats to enable changes in the electricity sector. This still plays an extremely important role for the improvement of the regulatory apparatus of the Brazilian system and for the expansion of the distributed generation.
Brazilian Electricity Regulatory Agency -ANEEL 's Normative Resolution No. 481 was approved on April 17th, 2012 [10]. This defined the modified discount for the Distribution System Use Tariff (TUSD) and Transmission System Use Tariff (TUST) for photovoltaic energy. Normative Resolution No. 481 amended ANEEL's Normative Resolution 77/2004 [12] and provides a discount for photovoltaic solar plants with a power output greater than 30 MW, from 50% to 80% of TUSD and TUST. This discount is given to plants that have been in operation until 2017 for 10 years. Plants that are to be installed later are eligible only to 50% discount. In addition, ANEEL's Normative Resolution No. 482 of April 17, 2012 [11] deals with the grid access for distributed generation. It gives rules for the connection of distributed generation electricity production facilities. According to Normative Resolution No. 482, distributed micro-generation was defined as an electric power generating plant with an installed capacity up to 100 kW. Minigeneration facilities are the ones with installed power larger than 100 kW an up to 1 MW. Both generation must make use of sources based on hydropower, solar, wind, biomass or qualified cogeneration, connected to the distribution grid through consumer unit facilities. This Resolution provides for the compensation of active energy consumed with the active energy generated by the consumer unit with distributed minigeneration in a one-to-one ratio with credits valid for up to three years.
It is concluded that Brazil only regulated the distributed generation connected to the distribution grid in 2012 with the edition of Resolution No. 482. However, little was seen at the time in terms of diffusion of these systems. It is now clear that the Brazilian electric system is now moving towards the implementation of distributed generation systems and it is expected and desirable that the regulatory framework allows for the mass insertion of microgrids in the coming years. Some important features were redefined with the Resolution No. 687, in 2015.
The main points were: the limit for micro-generation was revised from 100 kW down to 75 kW, the maximum installed power for solar mini-generation increased from 1 MW to 5 MW, the duration of energy credits was expanded from 3 to 5 years, the cost of metering units replacement was shifted to the utilities, the total analysis time for new connection requests in the micro-generation compensation system was reduced from 82 to 34 days, access request forms were standardized and the obligation that all connection analysis processes be performed online by 2017. Significant evolution of regulatory framework to foster the insertion of distributed generation in Brazil from the 2011 to 2015. Table 1 presents a summary of the main regulatory framework milestones that foster the insertion of distributed generation systems in Brazil.

B. QUESTIONS ON MICROGRID REGULATION
The key challenges associated with microgrids connected to the main grid, revolve around defining and managing the microgrid connection to a distribution system. According to the tariff and regulatory framework in Brazil [13], as well as the probable advances of these contexts in the coming years, it is understood that the cost of energy paid by the customer for microgrids will depend on a number of factors, among which are: • The cost of energy produced by the distributed energy resources supplying the microgrid compared to the corresponding tariff for a given type of consumer; • The cost of distribution services established by the utility and additional costs associated with connecting to the grid; • Streamlining these factors in conjunction with existing tariff and billing structures is a regulatory challenge. In a microgrid project several cost categories need to be addressed [14]- [17]. The first is the cost of engineering studies that are required to interconnect significant amounts of distributed energy resources to the distribution grid. The second cost category is the potential distribution grid improvements that may be required to deal with the bi-directional power flow from distributed generation resources. Saving energy from other generation sources can offset the latter costs. Finally, there are the costs of implementation, operation and maintenance of the microgrid. An appropriate regulatory strategy in this context is critical to the success of a microgrid project and a number of questions are to be answered when analyzing the regulatory scenario. These are summarized in Table 2.
The questions presented below are important for the elaboration of microgrid projects for all the raised issues will guide decision-making for the implementation of new microgrid projects due to their important technical and regulatory character. Without having these questions well answered in the scope and vision of the project, one is not able to effectively advance the economic viability of new ventures.
When we talk about making the project economically viable, we are referring to having defined the benefits that microgrid customers and microgrid maintainers will have in their favor over their obligations to regulators and the grid to which they will be connected. The projects will have an effective chance of being deployed if the resulting balance is positive.

C. CHALLENGES FOR THE INSERTION AND AGGREGATION OF MICROGRIDS IN THE BRAZILIAN REGULATORY CONTEXT
It is important to review the current regulation in order to clarify existing policies and remove uncertainties about the microgrid participation in the system, both, for customers and utilities before any specific changes for microgrid insertion are proposed within the regulatory context. The interrelations between microgrid focused regulation and other policies also need to be verified to support distributed generation and develop ideas to remove or reduce selected barriers.
Among the regulatory challenges that need to be addressed for the development of microgrids in Brazil, the main ones include defining and managing the microgrid connection to distribution systems.
The main barriers and issues to be addressed for an appropriate inclusion of microgrids in the regulatory and legal context of New York City were analyzed in [19]. This section presents issues that can be relevant in the context of the Brazilian regulation based on this study. Microgrids are not currently defined as entities in the existing regulation in the international electricity sector, neither in the Brazilian context [15].
As a result, the first microgrids to be developed in the current practice will have to anticipate, based on the project's ownership and service characteristics, how the project will be viewed and dealt with by regulators The specific terms of a regulation that meet the needs of microgrids varies according to the particular characteristics of each project. The following is a list of important issues [27]: the deployed technologies; whether the system is located entirely on private or public property; whether or not the microgrid uses the distribution lines of the local utility; whether it is owned by the utility or a group of cooperated or consortium consumers; whether the system serves multiple customers previously not served by the utility; if it serves residential, commercial or industrial customers; if the microgrid receives and/or provides power supply and ancillary services; among others.
Therefore, the objective of this section is to present how the challenges for the insertion of microgrids within the current regulatory model could be addressed jointly with the use of technologies readily available and in harmony with the current tariff conditions so that it is possible to insert microgrids in the current context even with the currently known challenges.Concrete proposals that can effectively leverage the insertion of microgrids should come after fully understanding the challenges.

1) TARIFF STRUCTURE
Brazil is currently in a transitional period in the form of electricity pricing. The conventional electricity meter, currently used by most regulated consumers, does not consider, for individual electricity measurement, the price variation over the period of use. Thus, most consumers do not pay for the energy consumed an amount that is effectively a function of the time it is consumed. Prior to the creation of the ''Tarifa Branca'' [28], which is a simple three-step tariff with the ''cheap-medium-priced-medium-priced-cheap'' pattern on weekdays and cheap pattern on weekends, there was only one tariff, the Conventional, which featured a unique value per kWh, charged for the energy consumed and constant every day and every hour.  The ''Tarifa Branca'' creates conditions that encourage some consumers to shift peak-period consumption to those where power distribution is idle.
This transition from single tariffs to flexible tariffs can be considered as a first step towards market flexibility, as it allows consumers to decide on the best way to use energy. The next steps are expected to follow the European example, in which each consumer contracts their energy from different suppliers. In this case, the utility is remunerated for the proper maintenance of the grid and a trader negotiates the energy with the consumer [29]. In this model, the microgrid could appear as a supplier that the consumer would have a choice to choose as its electricity supplier. This is in addition to the model in which the microgrid provides energy to the consumer, for cases where the microgrid has larger coverage. There could also be models where the consumer owns the microgrid and, thus, manages its own production and consumption.

2) ACCESS AND CONNECTION OF MICROGRIDS TO THE ELECTRICITY GRID
The guarantee of free access to third party access grids (TPA) was needed in all countries where the electricity sector was restructured by establishing competition. This allows the development of various supply options for buyers and sellers of energy in a competitive market. In most countries, distribution is subject to strong technical and economic regulation, which means setting differentiated access tariffs for system users [24].
It was no different in Brazil. Free access, established by Law No. 9.074/95 [30] and Law No. 9.648/98 [31], is the right of any agent or consumer to connect and make use of the electricity system by reimbursing the involved costs, regardless of the trading of energy [32]. More specifically, Law No. 9.074/95 provides that ''Suppliers and their consumers are granted free access to the distribution and transmission systems of a public service utilities, upon reimbursement of the transportation cost involved, calculated based on criteria established by the government grantor''. Free access is one of the pillars of a structural model of an electric system, a basic instrument for effective competition in the segments of generation and commercialization of electricity, where there are a multiplicity of agents and consumers.
Regarding distribution facilities, ANEEL is responsible for regulating access to transmission and distribution systems, as provided for in Module 3 of PRODIST -Distribution Procedures [39]. In particular, section 3.7-Micro and mini distributed generation access. These procedures aim to meet the needs of agents and consumers of the electricity system in Brazil, through the identification and determination of rules consistent with the access to distribution systems spread throughout the Brazilian territory. Therefore, the essential step required to enable the development of various supply options for energy buyers and sellers has been taken. Guaranteed free access is that the interaction of the microgrid with the distribution system will be made possible, facilitating the importation or exportation of energy, once the request for access is approved by the corresponding entity.

3) CURRENT INTERCONNECTION RULES
In most utilities around the world, including Brazil, distribution interconnection rules recognize only micro-and mini-generation units. These exchange power with the utility through a net metering system in Brazil. Thus, in order to have an adequate insertion of the microgrids, there is a need to create rules capable of covering different types of interconnections that may not currently be considered by the utility. According to [33], some issues that should be considered are: • Whether the price of interconnection considers the ability of the microgrid to act as a resource that is able to consume and produce energy over short periods of time, alternating between production and consumption; • Whether limiting the size of the generator inadvertently limits the type of services a microgrid is capable of providing, such as voltage support and system reliability; • How should the generation and maximum total load located at one point of the distribution system be evaluated, and how are the necessary improvements to the system evaluated; • As in a new microgrid insertion scenario, distribution system upgrade costs will be allocated.

4) EXISTENCE OF REGULATED MARKET
Energy tariffs in the regulated market generally consist of three parts: generation, transmission and distribution. In this situation, energy compensation is usually structured to neutralize the total cost of imported energy in relation to energy produced and exported. The meter is located at the Point of Common Connection (PCC) and records the difference between energy import and export. Therefore, the utility only sees the result of these exchanges and does not observe everything that happens beyond the PCC, such as exchanges between local suppliers and consumers.
In this scenario, an on-site power system supplier may execute a power purchase agreement with an individual customer and offer that customer a competitive on-site systemgenerated energy tariff, which is normally owned by the supplier. This would be feasible because, with the right incentives, the cost of generating such a system can be competitive with the costs of the generation, transmission and distribution package price. However, it would be difficult to implement a resource-sharing microgrid, i.e., various types of resources that provide electricity to multiple customers through the distribution system, in the current scenario since there is a limit to how much each local generator can export.
In addition, existing laws in Brazil limit the regulated consumer's ability to purchase energy from a generator other than the corresponding utility. Law No. 9.074/95, for example, sets minimum requirements to becoming a free consumer and choosing the supplier. For the regulated consumers the local utility is the compulsory supplier with regulated tariff.
In an unregulated power market, the microgrid operator could use the distribution grid to carry all the generated power, including the one generated in systems located behind the meter. However, given the competitive basis of electricity prices in unregulated markets, this energy would have to compete with the cost of power generation offered by the utility. In addition, transmission and distribution charges would be added to the customer account on a volumetric basis, along with demand charges. In this scenario, even with the control efficiency advantages offered by the microgrids, it would be difficult to compete with the energy sold by the utility. Once the market is opened so that there is no minimum limit to becoming a free consumer and choosing the power supplier, the microgrid can enter the market as an option for power supply. VOLUME 8, 2020 Today, the utility delivers energy at an interconnection point in various customer aggregates and the customer is in charge of the internal distribution. This type of model could be the precursor to a microgrid, in which a set of clients in an area would be viewed as a single medium voltage client. However, some difficulties for this implementation would be the incorporation of grids already built by the utility, the administration of the microgrid itself and the lack of regulatory procedures in case of the existence of a microgrid operated by third parties [34].

5) CROSS-SUBSIDY
Another problem that can be verified is the so-called crosssubsidy [37] since the isonomic prices set by the utilities may not adequately recover the costs of utility and microgrid customers who rely on the distribution system for service reliability, but who buy less utility power than customers using the distribution grid alone. As there are fixed charges to be charged, these will be charged to a larger percentage of customers who are not part of a microgrid and buy more energy from the utility, resulting in an unintended cross subsidy.
In fact, according to [35], in Portugal it was found that with the increase in distributed generation, consumers reduce their energy bill by producing their own energy. However, the costs of the electricity system remain and are spread over a smaller number of system users, affecting the price on the final consumption.
Referring specifically to microgrids, this phenomenon also leads to questions about the utility's obligation to provide an equivalent service to both types of consumers. Customers who do not participate in a microgrid will actually be paying to support premium services for customers connected to the microgrid if the microgrid customers get higher levels of reliability, as expected, and increasingly avoid paying their share of the fixed costs for maintaining the distribution system. As a result, the area's energy tariffs will not be able to cover actual energy costs. The basic premise for a smart grid is the smart, subsidy-free or publicly subsidized tariff that motivates customers to rational usage. Thus, with the increase of distributed generation and even with the connection of microgrids in the Brazilian system, a reformulation and adaptation of the energy tariff calculation methodology will be essential to avoid such cross subsidies. Making the tariff system more efficient smart, with seasonal, hourly and locational signage, and clearly no cross-subsidies is one of the objectives.
This adaptation is being discussed in Brazil through ANEEL's public consultation AIR No. 04/2018 [29], which considers six possible alternative scenarios. Compensation would be made differently in each of these. Currently the energy consumed is fully offset by the energy generated. Thus, in the first base scenario 0 considered by ANEEL there would be no change in the compensation system. On the other hand, from alternative 1 the energy generated by the consumer is already worth less, because the value of transmission wire B will not be compensated.
This component is equivalent to almost 30% of the energy bill value. In alternative 2 both wire B and wire A are no longer accounted for, so the energy injected into the grid will be worth 34% less. In alternative 3, the TUSD charges are excluded from the offsetting, making the energy generated by the consumer 42% less. Alternative 4 excludes losses. Finally, alternative 5 excludes the Energy Tariff (TE) charges.
These scenarios would vary depending on the type of project being registered with the utility, namely: Generation Next to the Load; or, Remote Generation. Generation Next to Load: In this mode, the consumer generates energy and compensates at the place where the generator system is located. ANEEL proposed that the current rule would apply to connections made until the end of 2019. In this case, the consumer has a vested right for 25 years. For systems connected from 2020 onwards, the current rule would be maintained for 10 years. In addition, ANEEL established some power triggers installed in Brazil to change the compensation system. In the case of generation together with the load, the trigger is 3.36 GW installed power. Once the trigger is reached, alternative 1 becomes valid, i.e., there is no compensation of the wire B tariff.
Remote Generation: This is remote self-consumption or shared generation solar farms. In this mode, the terms of 25 and 10 years work the same way. However, after the first trigger (1.25 GW) alternative 1 begins to apply. A second trigger (2.13 GW) is provided, which initiates alternative 3, excluding wire B, wire A and TUSD charges from compensation.
ANEEL decided on October 15, 2019, at a public board meeting, as a result of AIR No. 04/2018, to open a public consultation in continuation of Public Hearing No. 1/2019 to receive contributions to the proposed revision of Normative Resolution 482/2012 regarding the rules applicable to distributed generation. The proposal under discussion provides for a transitional period for amendments. Consumers who have the distributed generation system remain with the billing rule in force until the year 2030. Consumers who order the distributed generation facility after the publication of the standard, which is expected by 2020, will pay the grid cost (TUSD, Wire B and Wire A), in the case alternative 2 mentioned above. In 2030, or when a predetermined amount of distributed generation is reached in each utility, these consumers will offset the energy component of the Energy Tariff (TE) charges, i.e., alternative 5 occurs, and pay in addition to the grid costs.
In the case of Remote Generation, the proposal foresees two scenarios. Consumers who already have distributed generation continue with the rules currently in force until the end of 2030. In addition, new requests for access after the publication of the standard, scheduled for 2020, will pay grid costs and charges, also offsetting the energy component within the Energy Tariff, i.e., alternative 5.

6) COST OF CONNECTION
The Capacity Reserve designation applies to self-producers who remain connected to the grid even when they are not consuming power from the utility. Self-producers without sale of surpluses are, by definition, their own generation consumers operating in parallel to the utility grid and do not have surplus for sale. This type of consumer pays a price for the grid connection service because the utility is required by law to automatically supply power if that customer's generator is not operating. The costs are computed based on the consumer's generator size and are intended to reflect the cost portion to operate and maintain the infrastructure and reliably provide power to that customer.
The concept of capacity reserve also applies to a microgrid if it is able to almost completely meet its demand while remaining connected to the grid [33]. It is then necessary for the utility to define who is responsible for the cost of maintaining the grid connection. It could be the microgrid operator or the individual consumer that is part of the microgrid. A simple and objective solution would lead to the belief that the cost would be individual for small microgrids. The full cost would be of the microgrid for large microgrids formed by multiple partners as it could benefit from the reduced costs of a larger consumer. In any case, the energy cost increases if the cost of servicing the capacity reserve is included in the cost of service for the microgrid customer.
A consideration that distinguishes microgrids from other types of consumer with generation capacity is their ability to provide grid services. This is a clear contrast to the view of the microgrid as a consumer of grid services. In other words, the microgrid could offset the benefits, which is not the case with a generator in which interconnection exists solely for the benefit of its customers. The grid connection of a microgrid also favors the system when it provides ancillary services for maintaining system quality parameters.
The following questions are, thus, relevant: • Whether interconnection with the system provides a benefit to the system, or if it provides only benefits to microgrid customers or both; • How the costs of providing services related to connecting to the microgrid client grid must be offset by the services and benefits that the microgrid provides to the system, if any; • How the interconnection service should be managed, i.e., whether it should be through an interconnection charge or if the utility should directly request ancillary services or both. Details of the proposed remunerations are discussed in more detail in Section 3.11 as a form of regulatory contribution.

7) INTENTIONAL ISLANDING
According to IEEE 1547, an unintentional islanding is an unplanned event that is typically triggered by loss of the utility's grid or equipment failure.
In the event of unintentional islanding, it shall be detected and distributed generation shall cease to be supplied to the grid within two seconds of the formation of the island. This measure is the one most adopted by utilities.
Intensifying distributed generation penetration poses major technical challenges for power utilities and one of the biggest is the ability to operate in islanded mode. Islanding is the mode of operation in which the generating station supplies an electrically isolated portion of the access distribution system [36].
This mode of operation is not a new issue in the study of electrical systems. However, most analyzes in Brazil were aimed mainly focused at system protection against island formation, typically not allowing this type of operation.
There are differences between islanding and anti-islanding considerations that need to be clarified [37]. The IEEE 1547 anti-islanding provisions [38] are intended to prevent unintended islanding of grid-connected generation. Separate provisions also provide standards for intentional islanding [17]. Anti-islanding is a vital safety feature of protection systems and is not to be removed from the standard in future revisions. In order to be compatible with established regulations, distributed generation systems should be automatically switched off in case of interruption to prevent unintended islanding. As for intentional islanding, recent changes to IEEE 1547 provide some of the key provisions to enable this practice, where an isolable generation source is designed to operate both on-grid and off-grid. The main difference between anti-islanding and intentional islanding is that once a system is intentionally islanded, anti-islanding requirements no longer apply. The islanded system is disconnected from the grid and, thus, does no longer poses a safety concern.
The advantage of intentional islanding operation over standby power outages is that intentional islanding allows for a controlled transition process, which prevents potential failures or microgrid supply quality requirements and also a smooth reconnection to the grid, reducing potential voltage sags by connecting loads.
Utilities currently prefer to avoid islanding at all because of the consequences that an unintended islanding can lead to. A concern refers to the safety of the personnel responsible for maintaining the distribution grid since there may be equipment powered by the distributed generation. This can lead to accidents and possible damage, especially in the service of power restoration. In addition, severe damage to distributed generation with rotating machines can be caused due to the possibility of out-of-phase reconnection.
In the case of microgrids, there is still no specific regulation for this modality. What is understood by the current regulation is that operations where there is a risk of power injection into the grid by distributed generation sources during a contingency period are not allowed. This is the example of islanding. The isolated operation of sources and loads, during the contingency period is allowed provided that no power injection occurs into the faulted grid.
Consideration should be given to the impact on the quality of energy delivered to consumers in the islanded area when analyzing the intentional islanding of the microgrid since VOLUME 8, 2020 the distributed generation voltage and frequency controls are sometimes not configured to sustain an islanded system. In addition, according to the current regulation the utility is still responsible for the energy offered to the consumers, even if it does not have control of the distributed generation operation. This is a reason why many distribution companies do not desire islanded operation. However, a proper regulatory framework can be established that allows distribution companies to guarantee the quality of energy delivered to the final consumer. In many cases the utility could have the benefits of the high penetration of distributed generations allowing the formation of isolated subsystems in its local grid. Islanding happens intentionally in such cases because the operator is aware and agrees to this.
There must be a motorized coupling circuit breaker or an electronic grid coupling system to make intentional islanding possible. This is similar to the devices used in parallelconnected generation units. It should be located at the connection point between the main system and the microgrid to allow the islanding and reconnection of the island to the main system. A device that ensures the synchronism check function at reconnection times must control them, e.g. a synchronism check relay. In addition, a relay that prevents the reverse flow of energy at times when the microgrid is intentionally islanded must be present.
The success of an islanding depends on the condition of the grid before the islanding, especially the power flow in the coupling circuit breaker, the characteristic of the microgrid internal generating units, the disturbance that led to the formation of the island and the islanding detection time.
Detection of islanding is essential, as steps must be taken to fully establish the new mode of operation. The selection of the distributed generation control/operation mode and the reconfiguration of the protection system within the island should be immediately performed following the detection of an islanding condition. Planned control actions such as load shedding or change in power generation and storage should be initiated if necessary.
Proper planning is required for the islanding scheme to be implemented since the transition between modes of operation must be guaranteed. The quality of the energy within the islanded microgrid, the successful disconnection of it and its subsequent parallelism with the main system should be verified through previous studies. Operating microgrids, especially in island mode, requires the adoption of relatively new knowledge and technologies. In this regard, efforts must be made to overcome regulatory challenges and address technical deficiencies such as the need for automation and the implementation of data communication systems.
Intentional islanding in Brazil, i.e., when a generating plant supplies to an electrically isolated portion of the distribution system, is also addressed in PRODIST [39]. PRODIST Module 8 establishes the general power quality requirements that a utility must fulfill. Distributed generation operation currently only occurs when connected to the main system, whereas islanded operation is typically vetoed by the utilities due to the lack of studies that guarantee system level safety, except in the case of isolated systems.
PRODIST Module 3 provides on islanding, advising that the utility may establish the island operation of part of the distribution system in agreement with the power generating plants provided that the operating procedures contained in PRODIST Module 4 -Distribution System Operating Procedures are met. This guideline shows that the utilities are not forced to accept an islanded unit. However, Module 3 establishes that a technical assessment of the possibility of island operation involving service to consumer units should be made for generating plants with installed power above 300 kW. Studies must be made to evaluate the power quality in the associated microgrid in order to opt for island operation. An automatic parallelism circuit breaker opening system shall be used when island operation is not allowed. Thus, even if the island operation is interesting for both the utility and the accessor, quality and protection studies that guarantee the quality and safety of the grid should be made to ensure its viability. Islanded operation is not allowed if they are not done and generation should be disconnected in the event of failure using anti-islanding protections.
If island operation is permitted for the generating plant, the conditions shall be established in an operating agreement between the parties in the operating relationship between the utility and the microgrid operator. The procedures set forth in Module 4 of PRODIST -Distribution System Operating Procedures -regarding this type of operation must also be observed. PRODIST Module 4 provides on islanded operation that the generator responsible for frequency control of the electrically isolated portion of the distribution system shall be provided with Automatic Generation Control (CAG) or any other technology capable of performing the same function if islanding is done permanently or for a long time. In addition, the unit shall provide the necessary information for the elaboration of steady state and transient studies and, when requested by the utility, adjust the parameters of the control systems in order to guarantee the proper performance of the system. Thus, if there is a need to make intentional islanding possible, the utility may request alteration of the parameters of the voltage and speed regulators if necessary. This is an interesting fact since it adds an option that can be changed if the initial studies show the impossibility with this mode of operation [34] or to if increased margins of quantities that limit the viability of the islanding are needed. Thus, it is noted that there are favorable conditions for the formation of microgrids in the current regulatory framework. Regarding quality, there would be no major obstacles [34] as long as the provisions of Module 8 are followed. Each microgrid could be operationally seen as a customer by the utility, respecting a bilateral document called Operating Agreement (AO) [34]. Finally, there is a need for studies so that islanding is proven to be viable and safe. The conclusion here is that there are no regulatory barriers for intentional islanding as long as studies and operational agreements are properly done and give the technical support to it.

III. PROPOSALS FOR REGULATORY CHANGES
Microgrids can be considered disruptive technology in in many situations as they introduce features that did not previously exist in conventional power systems. However, most of the barriers to a successful microgrid project implementation are institutional [23] and financial.
There are also issues that will be probably defined with the increase in the insertion of microgrids in the electric power system. These include hardware interfaces, communication interfaces and protocols, which should be preferably standardized for interoperability. This will foster cost savings and flexibility for the end user and the utilities so that they can incorporate microgrids into their operations while increasing a consumer's ability to access options and pricing appropriate to the level and type of service that is received [18].
Overall, the regulatory context in Brazil is adjusting to the inclusion of microgrids in the system in accordance with the 2020/2021 Brazilian regulatory agenda [40]. However, there are still some regulatory deficiencies that need to be addressed, as it is a fairly recent discussion. Firstly, it is important to highlight that the microgrids are not currently in force and completely defined as entities in view of the existing regulation in the Brazilian electricity sector. As a result, microgrids that may be deployed will have to anticipate the first regulatory aspects based on ownership and service characteristics. In this sense, it is important to verify how the microgrids will be seen and treated by the regulatory agencies.
According to a research published by the Brazilian Society of Energy Planning -SBPE [41], the establishment and practice of microgrids are still uncommon, as this type of technology demands profound changes in the philosophy of planning and operation of distribution systems, in addition to still high installation costs. The permission for a microgrid to operate in islanded mode is a decision of the distribution grid operator. Thus, the negotiated the permission for intentional islanding is also included in the framework of the proposals made here. This should be done until a specific regulation on the subject is published.
The specific terms of a microgrid regulation should vary according to particular characteristics, including the deployed technologies, if the system is located entirely on private property, if it crosses a public road, if it serves multiple customers not previously served by the utility, if it serves regulated or free customers, the size of the microgrid distribution area [27] and, if interacts with other microgrids in a technical and/or economic agreement.

A. REMUNERATION OF SURPLUS GENERATION
Economical drivers are typically good tools to encourage a desired practice or trend. Thus, the likelihood of adherence will increase if it is possible to increase the return obtained by the consumers by participating in microgrids.
One option for remuneration of surplus generation would be to sell it on the free market, but without reduced levels of technical and bureaucratic requirements to aid small generators to enter this commercial environment. Special rules could be implemented that would allow the creation of a new concept of consumer-generator agent that has a generation surplus in accordance to the proposal in [42]. This agent would be able to sell its surplus in the free market and would be represented at the Chamber of Commerce of Electric Energy (CCEE), by some agent, which would in turn facilitate the participation of this consumer generator in the Free Market Environment (ACL). In this context, the retailer comes in as a possible solution. This agent would be responsible to better negotiate by doing so with the sum of the surpluses of several consumers or several microgrids within the ACL.
It is noteworthy here that the current scenario is of growth resumption and requires a profound review of the expansion model of demand for the energy matrix in Brazil [43]. In this environment, we will soon see more industrial and commercial customers search for the free market, i.e., energy contracts outside the utilities monopoly environment. The competitiveness is created by the high attractiveness of reduced prices of photovoltaic solar generation, meeting shorter deadlines in the implementation of new projects and matching the generation and consumption curves of potential consumers. What is needed here is to improve the prioritization mechanisms for access to the distribution grid. Where Regulated Trading Environment (ACR) based contracts have an advantage over ACL models. Thus, a joint action in this direction may leverage not only the photovoltaic solar source, but also all the businesses involving the insertion of microgrids.
It could be also advantageous to create the figure of generation and demand aggregators, which will be those that can integrate generation and demand surpluses of small energy blocks coming from microgrids and distributed generation units. Their aggregation would ideally provide an adequate volume to trade in the market as if it were a virtual plant [42]. It is evident that the regulatory context will tend to evolve to allow the commercialization of surplus generation, both from distributed generation and microgrids.
The system owner should be able to choose between trading this additional energy and using it to offset its consumption with the local utility. This will help distributed generation to expand and new business opportunities to be appear, such as companies specializing in the deployment and operation of distributed generation power plants, roof rents and the creation of electric communities for the viability of a project. This proposal should also go through further discussions to make commercialization feasible, such as the incidence of taxes and the cost of energy transportation.
Of course, this is one of the ways in which surplus energy can be traded. Just as it works today for some customers who can choose to stay in the regulated market or move to the free market, it would be interesting that a microgrid could choose to trade at the CCEE through an aggregator trader, or sell the surplus directly to the utility as a regulated consumer unit, or use energy surplus to offset its consumption with the local VOLUME 8, 2020 utility, which is the only option legally available. Regulatory model proposals should consider the three aforementioned possibilities, as the energy surplus valuation would differ depending on the possibility considered. At first, the most advantageous option would be to market through an aggregator, but it is an option that is more complex than the others and needs more adaptation to the current rules.

B. DEALING WITH DIFFERENT MICROGRIDS CASE BY CASE
It is evident that each microgrid will have its particular characteristics, as well as different consumer protection issues, based on location, type of customers, owner of the microgrid, and specificities of operation. Therefore, competent bodies should analyze the regulatory specificities on a case-by-case basis, taking into consideration issues such as: • The size of the microgrid in terms of number of customers and installed load; • Whether the microgrid is operated for economic gain; • How microgrid services are offered to customers, including whether the service is offered at a fixed price or through contracts; • The obligation of a consumer to become a client of the microgrid; • The type of customers that the microgrid serves; • The potential influence of microgrid on off-load, which may be potentially affected by its existence.
The regulation for a specific microgrid can be modeled once the above issues are defined and respecting the general regulatory framework that will be adapted for the insertion of microgrids.
One of the issues that must be decided according to the particularities of the microgrid is the supply obligation. This is stated in [19] as one of the main challenges to be addressed for the correct inclusion of microgrids in the regulatory and legal context of the city of New York. For physical microgrids, if the regulatory body determines that they have an obligation to serve, it may also consider that the microgrid is the last resort provider. For microgrids serving customers that were previously interconnected with the local utility, or who continue to receive backup service from the utility, the last resort provider is likely to remain the local distribution company. Thus, it is expected that this obligation will exist for microgrids serving areas that would otherwise be electrically isolated from the distribution system. Ultimately, the requirement will depend on the customer's accessibility to the local distribution company.
This would probably require the microgrid to service at the request of a potential customer and would also probably lead to a more complex tax structure.

C. BUSINESS MODELS FOR THE UTILITY IN CASE OF OWNERSHIP OF PARTIAL OR TOTAL OWNERSHIP
Electricity utilities will face increased competition on several fronts following the downward trend of costs for renewable resources; microgrids; and, other technologies. It seems unlikely that the traditional business model will survive in its present terms, although it might not be doomed to complete extinction. A survey of top executives from more than 50 energy companies revealed that the existing business model is expected to transform or even be unrecognizable by 2030 [44]. It is important to gain an understanding of potential alternatives to the current electricity business model based on such high expectations for transformation.
There are different models that the utility could adopt to better fit the increasing penetration of microgrids and distributed generation in the electrical system. These include: • The utility builds, owns and operates the distributed generation systems and microgrids; • The utility forms partnerships with third parties developing the microgrids, including some level of revenue sharing; • The utility is the operator of a virtual power generation plant; • The utility becomes a provider of electricity services. The results of the economic modeling described in [45] show that utility's classic business model would be less affected by greater microgrid penetration if the utility chooses to build, own and operate the systems rather than oppose their growth and risk a competition with a third party developer. However, the utility's investors may not incur large capital expenditures in the implementation of microgrids and the relevant regulatory bodies may not grant tariff adjustments to recover the cost of microgrid deployment. The solution may be a partnership with third parties that would include some level of cost and revenue sharing when the regulatory and investment risk is considered. For example, the utility may hire a third party service to design and build microgrids, but all power would be sold to the utility. It would share a portion of the microgrid power sales with the third party developer until their costs are recovered in exchange for those services. The utility would fully assume ownership of the microgrids and receive 100% of its generation sales as soon as the thirdparty developer recovers its costs.
In addition to the partnership approach with third parties, there is also the possibility of creating a business model where the utility is seen as the operator of a virtual generation plant, which is an alternative model that utilities could use to incorporate distributed generation into their flow of revenue. The utility should aggregate generation to help balance supply and demand as well as relieve grid congestion as a virtual plant operator. This strategy could either improve reliability or postpone the need for system improvements.
From the standpoint of the utility model, the price would be based on the value of the services provided by the utility. Customers select from a list of services they need and pay according to the value of those services. This model increases the equity of the utility's customers and ensures that the utilities, distributed generation owners and microgrids are properly compensated [45], [46].

D. MICROGRID SEEN BY THE UTILITY AS SINGLE CUSTOMER (OPERATING AGREEMENT)
The operator allows a series of innovations and tailored operations by allowing the customer or the microgrid to be managed according to its needs and then acting as a single entity aggregated to the distribution system. The interconnection point only needs to identify if power is being injected into the grid or if it is being imported by the microgrid. On the other hand, although microgrids can be simply viewed as a form of distributed generation, these systems deserve a separate discussion since they offer a number of unique issues that need to be addressed. Charges for utility backup services need to be reviewed for each application in a scenario of multiple clients connected at a single connection point, just as the applicable interconnection standards need similar analysis.
Regulatory uncertainties are created when one person within a microgrid sells energy to another using existing utility lines within the microgrid [47] as mentioned.

E. DEFINITION OF NEW MARKET PARTICIPATING AGENTS
According to [26], [44], utilities seem to support the idea of defining new market participants. These are mainly a system integrator or operator of coordination between the microgrids and other forms of distributed energy. In this case, the system integrator would be somewhat analogous to the CCEE, which hosts the free market energy, and would play a similar role for microgrids and other forms of distributed energy, acting as a central entity that manages markets, tariffs and systems in a geographic region.
These system integrators are a purely conceptual model. However, controversy still exists over who should play the role of system integrator. In the survey [45], the utilities believe that they themselves should act as system integrators in their concession region. Consideration should also be given to how this issue will be viewed in regulatory terms as the system integrator may have a large market influence.

F. SPECIFIC REGULATION REGARDING INTENTIONAL ISLANDING FOR MICROGRIDS
It is relevant to study intentional islanding as it is seen as an essential feature for microgrids [17], [48]. The regulation on this subject should establish an appropriate framework for microgrid development and proliferation.
The general interconnection framework should be reviewed and the following specific issues are to be considered: • During islanding, the distributed generation resources operate in a grid with drastically altered characteristics while performing regulation and control functions.
• Intentional islanding of grid sections should be allowed without loss of local generation, while unintended, and potentially harmful, islanding should be avoided. The overcurrent protection devices may no longer be effective in islanded operating mode due to the expected low short circuit currents.
• Standardization of grid and construction components will also have to reach parts of the grid where a microgrid is expected to operate. This would require the installation of controllable interconnect circuit breakers and parallelism means at the full-grid coupling point, for example, at the low voltage buses of a distribution substation where fuses would be typically sufficient. Modified mains protection devices may be required within a section of a microgrid, along with specific neutral grounding arrangements in mains isolation. Adequate communication infrastructure may also be required along with power lines [16]. In general, utility will have to modify their grid development practices where microgrids are expected to form. If interconnection is at the distribution level, an interconnection agreement must be made between the microgrid and the local utility. Distributed resources, including microgrids, must meet the technical requirements that enable parallel operation with the utility system. The microgrid may be intentionally islanded to maintain critical loads during a mains fault. It is essential that islanding is intentional, as it ensures that the energy resources contained in the microgrid will not inadvertently energize the surrounding grid [47].
Some microgrid critics have raised security concerns, particularly when microgrids are disconnected and reconnected, saying the process could disrupt grid reliability. However, most utilities interviewed in the survey reported in [44] do not see microgrids as a significant threat to grid reliability, with only 23% of respondents saying that having multiple microgrids connected to the grid would increase the risk of a central grid failure within a service territory of the utility.

G. ADEQUACY OF FIXED INSTALLMENT PAID FOR GRID-CONNECTED MICROGRIDS TO PROMOTE ENERGY EFFICIENCY AND OPTIMIZED GRID USAGE
The availability cost is charged from low voltage consumer units in Brazil even when the energy injected into the grid is higher than the consumption. This is the value in money equivalent to 30 kWh (single-phase), 50 kWh (two-phase) or 100 kWh (three-phase). Medium voltage consumers would have the energy portion of the invoice equal to null in a similar situation and the portion of the invoice corresponding to the contracted demand will be normally billed. However, the contracted availability or demand cost charged to the power compensation policy is designed with a single consumer in mind. In the case of microgrids, it should be considered whether it is fair that the same fixed cost of each microgrid participant is charged [44] since the microgrid might have demand management and be able to cut non-priority loads if a reduction in generation occurs.
The proposal here is to modulate the cost of availability or the demand contracted by the reliability level of the generator set and the way of use of the electric grid to which the microgrid is connected. VOLUME 8, 2020

1) STRATEGIC DISPATCH OF MICROGRIDS
The benefits of microgrids are potentially greater than those of distributed generation. This is because these systems not only respond to tariff price signals, but also enable strategic dispatch and can produce a demand curve that is ideally controllable, even when customer and utility peaks do not match. Reliable, programmable demand profiles are of high potential value to utilities, allowing the expansion of a substation's infrastructure to be delayed or avoided.
If the utility wishes to encourage peak mitigation behavior at the feeder, incentives should be created for peak-hour storage to match or exceed expected loss, or to create alternative tariffs with higher load-accommodating demand rates during peak events [49].
With the incentive for the efficient use of the proposed grid given by the coincidence factor at the end of the microgrid, the focus is no longer on the shift of consumption to offpeak hours, as is the case with hourly rates, but rather the reduction and even extinction of this one. This is a more interesting incentive than simply shifting consumption to offpeak hours as it permanently solves the problem. Eventual peak hours in the scenario where the hourly rate brings the expected result and most consumers respond to price signals would be shifted from their initial times. Thus, utilities would be lead to modify the original tariff distribution. This would create a cycle that would not resolve the issue. If, on the other hand, a reduction in peak hour consumption is encouraged, regardless of the time when it occurs, which is the objective of the incentive to decrease the coincidence factor at the peak, the reduction of the load will be permanently achieved.
This incentive can only be answered by those entities that have the capacity and intelligence to respond to it, as is the case with microgrids. For this reason, we propose the implementation of this type of incentive for these new systems.

H. REWARDING ANCILLARY SERVICES OF A MICROGRID
Some microgrids may be able to provide surplus power or other ancillary services to the grid. Thus, the regulatory framework should contemplate this possibility, so that the microgrids obtain an extra return from the provision of such services.
For example, the ability of a microgrid to be islanded means that it also has the ability to balance its own load and generation profiles, even if only temporarily. A result is that it may be able to provide demand response services.
It is common sense that demand response services should be offset by the market price of energy at the time the energy is sold. However, there is also the issue of the cost of not meeting the demand from the microgrid, which will not optimally meet its loads. This cost is not easily calculated and should be considered when valuing the service [47].

I. NEEDS AND INTERESTS OF STAKEHOLDERS
Even though regulatory changes allow for a variety of service features and options and compensation arrangements adopted by the microgrid, some stakeholder priorities may be conflicting. For example, a microgrid can manage the energy stored in a storage system to generate financial return on surplus energy sales programs and bring a benefit to the microgrid. It can also use this stored energy as backup energy, ensuring the ability to address the shortage, which would benefit the end user, but bring conflict with the previous usage.
Similarly, when a value is directed to one stakeholder, one may be shifting the value away from another stakeholder. For example, a microgrid can generate and sell power to end users, bringing a benefit to them, but on the other hand it will be reducing the grid load, which decreases the return of the local utility.
It is advisable that an analysis of the relationships between the interests of stakeholders to decide what would the operation strategy be aiming to meet the priorities of each stakeholder in the best way possible. This is to be done before configuring a final regulatory and tariff model.

J. STRATEGIES TO AVOID CROSS-SUBSIDY
A question of equity arises as the utility's expenses are recovered through tariffs given that a microgrid can consume less energy as mentioned in 3.9. Other customers must recover the utility costs if the microgrid consumes less energy in the current practice. To the extent that microgrids can be connected where they can bring benefits to the grid, such as decreased congestion, the fixed costs that also involve grid upgrades to include microgrids can, in principle, be recovered from the utility's tariff. This approach would reallocate the costs of upgrading the grid to all taxpayers who benefit from the presence of the microgrid, i.e., there would be a ''payment'' of fixed costs through a distribution system improvement service. However, there is no guarantee that the microgrid will always bring benefits to the grid, as this depends on a number of factors. On the other hand, it is important to highlight that the cross subsidy can occur in both directions.
If the value of microgrid generation is lower than compensation: • Other utility customers subsidize microgrid customers and the utility's fixed costs under-recover; • There is an upward pressure on tariffs, i.e., cross subsidy. If the value of microgrid generation is larger than compensation: • Microgrid customers subsidize other utility customers; • The development of microgrids is discouraged. Utilities have been forced to find solutions to this problem in some areas of the United States where there is no measure to avoid cross-subsidy and distributed generation has grown significantly. According to [50], [51], these solutions can be grouped into three main approaches aimed at ensuring that the distributed generation or microgrid customer who pays for grid services pays their fair share of the costs of those services offered by the grid, while still receiving fair compensation for the excess energy it produces. These are: • Redesign, both, regulated and free consumer tariffs to better reflect the involved costs, including the adoption of one or more demand tariffs, thereby allowing the appropriate portion of fixed costs to be charged to microgrid customers.
• Charge consumers belonging to the microgrid for their total consumption under the regulated consumer tariff and to compensate separately for their total generation.
• Charge the amount of the defined Capacity Reserve to customers belonging to the microgrid. A comparison of these three options is presented in [51] to justify the choice made to circumvent the problem.
Our proposal is for a choice once again guided by the simplest implementation option, which is the Capacity Reserve for the microgrids. This allows for an experimental implementation, greater stakeholder adherence and more easily perceived results.

K. CAPACITY RESERVE FOR MICROGRIDS
As explained above, we opted to use the Capacity Reserve for microgrids to avoid cross-subsidies. However, charging this amount is often challenging because the costs to the utility of servicing a microgrid vary considerably with the time and place of installation of the microgrid.
The Capacity Reserve for microgrids is defined as the charge for services rendered by the utility when the customer is not generating. This can be due to a failure, for example, or when its generation does not fully meet its demand.
It can work as an incentive to peak demand control for customers and is justified by the additional costs of distribution and cross-subsidy.
It may consist of: • Fixed charges that encompass supply infrastructure costs, metering, billing, general services and energy delivery regardless of customer consumption; • Volumetric charges that represent the proportion of the energy that is consumed. Thismay be horizontal and cover variable generation and maintenance expenses. It may also be based on the Time of Use Tariff (TOU), with pricing dependent on in-peak and off-peak periods or in Real Time Pricing Tariff (RTP), with different pricing for each hour of the day [3]; • Demand charges that relate to the maximum power required by the customer at a time of the month, regardless of duration or frequency, in order to recover the costs of proportional capacity directed to that customer in a shared grid; • Most utilities using this structure charge some or all of the following services: • Power backup in case of generator failures; • Maintenance to perform scheduled repairs; • Supplementary energy linked to efficiency reduction; • More economic energy costs, when the utility can offer energy production and delivery that costs less than the customer's local production; • Delivery of energy services.

L. OTHER CONSIDERATIONS
In addition to the suggested modifications, it is also important to consider the issue of remuneration for other services provided by the microgrid, such as the supply of reactive power and the availability of its installed power to be cut by the utility in case of grid overload, representing a service as demand response. For these services, they may be paid by the utility through bilateral agreements as already in practice in some countries in case of demand response [8]. Thus, the utility may offer a monthly fee for providing active or reactive power and pay an hourly rate when this service is actually requested by the utility.

IV. SUMMARY OF PROPOSED REGULATORY CHANGES
Unlike the business context, there are advances made in the regulatory context that were aimed at fostering distributed generation, but that also contributed to advances in the microgrid regulatory framework. However, changes in the regulatory scenario of modern power systems have been suggested to not only allow, but also to encourage the insertion of microgrids. Important decisions on how the Brazilian regulatory authorities will treat grid-connected microgrids, including sales of surplus generation and services that the microgrids will provide, are to be made in addition to the points that should be analyzed for the improvement of the Brazilian regulatory scenario aiming at the insertion of microgrids.
There are certain changes that are not strictly necessary, but that would entitle owners or operators of microgrids to encourage the creation of these systems. Among these changes and considerations, we highlight the following: • Microgrid owners should have the right to provide power to interested customers located near the microgrid; • Microgrids should have the right to buy and sell to the local energy utility and be able to negotiate bilateral agreements with the utility or service aggregators to provide complementary services; • Standard interconnection procedures that apply to microgrids should be adopted; • Possibility for a microgrid energy storage system to be charged with power from the utility grid; • Possibility for regulated consumers to buy energy from other consumers participating in microgrids and, at a higher level, from other microgrids; • The ability of the microgrid to participate in demand response programs and in the free market to sell surpluses; • Specification of ancillary services that the microgrid may provide. The main tariff flows and their respective transaction models were previously defined for the model in which a microgrid is viewed as a single customer for the ''grid connection service'', but consider each customer belonging to the microgrid as a single customer for the provision of energy. Measurement for the billing of the use and connection of the electrical system or, the supply of electricity where applicable, shall be made in accordance with the conditions agreed upon by the microgrid participants, in accordance with grid codes and/or marketing rules applicable in each case. In addition, all costs arising from the contracting of energy should be prorated according to rules to be defined between the participants and the owner of the microgrid [10], [11].
Finally, the invoice amount related to the supply or connection and use of the electrical system shall be divided among all members of the microgrid in proportion to their use and consumption. Table 3 presents a summary of the main topics related to the specific regulation of microgrids that are discussed in this article and their application status regarding the current regulation and the possibility of application of the current rules to insert microgrids. In addition, this table specifies the sections of this work that discuss the current status of the listed topics and the proposals for inclusion and improvements that are made here.

V. RESULTS OF PROPOSALS AND IMPACTS
From the simulation and the actual parallel deployment of a microgrid in a residential condominium in Brazil, some of the proposals previously presented were inserted to consolidate the methodology of the proposals and proof of originality so that the results and impacts of the proposals are clear to improve the insertion of microgrids in the current market.

A. SIMULATION SETTINGS
The realistic model was simulated in the Homer (Hybrid Optimization Model for Multiple Energy Resources) Pro microgrid software [52], a microgrid optimization software originally developed at the National Renewable Energy Laboratory, which includes three tools in a single software, evaluating the technical and economic feasibility and the cost of different configurations of variables that form a microgrid. Figure 1 shows a simulation scheme identical to that deployed in the residential condominium.

B. ECONOMIC VIABILITY RESULTS
Homer analyzes the viability of the microgrid by comparing it with the base case. The comparison was made between the case in which only the loads and the electrical grid are considered (Base system), and the case in which the microgrid with all sources is deployed (Current system). The base case considers the costs of purchasing energy and costs of measuring and communication infrastructure. The basic communication and measurement infrastructure is considered for both cases. Below in Figure 2, the result of the economic viability of the microgrid.
The microgrid becomes viable with a payback of less than 10 years, and the simulation considers a 20-year useful life   for the microgrid components, and still has a 9.8% of Internal Rate of Return (IRR), Table 4 presents the results captured from Homer simulation.

C. CAPACITY RESERVE RESULTS
The capacity reserve, which represents the amount charged for the use of the distribution system, weighted according to the demand profile of the microgrid. The purpose of the capacity reserve is to encourage the optimal use of the distribution system.
In order to calculate the capacity reserve, it is necessary to previously calculate the values of: the Coincidence Factor (CF) and the FORced exit of the microgrid (FOR) based on real data from microgrid participants and simulation. Figure 3 defines the microgrid CF graphically.  To determine the CF during the peak, it is necessary to define the peak time of the utility's system, and then analyze what percentage in relation to the peak demand of the microgrid is demanded at that time. From the data provided by the utility and the residents of the condominium, it was found that the peak of the aggregate curve happens at 10:30 pm. The peak coincidence factor calculates how much of the microgrid peak happens at the system's peak time. By the result of the simulation we have that, in the worst month, at 10:30 pm the average load is 173.4 kW, while the average peak is 289.97 kW. Thus, the CF for this case is 58%.
On the other hand, the FOR is calculated as the rate at which there is a forced exit from the sources of the microgrid. Through Homer Pro it was possible to verify that the percentage of load that was not met by the sources of the microgrid is 0.24% of the total annual demand.
Therefore, considering that the microgrid contracts a peak demand of 293 kW and that the capacity reserve model is used for charging the microgrid during peak hours, the microgrid will be billed for the demand as shown in Table 5. Considering also that the microgrid, with the stimulus created by the tariff, decreases consumption at the peak and shifts consumption at peak hours of the system to other times.

D. REWARDING ANCILARY SERVICES RESULTS
Homer Pro is possible to model the share of demand, as well as the reduction of peak load. Demand-share programs are based on incentives to motivate consumers to temporarily reduce or shift part of their demand in response to a request from the utility or the operator of the microgrid. Consumers must reduce their consumption at the time and in  the manner requested by the utility, in return for economic incentives; which should cause variations in consumption patterns (reduction of peaks, filling of valleys and load shifts), to promote the desired effects on the load curve served by the power system. One of the modalities of demand participation in a variable tariff environment are the contracts established between distributor and microgrid, and these contracts must specify benefits for consumers participating in the microgrid.
The implementation of demand-sharing programs for consumers with variable pricing takes place through the availability, by consumers, of reductions in part of their load at the request of the utility operator. The utility determines where and when the load should be reduced, according to the operating condition and the severity level.
To exemplify the operation of this strategy, a contract made between the utility and the operator of the microgrid to reduce the peak demand during the summer. For this contract, the distributor will pay a higher amount than the microgrid's Levelized Cost Of Energy (LCOE) times the energy amount cut by the microgrid. Analyzing the two occurrences shown in Figure 4 (marked in yellow), the cut load was 28.89 kW in the first case and 26.04 kW in the second. Therefore, the amount paid by the utility to the microgrid operator for these occurrences, assuming that the utility pays twice the LCOE is 78.59 and 70.83.

E. SUMMARY OF METHODOLOGY PROPOSAL FOR REGULATORY CHANGES
In summary, to quantify the monthly amounts to be paid or received by each participant in the microgrid, the methodology described in Table 6 is adopted.
For the simulation performed, the summary of the values obtained is shown in Table 7. The difference was also calculated with respect to the bill before participating in microgrids. It is noted that in all cases there was a reduction in the amount to be paid because of the proposed strategies.

VI. CONCLUSIONS
The integration of microgrids with conventional electric power systems must be carried out in accordance with proper regulations. As in any sector of society, energy regulation represents a fundamental point and sets the standards for the development and adequacy of activity in the energy supply chain. However, there may be regulatory gaps for this practice to occur more often and the regulation that encompasses it or the lack thereof represents one of them.
An important conclusion is that the current Brazilian regulatory and tariff scenario is already at an adequate level to allow for the insertion of microgrids.
Questions were presented that are seen as possible critical points in subsequent changes in the regulatory context of microgrids and that may therefore be subjected to analysis, study and discussion in future revisions of the regulatory framework in Brazil.
Possible changes in the market were raised that lead to the conclusion that there will be a tendency for the connection cost to increase, leading to an increase in the availability cost and creating cross-subsidies. This will happen if the tariff policy remains as it is today, i.e., with the growing market reduction due to consumers' adherence to distributed generation or participation in microgrids. ANEEL's AIR No. 04/2018 considers six possible alternative scenarios to start improving the distribution grid usage tariffs. In this context, it is important to promote the transition from utilities as simply energy suppliers to utilities that operate as system optimizers.
A reform and adaptation of the energy tariff calculation methodology will be essential due to the increased participation of distributed generation and microgrids in the Brazilian energy system. This is to avoid cross-subsidies, making the tariff system smarter and equipped with seasonal, hourly and location signaling and providing for the possibility of providing ancillary services.
There are favorable regulatory conditions for the formation of microgrids, where system studies need to be performed for the islanded operation of a microgrid to be proven viable and safe. There were no regulatory barriers to intentional islanding as long as a consensus among the involved agents is achieved.
Other relevant points to be addressed are: the issue of strategic microgrid dispatch to permanently control peak grid demand, the ability to create benefits from postponing and reallocating investments; the avoidance, for example, of overvoltage situations that occur when there is over generation; among others. The need to model the value of the interruption costs was identified since microgrids can act to minimize these costs. This benefit should be considered when evaluating the viability of such a system.
Some questions remain open due to the lack of specific regulation for microgrids, but it is clear that an improvement in the regulation regarding distributed generation is moving towards an adaptation, even if indirectly, of the regulatory context. Examples are the adjustments of REN 687 in the different credit exchange models and the adjustments that will come after AIR No. 04/2018.
The transition from single tariffs to flexible tariffs, the guarantee of free access to the distribution grids and the establishment of the energy compensation system can be considered as the first steps towards the flexibility of the Brazilian market. The next steps are expected to follow the European example, in which each consumer contracts his energy from different suppliers, the utility is remunerated for the proper maintenance of the grid and a trader negotiates this energy with the consumer. In this model, the microgrid would enter as a supplier that the consumer would have the right to choose.
The presented results approximate reality and real cases may vary considerably with respect to the results obtained here, but the simulation brought a validation of the regulatory and tariff proposals.