Energy Storage and Multi-Source System for Reduction Energy Costs in the Consumer-Side

The objective of this work is to reduce energy costs for a consumer with multiple available energy resources and with an energy storage system. To achieve this, it is developed a methodology with a multi-criterion analysis that considers the demand side, the real-time prices, and the availability of the energy resources. In other words, the developed methodology manages the mul-ti-source system, allowing savings for a consumer. In addition to the presen-tation of the methodology, it is made an application in a case study. It is considered and modeled a real consumer that has three different energy resources, including energy storage by battery. The situation comprehends solar generation, diesel generator and the electrical power grid. There are simulations and the results comprehend the savings for this consumer, considering the methodology application. The main result is a reduction in energy costs by 33.3%, considering the situation without this methodology. For the purpose of indicating the use of the storage system, it is presented the battery’s state of charge along the simulation. Also, there is a verification of the methodology’s robustness, through another simulation, using theoretical data for the consumer. In this case, the consumer has energy storage system, solar generation, biogas generator and the electrical power grid. In this situation, there is a reduction in energy costs by 30.2%, considering the situation without this methodology. In conclusion, the results show that the developed methodology is effective. In the two case studies presented there are significant


Introduction
The search for energy cost reduction by consumers has become increasingly frequent. With the expansion of other energy sources in the world energy matrix, there is an increase in the demand for other energy resources for energy supply and, consequently, the search for multi-source systems. In addition, the electrical power systems have become larger and more complex in the last 60 years due to the population growth and higher standards of living required by the society. Since 1990 the electricity consumption per capita raised from 2.1 MWh to 3.3 MWh in 2018, which represents an increase of 57.1% in 28 years, according to IEA 1 data. This situation leads to increase in the diversity of generation sources of energy, such as hydroelectric, diesel, solar, wind, etc. As it can be seen in Figure 1, the variety of energy resources has increased since 1990.
Each energy resource referred has at least a limitation: hydroelectric generally depends on the rainfall [1]; diesel generation has environmental pollution [2]; solar generation depends on solar irradiation [3]; wind turbines are related to the wind speed [4]. The growth of the electrical power system mentioned before implies that two things are desirable to a consumer: two or more available energy resources and an energy storage system (ESS). These two points bring some benefits for this consumer: more reliable system; more flexibility to choose the energy source and the possibility to reduce its costs with energy consumption.
The ESS is a potential alternative for the energy time shift on the demand. This means that the consumer can store energy with batteries when there are lower energy costs. Furthermore, the consumer can discharge the batteries when there are higher energy costs. The technologies applied can be from various Figure 1. Energy generation by supply. Source: Own elaboration from IEA data. 1 International Energy Agency-Data available in: https://www.iea.org/ (accessed November 10, 2020).
In addition to the benefits brought to consumers by energy storage systems, there is a projection of global growth of this type of resource. According to Bloomberg NEF 2 studies, there are estimates of an increase of almost 1000% in global installed capacity of energy storage for the next 30 years, as presented in Figure 2. Besides this, there are estimates of a significant increase in energy storage capacity around the world, according to Bloomberg NEF data and presented in Figure 3.
Thus, through the figures and data presented, it is possible to verify two points. The first one is that there is an increase in the available energy resources, which contributes to the variety of possibilities for a multi-source consumer, who is the object of study in this work. The second point is that there is a trend in the increase in the use of energy storage systems, which will be fundamental  in the implementation of the proposed cost reduction in this work.

Contributions and Paper Organization
The main motivation of this work is to reduce energy costs for a consumer with multiple available energy resources and with an energy storage system. To achieve this, it is developed a methodology based in a decision-making process, that chooses which sources will be used for the consumer.
Many procedures and varied methodologies are known that address this type of problem and that are evidenced in recently published works, such as those addressed in Section 2. However, each of them has some particularity that is distinguished from the methodology presented here. These works present some restriction of type energy source or restriction of the type of energy storage. In addition, in these works there is the specificity of the geographic location or type of consumer-residential, commercial, or industrial. Finally, some studies present an application of some methodology already developed in the past. Thus, this work develops a methodology that can be replicated in several situationswithout geographical limitation, without restriction of energy source or energy storage.
It is presented a developed methodology with an algorithm that analyzes characteristics from the consumer and the energy resources. From the consumer side it is considered its demand curve and other specific requirements. On the other hand, from the energy resources side it is considered other variables, like nominal power, nominal voltage, efficiency, availability, cost of generation and other specific attributes of each energy resource. These information are important for a decision-making process, that chooses which sources will be used for the consumer. Also, it is calculated the power use and the costs associated for each energy resource used. This decision-making process is detailed along this work.
In addition, two case studies are also detailed applying the methodology and the algorithm developed.
The novelty and contributions of this paper are briefly discussed as follows and detailed below.
1) Development of a novel methodology that reduces the energy costs for a consumer with multi-source energy system with energy storage.
2) It is developed a multi-criterion analysis that considers the demand side, the real-time prices, and the availability of the energy resources, including each generation source and the energy storage.
3) There are simulations of two case studies, since the methodology is based on data processing, analyzing, and calculation. The simulations are based on Matlab and the case studies involve different consumers, with different demand curve profiles. Besides this, both consumers have a multi-source energy system, but with different generations.
4) The methodology developed is suitable for different situations, including

State of the Art of Procedures for the Inclusion of Multi-Source Systems on the Consumer Side
The focus of this section is to bring evidence, forms, models, and procedures developed, considering inclusion of multi-source systems on the consumer side, whose solutions not only apply in a commercial consumer, but also industrial and residential. These multi-source systems bring energy resources such as photovoltaic systems, wind power, other renewable resources, fossil fuel generation, power grid and energy storage system. However, these works differ from the methodology developed here, that is broader and more replicable, as demonstrated in the next sections. It is important to notice that most of the works that develop optimization algorithms are mainly based on stochastic methods. Using the software Clarivate Analytics' Web 3 it is possible to know that are almost 10,000 works related to energy storage, but few in the area of optimization of ESS and other energy resources [11]. The work [12] presents a multicriteria choice to evaluate the use of store energy in photovoltaic systems in the Sahel region. There are five main criteria to observe: storage technology, cost of storage, resale costs, environmental component, and the maintenance component. Besides this, it is presented a study validating the work and the prioritizing criteria developed.
The tool Homer Pro 4 is a simulation model. It attempts to simulate a viable system for all possible combinations of the equipment that the users wish to consider. Depending on how the user sets up his problem, Homer Pro may simulate hundreds or even thousands of systems. Homer Pro simulates the operation of a hybrid microgrid for an entire year, in time steps from one minute to one hour. Besides this, Homer Pro examines all possible combinations of system types in a single run, and then sorts the systems according to the optimization variable of choice. Homer Pro features new optimization algorithm that significantly simplifies the design process for identifying least-cost options for microgrids or other distributed generation electrical power systems. Homer Optimiz-er™ is a proprietary "derivative free" optimization algorithm that was designed specifically to work in Homer.
The Simulink software can also be used to simulate a system with energy storage and micro-cogeneration for residential application. The methodology developed [13] analyzes the energy storage impact on a system with cogeneration of energy. Two situations are modeled in the domain of time: in the first there is no presence of energy storage, and in the second, there is. The main result of simulations is that the inclusion of energy storage increases consumer self-sufficiency up to 59.9% [13].
The Game Theory also supports methodologies of optimization of energy storage use [14]. The methodology developed [15] optimal allocation of energy resources in residential systems. For this, it is considered photovoltaic generation, network power and a storage system. The optimization of the use ratio between the storage system and solar generation is done based on a genetic algorithm. In addition, the effects of demand scheduling are also analyzed, considering two situations: in the first, an analysis of individual optimization is made, in other words, only one residence; in the second, an optimization analysis is performed considering several residences. Therefore, it is developed a demand-side management focused on residential consumers [15].
It is also possible to develop a simpler methodology for an optimal configuration of a system with energy storage, targeting the power marketization. The optimization through the demand-side [16] reduces the operational losses, varying the energy storage system configuration, under different TOU (time-of-use) prices.
In the procedure [9] it is made economic analysis of the use of energy storage. In this article it is studied a residential consumer in the state of Massachusetts (United States), with access to the power grid, photovoltaic generation, and storage of energy by lithium-ion batteries, which are charged only through photovoltaic generation. Two situations are presented: in the first the consumer does not have energy storage; in the second, it does. In addition, the possibility of selling energy to the local concessionaire is considered. Economic calculations are made from the integralization of the consumer's export/energy consumption curve. In the end, a reduction in energy costs of around 40% is presented, comparing the first and second cases [9].
In the work [10] it is developed a prototype that demonstrates the reduction of the energy bill with the use of energy storage. In this case, the typical demand curve of a shopping center was adopted. At work, the battery operating limits are 26% (minimum) and 74% (maximum) of its capacity. Outside this range the battery is not used as a power supply. In addition, three case studies are presented based on retrofit application solutions: non-use; basic use; and more customized solution. The results of the simulations suggest that, even in the situa-tion where there is a 75% reduction in demand, 70% of the energy is still supplied by the network. Therefore, only solar generation and energy storage provide only part of the demand [10].
The work [8] evaluates the substitution of energy resources during peak times. It is analyzed, under the economic feasibility, the substitution from Diesel Generation Sets from Battery Energy Storage Systems (BESS) in a consumer. Some simulations are made using Homer Pro, with different batteries technologies: lead-acid, nickel-cadmium, lithium-ion and Redox Flow. It is proposed a time shift in demand, to reduce the energy costs for the consumer. The results indicate that those replacements are not attractive, considering the current costs for BESS [8].
In the context of integration between energy storage and multi-source power generation, energy storage can be used to increase the reliability and resiliency of microgrid systems, especially in situations where there may be island operationeither by internal failures to the microgrid or by internal failures, in the distribution network. Even with the presence of renewable energy sources, the reliability of the system in general increases with the insertion of energy storage. There are some studies in the literature that address these applications. The presence of energy storage increases the reliability of multi-source microgrids [17]. Monte Carlo simulations for a system in South China indicate that the introduction of energy storage reduces LOEE (Loss of energy expectation) by 73.5% and reduces the SAIDI 5 by 73.5%.
The use of multi-source systems enables the development of an operational optimization applied to microgrids in islanding, minimizing operational costs [18]. This process makes use of energy storage and renewable sources. In addition, it is demonstrated in a case study with application of this optimization in California, United States [18]. It is also possible to optimize the use of batteries in microgrids through the development of demand response models [19].
Another aspect of this area is the analysis of the "aggregate battery energy storage system" (ABESS) in microgrids, in various situations, such as voltage fluctuations, component loss, island operation, instabilities in power generation etc. [20]. This system is used to control the relationship between microgrid generation and demand.
In the context of integrating microgrid operation with the distribution systems, the work [21] develops a methodology for a power utility sustainable planning. It is analyzed demand response (DR) and photovoltaic distributed generation (PVDG) applied for the microgrid. The methodology is applied to a case study and the results show three key points: a reduction by 6.3% in substation peak demand; a reduction by 9.3% in substation daily energy consumption; and a reduction by 13.2% in daily energy losses in lines and transformers [21].
The work [22] analyzes the reduction of solar power curtailment using energy storage. It is proposed a dispatching method to achieve this reduction and it is presented a case study in Qinghai. Besides this, it is made a simulation based on time-series production, using real data from Qinghai. The results indicate that a reduction of solar power curtailment is achievable using energy storage system. In the case study the curtailment rate drops from 61.95% to 5%.
The work [23] presents an overview of electrical supply of various Greek Islands that are not connected to the main electricity grid. These islands have autonomous electrical systems and higher electricity costs than areas with access to the interconnected grid. In order to improve this situation, it is proposed the use of renewable energy resources and energy storage in small and remote islands, like Astypalea, reducing the energy costs by 42%. For islands with high electricity demand-like Crete, Rhodes, Mykonos and Paros-it is proposed an expansion in the main electricity grid.

Methodology, Data Processing, Analysis, and Procedures
To reach the purpose of this work, it is necessary to develop a methodology. It must efficiently evaluate the availability of the resources and the characteristics of the consumer. Besides that, it is necessary that the methodology chooses the energy sources that can deliver what the consumer needs at the minimum costs.
Additionally, there is also the storage system, provided by lithium batteries. This system is charged by the energy sources and it is discharged to supply energy for the consumer. The intervals of charge and discharge of the energy storage system are defined as the preferences or needs of the consumer.
So, the methodology must read the data from energy sources, the consumer characteristics, and the energy storage system. After this, an evaluation of the situation is made and, finally it is chosen the configuration that minimizes the costs for the consumer for that situation.
A possibility to do this is evaluating daily, but this could lead to use just one or two energy sources along the day. Besides that, probably sometimes the resource chosen could not have the lower costs every time. Therefore, it is more appropriate to divide a day into some intervals to make evaluations about the changes of the demand energy of the consumer and the energy sources characteristics. As a global practice, it is reasonable to choose a 15 minutes interval for new evaluations. During this interval there are potential uncertainties for the generation sources. There are some examples that deserve attention: a quick passage of clouds interrupts solar generation; a rapid wind disruption temporarily ceases wind generation. In these two examples and in others-in which there is temporary and unplanned interruption of power generation-the availability of other energy resources, such as the power of the distributor, will be verified.
After every interval, it is started a new process of reading, evaluation and choosing the energy resources according to the situation. Thus, the methodology is cyclic, and the end is determined after all the cycles are processed.
The procedure can be made manually, but it could lead to some mistakes in the calculation process and could spend too much time. Alternatively, the me-thodology is developed using a software, to help with the iterative equations and calculations. It was chosen the Matlab software, version R2015a, from Math-Works. It was used the student version of Matlab, licensed by University of Sao Paulo.
A more detailed methodology can be seen through a schematic diagram, in Figure 4. Figure 4 represents the main methodology and the cyclic process. It is applied for every interval and it starts with the data reading from the utility power distribution, like price curve. The data from all generation sources are also read, like nominal power, nominal voltage, nominal current, efficiency, and other characteristics. It is collected data from energy storage, like the nominal capacity, charge current, discharge current, charge time, discharge time and the Depth of Discharge (DoD). The last part of the data reading process is the consumer data. The methodology can read the demand curve and the periods that the consumer wants to charge and discharge the energy storage system.
After the data reading process, the data analysis process begins. It consists of a comparison between the available generation power-energy resources and energy storage system-and the consumer's demand curve. It is also analyzed the moments of charging and discharging the ESS, according to what is set in the reading process. Additionally, it is verified the prices of each energy resource.
Therefore, the methodology starts with decision-making process, that determines which energy resources will be used to supply the consumer's demand and eventually charge the ESS. This is the main process of the cycle and it is detailed in Figure 5 and Figure 6.
The decision-making process is composed of two parts: the first one analyses the consumer's demand; the second one is applicable only if the current cycle is an ESS charge time.   If it is time to use energy storage and the energy storage is enough to supply the demand, the storage's use is represented by: If it is not time to use energy storage or the energy storage is not enough to supply the demand, the search for an alternative resource is represented by the following equations.
If the first resource is not enough to supply the demand, there is a search for another resource. After the decision-making process, the registers of energy resources begin. In this phase the methodology registers the choices of the previous process. These registers are used in the next process.
The calculations phase computes the total costs in this cycle, considering the prices and the uses of each energy resource involved in this interval.
The methodology verifies if this is the end of the whole day. If the answer is negative, another cycle starts, with the data reading and other processes, as mentioned before. If the answer to the first question is positive, the results of all cycles are compiled for presentation. The results show the total costs with energy resources and the savings with the ESS. Besides this, it is presented the battery level along the day.
A case study is developed in this work considering this methodology. The case study uses all the process with some particularities like the available energy resources and the size of the ESS. It is more detailed in the item 5.

Fundaments and Tools for Analysis of the Prioritization of Energy Resources
The theory that is developed through the methodology is a novel tool and it is widely applicable. In this work it is considered that the consumer has three energy sources (solar generation, diesel generation and utility power distribution) and has a storage system. Besides this, each energy resource, the ESS and the consumer are modeled in Matlab, considering the methodology. In the next subitems it is presented the theory for the model works correctly. This allows that this work applicable to different situations.

Data Reading
The methodology starts with the data reading process. So, it is necessary some inputs for the software. This data is entered by the user, and it is presented here. They are divided into two parts: in the first one the data is provided as a table; in the second one, the inputs are provided through dialog boxes.

Part 1 of Data Reading
The first input is the demand curve. It is provided as a table 96 × 2, where the first column indicates the time along the day, in hours, in an interval of 15 minutes. The second column is the demand, in kW. The second input is the price curve of the utility power distribution. Similarly to the demand curve, this curve is provided as a table 96 × 2. The first column indicates the time along the day, in hours, in an interval of 15 minutes. The second column is the energy's price, in $/kWh, where $ indicates the local currency.
The third input is the solar irradiation curve. Similar to the two previous inputs, this curve is provided as a table 96 × 2. The first column indicates the time along the day, in hours, in an interval of 15 minutes. The second column is the solar irradiation, in kW/m 2 .
These three tables compose the first part of the inputs. The second part of inputs is entered using dialog boxes.

Part 2 of Data Reading
The first dialog box is about the diesel generation. In this window three variables are inputted: the generator capacity, in kW; the generator consumption, in liters per hour (l/h); the cost of diesel, in currency unity by liter ($/l), where $ represents the local currency.
On the second dialog box, the information about solar generator is applied. In this window four variables are inputted: the generator capacity, in kW; the inverter power factor; the inverter efficiency; the area of the power plant, in m 2 .
On the third dialog box the energy storage is analyzed. Six variables are informed: number of cells, individual battery capacity, in Ah; nominal battery voltage, in Vcc; nominal current of battery charge, in A; load efficiency; start time of loading battery, expressed as hh:mm.
The fourth and last dialog box is related to peak time. In this window two variables are used: the start and the end of the peak time, expressed as hh:mm.

Premises
Despite the information that the user inputs into the software, there are some intrinsic characteristics in this work, the premises, that are presented.
The first premise is about the battery level. Initially, its value is one hundred percent. Then, the decreasing of the battery level happens just during the discharge time, when the battery is used. Furthermore, the battery is loaded during the charge time.
The use of energy by the consumer occurs in the following order: first, solar energy; second, energy storage (this one only at the peak time); third, comparing the lowest cost between net energy and the diesel. These points were discussed on item 4.1.
In a similar way, the order of sources to charge the battery is: first, solar energy; second, comparing the lowest cost between net energy and the diesel.
In the previous orders of energy's use there are some restrictions: first, it is considered the solar source. If this source is not enough to supply the consumer and the battery, the other sources are used, as a kind of complement. These points were discussed on item 4.1 The calculations of the energy's use and the charge and discharge of the battery are based on the premises presented.
It is considered that the battery used is lithium ion. Compared to lead-acid and nickel-cadmium batteries, lithium-ion batteries perform better in energy storage for various uses, from electronic devices to wind and solar farms, due to their high energy density and low empty load loss. In addition, this type of battery has higher efficiency, long service life, reduced self-discharge and high energy density, thus reducing physical storage space [24] [25] [26]. Finally, the lowest battery level considered is 20%.

Equations
The calculation process presented in Figure 4 is mainly based to evaluate, for each cycle, the energy used and the corresponding costs, for each energy resource used.
The energy used is calculated according to the methodology presented. For each cycle, it is considering the consumer's demand and the availability of each energy resource. The latter is calculated respecting the theory [ [35]. These equations are detailed below.
The data provided as inputs in 4.1.2 brings with it a variety of important information about the storage system. However, this data is handled so that the software can run the simulations correctly.
Therefore, from the information provided, other variables are calculated, which make the cost minimization methodology feasible. The equations for the variables related to the energy storage system are presented next. The variables are explained in Appendix.
Equation (7) relates the discharge current according to the rated capacity of the system. The coefficients are obtained from the processing of manufacturer data 6 relating that two variables. The curve that relates the discharge curve and the rated capacity of the battery is shown below, in Figure 7.
A trend line has been drawn that fits the points identified in the manufacturer's data. The coefficient of determination value (R 2 ), that resulted in 0.9852, indicates that the trend line represented a good fit for the data collected [36] [37]. From this trend line is generated the equation that relates the discharge current with the nominal capacity of the energy storage system, which is represented in Equation (7).
On the other hand, the calculation of the variation of the battery level, in each time interval, is calculated from the following equations, which represent the charging and discharging situations. Charging: Note: factor 0.25 is used in Equation (12) because each time interval has 15 minutes (1/4 of an hour). In this way, battery discharge can be measured in kWh.

Verification of Methodology by a Case Study
In this section it is presented an example of the methodology described previously, using calculation. For the inputs it is considered the values presented below. As data reading, they are divided into two parts.
For the table data (item 4.1.1), it is considered the data from a case study of a restaurant in the city of Campinas, state of Sao Paulo, Brazil. In this restaurant there is a solar metering station. The tables are converted into curves that are presented in Figures 8-10, in this order: demand curve, energy prices and solar generation.
For dialog boxes data (item 4.1.2), it is used the values below, in Table 1. They are grouped by energy resource or generally use (e.g. Peak Time). For the diesel generation the values are based on information from generator manufacturers 7 and prices practiced by Petrobras, which is the largest distributor of diesel in Brazil, Petrobras 8 . For the solar generation, the data from the inverter are based on information from manufacturers of this type of equipment 9 . For the ESS data, the values are defined according to the consumer's needs. Finally, the peak time are based on the metropolitan region of Sao Paulo, which corresponds to the interval that begins at 18:00 and ends at 21:00 10 .

Results with Methodology
Considering the methodology, the premises and the inputs, the data is simulated 7 Available in: https://sotreq.com.br/pt-br (accessed November 1, 2020). 8 Available in: http://www.petrobras.com.br/pt/produtos-e-servicos/precos-de-venda-as-distribuidoras/gasolina-ediesel/ (accessed November 1, 2020). Journal of Power and Energy Engineering   Besides this, the values of a single day simulation are estimated for a month and a year, replicating the daily results.
In addition, it is plotted the battery level along the day. The result is presented in Figure 11.

Results without Methodology
Considering the same consumer of case study, but without the methodology and ESS, it is possible to make another simulation for this situation. The results are presented below.
For the distribution utility (Net) the total costs are $457.05 in one day. For solar generation and ESS there are neither considered OpEx values nor CapEx values. For a daily simulation there are no costs with diesel generation. Figure 11. Battery level. Source: Own elaboration. 11 OpEx-Operating Expenditure. 12 CapEx-Capital Expenditure.

Verification of the Methodology's Robustness
The purpose of this section is to demonstrate the methodology's robustness, through another example, using calculation. In this case, it is used theorical data for the consumer. For the inputs it is considered the values presented below. As data reading, they are divided into two parts.
For the table data (item 4.1.1.), it is considered the data from an industrial consumer, in the city of Campinas. This consumer has solar generation, biogas generation and it is connected to the grid. Furthermore, there is an ESS.
The solar generation and the energy prices are the same of the previous example. In Figure 12 it is presented the demand curve of this case study.
For dialog boxes data (item 4.1.2), it is used the values below, in Table 2. They are grouped by energy resource or generally use (e.g. Peak Time). For the biogas generation the values are based on information from CIBiogás 13 , a brazilian institute dedicated to the biogas development as a competitive and clean energy resource [38]. For the solar generation, the data from the inverter are based on information from manufacturers 14 of this type of equipment. For the ESS data, the values are defined according to the consumer's needs. Finally, the peak time is based on the metropolitan region of Sao Paulo, which corresponds to the interval that begins at 18:00 and ends at 21:00 15 . Figure 12. Demand curve. Source: Own elaboration. 13 Available in: https://cibiogas.org/ (accessed December 12, 2020). 14 Available in: https://new.abb.com/ (accessed November 1, 2020). 15 Available in: https://www.eneldistribuicaosp.com.br/ (accessed November 1, 2020). Journal of Power and Energy Engineering

Results with Methodology
Considering the methodology, the premises and the inputs, the data is simulated in Matlab. It is developed a code based on the methodology presented. Besides this, the simulation occurs for one day. According to Figure 4 of this work, at the end of all cycles the results are ready. As it is described on item 4 the results can be presented in two points: the costs savings and the level of the ESS. The total costs with each energy resource are calculated and presented below.
For this case study and for a daily simulation there are more costs with biogas generation than power grid. This occurs because in this case the power grid is the most expensive energy resource.
For the biogas, the total costs are $1503.90. For the distribution utility (Net), the total costs are $270.21 in one day. The costs with power grid correspond to the needs to charge the energy storage system, after discharging. If only the biogas generation is used to charge the battery, it does not achieve the full load level at the end of the day. A possibility to reduce the costs with the power grid is to increase the biogas generator capacity.
For solar generation and ESS there are neither considered OpExvalues nor CapEx values.
Besides this, the values of a single day simulation are estimated for a month Journal of Power and Energy Engineering and a year, replicating the daily results. In addition, it is plotted the battery level along the day. The result is presented in Figure 13.
As it is described in premises, the ESS starts with full load. Besides this, it is possible to see in Figure 13 that the battery is used through the peak time defined on item 5 and reaches its minimum limit set in the premises. After the peak time, the ESS starts the charging process. This mechanism reduced consumer's costs during the day.

Results without Methodology
Considering the same consumer of case study, but without the methodology and ESS, it is possible to make another simulation for this situation. The results are presented below.
For the biogas, the total costs are $2081.83. For the distribution utility (Net), the total costs are $460.91 in one day. For solar generation and ESS there are neither considered OpEx values nor CapEx values. For a daily simulation there are no costs with diesel generation.
Besides this, the values of a single day simulation are estimated for a month and a year, replicating the daily results.

Conclusion and Final Considerations
This work develops a methodology that reduces the energy costs for a consumer with multiple available energy resources, and eventually provided an energy sto-rage system. The methodology can be divided into different processes: data reading, data analysis, decision-making, registers, calculations, and results. The data reading and data analysis process check the information about the consumer, the energy storage system (if applicable) and the energy resources. This interaction could be made once a day, but all those data change along a day. Therefore, it is set up a 15 minutes period of checking new information about the energy storage system (if applicable) and the energy resources. In this way, the methodology can capture the changes along the analysis of the consumer.
This work also presents a case study applying the methodology. This case study is composed of a real consumer in state of Sao Paulo, Brazil, with solar generation, diesel generation and the power distribution energy. It is also considered an energy storage system. The application of methodology is made using software to simulate a typical day of this consumer. The results showed that this consumer saves 33.3% of its costs, in comparison without the application of methodology and the ESS. There is considered the use of the available energy resources and the consumer's particularities.
To demonstrate the methodology's robustness, this work simulates a situation with theoretical data. This case is composed of a consumer in state of Sao Paulo, Brazil, with solar generation, biogas generation and the power distribution energy. It is also considered an energy storage system. The application of methodology is made using software to simulate a typical day of this consumer. The results showed that this consumer saves 30.2% of its costs, in comparison without the application of methodology and the ESS. There is considered the use of the available energy resources and the consumer's particularities.
The results of this work are consistent with those presented in other works [9] [21] [23], where the energy costs reduction varies from 9% to 42%. This methodology is suitable for different situations and locations. In this way, this work is quite broad and replicable, especially for consumers who pursuit an increase in energy reliability, besides the reduction of energy costs. The system reliability is a key point for many consumers, and the energy resources that provide this solution are well consolidated. Furthermore, in the last years there is an increase in search for renewable and clean energy resources, and this seems to be a trend for the next years.
Therefore, there is a pursuit of multi-source system by consumer-side, and this work combines three main points: the system reliability with multi-source and energy storage system; the energy savings with the methodology; and the use of renewable energy resources.