Energy Storage for Peak Shaving in a Microgrid in the Context of Brazilian Time-of-Use Rate †

: The advance of the distributed generation in Brazil makes it essential to investigate the applications and transformations that the use of these new arrangements may entail. The use of non-centralized generation technologies associated with energy storage is interesting for several sectors of the energy market, even if the market is in the process of maturing these technologies. In the context of the time-of-use rate, these changes have allowed the consumer to use strategies to save energy bill costs, especially when its moment of most considerable consumption coincides with that of the highest tariff. In this paper, a Battery Energy Storage System (BESS) is used to perform commercial peak load reduction in a microgrid in connected mode. The microgrid also has a Photovoltaic (PV) Generator Farm as Renewable Energy Sources (RES) to provide load consumption and also to assist BESS in the peak shaving operation. The modeling and simulation of the system are performed by MATLAB/Simulink. The analysis demonstrates that the peak load reduction produces the expected financial benefits under a Brazilian time-of-use rate known as White Rate, in addition to carrying out the operation in a manner consistent with the technique from an electrical point of view. The software Homer Grid validates the potential savings. Thus, the results showed that the use of energy storage associated with renewable generation under a peak shaving strategy allows greater freedom for the consumer in the face of costs with main grid purchases.


Introduction
Electricity demand, or the energy load, varies over time during the day. Meeting time-varying demand, especially in peak periods, presents a key challenge to electric utilities [1]. Uninterrupted growth of the peak load increases the possibility of a power failure and increases the supply cost to the consumer. Peak load shaving is a process of flattening the load curve by reducing the peak amount of load and shifting it to times of lower load consumption [2]. This strategy has become of great interest to utilities as the demand for power has grown within the industry, population, and in commerce.
Peak load is a sensitive factor for the grids, as it occurs occasionally and takes place only for a small percentage of the daytime. To supply the peak load, a conventional approach that involves capacity addition is commonly used [3]. The peak shaving application brings benefits to the entire electrical chain. Improvements in power quality, reliability, cost savings, reduced CO2 emissions, and integration with renewable energy is also achieved. Electricity storage can be used by end users (i.e., utility customers) to reduce their overall costs for electric service by reducing their demand during peak periods specified by the utility [4]. The microgrid scenario with a commercial load profile is ideal for this application and also provides integration with renewable energy sources.
In Brazil, a distributed distribution followed a worldwide trend towards a renewable penetration boost. Although regulatory processes are still underway, this growth in the installations of these sources allows us to glimpse the progress of generation distributed in the country. This path can only be achieved with benefits for all stakeholders, with a wide debate in the sector and also enabling the use of energy storage, because it is a key technology in this context of micro and mini generation. Given this, investigations that show significant benefits in reducing peak consumption at different tariff stations are essential for the sector.
In [5], efforts are made to decrease the requirements on the Hydro Quebec electrical grid by reducing the peak load drawn by planning an energy storage system (ESS) to accomplish peak shaving. In addition to controlling the system using MATLAB, Homer Pro and System Advisor Model (SAM) software, developed by Homer Energy and National Renewable Energy Laboratory's (NREL), respectively, were also used for validation. In [6], the economic assessment of ESS provides peak shaving in small, isolated power systems. Isolated power systems have a particular economic operation. In this case the amount of primary reserve required for frequency stability, the portion of peak shaving generation, may require the optimal operation of generators and the installation of extra units. In the proposal of work [7], a methodology is presented to develop an adaptive operational strategy of customer-installed ESS based on the classification of load profiles and characterization based on newly proposed time-of-use (TOU) rate for electricity consumption. This showed results that improved the efficiency and operation of the system. In [8], we investigated the potential of peak shaving through battery storage in a system with no renewable energy sources. The study is based on 40 load profiles of low-voltage users, located in Belgium. The results of favorable operating operations in reducing peak and battery operation, in addition to the economic perspective, considered that peak shaving proved to be interesting to use the end-users at Belgium. Some works have already approached White Rate and explored scenarios with different technologies. [9][10][11][12] deal with the White Rate in the context of battery systems and integration with renewables in power systems. Already, in [13] is presented an investigation about the economic viability of the utilization of on-grid distributed generation (DG) systems with photovoltaic (PV) and battery storage by distribution consumers in the White Rate scenario. There is also a debate on the battery technologies to be employed and an analysis with paybacks comparing different arrangements of technologies.
This work aims to apply peak shaving in a microgrid through the integration of photovoltaic generation and a Battery Energy Storage System (BESS). In addition to the peak reduction, an economic investigation to assess the financial benefits for consumers in the context of Brazilian TOU is conducted. The great importance of this investigation is to show the benefits of the consumer when energy storage is used to perform peak reduction operations, highlighting the use in conjunction with rate models that favor the use of these technologies in Brazil.
The paper is organized as follows: Section II presents the Brazilian context of DG and energy storage, also details the White Rate policy and the operation of the time-of-use rate. Section III details the microgrid components and simulation aspects in Simulink. Section IV features the scheme of the implemented peak shaving strategy as a BESS function. Section V includes the results of the electrical and economic aspects from the simulation, and this second one is validated by the HOMER Grid software. Section VI shows the conclusion.

Distributed Generation and Energy Storage in Brazil
The micro and mini DG were regulated in Brazil in 2012 by ANEEL through Normative Resolution (REN) No. 482 [14]. Currently, the current regulatory model for DG is "net metering." It is a procedure in which an end-consumer installs small units of generation, and the generated energy is used to reduce the electricity consumption bills.
In June 2019, the 1 GW mark was reached, exceeding the expectations that the sector had for modality, which represents the same capacity added in natural gas thermal plants, twice what was installed cane bagasse in thermal plants, or three times the installed capacity of small hydro plants in the same year [15]. The study proposed by [15] shows that in 2029 there will be 1.3 million adopters of distributed micro-or mini-generation, totaling 11.4 GW. This significant adhesion was already achieved, and the projections indicate a vast expansion of this market. However, changes in the current regulation must be taken into account. There are still issues under debate in Brazil, regarding how the compensation mechanism should occur and the rates for these specific cases. Figure 1 shows the recent growth of DG installations in Brazil. The DG will increase yearly, so it is necessary to develop an analysis of applications to verify the opportunities, benefits, and risks of the implementation. The modality has proved to be beneficial for the electrical sector's stakeholders and is an international trend for energy development. Besides promoting national economic growth and strengthening the industry, it also creates jobs in the engineering and sales sectors [16].
Energy storage is a great ally to enable greater use of renewable energy sources. Along with the de-decentralization of generation and intermittence of renewables, challenges arise to ensure quality and reliability in the energy supply. Energy storage allows us to overcome these barriers. One of the main advantages of this technology, mainly battery storage, is its technical capacity to offer various services for power systems. However, in many contexts, policy, market, and regulatory structures do not allow technically capable resources to provide multiple functions simultaneously, as long as it is essential to ensure that the service's reliability continues [17]. Batteries are one of the most costeffective energy storage technologies available, with energy stored electrochemically [18].
In Brazil, the use of batteries is still low due to their high cost and the few application possibilities with a financial return and environmental issues related to their use (including disposal, recycling) [15]. However, predictions of a drop in the technology's price brings expectations for more significant deployment of the country's technology.
End-consumers also can install batteries in consumer units, charging them at lower tariff hours and avoiding network consumption at times of higher prices. Logically, this application presupposes variable tariffs throughout the day, which is not the case for all classes of consumption and does not involve the sale of electricity by the consumer [19].
Given the current regulatory framework and its perspectives, three possibilities of use can be seen for batteries in consumer units in the future, according to national planning.

•
Increased self-consumption of microgeneration distributed; • Change to the White Rate; • Replacement of diesel generation at the peak.

White Rate Scenario
The White Rate is a tariff option created by the Brazilian National Electric Energy Agency (ANEEL), which signals the variation in the value of energy according to the daytime consumption. With the White Rate, the consumer can pay different amounts depending on the time and day of the week when the electricity was consumed. It is a time-of-use rate modality.
At the White Rate, one day is divided into three-time ranges: peak time (when energy value is most expensive), intermediary time (when energy value is higher than conventional), and off-peak (when energy value is cheaper than traditional). On national holidays and weekends, the cost of all hours of the day is considered off-peak. The primary purpose of this kind of rate is to encourage the shift of energy consumption to off-peak hours, when the transmission network, for example, operates at idle capacity.
In this paper, this tariff policy is the scenario that will be the object of study. It is essential to explore storage system applications to reduce consumer costs when peak consumption coincides with the time of rate increases. Figure 2 is adapted from [20] and shows the White Rate operation in Brazil. The scenario of this work uses the rate values approved by ANEEL without the incidence of regional taxes.

Microgrid Components and Simulation
First, the microgrid is modeled using SIMULINK, representing all components including BESS, variable load with specific load profile, Photovoltaic (PV) System as Renewable Energy System (RES), and the primary grid. Second, the peak load shaving function that controls the BESS is dispatched and also analyzes the scenario implemented. Figure 3 shows a block diagram model in SIMULINK. The simulation used to obtain the results can have a daily and multi-daily function, which allows it to make an annual application simulation. The type of simulation chosen in Simulink was the phasor solution method. In the phasor solution method, it is not necessary to solve all differential equations (state-space model). It allows us to solve a much simpler set of algebraic equations relating to the voltage and current phasors instead. This method computes voltages and currents as phasors. Therefore, the simulation is much faster than other types, and it is widely used in simulations that aim to investigate long periods of operation of the power systems.

PV Generation System
This system is a 3000 m² PV farm with a panel efficiency of 20%. For simulation purposes, irradiation and annual temperature data provided by the NREL were used. The nominal generation of this PV farm is 645 kilowatts (kWp). Its operation in the system works to charge the battery with its production and meet the load when possible. Figure 4 shows the annual generation of this system.

Load Profile
This work uses a variable load to perform the study. It is a commercial load profile based on a large hotel model. This load changes slightly throughout the simulation but is kept constant in its profile. The fact that this profile peak coincides with the peak rate in the White Rate scenario favors its use. The maximum load reached is 461.25 kW. Figure 5 shows a daily load profile. The daily load profile distinguishes two characteristic peaks of this curve. Still, the peak shaving application will explore only the second, because the critical presence of the latter coincides with the rate increase in the scenario studied, making it more useful for analysis.

Battery Energy Storage
The battery system is responsible for performing the peak shaving strategy and ensuring peak reduction during rate increase, thus lowering microgrid operation costs. Therefore, the sizing was made according to the load and the application. Table 2 details the technical characteristics. The stateof-charge (SOC) is a variable of great importance in the phasor type simulation, together with the discharge load power. The method used to predict SOC in this paper is the Coulomb Counting, as shown in Equation (1).
where i is the current, n is the coulomb efficiency, Cn is the nominal capacity, and t is time. This method depends on the integration of the charge/discharge current values.

Peak Load Shaving Strategy
In this strategy, the traditional way of performing peak shaving is used. When the system is offpeak, the battery bank is charged and discharged when the peak load occurs, and this gives the consumer the freedom to shift their peak load to make savings in the agency's energy consumption. Furthermore, to ensure proper application functioning, the BESS is associated with PV System, which in addition to generating to provide for the load, allows the battery to charge during peak generation, adding to the overall savings in charging overconsumption.
Thus, the function was designed for the battery system to perform peak reduction in an integrated manner with the renewable resource and identify the time-of-use rate issue. Figure 6 illustrates the function flowchart. The function has been implemented so that the battery system will charge between 0:00 AM and 5:00 AM with a maximum load of 50 kW, then charge between 10:00 AM and 4:00 PM with a maximum capacity of 200 kW. This second charge moment is crucial because it is when the PV is generating power for the microgrid, making this type of control even more viable. It is important to note that by respecting the State of Charge range, it is only allowed to charge the battery up to 90% SOC. Therefore, charge time is restricted to off-peak hours.
The discharge occurs if the SOC is higher than 20% and if the battery system is not in charge. This action is restricted by peak load hours, which coincide with when the rate is the most expensive. The discharge energy is calculated by the integral of the difference between load power and shave power at simulation time. The description of that is in Equation 2. It is essential to highlight that in this work was used a shave power of 250 kW.
where is the discharge energy, is the load power, shaving power and is time.

Microgrid Peak Shaving Operation
To perform the studies, simulations of one day and annual duration were used. With the system modeled in Simulink, it was possible to implement the function and observe the results from the application's electrical point of view. Thus, the results presented show the battery system's operation and the PV system within the connected microgrid and the implementation of the peak shaving function. Figure 7 shows a graph of the power response of each system element as a function of time. It can observe the proper performance of the BESS, ensuring peak shaving at the right moment. Furthermore, the charging occurs at the right time, especially when solar generation is predominant. Figure 8 shows the system SOC (%) on a simulation day. During the day, the energy is stored according to the strategy adopted. It charges the storage system at dawn, and while the PV generation is working, and the discharge is performed at the same time as the peak load, and the increase rate occurs. These results show that the objective of elaborating the peak load shaving function was successful, and as well, the modeling and simulation of the system and BESS performed as expected.

Energy and Economical Analysis
The function that calculates monthly and annual costs has been implemented in Simulink. HOMER Grid software is designated to validate the financial results obtained through the simulations. For this, the system components were modeled in the same way in HOMER, including the tariff system that is the object of the study. Thus, it is possible to perform a quantitative analysis of the financial benefits of this application and the tariff scenario of this work. Table 3 shows the annual numbers of savings. Given these results, it is observed that the use of the battery system and PV system with the application of peak shaving brought significant gains to annual savings under the White Rate scenario. The results estimated by Simulink simulation are very close to those predicted by HOMER, adding accuracy to the model. Figures 9 and 10 show the monthly costs without the use of technologies and with the use of technologies in peak shaving applications, respectively.   Figure 11 shows the monthly savings. Importantly, the analysis did not take into account the costs related to battery life or the degradation of solar generators, and the savings are related to the costs of primary grid purchases. The results showed that with the use of the peak shaving strategy, we produce about a 33% saving of the annual amounts paid to the utility without the proposed system. The reduction in electricity bills is even more noticeable by analyzing cost differences within and without the application over the months and confirming the scope of the goal of making consumption more flexible for the end-user. These outcomes allow us to highlight the importance of this application in the context of the time-of-use rate in the Brazil scenario.

Conclusions
This paper proposes the control of a BESS with PV generation to achieve commercial peak load shaving in a grid-connected mode microgrid. Both the model and the functions implemented in Simulink/MATLAB reproduced the system operation. It yielded the HOMER Grid software, which validated successful results and the savings produced by the application. The results were very effective, both from the electrical point of view of the application and the financial benefits generated by the proposal.
The work demonstrates the advantage of using energy storage in conjunction with renewable energy sources to save the end-consumer in electricity purchases. It also shows that the White Rate scenario also benefits the consumer who owns these technologies. The investigation of this application indicates the possibilities of operations in the future of DG in Brazil.