**1. Introduction**

Electricity is an essential commodity for economic growth and the well-being of developing communities. However, almost 15% of the world's population does not have access to it [1]. The use of energy is absolutely necessary in the production, distribution, and consumption activities of human society [2] and the supply of electrical energy is one of the primary needs in modern societies [3]. However, meeting this need over all the areas in a country is a challenge for governments and companies in the energy and electricity sector. Therefore, electricity and its management have been one of the most important topics in scientific and industrial research for the past few decades [4].

In recent years, discussion has also been focused around sustainable energy and its environmental obligations, specifically on greenhouse gas emissions such as carbon dioxide (CO2) [5], resulting from companies in the energy and electricity sector. Energy diversification arises as a solution to the emission of gases and is focused on guaranteeing the security of the energy supply through the incorporation of non-conventional renewable energy sources (NCRES). This diversification aims to have a hedge against energy supply problems, such as those caused by intense summers (climate change) or by problems resulting from a shortage of hydrocarbons.

Consequently, new approaches based on renewable technologies could provide electricity to communities in off-grid areas. Those technologies are usually less polluting and easy to maintain and operate [6]. "Microgrids" are one of the most typical approaches in scientific and industrial research that considers renewable energy sources to optimize the use of, and access to, electricity. They are defined as a group of interconnected loads and distributed energy resources, such as generators and energy storage devices, with defined electrical boundaries that form a local electric power system at distribution voltage levels,

**Citation:** Espitia-Ibarra, M.; Maya-Duque, P.; Jaramillo-Duque, Á. Design and Development of a Management System for Energy Microgrids Using Linear Programming. *Appl. Sci.* **2022**, *12*, 3980. https://doi.org/10.3390/ app12083980

Academic Editors: Marcos Tostado-Véliz, Paul Arévalo, Salah Kamel, Ragab A. El-Sehiemy, Tomonobu Senjyu and Davide Astiaso Garcia

Received: 3 March 2022 Accepted: 3 April 2022 Published: 14 April 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

acting as a single, controllable entity that is able to operate in either grid-connected or island mode [7]. A microgrid serves as a system that integrates the actions of all users connected to it and uses advanced information, control, and communication technologies to save energy, reduce costs, and increase reliability and transparency [8]. Microgrids are emerging as an alternative solution to the problem of accessibility to service isolated areas where the electric power system cannot reach, or even as a sustainable alternative that allows communities to autonomously manage part (or even all) of their energy requirements.

This research studies the methods and tools used to make optimal use of renewable energy sources in microgrids within the context of isolated communities in Columbia in order to develop a new approach that could optimize the generation and use of electricity in off-grid areas where the current energy solution is the use of fossil sources such as diesel to supply energy demand.

Consequently, this research presents a novel approach within a Colombian context for the use of renewable resources to produce energy and its storage capacity within a microgrid. This approach seeks to meet the energy demand from isolated communities at the lowest possible cost, implementing strategies that ensure good load distribution and the minimum amount of unattended demand.

### **2. Materials and Methods**

### *2.1. Microgrid Control System*

One important component of microgrids is the energy source. There are different sources for the generation of energy that can be classified according to their predominance, called conventional and non-conventional sources, or according to the type of resources used, that is, renewable and non-renewable sources [9]. Conventional sources refers to the most widely used energy sources worldwide, among which the energy supplied by means of hydroelectric plants or the burning of fossil fuels, such as diesel, coal, and gas, stand out. Less predominate sources in the market are called unconventional sources, where the primary source is produced by natural resources or it is an emerging energy source under development. In the same way, renewable energy sources are those whose potential is abundant and include solar energy, hydraulic energy, wind energy, biomass energy, and geothermal energy [10]. Conversely, there are other sources of energy that are not renewable, that is, they are found in a limited quantity in the world and the rate of their consumption is higher than their regeneration time; some of these non-renewable energy sources are fossil fuels such as coal, oil, and natural gas, as well as uranium. A traditional microgrid system generally consists of a set of wind turbines, photo-voltaic panels, small hydro power, diesel micro-turbine engine, and battery storage.

The unpredictable nature of renewable energy sources such as solar and wind affects the performance and reliability of the microgrid, due to excess electricity generation or lack of generation, which is considered to be the main drawback for its adoption [11]. However, some approaches such as those presented by [12] argue that this problem can be solved by combining two or more power sources together with a backup unit to form a hybrid renewable energy system. In other words, the system is operated with a set of energy sources and storage devices to satisfy the demand, even when some of them are not available.

The microgrid control system is described in [13] as a four-levels system: the fourth level has a system that assigns the production of active and reactive power to each generator element of the grid according to the demand. The third level sets the voltage and frequency references in the nodes, while the second level of the control system corrects the voltage and frequency deviations in the network. Finally, the primary control level executes actions locally on the generation sources, keeping the voltage and power at the reference values.

Within the fourth level of the control system mentioned above, setting the active and, sometimes, reactive power from each generator unit at each time period is a core element of the strategy adopted to manage the power generated by the microgrid. This strategy would depend of the system goals, minimizing costs and/or maximizing coverage. In this

study, the management strategy is a Unit Commitment (UC) that defines an optimization problem that seeks the optimal scheduling of generation units in a specific time horizon (hourly, daily, or weekly). The objective of the UC strategy described in [14] is to satisfy the demand at minimum cost, considering the on/off states of each generation unit, its ramps, reliability restrictions, system capacity, transmission, environmental impact, etc.

### *2.2. Literature Review*

The UC has usually been formulated as a non-convex and nonlinear combinatorial optimization problem by some authors. However, in some cases, the UC strategy can be applied to models like the one described by [15], where a lineal cost function is considered and only management constraints are taken into account. This research adopts a linear definition of the cost function based on the amount of energy produced by each of the generation technologies.

Optimal power flow and UC has been also divided by [13] into two more specific problems: static and dynamic economic dispatch. The first one is a typical mode of power system planning and operation, which only studies the optimization scheme of a single time section rather than the connection between each time period. When modeling the static economic dispatch of the microgrid system, the objective function is usually to minimize the overall operating cost of the microgrid. Most of the constraints only consider the active power limits of the generating units in the microgrid and the power balance constraints within it, while ignoring the characteristics of battery storage units such as useful life, loading and unloading ramps, among other. On the other hand, dynamic economic dispatch is defined in [16] as one that considers the relationships between the values of the optimization variables in subsequent periods; for example, the battery level in a defined period affects the battery charge level in future periods depending on the state of charge or discharge that is defined through optimization.

The dynamic economic dispatch model of the microgrid takes into account factors such as the ramp restriction of the controllable sources and the operation restriction [17] of the energy storage units, etc., which is closer to the power system. The addition of energy storage units not only makes the microgrid more closely connected in time, but also makes the operation more economical and reliable. In [18], it is shown that dynamic economic scheduling with energy storage units can save about 37% of the operating cost compared to static economic scheduling without an energy storage unit.

One example of the implementation of a UC strategy to manage microgrids is presented in [15]. This research proposed a optimization model for planning an appropriate stand-alone, renewable-based electricity system for off-grid communities in Colombia. It used implicit stochastic optimization to make decisions regarding the sizing of renewable energy sources to meet energy demand during an average day. This research also considers the use of a unitary battery system for each zone in such a way that the energy generated from renewable sources during a certain period of time can be used later. This work concludes that the use of renewable energies must be adaptive according to the conditions associated with the environmental variables. In addition, the combination of these technologies provides a solution that is significantly cheaper for the community than typical diesel platforms because it is not necessary to buy or transport fuel.

Another important study related to power microgrid management is [19]. In this study, a multi-objective economic-emission dispatch problem of combined heat and power is developed. In their model, multiple energy sources are also considered: renewable and non-renewable, but its objective function involves unit operating costs, emission level, emission tax, and the cost of power purchase from the main external grid. Their case is also important since it is possible to study the chance of managing microgrids in non-isolated areas, whose access to energy from the main grid is partial and, therefore, energy from it can be accessed to fully or partially satisfy the demand in certain periods of time.

An important approach to mention is the one developed in [20], where the microgrid is approached from the basic consumer unit. In this case, it is considered that each client has an energy storage unit that can be used to store energy generated from renewable sources and that this is then used to reduce the total load on the general grid. In this case, the main objective is to reduce the load on the conventional network from the use of production and consumption forecasts. In this study, metaheuristics are used to solve the proposed model and the results and computation times for the methods used are compared.

In [21], a mathematical optimization approach is proposed for the optimal operation focused on the economic dispatch of a DC microgrid using renewable energy generators and energy storage systems through semi-defined programming. The proposed mathematical approach contemplates the operation of a DC microgrid over a period of time with variable energy purchase prices. This characteristic makes it a practical methodology to be applied in real-time operating conditions. Further, a nonlinear auto regressive exogenous model (NARX) is used to train an artificial neural network (ANN) to forecast solar radiation and wind speed for the integration and dispatch of renewable generation considering prediction periods of 0.5 h and a time horizon 24 h.

Finally, the work developed in [22] shows a more robust model in which a greater number of possible technologies (diesel, gas, fuel, solar, and wind power generators) can be used for power generation and are considered, as well as different costs associated with the power generation activity. Consideration of these multiple costs is then reflected in multiple objective functions. On the one hand, there is cost-effective operation, which is the minimization of the operation and the aging costs of the micro-grid components. On the other hand, there is the maximum islanding degree, which states either there is no physical connection with the macrogrid, or no power will be exchanged, or only a fixed and predefined power profile may be considered as exchange power; in this case, the formulation of the objective function is similar to the cost-effective operation objective function. Finally, there is eco-friendly operation, where the objective function is formulated as the minimization of the pollutant treatment costs. A genetic algorithm is used to solve instances and a case of study is presented.

### *2.3. Renewable Energy in Colombia*

Colombia is one of the most privileged countries in Latin America thanks to its geographical location. It provides special characteristics like zones where wind speeds are twice the world average and there is also sunlight most days of the year [23]. As a consequence, a great research scenario is open for new ideas to propose and develop different methodologies to take advantage of these characteristics and then to focus on the optimal use of renewable resources, specifically, in off-grid zones.

In 2020, 29 off-grid zones supplied their own energy demand using renewable energies; however, it is a small number in front of 1798 off-grid localities that are distributed in almost 51% of national territory [24]. In most of the cases, off-grid energy demand is supplied with diesel-based generators as a single option and only 31.3% of them have electric service available 24 h a day. One of the reasons that could explain this limited use of renewable options to supply energy in those off-grid zones is that their installation cost used to be substantially high and made this solution financially impractical. However, their prices have come down and the renewable generator industry is more competitive than before [25].

In the same way, in recent years, the Colombian government has developed some laws, such as "Ley 1715" [26], that have encouraged the development of projects that promote the generation of electrical energy solutions in off-grid areas [27]. However, these laws do not present a clear framework on the benefits that the use of renewable generation sources can bring in specific contexts such as isolated areas. In this sense, and given the economic difficulties represented by the implementation of projects based on renewable energies in these contexts, it is necessary to develop alternatives that allow for the intelligent management of resources and that ensure their optimal operation.

The model we propose seeks to manage the energy microgrids considering uncertainty from different sources (environmental variables that affect the generation and demand of energy) at the same time as it implements specific strategies on some components of the microgrid, such as the battery system. This management is carried out through an optimization process by scenarios, which allows for adaptation to various situations whose conditions may affect the operation of the microgrid.

### *2.4. Proposed Optimization Approach*

Mathematically, the problem is described as follows: Let G be a set of available generation technologies (Solar: S, Wind: W, Diesel: D), I be a set of electric generators, conventional and non-conventional, each of them with technical parameters and dimensions depending on the associated technology, and T be the set of time periods within the planning horizon. In addition, consider a battery system with the capacity to charge when the total power of the microgrid exceeds the demand load and also supports the microgrid by serving as another energy source.

The goal is to satisfy the expected load demand for each time period (*dt*) into an energy microgrid, determining the functional capacity connected to the network of each generation technology in each time frame, all while minimizing the total cost of operation. Table A1 presents model variables.

According to the nature of the problem, the optimization model needs to calculate how much power needs to be produced by each generator at each time period (*t* ∈ T ). Therefore, based on the work of [15], Equations (1)–(3) describe, respectively, the solar, wind, and diesel generation. Let *f*(*i*) → *G* = {*S*, *W*, *D*} serve as the function that returns the type of generator technology *i* ∈ *I*. Thereby, power generation *git* depends on whether the generator is switched on or off.

$$f(i) = \mathcal{S} \rightarrow \mathcal{g}\_{\mathcal{S}t} = \left(\mathcal{G}\_{\mathcal{S}, \text{test}} \* \frac{\mathcal{R}\_t}{\mathcal{R}\_{\mathcal{S}, \text{test}}}\right) \* \mathcal{x}\_{\mathcal{S}t} \tag{1}$$

$$f(i) = \mathcal{W} \rightarrow \mathcal{g}\_{\mathcal{W}t} = \begin{cases} 0, & \mathcal{W}\_t < \mathcal{W}\_{\min} \\ \frac{1}{2} \left( \rho\_{\mathcal{W}} A^{\mathcal{W}} \mathcal{W}\_t^3 \eta\_{\mathcal{W}} \right) \* \ge\_{\mathcal{W}t}, & \mathcal{W}\_{\min} \le \mathcal{W}\_t < \mathcal{W}\_a \\ \frac{1}{2} \left( \rho\_{\mathcal{W}} A^{\mathcal{W}} \mathcal{W}\_a^3 \eta\_{\mathcal{W}} \right) \* \ge\_{\mathcal{W}t}, & \mathcal{W}\_a \le \mathcal{W}\_t \le \mathcal{W}\_{\max} \\ 0, & \mathcal{W}\_t > \mathcal{W}\_{\max} \end{cases} \tag{2}$$

$$f(i) = D \to \propto\_{Dt} \* g\_{\min}^D \le g\_{Dt} \le \propto\_{Dt} \* g\_{\max}^D \tag{3}$$

In the generation equations, the concept of installed capacity is used to measure how much energy can be generated from a specific source. In the case of renewable sources, the concept of peak power is used by the technology, which allows one to calculate how much electricity would be transformed according the amount of the primary source.

Considering the decisions and the associated generation functions, the mathematical model is defined as follows:

$$\min \sum\_{i \in I} v a\\_o p\_i \ast \mathcal{g}\_{it} \tag{4}$$

The objective function (4) seeks to minimize the variable operational costs of the energy system. The variable operational cost, *va*\_*opi*, is associated with the maintenance of the equipment during its life-cycle and the fuel, if any is used by the generator.

$$\sum\_{i \in I : f(i) \in \{S, \mathcal{W}, D\}} g\_{it} = el\_t + eb\_t + ew\_t \tag{5}$$

$$d\_t = el\_t + \mathcal{g}\_{Bt} + \mathcal{g}\_{Ft} \tag{6}$$

The first group of constraints is related to the control of the use of the generated energy. Equation (5) splits the generated energy into the portion that seeks to satisfy the demand, the portion that is used to load the battery, and a potential portion that is discarded. Meanwhile, constraints in Equation (6) ensure that the demand is satisfied through the sum of the energy generated for that purpose, the energy coming from the battery, and the energy from a dummy generator representing the unmet demand.

$$b\_t = b\_{t-1} \* (1 - \sigma) + \left[ (eb\_t \* \eta\_{bat}) - \left(\frac{\mathcal{g}\_{Rt}}{\eta\_{inv}}\right) \right] \* \delta t \tag{7}$$

$$u\_t \le u\_B \tag{8}$$

The second group of constraints is related to the state of charge of the battery. The constraint in Equation (7) calculates the state of charge of the battery system, at the end of the period *t*, taking into account the energy dissipation *σ*, and the charging and discharging efficiencies, *ηbat* and *ηinv*, respectively. Equation (8) sets the limit to the capacity of the battery *uB*. The remaining sets of constraints implement strategies for managing the charging and discharging processes in order to enhance the battery health and long term performance

$$\downarrow \mathcal{U}\_B \, \* \, \mathcal{Y}\_t \stackrel{>}{\geq} \mathcal{S}\_B t \tag{9}$$

$$\in \ast \colon \mathcal{Y}t \subseteq \mathcal{S}\_{Bt} \tag{10}$$

Constraints in Equations (9) and (10) set the value of the binary variable *yt* that indicates if the battery has been discharged (*yt* = 1) in period *t*.

$$Sc = \sum\_{t \in T} z\_t \tag{11}$$

$$z\_t \ge y\_t - y\_{t-1} \tag{12}$$

The first strategy is modeled through constraints (11) and (12), where they count the number of times the battery system enters a discharge process.

$$eb\_{t} \le eb\_{\max} \* (1 - y\_{t})\tag{13}$$

$$\mathcal{g}\_{Bt} \subseteq \mathcal{g}\_B^{max} \tag{14}$$

Constraints in Equations (13) and (14) implement the second strategy, which regulates the charging and discharging ramps. A third strategy to manage the battery ensures that the number of times that the battery reaches the deep discharge level (*bmin*), and the overcharge level (*bmax*), is less than *Lmin* and *Lmax*, respectively.

$$\frac{b\_t}{\omega\_B} + p\_t^{\min} \ge b\_{\min} \tag{15}$$

$$\frac{\mathfrak{b}\_t}{\mathfrak{U}\_B} - (1 - p\_t^{\min}) \le b\_{\min} \tag{16}$$

$$\frac{b\_t}{\mu\_B} - p\_t^{\max} \le b\_{\max} \tag{17}$$

$$\frac{b\_t}{u\_B} + (1 - p\_t^{\max}) \ge b\_{\max} \tag{18}$$

$$\sum\_{t \in T} p\_t^{min} \le L\_{min} \tag{19}$$

$$\sum\_{t \in T} p\_t^{\max} \le L\_{\max} \tag{20}$$

$$y\_{t\prime}.x\_{it} \in \{0, 1\} \tag{21}$$

$$\{g\_{\rm it}, b\_{\rm t}, eb\_{\rm t}, el\_{\rm t}, ev\_{\rm t}, Ic\_{\rm t}, z\_{\rm t} \triangleq 0\}\tag{22}$$

Hence, the equations from (15) to (18) determine when the discharge or overcharge levels are reached and constraints (19) and (20) set a limit to the number of times that it occurs. Finally, constraints (21) and (22) define the domain of the decision variables.

### *2.5. Computational Experiments*

The model described in Section 2.4 is tested on different scenarios built on real operating conditions for non-interconnected zones (NIZ) in Colombia. We first described the case studies that were used and then the experiments designed to validate different scenarios upon them.

### *2.6. Instance Generation*

This research considers energy microgrids in isolated communities of Colombia subsidized by the state. These areas are difficult to access and the energy solution currently implemented is 100% based on the use of diesel generators. This situation presents logistical challenges to ensure the correct and continuous operation of the microgrid.

Data was collected from three different regions in Colombia: San Andrés (SA), Providencia (P), and Puerto Nariño (PN). These locations already have diesel-based solutions to generate electricity and their installed capacities are presented in Table A3.

The parameters considered in the model are classified in technical, demand, and environmental parameters. Technical parameters are defined in Table A2. For batteries and generators, these parameters were drawn from existing bibliographic sources according to the used technology [28]. The default values for each parameter within this category were established by experts in the field. The parameters within the environmental category are solar radiation, wind speed, and temperature. The web tool RenewableNinja [29] was used to collect historical data for these parameters. This web tool provides a global meteorological database from the MERRA-2 system of the National Aeronautics and Space Administration [30] that gives timely (per hour) information. The downloaded data is from January to December 2019.

Finally, the demand parameter represented by the demand loads of the NIZ in Colombia were obtained and analyzed from the "Instituto de Planificación y Promoción de Soluciones Energéticas para Zonas No Interconectadas" (IPSE) that shared all NIZ's hourly energy supply reports from 2019. These data is supplied to the IPSE by the "Centro Nacional de Monitoreo" [24] that measures the actual electrical energy consumption of different isolated communities through telemetry systems. Data for every day of the year is available. However, when data was analyzed, it was observed that there was no significant variation between the same days of the week throughout the year. For this reason, an annual average is used as the actual hourly load for every day of the week. Therefore, 21 instances of the problem were built, seven for each of the three NIZ considered.

### *2.7. Design of Scenarios*

The experiments carried out with the model seek to generate information to validate the model's sensitivity and to understand the impact that some selected parameters have on different management scenarios. For this, the following four research questions are formulated:


For each of these questions, scenarios with the parameters of interest (called factors) will be identified and defined, and different levels will be experimented with.

Table 1 describes the four scenarios in terms of the parameters of interest in each case and the values that they will take. The experiments of each scenario correspond to a complete factorial design of the different levels for each factor.



The first scenario seeks to show the capacity of the model to properly manage the changes on demand under different conditions of availability of renewable resources. Therefore, it considers the actual demand, an increase of 25% and a decrease of 25% in the hourly demand, and a special case in which only the interval with the highest demand is increased by 25%. Additionally, the percentage of renewable energy generation varies from 0% to 30% with steps of 5%. The remaining factors are set to their default value according to the recommendations of experts in the field of study. The second scenario explores the model's sensitivity to changes in the availability of renewable energy resources. This is achieved by keeping demand and other parameters constant and making variations in the percentage of renewable energy generation of 5%, starting from 0% and reaching 30%. The third scenario evaluates the impact of the technical characteristics of the battery in meeting the demand and the performance of the microgrid. For this, the demand is left constant, a level of renewable resource capacity is selected where the use of batteries is evidenced, and different levels of the parameters *UB*, *ebmax*, *gmax <sup>B</sup>* , and *Lmax Lmin* are tested. Finally, in the fourth scenario, the effect of the penalty to the unmet demand is studied. In this case, different levels of penalty cost are tested for the unmet demand to check the behavior of the latter as said cost increases. These different test values are based on percentages according to the cost of the most expensive generation source, generally diesel generation. In this way, it is possible to know how much the cost of unattended energy should be raised so that the management model minimizes the unmet demand.

### **3. Results**

According to the proposed experiments in each scenario, the analysis of the results is carried out in order to evaluate research hypotheses and review the sensitivities of the response variables regarding changes in the configuration and working conditions to which they are subjected to on a microgrid.

Figure 1 shows, for one of the experiments, the hourly balance of the load and each energy resource on the microgrid. This figure shows a trend, which is repeated for all scenarios, in the use of renewable generation resources as the operating base of the microgrid, ensuring that through this generation of renewable energy, renewable resources are used for 100% of the time that they are available, despite the need for a diesel source in all periods during the day, given that its total operating cost is higher than the other sources.

Time (hour)

Additionally, it shows that after the availability of renewable resources increases in a certain hour, charging processes start at the battery storage system. This process of storing energy from different generation sources starts just before of the disappearance of the generation from the solar source (which is the most available renewable generation source), so it can be understood that the model identifies a lack of energy generation at night time and tries to supply it by storing energy at the battery system to meet future demand.

Likewise, the model uses the energy produced and stored when the renewable sources decrease, as expected. In particular, it makes use of stored energy at times when solar generation is not available. In the same way, it uses renewable generation and allows for the modulation of attention to demand with the diesel generator, which in each period of time is available for regulation by the operator.

### *3.1. Sensitivity of the Model to Changes in Demand*

To analyze how sensitive the management model is to different changes in the energy demand of the microgrid, Figure 2 shows the values of the objective function and the percentage of renewable energy used for different levels of demand as long as the installed capacity of renewable production is constant. It shows that, at different levels of demand, the management algorithm uses renewable energy resources in order to satisfy as much demand as possible through them.

Additionally, it is evident that since there is a relative increase in demand of 25% for each one of the three experimental levels, the decrease in the use of renewable sources to cover the demand is proportional. This shows that the percentage of demand coverage by renewable sources is determined by factors other than the level of demand, which are probably associated with the installed capacity of renewable sources.

For the special case in which within one hour period the demand is as its maximum peak during the day, the model handles demand coverage in a similar way as it does with medium load because it is capable of reconfiguring the battery system's usage processes to meet peak demand.

For its part, the operating cost of the microgrid by making use of renewable sources is lower compared to the use of diesel to fully satisfy the demand. This represents a saving in economic terms that is presented in the second part of Figure 2. In this case, a concordance is obtained in terms of demand coverage and savings generated by the use of renewable energies to satisfy different levels of demand from the same installed production capacity.

**Figure 2.** Sensitivity of the model to changes in demand. (**a**) Percentage of renewable energy to meet the demand for each experimental demand level. (**b**) Cost savings comparison for each level of demand using the same installed capacity.

### *3.2. Sensitivity of the Model to the Availability of Renewable Resources*

When the installed capacity of each renewable technology increases, measured as a percentage of the demand, the portion of the total demand satisfied by renewable generation sources increases.

Figure 3 shows that the demand coverage trend from renewable sources as they increase their availability is linear, marking more extensive use in terms of the solar source, as it uses approximately 100% of its installed capacity within the time horizon, which is not the case for the wind source. However, despite the inferior performance of the wind source compared to the solar source, its use in microgrids is justified due to its generation availability over the entire time horizon.

In conjunction with the previous results, Figure 4 presents the operating result of the microgrid when the renewable capacity is established at 45% of the maximum demand. This result shows that, in order to better meet the demand from renewable sources, it will

Generation

be necessary to install a greater wind generation capacity, since this generation source is available over the entire operating horizon of the microgrid. However, a similar effect can be achieved with a smaller additional solar capacity and a larger battery capacity to be able to supply the night demand from stored solar energy.

Solar = 0.15∗dmax Wind = 0.3∗dmax

### *3.3. Impact of the Characteristics of the Battery*

The technical characteristics of the battery affect the performance of the microgrid and especially the use of the storage system significantly in situations when the installed capacity for renewable generation is extremely low or extremely high.

When the installed capacity of renewable sources is small and its generation is not significant, there is an overgeneration from diesel sources in order have enough energy to store in the battery system that will be used in periods of high demand. On the other hand, in situations with a large renewable capacity of renewable sources and its production is significant, the overgeneration is used to charge the battery system, in order to turn off any of the diesel generators in one or more periods to lower the total cost of covering the demand.

As shown in Table 2, as battery storage capacity increases, more intensive use is made of it. However, the percentage of variation for the use of the battery refers to how much percentage of the demand is covered from the use of the battery systems with respect to the immediately previous level on which it has been experienced,and it is evident that the use of this system to supply the demand does not increase in the same proportion as its capacity increases.

Battery capacity has a direct impact on the fraction of demand that is not met over the time horizon, since this is the first way to avoid unattended demand. On the one hand, greater storage capacity would mean a lower fraction of unattended demand at night when the solar (most available renewable source) is not in operation. This is reflected in the savings represented by the use of a larger installed energy storage capacity. In this case, the "Savings %" column contrasts the operating cost of the microgrid with each storage capacity, in front of the current option of covering the entire demand from diesel. However, a greater power capacity from renewable sources and a higher charge and discharge capacity per period in the ramp parameters of the battery system allow more charging and discharging cycles to be started over the optimization time horizon.

**Table 2.** Impact of battery capacity.


Regarding the battery charge and discharge ramp conditions (*ebmax*, *Gmax <sup>B</sup>* ), it should be mentioned that there are significant variations in the operation of the microgrid for each of the experimental levels. As the charge and discharge value of the ramps increase together, the battery charge and discharge processes are carried out in a greater number of periods, thus allowing a more intensive use of the energy storage capacity and more immediately using the energy produced from renewable sources. This decreases the use of the diesel source, increasing the use of renewable sources.

Additionally, it should be noted that the deep discharge parameter *Lmin* has no impact on the operation of the model; this can be attributed to the fact that due to the constant production of energy, the battery is not only used to supply the demand, thus allowing it to be recharged in several periods. However, due to the ability of the model to foresee low production in certain periods of time, the parameter of the number of periods in which overcharge is allowed, *Lmax*, does significantly influence its operation. These annotations may affect the choice and configuration of the storage system, allowing it to increase the level at which the battery enters an overcharge state, keeping the installed capacity as low as possible and thus reducing purchase and installation costs.

### *3.4. Impact of the Penalty on Unmet Demand*

Finally, for the analysis of changes in the price of unserved demand, it is necessary to study the percentage of unserved demand with respect to total demand in each of the scenarios previously proposed.

The model considers unattended demand because there are moments within the time horizon in which the generation units are not available for operation, or the installed capacity is not enough to fully meet the demand. In this unattended demand analysis, its cost is calculated based on what has been implemented in [31], multiplying the amount of unattended energy by the cost of the unattended load.

Figure 5 shows that the objective function presents significant increases for certain levels of unsatisfied demand penalty cost as long as these are less than the cost of the most expensive generation source. However, there is a limit to this value of unattended demand cost, beyond which this quantity reaches its virtual limit and the overall changes in the objective function are smaller.

It is important to highlight that when the value of unattended demand is equal to that of the most expensive generation source, the maximum demand is met without changing the load configuration in the microgrid, that is, the maximum possible demand is supplied without entailing cost overruns. This can be attributed to the fact that the model does not try to store energy and incur costs associated with this process to cover future demand when it is possible to just leave it unattended. In addition, it avoids the intensive use of the battery system due to the considerations of its self-discharge process.

It is important to note that since the unmet demand penalty strategy applies in the same way over the entire time horizon, the model seeks to supply demand from all generation and storage sources in the periods immediately following the low energy production. This illustrates that at night time, when the solar generation is not available, the stored energy is used early, preventing the stored energy from dissipating in a self-discharge processes, thus causing unattended demand at times when it is perhaps more important to supply it. For this situation, as with the ability of the model to better cover unattended demand, a segmentation of demand by type of demand and by hours could be considered, thus making the model identify the best times to use stored energy and availability of renewable and non-renewable resources. Thus, a new possible unattended demand penalty strategy should consider different costs according to the priority of the type of demand and the period of time in which it is presented.

**Figure 5.** Impact of the penalty to unmet demand.

### **4. Discussion**

According to the characteristics and results of the methodology presented, it can be concluded that it adapts to changes in the energy demand of the microgrid and also to changes in the availability of generation resources (air and solar radiation), making intensive use of renewable generation sources while possible and covering the gap from the use of non-renewable sources and energy storage in the battery system. This use conforms to the proposed strategies and, in this way, manages to satisfy the maximum possible demand from an installed fixed generation capacity.

For its part, the battery system and its management, which is presented as a contribution of this research, is especially relevant in seeking to achieve better coverage of demand. In this case, there are characteristics of the battery that are highly relevant to adequately meet the energy demand of the microgrid. Likewise, the use of a penalty cost for unattended demand points to a better microgrid management process, establishing a turning point for said penalty once it reaches the cost of the most expensive generation source.

That said, it is worth mentioning that, in many cases, the management model seeks to use the stored energy as soon as possible with respect to its production period; however, this generates periods in which the unserved demand reaches significant levels with respect to the overall demand. This situation can be addressed in future research, developing strategies that allow for the prioritization of demand at certain hours of the day and that also considers multiple types of demand, such that the energy use available in each period of time is prioritized for specific users or customers such as hospital infrastructure, food warehouses, etc.

On the other hand, the analysis of the sources of uncertainty that can affect the operation of the microgrid is proposed as future contributions, in such a way that the reliability of the management of generation sources is increased, taking into account different possibilities or scenarios.

### **5. Conclusions**

This study presents an optimization-based methodology for managing the generation and use of energy from multiple sources within an isolated microgrid. This methodology implements specific management strategies according to the Colombian isolated communities context, components such as generators and battery systems that allow, despite trying to make the microgrid work at the lowest possible cost, other relevant aspects are taken into account, such as the minimization of unattended demand and proper functioning of these components. This methodology considers an initial situation in which there are isolated communities with an existing solution for energy access based on the use of diesel units. From this situation, the scenario is considered in which renewable generation sources and energy storage units are included to subsequently analyze their impact on the operating cost and sustainability of the microgrid.

This research offers a management model that contributes to improving energy access conditions in remote communities in Colombia, allowing the intelligent management of renewable generation units and energy storage units. This approach offers an alternative that allows isolated communities to rely less on fossil fuels, such as diesel, and thus make their microgrids more sustainable and robust.

**Author Contributions:** Conceptualization, M.E.-I., Á.J.-D., and P.M.-D.; methodology, M.E.-I. and P.M.-D.; software, M.E.-I.; validation, M.E.-I., Á.J.-D., and P.M.-D.; formal analysis, M.E.-I.; investigation, M.E.-I.; resources, M.E.-I. and Á.J.-D.; data curation, M.E.-I.; writing—original draft preparation, M.E.-I.; writing—review and editing, M.E.-I., Á.J.-D., and P.M.-D.; visualization, M.E.-I.; supervision, Á.J.-D. and P.M.-D.; project administration, M.E.-I., Á.J.-D., and P.M.-D.; funding acquisition, Á.J.-D. and P.M.-D. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the Colombia Scientific Program within the framework of the so-called Ecosistema Científico (Contract No. FP44842-218-2018).

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** The models used in the computational experiment are available at GitHub in [32].

**Acknowledgments:** The authors gratefully acknowledge the support from the Colombia Scientific Program within the framework of the call Ecosistema Científico (Contract No. FP44842-218-2018). The authors also want to acknowledge Universidad de Antioquia for its support through the project "estrategia de sostenibilidad".

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

### **Abbreviations**

The following abbreviations are used in this manuscript:

NCRES Non-conventional renewable energy sources UC Unit Commitment NIZ Non-interconnected zones

### **Appendix A. Model Components**

**Table A1.** Decision variables.


**Table A2.** Technical parameters of the model.


### **Appendix B. Installed Capacity for Experimental Locations**

**Table A3.** Installed capacity for each location.

