Optimal Design of a Diesel-PV-Wind-Battery-Hydro Pumped POWER system with the Integration of ELECTRIC vehicles in a Colombian Community

This article proposes a novel design methodology for hybrid isolated microgrids, integrating electric vehicles (EV) as additional loads and also as additional storage systems in the microgrid design stage. The proposed method highlights the application of electric vehicles in rural environments. Two types of electric vehicles were considered: (1) EV that only operate in charging mode; and (2) EV that can interchange power with the microgrid (V2G). For both EV types, a dispatch strategy was developed to optimize the use of the system resources during the charging process. As an application example of the proposed design methodology, a hybrid microgrid was designed for the rural Colombian village of Unguía. The results show the advantages of the inclusion of EV as ancillary services providers for the system and also as public transportation agents.


Introduction
Nowadays, access to electricity is one of the most critical aspects when assessing the degree of welfare and development of people [1]. For the particular case of Colombia, the population with a regular supply of electricity provided by the primary grid system is located around the big urban centers corresponding to 48% of the territory; this also means that more than half of the country belongs to the so-called non-interconnected zones (NIZ) [2]. Although the Colombian government has a sponsored program for fuel distribution for diesel plant operation in the NIZ, transportation problems elevate the costs and decrease the effectiveness of these solutions, and the environmental concerns also have to be accounted for [2]. In this context, many alternatives have been proposed for decreasing the economic and environmental consequences of fuel-based energy sources in the country [3]. These alternatives include the use of hybrid microgrid systems involving renewable energy sources and the existent diesel plants, which emerge as a promising initiative for the increment of the electricity access in Colombian non-interconnected zones [2].
As defined in [4], microgrids can be considered as systems composed of loads and at least one element of small-scale distributed generation (DG) or storage with the ability to operate disconnected from the primary power grid. As the interest in microgrids grows, aspects such as the optimal configuration of distributed generation or the adequate management of the energy sources arise as research questions. Several works have addressed those issues [5,6], with microgrid design approaches classified as deterministic or stochastic according to the modeling of input variables such as expected demand and weather forecasting [7]. Microgrid design also involves the determination of the combination of elements making possible the fulfillment of the power balance in the microgrid according to some predefined criteria. The search for the optimal microgrid configuration involves mainly enumeration techniques (used for the popular design software HOMER ® ), iterative approaches, and artificial intelligence methods [8]. However, each technique has disadvantages such as the high computational times, the lack of multi-objective cost functions, or the convergence towards local minimum because of the non-convexity of the formulated problems [9]. Despite considerable interest, the optimal microgrid design problem remains an open research area.
In this context, the microgrid application for electricity generation in rural zones faces additional challenges. For the population of the Colombian NIZ, the joint action of storage and generation elements must be able to supply the demanded energy. These storage elements can be battery banks, hydro-pumped systems, or even electric vehicles (EV). The consideration of EV operation in power systems constitutes a challenge that has been widely discussed, mainly due to the worldwide efforts for reducing fossil-fuel dependence and greenhouse gas emissions [10,11]. According to Wappelhorst et al. [12], the use of EV should be considered a priority to reduce energy consumption around the world.
In the specialized literature, the authors of [13,14] presented comprehensive summaries of the different strategies and research issues on integration of EVs in power grids. Generally speaking, vehicle-to-grid (V2G) connection mode enables the electric vehicle to participate as both a distributed source and a controllable load for the grid [14]. Several works have explored the operation of EV in microgrids; some of the specific issues and technical challenges related to EV role in microgrids are presented in [15][16][17]. In particular, the expected operating costs of a microgrid dealing with EV and responsive loads with the participation of distributed renewable energy sources were calculated in [10], including carbon emissions. The mix of different generation sources decreases both the overall microgrid costs and the uncertainties in solar and wind sources. Furthermore, the work presented in [18] considers the inclusion of EVs in a microgrid composed of diesel generators, fuel cells, microturbines, and photovoltaic panels. The power delivered by diesel generators and the power exchanged between EVs and power grid are calculated through an optimization process that minimizes the operation and emissions costs.
Despite the recent interest, there are not many works studying the application of EVs in rural scenarios and their inclusion from the microgrid design stage. Many of the reasons for this lack of research seem to involve topics such as the high purchase price of the EVs and the lack of the infrastructure (charging stations, replacement parts, and qualified technical operators) to support the integration [19]. However, the potential for development in non-urban scenarios is real. According to Wappelhorst et al. [12], some of the benefits provided by electric vehicles in urban areas (such as improving public transport in the community, reducing pollutants, etc.) are also feasible and replicable for rural environments. In this sense, this work intends to explore the inclusion of EV in an isolated microgrid for a rural environment. In fact, from the results of Falcão et al. [20] indicating that EVs as storage systems reduce the microgrid operational costs, this work extends the inclusion of EVs into the design stage of the microgrid to determine the impacts in the microgrid sizing. The proposed design methodology for hybrid isolated microgrids uses an iterative optimization method for solving the unit commitment problem in the microgrid, including the EV, as in [10,18]. We extend the latter works by including the rated power of the microgrid elements as decision variables in our optimization. Hence, both the optimal planning and optimal dispatch problems can be addressed simultaneously.
The proposed design methodology was applied in a Colombian rural community, considering a microgrid composed of a diesel plant, solar photovoltaic (PV) panels, wind turbines, batteries, a hydro-pumped system, and EVs. The role of EVs in the rural community is envisioned as public service vehicles, performing tasks such as the transportation of the staff of a hospital or a public institution from a central station to the attention point. Two operational modes for EVs are studied: EVs that only constitute additional loads for the microgrid, and EVs that provide ancillary services.
This article is organized as follows. Section 2 describes the modeling of the generation elements composing the hybrid microgrid. Section 3 presents the formulation and solution of the optimization problem for microgrid design. The study case for the isolated microgrid design is described in Section 4. Finally, the analysis and discussion of the results are shown in Section 5.

Modeling of Microgrid Elements
The proposed microgrid is composed of a diesel generator, a battery bank, a hydro-pumped storage system, solar panels, wind turbines, and EVs. A schematic figure of a hybrid microgrid such as the one considered is illustrated in Figure 1. In this section, only the models for EV are discussed in detail. The models for the remaining microgrid elements come from the current literature. The models for wind turbines, batteries, and diesel generators are from the work of Maleki and Askarzadeh [21], the photovoltaic panels use the model described in [22], and the hydro-pumped storage can be found in [23].

Modeling of Electric Vehicles
As described above, the microgrid to be designed is proposed for an off-grid system, intended for supplying electricity for a rurally isolated area. This fact defines the pattern consumption of electric vehicles and the strategy for their integration with the power grid. The assumption is that electric vehicles will provide a transportation service for the community public institutions functionaries, as this eliminates the dependence of fossil fuels that must be transported to the remote area and decreases the carbon emissions [12]. For rural zones, small-sized EVs are considered as the population incomes are usually low, the traveling distances are short, and motorcycles do not cover all the transportation needs of the people [24].
In this context, one vehicle is assigned to each relevant institution in the community. As suggested in [25], central community institutions usually include the following: offices of local, state, and government agencies, religious institutions, cultural institutions, community centers, hospitals and public health service, educative centers, and public sports facilities. In addition, as the electric vehicles considered are of low capacity, it is feasible to assume a low rate of charge for them (less than 2 kW/h). Therefore, the existence of a particular charging station is not required, and the vehicles could be charged with a typical home circuit of 220 V. From their role in the electric microgrid, two types of EVs are considered: Type 1, acting as dynamic loads, and Type 2 with active participation in the grid as additional storage elements.

Type 1 Electric Vehicles
These vehicles perform as additional loads in the grid power balance. The microgrid system will provide the required energy to this type of EV to achieve the full charge in the charging schedule. The energy management system will dynamically assign the charging power according to resource availability. Type 1 EVs are intended for the use of institutions providing priority care services in the community, such as hospitals and police stations. The charging schedule will be scheduled according to the working hours of each institution.

Type 2 Electric Vehicles
Type 2 EVs participate as additional storage systems during the parking hours. As a design condition, a minimum level of charge must be guaranteed at the beginning of the daily working hours in order to execute the programmed trips. These vehicles will be assigned to the offices of local institutions such as the mayor's office and deputies since these entities do not need to deal with unforeseen situations as frequently as the hospital and the police institutions. Therefore, recognizing the stochastic nature of the driving pattern for the Type 2 EVs, the daily consumption of these vehicles will be calculated using a probability density function.
The daily energy consumption of Type 2 EVs determines the surplus energy in their batteries, which will be delivered to the network again if the system requires it. According to Wu et al. [11], the daily travel distances of electric vehicles used by office staff behave as a Log-normal stochastic process, based on the travel distances recorded by the National Household Travel Survey in [26]. Thus, a Log-normal probability density distribution f (d) is used to approximate the daily driving distances: where d is the distance traveled by a vehicle during a trip (km), µ is the average traveled distance at the design period, and σ is the standard deviation of the traveled distances. The parameters of the Log-normal function are estimated from previously known travel distances of the designated institution's schedules or assuming the execution of a given number of travels to the neighboring places or towns near to the operating region.
With the Lognormal distribution function already characterized, daily traveling distances d ∈ R p (being p the number of days in the design period) are randomly generated for the whole design period, and the same daily routes are assumed for all the Type 2 EVs. Then, these distances are multiplied by two to represent the round trip distance. In addition, several trips can be performed during the same day; hence, the vector n v ∈ R p of the number of trips per day is randomly generated using a binomial probability distribution. Thus, the daily energy consumption G v2 of each Type 2 EV is: In Equation (2), G v is the energetic consumption produced by driving an EV (kW h km −1 ). The equation of battery energy for a Type 2 EV (E v2 ) is analogous to the equation of the energy in the battery bank in [11]. However, for electric vehicles, the efficiency of charging and discharging of the battery is assumed to be 100%. This gives the following equation: where N is the number of time steps in the design period, γ v is the self-discharge coefficient of the battery, P v2,c (t) is the charging power, and P v2,d (t) is the discharging power of the batteries at the time step t. Besides, the initial charging of the batteries of electric vehicles E v2 (0) is assumed as the minimum energy level.

Formulation of the Optimization Problem
The variables calculated by the optimization are classified as size variables and dispatch variables. The dispatch variables are the power delivered by the Diesel generators at each time step P G ∈ R N ; the charging and discharging power of the battery bank at each time step denoted by P b,c ∈ R N and P b,d ∈ R N ; the power consumption of the water pump and the power generated by the hydraulic turbine of the hydro-pumped storage system at each time step, denoted by P wp,c ∈ R N and P wp,d ∈ R N ; the charging power of Type 1 EVs at each time step P v1,c ∈ R N ; the charging and discharging power of Type 2 EVs at each time step, P v2,c ∈ R N and P v2,d ∈ R N (only the charging power is considered as a decision variable for Type 1 EV); and the unsupplied demand at time step P us ∈ R N . The designer defines the number of EVs of each type as input data.
Size variables are the number of photovoltaic panels N pv , the number of wind turbines N wt , the number of batteries in the battery bank N b , the water storage tank volume V, the rated power of the pump P M wp,c = max(P wp,c ) and the rated power of the hydraulic turbine P M wp,d = max(P wp,d ). Vector x lists the decision variables as: Under the assumption of diesel generation already existing in the rural community of microgrid operation, the number of diesel generation units is not included in the decision variables. Hence, the initial diesel generation investments are also not considered.

Objective Function
A multi-objective weighted function was employed to calculate the design with the lowest possible cost. Two objectives compose this function: the total yearly system cost (C T ) and the total yearly system emissions (E T ), with the latter weighted by the factor w E . The objective function f is presented in Equation (5).
The designer must define the value of the emissions weight coefficient concerning the cost associated with the CO 2 emissions. Here, this cost is extracted from the CO 2 Negotiation European System [27] at the microgrid location.

Total System Cost
For the time period accounted for in the design, the total system cost is calculated as in [28]: where C in is the annualized initial investment cost, i n is the interest rate, n is the project lifespan, C mt is the maintenance cost, and C G is the cost associated with diesel generation. The annualized initial investment cost (C in ) is calculated as indicated in Equation (7): In Equation (7), N j is the number of units of the type j element. Sub-index j takes the following values: j = wt for wind turbines, j = pv for photovoltaic panels, and j = b for batteries of the battery bank. In addition, sub-index l = c indicates a charging state of the storage system and l = d indicates a discharging state. The term C j in is the initial investment cost for the type j element, and CRF is the capital recovery factor.
In addition, investment cost includes the replacement cost C rp for elements with a lifespan lower than the project lifespan (batteries and converters of both photovoltaic panels and batteries) and the cost C Tr of the occupied land by the microgrid elements. This latter cost is associated with the use of the land, and it is calculated by the following expression: where C g is the land price index and A j is the area occupied by the generation element of type j.
The maintenance cost (C m t) is calculated as: where C k mt is the maintenance cost for element k. The cost associated with the fuel for diesel generation is given by Equation (10): In Equation (10), T is the number of time steps in one year, G d f ∈ R N is the consumption of the diesel fuel at each time step, and C d f ∈ R N is the fuel cost at each time step. C l denotes the cost of the lubricant (which is assumed as constant) and G l ∈ R N is the diesel generator lubricant expense, which is related to fuel consumption by the following expression: In Equation (11), P G denotes the power delivered by the diesel generator in [kW]. Equations (10) and (11) were both taken from [29].

Total Carbon Emissions of the System
The design problem assumes the microgrid generating CO 2 emissions at both the construction and operation stages only. The emissions during the operation stage are exclusively due to diesel fuel combustion.
Equation (12) shows the total calculation of CO 2 emissions, where P M j is the rated power of the type j element, E j c represents the CO 2 emissions produced by construction of the type j element, E M h is the maximum energy capacity of the type h storage system, and E G op denotes the CO 2 emissions produced by diesel fuel combustion.

Constraints
The optimization problem has constraints that determine the requirements for its solution. Constraints come from operational conditions of the elements and aspects such as the reliability in the energy supply. The following subsections describe the mathematical expressions for the constraints considered in the microgrid design.

Design Constraints
These are the constraints related to the nature of the design problem and operational limits of the generation elements. First, all decision variables must be positive values, and the variables related to the number of elements must be integer numbers.
The energy stored in the battery bank and EV batteries must remain between the allowable maximum and minimum limits: In Equation (15), E h (t) is the energy stored in the type h storage system at the time step t (with h = b for battery bank and h = v2 for batteries of Type 2 EV). E m h and E M h are the minimum and maximum energy capacity of the type h storage system, respectively.
The energy stored in the the water tank E wp is limited by the tank capacity: The dispatch variables must be kept between defined maximum and minimum values: In Equations (17)- (20), P M G is the total rated power of diesel generators and P M h,c and P M h,d are the maximum charging and discharging power of the type h storage system, respectively. The variable P l ∈ R N denotes the load demanded in the microgrid at each step time.

Reliability Constraints
The reliability constraint is established in terms of the probability (p ns ) of loss of power supply. This probability is defined as the ratio of the total unsupplied demand to the total demand, over a chosen design period, as Equation (21) indicates.
The designer must define the value of the system reliability level denoted by R L . This variable is the lower bound for the probability of loss of power supply. Thus, R L indicates the minimum demand that the system will be able to supply. A complete expression for the loss of power supply may involve the representation of factors such as weather forecasts, demand and generation prediction, reliability indexes and equipment failure rates, similar to those performed in long-term planning studies [30].

Constraints for Electric Vehicles
Type 1 EV The operating period for the institution with assigned Type 1 EVs is between hours h 1i to h 1 f , and the non-working hours are between the interval [h 1i and h 1 f ]. For a full charge, the energy injected to a Type 1 EV at the non-working period must be equal to or higher than the maximum allowed energy E M v1 . This condition is set in Equation (22), where E M v1 is the maximum capacity of batteries of Type 1 EVs, and h 1i and h 1 f denote the initial and final non-working hours for type1 EV, respectively.
In addition, the charging power must be zero during the working period, because the vehicles are in operation at that moment. This condition is set in Equation (23).
Type 2 EV The operating period for institutions with assigned Type 2 EVs is between hours h 2i to h 2 f , and the non-working hours are between the interval [h 2i and h 2 f ]. The available power to discharge in a Type 2 EV P v2,d must equal to or greater than the daily driving average power consumption at the working hours. This average power consumption is obtained by dividing the total daily energy by the number of working hours, as indicated in Equation (24). The charge and discharge process of Type 2 EV batteries must comply with Equations (24) and (25).
The charging power of Type 2 EVs at working hours must be zero every day. This condition is expressed as follows: In addition, system power balance must condition the exchanged power with the grid by Type 2 EVs at the non-working hours from h 2i to h 2 f . This constraint is indicated in Equation (26), where P v2,d (k) is the power discharged by Type 2 EV to the grid at the non-working period.

Constraints for Diesel Fuel Availability
The last constraint deals with the unavailability of power from diesel generators due to factors such as fuel exhaustion, loss of line connectivity, or equipment failure [5]. For a broad representation of these situations, an average daily energy value of G M G is set as the upper bound for the daily energy supplied by the diesel. Equation (27) describes daily energy delivered by diesel generators, where h i and h f are the initial and final hour for the days covered by the design period, respectively.

Solution Method
The cost function of the optimization problem in Section 3 has both linear and convex characteristics. These features come from the maximum point-to-point function max(·) of a positive constant, as indicated in Equations (7), (9) and (12). Additionally, this problem has a mixed-integer nature, as integer numbers represent the amount of photovoltaic panels, wind turbines, batteries, and the volume of the water storage tank. In addition, variables for the power dispatch of each element are real-valued. Under these conditions, the branch and cut method was used to solve the resulting mixed-integer problem. Optimization was performed with software CVX in Matlab ® using Gurobi ® solver [31]. Figure 2 provides a graphic representation of the proposed solution method, summarizing all the involved variables.

Description of the Case of Study
The Colombian rural village of Unguía was selected to illustrate the application of the proposed microgrid design methodology. Unguía is a community located in the north of the Chocó department, at 478 km by waterway from Quibdó, the state capital. This rural community has an estimated population of 15,200 inhabitants [32], with around 31% of them in the urban area. The urban area has about 900 households, of which the 78% have access to electric service provided by two 475 kVA diesel generators. Unguía has public entities such as the Mayor's Office; the Agrarian Bank; the Department for Social Prosperity; the secretaries of government, finance, and agriculture; a police station; and a hospital. In addition, there is an active presence of private actors, such as associations with legal status.
This community was selected based on the study by Gómez [33], highlighting Unguía as a good option for the implementation of solar and wind generation alternatives in Colombia. Weather variables and the demanded load were taken from 2015 data to perform the microgrid design. Information about demanded load was provided by Instituto de Planificación y Promoción de Soluciones Energéticas para las Zonas No Interconectadas [34]. However, these data series have periods when the demanded load was 0 kW. During these periods, the zero demand was replaced by the average weekly consumption obtained for days with total supply. The design scenario involves five small-sized EVs (Renault Twizy model), distributed as follows: the hospital and the police employ two Type 1 EVs, and the mayoralty, the court and the Secretary of Government use the remaining three vehicles as Type 2 EVs.
The Lognormal distribution parameters µ and σ for Type 2 EVs were calculated by matching the data of travel distances with this distribution. The travel distance data were calculated as the average distances between the mayoralty, the court, the secretariat of government, and the rural villages that can be reached by road. In this way, the obtained parameter values were µ =1.44416 y σ =0.630016. Furthermore, the energy storage limitations in EV batteries only allow for up to two trips per day, according to the distance to the furthest population. Hence, the number of trips per day was randomly generated using a binomial probability distribution with parameters N = 2 and p = 0.5.
The operating period for the Type 1 EV was established from Monday to Sunday between 7:00 and 19:00. Besides, Type 2 vehicles would be operating from Monday to Friday between 8:00 and 18:00, in concordance with the schedule of public service entities at Unguía [32]. Figure 3a shows the monthly average of demanded load and Figure 3 shows the average power consumption by Type 2 EV. The total energy consumption of both elements was obtained by multiplying the average values by the number of hours in the month. According to Figure 3b, power consumption of Type 2 EVs is much lower than the demanded power by household users (0.0044% of the latter). This behavior is expected, as 909 homes have a more significant power consumption (Figure 3a than only three small-sized electric vehicles, even for a rural community.

Meteorological Variables
A deterministic approach was used for weather forecasting, assuming the same behavior of previous years. Data time-series recorded from Unguía weather variables in 2016 approximated the weather conditions for the design period. These wind speed and temperature data were provided by IDEAM, a state entity in charge of environmental studies [35]. The solar irradiance incident on the photovoltaic panels at Unguía was obtained from the NASA database [36] through the software HOMER ® [37] for 2016. The hourly horizontal surface solar irradiance data series were calculated synthetically from the monthly average irradiance, through the application of the Graham algorithm. Calculations assumed the same tilt (5.99°) and azimuth (180°) angles for all photovoltaic modules. Figure 4a,b illustrates the monthly energy production reached with one wind turbine and one photovoltaic panel at Unguía.

Parameters for Total Cost Calculation
The parameters assumed for calculation of total system cost were: time steps of 1 h, an annual interest rate i n of 5%, a project lifespan n of 20 years, and a weight coefficient of emissions w E of 8.49 USD t −1 CO2. This latter value corresponds to the annual average emissions cost for the European Union, set by SENDECO2 for 2015 [27]. The complete list of the parameters for microgrid elements is presented in Table A1 in Appendix A, including the respective cost values enunciated in Section 3. In particular, the diesel fuel cost C d f (t) was estimated from the methodology established in [38]. Fuel cost varies for each month of the year and it is also described in Table A2 in Appendix A.

Results and Discussion
In most of the studies about microgrid design, the design period covers one year of operation. This study used the same period with a small modification, due to the memory requirements to solve the optimization problem with the branch and cut method. The design period was divided into two six-month design horizons: one covering from January to June and another from July to December. Table 1 presents the design results obtained for both periods.

Microgrid Design with EV Charging Management and Storage Participation
In Table 1, the number of wind turbines, pumps, and hydro-turbine rated power and water storage tank volume is higher for the months between July and December. The growth in the water tank is notorious, nearly tripling the volume from the first period to the second one. The increment in the rating of the pump and water tank system is due to the reduction in the number of required batteries, as the former is a cheaper storage option. However, the overall system is more expensive for the second period than the period between January and June. This behavior obeys to the increment in the average electric demand in Unguía in September and October, as shown in Figure 3a. Hence, the system requires an increase of the generation capacity to comply with demand requirements. Figure 5a illustrates the monthly average power generated by all sources.  (b) Figure 5. Monthly average generated power, charging and discharging: (a) monthly average generated power by microgrid sources; and (b) monthly average charging and discharging power by storage systems.
The contribution of diesel generation to the electricity production of the system is high, corresponding approximately to 70% of the total generation in every month, as shown in Figure 5a. Furthermore, a relationship can be established for the average solar and wind resources in Figure 4a,b. These figures show high values of both resources in January, February, and March; consequently, most of the energy production from photovoltaic panels and wind turbines happens during these months. Figure 5b presents the variations in the monthly average charging and discharging power in the storage systems. These variations are related to the coincidence between generation and demand in each month. For example, the need for the use of storage systems is more significant in January than in June. Figure 6 highlights this phenomenon, showing how generation exceeds demand during the morning hours on 2, 3, 5, 6 January, reaching a maximum value of 600 kW on 6 January. However, in the first week of June, the generation is lower than the demand (only reaches 480 kW), thus the use of the storage systems to save surplus energy was low. For this reason, there is a lesser need for using battery storage and water pumping systems in June than in January, as shown in Figure 5b. On the other hand, the usage of Type 2 EV remains similar for every month. This is because the Type 2 EV batteries are available for use during the night and over the "idle" times of weekends, and their quantity is not considered as a decision variable in the optimization (since a fixed number of three Type 2 EVs was selected). Hence, the system tends to use the maximum capacity of these batteries, and the average values set close to the limit of power capacity.
Calculation of the discharged power variable of Type 2 EVs excludes the power used by driving the vehicles. The charging power can be used both for driving and supplying energy to satisfy the demand in the system, hence its average value is slightly higher than the value of the power discharged to the system (i.e., 0.04 kW more than the average discharged power in January). This means that most of the power stored in these vehicles is being delivered to the system. The amount of energy in the batteries of Type 2 EVs is presented in Figure 7 for the first week of January. In this figure, more drastic changes in battery power can be observed for the weekend of 3 and 4 January, as the batteries of electric vehicles were available to serve as storage to the network in these two days.

Calculation of the Levelized Cost of Energy
The Levelized Cost of the Energy (LCOE) is an indicator measured for power sources, allowing the comparison of different energy generation methodologies in a normalized sense [39]. For this scenario, the obtained LCOE for both design periods are higher than the corresponding electricity costs in the Unguía community for the design year 2016. The LCOE for the first design period has a value of $1. 23 [USD] while the electricity price in Unguía, for the first semester of 2016, was $0.16 [USD]. Moreover, the LCOE for the second design period has a value of $1. 22 [USD] while in Unguía the electricity price was $0. 13 [USD] for the second semester.
The LCOE for the designed system is approximately 8.6 times higher than the corresponding electricity price in the community, although the latter is strongly diminished by government subsidies. However, the obtained LCOE values are still three times higher than those reported in [40] for a solar-biomass hybrid microgrid in India. This disproportionate difference is due to the inclusion of the emission costs and the initial investment required for both renewable energy sources and storage systems in microgrid. Despite this, some strategies can be implemented to lower the LCOE closer to the electricity price, such as increasing the investment payment period, neglecting the emissions costs, searching for an investor with lower interest rates, or asking for government subsidies.

Design without Ancillary Services from EV
For the assessment of the impacts of the EV inclusion, the performance of the system with both Type 1 and Type 2 EVs was compared with a microgrid design considering the electric vehicles only as loads with a fixed charge schedule. Between 20:00 and 23:00, EV are charged at the maximum charging rate. This latter scenario was executed without charging management of Type 1 EVs and with no participation of Type 2 EVs as storage elements of the system. The comparison was performed through simulation for the same calculation periods previously described, and the results are shown in Table 2. In comparison with the results in Section 5.1, Table 2 shows how all the optimization parameters increased without the contributions of the EV, except for the number of wind turbines. These increments also generate a rise in the total annual costs of the network. In fact, since the number of storage units must grow with EVs acting only as loads, the January-June period presented increments of two battery units, over 100 m 3 in the tank volume, 3 kW higher turbine rating and nearly double the rated power in the water pump. These augmented parameters resulted in an increment of $2504. 40 [USD] only in the water pumped storage system operation. These expenses are equivalent to $50,000 [USD] in the net annual costs of the system, after discounting the costs generated by the inclusion of additional panels.
On the other hand, for the period July-December, the design resulted in three more batteries and a rise of more than 50% in the rated power of the water pump and hydraulic turbine. In addition, water tank volume nearly tripled from the first period to the second one, as observed in Table 1. These changes increased $5337.80 [USD] in the costs of the pumped water storage system. These represented additional costs of $30,000 [USD] in the microgrid for the studied period.

Comments on Diesel Usage
The rates of diesel generation usage in Tables 1 and 2 represented over 60% of total generation in all simulated cases. These numbers fall in line with diesel usage rates reported in previous hybrid microgrid designs proposed for the same location [41,42] without EV consideration. In those studies, given the economic factors involved in the optimization, the high diesel participation was a product of the high initial investment costs of renewable sources and storage systems. In the present work, despite both the long amortization time (20 years) and the low annual interest rate of 5% considered, the projected impact of these costs kept the diesel as the main energy source for the resulting microgrid designs. Unsurprisingly, these diesel usage rates directly affected the CO 2 emission savings at the microgrid operation stage. However, the inclusion of EVs as storage systems caused a 20% reduction of diesel usage and doubled the projected CO 2 emission savings compared to the case without ancillary services from EV.
In addition, there is a constraint on the amount of daily diesel generation that can be used by the microgrid. This constraint represents the non-availability of the diesel fuel due to transportation difficulties towards the Unguía community, which must be reached by waterway. Despite this restriction, the resulting optimization selected a configuration mixing renewable energies, storage systems, and diesel generators for all the considered cases. This result highlights the importance given to the system reliability over the long-term cost reduction. That is, if diesel generation were unrestricted, the optimization would ignore the storage systems other than Type 2 EVs in the first calculation period of January-June.

Conclusions
This paper describes a methodology for the inclusion of EV in an isolated microgrid, from the design stage. These EV are intended for use mainly in a rural environment, and some of them can provide ancillary services to the microgrid. The village of Unguía (Colombia) was used as a case of study to illustrate the application of the methodology. The Unguía microgrid was designed using hourly-sampled climate and demanded power data for one year. For ease of calculation, the one-year design period was divided in two periods of six months. The best design in terms of system costs was the microgrid obtained for the period between January and June. However, this same microgrid would not meet the requirements for the period from July to December. Thus, the recommended design for implementation would be the resulting microgrid for the period from July to December, which satisfies the most restrictive demand conditions. The Levelized Cost of the energy in the resulting design is still almost eight times higher than the electricity price at Unguia, and further strategies are needed to lower this indicator in the proposed configuration.
The inclusion of electric vehicles at the design stage of the microgrid is recommended. Beyond considering the EVs merely as additional loads, they could generate savings in the total annual costs of the network when given the capability of becoming part of the storage system in idle hours (when transportation service is not being provided). In addition, the integration of EV reduces the use of diesel generation and increases the number of wind units due to the long periods of high availability of the wind resource. The resulting energy production makes the inclusion of wind power cheaper, as the surplus of energy is stored in the EV. Besides, there is also an increment in the pump and the hydraulic turbine rated powers of the hydro-pumped storage system. Additionally, from the operational stage point of view, the consideration of EV will help to the public institutions of the rural Unguía community to overcome the fossil fuel dependence for its transportation tasks.
At last, a final recommendation is related to the use of the broadest possible computing horizon to perform the design of the microgrid. This is because the complexity of the problem is proportional to the square of the number of decision variables. In this case, a six-month time horizon was the maximum allowable design period.

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

Abbreviations
The following abbreviations are used in this manuscript: