Optimal Dispatch and Technical and Economic Feasibility Analysis of Residential Microgrids Considering Demand Side Management

Abstract The electrical system is becoming more robust with the insertion of distributed energy resources (DERs) and the need for energy autonomy by consumers, given that the current scenario is a growth in demand for electric energy. This paper aims to apply a computational model capable of determining the optimal hourly allocation of controllable loads in residence, as well as studying the optimal dispatch of residential microgrids considering management on the demand side. In addition, this paper presents an economic feasibility analysis of residential microgrids considering distributed generation from wind and solar sources, distributed storage, electric vehicles, and residential controllable loads. Thus, it was possible to conclude that in residence, the insertion of distributed energy generation and storage elements can present a significant reduction in electric energy costs, which can be even greater if these elements are associated with optimized controllable load management.

section_content: Recent studies reinforce the growing worldwide increase in electric energy consumption and its tendency to continue growing in the coming decades. The International Energy Agency (IEA) points to a 28% increase in demand between 2015 and 2040, indicating that it can reach the 30 PWh in 2020 [1]. In Brazil, according to the Empresa de Pesquisa Energética (EPE), the future projection is for an increase of 0,6% per year, which may reach 741 TWh in 2026 [2]. However, the country has a broad energy potential not yet explored, being able to contribute significantly to attend this demand mainly through renewable energy sources and with low environmental impact. Also, contributing to the reduction of dependence on hydraulic sources that, although being renewable, are responsible for grave environmental and social problems resulted from flooding necessary for implementation, besides being generally located at great distances from consumption centers. 

Within this scenario, distributed energy resources (DERs) such as distributed generation and storage, and others gain prominence, as it offers energy sources to be closer to the final consumer, in addition to providing more savings in the energy bill, in view of the regulation that gives credits for the consumer unit that injects surplus of power generated into the grid for a subsequent reduction in their tariffs [3]. Thus, there is a need to integrate these DERs into the National Interconnected System in the best possible way, respecting energy efficiency and reliability standards that cause the electric grid to evolve in the direction of smart grids [4], which residential microgrids are part. They consist basically of consumers who are no longer passive agents, but units capable of generating and storing energy in an optimized way, minimizing their consumption costs through intelligent mechanisms that offer the user a greater autonomy over energy management [5]. Thereby, a new term has emerged to name this type of consumer, called a prosumer by several authors of works in the area, since a prosumer is no longer a load to be satisfied but is also an energy producer. This fact reinforces, even more, the importance of greater attention to issues involving management on the demand side, likewise the possibility of implementing mechanisms for power dispatching in residential microgrids, in consequence allowing the application of techniques to obtain the optimal dispatch to benefit everyone involved. 

With more consumer units joining the country's net metering scheme, there will be a big maker trend in organizing such as units in the form of microgrids. Microgrids are distribution subsystems that contain distributed generation and storage, with the possibility of operating in parallel or isolated from the grid. They are often understood as transition structures between the current and the future electric system, composed of electric smart grids, whose concept permeates the use of communication technologies, to optimize the production, generation, distribution, and consumption of energy, adopting a bidirectional flow of information, connecting the customer with the local concessionaire, which now has more information on the load profile and power injection of each consumer group, enabling more assertive decision making, in addition to the implementation of more sophisticated control mechanisms, optimizing the system as a whole, contributing to the reduction of technical and non-technical losses, besides improving the quality of supply. 

For this instance, many works have been analyzing the optimal dispatch and energy management in microgrids. As Sedighizadeh and coauthors [6], that propose a stochastic multi-objective model to solve the demand side management problem considering both solar and wind generations, besides having as objective function the minimizations of operation cost and emission simultaneously. Jin and coauthors [7] also discussed about management from both demand and supply sides and optimal dispatch by considering demand response for a large-scale microgrid with flexible loads. Differently, Anvari-Moghaddam and coauthors [8] brings a hybrid strategy for optimal dispatch of a small-scale integrated energy system that provides a flexible and reliable optimal solution for demand side management of loads, considering the user's comfort maximization, too. 

From the economic point of view, Jung and Villaran [9] propose a model to determine the optimal size and type of distributed energy resources (DER) as solar and wind power, and the results show that economic and technical analyses from the proposed system model are essential for the efficiency of a microgrid. Alharbi and Bhattarcharya [10] use a stochastic planning framework to determine the optimal capacity of a battery energy storage system in an isolated microgrid through a two-stages approach as a mixed-linear programming problem. They considered uncertainties related to wind and solar generation and power demand through different probabilistic scenarios. 

With all papers and evaluation about optimal dispatch in microgrids, this paper has as main contribution the integrated analysis of operation and economic feasibility of investments in residential microgrids, considering demand side management including distributed generation systems from wind and solar sources,
section_name: INTRODUCTION

section_content: Considering the city of Curitiba as a study case, an analysis of the technical feasibility of distributed microgeneration is necessary if there is a future insertion of residential microgrids in the region. The microgeneration systems that stand out the most in Brazil are the photovoltaic and the wind [11] that are the scope of this paper. 

Herewith, for wind feasibility, we use the Weibull Distribution, which is defined as a continuous and unimodal probability function, that can be applied to represent the distribution of wind speed of a region. The difficulty in using Weibull distribution lies in the estimation of its parameters to obtain an adjustment with the smallest possible error, enabling the extraction of conclusions regarding the use of the wind potential in Curitiba. The achievement of Weibull shape and scale parameters, as well as data on wind regimes, such as speed and prevailing directions, were obtained from Atlas of Brazilian Wind Potential for different regions of the country. From that point on, several numerical methods for the estimation can be applied, however, the maximum likelihood technique was the one that was more assertive for analysis in the city of Curitiba, resulting in obtaining the scale and shape parameters that can be used to determine Weibull's probability density function for an analysis period [12]. 

In the case of solar microgeneration, studies began with the data collection referring to the technical specifications of a photovoltaic generation system [5] and of average solar radiation in Curitiba that served as parameters for obtaining the generated energy in each period of the day [1]. 

The smart-house used as a case study for the present paper consists of controllable and non-controllable loads, storage systems, distributed generation, and an electric vehicle. Such elements will be the main target of the optimization model that will make the optimum allocation of them during the periods of the day always to minimize the costs with electric energy through smart management. For that, we used a computational model that performs the optimal dispatch of residential microgrids, presented in [5] through the environment provided by @Matlab, and also the Microsoft Office Package to organize and analyze the results. 

The software implementation made was based on the mathematical modeling of the elements from the smart-house. That can be verified in [5], where is detailed the operational characteristics of each component considered for later computational modeling at the code level, allowing to simulate the behavior of the different elements belonging to the smart house. It is fundamental to highlight that white tariff modality, in force at COPEL [13], was adopted as a reference for consumption costs at different periods classified as offpeak, intermediate, and peak as shown in Table 2. The technique used to achieve the desired goal of reducing electric energy costs is summarized in the study as a set of mathematical equations and constraints that models the entire system as a mixed-integer linear programming problem. This set allows minimizing a multi-objective function subject to constraints presented in [5]. This mathematical tool allows defining a primary and a secondary objective function so that the optimization takes place fulfilling priority levels. As previously mentioned, the main purpose is to reduce expenses with electric energy, which is the objective with the highest priority. In addition to the expected secondary result is the minimization of the charging and discharging cycles of the electric vehicle, so that it can have a greater lifespan. Thus, an optimal result is obtained respecting the operational and capacity constraints of the system's components, while seeking to reduce the daily charges and discharges of the electric vehicle. 

Non-controllable loads are those that the user does not want to change in his daily operating hours [5]. In short, they are equipment whose characteristic does not allow for a change in allocation (such as the refrigerator, for example) or that the customer wants to use at a specific time of the day without flexibility. This way, non-controllable loads have their operating periods immutable since their operating hours will not be affected by the software. On the other hand, controllable loads consist of equipment that the user considers susceptible to flexibility in their hours of use, considering a change in their operating period acceptable by the smart mechanism, which will allocate this type of load in the best possible way owing to the spending minimization [5]. An example can be the washing machine, which has the feasibility of operation at any time of the day, depending only on the user's convenience. It is worth noting that the customer can also define the periods in which he does not want to use such loads. Therefore, they are left out of the optimization process and are not considered in the allocation, thus offering greater adaptability of the system to the final user's routine. 

The storage systems are capable of retaining and injecting electric energy, being useful tools in energy management, as they can provide charged energy in the off-peak period aiming to reduce consumption from the grid in those periods. Another element considered involves distributed generation systems, which have this name because it is opposed to the current model of centralized generation. Therefore, consisting of systems that obtain their energy sources at distributed points through electric grid, presenting, in general, a smaller size compared to conventional plants and is located in regions closer to the consumption centers. 

The electric vehicles considered in this paper are those powered only by electric motors, seeking their energy source in batteries located inside, thus offering a smaller environmental impact from their use. Besides, electric vehicles have the possibility to operate as an energy storage element, contributing to the energy autonomy of a house and facilitating management, even if this is not their principal function. 

Indicators for economic feasibility were used, allowing for effortless interpretation, analysis, and comparison of results obtained from the financial point of view, namely: simple payback, net present value, cash flow, and minimum attractiveness rate [14]. 

Payback refers to the time that an enterprise takes to pay its initial investment. Simple payback is the simplest method of analyzing the feasibility of an enterprise, being defined as the number of periods (whether years, months, weeks, etc. ) needed to recover the initial investments [14]. The net present value is the most commonly used method in the economic analysis [14], aiming to bring to the initial period the entire cash flow of the project throughout its lifespan, taking into account interest rates, income, and expenses for each period. Equation (1) shows how to calculate the net present value. If the value is negative, the project is considered to be economically unfeasible. If the value is greater than or equal to zero, the project is considered economically feasible, and the higher the value, the more attractive the project is [14]. 

Where: NPV means Net Present Value (R$); FCn means Cash Flow in period n (R$); n means numbers of periods;

Cash flow is an instrument of financial management. Its objective is to project income and expenses in future periods. It is used mainly to create a cash balance estimate during or after a period of time [14]. The minimum rate of attractiveness is the minimum interest rate that an investor desires to earn when making an investment or the maximum that it proposes to pay interest when making a loan. This fee consists of three components: opportunity cost it the remuneration that can be obtained in other investment options; the business risk is when the investment gain has to compensate for the risk of a new action, that means the greater the risk, the higher the remuneration; liquidity is the capacity or speed at which one can leave one position in the market to take on another. It is inevitably a personal variable since the risk propensity varies between each investor and can also vary with time, so there is no way to calculate it [14]. 

The flowchart presented in Figure 1 shows how the optimal dispatch results formulated by [5] are used to determine the savings of a day. Thus, this day is assumed to be equal for 365 days of the year, being possible to calculate the annual cost savings through the parameters introduced earlier. All data input, including all parameters needed, can be found in [5]. The implementation of day-ahead dispatch optimization for the smart house was in @Matlab. With the results for each case, it was possible to implement an economic feasibility analysis presented in the next section.
section_name: MATERIAL AND METHODS

section_content: We selected Curitiba as a case study. The comparison of hourly wind oscillation data with technical specifications of the selected wind turbines, whose models are ELV-H3. 1 and ELV-H80, and the minimum wind speed for operation is 3 m/s, makes clear the technical infeasibility of wind microgeneration in this study case. The average wind speed in Curitiba does not exceed 2,5 m/s, that is, out of the operating range of wind turbines resulting in almost zero energy generated throughout the day. Thus, this type of generation is not considered in the simulations carried out. The photovoltaic generation that presented a significant generation profile [15] [16] is applied. That means that any area where the wind speed is less than the minimum wind speed for the operation has technical infeasibility for wind generation. 

From the analyzed residential microgrid, nine cases were developed, presenting different combinations of the involved elements to study the operational impact and the economic feasibility of each one with comparisons between them. 

Case A is called the base case and is used to observe the savings made in the application of other cases. This base case considers only controllable loads, non-controllable loads, and electric vehicle working just as a load, without the possibility of energy storage and a smart allocation to none of the involved elements. Figure 2 presents the resulting consumption curve for case A. The total monthly cost of electric energy consumption in the white tariff modality is R$ 1670,60 per month.
section_name: RESULTS

section_content: There is a high concentration of loads in the peak period to simulate a common scenario to residences without optimal allocation of loads since it is usually during these periods that residents commonly use the equipment. The electric vehicle's impact on the curve is also notable since it is assumed that it is charging during these periods for the base case A. 

Adding the photovoltaic generation system to the previous item, we have case B, whose resulting curve is shown in Figure 3, where it observes that no-load allocation has been made yet. All the surplus of injected power is sold to the concessionaire, along the lines of a future energy sales perspective. Even so, generation occurs during off-peak hours, when the price is lower, and consumption remains high during peak periods. Total expenses for case B sum a total R$ 1. 244,04, a saving of R$ 426,58 compared to case A. Considered generation totals 7,65 kWp, with an estimated cost of R$ 39. 324,00 with inverter included [17]. Table 3 illustrates the general investment data and economic metrics for the photovoltaic system, considering a 20-year time horizon and a minimum attractiveness rate of 10%. Case C is similar to case B, but with the application of the optimal allocation of loads and the electric vehicle, but still without considering it as a storage system. Figure 4 illustrates the case C result. 4, considering a 20-year time horizon and a minimum attractiveness rate of 10%. 

For case D, case A was used with the addition of the energy storage system to charge during off-peak periods and discharge during peak periods, as shown in Figure 5. For case D, the monthly energy cost is R$ 1. 577,66, resulting in a saving of R$ 92,94 relative to case A. The Tesla Inc. Powerwall system was considered to compose the storage element for predicting the use of equipment in residential microgrids [18]. It has a cost of approximately R$ 38. 600,00. With this consideration, Table 5 shows the results of economic indicators in the same conditions as in previous cases. Case E presents the same components as case D, but with the application of smart allocation, still considering the electric vehicle as just another load on the system. The resulting consumption curve is shown in Figure 6. For case E, the energy cost is R$ 1. 177,54 monthly, which results in a monthly savings of R$ 493,06 compared to case A. The financial results are shown in Table 6 under the same conditions as in the above cases. Case F presents the loads, the electric vehicle working only as a load, the photovoltaic and storage system, but without the application of smart application of loads. Its resulting curve is illustrated in Figure 7. 

The total cost is R$ 1. 151,08 per month within savings of R$ 519,52 monthly. In this case, the initial investments of photovoltaic and storage systems are made, as shown in Table 7. 

Case G has the same elements as case F. However, it considers the smart allocation of theirs loads, as can be seen in Figure 8 by the behavior of the storage system that is fully charged with generation surplus to discharge during peak periods. 

Brazilian Archives of Biology and Technology. Vol. 64 no. spe: e21200293, 2021 www. scielo. br/babt n the case that electric vehicles are considered, the initial investment and maintenance values of the electric vehicle must also be taken into account, still operating as a load and without optimal allocation. To this end, the H case was created, also considering fuel savings through the use of the electric vehicle. Therefore, monthly expenses and savings, compared to case A, were the same as case F, but R$ 120. 000,00 value was considered for the electric vehicle as an initial investment, in addition to a cost of R$ 829,00 referring to its annual maintenance [19] [20]. Results from the economic evaluation are presented in Table 9. The savings obtained with fuel was R$ 1. 048,00 per year [21]. For case I, the optimized allocation of loads will be taken into account, and the possibility of using the electric vehicle as a storage system that can also inject energy during peak periods is shown in Figure 9. It presented a monthly energy expense of R$ 328,11, representing savings of R$ 1. 342,48 monthly for case A. Table 10 summarizes the resulting financial ratios for case I. Case J is the application of optimized allocation of case A loads, with the electric vehicle operating only as a load. Figure 10 illustrates its curve. For the last observed case, costs with electric energy were R$ 1. 270,48 per month, corresponding to savings of R$ 400,12 per month compared to case A.
section_name: Figure 2. Consumption curve for case A

section_content: It is possible to perceive through the observation of the results that all the simulated cases offered a reduction in the monthly energy bill if case A is taken as a reference. The high initial investments and equipment maintenance in some cases make the investment economically unfeasible (negative Net Present Value) as occurs in cases D and F. However, through the application of the optimized allocation of flexible loads, in cases E and G, the cost of energy drops significantly, making these cases feasible. 

Even with the minimum number of elements considered, only with the optimized allocation of flexible loads, there is already a considerable reduction in energy cost, as shown in case J. Besides the fact that this scenario is what provides the lowest initial investment and even so offers significant monthly savings.
section_name: DISCUSSION

section_content: According to the evaluation carried out in the study, wind power generation in the case study proved to be technically and economically unfeasible, as the average speeds considered do not reach the minimum value for a wind turbine operation. 

On the other hand, the photovoltaic generation proved to be technically and economically feasible in the main when associated with an energy storage system. This fact allows the generated energy to be stored and injected into the grid during peak periods, creating credits with a value three times greater than if injected into times it was generated, thus allowing more savings for users. 

Brazilian Archives of Biology and Technology. Vol. 64 no. spe: e21200293, 2021 www. scielo. br/babt It can be noted from the analysis of the results that the significant impact of the smart management of loads is associated with the use of electric energy generation and storage systems. Although the storage devices involved are based on developing technologies and recent in the market, they still have low efficiency and lifespan and a high cost. However, they have a feasible investment and are economically viable. The tendency is for this storage equipment to evolve, becoming cheaper and more efficient, making these systems even more feasible. 

The electric vehicle increases the investment cost considerably. Therefore, the payback time on investment is high, not only due to its high initial cost but also due to its maintenance cost, which practically nullifies the savings obtained from the system. However, assisting the management of a residence's energy demand is a secondary function of the electric vehicle. Thus, its cost cannot be considered inherent to the costs of managing a residential microgrid. Therefore, it cannot be said that a residential microgrid, which has a photovoltaic system with storage and an electric vehicle, is economically unfeasible. 

We notice the significant impact of optimal allocation of loads, which can be enhanced by the association with electric energy generation and storage systems. More savings can be achieved without any initial investment, only using the optimized allocation of loads from a residence. 

Therefore, an optimized management of loads has a significant impact on the economic feasibility of a residential microgrid, reducing the payback time on investment significantly.
section_name: CONCLUSIONS

section_content: Acknowledgments: This research was funded by the Companhia Paranaense de Energia -COPEL research and technological development (RTD) program, through the PD-02866-0511/2019 project, regulated by ANEEL. The authors thank the support of CAPES-Brazilian Federal Agency for Support and Evaluation of Graduate Education within the Ministry of Education of Brazil. We also thank the CAPES-PRINT-UFPR Project -Finance Code 001.